scroll-tech / go-ethereum

Scroll's fork of the official Go implementation of the Ethereum protocol
GNU Lesser General Public License v3.0
481 stars 273 forks source link

feat(txpool): StatsWithMinBaseFee #884

Closed jonastheis closed 2 months ago

jonastheis commented 3 months ago

1. Purpose or design rationale of this PR

When the base fee changes, transactions which are now below the base fee, stay in the txpool as pending. However, since we use the amount of pending tx in the GPO to determine the current congestion level of the network, this wouldn't yield any meaningful information anymore.

This PR, therefore, introduces a function StatsWithMinBaseFee to the txpool so that the GPO can query the pending transactions that are meaningful right now.

2. PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

3. Deployment tag versioning

Has the version in params/version.go been updated?

4. Breaking change label

Does this PR have the breaking-change label?