Skip to content

Conversation

@squadgazzz
Copy link
Contributor

Description

Adds the auction deadline block to the solver competition V2 API as requested in #3947:

It would be very useful to add the /settle deadline in the competition endpoint, as this would allow everyone to easily compute rewards based on the transaction hashes already included there (and the corresponding blocks txs took place) and the deadline of the /settle call.

This would also allow to easily extend the circuit breaker functionality to blacklist a solver that executes after the deadline.

How to test

Adjusted existing tests.

Related Issues

Fixes #3947

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

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:

@squadgazzz squadgazzz changed the title Return deadline block in the solver competition v2 API Return deadline block in the solver competition V2 API Dec 4, 2025
@squadgazzz squadgazzz marked this pull request as ready for review December 4, 2025 20:33
Copilot AI review requested due to automatic review settings December 4, 2025 20:33
@squadgazzz squadgazzz requested a review from a team as a code owner December 4, 2025 20:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the auction deadline block to the solver competition V2 API response, enabling easier computation of solver rewards and extending circuit breaker functionality to detect solvers executing after the deadline.

  • Exposes the existing deadline field from the database through all API layers
  • Updates the API response structure and OpenAPI documentation with the new field
  • Adds appropriate test coverage for the new field

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
crates/database/src/solver_competition_v2.rs Added deadline field to Auction struct and updated SQL query to fetch it from competition_auctions table
crates/orderbook/src/database/solver_competition_v2.rs Mapped auction.deadline from database to auction_deadline_block in API response
crates/model/src/solver_competition_v2.rs Added auction_deadline_block field to Response struct with proper serialization and updated tests
crates/orderbook/openapi.yml Documented the new auctionDeadlineBlock field in the API specification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@squadgazzz squadgazzz added this pull request to the merge queue Dec 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 9, 2025
@squadgazzz squadgazzz enabled auto-merge December 9, 2025 10:36
@squadgazzz squadgazzz added this pull request to the merge queue Dec 9, 2025
Merged via the queue into main with commit 151479f Dec 9, 2025
18 checks passed
@squadgazzz squadgazzz deleted the solver-competition-deadline-block branch December 9, 2025 11:03
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2025
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.

feat: Report /settle deadline in competition endpoint

5 participants