Skip to content

Remove support for eth_getProof - #3926

Open
yzang2019 wants to merge 3 commits into
mainfrom
yzang/remove-ethGetProof
Open

Remove support for eth_getProof#3926
yzang2019 wants to merge 3 commits into
mainfrom
yzang/remove-ethGetProof

Conversation

@yzang2019

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

This PR removes the eth_getProof support and return with a proper error message.

Testing performed to validate your change

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 15, 2026, 4:12 AM

@cursor

cursor Bot commented Aug 14, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
This is a breaking RPC behavior change for any client that depended on eth_getProof returning IAVL proofs; impact is limited to that endpoint and mitigated by a stable -32000 error instead of silent removal.

Overview
eth_getProof no longer returns storage proofs. The method stays registered on the EVM RPC, but StateAPI.GetProof now immediately returns ErrEVMNotSupported (-32000) with a message that support is not available yet and callers should contact Sei Labs—matching other explicitly unsupported methods instead of -32601.

The previous implementation (block/watermark resolution, storage key limits, KV store unwrapping for IAVL/Queryable proofs) and related unit tests are removed. Documentation in docs/evm_jsonrpc_unsupported.md and evmrpc/AGENTS.md lists eth_getProof as deprecated pending future work. RPC I/O tests drop the three success .iox fixtures in favor of eth_getProof/not-supported.iox.

Reviewed by Cursor Bugbot for commit 8fd63c7. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8158cb8. Configure here.

Comment thread evmrpc/state.go
startTime := time.Now()
defer func() {
recordMetricsWithError(ctx, "eth_getProof", a.connectionType, startTime, returnErr, recover())
recordMetrics(ctx, "eth_getProof", a.connectionType, startTime)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetProof metrics recorded as success

Medium Severity

GetProof always returns an error but records metrics via recordMetrics, which treats the call as success. Other unsupported stubs pass returnErr into recordMetricsWithError, so eth_getProof will show as healthy and skip error-class counters.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8158cb8. Configure here.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.46%. Comparing base (d17806f) to head (8fd63c7).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3926      +/-   ##
==========================================
- Coverage   59.51%   58.46%   -1.06%     
==========================================
  Files        2326     2229      -97     
  Lines      199003   187747   -11256     
==========================================
- Hits       118438   109766    -8672     
+ Misses      69300    67604    -1696     
+ Partials    11265    10377     -888     
Flag Coverage Δ
sei-chain-pr 72.05% <100.00%> (?)
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

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

Files with missing lines Coverage Δ
evmrpc/state.go 72.30% <100.00%> (+8.12%) ⬆️

... and 155 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR cleanly replaces the eth_getProof implementation with a documented -32000 stub and updates docs/fixtures/tests consistently. Two non-blocking issues: the stub records every (always-failing) call as a metrics success, and the returned error string does not match the message recorded in the docs table and the not-supported.iox fixture.

Findings: 0 blocking | 4 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • Leftover dead code from the removed proof path: sei-cosmos/store/cachekv.(*Store).GetParent and giga/deps/store.(*Store).GetParent now have no non-test callers (the giga one has none at all), and StateAPI.tmClient is set in the constructor but no longer read anywhere in evmrpc/state.go. Worth cleaning up in this PR or a follow-up so the removal doesn't leave orphaned accessors behind.
  • ProofResult and its explanatory comment about IAVL-vs-trie proofs are retained even though nothing can produce one anymore. Keeping the type as the stub's return signature is reasonable, but the comment now documents behavior that no longer exists.
  • 2 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread evmrpc/state.go
startTime := time.Now()
defer func() {
recordMetricsWithError(ctx, "eth_getProof", a.connectionType, startTime, returnErr, recover())
recordMetrics(ctx, "eth_getProof", a.connectionType, startTime)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] recordMetrics delegates to recordMetricsWithError(..., nil, nil), so success is hardcoded to true — every eth_getProof call will now be counted as a success even though the method always returns an error, and the ErrEVMNotSupported error class / -32000 code bucket is never emitted. Every other intentionally-unsupported endpoint (eth_blobBaseFee, eth_syncing, eth_newPendingTransactionFilter, debug_getRaw*) uses the error-aware variant. Suggest matching them:

recordMetricsWithError(ctx, "eth_getProof", a.connectionType, startTime, returnErr, recover())

(Also flagged by Codex.)

Comment thread evmrpc/state.go Outdated
return nil, errNoProofCapableQueryableKVStore
}
return nil, fmt.Errorf("%w: exceeded unwrap depth", errNoProofCapableQueryableKVStore)
return nil, &ErrEVMNotSupported{Msg: "eth_getProof is not supported yet; please reach out to the Sei team if you need this endpoint"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] The message here ("eth_getProof is not supported yet; please reach out...") does not match what the PR documents: both docs/evm_jsonrpc_unsupported.md and integration_test/.../eth_getProof/not-supported.iox record "eth_getProof is not supported yet on Sei EVM RPC; please reach out...". Neither catches the drift — specOnly only compares result/error presence, and TestGetProofNotSupported uses require.Contains on the shared prefix. Adding on Sei EVM RPC here keeps the code the single source of truth and matches the phrasing of every other unsupported-method message.

@yzang2019
yzang2019 enabled auto-merge August 14, 2026 20:23
@yzang2019
yzang2019 added this pull request to the merge queue Aug 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 14, 2026
@yzang2019
yzang2019 enabled auto-merge August 15, 2026 04:10
@yzang2019
yzang2019 added this pull request to the merge queue Aug 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 15, 2026
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.

4 participants