-
Notifications
You must be signed in to change notification settings - Fork 288
Patch Block Gas Exceeded Receipts
Transactions that exceed the block gas limit (ExceedBlockGasLimit, ABCI code 11) have fees deducted and nonces incremented, but older node binaries failed to index them in the KV indexer. As a result, eth_getTransactionReceipt returns null and eth_getBlockReceipts omits these transactions for affected historical blocks.
This is related to the earlier Patch Unlucky Tx issue (Cronos v0.6.x era), but affects later blocks where the KV indexer was not populated for block-gas-exceeded transactions.
Fixed in: crypto-org-chain/ethermint#923
-
eth_getBlockReceiptsreturns an incomplete list — missing transactions that hit the block gas limit -
eth_getTransactionReceiptreturnsnullfor known block-gas-exceeded transaction hashes - The transaction IS on-chain (fees paid, nonce incremented) but invisible to JSON-RPC
The KV indexer is required for eth_getTransactionReceipt to work. Without it, the node falls back to the CometBFT TM indexer, which cannot index block-gas-exceeded transactions (no events are emitted for them).
In ~/.cronos/config/app.toml:
[json-rpc]
enable-indexer = trueRestart the node after enabling.
Use a Cronos binary that includes ethermint#923. This fix is included in:
-
release/v0.23.x(ethermint backport #935) -
release/v0.23.x-cronosv1.7-optstaking(ethermint backport #936)
After deploying the patched binary, eth_getBlockReceipts works immediately — no re-indexing required. The fix uses a block-walk that reads transactions directly from the block store, bypassing the KV indexer.
Verify:
curl -s localhost:8545 -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["0xB15BEB"],"id":1}'eth_getTransactionReceipt (standalone) reads from the KV indexer. Historical block-gas-exceeded transactions that were never indexed will still return null after upgrading.
To fix, re-index the affected blocks using the index-eth-tx range subcommand (available in the patched binary):
# Node can be running — command reads from local blockstore directly
cronosd index-eth-tx range <start_block> <end_block> --home ~/.cronos/
# Example: re-index a single block
cronosd index-eth-tx range 11609995 11609995 --home ~/.cronos/
# Example: re-index a range covering multiple affected blocks
cronosd index-eth-tx range 11600000 11630000 --home ~/.cronos/The command prints each block number as it processes it. No node restart required.
If the affected block range is unknown or widespread, delete the KV indexer database and run a full re-index:
Warning: On an archive node with millions of blocks, full re-indexing takes hours to days. The node remains functional during re-indexing, but
eth_getTransactionReceiptfor un-indexed historical blocks will returnnulluntil those blocks are processed.
# Stop the node
sudo systemctl stop cosmovisor
# Delete the KV indexer database
rm -rf ~/.cronos/data/eth_tx_indexer
# Restart — the indexer service will re-index forward from genesis
sudo systemctl start cosmovisor
# Or run backward from current tip to genesis in a separate process
nohup cronosd index-eth-tx backward --home ~/.cronos/ > /tmp/reindex.log 2>&1 &
tail -f /tmp/reindex.logcurl -s localhost:8545 -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["<TX_HASH>"],"id":1}'The response should now contain a receipt with "status": "0x0" (failed) instead of null.
Block-gas-exceeded transactions are charged fees and increment the sender nonce, but the EVM execution is rolled back. The receipt correctly shows:
-
status: 0x0(failed) -
gasUsed= the transaction's gas limit (full gas charged by ante handler) - Empty
logsarray
- Patch Unlucky Tx — earlier (v0.6.x) manifestation of the same class of issue
-
ethermint#923 — fix for
eth_getBlockReceipts -
ethermint#938 —
index-eth-tx rangesubcommand