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

Refactor Attestation verification #2004

Merged
merged 18 commits into from
Jul 29, 2024
Merged

Refactor Attestation verification #2004

merged 18 commits into from
Jul 29, 2024

Conversation

fed-franz
Copy link
Contributor

@fed-franz fed-franz commented Jul 23, 2024

Rename:

  • verify_block_att to verify_att
  • VoterWithCredit to Voter

Add:

  • to_consensus_header method for Header
  • to_voters method for Cluster<PublicKey>
  • get_step_voters
  • get_step_committee
  • merge_voters

Remove:

  • verify_quorum
  • verify_success_att
  • merge_committees

Refactor:

  • get_voters is modified to only return voters, without re-verifying the attestation
  • verify_att is modified to get a consensus_header parameter
  • verify_att is modified to checks the expected result
  • Voter is modified to be (PublicKey, usize) to ease its handling
    • reward_slash_and_update_root is updated as a consequence

Bugfixes:

  • fix verify_att to correctly return the set of voters, instead of the whole committees

@fed-franz fed-franz force-pushed the refactor_verify_att branch from 39576f9 to 8427751 Compare July 23, 2024 14:43
@fed-franz fed-franz changed the title Refactor verify_block_att Refactor Attestation verification Jul 23, 2024
@fed-franz fed-franz force-pushed the refactor_verify_att branch 2 times, most recently from 27fe6da to e4ca204 Compare July 25, 2024 11:36
@fed-franz fed-franz requested a review from herr-seppia July 25, 2024 11:58
fed-franz added 18 commits July 26, 2024 10:29
Fixes a bug in verify_att, which returned the set of all committee
members instead of just the actual voters.

verify_votes is modified to return the set of voters corresponding
to the quorum committee.

verify_step_votes is modified to return a vector of voters instead
of a committee.
Fixes a bug in verify_att, which returned the set of all committee
members instead of just the actual voters.

- verify_att now get voters from verify_step_votes and merge them
by using merge_voters.
- merge_committees is deleted as redundant
Allow verify_att to check if the Attestation result is what
expected.

- verify_att now takes expected_result and check it against att
- verify_success_att is removed as redundant
@fed-franz fed-franz force-pushed the refactor_verify_att branch from f657ef6 to abbc821 Compare July 26, 2024 08:40
@fed-franz fed-franz marked this pull request as ready for review July 26, 2024 08:49
@fed-franz fed-franz self-assigned this Jul 26, 2024
@fed-franz fed-franz requested a review from goshawk-3 July 26, 2024 09:07
@fed-franz fed-franz added the module:consensus Issues related to consensus module label Jul 26, 2024
@fed-franz fed-franz merged commit 96eab99 into master Jul 29, 2024
16 checks passed
@fed-franz fed-franz deleted the refactor_verify_att branch July 29, 2024 10:05
@fed-franz fed-franz added the module:node Issues related to node module label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:consensus Issues related to consensus module module:node Issues related to node module
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants