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(core): new output features for changes in contracts #4169

Merged
merged 11 commits into from
Jun 9, 2022

Conversation

mrnaveira
Copy link
Contributor

Description

  • New output features for all the new types representing contract changes, as subfields of the existing SidechainFeatures struct.
  • Implement consensus encoding/decoding for the new types.
  • Updated all the required gRPC specifications and the related conversions.
  • New type CommitteeSignatures to wrap a list of signatures, in a similar fashion to the existing CommitteeMembers.

Motivation and Context

We need a way to represent, in UTXO features, all the information needed to specify changes in a contract:

  • ContractUpdateProposal: specifies the new proposed constitution.
  • ContractUpdateProposalAcceptance: acceptance, by a validator node, of a contract update proposal.
  • ContractAmendment: ratification of a update proposal, specifying when it's going to be enforced in the base layer.

How Has This Been Tested?

  • New unit tests to check consensus encoding/decoding of the new features.
  • The existing tests for side-chain features pass with the new types.

sdbondi
sdbondi previously approved these changes Jun 9, 2022
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 - utAck (most code changes leverage type safety + CI tests) - some minor optimisations in the conversion code but happy to approve

base_layer/core/src/proto/transaction.rs Outdated Show resolved Hide resolved
base_layer/core/src/proto/transaction.rs Outdated Show resolved Hide resolved
base_layer/core/src/proto/transaction.rs Outdated Show resolved Hide resolved
base_layer/core/src/proto/transaction.rs Outdated Show resolved Hide resolved
@aviator-app aviator-app bot added the mq-failed label Jun 9, 2022
@mrnaveira
Copy link
Contributor Author

mrnaveira commented Jun 9, 2022

@sdbondi I implemented the improvements on conversions that you suggested

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.

👍

@aviator-app aviator-app bot added mq-failed and removed mq-failed labels Jun 9, 2022
@sdbondi sdbondi removed the mq-failed label Jun 9, 2022
@aviator-app aviator-app bot merged commit 41570f6 into tari-project:development Jun 9, 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.

2 participants