shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.BlockChain

Synopsis

Documentation

newtype HashHeader crypto Source #

The hash of a Block Header

Constructors

HashHeader 

Fields

Instances

Instances details
Eq (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

(==)HashHeader crypto → HashHeader crypto → Bool #

(/=)HashHeader crypto → HashHeader crypto → Bool #

Ord (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

compareHashHeader crypto → HashHeader crypto → Ordering #

(<)HashHeader crypto → HashHeader crypto → Bool #

(<=)HashHeader crypto → HashHeader crypto → Bool #

(>)HashHeader crypto → HashHeader crypto → Bool #

(>=)HashHeader crypto → HashHeader crypto → Bool #

maxHashHeader crypto → HashHeader crypto → HashHeader crypto #

minHashHeader crypto → HashHeader crypto → HashHeader crypto #

Show (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntHashHeader crypto → ShowS #

showHashHeader crypto → String #

showList ∷ [HashHeader crypto] → ShowS #

Generic (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Associated Types

type Rep (HashHeader crypto) ∷ TypeType #

Methods

fromHashHeader crypto → Rep (HashHeader crypto) x #

toRep (HashHeader crypto) x → HashHeader crypto #

NFData (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

rnfHashHeader crypto → () #

Crypto crypto ⇒ ToCBOR (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORHashHeader crypto → Encoding Source #

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

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

Crypto crypto ⇒ FromCBOR (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

fromCBORDecoder s (HashHeader crypto) Source #

labelProxy (HashHeader crypto) → Text Source #

NoThunks (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

noThunks ∷ Context → HashHeader crypto → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → HashHeader crypto → IO (Maybe ThunkInfo)

showTypeOfProxy (HashHeader crypto) → String

type Rep (HashHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

type Rep (HashHeader crypto) = D1 ('MetaData "HashHeader" "Shelley.Spec.Ledger.BlockChain" "shelley-spec-ledger-0.1.0.0-inplace" 'True) (C1 ('MetaCons "HashHeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "unHashHeader") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash crypto (BHeader crypto)))))

data PrevHash crypto Source #

The previous hash of a block

Constructors

GenesisHash 
BlockHash !(HashHeader crypto) 

Instances

Instances details
Eq (PrevHash crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

(==)PrevHash crypto → PrevHash crypto → Bool #

(/=)PrevHash crypto → PrevHash crypto → Bool #

Ord (PrevHash crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

comparePrevHash crypto → PrevHash crypto → Ordering #

(<)PrevHash crypto → PrevHash crypto → Bool #

(<=)PrevHash crypto → PrevHash crypto → Bool #

(>)PrevHash crypto → PrevHash crypto → Bool #

(>=)PrevHash crypto → PrevHash crypto → Bool #

maxPrevHash crypto → PrevHash crypto → PrevHash crypto #

minPrevHash crypto → PrevHash crypto → PrevHash crypto #

Show (PrevHash crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntPrevHash crypto → ShowS #

showPrevHash crypto → String #

showList ∷ [PrevHash crypto] → ShowS #

Generic (PrevHash crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Associated Types

type Rep (PrevHash crypto) ∷ TypeType #

Methods

fromPrevHash crypto → Rep (PrevHash crypto) x #

toRep (PrevHash crypto) x → PrevHash crypto #

Crypto crypto ⇒ ToCBOR (PrevHash crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORPrevHash crypto → Encoding Source #

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

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

Crypto crypto ⇒ FromCBOR (PrevHash crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

fromCBORDecoder s (PrevHash crypto) Source #

labelProxy (PrevHash crypto) → Text Source #

Crypto crypto ⇒ NoThunks (PrevHash crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

noThunks ∷ Context → PrevHash crypto → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → PrevHash crypto → IO (Maybe ThunkInfo)

showTypeOfProxy (PrevHash crypto) → String

type Rep (PrevHash crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

type Rep (PrevHash crypto) = D1 ('MetaData "PrevHash" "Shelley.Spec.Ledger.BlockChain" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "GenesisHash" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "BlockHash" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HashHeader crypto))))

data LastAppliedBlock crypto Source #

Constructors

LastAppliedBlock 

Fields

Instances

Instances details
Eq (LastAppliedBlock crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

(==)LastAppliedBlock crypto → LastAppliedBlock crypto → Bool #

(/=)LastAppliedBlock crypto → LastAppliedBlock crypto → Bool #

Show (LastAppliedBlock crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntLastAppliedBlock crypto → ShowS #

showLastAppliedBlock crypto → String #

showList ∷ [LastAppliedBlock crypto] → ShowS #

Generic (LastAppliedBlock crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Associated Types

type Rep (LastAppliedBlock crypto) ∷ TypeType #

Methods

fromLastAppliedBlock crypto → Rep (LastAppliedBlock crypto) x #

toRep (LastAppliedBlock crypto) x → LastAppliedBlock crypto #

NFData (LastAppliedBlock crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

rnfLastAppliedBlock crypto → () #

Crypto crypto ⇒ ToCBOR (LastAppliedBlock crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORLastAppliedBlock crypto → Encoding Source #

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

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

Crypto crypto ⇒ FromCBOR (LastAppliedBlock crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Crypto crypto ⇒ NoThunks (LastAppliedBlock crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

noThunks ∷ Context → LastAppliedBlock crypto → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → LastAppliedBlock crypto → IO (Maybe ThunkInfo)

showTypeOfProxy (LastAppliedBlock crypto) → String

type Rep (LastAppliedBlock crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

type Rep (LastAppliedBlock crypto) = D1 ('MetaData "LastAppliedBlock" "Shelley.Spec.Ledger.BlockChain" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "LastAppliedBlock" 'PrefixI 'True) (S1 ('MetaSel ('Just "labBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockNo) :*: (S1 ('MetaSel ('Just "labSlotNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "labHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HashHeader crypto)))))

data BHBody crypto Source #

Constructors

BHBody 

Fields

Instances

Instances details
Crypto crypto ⇒ Eq (BHBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

(==)BHBody crypto → BHBody crypto → Bool #

(/=)BHBody crypto → BHBody crypto → Bool #

Crypto crypto ⇒ Show (BHBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntBHBody crypto → ShowS #

showBHBody crypto → String #

showList ∷ [BHBody crypto] → ShowS #

Generic (BHBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Associated Types

type Rep (BHBody crypto) ∷ TypeType #

Methods

fromBHBody crypto → Rep (BHBody crypto) x #

toRep (BHBody crypto) x → BHBody crypto #

Crypto crypto ⇒ ToCBOR (BHBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORBHBody crypto → Encoding Source #

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

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

Crypto crypto ⇒ FromCBOR (BHBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

fromCBORDecoder s (BHBody crypto) Source #

labelProxy (BHBody crypto) → Text Source #

Crypto crypto ⇒ SignableRepresentation (BHBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Crypto crypto ⇒ NoThunks (BHBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

noThunks ∷ Context → BHBody crypto → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → BHBody crypto → IO (Maybe ThunkInfo)

showTypeOfProxy (BHBody crypto) → String

type Rep (BHBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

poolIDfromBHBodyCrypto crypto ⇒ BHBody crypto → KeyHash 'BlockIssuer crypto Source #

Deprecated: poolIDfromBHBody has been deprecated (the name is misleading), use issuerIDfromBHBody

Retrieve the pool id (the hash of the pool operator's cold key) from the body of the block header.

issuerIDfromBHBodyCrypto crypto ⇒ BHBody crypto → KeyHash 'BlockIssuer crypto Source #

Retrieve the issuer id (the hash of the cold key) from the body of the block header. This corresponds to either a genesis/core node or a stake pool.

data BHeader crypto where Source #

Bundled Patterns

pattern BHeaderCrypto crypto ⇒ BHBody crypto → SignedKES crypto (BHBody crypto) → BHeader crypto 

Instances

Instances details
Crypto crypto ⇒ Eq (BHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

(==)BHeader crypto → BHeader crypto → Bool #

(/=)BHeader crypto → BHeader crypto → Bool #

Crypto crypto ⇒ Show (BHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntBHeader crypto → ShowS #

showBHeader crypto → String #

showList ∷ [BHeader crypto] → ShowS #

Generic (BHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Associated Types

type Rep (BHeader crypto) ∷ TypeType #

Methods

fromBHeader crypto → Rep (BHeader crypto) x #

toRep (BHeader crypto) x → BHeader crypto #

Crypto crypto ⇒ ToCBOR (BHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORBHeader crypto → Encoding Source #

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

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

Crypto crypto ⇒ FromCBOR (Annotator (BHeader crypto)) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

fromCBORDecoder s (Annotator (BHeader crypto)) Source #

labelProxy (Annotator (BHeader crypto)) → Text Source #

Crypto crypto ⇒ NoThunks (BHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

noThunks ∷ Context → BHeader crypto → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → BHeader crypto → IO (Maybe ThunkInfo)

showTypeOfProxy (BHeader crypto) → String

type Rep (BHeader crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

type Rep (BHeader crypto) = D1 ('MetaData "BHeader" "Shelley.Spec.Ledger.BlockChain" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "BHeader'" 'PrefixI 'True) (S1 ('MetaSel ('Just "bHeaderBody'") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (BHBody crypto)) :*: (S1 ('MetaSel ('Just "bHeaderSig'") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignedKES crypto (BHBody crypto))) :*: S1 ('MetaSel ('Just "bHeaderBytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString))))

data Block era Source #

Constructors

Block' !(BHeader (Crypto era)) !(TxSeq era) ByteString 

Bundled Patterns

pattern BlockEra era ⇒ BHeader (Crypto era) → TxSeq era → Block era 

Instances

Instances details
ShelleyBased era ⇒ Eq (Block era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

(==)Block era → Block era → Bool #

(/=)Block era → Block era → Bool #

ShelleyBased era ⇒ Show (Block era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntBlock era → ShowS #

showBlock era → String #

showList ∷ [Block era] → ShowS #

Generic (Block era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Associated Types

type Rep (Block era) ∷ TypeType #

Methods

fromBlock era → Rep (Block era) x #

toRep (Block era) x → Block era #

Era era ⇒ ToCBOR (Block era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORBlock era → Encoding Source #

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

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

(ShelleyBased era, ValidateScript era) ⇒ FromCBOR (Annotator (Block era)) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

fromCBORDecoder s (Annotator (Block era)) Source #

labelProxy (Annotator (Block era)) → Text Source #

ShelleyBased era ⇒ NoThunks (Block era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

noThunks ∷ Context → Block era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → Block era → IO (Maybe ThunkInfo)

showTypeOfProxy (Block era) → String

type Rep (Block era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

type Rep (Block era) = D1 ('MetaData "Block" "Shelley.Spec.Ledger.BlockChain" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Block'" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (BHeader (Crypto era))) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxSeq era)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))

newtype LaxBlock era Source #

Constructors

LaxBlock (Block era) 

Instances

Instances details
ShelleyBased era ⇒ Show (LaxBlock era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntLaxBlock era → ShowS #

showLaxBlock era → String #

showList ∷ [LaxBlock era] → ShowS #

Era era ⇒ ToCBOR (LaxBlock era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORLaxBlock era → Encoding Source #

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

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

(ShelleyBased era, ValidateScript era) ⇒ FromCBOR (Annotator (LaxBlock era)) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

data TxSeq era Source #

Bundled Patterns

pattern TxSeq ∷ (Era era, TxBodyConstraints era) ⇒ StrictSeq (Tx era) → TxSeq era 

Instances

Instances details
ShelleyBased era ⇒ Eq (TxSeq era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

(==)TxSeq era → TxSeq era → Bool #

(/=)TxSeq era → TxSeq era → Bool #

ShelleyBased era ⇒ Show (TxSeq era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntTxSeq era → ShowS #

showTxSeq era → String #

showList ∷ [TxSeq era] → ShowS #

Generic (TxSeq era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Associated Types

type Rep (TxSeq era) ∷ TypeType #

Methods

fromTxSeq era → Rep (TxSeq era) x #

toRep (TxSeq era) x → TxSeq era #

ShelleyBased era ⇒ NoThunks (TxSeq era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

noThunks ∷ Context → TxSeq era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → TxSeq era → IO (Maybe ThunkInfo)

showTypeOfProxy (TxSeq era) → String

Era era ⇒ ToCBORGroup (TxSeq era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORGroupTxSeq era → Encoding Source #

encodedGroupSizeExpr ∷ (∀ x. ToCBOR x ⇒ Proxy x → Size) → Proxy (TxSeq era) → Size Source #

listLenTxSeq era → Word Source #

listLenBoundProxy (TxSeq era) → Word Source #

type Rep (TxSeq era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

type Rep (TxSeq era) = D1 ('MetaData "TxSeq" "Shelley.Spec.Ledger.BlockChain" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "TxSeq'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "txSeqTxns'") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictSeq (Tx era))) :*: S1 ('MetaSel ('Just "txSeqBodyBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :*: (S1 ('MetaSel ('Just "txSeqWitsBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "txSeqMetadataBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))

newtype HashBBody crypto Source #

Hash of block body

Constructors

UnsafeHashBBody 

Instances

Instances details
Eq (HashBBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

(==)HashBBody crypto → HashBBody crypto → Bool #

(/=)HashBBody crypto → HashBBody crypto → Bool #

Ord (HashBBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

compareHashBBody crypto → HashBBody crypto → Ordering #

(<)HashBBody crypto → HashBBody crypto → Bool #

(<=)HashBBody crypto → HashBBody crypto → Bool #

(>)HashBBody crypto → HashBBody crypto → Bool #

(>=)HashBBody crypto → HashBBody crypto → Bool #

maxHashBBody crypto → HashBBody crypto → HashBBody crypto #

minHashBBody crypto → HashBBody crypto → HashBBody crypto #

Show (HashBBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

showsPrecIntHashBBody crypto → ShowS #

showHashBBody crypto → String #

showList ∷ [HashBBody crypto] → ShowS #

Crypto crypto ⇒ ToCBOR (HashBBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORHashBBody crypto → Encoding Source #

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

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

Crypto crypto ⇒ FromCBOR (HashBBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

fromCBORDecoder s (HashBBody crypto) Source #

labelProxy (HashBBody crypto) → Text Source #

NoThunks (HashBBody crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

noThunks ∷ Context → HashBBody crypto → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → HashBBody crypto → IO (Maybe ThunkInfo)

showTypeOfProxy (HashBBody crypto) → String

bhHash ∷ ∀ crypto. Crypto crypto ⇒ BHeader crypto → HashHeader crypto Source #

Hash a given block header

bbHash ∷ ∀ era. Era era ⇒ TxSeq era → HashBBody (Crypto era) Source #

Hash a given block body

hashHeaderToNonceHashHeader crypto → Nonce Source #

HashHeader to Nonce

bHeaderSize ∷ ∀ crypto. Crypto crypto ⇒ BHeader crypto → Int Source #

bBodySize ∷ ∀ era. Era era ⇒ TxSeq era → Int Source #

bheaderEra era ⇒ Block era → BHeader (Crypto era) Source #

bhbodyCrypto crypto ⇒ BHeader crypto → BHBody crypto Source #

bbodyEra era ⇒ Block era → TxSeq era Source #

bnonceBHBody crypto → Nonce Source #

Retrieve the new nonce from the block header body.

mkSeed Source #

Arguments

Nonce

Universal constant

SlotNo 
Nonce

Epoch nonce

Seed 

Construct a seed to use in the VRF computation.

checkLeaderValue ∷ ∀ v. VRFAlgorithm v ⇒ OutputVRF v → RationalActiveSlotCoeffBool Source #

Check that the certified input natural is valid for being slot leader. This means we check that

fromNat (certNat) < 1 - (1 - f)^σ

where fromNat creates an appropriate value in [0;1] from the certified natural. The calculation is done using the following optimization:

let p = fromNat (certNat) and c = ln(1 - f)

then p < 1 - (1 - f)^σ = 1 / (1 - p) < exp(-σ * c)

this can be efficiently be computed by taylorExpCmp which returns ABOVE in case the reference value `1 / (1 - p)` is above the exponential function at `-σ * c`, BELOW if it is below or MaxReached if it couldn't conclusively compute this within the given iteration bounds.