-
Notifications
You must be signed in to change notification settings - Fork 48
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
Txpool optimization: filter out staled transactions of "nonce too low" when providing all pending list to miner #244
base: develop
Are you sure you want to change the base?
Conversation
prepare for v0.5.2 release
prepare for v0.5.3 release
prepare for v0.5.4 release
This reverts commit 4ccfc35.
… but not 0 add more logs and metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// TODO need to confirm | ||
defer func(t0 time.Time) { | ||
getPendingDurationTimer.Update(time.Since(t0)) | ||
}(time.Now()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still has TODO?
currBlockDuration time.Duration = 0 | ||
currHeaderDuration time.Duration = 0 | ||
txHashesDuration time.Duration = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could remove the debug duration to keep code clean if we confirmed there's no perf issue here
@@ -1296,7 +1296,7 @@ func (w *worker) fillTransactions(interrupt *atomic.Int32, env *environment) err | |||
pendingBlobTxs := w.eth.TxPool().Pending(filter) | |||
|
|||
packFromTxpoolTimer.UpdateSince(start) | |||
log.Debug("packFromTxpoolTimer", "duration", common.PrettyDuration(time.Since(start)), "hash", env.header.Hash(), "txs", len(pendingPlainTxs)) | |||
log.Debug("packFromTxpoolTimer", "duration", common.PrettyDuration(time.Since(start)), "hash", env.header.Hash()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why delete "txs" log here, it's useful when debug i think
Description
We got a lot of "nonce too low" transactions after the optimization of #85, and they would be re-executed in the EVM, which wasted too much CPU resources. So we removed them before giving out the whole pending list of txpool.