chore: Unique ID for /notify
endpoint
#2002
Labels
E:3.1 Driver Colocation
See https://github.com/cowprotocol/pm/issues/14 for details
/notify
endpoint
#2002
Background
Inspired by the comment #1980 (comment), I thought about the best way to uniquely identify solutions received by solver engine, taking into consideration what is currently required/supported by the external solvers, but also, what would be useful considering the new
driver
implementation (now & in the future). Obviously, using onlyauction_id
to identify notification is not enough because:driver
'squote
endpoint solutions also, and for those callsauction
does not have defined auction id.Driver
can even merge multiple solutions received from solver engines and create new artificial solutions that solver engines not even know about.Details
Solver engines should generate id for each solution they send to the
driver
.Driver
send the notification that has:1. Option<auction_Id>
Still useful and needed to support the old notification module. Optional since we might want to send notification for the
quote
endpoint also.2. NonEmptyVec<SolutionId(u64)>
Can contain multiple ids to represent the merged solution.
3. Additional data
Different for each specific notification, or even empty
For now, solver engines would generate the solution ids internally. Additionally, we can propose to add additional field
id
toSettledBatchAuctionModel
for external solvers to use to identify solutions however suits them.Acceptance criteria
solve
orquote
call, solver engines should return solutions with unique IDs. There should be implemented check for this and appropriateobserve
andnotify
calls in case of error.The text was updated successfully, but these errors were encountered: