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

[DRB] - Update the computation map #3933

Closed
shenkeyao opened this issue Dec 2, 2024 · 0 comments · Fixed by #3941
Closed

[DRB] - Update the computation map #3933

shenkeyao opened this issue Dec 2, 2024 · 0 comments · Fixed by #3941
Assignees

Comments

@shenkeyao
Copy link
Member

shenkeyao commented Dec 2, 2024

Refactor drb_computations from a single BTreeMap to contain:

  • results: BTreeMap<epoch, Result> for the current epoch e, and for e + 1 if the computation is done, with garbage collection.
  • task: Option<(epoch, computation_task)> for the next epoch e + 1 before the computation is done, using the seed stored from the previous epoch.
  • seeds: BTreeMap<epoch, seed> for e + 2 and/or e +1 depending on the block number, with garbage collection.

Zulip discussion: https://espresso.zulipchat.com/#narrow/channel/462904-eng-proof-of-stake/topic/DRB.20integration/near/485669746.

@shenkeyao shenkeyao self-assigned this Dec 2, 2024
@pls148 pls148 self-assigned this Dec 2, 2024
pls148 added a commit that referenced this issue Dec 4, 2024
* 3933 DrbComputations helper for quorum_vote

* 3933 modify logic of drb computation to start at epoch transition

* 3933 check for if we should store the seed based on when we're expecting to be in the committee

* 3933 always start the task for drb

* 3933 fix clippy lints

* 3933 avoid unwrapping leaf_views.last()

* 3933 additional fixes

* 3933 correct nits, use proposal block number to calculate epoch number

* 3933 break drb_calculation_start and drb_calculation_seed into separate functions

* 3933 fix comment
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 a pull request may close this issue.

2 participants