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: Activate hotstuff consensus #1640

Merged
merged 8 commits into from
Nov 17, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Sep 14, 2023

  • Activate hotstuff consensus via chain_pacemaker::on_irreversible_block getting irreversible block with a finalizer_set.
  • Change proposed producer schedule processing under hotstuff. Instead of two rounds of LIB, set the active producer schedule on the next().next() producer round. This allows a bit of time for anyone observing producer schedule changes to react. It also reduces the likely hood of two micro forks having different producer schedules.
  • Fork database did not need modified as dpos_irreversible_blocknum is set to max uint32 which allows the same fork selection rule to be used.
  • Under dpos the fork database drives LIB in controller::log_irreversible. Once hotstuff is activated qc_chain will drive LIB via a call to controller set_hs_irreversible_block_num().

Tests for activation and producer schedule change under hotstuff still needs to be added. Will be worked under #1916

Resolves #1631
Resolves #1523
Resolves #1522

Producer schedule changes under hotstuff in next,next producer round.
Add comment to schedule_lib_num. Do not want to rename as to not break clients that expect schedule_lib_num name.
@heifner heifner added the OCI Work exclusive to OCI team label Sep 14, 2023
@heifner heifner requested a review from linh2931 September 19, 2023 14:57
@arhag arhag linked an issue Oct 12, 2023 that may be closed by this pull request
libraries/chain/block_header_state.cpp Outdated Show resolved Hide resolved
libraries/chain/block_header_state.cpp Show resolved Hide resolved
@@ -50,18 +57,9 @@ namespace eosio { namespace chain {

auto proauth = get_scheduled_producer(when);
Copy link
Member

Choose a reason for hiding this comment

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

This can be moved closer to where it is first used.

libraries/chain/controller.cpp Show resolved Hide resolved
libraries/hotstuff/chain_pacemaker.cpp Show resolved Hide resolved
plugins/producer_plugin/producer_plugin.cpp Outdated Show resolved Hide resolved
@heifner heifner requested a review from linh2931 November 7, 2023 20:52
@arhag arhag linked an issue Nov 8, 2023 that may be closed by this pull request
@heifner heifner merged commit 78a5976 into hotstuff_integration Nov 17, 2023
29 checks passed
@heifner heifner deleted the GH-1523-hotstuff-activate branch November 17, 2023 16:48
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
3 participants