cardano-ledger-byron-1.0.2.0: The blockchain layer of Cardano during the Byron era
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Chain.UTxO.Validation

Synopsis

Documentation

validateTxMonadError TxValidationError m ⇒ EnvironmentUTxOAnnotated Tx ByteString → m () Source #

Validate that:

  1. All TxIns are in domain of Utxo

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

validateTxAuxMonadError TxValidationError m ⇒ EnvironmentUTxOATxAux 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.

updateUTxO ∷ (MonadError UTxOValidationError m, MonadReader ValidationMode m) ⇒ EnvironmentUTxO → [ATxAux ByteString] → m UTxO Source #

Update UTxO with a list of transactions

updateUTxOTxWitness ∷ (MonadError UTxOValidationError m, MonadReader ValidationMode m) ⇒ EnvironmentUTxOATxAux ByteString → m UTxO Source #

Validate a transaction with a witness and use it to update the UTxO

updateUTxOTx ∷ (MonadError UTxOValidationError m, MonadReader ValidationMode m) ⇒ EnvironmentUTxOAnnotated Tx ByteString → m UTxO Source #

Validate a transaction and use it to update the UTxO

data TxValidationError Source #

A representation of all the ways a transaction might be invalid

Instances

Instances details
Show TxValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

FromCBOR TxValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

ToCBOR TxValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

DecCBOR TxValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

EncCBOR TxValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

Eq TxValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

data UTxOValidationError Source #

Instances

Instances details
Show UTxOValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

FromCBOR UTxOValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

ToCBOR UTxOValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

DecCBOR UTxOValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

EncCBOR UTxOValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation

Eq UTxOValidationError Source # 
Instance details

Defined in Cardano.Chain.UTxO.Validation