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

Setup basics of vetomint #44

Merged
merged 2 commits into from
Aug 19, 2022
Merged

Setup basics of vetomint #44

merged 2 commits into from
Aug 19, 2022

Conversation

junha1
Copy link
Member

@junha1 junha1 commented Aug 16, 2022

  1. It involves some interface changes.
  2. The reason that the state machine keeps the event queue is for
    handling asynchronous getValue().
  3. Still many logics are unimplemented

byeongjee
byeongjee previously approved these changes Aug 18, 2022
} = event
{
if state.round != round {
return None;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it returns None?
if we got BlockProposalCreated event with wrong round,
it represents a) we got wrong proposal, or b) we were in wrong round.
in case of a), None would suit for it, but I wonder case b).
is b) solved by other mod?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the node is in a wrong round, the only way of getting out of it is just providing valid prevotes and precommits for the missing rounds. There is nothing to do in this case, anyway.

} => {
let total_voting_power = height_info.validators.iter().sum::<VotingPower>();
if round != state.round {
return None;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto!

yeomjh00
yeomjh00 previously approved these changes Aug 19, 2022
Copy link
Contributor

@yeomjh00 yeomjh00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@byeongjee byeongjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise

prevotes_total: VotingPower,
prevotes_favor: BTreeMap<BlockIdentifier, VotingPower>,
/// If on-5f-prevotes has ever been triggered?
triggered_5f_prevote: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?
if 5f prevote is triggered, the consensus step is changed to Precommit, so it will not be retriggered.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why do we have for the first time in the pseudo code? It is conditioned by while step = prevote anyway.

1. It involves some interface changes.
2. The reason that the state machine keeps the event queue is for
handling asynchronous `getValue()`.
3. Still many logics are unimplemented
@junha1 junha1 merged commit f39e355 into postech-dao:main Aug 19, 2022
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.

None yet

3 participants