Remove remaining unused legacy sei_* APIs - #3927
Conversation
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.
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
PR SummaryHigh Risk Overview The Config and docs shrink the legacy allowlist in Reviewed by Cursor Bugbot for commit 8012202. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
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-addressCLI command — a client-breaking and CLI-breaking change for node operators and integrators. TheUnreleasedsection already carries an### Upgrade guidestanza from #3818; this change warrants an entry there (whichsei_*methods were removed, what to migrate to, and thatassociate-addressis replaced bynative-associate). integration_test/evm_module/rpc_io_test/RPC_IO_README.md:20still 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_getTransactionReceipton 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.
|
@seidroid review |
There was a problem hiding this comment.
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-address → native-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
shouldIncludeSyntheticis now effectively dead. With thesei-namespaceFilterAPIregistration gone,NewFilterAPIis only ever called with"eth"(evmrpc/server.go:165), soLogFetcher.includeSyntheticReceiptsis a constantfalse: thenamespace == "sei"branch inevmrpc/utils.go:308is unreachable and theif f.includeSyntheticReceiptsbranch atevmrpc/filter.go:1462is dead. Same shape forEncodeTmBlock's remainingincludeSyntheticTxsparameter — both production call sites now passfalseand only tests passtrue. Finishing the collapse would keep the log/block paths readable as a single flow.NewSeiTransactionAPIsetsbaseAPI.includeSynthetic = true(evmrpc/tx.go:90) whileSeiTransactionAPI.GetTransactionReceiptindependently hardcodestrue(evmrpc/tx.go:95) — two sources of truth for the same decision. Delegating tot.transactionAPI.GetTransactionReceipt(ctx, hash)would leave one.registerCW20Pointer(evmrpc/tests/tx.go:112) is now orphaned —TestGetSeiBlockByHashwas its only caller.unusedisn't in.golangci.yml, so nothing will flag it.sei_legacy_deprecation/deprecation-success.ioxno 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 ofsei_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.
| write_fixture "flatkv_evm_storage_slot.txt" "$STORAGE_SLOT_ZERO" | ||
|
|
||
| run_seid tx evm associate-address \ | ||
| run_seid tx evm native-associate integration-test \ |
There was a problem hiding this comment.
[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.
False positive with review context updated here: #3933
Update context to avoid false positive AI review comment; see: * #3927 (comment)
| "sei_getTransactionByHash", | ||
| "sei_getTransactionCount", | ||
| "sei_getTransactionErrorByHash", | ||
| "sei_getTransactionReceipt", |
There was a problem hiding this comment.
can this be removed as well?
There was a problem hiding this comment.
Yup follow up PR will do that. I have another one brewing
| # "sei_getTransactionCount", | ||
| # "sei_getTransactionErrorByHash", | ||
| # Optional legacy method - uncomment to enable (same deprecation applies): | ||
| # "sei_getTransactionReceipt", |
There was a problem hiding this comment.
ditto on this to remove
Remove these legacy JSON-RPC methods:
Delete their handlers, registrations, allowlist entries, tests, fixtures, CLI support, and documentation. Preserve the actively used legacy APIs and all eth_* methods unchanged.