core/txpool: remove locals-tracking from pools (part 2) #30559
+479
−877
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces #29297, descendant from #27535
This PR removes
locals
as a concept from transaction pools. Therefore, the pool now acts as very a good simulation/approximation of how our peers' pools behave. What this PR does instead, is implement a locals-tracker, which basically is a little thing which, from time to time, asks the pool "did you forget this transaction?". If it did, the tracker resubmits it.If the txpool had forgotten it, chances are that the peers had also forgotten it. It will be propagated again.
Doing this change means that we can simplify the pool internals, quite a lot.
The semantics of
local
Historically, there has been two features, or usecases, that has been combined into the concept of
locals
.This PR splits these features up, let's call it
1: local
and2: prio
. Theprio
is not actually individual transaction, but rather a set ofaddress
es to prioritize.The attribute
local
means it will be tracked, andprio
means it will be prioritized by miner.For
local
: anything transaction received via the RPC is marked aslocal
, and tracked by the tracker.For
prio
: any transactions from this sender is included first, when building a block. The existing commandline-flag--txpool.locals
sets the set ofprio
addresses.