Use safe math when calculating pool tx values #6897
Labels
A-tx-pool
Related to the transaction mempool
C-enhancement
New feature or request
D-good-first-issue
Nice and easy! A great choice to get started
Describe the feature
This is applied on unvalidated txs:
reth/crates/transaction-pool/src/traits.rs
Lines 920 to 937 in 74dc0e3
even though invalid transactions will get rejected
these ops can overflow
TODO
use saturating math when calculating cost
saturating is fine because U256::MAX as cost will result in a rejected tx
Additional context
No response
The text was updated successfully, but these errors were encountered: