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: Support transition from legacy consensus to HotStuff consensus #1523

Closed
Tracked by #1508
arhag opened this issue Aug 17, 2023 · 4 comments · Fixed by #1602, #1598 or #1640
Closed
Tracked by #1508

IF: Support transition from legacy consensus to HotStuff consensus #1523

arhag opened this issue Aug 17, 2023 · 4 comments · Fixed by #1602, #1598 or #1640
Assignees
Labels
👍 lgtm OCI Work exclusive to OCI team

Comments

@arhag
Copy link
Member

arhag commented Aug 17, 2023

Depends on #1511, #1532, #1610, #1631, and AntelopeIO/reference-contracts#26.

Block header extension to capture new finalizer set.

Producer plugin config allows for specifying block finalization key pairs.

Questions:

  • When do new messages get sent over P2P network?
    • KH: I suggest 5.0 always send these messages. But if we are concerned about a network not ever activating hotstuff, maybe add an option to disable them?

For this issue, we are not switching existing tests over to use IF.

However, a new unit test is needed that switches to IF to test the transition.

To implement that new test, we will need to pull in AntelopeIO/reference-contracts#26 bios contract to set the first finalizer set and transition to HotStuff.

Also add constraints to set_finalizers host function to meet needs of #1569: ✓

  • Each finalizer can have a description that does not exceed 256 bytes. ✓
  • There can be a maximum of 2^16 finalizers in the finalizer set. ✓

After HotStuff transition, the parameters in block_header_state used by the old consensus algorithm (LIB, proposed LIB, etc.) are no longer needed and should not be used. But the fork choice rule in fork DB uses the LIB from block_header_state to decide on the best chain. Additionally, plugins currently expect block_header_state to be immutable.

We would like to keep the simple concept that the block_header_state is immutable and computed purely from the prior block_header_state and the new block_header. This means block_header_state cannot store LIB and the active finalizer set.

So we need to still store the real LIB in fork DB (fork choice rule must use this LIB once transitioned to HotStuff rather than the obsolete one in block_header_state).

Open questions:

  • Where do we store the active finalizer set since we cannot store it in block_header_state? [Maybe store in qc_chain?]
  • Do we need to store the active finalizer set in the portable snapshot? If so, how does this impact the determinism of the portable snapshot?
  • What else do we need to store in the portable snapshot to allow for nodes to safely recover liveness?
  • Do we need to include the active finalizer set as part of the integrity hash? If so, how does this impact the determinism of the integrity hash?
@heifner
Copy link
Member

heifner commented Aug 17, 2023

Seems like this depends on fcecin@74295f2 which is not currently in hotstuff_integration

@heifner
Copy link
Member

heifner commented Aug 29, 2023

Block header extension

  • host function sets finalizer set in pending block
  • multiple calls in one block overwrite value in pending block
  • proposed finalizer set added to block header extension

Active schedule

@heifner heifner added the OCI Work exclusive to OCI team label Aug 30, 2023
heifner added a commit that referenced this issue Aug 31, 2023
heifner added a commit that referenced this issue Aug 31, 2023
heifner added a commit that referenced this issue Aug 31, 2023
…ption. Remove generation from finalizer_set used by CDT/ABI.
heifner added a commit that referenced this issue Sep 1, 2023
heifner added a commit that referenced this issue Sep 1, 2023
heifner added a commit that referenced this issue Sep 1, 2023
…tion

IF: Modify set_finalizer host function struct type
heifner added a commit that referenced this issue Sep 1, 2023
heifner added a commit that referenced this issue Sep 2, 2023
@heifner
Copy link
Member

heifner commented Sep 5, 2023

  • Any desire to update keosd to support BLS keys? Any desire to allow nodeos to use keosd to retrieve finalizer BLS private keys?

heifner added a commit that referenced this issue Sep 6, 2023
heifner added a commit that referenced this issue Sep 7, 2023
heifner added a commit that referenced this issue Sep 7, 2023
heifner added a commit that referenced this issue Sep 7, 2023
heifner added a commit that referenced this issue Sep 7, 2023
heifner added a commit that referenced this issue Sep 7, 2023
…tion-3

IF: Add support to producer_plugin to load BLS finalizer keys
heifner added a commit that referenced this issue Sep 8, 2023
heifner added a commit that referenced this issue Sep 8, 2023
heifner added a commit that referenced this issue Sep 14, 2023
Producer schedule changes under hotstuff in next,next producer round.
heifner added a commit that referenced this issue Sep 14, 2023
Add comment to schedule_lib_num. Do not want to rename as to not break clients that expect schedule_lib_num name.
@arhag arhag removed this from the Leap v5.0.0-rc1 milestone Sep 19, 2023
@arhag arhag linked a pull request Oct 12, 2023 that will close this issue
@bhazzard bhazzard added this to the Leap v6.0.0-rc1 milestone Nov 1, 2023
heifner added a commit that referenced this issue Nov 7, 2023
heifner added a commit that referenced this issue Nov 7, 2023
heifner added a commit that referenced this issue Nov 17, 2023
heifner added a commit that referenced this issue Nov 17, 2023
@heifner heifner closed this as completed Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment