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
HybridCodec provides hybrid protobuf binary marshaling and amino JSON marshaling in a single type. It seemed like a good idea to me when we first did the state migration because it allows queriers to still use amino JSON. But it's just messy in other ways because the CLI and genesis should use the same encoding as everything else (either proto or amino). And it just feels wrong.
So I propose we remove HybridCodec and just always pass an amino JSON marshaler into the legacy querier and REST endpoints and let everything else that is non-legacy (genesis and CLI) just use either ProtoCodec or AminoCodec.
Motivation
HybridCodec
provides hybrid protobuf binary marshaling and amino JSON marshaling in a single type. It seemed like a good idea to me when we first did the state migration because it allows queriers to still use amino JSON. But it's just messy in other ways because the CLI and genesis should use the same encoding as everything else (either proto or amino). And it just feels wrong.So I propose we remove
HybridCodec
and just always pass an amino JSON marshaler into the legacy querier and REST endpoints and let everything else that is non-legacy (genesis and CLI) just use eitherProtoCodec
orAminoCodec
.Needed for #5917.
Details
AppModule
NewQuerierHandler() sdk.Querier
->LegacyQuerierHandler(JSONMarshaler) sdk.Querier
Start removing HybridCodec (init + auth, bank, distribution) #6838BinaryMarshaler
interface with just theMarshalBinary***
methods to be used in keepers so that legacy queriers don't accidentally try to use the keeper's codec Start removing HybridCodec (init + auth, bank, distribution) #6838JSONMarshaler
fromLegacyQuerierHandler
in all queriers instead of theMarshaler
on the keeperHybridCodec
The text was updated successfully, but these errors were encountered: