You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
likhita-809
changed the title
ValidatorUpdates is not compliant with SDK's ProtoMessage
abci's ValidatorUpdates is not compliant with SDK's ProtoMessage
Jul 18, 2023
hmm could you point me to the code where this is the case
Here: https://github.com/cosmos/cosmos-sdk/blob/main/x/staking/keeper/keeper.go#L132
while migrating ValidatorUpdates to collections, the initial idea is to use collections.Item[abci.ValidatorUpdates] for defining ValidatorUpdates field in keeper struct. In this case, those protov2 API's are not compatible to encode using collections value codec.
But we can also use staking types's ValidatorUpdates for it which @testinginprod pointed out. He also made a PR to support protov2 APIs encoding for future use cases
Summary
Problem Definition
With current abci type's
ValidatorUpdates
, its not possible to migrate it to collections. We'll need a custom codec for it.Proposal
Create a custom value codec for abci types
ValidatorUpdates
which is compliant with cosmos sdk's ProtoMessage.The text was updated successfully, but these errors were encountered: