EVM/node: transaction popped from the tx_queue are validated with current state
Checklist
-
Provide automatic testing. -
Add an item in the changelog
What, why and how
meta-issue: #7785
The block producer when the tx_queue is enabled will validate transactions popped from the tx_queue with a validation state. The validation state is to ensure all caller have enough balances or that the nonce are correct.
This allow to remove the validation when receiving the transaction and have a more valid context to validate the transaction. Currently for example, with the tx_queue, the sequencer would reject a transaction from a user with no founds even if it has a transaction to transfer assets to it currently living in the tx queue.
Summary by CodeRabbit
-
New Features
- Enhanced transaction validation and processing improve block production reliability.
- New event logging captures detailed feedback for rejected transactions.
- Added functionality to wait for and handle rejected transactions within the EVM node.
- Updated server and transaction queue management enable dynamic operational responsiveness.
- Improved transaction validation during block production by checking funds and nonces.
- Introduced a validation mechanism for transactions in the transaction queue.
-
Refactor
- Consolidated and streamlined transaction validation and state retrieval logic for more accurate fee and gas assessments.
- Simplified logic for nonce retrieval and transaction validation in service functions.
Edited by Ghost User