HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulecardano-ledger-shelley-test-1.9.0.0Haskell2010

Test.Cardano.Ledger.Shelley.Rules.TestChain

  • 1 type
  • 11 values
valueledgerTraceFromBlockWithRestrictedUTxO
  1. :: (ApplyTx era, ChainProperty era, STS (EraRule "LEDGER" era), BaseM (EraRule "LEDGER" era) ~ ReaderT Globals Identity, Environment (EraRule "LEDGER" era) ~ LedgerEnv era, State (EraRule "LEDGER" era) ~ LedgerState era, Signal (EraRule "LEDGER" era) ~ StAnnTx TopTx era)
  2. => ChainState era
  3. -> Block (BHeader MockCrypto) era
  4. -> (UTxO era, Trace (EraRule "LEDGER" era))
#

This function is nearly the same as ledgerTraceFromBlock, but it restricts the UTxO state to only those needed by the block. It also returns the unused UTxO for comparison later.

valuechainSstWithTick
  1. :: ChainProperty era
  2. => Trace (CHAIN era)
  3. -> [SourceSignalTarget (CHAIN era)]
#

Transform the [(source, signal, target)] of a CHAIN Trace by manually applying the Chain TICK Rule to each source and producing [(source, signal, target')].

This allows for testing properties on Chain traces while excluding the effects of Transactions and Certificates. For example we can check that pools that are due for retirement at an epoch transition, are indeed retired.

Had we not excluded the effects of Transactions/Certificates, we might have a pool that was correctly retired, but is again registered by a certificate in the block following the transition.