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

[1.0.1] Add missing data to block_header_state and change verify_qc_claim to use block_header_state data rather than only looking up a block_state in the fork database #719

Merged
merged 52 commits into from
Sep 11, 2024

Conversation

greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented Sep 7, 2024

Resolves #694.

Implements updates described in issue #694:

  • store policy generation numbers in every block_ref of the finality_core
  • maintains latest_qc_claim_block_active_finalizer_policy in block_header_state
  • new snapshot format (v8) which adds these new members. v7 format of spring 1.0 is unsupported.
  • new fork_database format (version 3). version 2 not loaded anymore, but version 1 (legacy fork_db only) OK.
  • update the serialization of the finalizer safety file, so it doesn't change even though the block_ref struct has two new members.
  • add version to chain_head.dat file and do not load existing version.
  • updated qc validation which does not require the fork database anymore, all needed info is in the parent block_header_state
  • add new test (verify_spring_1_0_block_compatibitity) validating that this PR's changes do not affect the block ids generated.
  • update tests impacted by the change, including adding to repo new snapshot v8 reference files.

@greg7mdp greg7mdp marked this pull request as draft September 7, 2024 22:33
@greg7mdp greg7mdp marked this pull request as ready for review September 9, 2024 15:26
@ericpassmore
Copy link
Contributor

Note:start
category: Other
component: Internal
summary: Enhance Block Header State and only use provided block data to verify QC claims.
Note:end

Copy link
Member

@arhag arhag left a comment

Choose a reason for hiding this comment

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

By the way, your PR description says "all needed info is in the root block_header_state" but it should say "all needed info is in the parent block_header_state".

@greg7mdp greg7mdp merged commit 5326f62 into release/1.0 Sep 11, 2024
36 checks passed
@greg7mdp greg7mdp deleted the gh_694 branch September 11, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The product is not working as was intended.
Projects
None yet
5 participants