reth
reth copied to clipboard
perf(tx-pool): Optimize batch tx validation by separating checks
trafficstars
closes: https://github.com/paradigmxyz/reth/issues/18527
This PR optimizes batch transaction validation by refactoring the TransactionValidator trait.
The validation process is now split into two distinct steps: validate_transaction_stateless and validate_transaction_stateful.
TheTransactionValidationTaskExecutor now
- runs stateless checks on all transactions first
- uses a single state provider to perform stateful validation only on those that pass, minimizin state access.
hey @klkvr just did an initial draft to see if this is something u had in mind?
hey @klkvr just addressed your comments in the PR. Sorry dropped the ball on this, let me know what u think