-
Notifications
You must be signed in to change notification settings - Fork 234
Patch Unlucky Tx
yihuang edited this page May 10, 2022
·
21 revisions
There's a known issue in 0.6.x
that when a transaction's execution exceeds the block gas limit, the execution side-effects are committed successfully, but the tx can't be found by the JSON-RPC APIs. The bug is fixed after the v0.7.0
upgrade, and a CLI command cronosd fix-unlucky-tx
is provided in the v0.6.10 release to fix the historical block data for RPC nodes.
If you want to fully patch the historical block data, can follow such procedure:
- Update
cronosd
binary tov0.6.10
. - Prepare a temporary node, sync to block height
2693800
(v0.7.0
upgrade point). - Make sure the node is stopped.
- Run
cronosd fix-unlucky-tx --end-block 2693799
.
After the full patch, that unlucky txs will be returned in JSON-RPC responses.
But a full patch could take days to finish, you can share the patched DB snapshot to other nodes to avoid repeating this on multiple nodes.
The command also provides several flags to support flexible usage:
- Patch a range of blocks:
cronosd fix-unlucky-tx --start-block $START_BLOCK_NUMBER --end-block $END_BLOCK_NUMBER
, the range is inclusive. - Print the block numbers and tx indexes which need to be patched without actual patching, it's significantly faster than doing patching:
cronosd fix-unlucky-tx --start-block $START_BLOCK_NUMBER --end-block $END_BLOCK_NUMBER --print-block-numbers
- Read the block numbers to patch from a file (one block number per line):
cronosd fix-unlucky-tx --blocks-file /path/to/file