Skip to content

Comments

feat: add UDP shredstream provider for raw shred-level benchmarking#12

Open
polyphia wants to merge 1 commit intosolstackapp:mainfrom
polyphia:feat/udp-shredstream
Open

feat: add UDP shredstream provider for raw shred-level benchmarking#12
polyphia wants to merge 1 commit intosolstackapp:mainfrom
polyphia:feat/udp-shredstream

Conversation

@polyphia
Copy link

Summary

  • Adds a new UdpShredstream endpoint type that receives raw UDP shred packets directly from a shredstream proxy, performs FEC recovery and deshredding to extract transactions from the validator's turbine layer — bypassing gRPC entirely
  • Includes full shred decode pipeline: raw UDP packets → shred parsing → reed-solomon FEC recovery → entry deserialization → transaction extraction
  • Backend compatibility: maps UDP endpoints to shredstream kind and wraps bare socket addresses as udp:// URLs so the backend server accepts them

New files

  • src/providers/udp_shredstream.rs — UDP socket listener with SO_REUSEPORT, multi-socket binding, and shred-to-transaction pipeline
  • src/deshred.rs — Shred decoding, FEC recovery via solana-ledger reed-solomon, and entry deserialization

Config example

[[endpoint]]
name = "udp1"
url = "0.0.0.0:20001"
kind = "udpshredstream"

Dependencies added

  • solana-ledger (jito fork for merkle shred recovery), solana-sdk, solana-perf, solana-streamer, solana-net-utils, solana-metrics
  • socket2, tikv-jemallocator, ahash, itertools, crossbeam-channel, rand

Adds a new UdpShredstream endpoint type that receives raw UDP shred
packets, performs FEC recovery and deshredding to extract transactions
directly from the validator's turbine layer — bypassing gRPC entirely.

New files:
- src/providers/udp_shredstream.rs: UDP socket listener with SO_REUSEPORT,
  multi-socket binding, and shred-to-transaction pipeline
- src/deshred.rs: Shred decoding, FEC recovery via solana-ledger reed-solomon,
  and entry deserialization

Changes to existing files:
- config.rs: UdpShredstream variant in EndpointKind enum
- providers/mod.rs: Wire up new provider in create_provider()
- backend.rs: Map UdpShredstream kind to "shredstream" for backend compat,
  wrap bare socket addresses as udp:// URLs, skip URL parsing for UDP endpoints
- main.rs: Add jemalloc allocator, drain signature forwarder before backend
  finalization, skip finalization when no cross-endpoint signatures collected
- Cargo.toml: Add solana-ledger (jito fork), solana-sdk/perf/streamer/net-utils/
  metrics, socket2, tikv-jemallocator, and release profile optimizations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant