Skip to content

Commit 6f621f8

Browse files
committed
Add improvements to bold-upgrade
1 parent 828fe09 commit 6f621f8

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

boldupgrader/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM node:20-bookworm-slim
22
RUN apt-get update && \
33
apt-get install -y git docker.io python3 make gcc g++ curl jq
4-
ARG BOLD_CONTRACTS_BRANCH=bold-merge-script
4+
ARG BOLD_CONTRACTS_BRANCH=main
55
WORKDIR /workspace
66
RUN git clone --no-checkout https://github.com/OffchainLabs/nitro-contracts.git ./
77
RUN git checkout ${BOLD_CONTRACTS_BRANCH}

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ services:
380380
args:
381381
BOLD_CONTRACTS_BRANCH: ${BOLD_CONTRACTS_BRANCH:-}
382382
environment:
383-
- L1_RPC_URL=http://geth:8545
383+
- CUSTOM_RPC_URL=http://geth:8545
384384
- L1_PRIV_KEY=0xdc04c5399f82306ec4b4d654a342f40e2e0620fe39950d967e1e574b32d4dd36
385385
- CONFIG_NETWORK_NAME=local
386386
- DEPLOYED_CONTRACTS_DIR=./scripts/files/

test-node.bash

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8
88
DEFAULT_NITRO_CONTRACTS_VERSION="v2.1.1-beta.0"
99
DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.2"
1010

11-
# The is the latest bold-merge commit in nitro-contracts at the time
12-
DEFAULT_BOLD_CONTRACTS_VERSION="42d80e40"
11+
# The is the latest bold-upgrade-qol-improvements commit in nitro-contracts at the time
12+
DEFAULT_BOLD_CONTRACTS_VERSION="9016cf1c"
1313

1414
# Set default versions if not overriden by provided env vars
1515
: ${NITRO_CONTRACTS_BRANCH:=$DEFAULT_NITRO_CONTRACTS_VERSION}
@@ -587,15 +587,26 @@ if $force_init; then
587587
stakeTokenAddress=`docker compose run scripts create-weth --deployer l2owner --deposit 100 | tail -n 1 | awk '{ print $NF }'`
588588
echo BOLD stake token address: $stakeTokenAddress
589589
docker compose run scripts transfer-erc20 --token $stakeTokenAddress --l1 --amount 100 --from l2owner --to validator
590+
591+
echo == Deploying v3.1 templates
592+
docker compose run -e DEPLOYER_PRIVKEY=$l2ownerKey -e MAX_DATA_SIZE=117964 boldupgrader deploy-factory --network custom
593+
590594
echo == Preparing BOLD upgrade
591-
docker compose run -e TESTNODE_MODE=true -e ROLLUP_ADDRESS=$rollupAddress -e STAKE_TOKEN=$stakeTokenAddress boldupgrader script:bold-prepare
595+
docker compose run boldupgrader script:bold-prepare --network custom
592596
# retry this 10 times because the staker might not have made a node yet
593597
for i in {1..10}; do
594-
docker compose run -e TESTNODE_MODE=true -e ROLLUP_ADDRESS=$rollupAddress -e STAKE_TOKEN=$stakeTokenAddress boldupgrader script:bold-populate-lookup && break || true
598+
docker compose run boldupgrader script:bold-populate-lookup --network custom && break || true
595599
echo "Failed to populate lookup table, retrying..."
596600
sleep 10
597601
done
598-
docker compose run -e TESTNODE_MODE=true -e ROLLUP_ADDRESS=$rollupAddress -e STAKE_TOKEN=$stakeTokenAddress boldupgrader script:bold-local-execute
602+
docker compose run boldupgrader script:bold-local-execute --network custom
603+
604+
echo == Update new configuration
605+
docker compose run --entrypoint sh rollupcreator -c "jq '.[].rollup.rollup = \"0xa134abA9268643057091b15f99eb32D0D526190f\" | .[].rollup.\"stake-token\" = \"0x43C9c3Ab961c49f8d42227628617747b1da7bcF0\"' /config/l2_chain_info.json > /config/l2_chain_info_temp.json && mv /config/l2_chain_info_temp.json /config/l2_chain_info.json"
606+
docker compose run --entrypoint sh rollupcreator -c "jq '.node.bold.enable = true | .node.bold.strategy = \"MakeNodes\" | .node.bold.\"rpc-block-number\" = \"latest\"' /config/sequencer_config.json > /config/sequencer_config_temp.json && mv /config/sequencer_config_temp.json /config/sequencer_config.json"
607+
608+
echo == Restart nodes
609+
docker compose restart $INITIAL_SEQ_NODES
599610
fi
600611

601612
if $l3node; then

0 commit comments

Comments
 (0)