Block structure
In Starknet, the block is defined as a list of transactions and a block header containing the following fields:
Name | Type | Description | Implemented |
---|---|---|---|
|
|
The hash of this block’s parent |
✓ |
|
|
The number (height) of this block |
✓ |
|
|
The state commitment after this block |
✓ |
|
|
The Starknet address of the sequencer who created this block |
✓ |
|
|
The time the sequencer created this block before executing transactions |
✓ |
|
|
The number of transactions in a block |
✓ |
|
|
A commitment to the transactions included in the block |
✓ |
|
|
The number of events |
✓ |
|
|
A commitment to the events produced in this block |
✓ |
|
|
The version of the Starknet protocol used when creating this block |
|
|
|
Extraneous data that might be useful for running transactions |
The commitment fields For For |
Block hash
The block hash is defined as the Pedersen hash over the header’s elements.
ℎ(𝐵) = ℎ(
block_number,
global_state_root,
sequencer_address,
block_timestamp,
transaction_count,
transaction_commitment,
event_count,
event_commitment,
0,
0,
parent_block_hash
)
Where \(h\) is the Pedersen hash.
Zeros inside the hash computation of an object are used as placeholders, to be replaced in the future by meaningful fields. |