-
Notifications
You must be signed in to change notification settings - Fork 330
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
--output-document
isn't respected for tx multisign command
#2980
Labels
bug
Something isn't working
Comments
rootulp
added
bug
Something isn't working
investigation
item tracks efforts related to an investigation. does not always require a PR to close.
labels
Jan 4, 2024
Reproduced the error with this snippet: #!/bin/sh
# Stop script execution if an error is encountered
set -o errexit
# Stop script execution if an undefined variable is used
set -o nounset
# Prerequisite: prior to running this script, start a single node devnet with ./scripts/single-node.sh
CHAIN_ID="private"
KEY_NAME="validator"
KEYRING_BACKEND="test"
BROADCAST_MODE="block"
celestia-appd keys add test1
celestia-appd keys add test2
celestia-appd keys add test3
celestia-appd keys add multisig --multisig test1,test2,test3 --multisig-threshold 2
celestia-appd tx bank send $VALIDATOR $MULTISIG 100000utia --from $VALIDATOR --fees 1000utia --chain-id $CHAIN_ID --keyring-backend $KEYRING_BACKEND --broadcast-mode $BROADCAST_MODE --yes
# Uncomment the next line to verify that the multisig account received some funds
# celestia-appd query bank balances $MULTISIG
celestia-appd tx bank send $MULTISIG $VALIDATOR 1utia --from $MULTISIG --fees 1000utia --chain-id $CHAIN_ID --keyring-backend $KEYRING_BACKEND --generate-only > unsignedTx.json
celestia-appd tx sign unsignedTx.json --multisig $MULTISIG --from test1 --output-document test1sig.json --chain-id $CHAIN_ID
celestia-appd tx sign unsignedTx.json --multisig $MULTISIG --from test2 --output-document test2sig.json --chain-id $CHAIN_ID
# Uncomment the next lines to verify that the signatures were created
# cat test1sig.json | jq .
# cat test2sig.json | jq .
# BUG: this prints to stdout instead of writing to a file
celestia-appd tx multisign unsignedTx.json multisig test1sig.json test2sig.json --output-document=signedTx.json --chain-id $CHAIN_ID
celestia-appd tx multisign unsignedTx.json multisig test1sig.json test2sig.json --output-document=signedTx.json --chain-id $CHAIN_ID --generate-only
# Note: these may be helpful if you need to debug locally after running this script
# export VALIDATOR=$(celestia-appd keys show validator -a)
# export TEST1=$(celestia-appd keys show test1 -a)
# export TEST2=$(celestia-appd keys show test2 -a)
# export TEST3=$(celestia-appd keys show test3 -a)
# export MULTISIG=$(celestia-appd keys show multisig -a) |
This was referenced Jan 8, 2024
rootulp
removed
the
investigation
item tracks efforts related to an investigation. does not always require a PR to close.
label
Jan 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
@adlerjohn reported a bug on Slack
Problem
Proposal
The
--output-document
is supposed to redirect output to a file. If output still gets dumped to stdout, this indicates a bug. Note: this may involve fixing a bug in upstream cosmos-sdk or at least our fork until it gets upstreamed.--output-document
flag for multisign cosmos-sdk#363The text was updated successfully, but these errors were encountered: