Skip to content
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

core: add change counter #23095

Merged
merged 2 commits into from
Aug 24, 2021
Merged

core: add change counter #23095

merged 2 commits into from
Aug 24, 2021

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Jun 23, 2021

This PR adds a change-counter, to prevent too much from happening inside the pool before the pool has had a chance to run a reorg, which 'balances' the queued and pending transactions.

@holiman holiman added this to the 1.10.5 milestone Jun 28, 2021
core/tx_pool.go Outdated
@@ -111,6 +111,7 @@ var (
invalidTxMeter = metrics.NewRegisteredMeter("txpool/invalid", nil)
underpricedTxMeter = metrics.NewRegisteredMeter("txpool/underpriced", nil)
overflowedTxMeter = metrics.NewRegisteredMeter("txpool/overflowed", nil)
throttleTxMeter = metrics.NewRegisteredMeter("txpool/throttle", nil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a meter for the reorgs, then we could see how wildly we're spinning.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add a few more metrics there too: how long reorgs take (timer), how many drops in between reorgs (hist), + whatnot the author wants :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should push this in right after the 1.10.5 release.

@karalabe karalabe modified the milestones: 1.10.5, 1.10.6 Jul 13, 2021
@fjl fjl modified the milestones: 1.10.6, 1.10.7 Jul 27, 2021
@holiman
Copy link
Contributor Author

holiman commented Jul 28, 2021

This is now running on eu-west-1

@holiman
Copy link
Contributor Author

holiman commented Jul 30, 2021

Last 12 hours on bootnode eu-west-1

Screenshot 2021-07-30 at 10-53-04 Single Geth - Grafana

@holiman
Copy link
Contributor Author

holiman commented Jul 30, 2021

Screenshot 2021-07-30 at 10-58-11 Single Geth - Grafana

@holiman
Copy link
Contributor Author

holiman commented Aug 9, 2021

Here's a week
Screenshot 2021-08-09 at 16-26-54 Single Geth - Grafana

In normal circumstances, we seem to never drop more than 1-2 txs between reorgs, so having the cap in place should not affect anything unless something is extremely abnormal.

@karalabe karalabe modified the milestones: 1.10.7, 1.10.8 Aug 10, 2021
@karalabe karalabe self-assigned this Aug 10, 2021
@karalabe karalabe modified the milestones: 1.10.7, 1.10.8 Aug 10, 2021
@fjl fjl modified the milestones: 1.10.8, 1.10.9 Aug 24, 2021
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@karalabe karalabe merged commit d705f5a into ethereum:master Aug 24, 2021
sidhujag pushed a commit to sidhujag/go-ethereum that referenced this pull request Aug 25, 2021
* core: make txpool reject too sudden changes

* core: add some metrics to txpool
reds pushed a commit to reds/go-ethereum that referenced this pull request Aug 28, 2021
* core: make txpool reject too sudden changes

* core: add some metrics to txpool
yongjun925 pushed a commit to DODOEX/go-ethereum that referenced this pull request Dec 3, 2022
* core: make txpool reject too sudden changes

* core: add some metrics to txpool
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request May 30, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request May 30, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request May 30, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request May 31, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants