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

Add new leaf type #3761

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Add new leaf type #3761

wants to merge 24 commits into from

Conversation

ss-es
Copy link
Contributor

@ss-es ss-es commented Oct 15, 2024

This PR:

  • Adds new Leaf2, QuorumProposal2, QuorumVote2, QuorumCertificate2 and QuorumData2 types. Note: these types are purely internal at this time.
  • Adds helpers functions to convert between the older (i.e. Leaf, QuorumProposal etc) types and the newly added types
  • Adds a migrate_consensus function that is invoked on SystemContext::init, which converts from Leaf to Leaf2 in storage.
  • Updates internal hotshot events and logic to use the new types exclusively. All incoming and outgoing messages are converted in the network task.

This PR does not:

  • There should be no difference in the logic with this PR, and all commitment calculations should remain the same.
  • The actual external message switch (i.e. actually sending QuorumProposal2 out, instead of downgrading to QuorumProposal in the network task) on a version upgrade has not yet been implemented -- this will be done once all types are finalized.
  • I have not added epoch numbers to the vote data structs; that will be done in a future PR.
  • At this time, the Leaf2 and QuorumProposal2 structs are not final and should not be deployed.

Key places to review:

The types/** crate is the source of the changes and should be reviewed most closely.

@ss-es ss-es added this to the PoS - Upgrade milestone Oct 21, 2024
@ss-es ss-es self-assigned this Oct 23, 2024
@ss-es ss-es removed this from the Upgrade (PoS) milestone Oct 29, 2024
@ss-es ss-es marked this pull request as ready for review November 15, 2024 07:42
@ss-es ss-es requested a review from bfish713 as a code owner November 15, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant