-
Notifications
You must be signed in to change notification settings - Fork 157
feat: Support multiple winning solutions by a single solver #3350
Copy link
Copy link
Closed
Labels
Description
Problem
The current DB schema doesn't support multiple solutions by an individual solver, which is required in the world of combinatorial auctions. The diagram below shows the current relations between the main components of the solver competition. The intention is to provide a reference from the settlement TX hash to the solution UID instead of the current solver→TX hash relation.
classDiagram
%% === Classes ===
class Auction {
+id
+score
}
class Solution {
+uid
+isWinner
+score
}
class Settlement {
+hash
}
class Solver {
+refScore
}
%% === Relationships ===
Auction "1" --> "n" Solution
Solution "n" --> "1" Solver : refScore
Solver "1" --> "1" Settlement : ❌ currently (to remove)
Solution "1" --> "1" Settlement : ✅ intended
%% === Notes ===
%% - Solver → Settlement is a current 1-to-1 link, to be removed
%% - New 1-to-1 link from Solution → TransactionSettlement is intended
%% - Solver.refScore is recalculated as if not participating
Additional context
Acceptance criteria
- Add
solution_uidcolumn to thesettlementstable. - Add
reference_scorestable, which should support multiple winning solutions and eventually replace thesettlement_scorestable. - Implement the reference score calculation for multiple winning solutions.
- Drop
settlement_observationsandreference_scorestables, since they become obsolete. - (Optional) The two tables above were part of the CIP-20. Check if anything else can be cleaned up.
Reactions are currently unavailable