cardano-ledger-core-0.1.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe Haskell None
Language Haskell2010

Cardano.Ledger.Slot

Synopsis

Documentation

newtype SlotNo Source #

The 0-based index for the Ourboros time slot.

Constructors

SlotNo

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

Num SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Ord SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Show SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Generic SlotNo
Instance details

Defined in Cardano.Slotting.Slot

NFData SlotNo
Instance details

Defined in Cardano.Slotting.Slot

ToJSON SlotNo
Instance details

Defined in Cardano.Slotting.Slot

FromJSON SlotNo
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR SlotNo
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR 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.1.0.2-j5NuF73p5IFfcfvmth6tS" ' True ) ( C1 (' MetaCons "SlotNo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unSlotNo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

newtype Duration Source #

Constructors

Duration

Instances

Instances details
Enum Duration Source #
Instance details

Defined in Cardano.Ledger.Slot

Eq Duration Source #
Instance details

Defined in Cardano.Ledger.Slot

Integral Duration Source #
Instance details

Defined in Cardano.Ledger.Slot

Num Duration Source #
Instance details

Defined in Cardano.Ledger.Slot

Ord 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

Generic Duration Source #
Instance details

Defined in Cardano.Ledger.Slot

Semigroup Duration Source #
Instance details

Defined in Cardano.Ledger.Slot

Monoid 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-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' True ) ( C1 (' MetaCons "Duration" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unDuration") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

(*-) :: SlotNo -> Duration -> SlotNo Source #

Subtract a duration from a slot

newtype EpochNo Source #

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

Constructors

EpochNo

Instances

Instances details
Enum EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Num EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Show EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochNo
Instance details

Defined in Cardano.Slotting.Slot

NFData EpochNo
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochNo
Instance details

Defined in Cardano.Slotting.Slot

FromJSON EpochNo
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochNo
Instance details

Defined in Cardano.Slotting.Slot

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

newtype EpochSize Source #

Instances

Instances details
Enum EpochSize
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochSize
Instance details

Defined in Cardano.Slotting.Slot

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

Generic EpochSize
Instance details

Defined in Cardano.Slotting.Slot

NFData EpochSize
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochSize
Instance details

Defined in Cardano.Slotting.Slot

FromJSON EpochSize
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochSize
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR 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.1.0.2-j5NuF73p5IFfcfvmth6tS" ' True ) ( C1 (' MetaCons "EpochSize" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unEpochSize") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

data EpochInfo (m :: Type -> Type ) 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.

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

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

Num BlockNo
Instance details

Defined in Cardano.Slotting.Block

Ord BlockNo
Instance details

Defined in Cardano.Slotting.Block

Show BlockNo
Instance details

Defined in Cardano.Slotting.Block

Generic BlockNo
Instance details

Defined in Cardano.Slotting.Block

NFData BlockNo
Instance details

Defined in Cardano.Slotting.Block

ToCBOR BlockNo
Instance details

Defined in Cardano.Slotting.Block

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