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

fix: --output-document flag for multisign #363

Merged

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jan 8, 2024

Cherry pick the fix from cosmos@0b5e7ed

Resolves celestiaorg/celestia-app#2980

Testing

Before

The output gets dumped to the terminal

$ celestia-appd tx multisign unsignedTx.json multisig test1sig.json test2sig.json --output-document signedTx.json --chain-id $CHAIN_ID
{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"celestia17rehcgutjfra8zhjl8675t8hhw8wsavzzutv06","to_address":"celestia1m50mjfm6uktkxysc6tpqhq6u56smc0jcvln72p","amount":[{"denom":"utia","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":2,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AxMTEFDH8oyBPIH+d2MKfCIY1yAsEd0HVekoPaAOiu9c"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ax0ANkTPWcCDWy9O2TcUXw90Z0DxnX2zqPvhi4VJPUl5"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AlUwWCGLzhclCMEKc2YLEap9H8JT5tWq1kB8BagU1TVH"}]},"mode_info":{"multi":{"bitarray":{"extra_bits_stored":3,"elems":"YA=="},"mode_infos":[{"single":{"mode":"SIGN_MODE_LEGACY_AMINO_JSON"}},{"single":{"mode":"SIGN_MODE_LEGACY_AMINO_JSON"}}]}},"sequence":"0"}],"fee":{"amount":[{"denom":"utia","amount":"1000"}],"gas_limit":"210000","payer":"","granter":""},"tip":null},"signatures":["CkBX8yw0SnvYD3Is60cXErxdwRhcXL864parxmgw9f77ER3hAwMUFr7H1rgY2GcZ37zFwRpvJL3jESGjYsImemu/CkAcQwYaVho6JgmcF1JjOcmmfA4TyVlGBySx2FSQHDb58Ta/5M5rTzgy2/gpBbcEjFzk7K4GSXkFIY8pmJdWB6jR"]}%

After

The output goes to the file

$ ./build/celestia-appd tx multisign unsignedTx.json multisig test1sig.json test2sig.json --output-document signedTx.json --chain-id $CHAIN_ID
$ cat signedTx.json
{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"celestia17rehcgutjfra8zhjl8675t8hhw8wsavzzutv06","to_address":"celestia1m50mjfm6uktkxysc6tpqhq6u56smc0jcvln72p","amount":[{"denom":"utia","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":2,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AxMTEFDH8oyBPIH+d2MKfCIY1yAsEd0HVekoPaAOiu9c"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ax0ANkTPWcCDWy9O2TcUXw90Z0DxnX2zqPvhi4VJPUl5"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AlUwWCGLzhclCMEKc2YLEap9H8JT5tWq1kB8BagU1TVH"}]},"mode_info":{"multi":{"bitarray":{"extra_bits_stored":3,"elems":"YA=="},"mode_infos":[{"single":{"mode":"SIGN_MODE_LEGACY_AMINO_JSON"}},{"single":{"mode":"SIGN_MODE_LEGACY_AMINO_JSON"}}]}},"sequence":"0"}],"fee":{"amount":[{"denom":"utia","amount":"1000"}],"gas_limit":"210000","payer":"","granter":""},"tip":null},"signatures":["CkBX8yw0SnvYD3Is60cXErxdwRhcXL864parxmgw9f77ER3hAwMUFr7H1rgY2GcZ37zFwRpvJL3jESGjYsImemu/CkAcQwYaVho6JgmcF1JjOcmmfA4TyVlGBySx2FSQHDb58Ta/5M5rTzgy2/gpBbcEjFzk7K4GSXkFIY8pmJdWB6jR"]}

@rootulp rootulp self-assigned this Jan 8, 2024
@rootulp
Copy link
Collaborator Author

rootulp commented Jan 11, 2024

We only need one approval to merge PRs in this repo 🤔

@rootulp rootulp merged commit 590938d into celestiaorg:release/v0.46.x-celestia Jan 11, 2024
34 checks passed
@rootulp rootulp deleted the rp/fix-output-document branch January 11, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--output-document isn't respected for tx multisign command
2 participants