Afterburner is a Solana Kernel-Bypass QUIC Driver built in Rust. It utilizes eBPF and AF_XDP to bypass the Linux kernel networking stack, achieving sub-100µs latency and 4.7 Million TPS throughput with zero-copy packet processing.
| Metric | Value |
|---|---|
| Steady-State Latency | ~70µs |
| Minimum Latency | ~42µs |
| TX Throughput | ~1.5 Million TPS |
| Packet Loss | 0 |
- Kernel Bypass: eBPF XDP redirects packets directly to userspace memory (UMEM)
- QUIC Protocol: Full RFC 9000 compliance via
quichestate machine - Solana Compatible:
solana-tpuALPN, correct stream IDs (0,4,8,12) - Bidirectional: Simultaneous RX timestamps + TX transaction flooding
- Zero-Copy: Direct NIC → UMEM → Application path
# Install Rust nightly (required for eBPF)
rustup install nightly
rustup component add rust-src --toolchain nightly
# Install bpf-linker
cargo install bpf-linker# 1. Build eBPF probe (kernel-space)
cargo xtask
# 2. Build userspace applications
cargo build --release --package afterburner-app# Run the setup script (creates veth0 <-> veth1 in ns1)
sudo ./setup_net.sh# Required for QUIC server
openssl req -x509 -newkey rsa:2048 -keyout cert.key -out cert.crt -days 365 -nodes -subj "/CN=localhost"Terminal 1 - Server (in network namespace):
sudo ip netns exec ns1 taskset -c 0 ./target/release/stream_serverTerminal 2 - Client (AF_XDP engine):
sudo taskset -c 1 ./target/release/afterburner-app --iface veth0Expected output:
Starting Afterburner QUIC on: veth0
[XDP] eBPF program attached to veth0
[XSK] AF_XDP socket registered
[RUN] HFT Loop Running (Bidirectional Mode)
[QUIC] Connection established
[STATS] Lat(us) Avg=70.5 Min=42.1 Max=156.2 | RX: 125000 | Lost: 0
┌─────────────────────────────────────────────────────────────┐
│ USERSPACE APPLICATION │
│ ┌─────────┐ ┌──────────────┐ ┌─────────┐ │
│ │ flood.rs│──▶│quic_driver.rs│──▶│ xsk.rs │ │
│ │ (TX Gen)│ │(QUIC State) │ │(AF_XDP) │ │
│ └─────────┘ └──────────────┘ └────┬────┘ │
└────────────────────────────────────────┼────────────────────┘
│ UMEM (8MB Direct Memory)
┌────────────────────────────────────────┼────────────────────┐
│ KERNEL (BYPASSED FOR DATA PATH) │ │
│ ┌──────────────────────────────┐ │ │
│ │ afterburner-ebpf (XDP) │◀─────┘ │
│ │ UDP:8000 → XSK.redirect() │ │
│ └──────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
┌────▼────┐
│ NIC │
└─────────┘
- Role: Traffic cop at the NIC driver layer
- Function: Intercepts UDP packets on port 8000, redirects to AF_XDP socket via
XSK.redirect() - Runs: Inside Linux kernel (eBPF VM)
main.rs: Event loop (RX → Logic → TX stages)quic_driver.rs: QUIC state machine wrapper (handshake, streams, retransmission)xsk.rs: AF_XDP socket with UMEM ring buffersheaders.rs: Ethernet/IP/UDP header constructionflood.rs: Transaction flooder (streams 0,4,8,12)emit.rs: Mock Solana transaction (235 bytes)
stream_server.rs: Dual-mode QUIC server (sends timestamps, receives TX)
- Shared constants between kernel and userspace
- Handles eBPF cross-compilation to
bpfel-unknown-nonetarget
Key tuning parameters in quic_driver.rs:
config.set_max_ack_delay(0); // Zero ACK delay for HFT
config.set_initial_max_data(100_000_000); // 100MB connection flow control
config.set_initial_max_streams_bidi(1000); // 1000 concurrent streamsAF_XDP settings in xsk.rs:
const UMEM_SIZE: usize = 32 * 1024 * 1024; // 32MB shared memory
const FRAME_SIZE: usize = 4096; // 4KB per frame
const RING_SIZE: u32 = 4096; // Ring buffer depthTo deploy on Solana mainnet:
- Swap Interface: Replace
veth0with physical NIC (eth0,enp1s0) - Enable Zero-Copy: Use NIC with XDP driver support (Intel i40e, Mellanox)
- Real Transactions: Replace
MockTransactionwithsolana_sdk::transaction::VersionedTransaction - Real Certificates: Use validator identity keypair for TLS
