shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.Slot

Synopsis

Documentation

newtype SlotNo Source #

The 0-based index for the Ourboros time slot.

Constructors

SlotNo 

Fields

Instances

Instances details
Bounded SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Enum SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Eq SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)SlotNoSlotNoBool #

(/=)SlotNoSlotNoBool #

Num SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(+)SlotNoSlotNoSlotNo #

(-)SlotNoSlotNoSlotNo #

(*)SlotNoSlotNoSlotNo #

negateSlotNoSlotNo #

absSlotNoSlotNo #

signumSlotNoSlotNo #

fromIntegerIntegerSlotNo #

Ord SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compareSlotNoSlotNoOrdering #

(<)SlotNoSlotNoBool #

(<=)SlotNoSlotNoBool #

(>)SlotNoSlotNoBool #

(>=)SlotNoSlotNoBool #

maxSlotNoSlotNoSlotNo #

minSlotNoSlotNoSlotNo #

Show SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrecIntSlotNoShowS #

showSlotNoString #

showList ∷ [SlotNo] → ShowS #

Generic SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep SlotNoTypeType #

Methods

fromSlotNoRep SlotNo x #

toRep SlotNo x → SlotNo #

NFData SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfSlotNo → () #

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 #

FromCBOR SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

noThunks ∷ Context → SlotNoIO (Maybe ThunkInfo)

wNoThunks ∷ Context → SlotNoIO (Maybe ThunkInfo)

showTypeOfProxy SlotNoString

FromJSON SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

parseJSON ∷ Value → Parser SlotNo

parseJSONList ∷ Value → Parser [SlotNo]

ToJSON SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toJSONSlotNo → Value

toEncodingSlotNo → Encoding

toJSONList ∷ [SlotNo] → Value

toEncodingList ∷ [SlotNo] → Encoding

Serialise SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

HasField "ttl" (TxBody era) SlotNo Source # 
Instance details

Defined in Shelley.Spec.Ledger.TxBody

Methods

getFieldTxBody era → SlotNo #

