-
Notifications
You must be signed in to change notification settings - Fork 297
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
Mempool evicition #81
Comments
Here's how I think we can do this.
|
related: tendermint/spec#201 |
A first, non-invasive approach (at least for the tendermint side) would be to use "re-check" for evicting the mempool: https://github.com/tendermint/tendermint/blob/f9c54d2710d7a83b2d40fd96f973a0ffba75e740/mempool/clist_mempool.go#L639-L656 This means that the app needs to track the (mempool) Tx, that it processed and "accepted" in the preprocess step. |
As per the above this isn't something urgent and IMO we can close this for now. |
Summary
To be able to evict the mempool depending on the data that was written into the block.
Problem Definition
Currently, tendermint evicts the mempool using the Mempool.Update method:
https://github.com/lazyledger/lazyledger-core/blob/6d99bdda1b59d1b1e5b6c83635ad879bfdffb19e/mempool/mempool.go#L38-L47
This works because in tendermnt the Tx that enter the mempool are the same as the data that gets written into the block.
In LL, this is likely going to be different: the tx that enter the mempool aren't those that end up in the block. Hence identifying Tx by their hash to see if they were included in the block wouldn't work.
Note that this is a general problem that needs to be solved, if tendermint allows for pre-poroccessing / mutating Tx before proposing a block. See: https://github.com/tendermint/tendermint/issues/2639#issuecomment-713026731
Proposal
Let the abci-app return IDs for Tx potenially on CheckTx and/or on deliverTx. These IDs can then be used to evict Tx in the mem-pool.
TODO: add in more details.
ref: tendermint/spec#154
For Admin Use
The text was updated successfully, but these errors were encountered: