Skip to content

Commit

Permalink
chore: modify configure-v3 to update all default overrides (#4248)
Browse files Browse the repository at this point in the history
Closes #4235

## Testing

I modified my local config and ran `make configure-v3` and the values
for these 6 configs match what I expect.

## FLUPs

After this merges, @rootulp will send a message in Discord to ask
validators to run `make configure-v3` to update their local configs.

(cherry picked from commit 2b859ea)
  • Loading branch information
rootulp authored and mergify[bot] committed Jan 20, 2025
1 parent 0bccf1b commit eb15773
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -321,19 +321,26 @@ disable-mptcp:
.PHONY: disable-mptcp

CONFIG_FILE ?= ${HOME}/.celestia-app/config/config.toml
SEND_RECV_RATE ?= 10485760 # 10 MiB
# SEND_RECV_RATE is 10 MiB
SEND_RECV_RATE ?= 10485760

## configure-v3: Modifies config file in-place to conform to v3.x recommendations.
configure-v3:
@echo "Using config file at: $(CONFIG_FILE)"
@echo "Modifying the 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 = .*/ttl-num-blocks = 12/" $(CONFIG_FILE); \
sed -i '' "s/^ttl-num-blocks = .*/ttl-num-blocks = 12/" $(CONFIG_FILE); \
sed -i '' "s/^ttl-duration = .*/ttl-duration = \"1m15s\"/" $(CONFIG_FILE); \
sed -i '' "s/^max_tx_bytes = .*/max_tx_bytes = 7897088/" $(CONFIG_FILE); \
sed -i '' "s/^max_txs_bytes = .*/max_txs_bytes = 39485440/" $(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 = .*/ttl-num-blocks = 12/" $(CONFIG_FILE); \
sed -i "s/^ttl-num-blocks = .*/ttl-num-blocks = 12/" $(CONFIG_FILE); \
sed -i "s/^ttl-duration = .*/ttl-duration = \"1m15s\"/" $(CONFIG_FILE); \
sed -i "s/^max_txs_bytes = .*/max_tx_bytes = 7897088/" $(CONFIG_FILE); \
sed -i '' "s/^max_txs_bytes = .*/max_txs_bytes = 39485440/" $(CONFIG_FILE); \
fi
.PHONY: configure-v3

Expand Down

0 comments on commit eb15773

Please sign in to comment.