Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
dasanchez opened this issue Apr 4, 2024 · 4 comments · Fixed by #20027
Closed
1 task done

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

dasanchez opened this issue Apr 4, 2024 · 4 comments · Fixed by #20027
Labels

Comments

@dasanchez
Copy link

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
@dasanchez dasanchez added the T:Bug label Apr 4, 2024
@tac0turtle
Copy link
Member

is someone using r1 on testnet? seems like there is some misconfiguration in the testnet. Users are running and exporting with 0.47.10 with no issues.

@MSalopek
Copy link
Contributor

MSalopek commented Apr 5, 2024

You could also use r1 on mainnet, right?

@dasanchez
Copy link
Author

@tac0turtle based on the error it looks like someone is indeed trying to use r1, do you know what could be misconfigured in the testnet?

@BOSEES
Copy link

BOSEES commented Apr 8, 2024

The TX that is causing that error actually exists.

  • DEA1F7244D5B978F2C61B77E6429B04742D8D65C7558ED91D3ADF9EC414471E7
  • 48E9097624923066381736A0739FDD7E95F63C5B09BFFDFF2CB2289DD0DC9CB5

Looking at the context, it seems that the SDK codec is not able to interpret the secp256r1 signed TX defined as Any TYPE when trying to decode the TX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants