Skip to content

Commit adf27f7

Browse files
authored
Merge pull request #119 from OffchainLabs/master-release-merge
Master release merge
2 parents 8b227bb + 898ef91 commit adf27f7

File tree

12 files changed

+299
-46
lines changed

12 files changed

+299
-46
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
branches:
1010
- master
1111
- develop
12+
- release
1213

1314
jobs:
1415
build_and_run:
@@ -18,6 +19,7 @@ jobs:
1819
pos: [pos, no-pos]
1920
l3node: [l3node, l3node-token-6, no-l3node]
2021
tokenbridge: [tokenbridge, no-tokenbridge]
22+
simple: [simple, no-simple]
2123

2224
steps:
2325
- name: Checkout
@@ -34,8 +36,25 @@ jobs:
3436
uses: actions/cache@v3
3537
with:
3638
path: /tmp/.buildx-cache
37-
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}
39+
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
3840
restore-keys: ${{ runner.os }}-buildx-
3941

4042
- name: Startup Nitro testnode
41-
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' }} --no-simple --detach ${{ matrix.pos == 'pos' && '--pos' || '' }}
43+
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') || '' }}
44+
45+
bold_upgrade:
46+
runs-on: ubuntu-8
47+
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
with:
52+
submodules: recursive
53+
54+
- name: Set up Docker Buildx
55+
uses: docker/setup-buildx-action@v3
56+
with:
57+
driver-opts: network=host
58+
59+
- name: Startup Nitro testnode
60+
run: ${{ github.workspace }}/.github/workflows/testnode.bash --init-force --bold-upgrade --simple --detach

.github/workflows/testnode.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Start the test node and get PID, to terminate it once send-l2 is done.
66
cd ${GITHUB_WORKSPACE}
77

8-
./test-node.bash "$@"
8+
./test-node.bash "$@" --ci
99

1010
if [ $? -ne 0 ]; then
1111
echo "test-node.bash failed"

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,44 @@ To see more options, use `--help`.
4646

4747
## Further information
4848

49+
### Branch Selection Guide (for devs working *on* nitro-testnode)
50+
51+
This repository maintains two main branches with distinct purposes.
52+
53+
#### `release` branch
54+
55+
Target branch for changes that should be immediately available to external users.
56+
57+
**Examples of changes for `release`:**
58+
* Bug fixes for existing functionality
59+
* Documentation improvements
60+
* Updates to support newly released Nitro features
61+
* Configuration updates for published Nitro releases
62+
63+
> 💡 Changes here will later be merged into `master`
64+
65+
#### `master` branch
66+
67+
Target branch for changes supporting unreleased Nitro features.
68+
69+
**Examples of changes for `master`:**
70+
* Support for new configuration options being developed in Nitro
71+
* Integration tests for upcoming Nitro features
72+
* Breaking changes that depend on unreleased Nitro versions
73+
74+
> 💡 Changes here will be merged into `release` when the corresponding Nitro features are released
75+
76+
#### Branch Flow
77+
78+
##### For immediate public consumption
79+
1. Push to `release`
80+
2. Later merge into `master`
81+
82+
##### For unreleased Nitro features
83+
1. Push to `master`
84+
2. Merge into `release` when the feature is released
85+
86+
4987
### Working with docker containers
5088

5189
**sequencer** is the main docker to be used to access the nitro testchain. It's http and websocket interfaces are exposed at localhost ports 8547 and 8548 ports, respectively.

boldupgrader/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:18-bullseye-slim
2+
RUN apt-get update && \
3+
apt-get install -y git docker.io python3 make gcc g++ curl jq
4+
ARG BOLD_CONTRACTS_BRANCH=bold-merge-script
5+
WORKDIR /workspace
6+
RUN git clone --no-checkout https://github.com/OffchainLabs/nitro-contracts.git ./
7+
RUN git checkout ${BOLD_CONTRACTS_BRANCH}
8+
RUN yarn install && yarn cache clean
9+
RUN curl -L https://foundry.paradigm.xyz | bash
10+
ENV PATH="${PATH}:/root/.foundry/bin"
11+
RUN foundryup
12+
RUN touch scripts/config.ts
13+
RUN yarn build:all
14+
ENTRYPOINT ["yarn"]

