Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BlockHeader = BlockHeader {
- _bhPrevHash ∷ !Hash
- _bhSlot ∷ !Slot
- _bhIssuer ∷ !VKey
- _bhSig ∷ !(Sig Hash)
- _bhUtxoHash ∷ !Hash
- _bhDlgHash ∷ !Hash
- _bhUpdHash ∷ !Hash
- bhUtxoHash ∷ Lens' BlockHeader Hash
- bhUpdHash ∷ Lens' BlockHeader Hash
- bhSlot ∷ Lens' BlockHeader Slot
- bhSig ∷ Lens' BlockHeader (Sig Hash)
- bhPrevHash ∷ Lens' BlockHeader Hash
- bhIssuer ∷ Lens' BlockHeader VKey
- bhDlgHash ∷ Lens' BlockHeader Hash
- data BlockBody = BlockBody {}
- bUtxo ∷ Lens' BlockBody [Tx]
- bUpdVotes ∷ Lens' BlockBody [Vote]
- bUpdProp ∷ Lens' BlockBody (Maybe UProp)
- bProtVer ∷ Lens' BlockBody ProtVer
- bDCerts ∷ Lens' BlockBody [DCert]
- data Block = Block {}
- bHeader ∷ Lens' Block BlockHeader
- bBody ∷ Lens' Block BlockBody
- mkBlock ∷ Hash → Slot → VKey → ProtVer → [DCert] → Maybe UProp → [Vote] → [Tx] → Block
- genesisHash ∷ Hash
- bEndorsment ∷ Block → (ProtVer, VKey)
- bSlot ∷ Block → Slot
- bUpdPayload ∷ Block → (Maybe UProp, [Vote])
- bSize ∷ Block → Natural
- bBodySize ∷ BlockBody → Natural
- bHeaderSize ∷ BlockHeader → Natural
- hashHeader ∷ BlockHeader → Hash
- bhToSign ∷ BlockHeader → Hash
- bhHash ∷ BlockHeader → Hash
- bIsEBB ∷ Block → Bool
- updateBody ∷ Block → (BlockBody → BlockBody) → Block
- data BlockStats = BlockStats {}
- blockStats ∷ Block → BlockStats
- chainBlockStats ∷ [BlockStats] → Maybe (BlockStats, BlockStats, BlockStats)
Documentation
data BlockHeader Source #
BlockHeader | |
|
Instances
Instances
A block in the chain. The specification only models regular blocks since epoch boundary blocks will be largely ignored in the Byron-Shelley bridge.
Instances
Dummy genesis hash.
bBodySize ∷ BlockBody → Natural Source #
Compute the abstract size (in words) that a block body occupies.
bHeaderSize ∷ BlockHeader → Natural Source #
Compute the abstract size (in words) that a block header occupies.
hashHeader ∷ BlockHeader → Hash Source #
Computes the hash of a header.
bhToSign ∷ BlockHeader → Hash Source #
Computes the hash of the header.
bhHash ∷ BlockHeader → Hash Source #
bIsEBB ∷ Block → Bool Source #
Checks if a block is an epoch boundary block.
The function always returns False because tests will be performed only against chains without EBBs.
updateBody ∷ Block → (BlockBody → BlockBody) → Block Source #
Update a field of the block body, recomputing the hashes to get a valid block.
data BlockStats Source #
BlockStats | |
|
Instances
Show BlockStats Source # | |
Defined in Byron.Spec.Chain.STS.Block |
blockStats ∷ Block → BlockStats Source #
Count number of transactions in the block
Returns the number of
- Regular transactions
- Delegation certificates
- Update votes
- Update proposals (0 or 1)
chainBlockStats ∷ [BlockStats] → Maybe (BlockStats, BlockStats, BlockStats) Source #
Block stats for an entire chain
Computes minimum, maximum, and average values.
Returns Nothing
for the empty chain.