link quotes to auctions - #4712
Conversation
|
Claude finished @MartinquaXD's task in 1m 43s —— View job PR Review: link quotes to auctionsReviewed the diff. Threading
Nothing else stood out — README docs and test coverage additions look good. |
|
Reminder: Please update the DB Readme and comment whether migrations are reversible (include rollback scripts if applicable).
Caused by: |
First step in linking a stored quote to the full solver competition it came from. Adds the column and threads it through the DAO structs; every current writer sets it to None. Downstream steps will populate it from the orderbook quote flow. The upsert on `order_quotes` uses `COALESCE(EXCLUDED.auction_id, ...)` so a subsequent write without an auction_id (e.g. an ethflow reorg path) doesn't erase an earlier link. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
576e622 to
5aab4ce
Compare
| verified | boolean | not null | information if quote was verified | ||
| metadata | json | not null | additional data associated with the quote in json format | ||
| creation\_timestamp | timestamptz | not null | when the entry was created (DEFAULT NOW() for new and 1970-01-01 for historical data) | ||
| auction\_id | bigint | nullable | the auction competition that was the basis for this quote |
There was a problem hiding this comment.
Do I understand correctly that this column will be populated only for the fast path quotes? If so, it is hard to understand from the naming and description. The same applies to the rust code.
There was a problem hiding this comment.
Yes - only for fast path orders. I didn't want to codify this by calling it something like "fast_path_auction" or so in case we want to more generally migrate towards this system of storing quotes.
There was a problem hiding this comment.
Ok, but maybe a comment/description should explain that?
squadgazzz
left a comment
There was a problem hiding this comment.
LGTM, assuming some context regarding the auction id will be added.
AryanGodara
left a comment
There was a problem hiding this comment.
LGTM. reviewing this in the stack PRs, but the addition here looks good 👌🏼
Just one nit question below
|
|
||
| -- Copy of quotes.auction_id preserved when the quote is attached | ||
| -- to an order. | ||
| ALTER TABLE order_quotes ADD COLUMN auction_id bigint; |
There was a problem hiding this comment.
Description
for the fast path order execution we need to have real solver competition data for fast path quotes.
The plan is to create new entries in
competition_auctions,proposed_solutions, andproposed_trade_executionsand link them to the quotes via the newauction_id.Changes
auction_idtoquotesandorder_quotesHow to test
extended existing roundtrip test
but primarily there will be an e2e test at the end
Related Issues
BE-56