-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem: The unlucky transactions are not shown in json rpc #455
Comments
is also one solution if the tm tx indexer isn't used: #451 (comment) ? |
yes, I've added that to the comment, the other thing to patch is the tx result, need to replay the block to get it. |
@yihuang Does the nonce of the unlucky reverted transaction count? If I send a tx with nonce 10, with V0.7.0 it is reverted if it is the unlucky tx. Does the next tx from this address need to have a nonce of 10 or 11? It should be 11 like a normal reverted tx. |
nonce is increased too, it should be 11 like a normal reverted tx. |
Closes: crypto-org-chain#455 - add patch-tx-result command - test in integration test
Closes: crypto-org-chain#455 - add patch-tx-result command - test in integration test
Closes: crypto-org-chain#455 - add patch-tx-result command - test in integration test
Closes: crypto-org-chain#455 - add patch-tx-result command - test in integration test
* Problem: The unlucky transactions are not shown in json rpc Closes: #455 - add patch-tx-result command - test in integration test * support psql indexer * fix integration test * tag dependency * Update cmd/cronosd/cmd/fix-unlucky-tx.go * Apply suggestions from code review * create a refresh app to replay tx * enable lazy loading * add dry-run flag * fix lint * more convinient flags * Update cmd/cronosd/cmd/fix-unlucky-tx.go Co-authored-by: Thomas Nguy <[email protected]> * fix integration test * fix lint * Apply suggestions from code review * add a warning in help text Co-authored-by: Thomas Nguy <[email protected]>
What is Unlucky Tx
The transactions whose execution happens to exceed block gas limit are not shown in json-rpc response, there's at most one in each block when it includes more tx than capacity.
Before
v0.7.0
, these transactions are executed successfully but return error in deliver tx response, afterv0.7.0
, the executions are reverted, and return the same error in response as before. In both cases, the tx can't be found in json-rpc response.How To Identify The Unlucky Tx
How To Patch Tendermint DB
Tx Hash Index
Currently json-rpc using
/tx_search
to find tx info by eth tx hash, so we need to have those eth tx hashes indexed.For the legacy blocks before upgrade, we need to patch the tx indexer db to add the missing txs.
For new blocks, we should change the code to emit a eth tx hash event in ante handler, so the failed tx can be indexed.
Tx Result
Need to patch the tx result of the unlucky txs before v0.7.0 upgrade
DB Keys To Patch
ethereum_tx.ethereumTxHash/{ETH_HASH}/{res.Height}/{res.Index}
, Value: tm hash.tm hash
, Value:abci.TxResult
.abciResponsesKey:{height}
, Value:tmstate.ABCIResponses
.How To Replay A Block
The text was updated successfully, but these errors were encountered: