BlockHeader
scalus.cardano.ledger.BlockHeader
Represents a block header in Cardano
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Get block number
Get block number
Attributes
Get slot number
Get slot number
Attributes
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Concrete fields
The block hash: blake2b-256 of the header CBOR, as Cardano names a block.
The block hash: blake2b-256 of the header CBOR, as Cardano names a block.
It hashes a re-encoding of the decoded header, since BlockHeader keeps no original bytes (it is not KeepRaw). That gives the hash of the original bytes only when the header was encoded canonically, as the node encodes a Praos header and as this encoder writes it. A header with another encoding of the same values would get a different hash. BlockHashTest checks the hash against two mainnet blocks, spec [TE-11].
Attributes
In this article