IntersectMBO / cardano-node

The core component that is used to participate in a Cardano decentralised blockchain.
https://cardano.org
Apache License 2.0
3.06k stars 720 forks source link

[FR] - add `cardano-cli transaction submit` and `cardano-submit-api` error if transaction input is inexsistent #4927

Open michele-nuzzi opened 1 year ago

michele-nuzzi commented 1 year ago

Internal/External External otherwise.

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

Describe the feature you'd like I'm playing around with cardano-cli and some transactions built manually.

one of the transactions happened to include an ill-formed utxo reference as input, resulting in the transaction being invalid.

sending the transaction both using cardano-cli transaction submit or using the cardano-submit-api enpoint resulted in the transaction sent sucessfully.

however no changes in the between the whole utxos where registered.

I only found out about the problem via inspecting the node logs.

There I found:

[michele:cardano.node.Mempool:Info:78] [2023-03-01 17:01:43.75 UTC] fromList [("kind",String "TraceMempoolAddedTx"),("mempoolSize",Object (fromList [("bytes",Number 2512.0),("numTxs",Number 1.0)])),("tx",Object (fromList [("txid",String "eb3c599e")]))]
[michele:cardano.node.Mempool:Info:103] [2023-03-01 17:01:43.75 UTC] fromList [("err",Object (fromList [("badInputs",Array [String "2b6c58debea4d12c0644dd3d85ba226ab8c3d81b2a9f491578a659f2fe3eebde#TxIx 0"]),("balance",Number 0.0),("error",String "The transaction contains inputs that do not exist in the UTxO set."),("kind",String "BadInputsUTxO"),("txfee",Number 1.3139099e7)])),("kind",String "TraceMempoolRejectedTx"),("mempoolSize",Object (fromList [("bytes",Number 2512.0),("numTxs",Number 1.0)])),("tx",Object (fromList [("txid",String "eb3c599e")]))]

I'd really appreciate if it was possible to catch these kind of error at transaction submission

Describe alternatives you've considered

Checking the node logs manually

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.