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

Replace active_finalizer_policy_digest with last_pending_finalizer_policy_digest #132

Merged
merged 6 commits into from
May 14, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented May 11, 2024

Replace active_finalizer_policy_digest with last_pending_finalizer_policy_digest in finality digest computation

Resolves #128

@heifner heifner added the OCI Work exclusive to OCI team label May 11, 2024
Copy link
Contributor

@greg7mdp greg7mdp left a comment

Choose a reason for hiding this comment

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

For the name, I would prefer newest_pending_... to last_pending_... as I find it less ambiguous. not sure anymore newest is much better.

@heifner heifner requested a review from greg7mdp May 13, 2024 15:29
Copy link
Member

@systemzax systemzax 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 to me. 👍

I've merged this PR into the branch I'm working on, tested it, and as far as I can tell, it produces the expected results.

@@ -135,6 +136,7 @@ namespace eosio::chain::snapshot_detail {
, proposer_policies(bs.proposer_policies)
, finalizer_policies(bs.finalizer_policies)
, finalizer_policy_generation(bs.finalizer_policy_generation)
, last_pending_finalizer_policy_digest(bs.last_pending_finalizer_policy_digest)
Copy link
Contributor

@greg7mdp greg7mdp May 13, 2024

Choose a reason for hiding this comment

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

Should we add a comment on top of this function:

// When adding a member initialization here, also update block_state::block_state(snapshot_detail::snapshot_block_state_v7&& sbs).

@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: Update to use the last pending finalizer policy in the history of the blockchain, if there are no pending finalizer policies in the queue, then the last pending finalizer policy is the active finalizer policy.
Note:end

@heifner heifner merged commit a0da117 into main May 14, 2024
36 checks passed
@heifner heifner deleted the GH-128-digest branch May 14, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
5 participants