Skip to content

amino json regression for AccAddress type in 0.50 #25157

@mhofman

Description

@mhofman

We're trying to upgrade to 0.50 but hitting a regression in the amino json encoding, causing tx signatures to fail verification when using sign mode amino json.

Some of our messages are defined as follow:

message MsgSubmit {
  bytes submitter = 1
    [
      (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
    ];
}

The legacy amino json encoder would use json marshalling for the submitter address, resulting in a bech32 string.

The new amino encoder uses proto reflect, and ends up encoding the bytes of the address in base64.

We're looking at the new amino encoder options, either using an explicit field annotation, or possibly a type based encoder to override this behavior, but since this kind of message structure was historically suggested in some of the cosmos-sdk documentation, I consider this a breakage introduced by the new amino encoder in 0.50.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions