evmrpc: remove /block_results dependencies from block trace, sei_getCosmosTx, getHeader (CON-256)#3452
evmrpc: remove /block_results dependencies from block trace, sei_getCosmosTx, getHeader (CON-256)#3452wen-coding wants to merge 9 commits into
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR SummaryMedium Risk Overview Updates Tightens tests/fixtures: unit tests now validate gas-limit behavior via consensus params (and default when nil), and RPC IO fixtures bind to the seeded deploy tx’s Reviewed by Cursor Bugbot for commit 6bfcd40. 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).
|
|
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 #3452 +/- ##
==========================================
+ Coverage 59.05% 59.36% +0.30%
==========================================
Files 2188 2111 -77
Lines 182088 173431 -8657
==========================================
- Hits 107530 102953 -4577
+ Misses 64925 61588 -3337
+ Partials 9633 8890 -743
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The bounds check at association.go now produces a self-describing error rather than the opaque "transaction index out of range". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| @@ -24,6 +24,7 @@ import ( | |||
| sdk "github.com/sei-protocol/sei-chain/sei-cosmos/types" | |||
| receipt "github.com/sei-protocol/sei-chain/sei-db/ledger_db/receipt" | |||
There was a problem hiding this comment.
While we are here, receipt seems to be redundant alias and can be removed.
| sdk "github.com/sei-protocol/sei-chain/sei-cosmos/types" | ||
| receipt "github.com/sei-protocol/sei-chain/sei-db/ledger_db/receipt" | ||
| "github.com/sei-protocol/sei-chain/sei-tendermint/libs/bytes" | ||
| types2 "github.com/sei-protocol/sei-chain/sei-tendermint/proto/tendermint/types" |
There was a problem hiding this comment.
Would tenderminttypes be a better alias name?
Drop the redundant `receipt` alias (default name matches the path) and rename `types2` to `tenderminttypes` for readability. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Three eth-side block-scoped RPC paths leaned on
/block_resultsdata that isn't populated under Autobahn — they returned empty (or wrong) results regardless of block contents.debug_traceBlockBy*,sei_traceBlockBy*ExcludeTraceFail) now iterates the block's own tx list.sei_getCosmosTxlooks up the cosmos hash directly viareceipt.TransactionIndex, no iteration needed.getHeader(trace path's eth-block construction) sources gasLimit fromsdkCtx.ConsensusParams(), matching the block.go:489-491 pattern already used byeth_getBlockByNumber. Under legacy this also fixes a latent silent fallback toDefaultBlockGasLimit.Existing
.ioxfixtures only asserted response kind, so empty results / early-exit error paths looked indistinguishable from the fix; the trace fixtures now bind to the seeded deploy block and assert non-empty output, and a positive-casegetCosmosTx-deploy.ioxwas added.Test plan
go test ./evmrpc/(22.3s)go test ./evmrpc/tests/(27.7s)sei_getCosmosTxfix reverted) on Autobahn: 160/161 — exactly the newgetCosmosTx-deploy.ioxfixture failsgofmt -s -lclean