-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Check recovered sender address before including txs in the TransactionsByPriceAndNonce list #667
Conversation
…ress, to account for sending EIP155 externally signed txs before the EIP155 block
Hi @jimthematrix, I did some testing after applying the fix, and the changes look good when |
@jbhurat thanks for the feedback, my understanding is that the panic should still happen on the minter node (raft leader) if EIP155 is not configured. the pending queue is most likely due to a failing tx from the previous tx (since an EIP155 signed tx can't pass pre-check validation on a non-EIP155 chain due to signature containing the chainId), meaning to recover you would have to send in a new tx with the same nonce and higher gas price. |
When EIP155 configuration is missing I no longer see the panic on the minter node, instead if EIP155 signed transaction is submitted on minter, the transaction is lost. Subsequent non-EIP155 signed transaction work fine. On verifier nodes, EIP155 signed transactions and any subsequent non-EIP155 signed transaction stuck in pending queue. I am going to open a new issue on how to handle missing EIP155 configuration |
@jimthematrix thanks for your PR!
The leader node shouldn't panic regardless of the type of the transaction.
Can we add a validation so that the transaction fails and it isn't stuck in the pending queue on the originating node ? |
@jbhurat @jpmsam thanks for the details, I realized my comment could be misleading, I meant to say that without the fix the minter should still panic on an EIP155 signed tx submission, if EIP155 is not configured in the genesis block at all. with the fix that definitely should not happen any longer. sorry about the confusion. thanks for identifying issue #672, I agree that should be a good enhancement |
Check recovered sender address before including txs in the TransactionsByPriceAndNonce list
This fixes a panic error that can happen when externally signed EIP155 transactions are submitted before the EIP155 block according to the chain config.
The panic of the minter:
For RAFT there is a very good chance that Quorum chains may be set up either without EIP155 configuration or EIP155 block is set to a number higher than 1, such that an externally signed transactions with EIP155 signer can cause the chain to be broken forever. there's no recovery from this state as far as we are aware.
The fix is to check the returned error by
Sender()
method and exclude the offending transaction list from the TransactionsByPriceAndNonce list used by the minter. The tx will be stuck in the txpool but future transactions, non EIP155 txs on any block or EIP155 txs after the EIP155 blocks, will get minted properly