Block
A block represents a collection of transactions and solutions added to the blockchain.Creating Blocks
Beacon Block (Testing)
Quorum Block (Production)
Block Properties
Hash and Headers
Consensus Information
Merkle Roots
Block Contents
Accessing Components
Finding Elements
Existence Checks
Iterators
Reference Iterators
Consuming Iterators
Header
The block header contains metadata and Merkle roots for efficient verification.Creating Headers
Header Validation
- Height 0 blocks must be genesis blocks
- Non-genesis blocks cannot have zero roots (except solutions_root and subdag_root)
- Metadata must be valid
Genesis Headers
Genesis blocks have special properties:- Height is 0
- Previous state root is zero
- Round is 0
- All validators start with equal stake
Metadata
Block metadata contains consensus and timing information.Creating Metadata
Metadata Fields
Transaction
Transactions represent state transitions on the blockchain. See the Synthesizer documentation for detailed transaction types.Transaction Types
- Deploy: Deploys a new program to the network
- Execute: Executes a function in a deployed program
- Fee: Standalone fee transaction
Confirmed Transactions
- The transaction index in the block
- The transaction itself
- Finalize operations (state changes) performed
Transition
Transitions are the atomic units of execution within transactions.Transition Components
- ID: Unique transition identifier
- Program ID: The program being executed
- Function name: The function being called
- Inputs: Function inputs (records, private data, public data)
- Outputs: Function outputs (records, data)
- Proof: Zero-knowledge proof of correct execution
- TPK: Transition public key
- TCM: Transition commitment
Input and Output Types
Inputs:Constant: Public constant inputPublic: Public variable inputPrivate: Private variable inputRecord: Record input (consumes a record)ExternalRecord: Record from another program
Constant: Public constant outputPublic: Public variable outputPrivate: Private variable outputRecord: Record output (creates a record)ExternalRecord: Record for another program
Ratifications
Ratifications represent consensus-level state changes like validator bonding/unbonding.Ratify Types
- Genesis: Establishes the initial committee
- BlockReward: Distributes block rewards to validators
- PuzzleReward: Distributes coinbase rewards to provers
Solutions
Solutions are proof-of-work submissions for coinbase rewards.Solution Structure
- Address: Prover’s address for rewards
- Counter: Nonce for the proof-of-work
- Target: Difficulty target the solution meets
- Solution commitment: Commitment to the solution
- Proof: Zero-knowledge proof of work
Transactions
TheTransactions type is a collection of confirmed transactions in a block.
Constants
Authority
Block authority determines how the block was produced.- Beacon: Single-signature authority (testing only)
- Quorum: Narwhal consensus subdag (production)
Example: Processing a Block
Next Steps
- Ledger Overview - Main ledger operations
- Storage - Persistent storage layer
- Query Operations - State querying