cardano-ledger-byron-0.1.0.0: The blockchain layer of Cardano during the Byron era
Safe Haskell None
Language Haskell2010

Cardano.Chain.UTxO.Validation

Synopsis

Documentation

validateTx :: MonadError TxValidationError m => Environment -> UTxO -> Annotated Tx ByteString -> m () Source #

Validate that:

  1. All TxIn s are in domain of Utxo

These are the conditions of the UTxO inference rule in the spec.

validateTxAux :: MonadError TxValidationError m => Environment -> UTxO -> ATxAux ByteString -> m () Source #

Validate that:

  1. The fee for a transaction is not less than the minimum fee.
  2. The size of the transaction is below the maximum size.
  3. Output balance + fee = input balance

The transaction size must be calculated _including the witnesses_. As such this cannot be part of validateTx . We actually assume 3 by calculating the fee as output balance - input balance.

data TxValidationError Source #

A representation of all the ways a transaction might be invalid