Step 4: Unify seenBlock and latestSyncData.Block into a chain-wide tracker#2299
Draft
Tomelia1999 wants to merge 1 commit into
Draft
Step 4: Unify seenBlock and latestSyncData.Block into a chain-wide tracker#2299Tomelia1999 wants to merge 1 commit into
Tomelia1999 wants to merge 1 commit into
Conversation
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
f41a68a to
292ec46
Compare
3762b2b to
1250710
Compare
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
Collapses two parallel "latest block on chain" stores into one chain-wide
ChainState.latestBlock:seenBlock(ristretto cache, 5-min TTL, keyed bydappId__consumerIp) — gone.latestSyncData.Block(no TTL, inProviderOptimizer) — gone.Sample-fresh sync scoring (
providerData.SyncBlockfield deleted; outlier samples drop ALL scoring), atomicSetLatestBlockreturning(block, time, advanced), race-window detection betweenIsOutlierandSetLatestBlock, pathological-value guard. WS subscription update lifted out of the per-dappKey fan-out loop.sharedStateIdcollapses to a chain-wide cache key (mixed-version compat preserved). Phase A/B/C/D + 7 Prometheus observability metrics + tier-A chaos test harness.Docs
protocol/rpcconsumer/docs/consumer-latestblock-managment/unify-seenBlock-latestSyncData.md(12 formal decisions in §11, implementation task list in §14)protocol/rpcconsumer/docs/consumer-latestblock-managment/testing-process/unification-demo-scenarios.mdprotocol/rpcconsumer/docs/consumer-latestblock-managment/testing-process/unification-demo-env-setup.md(§8 covers the 7 Prometheus metrics)scripts/test/chaos/tier_a_poisoning/protocol/rpcconsumer/docs/probing/improvements-proposals/fixes-progress.md(Step 4)Test plan
Stacked PR
Depends on #2297 (Steps 1+2) and #2298 (Step 3). Targets `step-3-sync-score-from-probes`.
🤖 Generated with Claude Code