Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data AlonzoBBODY era
- data AlonzoBbodyPredFailure era
- newtype AlonzoBbodyEvent era = ShelleyInAlonzoEvent (ShelleyBbodyEvent era)
- alonzoBbodyTransition ∷ ∀ era. (STS (EraRule "BBODY" era), Signal (EraRule "BBODY" era) ~ Block (BHeaderView (EraCrypto era)) era, InjectRuleFailure "BBODY" AlonzoBbodyPredFailure era, BaseM (EraRule "BBODY" era) ~ ShelleyBase, State (EraRule "BBODY" era) ~ ShelleyBbodyState era, Environment (EraRule "BBODY" era) ~ BbodyEnv era, Embed (EraRule "LEDGERS" era) (EraRule "BBODY" era), Environment (EraRule "LEDGERS" era) ~ ShelleyLedgersEnv era, State (EraRule "LEDGERS" era) ~ LedgerState era, Signal (EraRule "LEDGERS" era) ~ Seq (Tx era), EraSegWits era, AlonzoEraTxWits era, TxSeq era ~ AlonzoTxSeq era, Tx era ~ AlonzoTx era, AlonzoEraPParams era) ⇒ TransitionRule (EraRule "BBODY" era)
- data AlonzoLEDGER era
- ledgerTransition ∷ ∀ (someLEDGER ∷ Type → Type) era. (Signal (someLEDGER era) ~ Tx era, State (someLEDGER era) ~ LedgerState era, Environment (someLEDGER era) ~ LedgerEnv era, Embed (EraRule "UTXOW" era) (someLEDGER era), Embed (EraRule "DELEGS" era) (someLEDGER era), Environment (EraRule "DELEGS" era) ~ DelegsEnv era, State (EraRule "DELEGS" era) ~ CertState era, Signal (EraRule "DELEGS" era) ~ Seq (TxCert era), Environment (EraRule "UTXOW" era) ~ UtxoEnv era, State (EraRule "UTXOW" era) ~ UTxOState era, Signal (EraRule "UTXOW" era) ~ Tx era, AlonzoEraTx era) ⇒ TransitionRule (someLEDGER era)
- data AlonzoUTXO era
- data AlonzoUtxoPredFailure era
- = BadInputsUTxO !(Set (TxIn (EraCrypto era)))
- | OutsideValidityIntervalUTxO !ValidityInterval !SlotNo
- | MaxTxSizeUTxO !Integer !Integer
- | InputSetEmptyUTxO
- | FeeTooSmallUTxO !Coin !Coin
- | ValueNotConservedUTxO !(Value era) !(Value era)
- | WrongNetwork !Network !(Set (Addr (EraCrypto era)))
- | WrongNetworkWithdrawal !Network !(Set (RewardAccount (EraCrypto era)))
- | OutputTooSmallUTxO ![TxOut era]
- | UtxosFailure (PredicateFailure (EraRule "UTXOS" era))
- | OutputBootAddrAttrsTooBig ![TxOut era]
- | TriesToForgeADA
- | OutputTooBigUTxO ![(Integer, Integer, TxOut era)]
- | InsufficientCollateral !DeltaCoin !Coin
- | ScriptsNotPaidUTxO !(UTxO era)
- | ExUnitsTooBigUTxO !ExUnits !ExUnits
- | CollateralContainsNonADA !(Value era)
- | WrongNetworkInTxBody !Network !Network
- | OutsideForecast !SlotNo
- | TooManyCollateralInputs !Natural !Natural
- | NoCollateralInputs
- allegraToAlonzoUtxoPredFailure ∷ ∀ t era. (EraRuleFailure "PPUP" era ~ t era, InjectRuleFailure "UTXOS" t era) ⇒ AllegraUtxoPredFailure era → AlonzoUtxoPredFailure era
- newtype AlonzoUtxoEvent era = UtxosEvent (Event (EraRule "UTXOS" era))
- validateCollateralContainsNonADA ∷ (Foldable f, EraTxOut era) ⇒ f (TxOut era) → Test (AlonzoUtxoPredFailure era)
- validateExUnitsTooBigUTxO ∷ (AlonzoEraTxWits era, EraTx era, AlonzoEraPParams era) ⇒ PParams era → Tx era → Test (AlonzoUtxoPredFailure era)
- validateOutputTooBigUTxO ∷ (EraTxOut era, AlonzoEraPParams era, Foldable f) ⇒ PParams era → f (TxOut era) → Test (AlonzoUtxoPredFailure era)
- validateInsufficientCollateral ∷ (EraTxBody era, AlonzoEraPParams era) ⇒ PParams era → TxBody era → DeltaCoin → Test (AlonzoUtxoPredFailure era)
- validateOutsideForecast ∷ (MaryEraTxBody era, AlonzoEraTxWits era, EraTx era) ⇒ EpochInfo (Either a) → SlotNo → SystemStart → Tx era → Test (AlonzoUtxoPredFailure era)
- validateScriptsNotPaidUTxO ∷ EraTxOut era ⇒ Map (TxIn (EraCrypto era)) (TxOut era) → Test (AlonzoUtxoPredFailure era)
- validateTooManyCollateralInputs ∷ AlonzoEraTxBody era ⇒ PParams era → TxBody era → Test (AlonzoUtxoPredFailure era)
- validateWrongNetworkInTxBody ∷ AlonzoEraTxBody era ⇒ Network → TxBody era → Test (AlonzoUtxoPredFailure era)
- vKeyLocked ∷ EraTxOut era ⇒ TxOut era → Bool
- data AlonzoUTXOS era
- data AlonzoUtxosPredFailure era
- = ValidationTagMismatch IsValid TagMismatchDescription
- | CollectErrors [CollectError era]
- | UpdateFailure (EraRuleFailure "PPUP" era)
- lbl2Phase ∷ Label
- data TagMismatchDescription
- validBegin ∷ String
- validEnd ∷ String
- invalidBegin ∷ String
- invalidEnd ∷ String
- data AlonzoUtxosEvent era
- = AlonzoPpupToUtxosEvent (EraRuleEvent "PPUP" era)
- | TotalDeposits (SafeHash (EraCrypto era) EraIndependentTxBody) Coin
- | SuccessfulPlutusScriptsEvent (NonEmpty (PlutusWithContext (EraCrypto era)))
- | FailedPlutusScriptsEvent (NonEmpty (PlutusWithContext (EraCrypto era)))
- | TxUTxODiff (UTxO era) (UTxO era)
- when2Phase ∷ Rule sts ctx () → Rule sts ctx ()
- data FailureDescription = PlutusFailure Text ByteString
- scriptFailureToFailureDescription ∷ Crypto c ⇒ ScriptFailure c → FailureDescription
- data AlonzoUTXOW era
- newtype AlonzoUtxowEvent era = WrappedShelleyEraEvent (ShelleyUtxowEvent era)
- data AlonzoUtxowPredFailure era
- = ShelleyInAlonzoUtxowPredFailure !(ShelleyUtxowPredFailure era)
- | MissingRedeemers ![(PlutusPurpose AsItem era, ScriptHash (EraCrypto era))]
- | MissingRequiredDatums !(Set (DataHash (EraCrypto era))) !(Set (DataHash (EraCrypto era)))
- | NotAllowedSupplementalDatums !(Set (DataHash (EraCrypto era))) !(Set (DataHash (EraCrypto era)))
- | PPViewHashesDontMatch !(StrictMaybe (ScriptIntegrityHash (EraCrypto era))) !(StrictMaybe (ScriptIntegrityHash (EraCrypto era)))
- | MissingRequiredSigners (Set (KeyHash 'Witness (EraCrypto era)))
- | UnspendableUTxONoDatumHash (Set (TxIn (EraCrypto era)))
- | ExtraRedeemers ![PlutusPurpose AsIx era]
- hasExactSetOfRedeemers ∷ ∀ era. AlonzoEraTx era ⇒ Tx era → ScriptsProvided era → AlonzoScriptsNeeded era → Test (AlonzoUtxowPredFailure era)
- missingRequiredDatums ∷ ∀ era. (AlonzoEraTx era, AlonzoEraUTxO era) ⇒ UTxO era → Tx era → Test (AlonzoUtxowPredFailure era)
- ppViewHashesMatch ∷ ∀ era. AlonzoEraTx era ⇒ Tx era → PParams era → ScriptsProvided era → Set (ScriptHash (EraCrypto era)) → Test (AlonzoUtxowPredFailure era)
- requiredSignersAreWitnessed ∷ AlonzoEraTxBody era ⇒ TxBody era → Set (KeyHash 'Witness (EraCrypto era)) → Test (AlonzoUtxowPredFailure era)
Documentation
data AlonzoBBODY era Source #
Instances
data AlonzoBbodyPredFailure era Source #
Instances
newtype AlonzoBbodyEvent era Source #
alonzoBbodyTransition ∷ ∀ era. (STS (EraRule "BBODY" era), Signal (EraRule "BBODY" era) ~ Block (BHeaderView (EraCrypto era)) era, InjectRuleFailure "BBODY" AlonzoBbodyPredFailure era, BaseM (EraRule "BBODY" era) ~ ShelleyBase, State (EraRule "BBODY" era) ~ ShelleyBbodyState era, Environment (EraRule "BBODY" era) ~ BbodyEnv era, Embed (EraRule "LEDGERS" era) (EraRule "BBODY" era), Environment (EraRule "LEDGERS" era) ~ ShelleyLedgersEnv era, State (EraRule "LEDGERS" era) ~ LedgerState era, Signal (EraRule "LEDGERS" era) ~ Seq (Tx era), EraSegWits era, AlonzoEraTxWits era, TxSeq era ~ AlonzoTxSeq era, Tx era ~ AlonzoTx era, AlonzoEraPParams era) ⇒ TransitionRule (EraRule "BBODY" era) Source #
data AlonzoLEDGER era Source #
Instances
ledgerTransition ∷ ∀ (someLEDGER ∷ Type → Type) era. (Signal (someLEDGER era) ~ Tx era, State (someLEDGER era) ~ LedgerState era, Environment (someLEDGER era) ~ LedgerEnv era, Embed (EraRule "UTXOW" era) (someLEDGER era), Embed (EraRule "DELEGS" era) (someLEDGER era), Environment (EraRule "DELEGS" era) ~ DelegsEnv era, State (EraRule "DELEGS" era) ~ CertState era, Signal (EraRule "DELEGS" era) ~ Seq (TxCert era), Environment (EraRule "UTXOW" era) ~ UtxoEnv era, State (EraRule "UTXOW" era) ~ UTxOState era, Signal (EraRule "UTXOW" era) ~ Tx era, AlonzoEraTx era) ⇒ TransitionRule (someLEDGER era) Source #
An abstract Alonzo Era, Ledger transition. Fix someLedger
at a concrete type to
make it concrete.
data AlonzoUTXO era Source #
Instances
data AlonzoUtxoPredFailure era Source #
BadInputsUTxO !(Set (TxIn (EraCrypto era))) | The bad transaction inputs |
OutsideValidityIntervalUTxO | |
| |
MaxTxSizeUTxO | |
InputSetEmptyUTxO | |
FeeTooSmallUTxO | |
ValueNotConservedUTxO | |
WrongNetwork | the set of addresses with incorrect network IDs |
WrongNetworkWithdrawal | |
| |
OutputTooSmallUTxO ![TxOut era] | list of supplied transaction outputs that are too small |
UtxosFailure (PredicateFailure (EraRule "UTXOS" era)) | Subtransition Failures |
OutputBootAddrAttrsTooBig ![TxOut era] | list of supplied bad transaction outputs |
TriesToForgeADA | |
OutputTooBigUTxO ![(Integer, Integer, TxOut era)] | list of supplied bad transaction output triples (actualSize,PParameterMaxValue,TxOut) |
InsufficientCollateral | |
ScriptsNotPaidUTxO !(UTxO era) | The UTxO entries which have the wrong kind of script |
ExUnitsTooBigUTxO | |
CollateralContainsNonADA !(Value era) | The inputs marked for use as fees contain non-ADA tokens |
WrongNetworkInTxBody | Wrong Network ID in body |
OutsideForecast !SlotNo | slot number outside consensus forecast range |
TooManyCollateralInputs | There are too many collateral inputs |
NoCollateralInputs |
Instances
allegraToAlonzoUtxoPredFailure ∷ ∀ t era. (EraRuleFailure "PPUP" era ~ t era, InjectRuleFailure "UTXOS" t era) ⇒ AllegraUtxoPredFailure era → AlonzoUtxoPredFailure era Source #
newtype AlonzoUtxoEvent era Source #
UtxosEvent (Event (EraRule "UTXOS" era)) |
Instances
validateCollateralContainsNonADA ∷ (Foldable f, EraTxOut era) ⇒ f (TxOut era) → Test (AlonzoUtxoPredFailure era) Source #
validateExUnitsTooBigUTxO ∷ (AlonzoEraTxWits era, EraTx era, AlonzoEraPParams era) ⇒ PParams era → Tx era → Test (AlonzoUtxoPredFailure era) Source #
Ensure that execution units to not exceed the maximum allowed maxTxExUnits
parameter.
totExunits tx ≤ maxTxExUnits pp
validateOutputTooBigUTxO ∷ (EraTxOut era, AlonzoEraPParams era, Foldable f) ⇒ PParams era → f (TxOut era) → Test (AlonzoUtxoPredFailure era) Source #
validateInsufficientCollateral ∷ (EraTxBody era, AlonzoEraPParams era) ⇒ PParams era → TxBody era → DeltaCoin → Test (AlonzoUtxoPredFailure era) Source #
validateOutsideForecast Source #
∷ (MaryEraTxBody era, AlonzoEraTxWits era, EraTx era) | |
⇒ EpochInfo (Either a) | |
→ SlotNo | Current slot number |
→ SystemStart | |
→ Tx era | |
→ Test (AlonzoUtxoPredFailure era) |
If tx has non-native scripts, end of validity interval must translate to time
(_,i_f) := txvldt tx ◇ ∉ { txrdmrs tx, i_f } ⇒ epochInfoSlotToUTCTime epochInfo systemTime i_f ≠ ◇
validateScriptsNotPaidUTxO ∷ EraTxOut era ⇒ Map (TxIn (EraCrypto era)) (TxOut era) → Test (AlonzoUtxoPredFailure era) Source #
validateTooManyCollateralInputs ∷ AlonzoEraTxBody era ⇒ PParams era → TxBody era → Test (AlonzoUtxoPredFailure era) Source #
Ensure that number of collaterals does not exceed the allowed maxCollInputs
parameter.
‖collateral tx‖ ≤ maxCollInputs pp
validateWrongNetworkInTxBody ∷ AlonzoEraTxBody era ⇒ Network → TxBody era → Test (AlonzoUtxoPredFailure era) Source #
Ensure if NetworkId is present in the txbody it matches the global NetworkId
(txnetworkid txb = NetworkId) ∨ (txnetworkid txb = ◇)
data AlonzoUTXOS era Source #
Instances
data AlonzoUtxosPredFailure era Source #
ValidationTagMismatch IsValid TagMismatchDescription | The |
CollectErrors [CollectError era] | We could not find all the necessary inputs for a Plutus Script. Previous PredicateFailure tests should make this impossible, but the consequences of not detecting this means scripts get dropped, so things might validate that shouldn't. So we double check in the function collectTwoPhaseScriptInputs, it should find data for every Script. |
UpdateFailure (EraRuleFailure "PPUP" era) |
Instances
Indicates that this check depends only upon the signal to the transition, not the state or environment.
data TagMismatchDescription Source #
Instances
data AlonzoUtxosEvent era Source #
AlonzoPpupToUtxosEvent (EraRuleEvent "PPUP" era) | |
TotalDeposits (SafeHash (EraCrypto era) EraIndependentTxBody) Coin | |
SuccessfulPlutusScriptsEvent (NonEmpty (PlutusWithContext (EraCrypto era))) | |
FailedPlutusScriptsEvent (NonEmpty (PlutusWithContext (EraCrypto era))) | |
TxUTxODiff | The UTxOs consumed and created by a signal tx |
Instances
when2Phase ∷ Rule sts ctx () → Rule sts ctx () Source #
Construct a 2-phase predicate check.
Note that 2-phase predicate checks are by definition static.
data FailureDescription Source #
Instances
data AlonzoUTXOW era Source #
Instances
newtype AlonzoUtxowEvent era Source #
Instances
data AlonzoUtxowPredFailure era Source #
The Predicate failure type in the Alonzo Era. It embeds the Predicate failure type of the Shelley Era, as they share some failure modes.
ShelleyInAlonzoUtxowPredFailure !(ShelleyUtxowPredFailure era) | |
MissingRedeemers ![(PlutusPurpose AsItem era, ScriptHash (EraCrypto era))] | List of scripts for which no redeemers were supplied |
MissingRequiredDatums | |
NotAllowedSupplementalDatums | |
PPViewHashesDontMatch | |
| |
MissingRequiredSigners (Set (KeyHash 'Witness (EraCrypto era))) | Set of witnesses which were needed and not supplied |
UnspendableUTxONoDatumHash (Set (TxIn (EraCrypto era))) | Set of transaction inputs that are TwoPhase scripts, and should have a DataHash but don't |
ExtraRedeemers ![PlutusPurpose AsIx era] | List of redeemers not needed |
Instances
hasExactSetOfRedeemers ∷ ∀ era. AlonzoEraTx era ⇒ Tx era → ScriptsProvided era → AlonzoScriptsNeeded era → Test (AlonzoUtxowPredFailure era) Source #
missingRequiredDatums ∷ ∀ era. (AlonzoEraTx era, AlonzoEraUTxO era) ⇒ UTxO era → Tx era → Test (AlonzoUtxowPredFailure era) Source #
ppViewHashesMatch ∷ ∀ era. AlonzoEraTx era ⇒ Tx era → PParams era → ScriptsProvided era → Set (ScriptHash (EraCrypto era)) → Test (AlonzoUtxowPredFailure era) Source #
requiredSignersAreWitnessed ∷ AlonzoEraTxBody era ⇒ TxBody era → Set (KeyHash 'Witness (EraCrypto era)) → Test (AlonzoUtxowPredFailure era) Source #
Deprecated: As no longer used. validateNeededWitnesses
now handles this check