-
Notifications
You must be signed in to change notification settings - Fork 129
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
Ensure unbonding ops cannot complete during initialization #27
Labels
type: bug
Issues that need priority attention -- something isn't working
Comments
mpoke
changed the title
Ensure unbonding ops cannot complete during initialisation
Ensure unbonding ops cannot complete during initialization
Dec 24, 2021
mpoke
added
type: bug
Issues that need priority attention -- something isn't working
type: feature-request
New feature or request improvement
labels
Feb 7, 2022
1 task
A fix for this issue is specified in cosmos/ibc#646 |
Closed
mpoke
added
mvcc
and removed
type: feature-request
New feature or request improvement
labels
Jun 8, 2022
Nice work. I have a one thought
Could we just send multiple packets instead? EDIT: I see in the code it is done with multiple packets 👍 |
Repository owner
moved this from Waiting for review
to Done
in Replicated Security
Jun 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
During the initialization period, the consumer chain has the same initial validator set
V1
. To keep the security model of Tendermint, none of the validators inV1
should be able to unbond any amount of their stake during this period. In other words, no unbonding delegation would complete during the CCV initialization protocol.This feature would enable CCV to guarantee the following invariant that would preserve the security model of Tendermint on the consumer chains:
t
be an instance of time andpower(T)
be the function that calculates the voting power granted to some validators given an amountT
of tokens bonded by these validators on the provider chain. Then, the voting power granted to validators on any consumer chain at timet
MUST NOT exceedpower(T_t)
, whereT_t
is the amount of tokens bonded by these validators on the provider chain at timet
.This feature can be easily added to the current implementation.
UnbondingDelegationEntryCreated
we need to iterate over all consumer chains, not just the ones with established channels, i.e.,interchain-security/x/ccv/parent/keeper/keeper.go
Line 409 in ddc91d3
V1
. In the meantime, the provider chain may have gone through multiple updates, e.g.,V1
→V2
→ ... →V10
. Thus, the first packet sent to the consumer chain should contain all the validator set changes e.g., fromV1
toV10
. As in the previous step, we need to iterate over all consumer chains, i.e.,interchain-security/x/ccv/parent/module.go
Line 158 in ddc91d3
ValidatorSetChange
packet with all accumulated validator updates.Note that this step needs to be done regardless of the completion of unbonding operations.
ValidatorSetUpdateId
s , i.e.,interchain-security/x/ccv/parent/keeper/keeper.go
Line 414 in ddc91d3
ValidatorSetUpdateId
is incremented and it's added to the packet. When receiving a packet ACK, the associatedValidatorSetUpdateId
is used to get the associated UBDEs that have matured, i.e.,interchain-security/x/ccv/parent/keeper/relay.go
Line 73 in ddc91d3
ValidatorSetUpdateId
s, i.e., a packet will be associated with multipleValidatorSetUpdateId
s.The text was updated successfully, but these errors were encountered: