cardano-ledger-core-1.14.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Slot

Synopsis

Documentation

newtype SlotNo Source #

The 0-based index for the Ourboros time slot.

Constructors

SlotNo 

Fields

Instances

Instances details
FromJSON SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Bounded SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Enum SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Generic SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep SlotNoTypeType Source #

Methods

fromSlotNoRep SlotNo x Source #

toRep SlotNo x → SlotNo Source #

Num SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Show SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBORSlotNoEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SlotNoSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SlotNo] → Size Source #

DecCBOR SlotNo 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR SlotNo 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSlotNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy SlotNoSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SlotNo] → Size Source #

NFData SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfSlotNo → () Source #

Eq SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)SlotNoSlotNoBool Source #

(/=)SlotNoSlotNoBool Source #

Ord SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Serialise SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.0.0-b7fb83d95ce5b91699e236815d96a1eb9b7b82cb1cc0b9460e0396f68c8089d5" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

getTheSlotOfNoReturnHasCallStackSlotNoShelleyBase (EpochNo, SlotNo, EpochNo) Source #

Figure out a slot number that is two stability windows before the end of the next epoch. Together with the slot number we also return the current epoch number and the next epoch number.

The reason why it is called the point of no return, is because that is the point when HardForkCombinator (HFC) initiates a controlled hard fork, if there is a major protocol version update that forks into a new era.

newtype Duration Source #

Constructors

Duration 

Fields

Instances

Instances details
Monoid Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Semigroup Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Enum Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Generic Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Associated Types

type Rep DurationTypeType Source #

Num Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Integral Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Real Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Show Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Eq Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

Ord Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

NoThunks Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

type Rep Duration Source # 
Instance details

Defined in Cardano.Ledger.Slot

type Rep Duration = D1 ('MetaData "Duration" "Cardano.Ledger.Slot" "cardano-ledger-core-1.14.0.0-inplace" 'True) (C1 ('MetaCons "Duration" 'PrefixI 'True) (S1 ('MetaSel ('Just "unDuration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

(*-)SlotNoDurationSlotNo Source #

Subtract a duration from a slot

newtype EpochNo Source #

An epoch, i.e. the number of the epoch.

Constructors

EpochNo 

Fields

Instances

Instances details
FromJSON EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Enum EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochNoTypeType Source #

Methods

fromEpochNoRep EpochNo x Source #

toRep EpochNo x → EpochNo Source #

Show EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOREpochNoEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochNoSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [EpochNo] → Size Source #

DecCBOR EpochNo 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR EpochNo 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOREpochNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy EpochNoSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [EpochNo] → Size Source #

NFData EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochNo → () Source #

Eq EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)EpochNoEpochNoBool Source #

(/=)EpochNoEpochNoBool Source #

Ord EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Serialise EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.0.0-b7fb83d95ce5b91699e236815d96a1eb9b7b82cb1cc0b9460e0396f68c8089d5" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

newtype EpochSize Source #

Constructors

EpochSize 

Fields

Instances

Instances details
FromJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Enum EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochSizeTypeType Source #

Show EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOREpochSizeEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochSizeSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [EpochSize] → Size Source #

DecCBOR EpochSize 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR EpochSize 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOREpochSizeEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy EpochSizeSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [EpochSize] → Size Source #

NFData EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochSize → () Source #

Eq EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.2.0.0-b7fb83d95ce5b91699e236815d96a1eb9b7b82cb1cc0b9460e0396f68c8089d5" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

data EpochInfo (m ∷ TYPE LiftedRepType) Source #

Information about epochs

Different epochs may have different sizes and different slot lengths. This information is encapsulated by EpochInfo. It is parameterized over a monad m because the information about how long each epoch is may depend on information derived from the blockchain itself. It ultimately requires acess to state, and so either uses the monad for that or uses the monad to reify failure due to cached state information being too stale for the current query.

Instances

Instances details
Show (EpochInfo f)

Unhelpful instance, but this type occurs in records (eg Shelley.Globals) that we want to be able to show

Instance details

Defined in Cardano.Slotting.EpochInfo.API

NoThunks (EpochInfo m) 
Instance details

Defined in Cardano.Slotting.EpochInfo.API

newtype BlockNo Source #

The 0-based index of the block in the blockchain. BlockNo is <= SlotNo and is only equal at slot N if there is a block for every slot where N <= SlotNo.

Constructors

BlockNo 

Fields

Instances

Instances details
FromJSON BlockNo 
Instance details

Defined in Cardano.Slotting.Block

ToJSON BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Bounded BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Enum BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Generic BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Associated Types

type Rep BlockNoTypeType Source #

Methods

fromBlockNoRep BlockNo x Source #

toRep BlockNo x → BlockNo Source #

Num BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Show BlockNo 
Instance details

Defined in Cardano.Slotting.Block

FromCBOR BlockNo 
Instance details

Defined in Cardano.Slotting.Block

ToCBOR BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

toCBORBlockNoEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy BlockNoSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [BlockNo] → Size Source #

DecCBOR BlockNo 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR BlockNo 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORBlockNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy BlockNoSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [BlockNo] → Size Source #

NFData BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

rnfBlockNo → () Source #

Eq BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

(==)BlockNoBlockNoBool Source #

(/=)BlockNoBlockNoBool Source #

Ord BlockNo 
Instance details

Defined in Cardano.Slotting.Block

NoThunks BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Serialise BlockNo 
Instance details

Defined in Cardano.Slotting.Block

type Rep BlockNo 
Instance details

Defined in Cardano.Slotting.Block

type Rep BlockNo = D1 ('MetaData "BlockNo" "Cardano.Slotting.Block" "cardano-slotting-0.2.0.0-b7fb83d95ce5b91699e236815d96a1eb9b7b82cb1cc0b9460e0396f68c8089d5" 'True) (C1 ('MetaCons "BlockNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))