cardano-ledger-byron-test
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Chain.Block.Model

Description

Test module where we check that the block validation implementation matches the formal specification. To this end, the strategy is:

  1. generate traces of abstract blocks, which conform to the formal semantics of the blockchain layer
  2. elaborate these abstract blocks into concrete blocks
  3. feed the generated sequence of concrete blocks to the block validation function, and check that it passes the validation.
Synopsis

Documentation

elaborateAndUpdateConfig → (ChainValidationState, AbstractToConcreteIdMaps) → (State CHAIN, Block) → Either ChainValidationError (ChainValidationState, AbstractToConcreteIdMaps) Source #

Elaborate an abstract signal into a concrete one, and apply the validators to the elaborated signal and given concrete state. If the signal was validated, return the next state. Otherwise return an error.