-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add is_winner to solver competition endpoints #3127
base: main
Are you sure you want to change the base?
Add is_winner to solver competition endpoints #3127
Conversation
c7cde9c
to
4272ac4
Compare
4272ac4
to
fcf323b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are missing some kind of migration to populate the value for historic entries - otherwise those will be false for all solutions in an auction.
This migration can be done manually after this PR is merged as well. Simply, go over entries in solver_competition and set is_winner=true for all last solutions.
@@ -54,6 +54,7 @@ pub struct SolverSettlement { | |||
#[serde_as(as = "BTreeMap<_, HexOrDecimalU256>")] | |||
pub clearing_prices: BTreeMap<H160, U256>, | |||
pub orders: Vec<Order>, | |||
pub is_winner: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add #[serde(default)]
above the new field to make it explicit that is_winner
might be missing for some entries and to make the deserialization more robust.
@@ -1504,6 +1504,9 @@ components: | |||
description: Maps from solver name to object describing that solver's settlement. | |||
items: | |||
$ref: "#/components/schemas/SolverSettlement" | |||
isWinner: | |||
type: boolean | |||
description: whether the solution is a winner or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong place, should go under SolverSettlement
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
Can this PR be marked as |
Description
Add is_winner to solver competition endpoints
Changes
Add is_winner boolean to each solution json object.
How to test
Related Issues
Fixes #3070