You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The notion of local transactions was added after the tx pool was implemented. The idea was that nodes should keep holding onto transactions that they themselves created, even if otherwise there are better ones in the network. The rationale is that even if currently the tx won't get included, later it might be. The way it was implemented is that eviction operations simply jump over any local tx.
If a node has a handful of local txs, and lots of remote ones, this logic works perfectly. It might happen that an eviction does a few more cycles to find a non-local cheap tx to drop, but it's negligible. However, if the node has 10Ks of local transactions (and maybe none non-local), then every single eviction will iterate over all the underpriced locals, just to find that there's nothing to evict. This becomes problematic.
A possible solution would be to completely separate out the notion of locals from the priced tx list, so that when we search for txs to evict, we never even consider the local ones. The catch is that tx promotion and demotion (and possibly others) would need to be extended to handle two sets of disjoint transactions at the same time. We also need special casing when an account is marked local for the first time, to move previous transactions from the same account from the priced list to the local list.
The text was updated successfully, but these errors were encountered:
The notion of local transactions was added after the tx pool was implemented. The idea was that nodes should keep holding onto transactions that they themselves created, even if otherwise there are better ones in the network. The rationale is that even if currently the tx won't get included, later it might be. The way it was implemented is that eviction operations simply jump over any local tx.
If a node has a handful of local txs, and lots of remote ones, this logic works perfectly. It might happen that an eviction does a few more cycles to find a non-local cheap tx to drop, but it's negligible. However, if the node has 10Ks of local transactions (and maybe none non-local), then every single eviction will iterate over all the underpriced locals, just to find that there's nothing to evict. This becomes problematic.
A possible solution would be to completely separate out the notion of locals from the
priced
tx list, so that when we search for txs to evict, we never even consider the local ones. The catch is that tx promotion and demotion (and possibly others) would need to be extended to handle two sets of disjoint transactions at the same time. We also need special casing when an account is marked local for the first time, to move previous transactions from the same account from thepriced
list to thelocal
list.The text was updated successfully, but these errors were encountered: