From c1a048b1f80007fe16350b738332c2fd505c4f77 Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Mon, 4 Nov 2024 09:39:02 -0600 Subject: [PATCH] feat: add script to configure v3 --- Makefile | 12 ++++++++ app/default_overrides.go | 4 +++ docs/release-notes/release-notes.md | 44 +++++++++++++++++++++++++---- 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7ad829998c..835e839ce1 100644 --- a/Makefile +++ b/Makefile @@ -301,6 +301,18 @@ disable-mptcp: .PHONY: disable-mptcp +CONFIG_FILE ?= ${HOME}/.celestia-app/config/config.toml +SEND_RECV_RATE ?= 10485760 # 10 MiB + +configure-v3: + @echo "Using config file at: $(CONFIG_FILE)"; \ + sed -i "s/^recv_rate = .*/recv_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE); \ + sed -i "s/^send_rate = .*/send_rate = $(SEND_RECV_RATE)/" $(CONFIG_FILE); \ + sed -i "s/ttl-num-blocks = 5/ttl-num-blocks = 12/" $(CONFIG_FILE) + +.PHONY: configure-v3 + + ## debug-version: Print the git tag and version. debug-version: @echo "GIT_TAG: $(GIT_TAG)" diff --git a/app/default_overrides.go b/app/default_overrides.go index 9e0b5dd382..39a5189188 100644 --- a/app/default_overrides.go +++ b/app/default_overrides.go @@ -274,6 +274,10 @@ func DefaultConsensusConfig() *tmcfg.Config { cfg.TxIndex.Indexer = "null" cfg.Storage.DiscardABCIResponses = true + const mebibyte = 1048576 + cfg.P2P.SendRate = 10 * mebibyte + cfg.P2P.RecvRate = 10 * mebibyte + return cfg } diff --git a/docs/release-notes/release-notes.md b/docs/release-notes/release-notes.md index 49f46b68d4..284aa90bba 100644 --- a/docs/release-notes/release-notes.md +++ b/docs/release-notes/release-notes.md @@ -6,13 +6,45 @@ This guide provides notes for major version releases. These notes may be helpful ### Node Operators (v3.0.0) -- Consensus node operators must enable the BBR (Bottleneck Bandwidth and Round-trip propagation time) congestion control algorithm. See [#3774](https://github.com/celestiaorg/celestia-app/pull/3774). - - if using linux in docker, kubernetes, a vm or baremetal, this can be done by calling the `make enable-bbr` command on the host machine. -- Consensus node operators should manually configure their node's mempool `ttl-num-blocks = 12` in config.toml. An example command to do this: +#### Enabling BBR and MCTCP - ```bash - sed -i 's/ttl-num-blocks = 5/ttl-num-blocks = 12/' ~/.celestia-app/config/config.toml - ``` +Consensus node operators must enable the BBR (Bottleneck Bandwidth and Round-trip propagation time) congestion control algorithm. See [#3774](https://github.com/celestiaorg/celestia-app/pull/3774). +if using linux in docker, kubernetes, a vm or baremetal, this can be done by calling + +```sh +make enable-bbr +``` + +command on the host machine. + +Optionally, mctcp can be enabled. This can be done by calling + +```sh +make enable-mctcp +``` + +#### Configure Node for V3 + +Consensus node operators should update several configurations for v3. This can be done by calling: + +```sh +make configure-v3 +``` + +If the config file is not in the default spot, it can be provided using: + +```sh +make configure-v3 CONFIG_FILE=path/to/other/config.toml +``` + +**Alternatively**, the configurations can be changed manually. This involves updating the mempool TTLs and the send and the receive rates. + +- Configuring Bandwidth Settings + - update `recv_rate` and `send_rate` in your TOML config file to 10MiB (10485760). +- Extend TTLs + - update `ttl-num-blocks` in your TOML config file to 12. + +#### Signaling Upgrades - Upgrades now use the `x/signal` module to coordinate the network to an upgrade height.