Embed (StakeCreds era) (Map (Credential 'Staking era) SlotNo) Source # 
Instance details

Defined in Shelley.Spec.Ledger.TxBody

HasExp (StakeCreds era) (Map (Credential 'Staking era) SlotNo) Source # 
Instance details

Defined in Shelley.Spec.Ledger.TxBody

Methods

toExpStakeCreds era → Exp (Map (Credential 'Staking era) SlotNo) Source #

type Rep SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

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

newtype Duration Source #

Constructors

Duration 

Fields

Instances

Instances details
Enum Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Eq Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Methods

(==)DurationDurationBool #

(/=)DurationDurationBool #

Integral Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Num Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Ord Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Real Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Methods

toRationalDurationRational #

Show Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Methods

showsPrecIntDurationShowS #

showDurationString #

showList ∷ [Duration] → ShowS #

Generic Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Associated Types

type Rep DurationTypeType #

Methods

fromDurationRep Duration x #

toRep Duration x → Duration #

Semigroup Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Monoid Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

NoThunks Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

Methods

noThunks ∷ Context → DurationIO (Maybe ThunkInfo)

wNoThunks ∷ Context → DurationIO (Maybe ThunkInfo)

showTypeOfProxy DurationString

type Rep Duration Source # 
Instance details

Defined in Shelley.Spec.Ledger.Slot

type Rep Duration = D1 ('MetaData "Duration" "Shelley.Spec.Ledger.Slot" "shelley-spec-ledger-0.1.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
Enum EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)EpochNoEpochNoBool #

(/=)EpochNoEpochNoBool #

Num EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compareEpochNoEpochNoOrdering #

(<)EpochNoEpochNoBool #

(<=)EpochNoEpochNoBool #

(>)EpochNoEpochNoBool #

(>=)EpochNoEpochNoBool #

maxEpochNoEpochNoEpochNo #

minEpochNoEpochNoEpochNo #

Show EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrecIntEpochNoShowS #

showEpochNoString #

showList ∷ [EpochNo] → ShowS #

Generic EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochNoTypeType #

Methods

fromEpochNoRep EpochNo x #

toRep EpochNo x → EpochNo #

NFData EpochNo Source # 
Instance details

Defined in Shelley.Spec.Ledger.Orphans

Methods

rnfEpochNo → () #

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 #

FromCBOR EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

noThunks ∷ Context → EpochNoIO (Maybe ThunkInfo)

wNoThunks ∷ Context → EpochNoIO (Maybe ThunkInfo)

showTypeOfProxy EpochNoString

FromJSON EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

parseJSON ∷ Value → Parser EpochNo

parseJSONList ∷ Value → Parser [EpochNo]

ToJSON EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toJSONEpochNo → Value

toEncodingEpochNo → Encoding

toJSONList ∷ [EpochNo] → Value

toEncodingList ∷ [EpochNo] → Encoding

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.1.0.0-inplace" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

newtype EpochSize Source #

Constructors

EpochSize 

Fields

Instances

Instances details
Enum EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)EpochSizeEpochSizeBool #

(/=)EpochSizeEpochSizeBool #

Integral EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Num EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Real EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Show EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrecIntEpochSizeShowS #

showEpochSizeString #

showList ∷ [EpochSize] → ShowS #

Generic EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochSizeTypeType #

Methods

fromEpochSizeRep EpochSize x #

toRep EpochSize x → EpochSize #

NoThunks EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

noThunks ∷ Context → EpochSizeIO (Maybe ThunkInfo)

wNoThunks ∷ Context → EpochSizeIO (Maybe ThunkInfo)

showTypeOfProxy EpochSizeString

FromJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

parseJSON ∷ Value → Parser EpochSize

parseJSONList ∷ Value → Parser [EpochSize]

ToJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toJSONEpochSize → Value

toEncodingEpochSize → Encoding

toJSONList ∷ [EpochSize] → Value

toEncodingList ∷ [EpochSize] → Encoding

type Rep EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

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

data EpochInfo (m ∷ TypeType) Source #

Information about epochs

Epochs may have different sizes at different times during the lifetime of the blockchain. 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, and hence requires access to state.

The other functions provide some derived information from epoch sizes. In the default implementation all of these functions query and update an internal cache maintaining cumulative epoch sizes; for that reason, all of these functions live in a monad m.

Instances

Instances details
Show (EpochInfo Identity)

Show instance only for non-stateful instances

Instance details

Defined in Cardano.Slotting.EpochInfo.API

NoThunks (EpochInfo m) 
Instance details

Defined in Cardano.Slotting.EpochInfo.API

Methods

noThunks ∷ Context → EpochInfo m → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → EpochInfo m → IO (Maybe ThunkInfo)

showTypeOfProxy (EpochInfo m) → String

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
Bounded BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Enum BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Eq BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

(==)BlockNoBlockNoBool #

(/=)BlockNoBlockNoBool #

Num BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Ord BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

compareBlockNoBlockNoOrdering #

(<)BlockNoBlockNoBool #

(<=)BlockNoBlockNoBool #

(>)BlockNoBlockNoBool #

(>=)BlockNoBlockNoBool #

maxBlockNoBlockNoBlockNo #

minBlockNoBlockNoBlockNo #

Show BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

showsPrecIntBlockNoShowS #

showBlockNoString #

showList ∷ [BlockNo] → ShowS #

Generic BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Associated Types

type Rep BlockNoTypeType #

Methods

fromBlockNoRep BlockNo x #

toRep BlockNo x → BlockNo #

NFData BlockNo Source # 
Instance details

Defined in Shelley.Spec.Ledger.Orphans

Methods

rnfBlockNo → () #

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 #

FromCBOR BlockNo 
Instance details

Defined in Cardano.Slotting.Block

NoThunks BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

noThunks ∷ Context → BlockNoIO (Maybe ThunkInfo)

wNoThunks ∷ Context → BlockNoIO (Maybe ThunkInfo)

showTypeOfProxy BlockNoString

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.1.0.0-inplace" 'True) (C1 ('MetaCons "BlockNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))