Skip to content

solana-orderbook: serve the persisted solver competition - #5118

Closed
anxolin wants to merge 1 commit into
mainfrom
anxo/be-315-expose-the-persisted-competition-through-a
Closed

anxolin wants to merge 1 commit into
mainfrom
anxo/be-315-expose-the-persisted-competition-through-a

Conversation

@anxolin

@anxolin anxolin commented Oct 16, 2026 •

Copy link
Copy Markdown

Description

Solvers, accounting and the explorer can't see who bid what on Solana.

The autopilot persists every competition the db. This PR is about exposing it.

Linear: BE-315

Changes

Exposes the endpoints and swagger docs for:

  • GET /api/v2/solver_competition/{auction_id}
  • GET /api/v2/solver_competition/by_tx_hash/{tx_signature}.

The response has the same shape as the EVM except:

  • Solana-specific differences: auctionStartSlot/auctionDeadlineSlot instead of blocks
  • transactionSignatures/txSignature (base58) instead of hashes
  • noclearingPrices or fastPath, because the Solana tables have neither. (for now)

Visibility:

  • A competition stays hidden (404) until the current auction's tip_slot in solana.auctions passes its deadline_slot, so solutions are never shown while they can still be submitted. EVM does the same with hide_competition_before_block.

Out of scope

  • The per-solution txSignature stays null until the outcome verifier (BE-197) fills settlements.solution_uid.

Open questions for review:

  • The path keeps the EVM name by_tx_hash for client parity, even though the parameter is a signature. Happy to rename it to by_tx_signature.
  • latest and the unfiltered /restricted variant are not included, because BE-315 doesn't ask for them.

How to test

cargo test -p solana-orderbook --lib solver_competition
# needs a local Postgres with the solana.* schema applied
cargo test -p solana-orderbook --lib solana_db_reads_a_competition_after_its_deadline -- --ignored

Against staging once deployed:

curl -s https://barn.api.cow.fi/solana/api/v2/solver_competition/<auction_id> | jq
curl -s https://barn.api.cow.fi/solana/api/v2/solver_competition/by_tx_hash/<signature> | jq

Add GET /api/v2/solver_competition/{auction_id} and
/api/v2/solver_competition/by_tx_hash/{tx_signature}, reading the
competition tables the autopilot persists. A competition stays hidden
until the current auction's tip slot passes its deadline slot.
@linear-code

linear-code Bot commented Oct 16, 2026

Copy link
Copy Markdown

BE-315

@github-actions

Copy link
Copy Markdown

Reminder: Please consider backward compatibility when modifying the API specification.
If breaking changes are unavoidable, ensure:

  • You explicitly pointed out breaking changes.
  • You communicate the changes to affected teams (at least Frontend team and SAFE team).
  • You provide proper versioning and migration mechanisms.

Caused by:

@anxolin

anxolin commented Oct 16, 2026

Copy link
Copy Markdown
Author

I just wanted to check the changes needed to expose it

@anxolin anxolin closed this Oct 16, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 16, 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.

1 participant