State Transitions
This section documents all state transition functions in Tessera, following the JAM specification in the Gray Paper.
Overview
State transitions are deterministic functions that transform the blockchain state from one block to the next. Each transition handles a specific aspect of the protocol:
- SAFROLE: Consensus ticket management and validator rotation
- Assurances: Work-package availability guarantees
- Authorization: Validator authorization and permissions
- Accumulation: Service account state updates
- Reports: Work-report integration
- Disputes: Challenge and resolution mechanisms
- Preimages: Hash preimage management
- Recent History: Block header history tracking
- Statistics: Network statistics and metrics
State Transition Order
Transitions are applied in a specific order as defined in the Gray Paper. The complete state transition function composes these individual transitions:
- Recent History - Update block header history
- SAFROLE - Process consensus tickets and validator selection
- Disputes - Handle ongoing disputes
- Assurances - Mark work-packages as available
- Authorization - Update authorization pool
- Reports - Integrate work-reports
- Accumulation - Update service state
- Preimages - Process hash preimages
- Statistics - Update network metrics
References: Gray Paper Section 6 (State Transition)
Implementation
Each state transition is implemented in tessera/jam/state/transitions/:
transitions/
├── safrole/ # SAFROLE consensus
├── assurances/ # Availability assurances
├── authorization/ # Authorization pool
├── accumulation/ # Service accumulation
├── report/ # Work-report integration
├── disputes/ # Dispute resolution
├── preimages/ # Preimage management
├── recent_history/ # Block history
└── statistics/ # Network statistics
📘 Next: Explore individual state transitions in the sidebar