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

V3 support #117

Draft
wants to merge 20 commits into
base: release
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
27 changes: 14 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -42,19 +43,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
# bold_upgrade:
# runs-on: ubuntu-8

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# 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: 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
# - name: Startup Nitro testnode
# run: ${{ github.workspace }}/.github/workflows/testnode.bash --init-force --bold-upgrade --simple --detach
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 10 additions & 3 deletions scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ function writeConfigs(argv: any) {
"info-files": [chainInfoFile],
},
"node": {
"bold": {
"enable": true,
"rpc-block-number": "latest",
"strategy": "makeNodes",
"assertion-posting-interval": "10s"
},
"staker": {
"dangerous": {
"without-block-validator": false
Expand Down Expand Up @@ -291,8 +297,9 @@ 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.dangerous["without-block-validator"] = 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
simpleConfig.node.dangerous["no-sequencer-coordinator"] = true
simpleConfig.node["delayed-sequencer"].enable = true
Expand Down Expand Up @@ -428,7 +435,7 @@ function writeL3ChainConfig(argv: any) {
"EnableArbOS": true,
"AllowDebugPrecompiles": true,
"DataAvailabilityCommittee": false,
"InitialArbOSVersion": 31,
"InitialArbOSVersion": 32,
"InitialChainOwner": argv.l2owner,
"GenesisBlockNum": 0
}
Expand Down
17 changes: 13 additions & 4 deletions test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

set -eu

NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.2.1-d81324d-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="v2.1.1-beta.0"
# 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
Expand Down Expand Up @@ -374,7 +377,6 @@ if $build_utils; then
fi

if [ "$ci" == true ]; then
# workaround to cache docker layers and keep using docker-compose in CI
docker buildx bake --allow=fs=/tmp --file docker-compose.yaml --file docker-compose-ci-cache.json $LOCAL_BUILD_NODES
else
UTILS_NOCACHE=""
Expand Down Expand Up @@ -476,7 +478,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=""
Expand Down Expand Up @@ -523,6 +524,10 @@ if $force_init; then

echo == Funding l2 funnel and dev key
docker compose up --wait $INITIAL_SEQ_NODES
sleep 60
# 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
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'"`
Expand Down Expand Up @@ -594,6 +599,10 @@ 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

if $l3_token_bridge; then
echo == Deploying L2-L3 token bridge
Expand Down
Loading