Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add script to configure v3 #4022

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
evan-forbes marked this conversation as resolved.
Show resolved Hide resolved

configure-v3:
rach-id marked this conversation as resolved.
Show resolved Hide resolved
@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
evan-forbes marked this conversation as resolved.
Show resolved Hide resolved

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