Skip to content

LegacyAminoPubKey loses keys on unmarshalling #10042

@haasted

Description

Summary of Bug

LegacyAminoPubKey fails to correctly unmarshal from JSON.

Version

v0.42.9

Steps to Reproduce

The test TestAminoUnmarshalJSON in https://github.com/cosmos/cosmos-sdk/blob/v0.42.9/crypto/keys/multisig/multisig_test.go should be amended with the following line:

require.Equal(t, 5, len(pk.(*kmultisig.LegacyAminoPubKey).PubKeys))

This adds a condition that the public keys have been deserialized correctly and will demonstrate the issue.

Potential fix

To solve the issue for ourselves, I have made a temporary fork of the SDK. A potential fix can be found in this commit: e-money@a3c8dea


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions