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
Mempool GC does not correctly filter out transactions by timestamp. Each entry key has a specific format: {priority}:{timestamp}:{seqnum}:{id}which means that the key passed to the upper_bound call here does not make sense since it is formatted as {timestamp_threshold}: here. Which, instead of filtering out transactions based on timestamp will end filtering out transactions with priority<=timestamp_threshold.
The text was updated successfully, but these errors were encountered:
@mzabaluev I think this may have resulted from #749 and #628 being in-flight at the same time.
Yes, I suppose this is exactly what happened.
I see the following alternative ways to remedy this:
Erase the mempool priority altogether.
Don't rely on global range indexing to implement GC.
A brute-force pass through all entries is the simplest solution, but may be inefficient if the number of pooled transactions is large.
What we can try to do instead is the combination of a cursor pass enumerating priority buckets as the outer loop, and prefix range sweeps for timestamp < timestamp_threshold in each priority bucket.
Summary
Mempool GC does not correctly filter out transactions by timestamp. Each entry key has a specific format:
{priority}:{timestamp}:{seqnum}:{id}
which means that the key passed to the upper_bound call here does not make sense since it is formatted as{timestamp_threshold}
: here. Which, instead of filtering out transactions based on timestamp will end filtering out transactions withpriority<=timestamp_threshold
.The text was updated successfully, but these errors were encountered: