Skip to content

Commit

Permalink
feat: add script to configure v3
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-forbes committed Nov 4, 2024
1 parent 808d0f2 commit c1a048b
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 6 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
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
44 changes: 38 additions & 6 deletions docs/release-notes/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit c1a048b

Please sign in to comment.