docs.rs failed to build sof-0.5.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
sof-0.8.1
sof
sof is a low-latency Solana observer runtime focused on:
- shred ingestion (direct UDP, relay, optional gossip bootstrap)
- optional shred verification
- dataset reconstruction and transaction extraction
- plugin-driven event hooks for custom logic
- local transaction commitment status tagging (
processed/confirmed/finalized) without RPC dependency
Install
Optional gossip bootstrap support at compile time:
= { = "0.5.0", = ["gossip-bootstrap"] }
Quick Start
Run the bundled runtime example:
With gossip bootstrap:
Runtime API
Embed directly in Tokio:
async
Or use programmatic setup:
use SocketAddr;
async
Plugin Quickstart
use async_trait;
use ;
;
async
RuntimeExtension Quickstart
use async_trait;
use ;
;
async
Plugin Hooks
Current hook set:
on_raw_packeton_shredon_dataseton_transactionon_slot_statuson_reorgon_recent_blockhashon_cluster_topology(gossip-bootstrap mode)on_leader_schedule(gossip-bootstrap mode)
on_transaction events include:
commitment_statusconfirmed_slotfinalized_slot
These commitment fields are derived from local shred-stream slot progress (depth-based), not RPC polling.
on_slot_status events include local canonical transitions:
processedconfirmedfinalizedorphaned
Operational Notes
- Hooks are dispatched off the ingest hot path through a bounded queue.
- Queue pressure drops hook events instead of stalling ingest.
RuntimeExtensionWebSocket connectors support fullws:///wss://handshake + frame decoding.- WebSocket close frames emit
RuntimePacketEventClass::ConnectionClosedinon_packet_received. - WebSocket packet events expose
websocket_frame_type(Text/Binary/Ping/Pong) for startup-time filtering and runtime routing. - In gossip mode, SOF runs as an active bounded relay client by default (UDP relay + repair serve), not as an observer-only passive consumer.
SOF_LIVE_SHREDS_ENABLED=falseenables control-plane-only mode.
Examples
observer_runtimeobserver_with_non_vote_pluginobserver_with_multiple_pluginsnon_vote_tx_loggerraydium_contracttpu_leader_loggerruntime_extension_observer_ingressruntime_extension_udp_listenerruntime_extension_shared_streamruntime_extension_with_pluginsruntime_extension_websocket_connector
Run any example:
Docs
- Workspace docs index:
../../docs/README.md - Architecture docs:
../../docs/architecture/README.md - Operations docs:
../../docs/operations/README.md - Contribution guide:
../../CONTRIBUTING.md