ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Block.Abstract

Synopsis

Protocol

type family BlockProtocol blk 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 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.Embed.Unary

CanHardFork xs ⇒ NoThunks (BlockConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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

Defined in Ouroboros.Consensus.Ledger.Dual

newtype BlockConfig (DisableDiffusionPipelining blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype BlockConfig (SelectViewDiffusionPipelining blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

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 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.Embed.Unary

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

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

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

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (CodecConfig (DualBlock m a)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-4.0.0.0-inplace" '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))))

Methods

from ∷ CodecConfig (DualBlock m a) → Rep (CodecConfig (DualBlock m a)) x #

to ∷ Rep (CodecConfig (DualBlock m a)) x → CodecConfig (DualBlock m a) #

CanHardFork xs ⇒ NoThunks (CodecConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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

Defined in Ouroboros.Consensus.Ledger.Dual

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-4.0.0.0-inplace" '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 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.Embed.Unary

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

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

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

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (StorageConfig (DualBlock m a)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-4.0.0.0-inplace" '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))))
CanHardFork xs ⇒ NoThunks (StorageConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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

Defined in Ouroboros.Consensus.Ledger.Dual

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-4.0.0.0-inplace" '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

blockPrevHash ∷ GetPrevHash blk ⇒ blk → ChainHash blk Source #

Working with headers

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.

class GetHeader1 (t ∷ Type → Type) where Source #

Methods

getHeader1 ∷ t blk → Header blk Source #

Instances

Instances details
GetHeader1 Header Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Methods

getHeader1 ∷ Header blk → Header blk Source #

GetHeader1 HeaderWithTime Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

Methods

getHeader1 ∷ HeaderWithTime blk → Header blk Source #

data family Header blk Source #

Instances

Instances details
GetHeader1 Header Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Methods

getHeader1 ∷ Header blk → Header blk Source #

Inject Header Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → Header x → Header (HardForkBlock xs) Source #

Isomorphic Header Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Methods

project ∷ NoHardForks blk ⇒ Header (HardForkBlock '[blk]) → Header blk Source #

inject ∷ NoHardForks blk ⇒ Header blk → Header (HardForkBlock '[blk]) Source #

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

StandardHash blk ⇒ StandardHash (Header blk ∷ Type) 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

Methods

showProxy ∷ Proxy (Header (HardForkBlock xs)) → String #

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

CanHardFork xs ⇒ SameDepIndex (NestedCtxt_ (HardForkBlock xs) Header ∷ Type → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

(Typeable m, Typeable a) ⇒ ShowProxy (DualHeader m a ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showProxy ∷ Proxy (DualHeader m a) → String #

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Methods

(==) ∷ Header (HardForkBlock xs) → Header (HardForkBlock xs) → Bool #

(/=) ∷ Header (HardForkBlock xs) → Header (HardForkBlock xs) → Bool #

CanHardFork xs ⇒ Show (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

CanHardFork xs ⇒ NoThunks (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

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Condense

CanHardFork xs ⇒ HasHeader (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

SerialiseHFC xs ⇒ SerialiseNodeToNode (HardForkBlock xs) (Header (HardForkBlock xs)) Source # 
Instance details

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

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

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

encodeDiskDep ∷ CodecConfig (DualBlock m a) → NestedCtxt Header (DualBlock m a) a0 → a0 → Encoding Source #

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

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

type HeaderHash (Header blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk ∷ Type) = HeaderHash blk
type BlockProtocol (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

newtype Header (DisableDiffusionPipelining blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype Header (SelectViewDiffusionPipelining blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

newtype Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

blockToIsEBB ∷ GetHeader blk ⇒ blk → IsEBB Source #

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.

headerHash ∷ HasHeader (Header blk) ⇒ Header blk → HeaderHash blk Source #

headerPoint ∷ HasHeader (Header blk) ⇒ Header blk → Point blk Source #

Raw hash

class KnownNat (HashSize blk) ⇒ 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.

The associated type HashSize is the size of the hash in bytes, expressed at the type level. The hashSize method returns the same value at the term level.

The hash size is enforced by default: fromRawHash and fromShortRawHash return Nothing when the input does not have the announced hashSize. One can opt out of this check through the unsafeFromRawHash and unsafeFromShortRawHash variants, which must only be used at call sites where there is no easy way to handle failure and the size is known to be correct.

Associated Types

type HashSize blk ∷ Nat Source #

The size of the hash in number of bytes, at the type level.

See hashSize for the term-level counterpart.

Methods

toRawHash ∷ proxy blk → HeaderHash blk → ByteString Source #

Get the raw bytes from a hash

toShortRawHash ∷ proxy blk → HeaderHash blk → ShortByteString Source #

Variant of toRawHash for ShortByteString

fromRawHash ∷ proxy blk → ByteString → Maybe (HeaderHash blk) Source #

Construct the hash from a raw hash, enforcing that the input has the announced hashSize.

Returns Nothing on a size mismatch.

fromShortRawHash ∷ proxy blk → ShortByteString → Maybe (HeaderHash blk) Source #

Construct the hash from a raw hash, enforcing that the input has the announced hashSize.

Returns Nothing on a size mismatch.

unsafeFromRawHash ∷ proxy blk → ByteString → HeaderHash blk Source #

Construct the hash from a raw hash without enforcing the size.

PRECONDITION: the input's size must match hashSize.

unsafeFromShortRawHash ∷ proxy blk → ShortByteString → HeaderHash blk Source #

Construct the hash from a raw hash without enforcing the size.

PRECONDITION: the input's size must match hashSize.

hashSize ∷ proxy blk → Word32 Source #

The size of the hash in number of bytes

Instances

Instances details
CanHardFork xs ⇒ ConvertRawHash (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Associated Types

type HashSize (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

ConvertRawHash m ⇒ ConvertRawHash (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type HashSize (DualBlock m a) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type HashSize (DualBlock m a) = HashSize m

decodeRawHash ∷ ConvertRawHash blk ⇒ proxy blk → ∀ s. Decoder s (HeaderHash blk) Source #

encodeRawHash ∷ ConvertRawHash blk ⇒ proxy blk → HeaderHash blk → Encoding 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.

Ouroboros Genesis window

newtype GenesisWindow Source #

Size of the Genesis window, in number of slots.

This is the number of slots that the GDD Governor (Genesis Density Disconnection Governor -- see Governor) will consider when deciding whether to disconnect from a peer. It has to be smaller or equal to the stability window. For instance, for Shelley-based eras, this will be equal to a stability window, that is 3k/f.

Constructors

GenesisWindow 

Instances

Instances details
Eq GenesisWindow Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Ord GenesisWindow Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Num GenesisWindow Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Show GenesisWindow Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

NoThunks GenesisWindow Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Re-export basic definitions from ouroboros-network

data ChainHash (b ∷ k) #

Constructors

GenesisHash 
BlockHash !(HeaderHash b) 

Instances

Instances details
Isomorphic (ChainHash ∷ Type → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Methods

project ∷ NoHardForks blk ⇒ ChainHash (HardForkBlock '[blk]) → ChainHash blk Source #

inject ∷ NoHardForks blk ⇒ ChainHash blk → ChainHash (HardForkBlock '[blk]) Source #

StandardHash block ⇒ NFData (ChainHash block) # 
Instance details

Defined in Ouroboros.Network.Block

Methods

rnf ∷ ChainHash block → () #

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 #

Generic (ChainHash b) # 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (ChainHash b) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (ChainHash b) = D1 ('MetaData "ChainHash" "Ouroboros.Network.Block" "ouroboros-network-1.2.0.0-l-api-af495335aa766cc933ee95df4ec7fdea2dd796e1efa726c7d4b40b7590fdf5d9" '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))))

Methods

from ∷ ChainHash b → Rep (ChainHash b) x #

to ∷ Rep (ChainHash b) x → ChainHash b #

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 #

(StandardHash block, Typeable block) ⇒ NoThunks (ChainHash block) # 
Instance details

Defined in Ouroboros.Network.Block

Condense (HeaderHash b) ⇒ Condense (ChainHash b) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense ∷ ChainHash b → String Source #

Serialise (HeaderHash b) ⇒ Serialise (ChainHash b) # 
Instance details

Defined in Ouroboros.Network.Block

type Rep (ChainHash b) # 
Instance details

Defined in Ouroboros.Network.Block

type Rep (ChainHash b) = D1 ('MetaData "ChainHash" "Ouroboros.Network.Block" "ouroboros-network-1.2.0.0-l-api-af495335aa766cc933ee95df4ec7fdea2dd796e1efa726c7d4b40b7590fdf5d9" '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))))

class (StandardHash b, Typeable b) ⇒ HasHeader b where #

Methods

getHeaderFields ∷ b → HeaderFields b #

Instances

Instances details
HasHeader Block # 
Instance details

Defined in Ouroboros.Network.Mock.ConcreteBlock

Methods

getHeaderFields ∷ Block → HeaderFields Block #

HasHeader BlockHeader # 
Instance details

Defined in Ouroboros.Network.Mock.ConcreteBlock

Methods

getHeaderFields ∷ BlockHeader → HeaderFields BlockHeader #

CanHardFork xs ⇒ HasHeader (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

CanHardFork xs ⇒ HasHeader (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

(HasHeader (Header blk), StandardHash (HeaderWithTime blk), Typeable blk) ⇒ HasHeader (HeaderWithTime blk) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

Bridge m a ⇒ HasHeader (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Bridge m a ⇒ HasHeader (DualHeader m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

(StandardHash b, Typeable b, Typeable k) ⇒ HasHeader (HeaderFields b) # 
Instance details

Defined in Ouroboros.Network.Block

data HeaderFields (b ∷ k) #

Instances

Instances details
StandardHash b ⇒ StandardHash (HeaderFields b ∷ Type) # 
Instance details

Defined in Ouroboros.Network.Block

StandardHash b ⇒ Eq (HeaderFields b) # 
Instance details

Defined in Ouroboros.Network.Block

Methods

(==) ∷ HeaderFields b → HeaderFields b → Bool #

(/=) ∷ HeaderFields b → HeaderFields b → Bool #

StandardHash b ⇒ Ord (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) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (HeaderFields b) = D1 ('MetaData "HeaderFields" "Ouroboros.Network.Block" "ouroboros-network-1.2.0.0-l-api-af495335aa766cc933ee95df4ec7fdea2dd796e1efa726c7d4b40b7590fdf5d9" '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)))))

Methods

from ∷ HeaderFields b → Rep (HeaderFields b) x #

to ∷ Rep (HeaderFields b) x → HeaderFields b #

StandardHash b ⇒ Show (HeaderFields b) # 
Instance details

Defined in Ouroboros.Network.Block

Methods

showsPrec ∷ Int → HeaderFields b → ShowS #

show ∷ HeaderFields b → String #

showList ∷ [HeaderFields b] → ShowS #

(StandardHash b, Typeable b, Typeable k) ⇒ HasHeader (HeaderFields b) # 
Instance details

Defined in Ouroboros.Network.Block

Serialise (HeaderHash b) ⇒ Serialise (HeaderFields b) # 
Instance details

Defined in Ouroboros.Network.Block

type HeaderHash (HeaderFields b ∷ Type) # 
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-1.2.0.0-l-api-af495335aa766cc933ee95df4ec7fdea2dd796e1efa726c7d4b40b7590fdf5d9" '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 family HeaderHash (b ∷ k) #

Instances

Instances details
type HeaderHash RawBlockHash # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

type HeaderHash RawBlockHash = RawBlockHash
type HeaderHash Block # 
Instance details

Defined in Ouroboros.Network.Mock.ConcreteBlock

type HeaderHash Block = ConcreteHeaderHash
type HeaderHash BlockHeader # 
Instance details

Defined in Ouroboros.Network.Mock.ConcreteBlock

type HeaderHash BlockHeader = ConcreteHeaderHash
type HeaderHash (Header blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type HeaderHash (HeaderWithTime blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

type HeaderHash (SerialisedHeader blk ∷ Type) Source #

Only needed for the ChainSyncServer

Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

type HeaderHash (DualBlock m a ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.Storage.ChainDB.API

type HeaderHash (WithPoint blk b ∷ Type) = HeaderHash blk
type HeaderHash (HeaderFields b ∷ Type) # 
Instance details

Defined in Ouroboros.Network.Block

type HeaderHash (Serialised block ∷ Type) # 
Instance details

Defined in Ouroboros.Network.Block

type HeaderHash (Serialised block ∷ Type) = HeaderHash block
type HeaderHash (LedgerDB m l blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.API

type HeaderHash (LedgerDB m l blk ∷ Type) = HeaderHash blk
type HeaderHash (Forker m l blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.Forker

type HeaderHash (Forker m l blk ∷ Type) = HeaderHash (l blk)
type HeaderHash (Ticked l blk ∷ k2) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l blk ∷ k2) = HeaderHash (l blk)
type HeaderHash (LedgerState blk ∷ MapKind → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (LedgerState blk ∷ MapKind → Type) = HeaderHash blk
type HeaderHash (ExtLedgerState blk ∷ MapKind → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type HeaderHash (ReadOnlyForker m l ∷ Type → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.Forker

data Point (block ∷ k) where #

Bundled Patterns

pattern GenesisPoint ∷ Point block 
pattern BlockPoint ∷ SlotNo → HeaderHash block → Point block 

Instances

Instances details
ConvertRawHash blk ⇒ SerialiseNodeToNode blk (Point blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Node.Serialisation

ShowProxy block ⇒ ShowProxy (Point block ∷ Type) # 
Instance details

Defined in Ouroboros.Network.Block

Methods

showProxy ∷ Proxy (Point block) → String #

FromJSON (Block SlotNo (HeaderHash block)) ⇒ FromJSON (Point block) # 
Instance details

Defined in Ouroboros.Network.Block

Methods

parseJSON ∷ Value → Parser (Point block) Source #

parseJSONList ∷ Value → Parser [Point block] Source #

omittedField ∷ Maybe (Point block) Source #

ToJSON (Block SlotNo (HeaderHash block)) ⇒ ToJSON (Point block) # 
Instance details

Defined in Ouroboros.Network.Block

Methods

toJSON ∷ Point block → Value Source #

toEncoding ∷ Point block → Encoding Source #

toJSONList ∷ [Point block] → Value Source #

toEncodingList ∷ [Point block] → Encoding Source #

omitField ∷ Point block → Bool Source #

StandardHash block ⇒ NFData (Point block) # 
Instance details

Defined in Ouroboros.Network.Block

Methods

rnf ∷ Point block → () #

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 #

Generic (Point block) # 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (Point block) 
Instance details

Defined in Ouroboros.Network.Block

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

Methods

from ∷ Point block → Rep (Point block) x #

to ∷ Rep (Point block) x → 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 #

StandardHash block ⇒ NoThunks (Point block) # 
Instance details

Defined in Ouroboros.Network.Block

Methods

noThunks ∷ Context → Point block → IO (Maybe ThunkInfo) Source #

wNoThunks ∷ Context → Point block → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy (Point block) → String Source #

Condense (HeaderHash block) ⇒ Condense (Point block) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense ∷ Point block → String Source #

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 #

BoostedBlockCompatibleWithPoint (Point blk) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Types

type Rep (Point block) # 
Instance details

Defined in Ouroboros.Network.Block

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

class (Eq (HeaderHash b), Ord (HeaderHash b), Show (HeaderHash b), Typeable (HeaderHash b), NoThunks (HeaderHash b), NFData (HeaderHash b)) ⇒ StandardHash (b ∷ k) #

Instances

Instances details
StandardHash RawBlockHash # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

StandardHash Block # 
Instance details

Defined in Ouroboros.Network.Mock.ConcreteBlock

StandardHash BlockHeader # 
Instance details

Defined in Ouroboros.Network.Mock.ConcreteBlock

StandardHash blk ⇒ StandardHash (Header blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

CanHardFork xs ⇒ StandardHash (HardForkBlock xs ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

(Show (HeaderHash blk), Eq (HeaderHash blk), Ord (HeaderHash blk), Typeable (HeaderHash blk), NoThunks (HeaderHash blk), NFData (HeaderHash blk)) ⇒ StandardHash (HeaderWithTime blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

StandardHash blk ⇒ StandardHash (SerialisedHeader blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

StandardHash m ⇒ StandardHash (DualBlock m a ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

StandardHash blk ⇒ StandardHash (WithPoint blk b ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

StandardHash b ⇒ StandardHash (HeaderFields b ∷ Type) # 
Instance details

Defined in Ouroboros.Network.Block

StandardHash block ⇒ StandardHash (Serialised block ∷ Type) # 
Instance details

Defined in Ouroboros.Network.Block

StandardHash blk ⇒ StandardHash (LedgerState blk ∷ MapKind → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

(NFData (HeaderHash blk), NoThunks (HeaderHash blk), Typeable (HeaderHash blk), Show (HeaderHash blk), Ord (HeaderHash blk), Eq (HeaderHash blk)) ⇒ StandardHash (ExtLedgerState blk ∷ MapKind → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

blockHash ∷ HasHeader b ⇒ b → HeaderHash b #

blockNo ∷ HasHeader b ⇒ b → BlockNo #

blockPoint ∷ HasHeader block ⇒ block → Point block #

blockSlot ∷ HasHeader b ⇒ b → SlotNo #

castHash ∷ ∀ {k1} {k2} (b ∷ k1) (b' ∷ k2). Coercible (HeaderHash b) (HeaderHash b') ⇒ ChainHash b → ChainHash b' #

castHeaderFields ∷ ∀ {k1} {k2} (b ∷ k1) (b' ∷ k2). HeaderHash b ~ HeaderHash b' ⇒ HeaderFields b → HeaderFields b' #

castPoint ∷ ∀ {k1} {k2} (b ∷ k1) (b' ∷ k2). Coercible (HeaderHash b) (HeaderHash b') ⇒ Point b → Point b' #

pointHash ∷ ∀ {k} (block ∷ k). Point block → ChainHash block #

pointSlot ∷ ∀ {k} (block ∷ k). Point block → WithOrigin SlotNo #

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
FromJSON BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

ToJSON BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

FromCBOR BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

ToCBOR BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Methods

toCBOR ∷ BlockNo → Encoding Source #

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

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

DecCBOR BlockNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR BlockNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

NFData BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Methods

rnf ∷ BlockNo → () #

Eq BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Methods

(==) ∷ BlockNo → BlockNo → Bool #

(/=) ∷ BlockNo → BlockNo → Bool #

Ord BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Methods

compare ∷ BlockNo → BlockNo → Ordering #

(<) ∷ BlockNo → BlockNo → Bool #

(<=) ∷ BlockNo → BlockNo → Bool #

(>) ∷ BlockNo → BlockNo → Bool #

(>=) ∷ BlockNo → BlockNo → Bool #

max ∷ BlockNo → BlockNo → BlockNo #

min ∷ BlockNo → BlockNo → BlockNo #

Bounded BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Enum BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Generic BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Associated Types

type Rep BlockNo 
Instance details

Defined in Cardano.Slotting.Block

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

Methods

from ∷ BlockNo → Rep BlockNo x #

to ∷ Rep BlockNo x → BlockNo #

Num BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Show BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Methods

showsPrec ∷ Int → BlockNo → ShowS #

show ∷ BlockNo → String #

showList ∷ [BlockNo] → ShowS #

NoThunks BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

Condense BlockNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense ∷ BlockNo → String Source #

Serialise BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

type Rep BlockNo Source # 
Instance details

Defined in Cardano.Slotting.Block

type Rep BlockNo = D1 ('MetaData "BlockNo" "Cardano.Slotting.Block" "cardano-slotting-0.2.1.0-07100409ee47709d5a70aa9944824dc8255e5cbe1b1f0ced97640bd26d62ab07" '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
FromJSON EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR ∷ EpochNo → Encoding Source #

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

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

DecCBOR EpochNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR EpochNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

NFData EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ EpochNo → () #

Eq EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) ∷ EpochNo → EpochNo → Bool #

(/=) ∷ EpochNo → EpochNo → Bool #

Ord EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compare ∷ EpochNo → EpochNo → Ordering #

(<) ∷ EpochNo → EpochNo → Bool #

(<=) ∷ EpochNo → EpochNo → Bool #

(>) ∷ EpochNo → EpochNo → Bool #

(>=) ∷ EpochNo → EpochNo → Bool #

max ∷ EpochNo → EpochNo → EpochNo #

min ∷ EpochNo → EpochNo → EpochNo #

Enum EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

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

Methods

from ∷ EpochNo → Rep EpochNo x #

to ∷ Rep EpochNo x → EpochNo #

Show EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrec ∷ Int → EpochNo → ShowS #

show ∷ EpochNo → String #

showList ∷ [EpochNo] → ShowS #

NoThunks EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Condense EpochNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense ∷ EpochNo → String Source #

Serialise EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.1.0-07100409ee47709d5a70aa9944824dc8255e5cbe1b1f0ced97640bd26d62ab07" '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 Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR ∷ EpochSize → Encoding Source #

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

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

DecCBOR EpochSize Source # 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR EpochSize Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

NFData EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ EpochSize → () #

Eq EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) ∷ EpochSize → EpochSize → Bool #

(/=) ∷ EpochSize → EpochSize → Bool #

Ord EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Enum EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

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

Methods

from ∷ EpochSize → Rep EpochSize x #

to ∷ Rep EpochSize x → EpochSize #

Show EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrec ∷ Int → EpochSize → ShowS #

show ∷ EpochSize → String #

showList ∷ [EpochSize] → ShowS #

NoThunks EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.2.1.0-07100409ee47709d5a70aa9944824dc8255e5cbe1b1f0ced97640bd26d62ab07" '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
FromJSON SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR ∷ SlotNo → Encoding Source #

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

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

DecCBOR SlotNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

EncCBOR SlotNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ SlotNo → Encoding Source #

NFData SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ SlotNo → () #

Eq SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) ∷ SlotNo → SlotNo → Bool #

(/=) ∷ SlotNo → SlotNo → Bool #

Ord SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compare ∷ SlotNo → SlotNo → Ordering #

(<) ∷ SlotNo → SlotNo → Bool #

(<=) ∷ SlotNo → SlotNo → Bool #

(>) ∷ SlotNo → SlotNo → Bool #

(>=) ∷ SlotNo → SlotNo → Bool #

max ∷ SlotNo → SlotNo → SlotNo #

min ∷ SlotNo → SlotNo → SlotNo #

Bounded SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Enum SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

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

Methods

from ∷ SlotNo → Rep SlotNo x #

to ∷ Rep SlotNo x → SlotNo #

Num SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(+) ∷ SlotNo → SlotNo → SlotNo #

(-) ∷ SlotNo → SlotNo → SlotNo #

(*) ∷ SlotNo → SlotNo → SlotNo #

negate ∷ SlotNo → SlotNo #

abs ∷ SlotNo → SlotNo #

signum ∷ SlotNo → SlotNo #

fromInteger ∷ Integer → SlotNo #

Show SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrec ∷ Int → SlotNo → ShowS #

show ∷ SlotNo → String #

showList ∷ [SlotNo] → ShowS #

NoThunks SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Condense SlotNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense ∷ SlotNo → String Source #

Serialise SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ShowProxy SlotNo # 
Instance details

Defined in Ouroboros.Network.Util.ShowProxy

Methods

showProxy ∷ Proxy SlotNo → String #

(Condense block, HasHeader block, Condense (HeaderHash block)) ⇒ Condense (AnchoredFragment block) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense ∷ AnchoredFragment block → String Source #

SerialiseHFC xs ⇒ SerialiseNodeToClient (HardForkBlock xs) SlotNo Source # 
Instance details

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

HasHeader block ⇒ Anchorable (WithOrigin SlotNo) (Anchor block) block # 
Instance details

Defined in Ouroboros.Network.AnchoredFragment

Methods

asAnchor ∷ block → Anchor block

getAnchorMeasure ∷ Proxy block → Anchor block → WithOrigin SlotNo

Anchorable (WithOrigin SlotNo) (HeaderStateWithTime blk) (HeaderStateWithTime blk) 
Instance details

Defined in Ouroboros.Consensus.HeaderStateHistory

GetTip (l blk) ⇒ Anchorable (WithOrigin SlotNo) (StateRef m l blk) (StateRef m l blk) 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.V2.LedgerSeq

Methods

asAnchor ∷ StateRef m l blk → StateRef m l blk

getAnchorMeasure ∷ Proxy (StateRef m l blk) → StateRef m l blk → WithOrigin SlotNo

type Rep SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

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

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 Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fmap ∷ (a → b) → WithOrigin a → WithOrigin b #

(<$) ∷ a → WithOrigin b → WithOrigin a #

Foldable WithOrigin Source # 
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 Source # 
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) #

FromJSON a ⇒ FromJSON (WithOrigin a) Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON a ⇒ ToJSON (WithOrigin a) Source # 
Instance details

Defined in Cardano.Slotting.Slot

(Serialise t, Typeable t) ⇒ FromCBOR (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

(Serialise t, Typeable t) ⇒ ToCBOR (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOR ∷ WithOrigin t → Encoding Source #

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

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

(Serialise t, Typeable t) ⇒ DecCBOR (WithOrigin t) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Decoding.DecCBOR

Serialise t ⇒ EncCBOR (WithOrigin t) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

NFData a ⇒ NFData (WithOrigin a) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf ∷ WithOrigin a → () #

Eq t ⇒ Eq (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==) ∷ WithOrigin t → WithOrigin t → Bool #

(/=) ∷ WithOrigin t → WithOrigin t → Bool #

Ord t ⇒ Ord (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

compare ∷ WithOrigin t → WithOrigin t → Ordering #

(<) ∷ WithOrigin t → WithOrigin t → Bool #

(<=) ∷ WithOrigin t → WithOrigin t → Bool #

(>) ∷ WithOrigin t → WithOrigin t → Bool #

(>=) ∷ WithOrigin t → WithOrigin t → Bool #

max ∷ WithOrigin t → WithOrigin t → WithOrigin t #

min ∷ WithOrigin t → WithOrigin t → WithOrigin t #

Bounded t ⇒ Bounded (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

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

Methods

from ∷ WithOrigin t → Rep (WithOrigin t) x #

to ∷ Rep (WithOrigin t) x → WithOrigin t #

Show t ⇒ Show (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

showsPrec ∷ Int → WithOrigin t → ShowS #

show ∷ WithOrigin t → String #

showList ∷ [WithOrigin t] → ShowS #

NoThunks t ⇒ NoThunks (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Condense a ⇒ Condense (WithOrigin a) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense ∷ WithOrigin a → String Source #

(Condense block, HasHeader block, Condense (HeaderHash block)) ⇒ Condense (AnchoredFragment block) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense ∷ AnchoredFragment block → String Source #

Serialise t ⇒ Serialise (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

HasHeader block ⇒ Anchorable (WithOrigin SlotNo) (Anchor block) block # 
Instance details

Defined in Ouroboros.Network.AnchoredFragment

Methods

asAnchor ∷ block → Anchor block

getAnchorMeasure ∷ Proxy block → Anchor block → WithOrigin SlotNo

Anchorable (WithOrigin SlotNo) (HeaderStateWithTime blk) (HeaderStateWithTime blk) 
Instance details

Defined in Ouroboros.Consensus.HeaderStateHistory

GetTip (l blk) ⇒ Anchorable (WithOrigin SlotNo) (StateRef m l blk) (StateRef m l blk) 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.V2.LedgerSeq

Methods

asAnchor ∷ StateRef m l blk → StateRef m l blk

getAnchorMeasure ∷ Proxy (StateRef m l blk) → StateRef m l blk → WithOrigin SlotNo

type Rep (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

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

fromWithOrigin ∷ t → WithOrigin t → t Source #

withOrigin ∷ b → (t → b) → WithOrigin t → b Source #