From b1a2885fc82271587f26ab4a3738894d67fba1ac Mon Sep 17 00:00:00 2001 From: yito88 Date: Wed, 25 Jun 2025 10:39:34 +0200 Subject: [PATCH 1/3] make CometBFT max_tx_bytes configurable --- crates/node/src/tendermint_node.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/node/src/tendermint_node.rs b/crates/node/src/tendermint_node.rs index 4f73b7726fa..1dee2a190df 100644 --- a/crates/node/src/tendermint_node.rs +++ b/crates/node/src/tendermint_node.rs @@ -281,17 +281,6 @@ async fn update_tendermint_config( // become valid again in the future. config.mempool.keep_invalid_txs_in_cache = false; - // Drop txs from the mempool that are larger than 1 MiB - // - // The application (Namada) can assign arbitrary max tx sizes, - // which are subject to consensus. Either way, nodes are able to - // configure their local mempool however they please. - // - // 1 MiB is a reasonable value that allows governance proposal txs - // containing wasm code to be proposed by a leading validator - // during some round's start - config.mempool.max_tx_bytes = 1024 * 1024; - // Hold 50x the max amount of txs in a block. #[allow(clippy::arithmetic_side_effects)] { From 25e55503d53e977dc68c38ed8b0a795282cc185b Mon Sep 17 00:00:00 2001 From: yito88 Date: Wed, 25 Jun 2025 11:06:03 +0200 Subject: [PATCH 2/3] revert comment --- crates/node/src/tendermint_node.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/node/src/tendermint_node.rs b/crates/node/src/tendermint_node.rs index 1dee2a190df..e1107809557 100644 --- a/crates/node/src/tendermint_node.rs +++ b/crates/node/src/tendermint_node.rs @@ -281,6 +281,17 @@ async fn update_tendermint_config( // become valid again in the future. config.mempool.keep_invalid_txs_in_cache = false; + // Drop txs from the mempool that are larger than 1 MiB + // + // The application (Namada) can assign arbitrary max tx sizes, + // which are subject to consensus. Either way, nodes are able to + // configure their local mempool however they please. + // + // 1 MiB is a reasonable value that allows governance proposal txs + // containing wasm code to be proposed by a leading validator + // during some round's start + // https://github.com/cometbft/cometbft/blob/c653eee08d7f2c44bd87fcca0b8a16666cd08fee/config/config.go#L1016 + // Hold 50x the max amount of txs in a block. #[allow(clippy::arithmetic_side_effects)] { From ddf65643d28a96cfe205e29d147f19c5a22f8c4d Mon Sep 17 00:00:00 2001 From: yito88 Date: Wed, 25 Jun 2025 11:49:08 +0200 Subject: [PATCH 3/3] changelog --- .changelog/unreleased/miscellaneous/4712-comet-max-tx-size.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changelog/unreleased/miscellaneous/4712-comet-max-tx-size.md diff --git a/.changelog/unreleased/miscellaneous/4712-comet-max-tx-size.md b/.changelog/unreleased/miscellaneous/4712-comet-max-tx-size.md new file mode 100644 index 00000000000..d5cacb9db6a --- /dev/null +++ b/.changelog/unreleased/miscellaneous/4712-comet-max-tx-size.md @@ -0,0 +1,2 @@ +- Make CometBFT max_tx_bytes configurable + ([\#4712](https://github.com/anoma/namada/issues/4712)) \ No newline at end of file