Skip to content
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

Storing pre-interactions and Jit orders in quote metadata #3162

Merged
merged 7 commits into from
Dec 13, 2024

Conversation

mstrug
Copy link
Contributor

@mstrug mstrug commented Dec 12, 2024

Description

Added storing of additional quote metadata: pre-interactions and jit orders.
Those data can be used for debugging/analysis of the quotes and orders executed by the winning auction.

Changes

Extended QuoteMetadataV1 struct with new fields (vectors): pre_interactions and jit_orders.
Extended QuoteExecution struct in trade finding quote with same fields as QuoteMetadataV1.
Added filling of QuoteExecution new fields from price estimation results and then moving them to QuoteMetadataV1 and storing in database as json.

⚠️ This PR needs to be released together with PR #3124, which introduced QuoteMetadataV1. Otherwise this PR needs to be updated to use new type: QuoteMetadataV2 for properly handling version 1 data already stored in database.

How to test

Existing tests. Also unit tests were updated to verify serializaion/deserialization of new fields.

@@ -244,7 +245,7 @@ pub enum FindQuoteError {
NotFound(Option<QuoteId>),

#[error("quote does not match parameters")]
ParameterMismatch(QuoteData),
ParameterMismatch(Box<QuoteData>),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mstrug mstrug marked this pull request as ready for review December 13, 2024 10:42
@mstrug mstrug requested a review from a team as a code owner December 13, 2024 10:42
Copy link
Contributor

@squadgazzz squadgazzz left a comment

Choose a reason for hiding this comment

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

LGTM

@mstrug mstrug merged commit ab3ec97 into main Dec 13, 2024
11 checks passed
@mstrug mstrug deleted the feature/quote-metadata-additional-values branch December 13, 2024 15:49
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2024
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.

2 participants