Repository navigation
5.0.0 - 2026-11-13 — the udp feature without solana-ledger
Published 2026-11-13: crates.io solana-stream-sdk 5.0.0, from main de658bb by .github/workflows/release.yml with crates.io trusted publishing (run 43461974320). Rust only: no npm package was published. Migration: docs/migration-v5.md.
Rust SDK 5.0.0: the udp feature without solana-ledger (breaking)
- The SDK decodes shreds itself:
solana_stream_sdk::shred(behindudp) replacessolana-ledgerin the UDP receiver. It decodes the Merkle shreds Agave 4.4.1 sends (chained, resigned or not; Agave 4.4.1 no longer accepts legacy or unchained shreds, and neither does the SDK), makes the checks Agave'ssanitizemakes in the same order with the same error messages (exceptTruncatedHeaders, where Agave reports its header deserializer's error, andInvalidErasureShardIndex, where Agave prints the headers), computes the Merkle root from a shred and its proof, checks the leader's signature, and deshreds. Each piece names thesolana-ledger4.4.1 function it follows. udpno longer buildssolana-ledger, and with it RocksDB, OpenSSL,native-tls,hyper-tlsand bzip2 (libbz2-rs-sys, licencebzip2-1.0.6). It needs no[patch.crates-io]and no libclang. It resolves 419 crates instead of 648 (cargo tree -p solana-stream-sdk --features udp -e normal). It keepssolana-rpc-client, for block times only (the SDK fetches no leader schedule), whosereqwestuses rustls.scripts/check-udp-deps.sh(run in CI oncargo tree --target all, with a self-test inscripts/tests/) fails if the feature builds any of these,bindgen,solana-runtime,solana-storage-bigtable,agave-precompiles, ored25519-dalek< 2.0.0 /curve25519-dalek< 4.1.3. CI also runscargo test -p solana-stream-sdk --features udpon its own.- Breaking:
deshred_shreds_to_entries,deshred_shreds_to_component,ShredReadyBatch::shreds,DecodedShred::shredand the receiver's batches usesolana_stream_sdk::shred::Shredinstead ofsolana_ledger::shred::Shred. The function names and what they do are unchanged.Shredkeeps Agave's variants (ShredCode,ShredData) and the accessors the receiver and its clients use. Code written againstsolana_ledger::shredneeds more than the import where it uses what differs:proof_size()returnsu8,payload()returns the SDK's read-onlyshred::Payload,layout::get_shredtakes&[u8]andlayout::get_flagsreturnsu8;Shred::id,into_payload,has_correct_proof_size,is_shred_duplicate,retransmitter_signature_offset,ShredFlags,ShredIdand the layout functions that write or take packets (get_shred_id,get_shred_and_repair_nonce,get_common_header_bytes,get_shred_mut,set_retransmitter_signature,resign_shred,resign_packet) are absent. docs/migration-v5.md lists each with its replacement. - New API in
solana_stream_sdk::shred:Shred::new_from_serialized_shred,sanitize,merkle_root,chained_merkle_root,retransmitter_signature,verify(&leader);deshred(Agave'sShredder::deshred);ShredError;wire(alsolayout):get_slot,get_index,get_fec_set_index,get_signature,get_merkle_root, … andverify_shred(packet, &leader), the check Agave'ssigverify_shreds::verify_shred_cpumakes on a received packet. - Tests:
tests/shred_differential.rsruns the SDK andsolana-ledger4.4.1 on the same bytes and requires the same answer (every field, every public reader,sanitize, the Merkle roots, the leader signature on the decoded shred and through Agave'sverify_shred_cpu,deshred), on 14,912 shreds from Agave'sShredder, 36,580 corrupted copies, 88,600 header values at the limitssanitizechecks, 2,100 coding shreds whose erasure batch ends at or near the slot limit, 6,848 shreds with every proof size, all 256 variant bytes, 18,336 deshred lists and 30,000 random inputs; and 1,024 shreds carrying a genuine signature of the same leader from another erasure batch (including the batch whose root they chain to) must be rejected by both. Keys and inputs are seeded, so the counts repeat.solana-ledgeris a dev-dependency only (these tests, and theShredderfixtures of the older UDP tests); the workspace keeps therust-rocksdb[patch.crates-io]for it, andcargo testin this repository still needs libclang. - The UDP receiver does not check leader signatures (it did not in 4.x either), and
run_shreds_udphas no hook for it.shred::wire::verify_shreddoes it, with the slot's leader from a leader schedule you trust, in a receive loop of your own (recv_raw,verify_shred,decode_udp_datagram,insert_shred); see the migration guide.
Moving from 4.x (only if you enable udp):
solana-stream-sdk = { version = "5.0.0", features = ["udp"] }. Remove thelibrocksdb-sysandrocksdblines under[patch.crates-io], andsolana-ledger, unless something else in your workspace needs them (tests that make shreds withShredderkeep it as a dev-dependency, with the patch).- Replace
solana_ledger::shred::{Shred, layout}withsolana_stream_sdk::shred::{Shred, layout};shred::Errorisshred::ShredError,Shredder::deshred(…)isshred::deshred(…). Checking a received packet's signature:shred::wire::verify_shred(&packet, &leader)with the leader ofwire::get_slot(&packet). Then adapt the calls that differ, listed in docs/migration-v5.md. client/shreds-udp-rsneeds no source change, and a crate like thetemp-release/shreds-udp-rsstarter needs onlyCargo.tomlchanges: SDK 5.0.0, nosolana-ledger, no[patch.crates-io].
High-throughput gRPC defaults (#133)
ShredstreamClient::connectopens 16 MiB HTTP/2 stream and connection receive windows, with adaptive windows off, instead of tonic's defaults: a small window caps a stream at about window / round-trip time.- New module
transport, re-exported at the crate root:tune_grpc_endpoint(a tonicEndpoint) andtune_geyser_grpc_builder(a YellowstoneGeyserGrpcBuilder) apply the same windows, and builder calls after them override them;HIGH_THROUGHPUT_GRPC_WINDOW_BYTES(16 MiB). The re-exportedGeyserGrpcClientkeeps its upstream defaults.client/geyser-rs,client/geyser-ts, thegeyser_reconnectexample and thegeyser-rs/geyser-tsstarters open the same windows.
Other changes
package/solana-shreds-client(the source of the npm native client, which does not useudp) requires the SDK at 5.0.0 so that it keeps building against this repository's crate. The workspace optimizessolana-ed25519andsha2in its dev builds: the shred tests check hundreds of thousands of signatures, which take 5 ms each unoptimized.shreds_udp::TransactionsBySlotnames the map type (Arc<DashMap<u64, Vec<(String, DateTime<Utc>)>>>) inside theOptionthatShredsUdpState::transactions_by_slotreturns; no type changes.- Starters (
temp-release/, whichslv bot initcopies frommain) move to the published 4.0.0:geyser-rsandgeyser-tsare now the same code asclient/geyser-rsandclient/geyser-ts: the reconnecting subscription withDisconnectedhandling, redacted logs, the plaintext-token warning, and the faster TypeScript queue.shreds-rs,shreds-tsandshreds-udp-rsmove to SDK 4.0.shreds-udp-rsenables theudpfeature and carries the rust-rocksdb[patch.crates-io]lines it needs.- The Rust starters declare
rust-version = "1.98.1".
trade-appbuilds again.ultima-swap-pumpfunis pinned todbbe5f6e(later commits add a required field toSellParams/BuyParams, socargo buildfailed). It moves to SDK 4.0 anddotenvy, and keeps its own runner: it trades at processed commitment without de-duplication, and the 4.0 runner replays from the last confirmed slot after each reconnect, which would resend recent pool creations.- TypeScript starters are standalone pnpm projects, as users get them. Each has a
pnpm-workspace.yamlthat decides esbuild's install script: without one, pnpm 11 stopspnpm installwithERR_PNPM_IGNORED_BUILDS. They are no longer packages of the repository's workspace. - CI installs, type-checks, tests and builds the TypeScript starters on their own, and runs
cargo check --all-targetson the four Rust starters against the published SDK. - Docs:
client/shreds-rs's README moved from SDK 3.0.0 and Rust 1.96.1 to SDK 4.0 and Rust 1.98.1; the crate README from Rust 1.96.1 to 1.98.1, and its examples name SDK 5.0.0.