| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Byron.Spec.Ledger.STS.UTXOW
Description
UTXO transition system with witnessing
Synopsis
- data UTXOW
- data UtxowPredicateFailure
- authTxin ∷ VKey → TxIn → UTxO → Bool
- witnessed ∷ Tx → UTxO → Bool
- traceAddrs ∷ [Addr]
- coverUtxoFailure ∷ (MonadTest m, HasCallStack, Data a) ⇒ CoverPercentage → a → m ()
Documentation
Instances
data UtxowPredicateFailure Source #
These PredicateFailures are all throwable.
Constructors
| UtxoFailure (PredicateFailure UTXO) | |
| InsufficientWitnesses |
Instances
| Data UtxowPredicateFailure Source # | |||||
Defined in Byron.Spec.Ledger.STS.UTXOW Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → UtxowPredicateFailure → c UtxowPredicateFailure # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c UtxowPredicateFailure # toConstr ∷ UtxowPredicateFailure → Constr # dataTypeOf ∷ UtxowPredicateFailure → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c UtxowPredicateFailure) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c UtxowPredicateFailure) # gmapT ∷ (∀ b. Data b ⇒ b → b) → UtxowPredicateFailure → UtxowPredicateFailure # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → UtxowPredicateFailure → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → UtxowPredicateFailure → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → UtxowPredicateFailure → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → UtxowPredicateFailure → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → UtxowPredicateFailure → m UtxowPredicateFailure # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → UtxowPredicateFailure → m UtxowPredicateFailure # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → UtxowPredicateFailure → m UtxowPredicateFailure # | |||||
| Generic UtxowPredicateFailure Source # | |||||
Defined in Byron.Spec.Ledger.STS.UTXOW Associated Types
Methods from ∷ UtxowPredicateFailure → Rep UtxowPredicateFailure x # | |||||
| Show UtxowPredicateFailure Source # | |||||
Defined in Byron.Spec.Ledger.STS.UTXOW Methods showsPrec ∷ Int → UtxowPredicateFailure → ShowS # show ∷ UtxowPredicateFailure → String # showList ∷ [UtxowPredicateFailure] → ShowS # | |||||
| Eq UtxowPredicateFailure Source # | |||||
Defined in Byron.Spec.Ledger.STS.UTXOW Methods (==) ∷ UtxowPredicateFailure → UtxowPredicateFailure → Bool # (/=) ∷ UtxowPredicateFailure → UtxowPredicateFailure → Bool # | |||||
| NoThunks UtxowPredicateFailure Source # | |||||
Defined in Byron.Spec.Ledger.STS.UTXOW | |||||
| type Rep UtxowPredicateFailure Source # | |||||
Defined in Byron.Spec.Ledger.STS.UTXOW type Rep UtxowPredicateFailure = D1 ('MetaData "UtxowPredicateFailure" "Byron.Spec.Ledger.STS.UTXOW" "byron-spec-ledger-1.1.0.1-inplace" 'False) (C1 ('MetaCons "UtxoFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PredicateFailure UTXO))) :+: C1 ('MetaCons "InsufficientWitnesses" 'PrefixI 'False) (U1 ∷ Type → Type)) | |||||
authTxin ∷ VKey → TxIn → UTxO → Bool Source #
Determine if a UTxO input is authorized by a given key.
witnessed ∷ Tx → UTxO → Bool Source #
Given a ledger state, determine if the UTxO witnesses in a given transaction are sufficient. TODO - should we only check for one witness for each unique input address?
traceAddrs ∷ [Addr] Source #
Constant list of addresses intended to be used in the generators.
Arguments
| ∷ (MonadTest m, HasCallStack, Data a) | |
| ⇒ CoverPercentage | Minimum percentage that each failure must occur. |
| → a | Structure containing the failures |
| → m () |
Check that all the relevant predicate failures are covered.