-
Notifications
You must be signed in to change notification settings - Fork 672
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
Feat: Enable multiple validators and valset update #918
Comments
Thanks for opening this issue, @sainoe. Since you have a WiP solution to fix these problems, will you open a PR once it is ready to review or do you need any help from us in the meantime? |
A PR is on the way @crodriguezvega, thanks for asking! In the meantime, an easy fix is available here. |
* Patch cosmos#918: - [x] Run a TestChain with more than one genesis accounts - [x] Run a TestChain with more than one validators - [x] Run multiple validators with same voting power - [ ] Update validator set of TestChains (elegant solution is still WIP) * Easy fix for the valset update is available in the issue
* Patch cosmos#918: - [x] Run a TestChain with more than one genesis accounts - [x] Run a TestChain with more than one validators - [x] Run multiple validators with same voting power - [ ] Update validator set of TestChains (elegant solution is still WIP) * Easy fix for the valset update is available in the issue
- Use reverse iterator to get last VSCId: [comment-ref](https://github.com) - Implement Producer chain slashing packet acknowledgement: [comment-ref](cosmos#28 (comment)) - Make unit-tests pass using custom [IBC-GO branch](https://github.com/sainoe/ibc-go/tree/sainoe/valset-update-fixes) with [cosmos#28](cosmos/ibc-go#918 (comment)) fixes
@sainoe Considering @colin-axner's comment above, do you think this issue is solved now and can be closed? |
@crodriguezvega Yes I do. Thanks for asking! |
Feat: Enable multiple validators and valset update
In the context of testing validators slashing between connected chains, it may be required
to have more than one validator running per chain. This issue describes the problems faced by
trying to change the TestChain setup accordingly and by executing operations changing validators voting power
against a chain.
A WIP solution is available in this branch. This list shows what has been developed so far:
Bonded pool balance and genesis supply
SetupWithGenesisValSet creates validators balances using the validator set and genesis accounts.
The validators are bonded with a delegation of 10^6 default token of the first genesis account.
Passing either more than on validators or genesis accounts panics with the following error mmessages:
Validators with equal voting power
By setting two validators with equal voting power we get the following error:
The error message indicates that the validator addresses and their respective signing key get mixed up. This side effect comes from the validator sets constructor operations. CompareProposerPriority method returns validators ordered by voting powers or and by address lexical order when equal.
Validator set update
After testing slashing or delegation against a TestChain, we can observe that its validator set values remain unchanged. This discrepancy with the validator states in the staking module makes IBC panics. In
checkTrustedHeader
The headervalidator hash
field and thetrusted validators
hash differs and throws the following error.This gist is available to reproduce most of the errors.
The text was updated successfully, but these errors were encountered: