-
Notifications
You must be signed in to change notification settings - Fork 51
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
Implement Randomized leader election based on the VRF #1841
Conversation
f016c4b
to
bffb073
Compare
c3eac7f
to
c85cdf9
Compare
baac827
to
a310782
Compare
PriorityMessage part and Account provider part look good to me. |
cf7dfef
to
b9d3b52
Compare
afc3964
to
c23cfa3
Compare
7add5db
to
8767752
Compare
82f315a
to
09cf2ff
Compare
Please fix this commit message.
TO -> To, wait -> wait for Also, what do you mean by the term "product type"? |
@@ -708,7 +703,7 @@ impl Worker { | |||
// need to reset vote | |||
self.broadcast_state( | |||
vote_step, | |||
self.proposal.block_hash(), | |||
self.votes.get_highest_proposal_summary(self.current_sortition_round()), |
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.
I had a concern about this line. The concern is how to handle the highest proposal block if the block was invalid. There are many strategies to make a better situation.
However, we can think of a situation like this. A proposer is elected by the VRF. The proposer chooses not to create a block.
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.
If validators are elected as eligible proposers but they send invalid proposal block then all validators may agree on Nil
. I think this is natural behavior.
vrf_seed_info: Box::new(current_seed), | ||
} | ||
} else { | ||
cwarn!(ENGINE, "Seal request for an old view"); |
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.
Let's use cdebug!
here. Also, let's change the log message.
This else case is executed when there is a proposal that has a higher score.
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.
Modified the message
finalized_view_of_current_block: Option<View>, | ||
} | ||
|
||
fn load_with_version<T: Decodable>(db: &dyn KeyValueDB) -> Option<T> { |
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.
Wow, it is a fantastic way to load data.
7ecb713
to
c644eab
Compare
I changed the commit message on the commit |
To accept multiple proposals and wait for their imports, I introduced a new type for TendermintState::Propose.
In randomized leader election environment, CodeChain doesn't need to manage weight values. Previously, it is utilized to guarantee stake-proportional leader election but now the property comes from the nature of the probability model.
It resolves #1897