Skip to content

Commit

Permalink
feat: add script to configure v3 (#4022)
Browse files Browse the repository at this point in the history
## Overview

adds a script and better docs for configuring everything for v3

(cherry picked from commit 5d6c695)
  • Loading branch information
evan-forbes authored and rach-id committed Nov 25, 2024
1 parent dc17868 commit 349c19a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 6 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,24 @@ 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)"; \
if [[ "$$(uname)" == "Darwin" ]]; then \
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); \
else \
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); \
fi

.PHONY: configure-v3


## debug-version: Print the git tag and version.
debug-version:
@echo "GIT_TAG: $(GIT_TAG)"
Expand Down
4 changes: 4 additions & 0 deletions app/default_overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
38 changes: 32 additions & 6 deletions docs/release-notes/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,39 @@ 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.

#### 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.

Expand Down

0 comments on commit 349c19a

Please sign in to comment.