Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: contract acceptance publication #4151

Merged
merged 17 commits into from
Jun 7, 2022

Conversation

mrnaveira
Copy link
Contributor

Description

  • New gRPC method in the validator node for publishing a contract acceptance,
    • The only parameter for now is the contract_id
    • The validator node internally uses its own public key for building the acceptance.
    • The signature of the acceptance only has a mock value for now. When we have contract constitutions in place, we probably would want it to be the signature of a hash of a contract constitution identification.
    • Calls the new gRPC method in the wallet to publish the transaction
  • New gRPC method in the wallet to submit a contract acceptance. It builds and sends to the network a contract acceptance with the corresponding flags and features

Motivation and Context

Validator nodes need to be able to publish contract acceptances, for contracts in which they are included as committee members.

This PR continues previous work and provides a gRPC method in the validator node (and a corresponding one in the wallet) to publish contract acceptances.

The functionality can be used in future work for implementing both auto-acceptance and manually acceptance of contract constitutions.

How Has This Been Tested?

New integration test that publishes and mines a contract acceptance through the new validator node gRPC endpoint

Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.
The only thing missing here, ut this could be a follow up PR, is validation on these transactions.
All the stuff the base node needs to check

integration_tests/features/support/world.js Show resolved Hide resolved
@mrnaveira
Copy link
Contributor Author

This looks good. The only thing missing here, ut this could be a follow up PR, is validation on these transactions. All the stuff the base node needs to check

Correct. The work on layer 2 so far was intended to have a way to store all the features into the blockchain. We left the consensus rules/validation for future PRs, but it's something we will need to address soon.

Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, few minor comments

@stringhandler stringhandler merged commit d3d3e91 into tari-project:development Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants