-
Notifications
You must be signed in to change notification settings - Fork 0
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
Standardise proposal creation process #1620
Standardise proposal creation process #1620
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much clearer, thank you :)
3fbacdd
to
f5becaf
Compare
… wait for timeout
@JamesHinshelwood Thanks. This is ready for review now. There is lots of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you :)
Cloning State
is generally okay, since the underlying DB is wrapped in an Arc
so really you're just cloning the few extra bits we store along side it - The one thing to be cautious of there is not to make a bunch of pending change to the state, without calculating the root_hash()
(thus keeping those changes in memory) and then cloning those. This is another reason I want to have:
- One struct for state which we store and clone around
- Another struct for the transient state on which we execute transactions and eventually get a root hash from
* feat: pass in qc and aggac to propose block if we have it * feat: separate fn for adding qc and agg to early_block * feat: pull out set timeout code into ready_for_block_proposal() * fix: overwrite early_proposal if view no longer matches * fix: consistency in function naming * fix: set qc at beginning of early_block assembly * fix: do not check votes for new view porposal * fix: always fetch view value from proposal * fix: do not attempt to create early proposal every time were ready to wait for timeout
Yes agreed that would be cleaner - its too easy to make an error with the current code, as i did for these changes. |
Have leaders use the same proposal creation process whether via
vote()
(proposer for direct-chain with QC) ornew_view()
(proposer after previous block missed with AggQC). This closes #1320.