Cosmos-sdk: simd: init fails

Created on 12 Aug 2020  路  11Comments  路  Source: cosmos/cosmos-sdk

Summary of Bug

Running make build-simd && ./build/simd init test --chain-id tts I get error:

Error: open config/node_key.json: no such file or directory

Version

Master

Steps to Reproduce

make build-simd && ./build/simd init test --chain-id tts


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
CLI bug client-ux

Most helpful comment

Looks like there's a missing integration test. That's a simple fix. We've been switching those cases to use encoding/json instead of proto json

All 11 comments

@jgimeno this recently worked. Could you take a look at this when you have a chance please?

Absolutely! Looking at it right now.

The problem is this change:

https://github.com/cosmos/cosmos-sdk/blob/20c5ee3624cbf8b1730ea114bf5d5a65f88bcff8/simapp/simd/cmd/root.go#L82

That function bypasses the rootCmd PersistentPreRun, checking how to make it work as expected.

I think that PersistenPreRun is set inside of rootCmd.AddCommand and because it detects it has another one set it just not receive it.

Maybe we don't need to wrap it with withProtoJSON? Thoughts @aaronc? When can we remove withProtoJSON?

It's removed in #6859. It's almost ready

Shall we just wait for #6859?

I'm hoping to get that merged this morning. @sahith-narahari is reviewing now

new error since #6859 merge:

Error: Failed to marshall default genesis state: cannot protobuf JSON encode unsupported type: map[string]json.RawMessage

should something be setup in ci to avoid this?

Looks like there's a missing integration test. That's a simple fix. We've been switching those cases to use encoding/json instead of proto json

I have a draft PR here: https://github.com/cosmos/cosmos-sdk/pull/7037. Will try to figure out an integration test too for it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rigelrozanski picture rigelrozanski  路  3Comments

jackzampolin picture jackzampolin  路  3Comments

rigelrozanski picture rigelrozanski  路  3Comments

johnmcdowall picture johnmcdowall  路  3Comments

mossid picture mossid  路  3Comments