cosmos-sdk icon indicating copy to clipboard operation
cosmos-sdk copied to clipboard

Add bounded functionality to mempool

Open JeancarloBarrios opened this issue 2 years ago • 3 comments

    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.

JeancarloBarrios avatar Nov 22 '22 15:11 JeancarloBarrios

A couple of questions:

  • How will we limit mempool size, number of txs? txBytes?
  • Should Insert return an error when the mempool is full?

kocubinski avatar Nov 22 '22 15:11 kocubinski

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.

tac0turtle avatar Nov 23 '22 23:11 tac0turtle

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

JeancarloBarrios avatar Nov 24 '22 21:11 JeancarloBarrios