Skip to content

Commit 4578295

Browse files
committed
Merge branch 'fix-chain-config' into transfer-ownership
2 parents 486bc9d + 7e9b072 commit 4578295

File tree

7 files changed

+90
-9
lines changed

7 files changed

+90
-9
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
run-name: CI triggered from @${{ github.actor }} of ${{ github.head_ref }}
3+
4+
on:
5+
workflow_dispatch:
6+
merge_group:
7+
pull_request:
8+
push:
9+
branches:
10+
- master
11+
- develop
12+
13+
14+
jobs:
15+
build_and_run:
16+
runs-on: ubuntu-8
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
with:
27+
driver-opts: network=host
28+
29+
- name: Cache Docker layers
30+
uses: actions/cache@v3
31+
with:
32+
path: /tmp/.buildx-cache
33+
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}
34+
restore-keys: ${{ runner.os }}-buildx-
35+
36+
- name: Startup Nitro testnode
37+
run: ${{ github.workspace }}/.github/workflows/testnode.bash

.github/workflows/testnode.bash

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
# The script starts up the test node and waits until the timeout (10min) or
3+
# until send-l2 succeeds.
4+
5+
# Start the test node and get PID, to terminate it once send-l2 is done.
6+
${GITHUB_WORKSPACE}/test-node.bash --init > output.log 2>&1 &
7+
PID=$!
8+
9+
sleep 5m
10+
11+
START=$(date +%s)
12+
SUCCEDED=0
13+
14+
while true; do
15+
if ${GITHUB_WORKSPACE}/test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait; then
16+
echo "Sending l2 transaction succeeded"
17+
SUCCEDED=1
18+
break
19+
fi
20+
21+
# Check if the timeout (10 min) has been reached.
22+
NOW=$(date +%s)
23+
DIFF=$((NOW - START))
24+
if [ "$DIFF" -ge 600 ]; then
25+
echo "Timed out"
26+
break
27+
fi
28+
29+
sleep 10
30+
done
31+
32+
# Shut down the test node and wait for it to terminate.
33+
kill $PID
34+
wait $PID
35+
36+
if [ "$SUCCEDED" -eq 0 ]; then
37+
exit 1
38+
fi
39+
40+
exit 0

scripts/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16
1+
FROM node:16-bullseye-slim
22
WORKDIR /workspace
33
COPY ./package.json ./yarn.lock ./
44
RUN yarn

scripts/accounts.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ export function namedAddress(
8585

8686
export const namedAccountHelpString =
8787
"Valid account names:\n" +
88-
" funnel | sequencer | validator - known keys\n" +
89-
" user_[Alphanumeric] - key will be generated from username\n" +
90-
" threaduser_[Alphanumeric] - same as user_[Alphanumeric]_thread_[thread-id]\n" +
91-
" key_0x[full private key] - user with specified private key\n" +
88+
" funnel | sequencer | validator | l2owner - known keys used by l2\n" +
89+
" l3owner | l3sequencer - known keys used by l3\n" +
90+
" user_[Alphanumeric] - key will be generated from username\n" +
91+
" threaduser_[Alphanumeric] - same as user_[Alphanumeric]_thread_[thread-id]\n" +
92+
" key_0x[full private key] - user with specified private key\n" +
9293
"\n" +
9394
"Valid addresses: any account name, or\n" +
9495
" address_0x[full eth address]\n" +
@@ -123,7 +124,7 @@ export const printPrivateKeyCommand = {
123124
builder: {
124125
account: {
125126
string: true,
126-
describe: "address (see general help)",
127+
describe: "account (see general help)",
127128
default: "funnel",
128129
},
129130
},

scripts/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ function writeConfigs(argv: any) {
181181
},
182182
"sequencer": false,
183183
"dangerous": {
184-
"no-sequencer-coordinator": false
184+
"no-sequencer-coordinator": false,
185+
"disable-blob-reader": true,
185186
},
186187
"delayed-sequencer": {
187188
"enable": false

test-node.bash

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,15 @@ while [[ $# -gt 0 ]]; do
164164
echo --init remove all data, rebuild, deploy new rollup
165165
echo --pos l1 is a proof-of-stake chain \(using prysm for consensus\)
166166
echo --validate heavy computation, validating all blocks in WASM
167+
echo --l3-node deploys an L3 node on top of the L2
167168
echo --l3-fee-token L3 chain is set up to use custom fee token. Only valid if also '--l3node' is provided
168169
echo --l3-token-bridge Deploy L2-L3 token bridge. Only valid if also '--l3node' is provided
169170
echo --batchposters batch posters [0-3]
170171
echo --redundantsequencers redundant sequencers [0-3]
171172
echo --detach detach from nodes after running them
172173
echo --blockscout build or launch blockscout
173174
echo --simple run a simple configuration. one node as sequencer/batch-poster/staker \(default unless using --dev\)
175+
echo --tokenbridge deploy L1-L2 token bridge.
174176
echo --no-tokenbridge don\'t build or launch tokenbridge
175177
echo --no-run does not launch nodes \(useful with build or init\)
176178
echo --no-simple run a full configuration with separate sequencer/batch-poster/validator/relayer

tokenbridge/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM node:16-bullseye-slim
22
RUN apt-get update && \
3-
apt-get install -y git docker.io python3 chromium build-essential
3+
apt-get install -y git docker.io python3 build-essential
44
WORKDIR /workspace
5-
RUN git clone -b reg-weth-gw https://github.com/OffchainLabs/token-bridge-contracts.git ./
5+
RUN git clone https://github.com/OffchainLabs/token-bridge-contracts.git ./
66
RUN yarn install
77
RUN yarn build
88
ENTRYPOINT ["yarn"]

0 commit comments

Comments
 (0)