Skip to content

feat(tx): add typed Jito transport — fuzzed submit coverage#34

Merged
Lythaeon merged 5 commits into
mainfrom
feature/jito-transport
Mar 11, 2026
Merged

feat(tx): add typed Jito transport — fuzzed submit coverage#34
Lythaeon merged 5 commits into
mainfrom
feature/jito-transport

Conversation

@Lythaeon

Copy link
Copy Markdown
Owner

Description

This PR adds typed Jito transport support to sof-tx, adds standalone fuzz coverage for the major submit and routing paths, and updates the docs so SOF is described as low-latency market infrastructure rather than a generic observer framework.

It matters because Jito is now a first-class submit path alongside RPC/direct/hybrid, the configuration surface is typed and documented with defaults, and the new fuzz package gives sof-tx the same kind of sustained hot-path validation the observer side already had.

Changes

  • crates/sof-tx/src/submit/jito.rs, crates/sof-tx/src/submit/types.rs, and crates/sof-tx/src/submit/client.rs: typed Jito transport/config surface with a default mainnet endpoint, typed auth token/endpoint types, and client wiring for JitoOnly submit mode.
  • crates/sof-tx/src/builder.rs: add explicit reset helpers for compute-unit-limit and priority-fee instructions so callers can toggle those knobs without rebuilding the builder from scratch.
  • crates/sof-tx/fuzz/*: add a standalone sof-tx fuzz package with one target per hot path: submit_jito_mode, submit_rpc_only, submit_direct_only, submit_hybrid, routing_select_targets, signature_deduper, and tx_builder_toggles.
  • README.md, crates/sof-observer/README.md, crates/sof-tx/README.md, and docs/README.md: update the framing and docs copy to position SOF as low-latency market/financial infrastructure and document Jito defaults/configuration more explicitly.

For slice-related changes:

  • Affected slices: sof-tx submit/routing/builder plus top-level crate/docs surfaces.
  • Cross-slice communication changes: none; this stays within sof-tx and documentation layers.
  • Migration requirements: none; the Jito surface is additive.

Motivation

Business motivation:

  • Make Jito submission a first-class path for users who need block-engine delivery without pushing them into stringly configuration or private local patches.
  • Tighten the public framing so SOF reads like the kind of infrastructure it is being used as in production.

Technical motivation:

  • Replace string-based Jito setup with typed endpoint/auth/config types and a default constructor that works out of the box.
  • Add dedicated fuzz coverage for the sof-tx hot paths, not just observer-side fuzzing.
  • Provide builder reset helpers so the builder API supports explicit on/off tuning transitions cleanly.

Alternative approaches considered:

  • Leaving Jito setup as ad hoc strings: rejected because it weakens the API and embedding UX.
  • Reusing one combined fuzz target for all submit modes: rejected because it makes crash ownership and corpus management worse.

Scope and impact

  • Affected slices: sof-tx submit, routing, and builder surfaces; top-level docs.
  • Data/API changes: additive JitoOnly transport/config API and additive builder reset helpers.
  • Backward compatibility: preserved; existing RPC/direct/hybrid flows continue to work.
  • Performance impact: neutral in normal operation, positive in validation coverage; fuzz targets now exercise the submit and routing hot paths directly.
  • Security impact: no new privileged behavior; Jito auth stays explicit and typed.

Testing

  • Unit tests
  • Integration tests
  • Manual verification
  • Performance checks (if applicable)
  • Security checks (if applicable)

Commands/results:

cargo make ci
cargo check --manifest-path crates/sof-tx/fuzz/Cargo.toml --bins
cd crates/sof-tx/fuzz && cargo +nightly fuzz run submit_jito_mode -- -max_total_time=300
cd crates/sof-tx/fuzz && cargo +nightly fuzz run submit_rpc_only -- -max_total_time=300
cd crates/sof-tx/fuzz && cargo +nightly fuzz run submit_direct_only -- -max_total_time=300
cd crates/sof-tx/fuzz && cargo +nightly fuzz run submit_hybrid -- -max_total_time=300
cd crates/sof-tx/fuzz && cargo +nightly fuzz run routing_select_targets -- -max_total_time=300
cd crates/sof-tx/fuzz && cargo +nightly fuzz run signature_deduper -- -max_total_time=300
cd crates/sof-tx/fuzz && cargo +nightly fuzz run tx_builder_toggles -- -max_total_time=300

All of the above passed. The 5-minute fuzz runs completed without surfacing crashes.

Related issues and documentation

  • Fixes:
  • Related:
  • Architecture docs: docs/architecture/README.md
  • Relevant ARD/ADR: docs/architecture/adr/0004-static-dispatch-and-performance-layout.md, docs/architecture/adr/0006-transaction-sdk-and-dual-submit-routing.md
  • Operations/runbook updates: README/docs positioning and Jito configuration defaults updated in crate docs.

Reviewer checklist

  • Code follows project standards and architecture constraints
  • Slice boundaries are respected (docs/architecture/ard/0003-slice-dependency-contracts.md)
  • Tests added/updated and passing
  • Documentation updated (README/docs/operations as needed)
  • No undocumented breaking change
  • Performance trade-offs documented where relevant
  • Security considerations addressed where relevant

Additional notes

  • GitHub repository metadata was also updated out-of-band so the short description now matches the project positioning in the docs.

@Lythaeon Lythaeon merged commit cacfda5 into main Mar 11, 2026
2 checks passed
@Lythaeon Lythaeon deleted the feature/jito-transport branch March 11, 2026 00:48
@Lythaeon Lythaeon restored the feature/jito-transport branch March 12, 2026 13:38
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