evmrpc: derive *ExcludeTraceFail from receipt store, not block trace (CON-257)#3402
Open
wen-coding wants to merge 1 commit intomainfrom
Open
evmrpc: derive *ExcludeTraceFail from receipt store, not block trace (CON-257)#3402wen-coding wants to merge 1 commit intomainfrom
wen-coding wants to merge 1 commit intomainfrom
Conversation
isPanicOrSyntheticTx previously called TraceBlockByNumber on the receipt's block and decided the answer from trace.Error / trace-list absence. Under Autobahn, sei-tendermint's BlockResults stub returns no TxsResults (the trace path has nothing to iterate), so debug_traceBlockByNumber returns [] and every tx looks "synthetic" — making sei_getTransactionReceiptExcludeTraceFail and the trace-block ExcludeTraceFail variants always exclude every tx. Replace the trace-based decision with a receipt-store read: GetReceipt error → exclude (no trace anyway) TxType == ShellEVMTxType (synthetic) → exclude (no real EVM tx) Status == 0 (failed receipt, post #3383) → exclude (panic-like) Status == 1 → include This is functionally equivalent under legacy/V2 (status-0 receipts also have trace.Error set in callTracer), and strictly correct under Autobahn where the block trace can't distinguish synthetic from anything else. Side benefit: a single receipt-store lookup instead of a full block re-trace. When BlockResults.TxsResults is eventually wired through Autobahn (e.g. via Cody's litt block store), the trace-based path could come back as a richer alternative, but this check doesn't need it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
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 #3402 +/- ##
==========================================
+ Coverage 59.10% 59.16% +0.06%
==========================================
Files 2101 2101
Lines 173195 173578 +383
==========================================
+ Hits 102360 102699 +339
- Misses 61955 61988 +33
- Partials 8880 8891 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
codchen
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isPanicOrSyntheticTx(used bysei_getTransactionReceiptExcludeTraceFail,sei_traceBlockByHash/NumberExcludeTraceFail) previously re-traced thereceipt's block and decided panic/synthetic from
trace.Errorandtrace-list absence.
Under Autobahn, sei-tendermint's
BlockResultsstub(
sei-tendermint/internal/rpc/core/blocks.go:260) returns noTxsResults— the per-tx ABCI responses aren't persisted. So the block trace returns
[]for any block, and every tx hash looks "synthetic" → every*ExcludeTraceFailcall returnsErrPanicTx.This PR sources the same decision from the receipt store directly:
The receipt store is fully populated under Autobahn (off-tree pebble DB,
written via
FlushTransientReceiptsat PreCommit), so this works withoutthe deferred
BlockResults.TxsResultsfollow-up.Behavior
Status==0andtrace.Error != ""gohand-in-hand for receipts written through
WriteReceipt(revert / OOG/ EIP-7623 floor / etc.).
sei_getTransactionReceiptExcludeTraceFailfrom broken to working.re-trace.
When
BlockResults.TxsResultsis eventually wired through Autobahn (likelyvia Cody's litt block store), the trace-based path can come back as a
richer alternative, but this check doesn't need it.
Test plan
make test-evm-rpc-io(docker localnet, Giga + OCC + Autobahn): 160/160 passsei_getTransactionReceiptExcludeTraceFailwasfailing with
code=-32000 message="transaction is panic tx"becausethe empty trace-list path treated every tx as synthetic.
gofmt -s -lcleango build ./...clean🤖 Generated with Claude Code