ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Block.Abstract

Synopsis

Protocol

type family BlockProtocol blk :: Type Source #

Map block to consensus protocol

Instances

Instances details
type BlockProtocol (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type BlockProtocol (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type BlockProtocol (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Configuration

data family BlockConfig blk :: Type Source #

Static configuration required to work with this type of blocks

Instances

Instances details
Isomorphic BlockConfig Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

NoThunks (BlockConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

newtype BlockConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data BlockConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data family CodecConfig blk :: Type Source #

Static configuration required for serialisation and deserialisation of types pertaining to this type of block.

Data family instead of type family to get better type inference.

Instances

Instances details
Isomorphic CodecConfig Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

Generic (CodecConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type Rep (CodecConfig (DualBlock m a)) :: Type -> Type #

Methods

from :: CodecConfig (DualBlock m a) -> Rep (CodecConfig (DualBlock m a)) x #

to :: Rep (CodecConfig (DualBlock m a)) x -> CodecConfig (DualBlock m a) #

(NoThunks (CodecConfig m), NoThunks (CodecConfig a)) => NoThunks (CodecConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type Rep (CodecConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (CodecConfig (DualBlock m a)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "DualCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualCodecConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig m)) :*: S1 ('MetaSel ('Just "dualCodecConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig a))))
newtype CodecConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data CodecConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data family StorageConfig blk :: Type Source #

Config needed for the NodeInitStorage class. Defined here to avoid circular dependencies.

Instances

Instances details
Isomorphic StorageConfig Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

Generic (StorageConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type Rep (StorageConfig (DualBlock m a)) :: Type -> Type #

(NoThunks (StorageConfig m), NoThunks (StorageConfig a)) => NoThunks (StorageConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type Rep (StorageConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (StorageConfig (DualBlock m a)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "DualStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualStorageConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig m)) :*: S1 ('MetaSel ('Just "dualStorageConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig a))))
newtype StorageConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data StorageConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Previous hash

class (HasHeader blk, GetHeader blk) => GetPrevHash blk where Source #

Methods

headerPrevHash :: Header blk -> ChainHash blk Source #

Get the hash of the predecessor of this block

Instances

Instances details
CanHardFork xs => GetPrevHash (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Bridge m a => GetPrevHash (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Working with headers

data family Header blk :: Type Source #

Instances

Instances details
Isomorphic Header Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

Methods

project :: NoHardForks blk => Header (HardForkBlock '[blk]) -> Header blk Source #

inject :: NoHardForks blk => Header blk -> Header (HardForkBlock '[blk]) Source #

HasHeader (Header blk) => Measured BlockMeasure (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Typeable xs => ShowProxy (Header (HardForkBlock xs) :: Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

CanHardFork xs => HasNestedContent Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

SerialiseHFC xs => ReconstructNestedCtxt Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

(Typeable m, Typeable a) => ShowProxy (DualHeader m a :: Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

HasNestedContent Header m => HasNestedContent Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

ReconstructNestedCtxt Header m => ReconstructNestedCtxt Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

All (Compose Eq Header) xs => Eq (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

CanHardFork xs => Show (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

NoThunks (Header (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

CanHardFork xs => HasHeader (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

HasHeader blk => StandardHash (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

All CondenseConstraints xs => Condense (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Condense

SerialiseHFC xs => DecodeDiskDep (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

SerialiseHFC xs => DecodeDiskDepIx (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

SerialiseHFC xs => EncodeDiskDep (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

SerialiseHFC xs => EncodeDiskDepIx (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

SerialiseHFC xs => SerialiseNodeToNode (HardForkBlock xs) (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToNode

EncodeDiskDep (NestedCtxt Header) m => EncodeDiskDep (NestedCtxt Header) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

EncodeDiskDepIx (NestedCtxt Header) m => EncodeDiskDepIx (NestedCtxt Header) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Show (Header m) => Show (DualHeader m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec :: Int -> DualHeader m a -> ShowS #

show :: DualHeader m a -> String #

showList :: [DualHeader m a] -> ShowS #

Bridge m a => HasHeader (DualHeader m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => SameDepIndex (NestedCtxt_ (HardForkBlock xs) Header) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

All SingleEraBlock xs => Show (NestedCtxt_ (HardForkBlock xs) Header a) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

type HeaderHash (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk) = HeaderHash blk
newtype Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

type BlockProtocol (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

newtype Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

class HasHeader (Header blk) => GetHeader blk where Source #

Methods

getHeader :: blk -> Header blk Source #

blockMatchesHeader :: Header blk -> blk -> Bool Source #

Check whether the header is the header of the block.

For example, by checking whether the hash of the body stored in the header matches that of the block.

headerIsEBB :: Header blk -> Maybe EpochNo Source #

When the given header is the header of an Epoch Boundary Block, returns its epoch number.

getBlockHeaderFields :: GetHeader blk => blk -> HeaderFields blk Source #

Get the HeaderFields of a block, without requiring 'HasHeader blk'

This is primarily useful as a a simple definition of HasHeader for block types:

instance HasHeader SomeBlock where
  getHeaderFields = getBlockHeaderFields

provided that there is a HasHeader instance for the header.

Unfortunately we cannot give a HasHeader instance once and for all; if we mapped from a header to a block instead we could do

instance HasHeader hdr => HasHeader (Block hdr) where
 ..

but we can't do that when we do things this way around.

Raw hash

class ConvertRawHash blk where Source #

Convert a hash from/to raw bytes

Variants of toRawHash and fromRawHash for ShortByteString are included. Override the default implementations to avoid an extra step in case the HeaderHash is a ShortByteString under the hood.

Minimal complete definition

hashSize, (toRawHash | toShortRawHash), (fromRawHash | fromShortRawHash)

Methods

toRawHash :: proxy blk -> HeaderHash blk -> ByteString Source #

Get the raw bytes from a hash

fromRawHash :: proxy blk -> ByteString -> HeaderHash blk Source #

Construct the hash from a raw hash

PRECONDITION: the bytestring's size must match hashSize

toShortRawHash :: proxy blk -> HeaderHash blk -> ShortByteString Source #

Variant of toRawHash for ShortByteString

fromShortRawHash :: proxy blk -> ShortByteString -> HeaderHash blk Source #

hashSize :: proxy blk -> Word32 Source #

The size of the hash in number of bytes

encodeRawHash :: ConvertRawHash blk => proxy blk -> HeaderHash blk -> Encoding Source #

decodeRawHash :: ConvertRawHash blk => proxy blk -> forall s. Decoder s (HeaderHash blk) Source #

Utilities for working with WithOrigin

succWithOrigin :: (Bounded t, Enum t) => WithOrigin t -> t Source #

Return the successor of a WithOrigin value. Useful in combination with SlotNo and BlockNo.

Re-export basic definitions from ouroboros-network

blockNo :: HasHeader b => b -> BlockNo #

blockPoint :: HasHeader block => block -> Point block #

data ChainHash b #

Constructors

GenesisHash 
BlockHash !(HeaderHash b) 

Instances

Instances details
Isomorphic ChainHash Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

StandardHash block => Eq (ChainHash block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

(==) :: ChainHash block -> ChainHash block -> Bool #

(/=) :: ChainHash block -> ChainHash block -> Bool #

StandardHash block => Ord (ChainHash block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

compare :: ChainHash block -> ChainHash block -> Ordering #

(<) :: ChainHash block -> ChainHash block -> Bool #

(<=) :: ChainHash block -> ChainHash block -> Bool #

(>) :: ChainHash block -> ChainHash block -> Bool #

(>=) :: ChainHash block -> ChainHash block -> Bool #

max :: ChainHash block -> ChainHash block -> ChainHash block #

min :: ChainHash block -> ChainHash block -> ChainHash block #

StandardHash block => Show (ChainHash block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

showsPrec :: Int -> ChainHash block -> ShowS #

show :: ChainHash block -> String #

showList :: [ChainHash block] -> ShowS #

Generic (ChainHash b) 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (ChainHash b) :: Type -> Type #

Methods

from :: ChainHash b -> Rep (ChainHash b) x #

to :: Rep (ChainHash b) x -> ChainHash b #

(StandardHash block, Typeable block) => NoThunks (ChainHash block) 
Instance details

Defined in Ouroboros.Network.Block

Serialise (HeaderHash b) => Serialise (ChainHash b) 
Instance details

Defined in Ouroboros.Network.Block

Condense (HeaderHash b) => Condense (ChainHash b) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

type Rep (ChainHash b) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (ChainHash b) = D1 ('MetaData "ChainHash" "Ouroboros.Network.Block" "ouroboros-network-0.1.0.0-DgIBwCUrGXaLitNwqCfIcM" 'False) (C1 ('MetaCons "GenesisHash" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlockHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HeaderHash b))))

data HeaderFields b #

Instances

Instances details
(StandardHash b, Typeable b) => Measured BlockMeasure (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash b => Eq (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash b => Ord (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash b => Show (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

Generic (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (HeaderFields b) :: Type -> Type #

Methods

from :: HeaderFields b -> Rep (HeaderFields b) x #

to :: Rep (HeaderFields b) x -> HeaderFields b #

Serialise (HeaderHash b) => Serialise (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

(StandardHash b, Typeable b) => HasHeader (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash b => StandardHash (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (HeaderFields b) = D1 ('MetaData "HeaderFields" "Ouroboros.Network.Block" "ouroboros-network-0.1.0.0-DgIBwCUrGXaLitNwqCfIcM" 'False) (C1 ('MetaCons "HeaderFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "headerFieldSlot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Just "headerFieldBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo) :*: S1 ('MetaSel ('Just "headerFieldHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HeaderHash b)))))
type HeaderHash (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

type family HeaderHash b #

Instances

Instances details
type HeaderHash (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

type HeaderHash (Serialised block) 
Instance details

Defined in Ouroboros.Network.Block

type HeaderHash (Serialised block) = HeaderHash block
type HeaderHash (Ticked l) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk) = HeaderHash blk
type HeaderHash (LedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type HeaderHash (SerialisedHeader blk) Source #

Only needed for the ChainSyncServer

Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

type HeaderHash (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type HeaderHash (LedgerDB l r) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

type HeaderHash (WithPoint blk b) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

type HeaderHash (WithPoint blk b) = HeaderHash blk
type HeaderHash (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Point block where #

Bundled Patterns

pattern GenesisPoint :: Point block 
pattern BlockPoint :: SlotNo -> HeaderHash block -> Point block 

Instances

Instances details
StandardHash block => Eq (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

(==) :: Point block -> Point block -> Bool #

(/=) :: Point block -> Point block -> Bool #

StandardHash block => Ord (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

compare :: Point block -> Point block -> Ordering #

(<) :: Point block -> Point block -> Bool #

(<=) :: Point block -> Point block -> Bool #

(>) :: Point block -> Point block -> Bool #

(>=) :: Point block -> Point block -> Bool #

max :: Point block -> Point block -> Point block #

min :: Point block -> Point block -> Point block #

StandardHash block => Show (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

showsPrec :: Int -> Point block -> ShowS #

show :: Point block -> String #

showList :: [Point block] -> ShowS #

Generic (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (Point block) :: Type -> Type #

Methods

from :: Point block -> Rep (Point block) x #

to :: Rep (Point block) x -> Point block #

StandardHash block => NoThunks (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Serialise (HeaderHash block) => Serialise (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

encode :: Point block -> Encoding Source #

decode :: Decoder s (Point block) Source #

encodeList :: [Point block] -> Encoding Source #

decodeList :: Decoder s [Point block] Source #

Condense (HeaderHash block) => Condense (Point block) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

Methods

condense :: Point block -> String Source #

ShowProxy block => ShowProxy (Point block :: Type) 
Instance details

Defined in Ouroboros.Network.Block

Methods

showProxy :: Proxy (Point block) -> String Source #

type Rep (Point block) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (Point block) = D1 ('MetaData "Point" "Ouroboros.Network.Block" "ouroboros-network-0.1.0.0-DgIBwCUrGXaLitNwqCfIcM" 'True) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WithOrigin (Block SlotNo (HeaderHash block))))))

pointHash :: Point block -> ChainHash block #

class (Eq (HeaderHash b), Ord (HeaderHash b), Show (HeaderHash b), Typeable (HeaderHash b), NoThunks (HeaderHash b)) => StandardHash b #

Instances

Instances details
StandardHash b => StandardHash (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash block => StandardHash (Serialised block) 
Instance details

Defined in Ouroboros.Network.Block

HasHeader blk => StandardHash (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

StandardHash blk => StandardHash (SerialisedHeader blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

StandardHash blk => StandardHash (WithPoint blk b) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

StandardHash m => StandardHash (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Re-export basic definitions from cardano-base

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

(==) :: BlockNo -> BlockNo -> Bool #

(/=) :: BlockNo -> BlockNo -> Bool #

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

Associated Types

type Rep BlockNo :: Type -> Type #

Methods

from :: BlockNo -> Rep BlockNo x #

to :: Rep BlockNo x -> BlockNo #

ToCBOR BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

toCBOR :: BlockNo -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy BlockNo -> Size Source #

encodedListSizeExpr :: (forall 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

Serialise BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Condense BlockNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

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

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

(==) :: EpochNo -> EpochNo -> Bool #

(/=) :: EpochNo -> EpochNo -> Bool #

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

Associated Types

type Rep EpochNo :: Type -> Type #

Methods

from :: EpochNo -> Rep EpochNo x #

to :: Rep EpochNo x -> EpochNo #

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

Methods

toCBOR :: EpochNo -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy EpochNo -> Size Source #

encodedListSizeExpr :: (forall 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

Serialise EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Condense EpochNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

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-H21nBdelt3gCHGeqsQWafy" '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

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

Associated Types

type Rep EpochSize :: Type -> Type #

ToJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

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

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

(==) :: SlotNo -> SlotNo -> Bool #

(/=) :: SlotNo -> SlotNo -> Bool #

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

Associated Types

type Rep SlotNo :: Type -> Type #

Methods

from :: SlotNo -> Rep SlotNo x #

to :: Rep SlotNo x -> SlotNo #

NFData SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf :: SlotNo -> () #

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

Methods

toCBOR :: SlotNo -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy SlotNo -> Size Source #

encodedListSizeExpr :: (forall 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

Serialise SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Condense SlotNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

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

withOrigin :: b -> (t -> b) -> WithOrigin t -> b Source #

data WithOrigin t Source #

Constructors

Origin 

Bundled Patterns

pattern NotOrigin :: t -> WithOrigin t

Custom pattern for WithOrigin

This avoids clashing with our (extensive) use of At for testing.

Instances

Instances details
Functor WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fmap :: (a -> b) -> WithOrigin a -> WithOrigin b #

(<$) :: a -> WithOrigin b -> WithOrigin a #

Foldable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fold :: Monoid m => WithOrigin m -> m #

foldMap :: Monoid m => (a -> m) -> WithOrigin a -> m #

foldMap' :: Monoid m => (a -> m) -> WithOrigin a -> m #

foldr :: (a -> b -> b) -> b -> WithOrigin a -> b #

foldr' :: (a -> b -> b) -> b -> WithOrigin a -> b #

foldl :: (b -> a -> b) -> b -> WithOrigin a -> b #

foldl' :: (b -> a -> b) -> b -> WithOrigin a -> b #

foldr1 :: (a -> a -> a) -> WithOrigin a -> a #

foldl1 :: (a -> a -> a) -> WithOrigin a -> a #

toList :: WithOrigin a -> [a] #

null :: WithOrigin a -> Bool #

length :: WithOrigin a -> Int #

elem :: Eq a => a -> WithOrigin a -> Bool #

maximum :: Ord a => WithOrigin a -> a #

minimum :: Ord a => WithOrigin a -> a #

sum :: Num a => WithOrigin a -> a #

product :: Num a => WithOrigin a -> a #

Traversable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

traverse :: Applicative f => (a -> f b) -> WithOrigin a -> f (WithOrigin b) #

sequenceA :: Applicative f => WithOrigin (f a) -> f (WithOrigin a) #

mapM :: Monad m => (a -> m b) -> WithOrigin a -> m (WithOrigin b) #

sequence :: Monad m => WithOrigin (m a) -> m (WithOrigin a) #

Eq t => Eq (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) :: WithOrigin t -> WithOrigin t -> Bool #

(/=) :: WithOrigin t -> WithOrigin t -> Bool #

Ord t => Ord (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Show t => Show (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Generic (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep (WithOrigin t) :: Type -> Type #

Methods

from :: WithOrigin t -> Rep (WithOrigin t) x #

to :: Rep (WithOrigin t) x -> WithOrigin t #

(Serialise t, Typeable t) => ToCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR :: WithOrigin t -> Encoding Source #

encodedSizeExpr :: (forall t0. ToCBOR t0 => Proxy t0 -> Size) -> Proxy (WithOrigin t) -> Size Source #

encodedListSizeExpr :: (forall t0. ToCBOR t0 => Proxy t0 -> Size) -> Proxy [WithOrigin t] -> Size Source #

(Serialise t, Typeable t) => FromCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks t => NoThunks (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Serialise t => Serialise (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Condense a => Condense (WithOrigin a) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

type Rep (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

type Rep (WithOrigin t) = D1 ('MetaData "WithOrigin" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-H21nBdelt3gCHGeqsQWafy" 'False) (C1 ('MetaCons "Origin" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "At" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 t)))