Skip to content

Remove remaining unused legacy sei_* APIs - #3927

Merged
masih merged 5 commits into
mainfrom
masih/more-sei-api-cleanup
Aug 18, 2026
Merged

Remove remaining unused legacy sei_* APIs#3927
masih merged 5 commits into
mainfrom
masih/more-sei-api-cleanup

Conversation

@masih

@masih masih commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Remove these legacy JSON-RPC methods:

  • sei_associate
  • sei_getBlockByHash
  • sei_getBlockByHashExcludeTraceFail
  • sei_getBlockTransactionCountByHash
  • sei_getBlockTransactionCountByNumber
  • sei_getEvmTx
  • sei_getFilterChanges
  • sei_getFilterLogs
  • sei_getLogs
  • sei_getTransactionByBlockHashAndIndex
  • sei_getTransactionByBlockNumberAndIndex
  • sei_getTransactionByHash
  • sei_getTransactionCount
  • sei_getTransactionErrorByHash
  • sei_getTransactionReceiptExcludeTraceFail
  • sei_getVMError
  • sei_newBlockFilter
  • sei_newFilter
  • sei_sign
  • sei_uninstallFilter

Delete their handlers, registrations, allowlist entries, tests, fixtures, CLI support, and documentation. Preserve the actively used legacy APIs and all eth_* methods unchanged.

Remove these legacy JSON-RPC methods:

* sei_associate
* sei_getBlockByHash
* sei_getBlockByHashExcludeTraceFail
* sei_getBlockTransactionCountByHash
* sei_getBlockTransactionCountByNumber
* sei_getEvmTx
* sei_getFilterChanges
* sei_getFilterLogs
* sei_getLogs
* sei_getTransactionByBlockHashAndIndex
* sei_getTransactionByBlockNumberAndIndex
* sei_getTransactionByHash
* sei_getTransactionCount
* sei_getTransactionErrorByHash
* sei_getTransactionReceiptExcludeTraceFail
* sei_getVMError
* sei_newBlockFilter
* sei_newFilter
* sei_sign
* sei_uninstallFilter

Delete their handlers, registrations, allowlist entries, tests, fixtures, CLI support, and documentation. Preserve the actively used legacy APIs and all eth_* methods unchanged.
@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 17, 2026, 10:55 AM

@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.47%. Comparing base (46671fb) to head (8012202).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3927      +/-   ##
==========================================
- Coverage   59.51%   58.47%   -1.04%     
==========================================
  Files        2326     2229      -97     
  Lines      198890   187511   -11379     
==========================================
- Hits       118367   109653    -8714     
+ Misses      69279    67504    -1775     
+ Partials    11244    10354     -890     
Flag Coverage Δ
sei-chain-pr 67.36% <100.00%> (?)
sei-db 70.62% <ø> (+0.21%) ⬆️
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/association.go 68.88% <100.00%> (+28.69%) ⬆️
evmrpc/block.go 83.33% <100.00%> (-0.11%) ⬇️
evmrpc/config/config.go 97.27% <ø> (ø)
evmrpc/sei_legacy.go 76.11% <ø> (ø)
evmrpc/server.go 87.67% <100.00%> (-1.07%) ⬇️
evmrpc/tracers.go 69.29% <ø> (-0.41%) ⬇️
evmrpc/tx.go 83.38% <100.00%> (+0.30%) ⬆️
evmrpc/utils.go 73.68% <ø> (-0.50%) ⬇️
x/evm/client/cli/tx.go 29.38% <ø> (+1.87%) ⬆️

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

@masih
masih marked this pull request as ready for review August 15, 2026 17:06
@cursor

cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown

PR Summary

High Risk
This is a breaking RPC and CLI change for any integration still calling removed sei_* methods; operators must migrate before upgrade, though standard eth_* behavior is intentionally unchanged.

Overview
Removes the bulk of the deprecated sei_* JSON-RPC surface on EVM HTTP: block queries, transaction lookups, filters, log queries, sei_associate, sei_sign, VM-error helpers, and the *ExcludeTraceFail variants. Callers must use eth_* for EVM data and seid tx evm native-associate for address association.

The sei namespace now only exposes address/Cosmos helpers (sei_getSeiAddress, sei_getEVMAddress, sei_getCosmosTx) and sei_getTransactionReceipt (synthetic-aware, still opt-in via enabled_legacy_sei_apis). SeiBlockAPI, the sei filter service, and sei_associate RPC/CLI are dropped; block/receipt encoding no longer branches on a Sei “include synthetic / exclude untraceable” path.

Config and docs shrink the legacy allowlist in app.toml templates, CHANGELOG documents the migration, and tests/fixtures drop sei_* coverage in favor of eth_* where applicable.

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

@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 removal of the 20 legacy sei_* methods is thorough and internally consistent — handlers, registrations, allowlist, config template, fixtures, and docs all move together with no dangling references. However, the replacement of seid tx evm associate-address with seid tx evm native-associate in contracts/test/lib.js omits -y, so the association tx is never broadcast and the integration suite's association paths break.

