Steps 1 & 2: Probe signal quality + majorityBaseline protection#2297
Draft
Tomelia1999 wants to merge 1 commit into
Draft
Steps 1 & 2: Probe signal quality + majorityBaseline protection#2297Tomelia1999 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: |
This was referenced May 25, 2026
Step 1 — Probe Signal Quality: - Add latest_block_fetch_latency_ms and latest_block_change_age_ms fields to ProbeReply. Provider populates them from chainTracker.GetLatestFetchLatency() and time-since-last-block-change. - Consumer uses them for probe staleness rejection (ProbeStalenessMultiplier × averageBlockTime) and combined-latency endpoint sorting. - Add GetAverageBlockTime() helper on ProviderOptimizer. Step 2 — majorityBaseline Protection: - New chainstate package: ChainState struct with majorityBaseline/outlierThreshold + IsOutlier guard, ComputeMajorityBaseline consensus algorithm. - probeProviders restructured into Phase 1 (concurrent probes) -> Phase 2a (per-provider scoring) -> Phase 2b (consensus + outlier blocking). - Writes to seenBlock and latestSyncData.Block now guarded by IsOutlier. - Outlier providers blocked from routing via blockOutlierProviders. See protocol/rpcconsumer/docs/probing/improvements-proposals/roadmap.md for the broader four-step plan.
c01a747 to
77d496b
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
Implements roadmap steps 1 and 2 for the consumer's probing mechanism and block-height safety.
latest_block_fetch_latency_msandlatest_block_change_age_msinProbeReply. Consumer uses them for staleness rejection (ProbeStalenessMultiplier × averageBlockTime) and combined-latency endpoint sorting.chainstatepackage + probe-driven consensus loop inconsumer_session_manager.goPhase 2b. Writes toseenBlockandlatestSyncData.Blockare gated byIsOutlier(majorityBaseline + threshold). Outlier providers are blocked from routing.Docs
protocol/rpcconsumer/docs/probing/improvements-proposals/roadmap.mdprotocol/rpcconsumer/docs/consumer-latestblock-managment/majorityBaseline-protection-mechanism.mdprotocol/rpcconsumer/docs/probing/improvements-proposals/fixes-progress.md(Steps 1–2)Test plan
Stacked PR
Base of a 3-PR stack. PR #2 (Step 3) and PR #3 (Step 4) target this branch.
🤖 Generated with Claude Code