Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.Abstract.SingleEraBlock
Contents
Synopsis
- class (LedgerSupportsProtocol blk, InspectLedger blk, LedgerSupportsMempool blk, ConvertRawTxId (GenTx blk), BlockSupportsLedgerQuery blk, HasPartialConsensusConfig (BlockProtocol blk), HasPartialLedgerConfig blk, ConvertRawHash blk, ReconstructNestedCtxt Header blk, CommonProtocolParams blk, LedgerSupportsPeerSelection blk, ConfigSupportsNode blk, NodeInitStorage blk, BlockSupportsDiffusionPipelining blk, BlockSupportsMetrics blk, SerialiseNodeToClient blk (PartialLedgerConfig blk), CanStowLedgerTables (LedgerState blk), HasLedgerTables (LedgerState blk), HasLedgerTables (Ticked (LedgerState blk)), Eq (GenTx blk), Eq (Validated (GenTx blk)), Eq (ApplyTxErr blk), Show blk, Show (Header blk), Show (CannotForge blk), Show (ForgeStateInfo blk), Show (ForgeStateUpdateError blk)) ⇒ SingleEraBlock blk where
- singleEraTransition ∷ ∀ (mk ∷ MapKind). PartialLedgerConfig blk → EraParams → Bound → LedgerState blk mk → Maybe EpochNo
- singleEraInfo ∷ proxy blk → SingleEraInfo blk
- proxySingle ∷ Proxy SingleEraBlock
- singleEraTransition' ∷ ∀ blk (mk ∷ MapKind). SingleEraBlock blk ⇒ WrapPartialLedgerConfig blk → EraParams → Bound → LedgerState blk mk → Maybe EpochNo
- newtype EraIndex (xs ∷ [Type]) = EraIndex {
- getEraIndex ∷ NS (K () ∷ Type → Type) xs
- eraIndexEmpty ∷ EraIndex ('[] ∷ [Type]) → Void
- eraIndexFromIndex ∷ ∀ (xs ∷ [Type]) blk. SListI xs ⇒ Index xs blk → EraIndex xs
- eraIndexFromNS ∷ ∀ (xs ∷ [Type]) (f ∷ Type → Type). SListI xs ⇒ NS f xs → EraIndex xs
- eraIndexSucc ∷ ∀ (xs ∷ [Type]) x. EraIndex xs → EraIndex (x ': xs)
- eraIndexToInt ∷ ∀ (xs ∷ [Type]). EraIndex xs → Int
- eraIndexZero ∷ ∀ x (xs ∷ [Type]). EraIndex (x ': xs)
Single era block
class (LedgerSupportsProtocol blk, InspectLedger blk, LedgerSupportsMempool blk, ConvertRawTxId (GenTx blk), BlockSupportsLedgerQuery blk, HasPartialConsensusConfig (BlockProtocol blk), HasPartialLedgerConfig blk, ConvertRawHash blk, ReconstructNestedCtxt Header blk, CommonProtocolParams blk, LedgerSupportsPeerSelection blk, ConfigSupportsNode blk, NodeInitStorage blk, BlockSupportsDiffusionPipelining blk, BlockSupportsMetrics blk, SerialiseNodeToClient blk (PartialLedgerConfig blk), CanStowLedgerTables (LedgerState blk), HasLedgerTables (LedgerState blk), HasLedgerTables (Ticked (LedgerState blk)), Eq (GenTx blk), Eq (Validated (GenTx blk)), Eq (ApplyTxErr blk), Show blk, Show (Header blk), Show (CannotForge blk), Show (ForgeStateInfo blk), Show (ForgeStateUpdateError blk)) ⇒ SingleEraBlock blk where Source #
Blocks from which we can assemble a hard fork
Methods
Arguments
∷ ∀ (mk ∷ MapKind). PartialLedgerConfig blk | |
→ EraParams | Current era parameters |
→ Bound | Start of this era |
→ LedgerState blk mk | |
→ Maybe EpochNo |
Era transition
This should only report the transition point once it is stable (rollback cannot affect it anymore).
Since we need this to construct the HardForkSummary
(and hence the
EpochInfo
), this takes the partial config, not the full config
(or we'd end up with a catch-22).
singleEraInfo ∷ proxy blk → SingleEraInfo blk Source #
Era information (for use in error messages)
singleEraTransition' ∷ ∀ blk (mk ∷ MapKind). SingleEraBlock blk ⇒ WrapPartialLedgerConfig blk → EraParams → Bound → LedgerState blk mk → Maybe EpochNo Source #
Era index
eraIndexZero ∷ ∀ x (xs ∷ [Type]). EraIndex (x ': xs) Source #