scalus.cardano.ledger.rules

Members list

Type members

Classlikes

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type
object CardanoMutator extends Mutator

Attributes

Supertypes
trait Mutator
trait STS
class Object
trait Matchable
class Any
Self type
object CertsMutator extends Mutator

Attributes

Supertypes
trait Mutator
trait STS
class Object
trait Matchable
class Any
Self type
object CertsValidator extends Validator

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type
object Context

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Context.type
case class Context(var fee: Coin = ..., env: UtxoEnv = ..., slotConfig: SlotConfig = ..., evaluatorMode: EvaluatorMode = ..., debugScripts: Map[ScriptHash, DebugScript] = ...)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Explicit list of all default mutators for ledger rules validation.

Explicit list of all default mutators for ledger rules validation.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Explicit list of all default validators for ledger rules validation.

Explicit list of all default validators for ledger rules validation.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type
object FeesOkValidator extends Validator

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type
object GovMutator extends Mutator

The Conway GOV rule of cardano-ledger (eras/conway/impl/src/Cardano/Ledger/Conway/Rules/ Gov.hs:456-643), spec [GV-1] to [GV-20]: checks the proposals and votes of a tx and stores them in govState.

The Conway GOV rule of cardano-ledger (eras/conway/impl/src/Cardano/Ledger/Conway/Rules/ Gov.hs:456-643), spec [GV-1] to [GV-20]: checks the proposals and votes of a tx and stores them in govState.

It runs after CertsMutator, so it sees the accounts, DReps, pools and committee hot keys after CERTS, spec [GV-2], [GV-2a]. It reads the committee, the guardrails hash and the roots from the gov state before the tx, which no earlier mutator writes, spec [GV-20]. The deposit check of GOV is ProposalDepositValidator, D30.

The ledger collects every failure of the rule. transit reports the first in the ledger's order, spec [GV-3a], [GV-10b], and transitAll all of them, spec [FL-1]. The PV 9 bootstrap failures are not emulated (spec section 5.8), but the PV 9 exemptions of the other checks are.

Attributes

Supertypes
trait Mutator
trait STS
class Object
trait Matchable
class Any
Self type
GovMutator.type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type
object MetadataValidator extends Validator

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Alonzo/Babbage validateOutsideForecast in cardano-ledger.

Alonzo/Babbage validateOutsideForecast in cardano-ledger.

The Haskell rule rejects a transaction that carries redeemers and a validity-interval upper bound which epochInfoSlotToUTCTime cannot translate to wall-clock time. That translation only fails because the consensus layer provides an EpochInfo whose horizon is limited to the stability window past the current tip — beyond it, a hard fork could change slot lengths, so the slot-to-time mapping is not guaranteed. The horizon is consensus environment (Globals.epochInfo / stabilityWindow), not ledger state.

Scalus models the chain with a fixed-slot-length scalus.cardano.ledger.SlotConfig (a single, never-forking era), under which slot-to-time translation is total — so this rule cannot fire and always succeeds. This is the faithful semantics for the emulator and for replaying historical transactions (anything accepted on-chain already passed the node's horizon check); it intentionally does not reproduce the node's forecast-horizon rejection for far-future validity bounds.

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Mutator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type
object STS

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
STS.type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type
case class State(utxos: Utxos = ..., certState: CertState = ..., deposited: Coin = ..., fees: Coin = ..., govState: GovState = ..., stakeDistribution: StakeMap = ..., donation: Coin = ...)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type
object UtxoEnv

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
UtxoEnv.type
case class UtxoEnv(slot: SlotNo, params: ProtocolParams, certState: CertState, network: Network, treasury: Coin)

The environment a transaction is validated in.

The environment a transaction is validated in.

Value parameters

treasury

the treasury as of the last epoch boundary, the casTreasury Haskell passes to LEDGER. A tx that states a currentTreasuryValue must state this value, spec [SC-6].

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

This is Shelley.validateValueNotConservedUTxO

This is Shelley.validateValueNotConservedUTxO

consumed pp utxo txb = produced pp poolParams txb

Both sides are summed and compared exactly, as the ledger's Integer does: a transaction can make a Long sum wrap around to the other side's total. The error reports amounts beyond the Long range as Long.MaxValue or Long.MinValue.

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Validator
trait STS
class Object
trait Matchable
class Any
Self type