Skip to content

[Bug]: export command fails due to secp256r1.ecdsaPK type #19956

@dasanchez

Description

@dasanchez

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

I tried exporting a genesis file from the Cosmos Hub Public Testnet (theta-testnet-001) and it resulted in a panic:

gaiad export --output-document theta-export.json
panic: secp256r1.ecdsaPK declared custom type ecdsaPK but it is not convertible to <nil>

goroutine 36 [running]:
github.com/cosmos/cosmos-sdk/codec.(*ProtoCodec).MustMarshalJSON(0x354d8f0?, {0x3552320?, 0xc019856000?})
	github.com/cosmos/cosmos-sdk@v0.47.10/codec/proto_codec.go:156 +0x3c
github.com/cosmos/cosmos-sdk/x/auth.AppModule.ExportGenesis({{}, {{0x354d8f0, 0xc000afd8e0}, {0x3583610, 0xc000f7bee0}, 0xc000f6fcb0, 0x30312e8, {0x3550128, 0xc000afdd60}, {0xc000d624b0, ...}}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.47.10/x/auth/module.go:163 +0x9e
github.com/cosmos/cosmos-sdk/types/module.(*Manager).ExportGenesisForModules.func1({0x7f2e73bb54b0, 0xc00130a700}, 0xc0024568a0?)
	github.com/cosmos/cosmos-sdk@v0.47.10/types/module/module.go:402 +0xf1
created by github.com/cosmos/cosmos-sdk/types/module.(*Manager).ExportGenesisForModules in goroutine 1
	github.com/cosmos/cosmos-sdk@v0.47.10/types/module/module.go:400 +0x392

Cosmos SDK Version

0.47.10

How to reproduce?

  • Sync a node on the theta-testnet-001 network (details here).
  • Stop the service.
  • Run gaiad export --output-document export.json

Metadata

Metadata

Assignees

No one assigned

    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