evmrpc: drop dead isPanicOrSynthetic param from EncodeTmBlock (CON-296)#3451
evmrpc: drop dead isPanicOrSynthetic param from EncodeTmBlock (CON-296)#3451wen-coding wants to merge 1 commit into
Conversation
The parameter has been plumbed through EncodeTmBlock since PR #2058 but unused inside the function body since PR #2388's cherry-pick (Sep 2025) refactored the loop to source msgs from filterTransactions. The plumbing covers SeiBlockAPI.isPanicTx, NewSeiBlockAPI/NewSei2BlockAPI constructor params, getBlockByHash/getBlockByNumber signatures, and the server.go wiring — drop them all. No replacement check. Per evmrpc/README.md's "Tracing Failure Management Endpoints" section, the *ExcludeTraceFail block endpoints should filter out txs "included in blocks but not executed" — synthetic and pre-state-check failures. filterTransactions already drops both: synthetic via the includeSyntheticTxs=false path, ante failures via isReceiptFromAnteError. Reverts ran in the VM and produce valid traces; the README's intent does not exclude them. PR #2058's original logic (re-trace and filter on trace.Error) caught ante failures but kept reverts — consistent with the README. PR #2388 dropped the call when refactoring to filterTransactions; the dead param was a silent regression at the time but it didn't change visible behavior because filterTransactions's isReceiptFromAnteError already covered the same set for the block path. So removing the param now is purely a cleanup: behavior is unchanged. The tx-side panic check (SeiTransactionAPI.isPanicTx, used by sei_getTransactionReceiptExcludeTraceFail) is kept — that endpoint checks before fetching the receipt so it can return ErrPanicTx to the client, a different shape from the block path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview Updates Reviewed by Cursor Bugbot for commit 6bc4bff. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3451 +/- ##
==========================================
- Coverage 59.29% 59.29% -0.01%
==========================================
Files 2125 2125
Lines 175629 175628 -1
==========================================
- Hits 104144 104143 -1
Misses 62404 62404
Partials 9081 9081
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
EncodeTmBlockhas carried anisPanicOrSynthetic func(...)parameter since PR #2058 (Jan 2025). PR #2388 (Sep 2025)'s cherry-pick refactored the loop to source msgs fromfilterTransactionsand dropped the in-loop call toisPanicOrSynthetic, but kept the parameter and the entire wiring chain that feeds it (SeiBlockAPI.isPanicTx,NewSeiBlockAPI/NewSei2BlockAPIconstructor params,getBlockByHash/getBlockByNumbersignatures, the closure inserver.go).This PR removes the dead parameter and its plumbing. No replacement check is added.
Why no replacement check
The relevant intent statement is in
evmrpc/README.md's "Tracing Failure Management Endpoints" section:So
*ExcludeTraceFailshould exclude:TxType == ShellEVMTxType)filterTransactions(includeSyntheticTxs=false)— explicit check at utils.go:262EffectiveGasPrice==0+ nonce VmError)filterTransactionsviaisReceiptFromAnteErrorat utils.go:249What's not in scope per the README: in-VM failures like reverts. Those have valid traces (the REVERT path is rendered inside the trace output,
trace.Errorstays empty), and the legacy trace-based implementation included them. SoEncodeTmBlockdoesn't need any additional per-tx panic filter — the two classes the README cares about are both already dropped before they reach the loop body.PR #2058's original logic (re-trace the block, filter on
trace.Error) was consistent with this —trace.Erroris set for ante failures (no execution to trace) but empty for reverts. PR #2388's silent regression (dead param) didn't change visible behavior on the block side, becausefilterTransactions'sisReceiptFromAnteErroralready covered the same set. So this PR is a no-op for behavior: it just removes the orphaned plumbing.Scope
EncodeTmBlock'sisPanicOrSyntheticparametergetBlockByHash/getBlockByNumber'sisPanicTxparameterSeiBlockAPI.isPanicTxfieldisPanicTxfromNewSeiBlockAPI/NewSei2BlockAPIconstructor signaturesisPanicOrSyntheticTxFuncarguments atserver.go'sNewSeiBlockAPI/NewSei2BlockAPIcall sitesevmrpc/height_availability_test.goEncodeTmBlockto drop thenilargumentThe tx-side
SeiTransactionAPI.isPanicTx(used bysei_getTransactionReceiptExcludeTraceFail) is kept. That endpoint checks before fetching the receipt so it can returnErrPanicTxto the client — a different shape from the block path. The tx-side discriminator itself is being corrected separately in #3450.Test plan
gofmt -s -lclean on all modified filesgo build ./...cleango test ./evmrpc/ -count=1passes (22s)go test ./evmrpc/tests/ -count=1passes (27s)🤖 Generated with Claude Code