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

(Feature) new ballot type: add 3 keys #92

Closed
vbaranov opened this issue May 18, 2018 · 1 comment
Closed

(Feature) new ballot type: add 3 keys #92

vbaranov opened this issue May 18, 2018 · 1 comment
Assignees
Milestone

Comments

@vbaranov
Copy link
Collaborator

Problem: The current validators should create 3 ballots to add a completely new validator to consensus: 1 ballot for each key. Validators should make 3 times more actions to create, vote and finalize it instead of doing this stuff in frames of one ballot.

Solution: Create new ballot type to add 3 keys in /VotingToChangeKeys.sol

@varasev
Copy link
Contributor

varasev commented Jun 1, 2018

VotingToChangeKeys contract has been supplemented by new createBallotToAddNewValidator method that creates a ballot to add three keys (mining/voting/payout) at once:
https://github.com/varasev/poa-network-consensus-contracts/blob/57fd4105075c2fb87633c73e75a3baacb7613555/contracts/VotingToChangeKeys.sol#L140-L163

In this case, finalization occurs inside _finalizeAdding method:
https://github.com/varasev/poa-network-consensus-contracts/blob/57fd4105075c2fb87633c73e75a3baacb7613555/contracts/VotingToChangeKeys.sol#L234-L244

I assume that a new validator can also be added by createBallot method to support the current principle of separate keys adding: https://github.com/varasev/poa-network-consensus-contracts/blob/57fd4105075c2fb87633c73e75a3baacb7613555/contracts/VotingToChangeKeys.sol#L117-L138

createBallotToAddNewValidator method has also been covered by tests:
https://github.com/varasev/poa-network-consensus-contracts/blob/57fd4105075c2fb87633c73e75a3baacb7613555/test/voting_to_change_keys_test.js#L143

I will create a related issue for Governance DApp to change its web interface accordingly.

These changes cover poanetwork/poa-dapps-voting#83.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants