Gaiad gentx command incorrect for offline/multisig keys #3730
Closed
Description
opened on Feb 25, 2019
If you use the gaiad gentx
command with an offline key or multisig as the operator, it gives you bytes to sign.
$ gaiad gentx --name=multitest --amount=1stake
Bytes to sign:
{"account_number":"0","chain_id":"testing","fee":{"amount":[],"gas":"200000"},"memo":"56e39eda5725bac3646da34d2b3125bb41859d0a@10.0.1.35:26656","msgs":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"commission":{"max_change_rate":"0.010000000000000000","max_rate":"0.200000000000000000","rate":"0.100000000000000000"},"delegator_address":"cosmos1gnu4d9xg0a8rrxdns3zw75vxh9txngslc2zw9m","description":{"details":"","identity":"","moniker":"testing","website":""},"min_self_delegation":"1","pubkey":"cosmosvalconspub1zcjduepqm0p2hyfm6wg8rtc26ps9d9704kendjwt2zsuh8d872nds7lv75as2judmq","validator_address":"cosmosvaloper1gnu4d9xg0a8rrxdns3zw75vxh9txngsla7kmfg","value":{"amount":"1","denom":"stake"}}}],"sequence":"0"}
Enter Amino-encoded signature:
Two issues here.
- It is missing the type information of StdTx. The entire above output needs to wrapped in:
{"type":"auth/StdTx","value":[output]}
- The key for the msgs in the tx json above is
msgs
but it should bemsg
.
The final proper output of this should have looked like this:
{"type":"auth/StdTx","value":{"account_number":"0","chain_id":"testing","fee":{"amount":[],"gas":"200000"},"memo":"7b3f8010567055f58038148bd66e091a4c0bf59e@192.168.86.156:26656","msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"commission":{"max_change_rate":"0.010000000000000000","max_rate":"0.200000000000000000","rate":"0.100000000000000000"},"delegator_address":"cosmos1gnu4d9xg0a8rrxdns3zw75vxh9txngslc2zw9m","description":{"details":"","identity":"","moniker":"testing","website":""},"min_self_delegation":"1","pubkey":"cosmosvalconspub1zcjduepqt7gyfy0luwzjsdjev20z9shy54vl4rx2tejp8f5zaxrh3zgu3yrqdd6t9q","validator_address":"cosmosvaloper1gnu4d9xg0a8rrxdns3zw75vxh9txngsla7kmfg","value":{"amount":"100000000","denom":"stake"}}}],"sequence":"0"}}
Metadata
Assignees
Labels
No labels
Activity