Skip to content

Make Consensus Work - #47

Open
charles-e wants to merge 10 commits into
Fair-Exchange:masterfrom
charles-e:master
Open

Make Consensus Work#47
charles-e wants to merge 10 commits into
Fair-Exchange:masterfrom
charles-e:master

Conversation

@charles-e

Copy link
Copy Markdown

Problem

There two problems
First:
in bank.rs
self.epoch_authorized_voter(&voter)
was not working the way I thought it did. (you need to pass it a voter account - I was passing an authorized voter. As as result we fell back to rando voter all the time

Second:
In vote_group_gen,rs I was putting the wrong keys into the lookup table - so even if we had gotten past the first problem we would still not be able to vote - and we were lucky that we did not get here - because noone with stake would have been voting

Summary of Changes

Fixes #

1 vote_group_gen now has a method: can_group(pubkey) -> bool
This returns true if the pubkey is in the staked voter list used for building groups.

2 bank.rs now calls can_group(voter) instead of self.epoch_authorized_voter(&voter) to decide whether or not to use rando_voter.

3 in vote_group_gen.rs VoterGroupGenerator::new is modified to build the map for lookup to support can_group(). It also now puts the correct pubkeys into the array we use for building groups.

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.

1 participant