evm-rpc: skip cumulativeGasUsed check on hedera-mainnet (fix dump crash-loop)#522
Open
elina-chertova wants to merge 1 commit into
Open
evm-rpc: skip cumulativeGasUsed check on hedera-mainnet (fix dump crash-loop)#522elina-chertova wants to merge 1 commit into
elina-chertova wants to merge 1 commit into
Conversation
Hedera's eth_getBlockReceipts returns a phantom duplicate receipt (a tx appearing at an index not present in the block). The duplicate is filtered out to keep the receipt count consistent, but the block's on-chain cumulativeGasUsed still accounts for the dropped copy, so the 'cumulative == prev + gasUsed' running-sum assertion can never hold once the duplicate is removed. The uncaught assert crash-loops the dump process. Skip the running-sum check on hedera-mainnet (both the by-block and by-tx paths), consistent with the existing isHederaMainnet special-casing. Adds a regression test using real data from block 97395350.
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.
Problem
dump-hedera-mainnet-0is crash-looping on a fatal assertion at block 97395350, producing two correlated alerts (qHLvLh lead, Ds4EYo follower):Root cause
Hedera's
eth_getBlockReceiptsreturns a phantom duplicate receipt — tx0xe305d666appears both at its real index 8 (gasUsed=0) and again at a phantom index 12 (gasUsed=37977) that is not in the block's transaction list. Confirmed genuine across three independent providers (linkpool, hashio, thirdweb).The recent dedup fix (
cdf0a60c) correctly drops the phantom by transaction index, restoring the receipt count. But the block's on-chaincumulativeGasUsed(idx14 = 245566) still counts the dropped phantom's 37977 gas. So thecheckCumulativeGasUsedrunning-sum invariant (cumulative == prev + gasUsed) becomes unsatisfiable:181262 + 26327 = 207589 ≠ 245566— exactly the crash. The assert propagates uncaught → process crash → crash-loop → both alerts.Fix
Skip the running-sum
checkCumulativeGasUsedonhedera-mainnet(both the by-block and by-tx paths), consistent with the existingisHederaMainnetspecial-casing. Hedera uses non-standard Hashgraph hashing/receipt semantics, like the already-excluded stable/cronos/bittensor chains.Tests
rpc.test.tsusing real data from block 97395350 — RED reproduces the exact production crash (207589n vs 245566n), GREEN after the fix.hederafixture to the loader; addedhederatoverification.test.tsskips (non-standard roots:transactionsRoot == block hash, all-zeroswithdrawalsRoot).rush build(tsc) +rush test(vitest) → 156 passed, 31 skipped. Rush change file included.🤖 Generated during automated alert investigation qHLvLh.