Archived
feat(polymarket)!: two connections per market, first one wins
Every live market is subscribed on two connections chosen at random, and its book takes each change from whichever connection delivers it first: the book hash says whether a change is a duplicate, the next one, or one to hold until the change before it arrives. A change one connection misses costs nothing, each Delta carries the earliest receive time, and a connection that drops is covered by the other. When a change fits on no connection in time, the book follows one connection unchecked and asks the other for a fresh book. Connections now decode and route events to 16 book threads, independent of them; a move leaves its old connection only once the new one delivers, so it costs no change; a connection closed with 1013 twice within ten minutes is split. reconcile reads the collector's log and fails only on a mismatch no cause line explains. SIGTERM and SIGHUP stop the collector cleanly. Breaking: lanes are gone (connections and book threads are separate), and reconcile takes the log as a second argument.
This commit is contained in:
24 files changed
+8984
-1214
No files matched your search
+2
-2
@@ -46,8 +46,8 @@ Prefer these; they can't be gamed by strategy luck:
|
||||
separately our *internal* added latency (edge-stamp → output byte).
|
||||
- **Completeness:** reconciliation error rate (snapshot↔delta divergence); count
|
||||
of missed deletes / stale levels under induced loss.
|
||||
- **Redundancy value (once ext1 exists):** messages the backup socket caught that
|
||||
the primary missed — literal "data loss avoided."
|
||||
- **Redundancy value:** changes one connection missed and the other delivered
|
||||
(rescued) — literal "data loss avoided."
|
||||
|
||||
## Recommendation
|
||||
|
||||
|
||||
Reference in new issue
Block a user