feat(001): add Serialized to aggregator-head-lag - #2268
Merged
Conversation
Their trades stream is keyed by token with an optional pools filter, while the bench is keyed by pool. Subscribing by the pool's native side (SOL, WETH, WBNB) acknowledges and delivers nothing; subscribing by the side their own /v1/pool reports as `token` (USDC, BUSD, USDG) with pools=<bench pool> delivers exactly that market. Verified on all four bench pools before shipping (events with txHash: solana 4, base 10, bnb 2, robinhood 79). One connection per process, four pools multiplexed: their key allows 5 concurrent connections and this harness runs in three regions. Records both series: head_lag_seconds from their own `at`, same treatment as the incumbents, and head_lag_ref_seconds against the node reference clock matched by txHash. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CpArutAtXuBb1BVNUDXoYA
This was referenced Sep 5, 2026
Flotapponnier
added a commit
that referenced
this pull request
Sep 8, 2026
Reverts #2268 before it reaches main. Measured 2026-09-08: their `at` is the block timestamp exactly, so the ruler matches, but on Base every sampled trade arrives before its own block exists (11/11 received while the node head was still target-1, median 1.04 s ahead of publication). They stream sequencer preconfirmations; Mobula, Codex and GeckoTerminal read sealed blocks. That is a latency/finality trade-off, not a speed gap, and one ranking would present it as superiority. RecordHeadLag also drops negatives, so on the legacy series they would read as no data on Base while being the fastest. Audit §18.1 records the measurements, the two open questions for them (preconfirmed=false on all lead events, 0 Robinhood events in 240 s) and the conditions to reopen. Serialized stays on benches 004, 005, 008, 090. Claude-Session: https://claude.ai/code/session_01LtBjM1FhTKxiZhwzb3Y61c Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2267 (node reference clock). With the reference in place, Serialized can be measured on bench 001 with the same ruler as everyone else.
The practical blocker nobody had tested
Serialized's trades stream is keyed by token with an optional
poolsfilter; the bench is keyed by pool. Subscribing by the pool's native side (SOL, WETH, WBNB) acknowledges and delivers nothing, consistent with their REST404onSo111…112: the chain native is a quote asset to them, never a token. Their ownGET /v1/poolnames the other side undertoken. Subscribing by that address withpools=<bench pool>delivers exactly that market.Verified on all four bench pools before shipping:
txHashThe token side is resolved from
/v1/poolat boot (free endpoint) with a pinned fallback.Connection cap
Their docs cap a key at 5 concurrent connections; this harness runs in three regions off one key. One connection per process, four pools multiplexed as subscriptions. A first test that opened eight connections was refused with close code 1008, which is also why an earlier Solana attempt looked like a failure and was not.
What is recorded
Both series, deliberately:
head_lag_secondsfrom their ownat: identical treatment to Mobula and Codex, including the legacy filter that drops negatives.head_lag_ref_secondsagainst the node reference clock matched bytxHash: the series that can actually compare providers.Every event carries
txHash,block,poolAddressand apreconfirmedboolean per their docs, so Base flashblocks are visible, not inferred. Same 10-minute flow watchdog and gauge purge as the Codex path.SERIALIZED_API_KEYempty disables the monitor cleanly.Spec: provider block added with the same query shape as Codex including the three regions; methodology bullets updated (4 aggregators, 48 series).
ALL SPECS VALID.Deploy note
The three Railway services (
Aggregator east usa,Agg eu west,agg sgp) build frommain, rootharnesses/aggregator-head-lag.SERIALIZED_API_KEYis already set on all three (skipDeploys). This lands on Railway with the nextdev → main. Also:Agg eu westhas three consecutive FAILED deploys since 2026-09-05 14:32, all snapshot uploads that fail at build ("fsutil.NewFS … harnesses/aggregator-…"), i.e. arailway upfrom a directory that does not contain the harness path. The 14:25 build frommainshould still be serving; a fresh git build viaserviceInstanceDeployV2will replace it.🤖 Generated with Claude Code
https://claude.ai/code/session_01CpArutAtXuBb1BVNUDXoYA