cosmos/relayer

'keys list' command has an error "UnmarshalBinaryLengthPrefixed".

sdjeong-zenaad opened this issue · 1 comments

rly v2.4.2

$ rly version
version: 2.4.2
commit: 259b1278264180a2aefc2085f1b55753849c4815
cosmos-sdk: v0.47.5
go: go1.21.4 linux/amd64

'keys add' or 'keys restore' works fine.

$ rly keys add xpla keytest
{"mnemonic":"...","address":"xpla1...s"}
$ rly keys restore xpla keyxpla "...mnemonic..." --coin-type 60 --signing-algorithm ethsecp256k1
xpla1...4

but 'keys list' and 'keys use' have errors.

$ rly keys list xpla
migrate err for key keytest.info: "unable to unmarshal item.Data, err: Bytes left over in UnmarshalBinaryLengthPrefixed, should read 10 more bytes but have 172"
migrate err for key keyxpla.info: "unable to unmarshal item.Data, err: Bytes left over in UnmarshalBinaryLengthPrefixed, should read 10 more bytes but have 172"
warning: no keys found for chain xpla (do you need to run 'rly keys add xpla'?)
$ rly keys use xpla keytest
migrate err for key keytest.info: "unable to unmarshal item.Data, err: Bytes left over in UnmarshalBinaryLengthPrefixed, should read 10 more bytes but have 172"
migrate err for key keyxpla.info: "unable to unmarshal item.Data, err: Bytes left over in UnmarshalBinaryLengthPrefixed, should read 10 more bytes but have 172"
Error: key keytest does not exist for chain xpla

how to fix it?

I fixed it.
add "ethermint" to "extra-codecs"

            output-format: json                                                                                                                                                    
            sign-mode: direct                                                                                                                                                      
            extra-codecs:                                                                                                                                                          
                - ethermint                                                                                                                                                        
            coin-type: 60                                                                                                                                                          
            signing-algorithm: ""