docker-compose-ci-cache.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"target": {
3+
"scripts": {
4+
"cache-from": [
5+
"type=local,src=/tmp/.buildx-cache"
6+
],
7+
"cache-to": [
8+
"type=local,dest=/tmp/.buildx-cache,mode=max"
9+
],
10+
"output": [
11+
"type=docker"
12+
]
13+
},
14+
"rollupcreator": {
15+
"cache-from": [
16+
"type=local,src=/tmp/.buildx-cache"
17+
],
18+
"cache-to": [
19+
"type=local,dest=/tmp/.buildx-cache,mode=max"
20+
],
21+
"output": [
22+
"type=docker"
23+
]
24+
},
25+
"boldupgrader": {
26+
"cache-from": [
27+
"type=local,src=/tmp/.buildx-cache"
28+
],
29+
"cache-to": [
30+
"type=local,dest=/tmp/.buildx-cache,mode=max"
31+
],
32+
"output": [
33+
"type=docker"
34+
]
35+
},
36+
"tokenbridge": {
37+
"cache-from": [
38+
"type=local,src=/tmp/.buildx-cache"
39+
],
40+
"cache-to": [
41+
"type=local,dest=/tmp/.buildx-cache,mode=max"
42+
],
43+
"output": [
44+
"type=docker"
45+
]
46+
}
47+
}
48+
}

docker-compose.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ services:
4747
- "127.0.0.1:6379:6379"
4848

4949
geth:
50-
image: ethereum/client-go:latest
50+
image: ethereum/client-go:stable
5151
ports:
5252
- "127.0.0.1:8545:8545"
5353
- "127.0.0.1:8551:8551"
@@ -98,7 +98,6 @@ services:
9898
- --output-ssz=/consensus/genesis.ssz
9999
- --chain-config-file=/config/prysm.yaml
100100
- --geth-genesis-json-in=/config/geth_genesis.json
101-
- --geth-genesis-json-out=/config/geth_genesis.json
102101
volumes:
103102
- "consensus:/consensus"
104103
- "config:/config"
@@ -354,6 +353,26 @@ services:
354353
- "tokenbridge-data:/workspace"
355354
- /var/run/docker.sock:/var/run/docker.sock
356355

356+
boldupgrader:
357+
depends_on:
358+
- geth
359+
- sequencer
360+
pid: host
361+
build:
362+
context: boldupgrader/
363+
args:
364+
BOLD_CONTRACTS_BRANCH: ${BOLD_CONTRACTS_BRANCH:-}
365+
environment:
366+
- L1_RPC_URL=http://geth:8545
367+
- L1_PRIV_KEY=0xdc04c5399f82306ec4b4d654a342f40e2e0620fe39950d967e1e574b32d4dd36
368+
- CONFIG_NETWORK_NAME=local
369+
- DEPLOYED_CONTRACTS_DIR=./scripts/files/
370+
- DISABLE_VERIFICATION=true
371+
volumes:
372+
- "config:/config"
373+
- "boldupgrader-data:/workspace"
374+
- /var/run/docker.sock:/var/run/docker.sock
375+
357376
rollupcreator:
358377
depends_on:
359378
- geth
@@ -434,3 +453,4 @@ volumes:
434453
das-committee-a-data:
435454
das-committee-b-data:
436455
das-mirror-data:
456+
boldupgrader-data:

rollupcreator/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
FROM node:18-bullseye-slim
2-
ARG NITRO_CONTRACTS_BRANCH=main
32
RUN apt-get update && \
4-
apt-get install -y git docker.io python3 build-essential curl jq
3+
apt-get install -y git docker.io python3 make gcc g++ curl jq
4+
ARG NITRO_CONTRACTS_BRANCH=main
55
WORKDIR /workspace
66
RUN git clone --no-checkout https://github.com/OffchainLabs/nitro-contracts.git ./
77
RUN git checkout ${NITRO_CONTRACTS_BRANCH}
8+
RUN yarn install && yarn cache clean
89
RUN curl -L https://foundry.paradigm.xyz | bash
910
ENV PATH="${PATH}:/root/.foundry/bin"
1011
RUN foundryup
1112
RUN touch scripts/config.ts
12-
RUN yarn install
1313
RUN yarn build:all
1414
ENTRYPOINT ["yarn"]

scripts/config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ DENEB_FORK_VERSION: 0x20000093
3434
# ELECTRA
3535
ELECTRA_FORK_VERSION: 0x20000094
3636
37+
# FULU
38+
FULU_FORK_VERSION: 0x20000095
39+
3740
# Time parameters
3841
SECONDS_PER_SLOT: 2
3942
SLOTS_PER_EPOCH: 6
@@ -69,7 +72,14 @@ function writeGethGenesisConfig(argv: any) {
6972
"shanghaiTime": 0,
7073
"cancunTime": 1706778826,
7174
"terminalTotalDifficulty": 0,
72-
"terminalTotalDifficultyPassed": true
75+
"terminalTotalDifficultyPassed": true,
76+
"blobSchedule": {
77+
"cancun": {
78+
"target": 3,
79+
"max": 6,
80+
"baseFeeUpdateFraction": 3338477
81+
}
82+
}
7383
},
7484
"difficulty": "0",
7585
"extradata": "0x00000000000000000000000000000000000000000000000000000000000000003f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E0B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",

0 commit comments

Comments
 (0)