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

The schedule 0, 1, get_coin(), ... #76

Merged
merged 2 commits into from
Jun 25, 2018
Merged

The schedule 0, 1, get_coin(), ... #76

merged 2 commits into from
Jun 25, 2018

Conversation

vkomenda
Copy link
Contributor

Close #69

This branch depends on PR #68.

@@ -201,6 +211,7 @@ impl<NodeUid: Clone + Debug + Ord> Agreement<NodeUid> {
netinfo,
Nonce::new(invocation_id.as_ref(), session_id, proposer_i, 0),
),
coin_schedule: CoinSchedule::False,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there was an argument for starting with True: In the best case scenario, where everyone gets their proposals delivered in time, everyone would vote true in every instance, and it would be nice to terminate in the first round then.

Also, it is probably generally preferred to err on the true side and include more elements in the common subset, and therefore more transactions in the epoch.

fn coin_schedule(&self) -> CoinSchedule {
match self.epoch % 3 {
0 => CoinSchedule::False,
1 => CoinSchedule::True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

As above, I'd swap True and False here.

self.common_coin = CommonCoin::new(self.netinfo.clone(), nonce);
self.coin_schedule = self.coin_schedule();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need the coin schedule as a member variable at all? Isn't it easier to just call self.coin_schedule() where it's needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't want to make a call on every Aux message.

@afck afck merged commit 7b3ff71 into master Jun 25, 2018
@afck afck deleted the vk-coin-schedule branch June 26, 2018 13:10
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.

3 participants