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

workers: event-manager: event_types: tweak event types #838

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

akirillo
Copy link
Contributor

@akirillo akirillo commented Nov 19, 2024

This PR tweaks the event types to make them more ergonomic for historical state indexing. Namely, this includes:

  1. Inlining the event_id and event_timestamp fields into each event type, so that it is self-contained, making it more easily matchable / handleable
  2. Adding the matching_pool field to order placements & updates, to ensure that matching pool movements can be tracked
  3. Adding the execution_price to matches & external matches. While the price itself can be computed from the match result, the timestamp on it is important. We could assume the event_timestamp is the timestamp of the fill, but it is important to the frontend that fills are recorded with the timestamp at which the price was sampled, specifically.
  4. Removing the external tagging of the RelayerEvent. This unfortunately makes it impossible to deserialize the u128 amount field, presumable due to Untagged enum does not play nice with u128 serde-rs/serde#1682

@akirillo akirillo added the enhancement New feature or request label Nov 19, 2024
@akirillo akirillo requested a review from joeykraut November 19, 2024 19:21
@akirillo akirillo self-assigned this Nov 19, 2024
@akirillo akirillo force-pushed the andrew/tweak-event-types branch from 5225cf7 to aa250b7 Compare November 19, 2024 20:06
@akirillo akirillo force-pushed the andrew/tweak-event-types branch from aa250b7 to f4cfdae Compare November 25, 2024 17:36
@akirillo akirillo merged commit 1ee12ce into main Nov 25, 2024
2 of 3 checks passed
@akirillo akirillo deleted the andrew/tweak-event-types branch November 25, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants