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(base_layer): validation of committee membership in contract acceptances #4221

Merged
merged 25 commits into from
Jun 24, 2022

Conversation

mrnaveira
Copy link
Contributor

Description

  • Created a new TxDanLayerValidator struct to encapsulate all DAN layer consensus validations
    • Created a submodule specific for contract acceptances, more submodules can be added for other validations (contract definition, contract constitution, etc.)
    • Created a helper submodule for functionality that is expected to be reused for future validations
  • Modified the mempool to include the new TxDanLayerValidator
  • New variant of validation error (DanLayerError) to represent DAN layer consensus validation errors
  • Adapted the existing integration test for contract acceptances, by specifying the validator node identity file (fixtures/validator_node_id.json) so it's always present in the contract constitution

Motivation and Context

  • The base layer should only allow contract acceptance transactions of validator nodes that are defined as committee members in the contract constitution
  • This PR is the first base layer validation of the DAN layer, so it defines the structure for all future DAN validations

How Has This Been Tested?

  • New unit test to check membership of a validation node in a contract constitution committee
  • The existing unit and integration tests pass

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.

utAck - thanks for writing tests. Looks like a cucumber test related to this is broken, otherwise will approve.

stringhandler
stringhandler previously approved these changes Jun 23, 2022
@aviator-app aviator-app bot removed the mq-failed label Jun 24, 2022
@aviator-app aviator-app bot merged commit 641844a into tari-project:development Jun 24, 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.

3 participants