Skip to content

feat(solana-driver): Solver interaction - #4749

Merged
tilacog merged 27 commits into
mainfrom
solana-driver-solver-client
Aug 19, 2026
Merged

feat(solana-driver): Solver interaction#4749
tilacog merged 27 commits into
mainfrom
solana-driver-solver-client

Conversation

@tilacog

@tilacog tilacog commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds solver interaction for the solana-driver crate.

Changes

  • New Solver type that sends POST /solve requests to configured solvers. It is now part of the API State struct.
  • Added a minimal set of domain types to support this interaction: Auction, Order, OrderUID, Solution, etc.
    • Each with a mininmal set of fields too, because right now they serve just to produce the DTO set for the solver.
    • I'll expand on them as we integrate w/ the autopilot and with the Settlement program.
  • Added a set of DTO definitions to support this interaction, mirroring the solana-solvers DTO for the Jupiter API and Solana SDK types returned by it.
  • Small refactor on the solana-solvers axum API to split bind and serve, so we can import the solver process and run it in integration tests (following the workspace convention).
  • Added a new URL deserialization helper fn in serde-ext to prevent URLs without a trailing slash to be set in config (after this bot review comment)

How to test

New live integration test: driver_solves_against_live_jupiter_engine, run it with:

$ cargo nextest run -p solana-driver --run-ignored ignored-only --test jupiter_live

@tilacog
tilacog marked this pull request as ready for review August 17, 2026 18:36
@tilacog
tilacog requested a review from a team as a code owner August 17, 2026 18:36
@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Claude finished @tilacog's task in 2m 19s —— View job


PR Review: Solver interaction for solana-driver

Reviewed the solver client, domain/DTO types, API/config wiring, and tests. Overall this is clean, well-documented, and well-tested — the domain/DTO split with serde tests pinning the wire shape against the solver crate is a nice touch, and the live Jupiter test does a thorough end-to-end check of the buy_destination derivation.

I left 3 inline comments:

  1. solver/mod.rs — timeout computed before acquiring the semaphore permit. Queue-wait time isn't deducted from the deadline budget, so a queued solve can run past the auction deadline. Suggest acquiring the permit first, then computing remaining.
  2. dto/solution.rsinto_domain fails the whole response on one bad trade. A single unknown order UID short-circuits both collect()s and discards every solution from that engine, which contradicts the doc comment ("makes its solution invalid"). Either filter per-solution or update the doc.
  3. solver/mod.rsUrl::join("solve") footgun for endpoints with a path prefix (low priority; current config is fine).

Nothing blocking — (1) and (2) are worth a look before merge.

Comment thread crates/solana-driver/src/infra/solver/mod.rs Outdated
Comment thread crates/solana-driver/src/infra/solver/dto/solution.rs
Comment thread crates/solana-driver/src/infra/solver/mod.rs
@squadgazzz

Copy link
Copy Markdown
Contributor

@tilacog , please resolve conflicts. Otherwise, the diff is confusing.

@tilacog

tilacog commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

@squadgazzz I've reconciled this branch w/ latest main, should be good for a review now.

Comment thread crates/solana-driver/src/util/mod.rs
Comment thread crates/solana-driver/src/infra/solver/dto/mod.rs Outdated
Comment thread crates/solana-driver/src/infra/solver/mod.rs
Comment thread crates/solana-driver/src/infra/solver/dto/solution.rs
Comment thread crates/solana-driver/src/infra/solver/dto/auction.rs Outdated
Comment thread crates/solana-driver/src/domain/solution.rs Outdated
Comment thread crates/solana-driver/src/infra/solver/dto/solution.rs Outdated
Comment thread crates/solana-driver/src/infra/solver/dto/solution.rs Outdated
Comment thread crates/solana-driver/src/infra/solver/mod.rs Outdated
Comment thread crates/serde-ext/src/url.rs
Comment thread crates/solana-driver/src/infra/solver/dto/auction.rs
Comment thread crates/solana-driver/src/infra/solver/mod.rs
Comment thread crates/solana-driver/src/infra/solver/mod.rs

@squadgazzz squadgazzz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tilacog
tilacog force-pushed the solana-driver-solver-client branch from 1950d31 to c4eae2b Compare August 19, 2026 12:26
@tilacog
tilacog enabled auto-merge August 19, 2026 12:32
@tilacog
tilacog added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2026
@tilacog
tilacog force-pushed the solana-driver-solver-client branch from 81d96b5 to 2ee22ef Compare August 19, 2026 17:20
@tilacog
tilacog merged commit 54f0d7f into main Aug 19, 2026
23 checks passed
@tilacog
tilacog deleted the solana-driver-solver-client branch August 19, 2026 17:31
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants