Skip to content

chore: sei legacy RPC deprecation#3109

Merged
mojtaba-esk merged 4 commits intomainfrom
mojtaba/sei-legacy-rpc-deprecation
Mar 24, 2026
Merged

chore: sei legacy RPC deprecation#3109
mojtaba-esk merged 4 commits intomainfrom
mojtaba/sei-legacy-rpc-deprecation

Conversation

@mojtaba-esk
Copy link
Contributor

Describe your changes and provide context

This PR proposes a flag for deprecated sei RPCs.
It deprecates legacy sei_* / sei2_* JSON-RPC on the EVM HTTP surface. Access is controlled by [evm].enabled_legacy_sei_apis in app.toml; enforcement is centralized in wrapSeiLegacyHTTP (sei_legacy_http.go) so handlers don't duplicate gate logic.

Behavior:

Methods not in the allowlist: HTTP 200, JSON-RPC error (-32601), message explains disabled + deprecated, data: legacy_sei_deprecated.
Methods in the allowlist: response body unchanged; optional HTTP header Sei-Legacy-RPC-Deprecation on success so clients can detect legacy usage.

Config / defaults
seid init / template documents the allowlist; docker localnet enables gated methods broadly (sei_sign left off by default for testing purposes).
HTTPConfig.SeiLegacyAllowlist wires the list from app config into the server.

Related issues: https://linear.app/seilabs/issue/PLT-148/epic-audit-and-deprecation-plan-for-sei-rpc-endpoints

@github-actions
Copy link

github-actions bot commented Mar 23, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 24, 2026, 6:23 AM

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 65.35433% with 88 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.59%. Comparing base (491d2c6) to head (1420093).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
evmrpc/sei_legacy_http.go 68.00% 34 Missing and 14 partials ⚠️
integration_test/evm_module/rpc_io_test/io.go 34.48% 17 Missing and 2 partials ⚠️
evmrpc/sei_legacy.go 73.13% 14 Missing and 4 partials ⚠️
evmrpc/config/config.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3109      +/-   ##
==========================================
- Coverage   58.60%   58.59%   -0.01%     
==========================================
  Files        2096     2098       +2     
  Lines      173400   173535     +135     
==========================================
+ Hits       101621   101686      +65     
- Misses      62739    62795      +56     
- Partials     9040     9054      +14     
Flag Coverage Δ
sei-chain-pr 69.68% <65.35%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
evmrpc/rpcstack.go 74.91% <100.00%> (+0.09%) ⬆️
evmrpc/server.go 91.58% <100.00%> (+0.08%) ⬆️
evmrpc/tests/utils.go 70.83% <100.00%> (+0.15%) ⬆️
evmrpc/config/config.go 85.71% <0.00%> (-2.93%) ⬇️
evmrpc/sei_legacy.go 73.13% <73.13%> (ø)
integration_test/evm_module/rpc_io_test/io.go 74.64% <34.48%> (-4.71%) ⬇️
evmrpc/sei_legacy_http.go 68.00% <68.00%> (ø)

... and 26 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.

# HTTP 200; gate errors: JSON-RPC error (data legacy_sei_deprecated). Success: unchanged body; optional header Sei-Legacy-RPC-Deprecation.
# Same allowlist as docker/localnode (all gated methods except sei_sign for integration coverage).
enabled_legacy_sei_apis = [
# "sei_sign"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit - remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left it here intentionally commented to show explicitly that this one is not enabled. we can remove it as well. no worries.

# disabled-method path; sei_sign is not in partner telemetry and has no rpc_io_test fixtures).
# Production defaults from seid init remain the three-method sei_* allowlist - see evmrpc/config.
enabled_legacy_sei_apis = [
# "sei_sign",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit - remove?

Copy link
Contributor

@monty-sei monty-sei left a comment

Choose a reason for hiding this comment

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

@mojtaba-esk mojtaba-esk added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit f7104d8 Mar 24, 2026
38 checks passed
@mojtaba-esk mojtaba-esk deleted the mojtaba/sei-legacy-rpc-deprecation branch March 24, 2026 07:38
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