cosmos-sdk
cosmos-sdk copied to clipboard
Add bounded functionality to mempool
left one question on mempool size as not all node operators need to run this mempool, so it could be they "turn it off" by setting the max allowed txs to 0.
Originally posted by @tac0turtle in https://github.com/cosmos/cosmos-sdk/pull/13888#pullrequestreview-1189945991
Add the functionality to limit the amount of tx the mempool will accept.
A couple of questions:
- How will we limit mempool size, number of txs? txBytes?
- Should
Insert
return an error when the mempool is full?
tendermint does both: https://github.com/tendermint/tendermint/blob/main/config/toml.go#L377
I could see them both being useful and for now we use the tendermint defaults. I don't think we should keep tendermint and sdk isync though.
I add a small draft that just returns an error when max tx is reached let me know if that makes sense @kocubinski @tac0turtle if so I can also add the bytes #14014