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

build command doesn't balance tx output when key deposit is returned #942

Closed
mkoura opened this issue Oct 17, 2024 · 1 comment
Closed

Comments

@mkoura
Copy link
Contributor

mkoura commented Oct 17, 2024

Description

With cardano-cli 10.0.0.0, I used transaction build command to deregister stake address. However the tx output amount didn't account for the key deposit, and submit failed with

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraConway (ApplyTxError (ConwayUtxowFailure (UtxoFailure (ValueNotConservedUTxO (MaryValue (Coin 999819319) (MultiAsset (fromList []))) (MaryValue (Coin 999419319) (MultiAsset (fromList []))))) :| []))

The difference is 400000, the key deposit amount.

Steps to Reproduce

  1. Register stake address
  2. Deregister stake address

cardano-cli conway stake-address deregistration-certificate --key-reg-deposit-amt 400000 --stake-verification-key-file "stake.vkey" --out-file "stake_dereg.cert"

cardano-cli conway transaction build --tx-in "c2d5d1e9c130644a44658a5eea843a10dbc2ca6a2c6241aeea99b01e85eeaceb#0" --certificate-file "stake_dereg.cert" --change-address addr_test1qrc9dzle0e824jkuccz9209nnp5vjypyhq5r9nvtd7rsvsws3czfenm29chw8elmkr0xh6vhk7ma3sl7e0ry5k7qn2ds20h0fl --witness-override 2 --out-file "dereg_tx.body" --testnet-magic 42

cardano-cli conway transaction sign --tx-body-file "dereg_tx.body" --testnet-magic 42 --signing-key-file test_delegation_pool_user_ci0_addr0.skey --signing-key-file "stake.skey" --out-file "dereg_tx.signed"

cardano-cli conway transaction submit --testnet-magic 42 --tx-file "dereg_tx.signed"

Files used for building the tx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants