Block structure of Polkadot
Block
A Polkadot block consists of various fields, each containing specific information related to the block and its transactions.
Header
The block header contains metadata about the block, such as:
Parent hash: The hash of the previous block header, establishing a connection between blocks.
Number: The block's height or position in the blockchain.
State root: The Merkle tree root of the state trie, representing the state of the system after applying the transactions in this block.
Extrinsics root: The Merkle tree root of the block's extrinsics (i.e., transactions and other operations).
Digest: A list of logs (e.g., consensus-related events) that are not part of the extrinsics.
Extrinsic
Substrate extrinsic, several fields define the structure and the information it contains. Here's an explanation of the main fields in an extrinsic:
method
: The method field contains information about the type of transaction like sending tokens or staking. e.g.balances.transfer
orstaking.bond
signature
: The signature field is optional and used when the extrinsic is signed. It contains the account's signature, public key, and signed payload. The signature ensures the authenticity of the sender and the integrity of the data within the extrinsic.signer
: The signer field is optional and used when the extrinsic is signed. It contains the public key (or address) of the account that signed the extrinsic. The signer is responsible for any fees associated with the extrinsic and must have enough balance to cover the fees.nonce
: The nonce field is optional and used when the extrinsic is signed. It is a number that represents the number of transactions already sent by the signer. The nonce is incremented after each transaction to prevent replay attacks.tip
: The tip field is optional and used when the extrinsic is signed. It represents an additional fee paid to the block producer as an incentive to prioritize the inclusion of the extrinsic in a block. The tip is added to the base transaction fee.era
: Era is a primary method for measuring time periods. The era field is optional and used when the extrinsic is signed. It specifies the period within which the extrinsic is valid. The era is used to prevent the extrinsic from being included in a block after the specified period.
Last updated