#solana #geyser #yellowstone

yellowstone-block-machine

State machine for reconstructing Solana blocks from Geyser events

1 unstable release

Uses new Rust 2024

1.1.0-rc13 Oct 23, 2025
0.1.0-rc7 Oct 17, 2025

#5 in #yellowstone

Download history 140/week @ 2025-10-03 224/week @ 2025-10-10 692/week @ 2025-10-17 493/week @ 2025-10-24

1,549 downloads per month

AGPL-3.0

140KB
2.5K SLoC

Sans-IO Solana Block Reconsruction State Machine

This crates introduce a sans-io state machine to rebuild solana slot properly, mainly from geyser events.

The state-machine encodes all the undocumented/implicit rules you must know about Geyser in order to properly reconstruct a Slot.

Dragon's mouth integration

Visit docs.rs for more detailed example.

You can also look at the repo's examples folder.

Slot lifecycle Up to Processed


                                                                                                                                            
                                                                                                                                            
                                          TIME ->                                                                                           
      ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────►   
      ┌───────────────────────────────────────────────────────┐                                                                             
      │ Slot download                                         │                                                                             
      │ ┌───────────┐┌──────┐         ┌───────┐┌───────────┐  │                                                                             
      │ │FIRST_SHRED││SHRED2...SHRED N││ COMPLETED │  │                                                                             
      │ │ RECEIVED  │└──────┘         └───────┘└───────────┘  │                                                                             
      │ └───────────                                          │                                                                             
      └──────────────┌───────────────────────────────────────────────────────────────────────────────┐                                      
                     │ REPLAY STAGE                                                                  │                                      
                     │┌─────────────┐ ┌──────────────┐ ┌───┌───┐┌──────┐    ┌──────────┐ ┌─────────┐ │                                      
                     ││BANK_CREATED │ │ACCOUNT UPDATE│ │TX1TX2││ENTRY1...BLOCK_META│ │PROCESSED│ │                                      
                     │└─────────────┘ └──────────────┘ └───└───┘└──────┘    └──────────┘ └─────────┘ │                                      
                     │                                                                               │                                      
                     └───────────────────────────────────────────────────────────────────────────────┘          

Dependencies

~3–19MB
~230K SLoC