Stop consuming uniform clearing prices in the autopilot#4370
Draft
jmg-duarte wants to merge 1 commit intomainfrom
Draft
Stop consuming uniform clearing prices in the autopilot#4370jmg-duarte wants to merge 1 commit intomainfrom
jmg-duarte wants to merge 1 commit intomainfrom
Conversation
Scoring uses auction-level native prices and settlement verification reads prices from on-chain calldata, so per-solution UCPs are dead weight. Drop them from the autopilot domain `Solution`, the `SolutionError::InvalidPrice` variant, and the `proposed_solutions` price columns (now written as empty arrays). The `/solve` wire format is preserved for rolling-deploy safety: - autopilot tolerates a missing `clearingPrices` (`#[serde(default)]`) - our driver still emits it from existing settlement data `clearingPrices` is marked `deprecated: true` in the driver and orderbook OpenAPI specs. A follow-up PR will remove the field, the deprecation log, and the empty DB columns.
|
Reminder: Please consider backward compatibility when modifying the API specification.
Caused by: |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The autopilot no longer uses per-solution uniform clearing prices — scoring uses auction-level native prices and settlement verification reads them from on-chain calldata. Remove UCPs from the autopilot's domain model and DB writes, keeping the wire format intact so the change is safe under a rolling k8s deploy.
Changes
pricesfrom the autopilot's domainSolutionandSolutionError::InvalidPrice(plus its metric label).proposed_solutions.price_tokens/price_values(columns retained; an empty array still satisfiesNOT NULL).#[serde(default)]to the autopilot'sclearing_pricesdeserializer; log atdebugwhen a driver still sends it.clearingPricesin place so old autopilots can still parse new driver responses.clearingPricesasdeprecated: truein driver and orderbook OpenAPI specs.A follow-up PR will remove the driver field, the deprecation log, and could drop the now-unused
proposed_solutions.price_tokens/price_valuescolumns.How to test
cargo nextest run -p autopilot -p driver.solver_competition_v2for a new auction returnsclearingPrices: {}; for a pre-change auction it's still populated.