Skip to content

Patch Block Gas Exceeded Receipts

jay.tseng edited this page May 13, 2026 · 1 revision

Patch Block-Gas-Exceeded Transaction Receipts

Background

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


Symptoms

  • eth_getBlockReceipts returns an incomplete list — missing transactions that hit the block gas limit
  • eth_getTransactionReceipt returns null for known block-gas-exceeded transaction hashes
  • The transaction IS on-chain (fees paid, nonce incremented) but invisible to JSON-RPC

Prerequisites

1. Enable the KV indexer

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 = true

Restart the node after enabling.

2. Deploy a binary with the fix

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)

Fix A: eth_getBlockReceipts

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}'

Fix B: eth_getTransactionReceipt

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):

Re-index specific known blocks

# 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.

Re-index all historical blocks (full recovery)

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_getTransactionReceipt for un-indexed historical blocks will return null until 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.log

Verify

curl -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.


Why these transactions appear failed

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 logs array

Related

Clone this wiki locally