-
Notifications
You must be signed in to change notification settings - Fork 12
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 needs more acceptance checks #329
Comments
@charithabandi I made some comments on The PrepareProposal changes are completely WIP there, but wanted to link to thoughts on CheckTx. |
Mempool module possible requirements
|
I think cometbft already handles the mempool size and purges or rejects transactions based on that. We probably don't need to handle it on the abci side. what do you think? One other thing I can think of is, checking the block size constraints in the processProposal, especially if a proposer is adding its own transactions. |
Yeah, I checked the code, it just ensures that each tx is within the configured limit, but not the block size. So it's on app to decide |
CheckTx
is the "Guardian of the mempool" (comet docs). This is the most likely attack vector on the p2p interface. Our current implementation ofCheckTx
is very minimal, and it will need more sophistication to prevent malicious users or peer node from flooding a node's mempool, causing resource exhaustion.Mempool policy is unlike consensus in that node operators are free to accept or relay transactions however they see fit. We need to craft a more thorough mempool policy with DoS mitigation in mind.
CheckTx
is also used to re-check all transactions that remain in mempool after a block is mined. It is critical to evict transactions that may become invalid. For instance, if a user submits a transaction with certain nonce, and then replaces it with another that gets mined, the first one should be evicted from mempool.Related to #328.
A "mempool module" will likely be required to facilitate some or all of the checks. For instance, basic checks on an account's standing will be needed, particularly if gas may be disabled, since we do not simply want blocks to be filled by failed transactions at no cost to the attacker.
The text was updated successfully, but these errors were encountered: