Skip to main content

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 Ψ\Psi composes these individual transitions:

  1. Recent History - Update block header history
  2. SAFROLE - Process consensus tickets and validator selection
  3. Disputes - Handle ongoing disputes
  4. Assurances - Mark work-packages as available
  5. Authorization - Update authorization pool
  6. Reports - Integrate work-reports
  7. Accumulation - Update service state
  8. Preimages - Process hash preimages
  9. 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