PSS: Error when opting in with your already-assigned key #1731
Labels
source: devnet
To indicate an issue surfaced in a devnet.
type: bug
Issues that need priority attention -- something isn't working
Problem
Thanks to @dasanchez for surfacing!
If validator V first assigns a consumer key for a chain C (but is not opted in),
and then V opts into C, there are two natural ways:
Right now, 2) works, but 1) throws an error:
I think 1) should not throw an error, and just behave like 2).
Closing criteria
We either take care to document that 1) is not intended, or we make 1) behave like 2).
Problem details
The problem is here:
Optin in assigns a consumer key
interchain-security/x/ccv/provider/keeper/partial_set_security.go
Line 34 in 8ed60ee
Assignment checks whether the consumer key is in use by any validator:
interchain-security/x/ccv/provider/keeper/key_assignment.go
Lines 374 to 380 in 8ed60ee
My preferred solution would be to adjust
interchain-security/x/ccv/provider/keeper/key_assignment.go
Lines 374 to 380 in 8ed60ee
to only throw an error if the validator that has already assigned the consumer key is not the same as the one now trying to assign the key, and have it act as a noop otherwise. I think it is slightly weird to have the pure key assignment tx sometimes be a noop without failing, but I think it shouldn't be an issue with gas or anything
The text was updated successfully, but these errors were encountered: