fix(evm): skip lagging upstreams for eth_call(latest) and mirror head lag to */All - #25
Open
1marcghannam wants to merge 3 commits into
Open
1marcghannam wants to merge 3 commits into
1marcghannam wants to merge 3 commits into
Conversation
xray — see through AI slop with deterministic architecture PR diff reviews |
1marcghannam
changed the base branch from
main
to
fix/pin-near-tip-getblock-to-evm-leader
September 15, 2026 09:40
1marcghannam
force-pushed
the
fix/eth-call-latest-skip-lagging-upstreams
branch
from
September 15, 2026 09:41
d9a3a20 to
ac2e98e
Compare
… lag to */All
Stale eth_call("latest") could be served by a WS peer thousands of blocks behind TipHW because tip integrity only covered getBlock and bn=0 failed open. Skip peers lagging >16 for moving-tag state reads, prefer near-tip order, and mirror BlockHeadLag into {*,All} so network-scope lag predicates see quiet/stalled peers.
…skip Use the stalled-vs-tip totalQueued values (16355 vs 692), ~8k block lag, and the real selector so the regression mirrors the production failure mode.
1marcghannam
force-pushed
the
fix/eth-call-latest-skip-lagging-upstreams
branch
from
September 15, 2026 09:50
c82e538 to
0c96ef1
Compare
1marcghannam
changed the base branch from
fix/pin-near-tip-getblock-to-evm-leader
to
feat/websocket-support
September 15, 2026 09:51
…tateLagBlocks The 16-block hard gate mirrored the default selection policy's blockNumberLagAbove(16) but was not operator-tunable, unlike the policy threshold. Add evm.maxLatestStateLagBlocks (nil -> 16, <=0 disables), resolved at the read site like MaxRetryableBlockDistance. Also correct the lag-test comments: lag comes from the standard poller mocks (0x11118888 vs 0x22228888), not the no-op SuggestLatestBlock calls.
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.
Summary
totalQueuedvia eRPC returned 16,355 instead of ~692 because a stalled WS peer (internal-eth-mainnet-reth-ws-0) still answeredeth_call("latest"). Tip-pin image only covers getBlock.eth_call("latest")resolves to bn=0 and fail-opens availability gating;{*,All}BlockHeadLag was not mirrored for peer upstreams so network-scope lag predicates can no-op (upstream #1019).latest/pending/empty tag.{ups,"*",All}.Base:
fix/pin-near-tip-getblock-to-evm-leader(LinkPool tip-pin / WS lineage — not upstreammain).Test plan
TestNetwork_EthCallLatest_SkipsLaggingUpstreamTestNetwork_EthCallConcreteBlock_AllowsLaggingArchiveTestWildcardLagMirroredForPeerUpstreamsRollout
internal-erpcimage tag.totalQueuedvia eRPC ≈ 692; no stalled reth-0 while behind TipHW.