Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release'
Browse files Browse the repository at this point in the history
Resolve conflicting changes to node image and nitro contracts versions
in master from 8ec2131, which conflicted with the release branch in
dbf27b6 and 7ac0d6e. Take release branch's version of both since they
represent newer versions.
  • Loading branch information
Tristan-Wilson committed Sep 4, 2024
2 parents a5534b6 + 91b59a8 commit 28d47a8
Show file tree
Hide file tree
Showing 11 changed files with 285 additions and 100 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,38 @@ name: CI
run-name: CI triggered from @${{ github.actor }} of ${{ github.head_ref }}

on:
workflow_dispatch:
merge_group:
pull_request:
push:
branches:
- master
- develop

workflow_dispatch:
merge_group:
pull_request:
push:
branches:
- master
- develop

jobs:
build_and_run:
runs-on: ubuntu-8
strategy:
matrix:
pos: [true, false]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- 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: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}
restore-keys: ${{ runner.os }}-buildx-
- name: Startup Nitro testnode
run: ${{ github.workspace }}/.github/workflows/testnode.bash
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}
restore-keys: ${{ runner.os }}-buildx-

- name: Startup Nitro testnode
run: ${{ github.workspace }}/.github/workflows/testnode.bash ${{ matrix.pos == true && '--pos' || '' }}
30 changes: 27 additions & 3 deletions .github/workflows/testnode.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,32 @@
# Start the test node and get PID, to terminate it once send-l2 is done.
cd ${GITHUB_WORKSPACE}

while [[ $# -gt 0 ]]; do
case $1 in
--pos)
pos=true
shift
;;
*)
echo "Unknown option $1"
exit 1
;;
esac
done

# TODO once develop is merged into nitro-contract's master, remove the NITRO_CONTRACTS_BRANCH env var
./test-node.bash --init-force --l3node --no-simple --detach
if [ "$pos" = true ]; then
echo "Running with --pos"
./test-node.bash --init-force --l3node --no-simple --detach --pos
else
./test-node.bash --init-force --l3node --no-simple --detach
fi

if [ $? -ne 0 ]; then
echo "test-node.bash failed"
docker compose logs --tail=1000
exit 1
fi

START=$(date +%s)
L2_TRANSACTION_SUCCEEDED=false
Expand Down Expand Up @@ -44,10 +68,10 @@ while true; do
sleep 10
done

docker-compose stop
docker compose stop

if [ "$SUCCEEDED" = false ]; then
docker-compose logs
docker compose logs
exit 1
fi

Expand Down
12 changes: 9 additions & 3 deletions 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:v1.10.23
image: ethereum/client-go:latest
ports:
- "127.0.0.1:8545:8545"
- "127.0.0.1:8551:8551"
Expand Down Expand Up @@ -77,6 +77,7 @@ services:
- --authrpc.jwtsecret=/config/jwt.hex
- --nodiscover
- --syncmode=full
- --state.scheme=hash
- --dev
- --dev.period=1
- --mine
Expand All @@ -91,9 +92,13 @@ services:
command:
- testnet
- generate-genesis
- --fork=deneb
- --num-validators=64
- --genesis-time-delay=15
- --output-ssz=/consensus/genesis.ssz
- --chain-config-file=/config/prysm.yaml
- --geth-genesis-json-in=/config/geth_genesis.json
- --geth-genesis-json-out=/config/geth_genesis.json
volumes:
- "consensus:/consensus"
- "config:/config"
Expand All @@ -108,16 +113,17 @@ services:
- --datadir=/consensus/beacondata
- --rpc-port=5000
- --min-sync-peers=0
- --interop-genesis-state=/consensus/genesis.ssz
- --genesis-state=/consensus/genesis.ssz
- --interop-eth1data-votes
- --bootstrap-node=
- --chain-config-file=/config/prysm.yaml
- --rpc-host=0.0.0.0
- --grpc-gateway-host=0.0.0.0
- --chain-id=32382
- --chain-id=1337
- --execution-endpoint=http://geth:8551
- --accept-terms-of-use
- --jwt-secret=/config/jwt.hex
- --suggested-fee-recipient=0x000000000000000000000000000000000000dEaD
depends_on:
geth:
condition: service_started
Expand Down
2 changes: 1 addition & 1 deletion rollupcreator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.20.3-bullseye-slim
FROM node:18-bullseye-slim
ARG NITRO_CONTRACTS_BRANCH=main
RUN apt-get update && \
apt-get install -y git docker.io python3 build-essential curl jq
Expand Down
2 changes: 1 addition & 1 deletion scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-bullseye-slim
FROM node:18-bullseye-slim
WORKDIR /workspace
COPY ./package.json ./yarn.lock ./
RUN yarn
Expand Down
32 changes: 21 additions & 11 deletions scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,28 @@ PRESET_BASE: interop
GENESIS_FORK_VERSION: 0x20000089
# Altair
ALTAIR_FORK_EPOCH: 1
ALTAIR_FORK_EPOCH: 0
ALTAIR_FORK_VERSION: 0x20000090
# Merge
BELLATRIX_FORK_EPOCH: 2
BELLATRIX_FORK_EPOCH: 0
BELLATRIX_FORK_VERSION: 0x20000091
TERMINAL_TOTAL_DIFFICULTY: 50
# Capella
CAPELLA_FORK_EPOCH: 0
CAPELLA_FORK_VERSION: 0x20000092
MAX_WITHDRAWALS_PER_PAYLOAD: 16
# DENEB
DENEB_FORK_EPOCH: 0
DENEB_FORK_VERSION: 0x20000093
# ELECTRA
ELECTRA_FORK_VERSION: 0x20000094
# Time parameters
SECONDS_PER_SLOT: 12
SECONDS_PER_SLOT: 2
SLOTS_PER_EPOCH: 6
# Deposit contract
Expand All @@ -36,8 +48,7 @@ function writeGethGenesisConfig(argv: any) {
{
"config": {
"ChainName": "l1_chain",
"chainId": 32382,
"consensus": "clique",
"chainId": 1337,
"homesteadBlock": 0,
"daoForkSupport": true,
"eip150Block": 0,
Expand All @@ -54,13 +65,12 @@ function writeGethGenesisConfig(argv: any) {
"terminalBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"arrowGlacierBlock": 0,
"grayGlacierBlock": 0,
"clique": {
"period": 5,
"epoch": 30000
},
"terminalTotalDifficulty": 50
"shanghaiTime": 0,
"cancunTime": 1706778826,
"terminalTotalDifficulty": 0,
"terminalTotalDifficultyPassed": true
},
"difficulty": "1",
"difficulty": "0",
"extradata": "0x00000000000000000000000000000000000000000000000000000000000000003f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E0B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x42",
"timestamp": "0x0",
Expand Down
2 changes: 2 additions & 0 deletions scripts/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ export const tokenbridgedatapath = "/tokenbridge-data";
// Not secure. Do not use for production purposes
export const l1mnemonic =
"indoor dish desk flag debris potato excuse depart ticket judge file exit";

export const ARB_OWNER = "0x0000000000000000000000000000000000000070";
Loading

0 comments on commit 28d47a8

Please sign in to comment.