solana-driver: Autopilot interface - #4759
Merged
Merged
Conversation
tilacog
marked this pull request as ready for review
August 20, 2026 00:12
Contributor
|
Claude finished @tilacog's task in 2m 43s —— View job PR Review: solana-driver Autopilot interfaceSolid, well-documented PR — the mirrored DTOs with pinned-literal tests against
Nothing blocking beyond those; the first two are quick fixes.
|
squadgazzz
reviewed
Aug 20, 2026
squadgazzz
reviewed
Aug 20, 2026
squadgazzz
reviewed
Aug 20, 2026
this makes solve_response fn infallible, because we drop any invalid values during DTO validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces the HTTP interface for receiving
/solveand/settlerequests from the autopilot.The
/settleendpoint is a stub for now because the actual settlement logic will be presented in a follow-up PR, but all the other aspects of it's API are in place.@squadgazzz: This PR diff ended up a bit bigger than I expected. Please let me know if you prefer me to split it into smaller ones. (I'm taking care this doesn't repeat for the follow-up PRs)
Changes
crates/autopilot-svm:SolveRequest,Solution,SettleRequestnow serialize integer ids as decimal strings, givenu64can't fit in a JSON number.domaintypes:Competition(new type, holds a list ofSolvers and orchestratessolvecalls among them.Auction: itsidfield, rejects non-positive valuesOrderrestructured fields to match what we get from the autopilot.apirouting forsolveandsettle.api-specificErroranderror::Kindfor invalid data (auction ids, solver failures, etc)How to test
cargo test -p solana-driverNew TODOs
These are the new TODO comments introduced by this PR.
We're shipping a basic version of the
solana-driverfirst and will optimize these areas later.competition.rs, the work fan-out is very simple/naive and there's no solution cache.deadline_slotthat the driver needs to resolve into an actual timestamp, but for now this PR just uses a hardcoded 15s deadline for every auction. (Thedeadline_slotfield is included in the DTO, just not enforced.)solana-solverengine doesn't yet report the counterpart (buy/sell) amount, so the driver stubs thescoreand counterpartamountto0.