From 201f62f7a92c41ea32b10ba7b8bf3bcbe54ca543 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Sun, 9 Feb 2025 16:10:05 +0000 Subject: [PATCH 01/18] Added v3 support --- docker-compose.yaml | 2 +- test-node.bash | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 670d123..43b7124 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -47,7 +47,7 @@ services: - "127.0.0.1:6379:6379" geth: - image: ethereum/client-go:stable + image: ethereum/client-go:v1.14.13 ports: - "127.0.0.1:8545:8545" - "127.0.0.1:8551:8551" diff --git a/test-node.bash b/test-node.bash index 9c6f6ef..850cf48 100755 --- a/test-node.bash +++ b/test-node.bash @@ -2,10 +2,10 @@ set -eu -NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.2.1-d81324d-dev +NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.5.0-bdc2fd2-dev BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 -DEFAULT_NITRO_CONTRACTS_VERSION="v2.1.1-beta.0" +DEFAULT_NITRO_CONTRACTS_VERSION="v3.0.1-beta.0" DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.2" # The is the latest bold-merge commit in nitro-contracts at the time From 58aa64cc5b8fab30b0323c1c320eb49f176229de Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Sun, 9 Feb 2025 17:11:18 +0000 Subject: [PATCH 02/18] Added buildx tmp file --- test-node.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-node.bash b/test-node.bash index 850cf48..3f47cbd 100755 --- a/test-node.bash +++ b/test-node.bash @@ -2,7 +2,7 @@ set -eu -NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.5.0-bdc2fd2-dev +NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.4.0-d896e9c-dev BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 DEFAULT_NITRO_CONTRACTS_VERSION="v3.0.1-beta.0" @@ -375,7 +375,7 @@ if $build_utils; then if [ "$ci" == true ]; then # workaround to cache docker layers and keep using docker-compose in CI - docker buildx bake --file docker-compose.yaml --file docker-compose-ci-cache.json $LOCAL_BUILD_NODES + docker buildx bake --allow=fs=/tmp/ --file docker-compose.yaml --file docker-compose-ci-cache.json $LOCAL_BUILD_NODES else UTILS_NOCACHE="" if $force_build_utils; then From 2a50b00b3ae996fffbac64a04269fcfb206dd243 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Sun, 9 Feb 2025 22:49:36 +0000 Subject: [PATCH 03/18] Use test branch --- scripts/config.ts | 2 +- test-node.bash | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/config.ts b/scripts/config.ts index 6323c7b..1bbb747 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -421,7 +421,7 @@ function writeL3ChainConfig(argv: any) { "EnableArbOS": true, "AllowDebugPrecompiles": true, "DataAvailabilityCommittee": false, - "InitialArbOSVersion": 31, + "InitialArbOSVersion": 32, "InitialChainOwner": argv.l2owner, "GenesisBlockNum": 0 } diff --git a/test-node.bash b/test-node.bash index 3f47cbd..a44d078 100755 --- a/test-node.bash +++ b/test-node.bash @@ -5,7 +5,7 @@ set -eu NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.4.0-d896e9c-dev BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 -DEFAULT_NITRO_CONTRACTS_VERSION="v3.0.1-beta.0" +DEFAULT_NITRO_CONTRACTS_VERSION="v3-dev-testnode" DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.2" # The is the latest bold-merge commit in nitro-contracts at the time @@ -476,7 +476,6 @@ if $force_init; then echo == Deploying L2 chain docker compose run -e PARENT_CHAIN_RPC="http://geth:8545" -e DEPLOYER_PRIVKEY=$l2ownerKey -e PARENT_CHAIN_ID=$l1chainid -e CHILD_CHAIN_NAME="arb-dev-test" -e MAX_DATA_SIZE=117964 -e OWNER_ADDRESS=$l2ownerAddress -e WASM_MODULE_ROOT=$wasmroot -e SEQUENCER_ADDRESS=$sequenceraddress -e AUTHORIZE_VALIDATORS=10 -e CHILD_CHAIN_CONFIG_PATH="/config/l2_chain_config.json" -e CHAIN_DEPLOYMENT_INFO="/config/deployment.json" -e CHILD_CHAIN_INFO="/config/deployed_chain_info.json" rollupcreator create-rollup-testnode docker compose run --entrypoint sh rollupcreator -c "jq [.[]] /config/deployed_chain_info.json > /config/l2_chain_info.json" - fi # $force_init anytrustNodeConfigLine="" From 5b05cf8021d194b8f92d755741eb237117036dd0 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Sun, 9 Feb 2025 22:50:54 +0000 Subject: [PATCH 04/18] Comment out bold upgrade ci --- .github/workflows/ci.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 440372c..0a41d09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,19 +42,19 @@ jobs: - name: Startup Nitro testnode run: ${{ github.workspace }}/.github/workflows/testnode.bash --init-force ${{ (matrix.l3node == 'l3node' && '--l3node') || (matrix.l3node == 'l3node-token-6' && '--l3node --l3-fee-token --l3-token-bridge --l3-fee-token-decimals 6') || '' }} ${{ matrix.tokenbridge == 'tokenbridge' && '--tokenbridge' || '--no-tokenbridge' }} --detach ${{ matrix.pos == 'pos' && '--pos' || '' }} --simple ${{ (matrix.simple == 'simple' && '--simple') || (matrix.simple == 'no-simple' && '--no-simple') || '' }} - bold_upgrade: - runs-on: ubuntu-8 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: network=host - - - name: Startup Nitro testnode - run: ${{ github.workspace }}/.github/workflows/testnode.bash --init-force --bold-upgrade --simple --detach + # bold_upgrade: + # runs-on: ubuntu-8 + + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # submodules: recursive + + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # with: + # driver-opts: network=host + + # - name: Startup Nitro testnode + # run: ${{ github.workspace }}/.github/workflows/testnode.bash --init-force --bold-upgrade --simple --detach From 7cd51d0f30a6600535e135f999f0e26acbbcc261 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Sun, 9 Feb 2025 22:54:10 +0000 Subject: [PATCH 05/18] Dont fail fast for matrix combos --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a41d09..0992651 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: build_and_run: runs-on: ubuntu-8 strategy: + fail-fast: false matrix: pos: [pos, no-pos] l3node: [l3node, l3node-token-6, no-l3node] From 04f52f5b2837e061efb59f5758b523fe599ac24b Mon Sep 17 00:00:00 2001 From: gzeon Date: Mon, 10 Feb 2025 18:26:29 +0900 Subject: [PATCH 06/18] fix: config race workaround --- test-node.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test-node.bash b/test-node.bash index a44d078..c944e87 100755 --- a/test-node.bash +++ b/test-node.bash @@ -511,9 +511,11 @@ if $force_init; then if $simple; then echo == Writing configs docker compose run scripts write-config --simple $anytrustNodeConfigLine + sleep 10 # workaround a race condition that causes the deploy to fail randomly else echo == Writing configs docker compose run scripts write-config $anytrustNodeConfigLine + sleep 10 # workaround a race condition that causes the deploy to fail randomly echo == Initializing redis docker compose up --wait redis From 2c0949a6001b15cfffc138eb2703ac5400f35272 Mon Sep 17 00:00:00 2001 From: gzeon Date: Mon, 10 Feb 2025 19:07:22 +0900 Subject: [PATCH 07/18] revert: sleep --- test-node.bash | 2 -- 1 file changed, 2 deletions(-) diff --git a/test-node.bash b/test-node.bash index c944e87..a44d078 100755 --- a/test-node.bash +++ b/test-node.bash @@ -511,11 +511,9 @@ if $force_init; then if $simple; then echo == Writing configs docker compose run scripts write-config --simple $anytrustNodeConfigLine - sleep 10 # workaround a race condition that causes the deploy to fail randomly else echo == Writing configs docker compose run scripts write-config $anytrustNodeConfigLine - sleep 10 # workaround a race condition that causes the deploy to fail randomly echo == Initializing redis docker compose up --wait redis From 695a854fd1ab1af637e754dba51e5bbf97f89c72 Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 01:00:55 +0900 Subject: [PATCH 08/18] fix: nitro contract pin with correct stakeToken deployment --- test-node.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-node.bash b/test-node.bash index a44d078..a95cfed 100755 --- a/test-node.bash +++ b/test-node.bash @@ -5,7 +5,7 @@ set -eu NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.4.0-d896e9c-dev BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 -DEFAULT_NITRO_CONTRACTS_VERSION="v3-dev-testnode" +DEFAULT_NITRO_CONTRACTS_VERSION="c1218817" # of v3-dev-testnode DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.2" # The is the latest bold-merge commit in nitro-contracts at the time From 811cae821c03a9d8633697502871f93a37f974ad Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 01:01:11 +0900 Subject: [PATCH 09/18] workaround: dark magic --- test-node.bash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test-node.bash b/test-node.bash index a95cfed..0393170 100755 --- a/test-node.bash +++ b/test-node.bash @@ -522,6 +522,9 @@ if $force_init; then echo == Funding l2 funnel and dev key docker compose up --wait $INITIAL_SEQ_NODES + sleep 60 + docker compose down $INITIAL_SEQ_NODES + docker compose up --wait $INITIAL_SEQ_NODES docker compose run scripts bridge-funds --ethamount 100000 --wait docker compose run scripts send-l2 --ethamount 100 --to l2owner --wait rollupAddress=`docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_chain_info.json | tail -n 1 | tr -d '\r\n'"` From 58ebd034b54e140501ea46ae6d565a32f7f61782 Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 01:01:23 +0900 Subject: [PATCH 10/18] fix: enable bold --- scripts/config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/config.ts b/scripts/config.ts index 1bbb747..5c66c04 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -190,6 +190,9 @@ function writeConfigs(argv: any) { "info-files": [chainInfoFile], }, "node": { + "bold": { + "enable": true + }, "staker": { "dangerous": { "without-block-validator": false From 7d91c2828dc1329d07b4b47f526e10768080f575 Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 01:07:15 +0900 Subject: [PATCH 11/18] docs: explain dark magic --- test-node.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/test-node.bash b/test-node.bash index 0393170..bf9cb85 100755 --- a/test-node.bash +++ b/test-node.bash @@ -523,6 +523,7 @@ if $force_init; then echo == Funding l2 funnel and dev key docker compose up --wait $INITIAL_SEQ_NODES sleep 60 + # workaround stuck sequencer after logging `Allocated cache and file handles` docker compose down $INITIAL_SEQ_NODES docker compose up --wait $INITIAL_SEQ_NODES docker compose run scripts bridge-funds --ethamount 100000 --wait From c15a9dc828e6bb21c674bd26445e990ebe9291ce Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 01:07:24 +0900 Subject: [PATCH 12/18] feat: bold make nodes --- scripts/config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/config.ts b/scripts/config.ts index 5c66c04..01ca053 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -191,7 +191,10 @@ function writeConfigs(argv: any) { }, "node": { "bold": { - "enable": true + "enable": true, + "rpc-block-number": "latest", + "strategy": "makeNodes", + "assertion-posting-interval": "10s" }, "staker": { "dangerous": { From ff58019aec2cf876762c6c1e381bacefcc3a99e6 Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 02:08:36 +0900 Subject: [PATCH 13/18] workaround: black magic for l3 --- test-node.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test-node.bash b/test-node.bash index bf9cb85..0ffe4ae 100755 --- a/test-node.bash +++ b/test-node.bash @@ -2,7 +2,7 @@ set -eu -NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.4.0-d896e9c-dev +NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.5.1-rc.2-69577b7-dev BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 DEFAULT_NITRO_CONTRACTS_VERSION="c1218817" # of v3-dev-testnode @@ -597,6 +597,9 @@ if $force_init; then echo == Funding l3 funnel and dev key docker compose up --wait l3node sequencer + sleep 60 + docker compose down l3node sequencer + docker compose up --wait l3node sequencer if $l3_token_bridge; then echo == Deploying L2-L3 token bridge From c64ebf776515c41b09f47997b9f1dade54890655 Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 23:10:03 +0900 Subject: [PATCH 14/18] fix: enable block-validator in simple mode for bold --- scripts/config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/config.ts b/scripts/config.ts index 01ca053..2c9ece2 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -291,7 +291,8 @@ function writeConfigs(argv: any) { let simpleConfig = JSON.parse(baseConfJSON) simpleConfig.node.staker.enable = true simpleConfig.node.staker["use-smart-contract-wallet"] = true - simpleConfig.node.staker.dangerous["without-block-validator"] = true + delete simpleConfig.node["block-validator"] + simpleConfig.node.staker.dangerous["without-block-validator"] = false simpleConfig.node.sequencer = true simpleConfig.node.dangerous["no-sequencer-coordinator"] = true simpleConfig.node["delayed-sequencer"].enable = true From 6e03e48e91a3aa2b20965827174c0d7c203bf093 Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 23:10:26 +0900 Subject: [PATCH 15/18] fix: remove dark magic --- test-node.bash | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test-node.bash b/test-node.bash index 0ffe4ae..5e004d9 100755 --- a/test-node.bash +++ b/test-node.bash @@ -522,10 +522,6 @@ if $force_init; then echo == Funding l2 funnel and dev key docker compose up --wait $INITIAL_SEQ_NODES - sleep 60 - # workaround stuck sequencer after logging `Allocated cache and file handles` - docker compose down $INITIAL_SEQ_NODES - docker compose up --wait $INITIAL_SEQ_NODES docker compose run scripts bridge-funds --ethamount 100000 --wait docker compose run scripts send-l2 --ethamount 100 --to l2owner --wait rollupAddress=`docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_chain_info.json | tail -n 1 | tr -d '\r\n'"` @@ -597,9 +593,6 @@ if $force_init; then echo == Funding l3 funnel and dev key docker compose up --wait l3node sequencer - sleep 60 - docker compose down l3node sequencer - docker compose up --wait l3node sequencer if $l3_token_bridge; then echo == Deploying L2-L3 token bridge From ba45e3750dab68b4177729050f03a2ec6690088e Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 23:14:37 +0900 Subject: [PATCH 16/18] Revert "fix: remove dark magic" This reverts commit 6e03e48e91a3aa2b20965827174c0d7c203bf093. --- test-node.bash | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test-node.bash b/test-node.bash index 5e004d9..0ffe4ae 100755 --- a/test-node.bash +++ b/test-node.bash @@ -522,6 +522,10 @@ if $force_init; then echo == Funding l2 funnel and dev key docker compose up --wait $INITIAL_SEQ_NODES + sleep 60 + # workaround stuck sequencer after logging `Allocated cache and file handles` + docker compose down $INITIAL_SEQ_NODES + docker compose up --wait $INITIAL_SEQ_NODES docker compose run scripts bridge-funds --ethamount 100000 --wait docker compose run scripts send-l2 --ethamount 100 --to l2owner --wait rollupAddress=`docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_chain_info.json | tail -n 1 | tr -d '\r\n'"` @@ -593,6 +597,9 @@ if $force_init; then echo == Funding l3 funnel and dev key docker compose up --wait l3node sequencer + sleep 60 + docker compose down l3node sequencer + docker compose up --wait l3node sequencer if $l3_token_bridge; then echo == Deploying L2-L3 token bridge From d3e1fabf08b7114c5a5b5dda95124edbb6321da4 Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 11 Feb 2025 23:29:46 +0900 Subject: [PATCH 17/18] docs: explain --- test-node.bash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test-node.bash b/test-node.bash index 0ffe4ae..b24e4af 100755 --- a/test-node.bash +++ b/test-node.bash @@ -5,7 +5,7 @@ set -eu NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.5.1-rc.2-69577b7-dev BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 -DEFAULT_NITRO_CONTRACTS_VERSION="c1218817" # of v3-dev-testnode +DEFAULT_NITRO_CONTRACTS_VERSION="b027e5e6" # of v3-dev-testnode DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.2" # The is the latest bold-merge commit in nitro-contracts at the time @@ -523,7 +523,7 @@ if $force_init; then echo == Funding l2 funnel and dev key docker compose up --wait $INITIAL_SEQ_NODES sleep 60 - # workaround stuck sequencer after logging `Allocated cache and file handles` + # restart node to workaround stuck sequencer rpc not accepting connections docker compose down $INITIAL_SEQ_NODES docker compose up --wait $INITIAL_SEQ_NODES docker compose run scripts bridge-funds --ethamount 100000 --wait @@ -598,6 +598,7 @@ if $force_init; then echo == Funding l3 funnel and dev key docker compose up --wait l3node sequencer sleep 60 + # restart node to workaround stuck sequencer rpc not accepting connections docker compose down l3node sequencer docker compose up --wait l3node sequencer From 335ff17660284116f076a03bb454baee55b77e73 Mon Sep 17 00:00:00 2001 From: gzeon Date: Wed, 12 Feb 2025 00:15:37 +0900 Subject: [PATCH 18/18] wip: so far --- scripts/config.ts | 2 +- test-node.bash | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/config.ts b/scripts/config.ts index 2c9ece2..0c31534 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -290,7 +290,7 @@ function writeConfigs(argv: any) { if (argv.simple) { let simpleConfig = JSON.parse(baseConfJSON) simpleConfig.node.staker.enable = true - simpleConfig.node.staker["use-smart-contract-wallet"] = true + simpleConfig.node.staker["use-smart-contract-wallet"] = false delete simpleConfig.node["block-validator"] simpleConfig.node.staker.dangerous["without-block-validator"] = false simpleConfig.node.sequencer = true diff --git a/test-node.bash b/test-node.bash index b24e4af..9ce30cb 100755 --- a/test-node.bash +++ b/test-node.bash @@ -5,7 +5,10 @@ set -eu NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.5.1-rc.2-69577b7-dev BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 -DEFAULT_NITRO_CONTRACTS_VERSION="b027e5e6" # of v3-dev-testnode +# nitro-contract workaround for testnode +# 1. authorizing validator signer key since validator wallet if buggy +# - gas estimation sent from 0x0000 lead to balance and permission error +DEFAULT_NITRO_CONTRACTS_VERSION="f3e9a63e" # of v3-dev-testnode DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.2" # The is the latest bold-merge commit in nitro-contracts at the time