-
Notifications
You must be signed in to change notification settings - Fork 91
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
Store auction with liquidity #2663
Conversation
7ec8d62
to
8f3d94a
Compare
8f3d94a
to
3ea4aa9
Compare
@@ -258,7 +258,6 @@ impl From<boundary::EcdsaSignature> for domain::auction::order::EcdsaSignature { | |||
} | |||
} | |||
|
|||
#[serde_as] |
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.
It doesn't look like this is needed.
3ea4aa9
to
19c0e03
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.
Looks pretty good to me. I would consider serialising the solver-dto object instead of creating a new one (as I believe this is what will be the main use case of this feature)
275a33e
to
bbc33dc
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.
Domain objects are supposed to be pure logic structs and should not implement serialisation to be passed around (that's for infra dto representations of those objects)
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 agree that we should not (de)serialize domain structs and instead should store the stringified dto structs.
c2f4478
to
4bbd73c
Compare
7cd6c9d
to
e4cfeff
Compare
e4cfeff
to
70fd46d
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.
Almost there. Mostly nits and comments regarding DDD.
let Some(id) = auction_id else { | ||
return; | ||
}; |
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.
Deciding that auctions without ids (i.e. quote requests) should not be uploaded seems like a domain decision to me. If archive_auction
were to take a non-optional Id
this would naturally be enforced by the type system in the domain logic.
Also there should be a comment somewhere explaining why we only store auctions which have an id.
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.
Sure! I'll move it to the domain logic.
I believe (I may be wrong) that auctions without id are only the ones generated by fake_auction
function 🤔
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 believe (I may be wrong) that auctions without id are only the ones generated by fake_auction function
Yes, that's right. Those are the quote requests which don't really make sense to store.
df7b257
to
0d00368
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.
LGTM 👍
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.
LGTM
0d00368
to
5a7f087
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.
LGTM
Description
Store auction instances from one of the solvers which receives liquidity, similarly to how it was done for the legacy format. Auction instances from the autopilot are not enough since they do not contain liquidity.
How to test
Fixes #2633