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

Handle an error during submitInboundMessage #82

Open
serejke opened this issue Aug 25, 2023 · 1 comment
Open

Handle an error during submitInboundMessage #82

serejke opened this issue Aug 25, 2023 · 1 comment
Milestone

Comments

@serejke
Copy link
Contributor

serejke commented Aug 25, 2023

Overview

When we receive the following exception, what is the reason? Can we parse this and similar error from Helios/Blockfrost and log a human-readable reason?

Error processing request Error: {"error":"Bad Request","message":"\"transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (UtxosFailure (CollectErrors [BadTranslation (TranslationLogicMissingInput (TxIn (TxId {_unTxId = SafeHash \\\"60e9be74c09c1921f7441dd3eeb9b50faf89830c020d64f3d03810212a07b405\\\"}) (TxIx 2)))])))),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (ValueNotConservedUTxO (Value 3706600 (fromList [(PolicyID {policyID = ScriptHash \\\"d676f438da3ebb0fec66b37e2032138cc2271427fdd42e13a51a1e63\\\"},fromList [(130e8355a1d15b733eda7234f64212c7b0819ef710e84fe66b5de696e2dcc677,1),(61757468,1)])])) (Value 6989009262 (fromList [(PolicyID {policyID = ScriptHash \\\"98d24240645ad3b559a05beca5959a2fa90c51190c73d627f2ea0311\\\"},fromList [(55534443,1)]),(PolicyID {policyID = ScriptHash \\\"d676f438da3ebb0fec66b37e2032138cc2271427fdd42e13a51a1e63\\\"},fromList [(130e8355a1d15b733eda7234f64212c7b0819ef710e84fe66b5de696e2dcc677,1),(61757468,1)])]))))),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (BadInputsUTxO (fromList [TxIn (TxId {_unTxId = SafeHash \\\"60e9be74c09c1921f7441dd3eeb9b50faf89830c020d64f3d03810212a07b405\\\"}) (TxIx 2),TxIn (TxId {_unTxId = SafeHash \\\"60e9be74c09c1921f7441dd3eeb9b50faf89830c020d64f3d03810212a07b405\\\"}) (TxIx 3)])))),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail NoCollateralInputs)),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (InsufficientCollateral (Coin (-6983492283)) (Coin 770910))))])\"","status_code":400}
    at BlockfrostV0.submitTx (webpack://hyperlane-cardano/./node_modules/@hyperionbt/helios/helios.js?:47208:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Wallet.submitTx (webpack://hyperlane-cardano/./src/offchain/wallet.ts?:39:16)
    at async createInboundMessage (webpack://hyperlane-cardano/./src/offchain/tx/createInboundMessage.ts?:55:18)
    at async SubmitInboundMessageService.submitInboundMessage (webpack://hyperlane-cardano/./src/rpc/services/submitInboundMessageService.ts?:16:27)
    at async eval (webpack://hyperlane-cardano/./src/rpc/index.ts?:139:27)

@serejke serejke added this to the Cardano USDC milestone Aug 25, 2023
@hai-kreate
Copy link
Contributor

TranslationLogicMissingInput means a UTxO this transaction is trying to spend was already spent. For instance, when a relayer has to process multiple messages at once but it only has one (inbox) UTxO to process serially, and the second tx submission was sent before the indexer catches up after the previous.

We can return an intuitive error message to the relayer here by looking for TranslationLogicMissingInput.

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

No branches or pull requests

2 participants