ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.HardFork.Combinator.Ledger

Synopsis

Documentation

data HardForkEnvelopeErr xs Source #

Constructors

HardForkEnvelopeErrFromEra ( OneEraEnvelopeErr xs)

Validation error from one of the eras

HardForkEnvelopeErrWrongEra ( MismatchEraInfo xs)

We tried to apply a block from the wrong era

Instances

Instances details
CanHardFork xs => Eq ( HardForkEnvelopeErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanHardFork xs => Show ( HardForkEnvelopeErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Generic ( HardForkEnvelopeErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanHardFork xs => NoThunks ( HardForkEnvelopeErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep ( HardForkEnvelopeErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep ( HardForkEnvelopeErr xs) = D1 (' MetaData "HardForkEnvelopeErr" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ( C1 (' MetaCons "HardForkEnvelopeErrFromEra" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( OneEraEnvelopeErr xs))) :+: C1 (' MetaCons "HardForkEnvelopeErrWrongEra" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( MismatchEraInfo xs))))

data HardForkLedgerError xs Source #

Constructors

HardForkLedgerErrorFromEra ( OneEraLedgerError xs)

Validation error from one of the eras

HardForkLedgerErrorWrongEra ( MismatchEraInfo xs)

We tried to apply a block from the wrong era

Instances

Instances details
CanHardFork xs => Eq ( HardForkLedgerError xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanHardFork xs => Show ( HardForkLedgerError xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Generic ( HardForkLedgerError xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanHardFork xs => NoThunks ( HardForkLedgerError xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep ( HardForkLedgerError xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep ( HardForkLedgerError xs) = D1 (' MetaData "HardForkLedgerError" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ( C1 (' MetaCons "HardForkLedgerErrorFromEra" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( OneEraLedgerError xs))) :+: C1 (' MetaCons "HardForkLedgerErrorWrongEra" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( MismatchEraInfo xs))))

data HardForkLedgerWarning xs Source #

Constructors

HardForkWarningInEra ( OneEraLedgerWarning xs)

Warning from the underlying era

HardForkWarningTransitionMismatch ( EraIndex xs) EraParams EpochNo

The transition to the next era does not match the EraParams

The EraParams can specify a lower bound on when the transition to the next era will happen. If the actual transition, when confirmed, is before this lower bound, the node is misconfigured and will likely not work correctly. This should be taken care of as soon as possible (before the transition happens).

HardForkWarningTransitionInFinalEra ( EraIndex xs) EpochNo

Transition in the final era

The final era should never confirm any transitions. For clarity, we also record the index of that final era.

HardForkWarningTransitionUnconfirmed ( EraIndex xs)

An already-confirmed transition got un-confirmed

HardForkWarningTransitionReconfirmed ( EraIndex xs) ( EraIndex xs) EpochNo EpochNo

An already-confirmed transition got changed

We record the indices of the era we are transitioning from and to, as well as the old and new EpochNo of that transition, in that order.

Type family instances

data family Ticked st :: Type 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

Instances details
Show ( Ticked ()) Source #
Instance details

Defined in Ouroboros.Consensus.Ticked

Show ( Ticked a) => Show ( Ticked ( K a x)) Source #
Instance details

Defined in Ouroboros.Consensus.Ticked

( SListI xs, Show ( Ticked a)) => Show ( Ticked ( HardForkLedgerView_ ( K a :: Type -> Type ) xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol.LedgerView

Generic ( Ticked ( LedgerState ( HardForkBlock xs))) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

NoThunks ( Ticked ( LedgerState ( DualBlock m a))) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( Ticked ( LedgerState ( HardForkBlock xs))) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Bridge m a => GetTip ( Ticked ( LedgerState ( DualBlock m a))) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => GetTip ( Ticked ( LedgerState ( HardForkBlock xs))) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

IsLedger ( LedgerState blk) => GetTip ( Ticked ( ExtLedgerState blk)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

IsLedger l => GetTip ( Ticked ( LedgerDB l)) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

Isomorphic ( Ticked :.: LedgerState ) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Show ( Ticked (f a)) => Show (( Ticked :.: f) a) Source #
Instance details

Defined in Ouroboros.Consensus.Ticked

NoThunks ( Ticked (f a)) => NoThunks (( Ticked :.: f) a) Source #
Instance details

Defined in Ouroboros.Consensus.Ticked

data Ticked () Source #
Instance details

Defined in Ouroboros.Consensus.Ticked

type Rep ( Ticked ( LedgerState ( HardForkBlock xs))) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep ( Ticked ( LedgerState ( HardForkBlock xs))) = D1 (' MetaData "Ticked" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ( C1 (' MetaCons "TickedHardForkLedgerState" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "tickedHardForkLedgerStateTransition") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 TransitionInfo ) :*: S1 (' MetaSel (' Just "tickedHardForkLedgerStatePerEra") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( HardForkState ( Ticked :.: LedgerState ) xs))))
type HeaderHash ( Ticked l) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

data Ticked ( LedgerState ( DualBlock m a)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Ticked ( LedgerState ( HardForkBlock xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked ( HeaderState blk) Source #
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

newtype Ticked ( WrapLedgerView blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype Ticked ( WrapChainDepState blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

data Ticked ( ExtLedgerState blk) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

data Ticked ( LedgerDB l) Source #

Ticking the ledger DB just ticks the current state

We don't push the new state into the DB until we apply a block.

Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

data Ticked ( HardForkChainDepState xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

data Ticked ( PBftState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype Ticked ( PBftLedgerView c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data Ticked ( HardForkLedgerView_ f xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol.LedgerView

newtype Ticked ( K a x) Source #
Instance details

Defined in Ouroboros.Consensus.Ticked

Low-level API (exported for the benefit of testing)

data AnnForecast state view blk Source #

Forecast annotated with details about the ledger it was derived from

mkHardForkForecast :: forall state view xs. SListI xs => InPairs ( TranslateForecast state view) xs -> HardForkState ( AnnForecast state view) xs -> Forecast ( HardForkLedgerView_ view xs) Source #

Change a telescope of a forecast into a forecast of a telescope

Orphan instances

Generic ( Ticked ( LedgerState ( HardForkBlock xs))) Source #
Instance details

CanHardFork xs => NoThunks ( Ticked ( LedgerState ( HardForkBlock xs))) Source #
Instance details

CanHardFork xs => IsLedger ( LedgerState ( HardForkBlock xs)) Source #
Instance details

CanHardFork xs => GetTip ( Ticked ( LedgerState ( HardForkBlock xs))) Source #
Instance details

CanHardFork xs => GetTip ( LedgerState ( HardForkBlock xs)) Source #
Instance details

CanHardFork xs => UpdateLedger ( HardForkBlock xs) Source #
Instance details

CanHardFork xs => ValidateEnvelope ( HardForkBlock xs) Source #
Instance details

CanHardFork xs => InspectLedger ( HardForkBlock xs) Source #
Instance details

CanHardFork xs => LedgerSupportsProtocol ( HardForkBlock xs) Source #
Instance details

All SingleEraBlock xs => HasHardForkHistory ( HardForkBlock xs) Source #
Instance details

CanHardFork xs => ApplyBlock ( LedgerState ( HardForkBlock xs)) ( HardForkBlock xs) Source #
Instance details