Running cardano-node 1.29 binary distribution on Linux.
Following Coin Cashew instructions up to “11. Register your stake address”
Payment address is funded.
I get to the point where it’s time to submit the transaction to register stake address…
./cardano-cli transaction submit --tx-file ./tx.signed --mainnet
Then I get the following error.
Does anyone have an idea what this error is saying?
How do I determine the root cause of this error?
The obvious message is that the attempted transaction failed some sort of validation/security check. I followed the configuration instructions.
What could I have done wrong?
Or are the instructions wrong?
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 509000000 (fromList )) (Value 511364090 (fromList )))))])
I guess my main issue is that I don’t feel I fully understand what this error is trying to say. Maybe you folks can help me understand it?
That error means that the
tx-in does not equal
tx-out + fee… Basically everything that is part of tx-in must be spent as tx-out and fee. (miscalcuation 509000000 vs 511364090)
Are you saying that there isn’t enough funds in the payment address account to pay for the registration fee? lol
He’s saying you entered the numbers incorrectly.
resulting_change = <total amount in account that you're using to pay as an input to the transaction> - <stake address deposit fee> - <transaction fee>
--tx-out <your payment address>+resulting_change
It’s like you’re saying
I have $10 in my account. I’d like to spend $3 on registering this address and I’d like my $2 back. $3+$2 != $10
Not saying that.
Maybe you can post the tx-in, tx-out, and fee so we can check.
But it boils down to the following:
All coins contained in
tx-in must be spent as part of
fee, and it seems that this is the part where you have a calculation error.
tx-in 123456#1 // contains 100ADA
tx-out addr112345+99800000 // sending 99.8ADA
fee 200000 // fee 0.2ADA
tx-out + fee == tx-in
I get that the tx_in and tx_out need to equate to pass whatever input validation the command performs.
My failure to do this using coincashew instructions seems to imply the instructions are incorrect or not providing enough information about considerations. I suspect the recommended shell script that calculates values is where things are wrong or not taking certain things into consideration. Maybe the script is assuming the payment address only has one utxo transaction in it or maybe not calculating correctly where there is more then one transaction. Which in my case there is more then one transaction in the payment address.
I guess I’ll need to step though the process manually to see if I can identify at what point the values are wrong.
The coincashew script is correct. It’ll fetch all utxos and use them as part of tx-ins. We can help you debug this if you paste more information, like utxo, spending amount, fees,…
Thanks for verifying the coincashew script instructions are correct. I prepared a bash script using the routines from the coincashew guide, but I ended up screwing it up where the net result was incorrect calculation, as suggested earlier as the issue.
So I corrected the code in the bash script and in the end was able to successfully submit the transaction without issue.