Interface IBlockMetadata
A common interface for blocks that do not have any proofs nor transactions (but only
Tx
Namespace: Libplanet.Types.Blocks
Assembly: Libplanet.Types.dll
Syntax
public interface IBlockMetadata
Properties
| Improve this Doc View SourceEvidenceHash
Committing Evidence
Declaration
HashDigest<SHA256>? EvidenceHash { get; }
Property Value
Type | Description |
---|---|
System. |
Index
The height of the block.
Declaration
long Index { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
Zero means it is a genesis block. Not allowed to be negative.
LastCommit
The Block
Declaration
BlockCommit LastCommit { get; }
Property Value
Type | Description |
---|---|
Block |
Miner
The address of the miner.
Declaration
Address Miner { get; }
Property Value
Type | Description |
---|---|
Address |
PreviousHash
The previous block's hash. If it's a genesis block (i.e., its Index is 0) this must be null.
Declaration
BlockHash? PreviousHash { get; }
Property Value
Type | Description |
---|---|
System. |
ProtocolVersion
The protocol version number. For the latest protocol version, see
Current
- 0: The initial block protocol version number. This is not actually recorded in storage. That is, the lack of block protocol version in a stored block means it is of version 0.
-
1: Introduced to be stored with the block data. Validation for
Pre
Evaluation was added.Hash -
2: Updated to include Signature to blocks. As a result,
the miner's identity is provided as a Public
Key instead of a Address. Additionally, total difficulty was added. - 3: Updated to fix an issue with the internal execution ordering of Transactions in blocks.
-
4: Updated to introduce a PBFT scheme. Last
Commit was added and total difficulty was removed. - 5: Updated to introduce a world model. No structural changes were made to blocks. This is used as a marker indicating when the data model should be migrated.
Declaration
int ProtocolVersion { get; }
Property Value
Type | Description |
---|---|
System. |
See Also
| Improve this Doc View SourcePublicKey
The public key of the Miner. This is used for verifying the signature.
Although this is nullable type-wise, it is mandatory where
Protocol
Declaration
PublicKey PublicKey { get; }
Property Value
Type | Description |
---|---|
Public |
Timestamp
The time the block is created.
Declaration
DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
Date |
Remarks
This is always UTC.
TxHash
The hash of all transactions in the block. This is null if the block has no transactions.
Declaration
HashDigest<SHA256>? TxHash { get; }
Property Value
Type | Description |
---|---|
System. |