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

[BUG] - transaction build does not balance correctly when the certificate is already submitted #3040

Closed
dorin100 opened this issue Aug 6, 2021 · 3 comments
Labels
alonzo-white Relates to the Alonzo White Testnet API&CLI-Backlog bug Something isn't working comp: cardano-cli era: alonzo type: bug Something is not working user type: internal Created by an IOG employee

Comments

@dorin100
Copy link

dorin100 commented Aug 6, 2021

Internal/External
Internal if an IOHK staff member.

Area
Other Any other topic (Delegation, Ranking, ...).

Summary
We get error when submitting a tx based on transaction build

Steps to reproduce
Steps to reproduce the behavior:

  1. try to submit a tx with a stake pool registration cert already registered.
cardano-cli transaction build \
    --alonzo-era \
    --testnet-magic $MAGIC \
    --tx-in ed977081747a09f922a3948531d9759e2857afa883cce14a1c1ead934589a274#0 \
    --change-address $(cat addr/addr1.addr) \
    --protocol-params-file protocol-params.json \
    --certificate-file pool/pool_registration.cert \
    --witness-override 3 \
    --out-file tx_raw1.body 

cardano-cli transaction sign \
  --tx-body-file tx_raw1.body \
  --testnet-magic $MAGIC \
  --signing-key-file addr/addr1.skey \
  --signing-key-file pool/pool_cold.skey \
  --signing-key-file addr/addr1_stake.skey \
  --out-file tx_raw1.signed

cardano-cli transaction submit \
    --testnet-magic $MAGIC \
    --tx-file tx_raw1.signed

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 998961429977 (fromList [])) (Value 998461429977 (fromList [])))))])
  • the diff is the 500 Ada (pool reg cert) that is already paid.

Expected behavior
The tx should be already correctly balanced.

System info (please complete the following information):

  • OS Name: Ubuntu
$ cardano-cli --version
cardano-cli 1.28.0 - linux-x86_64 - ghc-8.10
git rev 708de685d49ec6af4b2d8b3cbfa0eca0e9e43edf

$ cardano-node --version
cardano-node 1.28.0 - linux-x86_64 - ghc-8.10
git rev 708de685d49ec6af4b2d8b3cbfa0eca0e9e43edf
@dorin100 dorin100 added bug Something isn't working alonzo-purple Relates to the Alonzo Purple Testnet alonzo-white Relates to the Alonzo White Testnet and removed alonzo-purple Relates to the Alonzo Purple Testnet labels Aug 6, 2021
@dcoutts
Copy link
Contributor

dcoutts commented Aug 19, 2021

We suspect that the cause of this bug is that the cli is currently passing an empty set of pool ids rather. To do this properly will require querying the current set of pool ids and passing them in place of the empty set.

@dcoutts
Copy link
Contributor

dcoutts commented Aug 19, 2021

Related #3101

@Jimbo4350
Copy link
Contributor

Fixed in: #3176

@dorin100 dorin100 added type: bug Something is not working user type: internal Created by an IOG employee comp: cardano-cli era: alonzo labels Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alonzo-white Relates to the Alonzo White Testnet API&CLI-Backlog bug Something isn't working comp: cardano-cli era: alonzo type: bug Something is not working user type: internal Created by an IOG employee
Projects
None yet
Development

No branches or pull requests

4 participants