1

I have a transaction with many validators and I want to rule out a possible error.

2 Answers 2

2

If I got you right, you are asking if both of the following statements are true:

  1. Transaction is successful -> all validators were successful, and also
  2. All validators were successful -> transaction is successful

Statement 1) is clearly true. Statement 2) is also true as all other conditions that need to be met are checked before the validators are run, which means that when the validators are run, only their failure can make the transaction invalid.

An article from Polina Vinogradova on www.iohk.io explains the validation process in a very good way. Quoting:

Transaction validation on Cardano is divided into two phases. The main reason for introducing two-phase validation is to limit the amount of uncompensated validation work by nodes. Each phase serves a purpose in achieving this goal. Roughly speaking, the first phase checks whether the transaction is constructed correctly and can pay its processing fee. The second phase runs the scripts included in the transaction. If the transaction is phase-1 valid, phase-2 scripts run. If phase-1 fails, no scripts run, and the transaction is immediately discarded.

(see: https://iohk.io/en/blog/posts/2021/09/07/no-surprises-transaction-validation-part-2/)

0

Yes. The transaction will be treated as atomic. If one of the inputs are unspendable, the tx will fail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.