Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Shelley.Ledger.Ledger
Synopsis
- newtype ShelleyLedgerError era = BBodyError (BlockTransitionError era)
- class (PraosCrypto (Crypto era), ShelleyBased era, GetLedgerView era, ApplyBlock era, ApplyTx era) => ShelleyBasedEra era
- data ShelleyTip era = ShelleyTip {
- shelleyTipSlotNo :: !SlotNo
- shelleyTipBlockNo :: !BlockNo
- shelleyTipHash :: !(HeaderHash (ShelleyBlock era))
- shelleyTipToPoint :: WithOrigin (ShelleyTip era) -> Point (ShelleyBlock era)
- shelleyLedgerTipPoint :: LedgerState (ShelleyBlock era) -> Point (ShelleyBlock era)
- newtype ShelleyTransition = ShelleyTransitionInfo {}
- data family LedgerState blk
- data family Ticked st
- data ShelleyLedgerConfig era = ShelleyLedgerConfig {}
- shelleyLedgerGenesis :: ShelleyLedgerConfig era -> ShelleyGenesis era
- mkShelleyLedgerConfig :: ShelleyGenesis era -> EpochInfo Identity -> MaxMajorProtVer -> ShelleyLedgerConfig era
- shelleyEraParams :: SafeBeforeEpoch -> ShelleyGenesis era -> EraParams
- shelleyEraParamsNeverHardForks :: ShelleyGenesis era -> EraParams
- getPParams :: NewEpochState era -> PParams era
- encodeShelleyAnnTip :: ShelleyBasedEra era => AnnTip (ShelleyBlock era) -> Encoding
- decodeShelleyAnnTip :: ShelleyBasedEra era => Decoder s (AnnTip (ShelleyBlock era))
- decodeShelleyLedgerState :: forall era s. ShelleyBasedEra era => Decoder s (LedgerState (ShelleyBlock era))
- encodeShelleyLedgerState :: ShelleyBasedEra era => LedgerState (ShelleyBlock era) -> Encoding
- encodeShelleyHeaderState :: ShelleyBasedEra era => HeaderState (ShelleyBlock era) -> Encoding
Documentation
newtype ShelleyLedgerError era Source #
Constructors
BBodyError (BlockTransitionError era) |
Instances
class (PraosCrypto (Crypto era), ShelleyBased era, GetLedgerView era, ApplyBlock era, ApplyTx era) => ShelleyBasedEra era Source #
Instances
PraosCrypto crypto => ShelleyBasedEra (ShelleyEra crypto) | |
Defined in Shelley.Spec.Ledger.API |
data ShelleyTip era Source #
Constructors
ShelleyTip | |
Fields
|
Instances
shelleyTipToPoint :: WithOrigin (ShelleyTip era) -> Point (ShelleyBlock era) Source #
shelleyLedgerTipPoint :: LedgerState (ShelleyBlock era) -> Point (ShelleyBlock era) Source #
newtype ShelleyTransition Source #
Information required to determine the hard fork point from Shelley to the next ledger
Constructors
ShelleyTransitionInfo | |
Fields
|
Instances
data family LedgerState blk Source #
Ledger state associated with a block
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
Ledger config
data ShelleyLedgerConfig era Source #
Constructors
ShelleyLedgerConfig | |
Fields
|
Instances
shelleyLedgerGenesis :: ShelleyLedgerConfig era -> ShelleyGenesis era Source #
mkShelleyLedgerConfig :: ShelleyGenesis era -> EpochInfo Identity -> MaxMajorProtVer -> ShelleyLedgerConfig era Source #
shelleyEraParams :: SafeBeforeEpoch -> ShelleyGenesis era -> EraParams Source #
shelleyEraParamsNeverHardForks :: ShelleyGenesis era -> EraParams Source #
Separate variant of shelleyEraParams
to be used for a Shelley-only chain.
Auxiliary
getPParams :: NewEpochState era -> PParams era Source #
Serialisation
encodeShelleyAnnTip :: ShelleyBasedEra era => AnnTip (ShelleyBlock era) -> Encoding Source #
decodeShelleyAnnTip :: ShelleyBasedEra era => Decoder s (AnnTip (ShelleyBlock era)) Source #
decodeShelleyLedgerState :: forall era s. ShelleyBasedEra era => Decoder s (LedgerState (ShelleyBlock era)) Source #
encodeShelleyLedgerState :: ShelleyBasedEra era => LedgerState (ShelleyBlock era) -> Encoding Source #
encodeShelleyHeaderState :: ShelleyBasedEra era => HeaderState (ShelleyBlock era) -> Encoding Source #