| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Byron.Ledger.Ledger
Description
Instances requires for consensus/ledger integration
Synopsis
- data ByronTransition = ByronTransitionInfo !(Map ProtocolVersion BlockNo)
- initByronLedgerState :: Config -> Maybe UTxO -> LedgerState ByronBlock
- byronEraParams :: SafeBeforeEpoch -> Config -> EraParams
- byronEraParamsNeverHardForks :: Config -> EraParams
- encodeByronAnnTip :: AnnTip ByronBlock -> Encoding
- decodeByronAnnTip :: Decoder s (AnnTip ByronBlock)
- encodeByronExtLedgerState :: ExtLedgerState ByronBlock -> Encoding
- encodeByronHeaderState :: HeaderState ByronBlock -> Encoding
- encodeByronLedgerState :: LedgerState ByronBlock -> Encoding
- decodeByronLedgerState :: Decoder s (LedgerState ByronBlock)
- encodeByronQuery :: Query ByronBlock result -> Encoding
- decodeByronQuery :: Decoder s (SomeSecond Query ByronBlock)
- encodeByronResult :: Query ByronBlock result -> result -> Encoding
- decodeByronResult :: Query ByronBlock result -> forall s. Decoder s result
- data family Ticked st
- data family LedgerState blk
- data family Query blk :: Type -> Type
- validationErrorImpossible :: forall err a. Except err a -> a
Documentation
data ByronTransition Source #
Information required to determine the transition from Byron to Shelley
Constructors
| ByronTransitionInfo !(Map ProtocolVersion BlockNo) | Per candidate proposal, the The HFC needs to know when a candidate proposal becomes stable. We cannot
reliably do this using Invariant: the domain of this map should equal the set of candidate proposals. |
Instances
Ledger integration
Arguments
| :: Config | |
| -> Maybe UTxO | Optionally override UTxO |
| -> LedgerState ByronBlock |
byronEraParams :: SafeBeforeEpoch -> Config -> EraParams Source #
To be used for a Byron-to-X (where X is typically Shelley) chain.
byronEraParamsNeverHardForks :: Config -> EraParams Source #
Separate variant of byronEraParams to be used for a Byron-only chain.
Serialisation
decodeByronAnnTip :: Decoder s (AnnTip ByronBlock) Source #
encodeByronQuery :: Query ByronBlock result -> Encoding Source #
encodeByronResult :: Query ByronBlock result -> result -> Encoding Source #
decodeByronResult :: Query ByronBlock result -> forall s. Decoder s result Source #
Type family instances
data family Ticked st Source #
" Ticked " piece of state (LedgerState, LedgerView, ChainIndepState)
Ticking refers to the passage of time (the ticking of the clock). When a piece of state is marked as ticked, it means that time-related changes have been applied to the state (or forecast).
Some examples of time related changes:
- Scheduled delegations might have been applied in Byron
- New leader schedule computed for Shelley
- Transition from Byron to Shelley activated in the hard fork combinator.
- Nonces switched out at the start of a new epoch.
Instances
data family LedgerState blk Source #
Ledger state associated with a block
Instances
data family Query blk :: Type -> Type Source #
Different queries supported by the ledger, indexed by the result type.
Instances
Auxiliary
validationErrorImpossible :: forall err a. Except err a -> a Source #
Mark computation as validation error free
Given a BlockValidationMode of NoBlockValidation, a call to
applyByronBlock shouldn't fail since the ledger layer won't be performing
any block validation checks. However, because applyByronBlock can fail in
the event it is given a BlockValidationMode of BlockValidation, it still
looks like it can fail (since its type doesn't change based on the
ValidationMode) and we must still treat it as such.