Skip to main content

Blocks

A block is a fundamental data structure for organizing Aleo transactions over time.

Components of a Block​

An Aleo block is serialized in the following format:

ParameterTypeDescription
block_hashstringThe hash of the block
previous_hashstringThe hash of the previous block
headerobjectThe header of the block
transactionsarrayThe transactions in the block
ratificactionsarrayThe ratifications for proving rewards in the block
coinbasestringThe coinbase puzzle solution constructed by accumulating the individual prover solutions.
signaturestringThe signature for the block

Transactions​

The transactions are a list of all transactions that are included in the specified block.

Block Header​

The block header contains components that summarize the state of the specified block, as well as the state of the ledger at this point in history. See the components of a block header for more details.

Components of a Block Header​

An Aleo block header is serialized in the following format:

ParameterTypeDescription
previous_state_rootstringThe Merkle root representing the blocks in the ledger up to the previous block.
transactions_rootstringThe Merkle root representing the transactions in the block.
finalize_rootstringThe Merkle root representing the on-chain finalize including the current block.
ratifications_rootstringThe Merkle root representing the ratifications in the block.
coinbase_accumulator_pointstringThe accumulator point of the coinbase puzzle.
metadataobjectThe metadata of the block.

Metadata​

ParameterTypeDescription
networku16The network ID of the block
roundu64The round that produced this block - 8 bytes
heightu32The height of this block - 4 bytes
total_supply_in_microcreditsu64The total supply of microcredits - 8 bytes
cumulative_weightu128The cumulative weight for this block - 16 bytes
cumulative_proof_weightu128The cumulative proof target for this block - 16 bytes
coinbase_targetu64The coinbase target for this block - 8 bytes
proof_targetu64The proof target for this block - 8 bytes
last_coinbase_targetu64The coinbase target for the last coinbase - 8 bytes
last_coinbase_timestampu64The Unix timestamp (UTC) for the last coinbase - 8 bytes
timestampi64The Unix timestamp (UTC) for this block - 8 bytes