firefly-ethconnect icon indicating copy to clipboard operation
firefly-ethconnect copied to clipboard

Awareness of the block rewind situation after a non-graceful shutdown

Open jimthematrix opened this issue 3 years ago • 0 comments

When geth experiences a non-graceful crash, ethconnect will retry the pending transactions. The eth_estimateGas calls will be made during the retries.

After the node recovers, it will perform a rewind to a previous full block.

At this point, ethconnect will be retrying the eth_estimateGas calls, which fails because it's chain repair state. EthConnect then attempts an eth_call request to try to discover the error that caused the failure. Since the eth_call request is made at the original block height, geth will return block not found error and fail the transaction. EthConnect believes it's the actual cause of the tx failure and returns it to the client.

What it should do is detecting that "block not found" is returned and recognize that it's likely a block rewind situation, and continues to retry.

jimthematrix avatar Jan 21 '22 16:01 jimthematrix