Findings: 1 blocking | 6 non-blocking | 5 posted inline

Blockers

  • None at the file/PR level.
  • 1 blocking issue(s) flagged inline on specific lines.

Non-blocking

  • No CHANGELOG entry. This PR removes 20 JSON-RPC methods and the seid tx evm associate-address CLI command — a client-breaking and CLI-breaking change for node operators and integrators. The Unreleased section already carries an ### Upgrade guide stanza from #3818; this change warrants an entry there (which sei_* methods were removed, what to migrate to, and that associate-address is replaced by native-associate).
  • integration_test/evm_module/rpc_io_test/RPC_IO_README.md:20 still says the deprecation header is asserted on "successful allowlisted calls", but the only fixture that asserts it (deprecation-success.iox) now expects a JSON-RPC error body. Either point the fixture at a call that returns a result (e.g. sei_getTransactionReceipt on a seeded tx hash) or reword the README — the gate sets the header regardless of the inner response, so the current fixture no longer pins the "success body unchanged" property its name and the README claim.
  • 4 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread contracts/test/lib.js Outdated
Comment thread evmrpc/tests/block_test.go Outdated
Comment thread evmrpc/tests/block_test.go Outdated
Comment thread evmrpc/block.go Outdated
Comment thread evmrpc/README.md Outdated
@masih

masih commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

@seidroid review

seidroid[bot]
seidroid Bot previously requested changes Aug 17, 2026

@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 removal of the 20 legacy sei_* methods remains thorough and internally consistent (handlers, registrations, allowlist, config template, fixtures, docs, CLI), and every finding from the previous round is addressed. One new blocker: the associate-addressnative-associate migration turns a fee-free EVM-RPC call into a fee-bearing Cosmos tx, but the new invocations omit --fees, so they are rejected at CheckTx on the localnet and the association never lands.

Findings: 1 blocking | 5 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.
  • 1 blocking issue(s) flagged inline on specific lines.

Non-blocking

  • shouldIncludeSynthetic is now effectively dead. With the sei-namespace FilterAPI registration gone, NewFilterAPI is only ever called with "eth" (evmrpc/server.go:165), so LogFetcher.includeSyntheticReceipts is a constant false: the namespace == "sei" branch in evmrpc/utils.go:308 is unreachable and the if f.includeSyntheticReceipts branch at evmrpc/filter.go:1462 is dead. Same shape for EncodeTmBlock's remaining includeSyntheticTxs parameter — both production call sites now pass false and only tests pass true. Finishing the collapse would keep the log/block paths readable as a single flow.
  • NewSeiTransactionAPI sets baseAPI.includeSynthetic = true (evmrpc/tx.go:90) while SeiTransactionAPI.GetTransactionReceipt independently hardcodes true (evmrpc/tx.go:95) — two sources of truth for the same decision. Delegating to t.transactionAPI.GetTransactionReceipt(ctx, hash) would leave one.
  • registerCW20Pointer (evmrpc/tests/tx.go:112) is now orphaned — TestGetSeiBlockByHash was its only caller. unused isn't in .golangci.yml, so nothing will flag it.
  • sei_legacy_deprecation/deprecation-success.iox no longer matches its name: it now asserts the deprecation header on a call whose body is a JSON-RPC error, and its request/response is a duplicate of sei_getSeiAddress/getSeiAddress-not-found.io. The README wording was correctly updated to "forwarded" calls; renaming the fixture (e.g. deprecation-header-on-error.iox) would stop the filename from contradicting it.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread contracts/test/lib.js
write_fixture "flatkv_evm_storage_slot.txt" "$STORAGE_SLOT_ZERO"

run_seid tx evm associate-address \
run_seid tx evm native-associate integration-test \

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] Same missing --fees as contracts/test/lib.js: this is now a Cosmos tx subject to the 0.01usei min gas price, so with no fee it is rejected at CheckTx. Here the || true on line 158 swallows it, so the fixture is generated with $FROM unassociated and nothing reports why. Add --fees 20000usei.

@masih
masih dismissed seidroid[bot]’s stale review August 17, 2026 11:51

False positive with review context updated here: #3933

masih added a commit that referenced this pull request Aug 17, 2026
Update context to avoid false positive AI review comment; see:
*
#3927 (comment)
"sei_getTransactionByHash",
"sei_getTransactionCount",
"sei_getTransactionErrorByHash",
"sei_getTransactionReceipt",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can this be removed as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yup follow up PR will do that. I have another one brewing

Comment thread evmrpc/config/config.go
# "sei_getTransactionCount",
# "sei_getTransactionErrorByHash",
# Optional legacy method - uncomment to enable (same deprecation applies):
# "sei_getTransactionReceipt",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto on this to remove

@masih
masih added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit c805c5c Aug 18, 2026
124 of 128 checks passed
@masih
masih deleted the masih/more-sei-api-cleanup branch August 18, 2026 09:19
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