You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.5 KiB

  1. ---
  2. order: 2
  3. ---
  4. # Configuration
  5. Here we describe configuration options around mempool.
  6. For the purposes of this document, they are described
  7. in a toml file, but some of them can also be passed in as
  8. environmental variables.
  9. Config:
  10. ```toml
  11. [mempool]
  12. recheck = true
  13. broadcast = true
  14. wal-dir = ""
  15. # Maximum number of transactions in the mempool
  16. size = 5000
  17. # Limit the total size of all txs in the mempool.
  18. # This only accounts for raw transactions (e.g. given 1MB transactions and
  19. # max-txs-bytes=5MB, mempool will only accept 5 transactions).
  20. max-txs-bytes = 1073741824
  21. # Size of the cache (used to filter transactions we saw earlier) in transactions
  22. cache-size = 10000
  23. # Do not remove invalid transactions from the cache (default: false)
  24. # Set to true if it's not possible for any invalid transaction to become valid
  25. # again in the future.
  26. keep-invalid-txs-in-cache = false
  27. # Maximum size of a single transaction.
  28. # NOTE: the max size of a tx transmitted over the network is {max-tx-bytes}.
  29. max-tx-bytes = 1048576
  30. # Maximum size of a batch of transactions to send to a peer
  31. # Including space needed by encoding (one varint per transaction).
  32. # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796
  33. max-batch-bytes = 0
  34. ```
  35. <!-- Flag: `--mempool.recheck=false`
  36. Environment: `TM_MEMPOOL_RECHECK=false` -->
  37. ## Recheck
  38. Recheck determines if the mempool rechecks all pending
  39. transactions after a block was committed. Once a block
  40. is committed, the mempool removes all valid transactions
  41. that were successfully included in the block.
  42. If `recheck` is true, then it will rerun CheckTx on
  43. all remaining transactions with the new block state.
  44. ## Broadcast
  45. Determines whether this node gossips any valid transactions
  46. that arrive in mempool. Default is to gossip anything that
  47. passes checktx. If this is disabled, transactions are not
  48. gossiped, but instead stored locally and added to the next
  49. block this node is the proposer.
  50. ## WalDir
  51. This defines the directory where mempool writes the write-ahead
  52. logs. These files can be used to reload unbroadcasted
  53. transactions if the node crashes.
  54. If the directory passed in is an absolute path, the wal file is
  55. created there. If the directory is a relative path, the path is
  56. appended to home directory of the tendermint process to
  57. generate an absolute path to the wal directory
  58. (default `$HOME/.tendermint` or set via `TM_HOME` or `--home`)
  59. ## Size
  60. Size defines the total amount of transactions stored in the mempool. Default is `5_000` but can be adjusted to any number you would like. The higher the size the more strain on the node.
  61. ## Max Transactions Bytes
  62. Max transactions bytes defines the total size of all the transactions in the mempool. Default is 1 GB.
  63. ## Cache size
  64. Cache size determines the size of the cache holding transactions we have already seen. The cache exists to avoid running `checktx` each time we receive a transaction.
  65. ## Keep Invalid Transactions In Cache
  66. Keep invalid transactions in cache determines wether a transaction in the cache, which is invalid, should be evicted. An invalid transaction here may mean that the transaction may rely on a different tx that has not been included in a block.
  67. ## Max Transaction Bytes
  68. Max transaction bytes defines the max size a transaction can be for your node. If you would like your node to only keep track of smaller transactions this field would need to be changed. Default is 1MB.
  69. ## Max Batch Bytes
  70. Max batch bytes defines the amount of bytes the node will send to a peer. Default is 0.
  71. > Note: Unused due to https://github.com/tendermint/tendermint/issues/5796