Open mibuono opened 3 months ago
Should have an async process to sort the pool - and it should be doing it with an algorithm that you dont need completion and can just do it with rounds to get approximate sorting.
The tx pool is shared with worker and state processor. We can't lock up the pool because it will lock up the state processor. In order to fix this, we may need to copy the tx pool to run this sortition situation.
Notes from SPIKE:
Refactor the mempool: (Hussam) Worker - needs to read the pending Pending is getting sorting by a partial sorting function (new) So we can have a finite time for locking pending transactions Everytime transactions are added to pending, the sorting function should run every so often to sort them.
To do this properly we need to unify the tx pool. What we should be doing is creating a limited set which is what we should consume then sort in the worker.
Having sets of quai and sets of qi transactions, we need to order the transactions based on the tip from both sets.