The Block Entity

Block entity represents the summary of a block from the blockchain.

type BlockSummary struct {
	Version 	      string `json:"version" msgpack:"_v"`
	CreationDate 	      common.Timestamp `json:"creation_date"`
	Hash                  string        `json:"hash"`
	MinerID               datastore.Key `json:"miner_id"`
	Round                 int64         `json:"round"`
	RoundRandomSeed       int64         `json:"round_random_seed"`
	StateChangesCount     int           `json:"state_changes_count"`
	MerkleTreeRoot        string        `json:"merkle_tree_root"`
	ClientStateHash       util.Key      `json:"state_hash"`
	ReceiptMerkleTreeRoot string        `json:"receipt_merkle_tree_root"`
	NumTxns               int           `json:"num_txns"`
	*MagicBlock           `json:"maigc_block,omitempty" msgpack:"mb,omitempty"`
}
FieldDescription

version

Version of the block. Latest is "1.0".

creation_date

Time when the block is created.

hash

Hash of the block, which represents a SHA256 hash represented in hex string for all the fields of the block concatenated together and separated with :.

miner_id

The ID of the miner generated the block.

round

Round when the block was generated.

round_random_seed

Seed number used to generate random numbers.

state_changes_count

Count of changes applied on the MPT state.

merkle_tree_root

Current root of the MPT computed from the transactions contained inside the block.

state_hash

Hex hash of the root of the MPT.

receipt_merkle_tree_root

The root of an MPT computed from the transactions of the block.

num_txns

Number of the transactions in the block.

magic_block

Magic Block entity used while generating the block.

Last updated