cosmos-sdk: error while using map in txs
Summary of Bug
I am trying to use map in a transaction message. And the txn fails with code 2 and error message does not implement proto.Message.
Version
main
Steps to Reproduce
I have added a unit test to reproduce this error. Clone https://github.com/0xmuralik/cosmos-sdk Switch to branch murali/map-in-tx-msg And run the test.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
We are using maps to reference an IPLD CID. Each field will have only one element in the map. Hence, this will not lead to non-determinisim. Example here.
still lost on the error, id like to dive into it later this week or next and make sure we have documentation around such things. Ill keep the issue open and assign myself
@alexanderbez to your comment, we are trying to match standards used elsewhere in IPLD https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-json.md#format
In any case, this issue falls well outside the concerns/responsibilities of the SDK. We can make work arounds on our end. Thanks! @0xmuralik @alexanderbez @tac0turtle we can close this.
Hmm maps are inherently non deterministic but if the app dev handles this it should be safe as we do store package.
Unless we block maps in protos ourself this doesn’t amswer the question the user had. We should look into this.
You cannot use maps, which are non-deterministic, in any state machine proto type.