Skip to content

feat: restore provider-side consistency checks with CLI flag#2223

Merged
nimrod-teich merged 8 commits into
mainfrom
fix_consistency
Feb 17, 2026
Merged

feat: restore provider-side consistency checks with CLI flag#2223
nimrod-teich merged 8 commits into
mainfrom
fix_consistency

Conversation

@AnnaR-prog

Copy link
Copy Markdown
Contributor

Re-enable the handleConsistency feature that was accidentally removed during the DR removal commit. The implementation matches feature/refactor-tiers exactly, but adds a CLI flag for control.

Changes:

  • Add --disable-consistency-checks flag (consistency enabled by default)
  • Conditionally call handleConsistency based on flag
  • Update GetParametersForCache signature to accept latestBlock parameter
  • When enabled: provider waits for chain tracker to catch up with consumer's seen block
  • When disabled: provider responds immediately with current state

The existing handleConsistency, SleepUntilTimeOrConditionReached, and GetLatestBlockData methods that were already in the branch are now utilized.

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • read the contribution guide
  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the main branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

AnnaR-prog and others added 2 commits February 15, 2026 15:58
Re-enable the handleConsistency feature that was accidentally removed during
the DR removal commit. The implementation matches feature/refactor-tiers exactly,
but adds a CLI flag for control.

Changes:
- Add --disable-consistency-checks flag (consistency enabled by default)
- Conditionally call handleConsistency based on flag
- Update GetParametersForCache signature to accept latestBlock parameter
- When enabled: provider waits for chain tracker to catch up with consumer's seen block
- When disabled: provider responds immediately with current state

The existing handleConsistency, SleepUntilTimeOrConditionReached, and
GetLatestBlockData methods that were already in the branch are now utilized.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add --disable-consistency-checks flag (consistency enabled by default)
- Add enableConsistencyChecks field to RPCProvider struct
- Pass enableConsistencyChecks through to ServeRPCRequests

The consistency feature ensures providers wait for their chain tracker
to catch up with consumer's seenBlock before responding, preventing
stale data responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Feb 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.13592% with 39 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
protocol/rpcprovider/rpcprovider_server.go 64.94% 24 Missing and 10 partials ⚠️
protocol/rpcprovider/rpcprovider.go 16.66% 5 Missing ⚠️
Flag Coverage Δ
consensus 8.55% <ø> (ø)
protocol 34.51% <62.13%> (+0.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
protocol/rpcprovider/rpcprovider.go 8.81% <16.66%> (+7.70%) ⬆️
protocol/rpcprovider/rpcprovider_server.go 9.73% <64.94%> (+7.85%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Feb 16, 2026

Copy link
Copy Markdown

Test Results

    7 files  ±0     85 suites  ±0   30m 45s ⏱️ -36s
3 451 tests +5  3 450 ✅ +5  1 💤 ±0  0 ❌ ±0 
3 677 runs  +5  3 676 ✅ +5  1 💤 ±0  0 ❌ ±0 

Results for commit 6a73f8f. ± Comparison against base commit 0ba610d.

♻️ This comment has been updated with latest results.

AnnaR-prog and others added 4 commits February 16, 2026 18:01
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop unused block-hash range fetching from handleConsistency and remove the dead error return from GetParametersForCache.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit tests for handleConsistency branches and ensure the disable-consistency-checks flag is registered.

Co-authored-by: Cursor <cursoragent@cursor.com>
AnnaR-prog and others added 2 commits February 16, 2026 22:00
Co-authored-by: Cursor <cursoragent@cursor.com>
Use sentinel errors for unimplemented fake parser methods and return empty slices instead of nil to satisfy nilnil.
Format with gofumpt.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nimrod-teich nimrod-teich merged commit 946b52a into main Feb 17, 2026
31 checks passed
@nimrod-teich nimrod-teich deleted the fix_consistency branch February 17, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants