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

IF: Unification: Add block header extension #1911

Closed
Tracked by #1508
arhag opened this issue Nov 16, 2023 · 3 comments · Fixed by #2024 or #2097
Closed
Tracked by #1508

IF: Unification: Add block header extension #1911

arhag opened this issue Nov 16, 2023 · 3 comments · Fixed by #2024 or #2097
Assignees

Comments

@arhag
Copy link
Member

arhag commented Nov 16, 2023

Depends on #1881 and #1941.

The block header extension should carry the new information needed for a proposal:

  • last_qc_block_num: The block height of the most recent ancestor block that has a QC.
  • is_last_qc_strong: This is a boolean that determines if the QC justification for the block referenced by last QC block height is strong or weak.
  • new_finalizer_policy: The new finalizer policy proposed in the block (may be nullopt).
  • new_proposer_policy: The new proposer policy proposed in the block (may be nullopt).

Example:

 struct instant_finality_extension {
    uint32_t last_qc_block_num {0};  ///< The block height of the most recent ancestor block that has a QC justification
    bool     is_last_qc_strong {false}; ///< whether the QC for the block referenced by last_qc_block_height is strong or weak.
    std::optional<finalizer_policy> new_finalizer_policy;
    std::optional<proposer_policy> new_proposer_policy;
 };

This should replace the extensions finalizer_policy_extension and proposal_info_extension.

Use the status of the pending_quorum_certificate to determine whether you have a valid QC and if so whether it is strong or weak. That determines the values of last_qc_block_num and is_last_qc_strong.

Use the most recent ancestor block that has a valid QC (whether the status is strong, weak_final, or weak_achieved) as the block referenced by last_qc_block_num.

The actual QC does not need to be included yet in a block extension. That will be handled in a separate issue.

@enf-ci-bot enf-ci-bot moved this to Todo in Team Backlog Nov 16, 2023
@arhag arhag added 👍 lgtm and removed triage labels Nov 16, 2023
@greg7mdp greg7mdp moved this from Todo to In Progress in Team Backlog Nov 28, 2023
@BenjaminGormanPMP BenjaminGormanPMP added this to the Leap v6.0.0-rc1 milestone Nov 28, 2023
greg7mdp added a commit that referenced this issue Dec 15, 2023
The test can be re-enabled when #1911 is completed.
@BenjaminGormanPMP BenjaminGormanPMP moved this from In Progress to Todo in Team Backlog Dec 18, 2023
@linh2931 linh2931 self-assigned this Dec 27, 2023
@linh2931 linh2931 moved this from Todo to Awaiting Review in Team Backlog Dec 30, 2023
@BenjaminGormanPMP BenjaminGormanPMP moved this from Awaiting Review to Done in Team Backlog Jan 4, 2024
@arhag arhag reopened this Jan 5, 2024
@github-project-automation github-project-automation bot moved this from Done to Todo in Team Backlog Jan 5, 2024
@arhag
Copy link
Member Author

arhag commented Jan 5, 2024

Partially done, but to complete we must first wait until at least #2034 is complete and it would probably be best to wait until #2046 is also complete.

@greg7mdp
Copy link
Contributor

greg7mdp commented Jan 8, 2024

I have finished this issue in my branch gh_2034.

@linh2931 linh2931 moved this from Todo to In Progress in Team Backlog Jan 11, 2024
@greg7mdp
Copy link
Contributor

@linh2931 @arhag I believe we can close this issue as completed by #2077

@linh2931 linh2931 moved this from In Progress to Awaiting Review in Team Backlog Jan 17, 2024
@linh2931 linh2931 linked a pull request Jan 17, 2024 that will close this issue
@linh2931 linh2931 moved this from Awaiting Review to Done in Team Backlog Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment