fix(rpc): align eth_getBlockReceipts response with execution-apis spec#965
Conversation
|
@claude review PR |
|
Claude finished @XinyuCRO's task in 3m 24s —— View job PR Review:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #965 +/- ##
===========================================
+ Coverage 45.30% 45.38% +0.08%
===========================================
Files 197 197
Lines 17052 17072 +20
===========================================
+ Hits 7725 7748 +23
+ Misses 8511 8508 -3
Partials 816 816
🚀 New features to boost your workflow:
|
eth_getBlockReceipts response with execution-apis s…eth_getBlockReceipts response with execution-apis spec
|
LGTM, need to fix |
|
Claude finished @songgaoye's task in 2m 42s —— View job Tasks
Fix: Omit
|
|
Claude finished @songgaoye's task in 1m 25s —— View job Tasks
Status ReviewThe fix requested by @songgaoye (omit
|
| Issue | Status |
|---|---|
BlockNumberOrHash instead of BlockNumber |
✅ Done |
effectiveGasPrice for all tx types |
✅ Done |
blobGasUsed/blobGasPrice for BlobTx |
✅ Done (with explanatory comment) |
"safe" tag handling in decodeFromString |
✅ Done |
| Block lookup error propagated (not swallowed) | ✅ Done |
Omit effectiveGasPrice when baseFee unavailable |
✅ Done (latest commit) |
Tests Added
TestGetBlockReceipts_ByHash— validates hash-based lookup pathTestGetBlockReceipts_EmptyBlockNumberOrHashDefaultsToLatest— validates empty input fallbackTestBuildReceiptDirect_SetCodeTxEffectiveGasPrice— validates SetCode tx effectiveGasPriceTestBuildReceiptDirect_EIP1559_NilBaseFee— validates omission when baseFee unavailableTestGetBlockReceipts_BlockLookupError— validates error propagation
No Breaking Changes
This is a JSON-RPC layer change only — no consensus, state, Amino, or module changes.
The PR looks ready to merge. All review feedback has been addressed.
| View PR branch
9883477 to
82aec0c
Compare
Accept a block number, hash, or tag. The method signature changes from BlockNumber to BlockNumberOrHash across the EthereumAPI/EVMBackend interfaces and PublicAPI. A new tendermintBlockByNumberOrHash helper resolves a hash (via endermintBlockByHash), a number (via TendermintBlockByNumber), or an empty argument (defaults to latest). Previously only a bare block number was accepted, so spec-compliant clients passing a block hash or tag failed.
Support the safe block tag. BlockNumberOrHash.decodeFromString now maps safe (alongside latest/finalized) to the latest height; previously safe errored.
Propagate block-lookup errors. GetBlockReceipts no longer swallows a failed block lookup with return nil, nil — it
now returns the underlying error, so RPC callers see a real failure instead of an empty result.
Correct effectiveGasPrice for EIP-1559-style txs. For dynamic-fee, blob, and set-code (EIP-1559/4844/7702)
transactions, effectiveGasPrice is now omitted when baseFee is unavailable (pruned node or disabled fee market) rather than emitting GasFeeCap, which is the max fee and not the effective price. Legacy txs continue to report
effectiveGasPrice as before (the previously commented-out integration-test expectation is re-enabled).
Populate blob fields for blob txs. Blob (EIP-4844) transactions now include blobGasUsed and blobGasPrice in the
receipt (currently 0, as Ethermint does not yet execute blob-gas accounting).