forked from OffchainLabs/nitro-testnode
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release' of github.com:OffchainLabs/nitro-testnode into…
… jh/dev-node
- Loading branch information
Showing
11 changed files
with
252 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CI | ||
run-name: CI triggered from @${{ github.actor }} of ${{ github.head_ref }} | ||
|
||
on: | ||
workflow_dispatch: | ||
merge_group: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
|
||
jobs: | ||
build_and_run: | ||
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: 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
# The script starts up the test node and waits until the timeout (10min) or | ||
# until send-l2 succeeds. | ||
|
||
# Start the test node and get PID, to terminate it once send-l2 is done. | ||
cd ${GITHUB_WORKSPACE} | ||
|
||
# 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 | ||
|
||
START=$(date +%s) | ||
L2_TRANSACTION_SUCCEEDED=false | ||
L3_TRANSACTION_SUCCEEDED=false | ||
SUCCEEDED=false | ||
|
||
while true; do | ||
if [ "$L2_TRANSACTION_SUCCEEDED" = false ]; then | ||
if ${GITHUB_WORKSPACE}/test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait; then | ||
echo "Sending l2 transaction succeeded" | ||
L2_TRANSACTION_SUCCEEDED=true | ||
fi | ||
fi | ||
|
||
if [ "$L3_TRANSACTION_SUCCEEDED" = false ]; then | ||
if ${GITHUB_WORKSPACE}/test-node.bash script send-l3 --ethamount 100 --to user_l3user --wait; then | ||
echo "Sending l3 transaction succeeded" | ||
L3_TRANSACTION_SUCCEEDED=true | ||
fi | ||
fi | ||
|
||
if [ "$L2_TRANSACTION_SUCCEEDED" = true ] && [ "$L3_TRANSACTION_SUCCEEDED" = true ]; then | ||
SUCCEEDED=true | ||
break | ||
fi | ||
|
||
# Check if the timeout (10 min) has been reached. | ||
NOW=$(date +%s) | ||
DIFF=$((NOW - START)) | ||
if [ "$DIFF" -ge 600 ]; then | ||
echo "Timed out" | ||
break | ||
fi | ||
|
||
sleep 10 | ||
done | ||
|
||
docker-compose stop | ||
|
||
if [ "$SUCCEEDED" = false ]; then | ||
docker-compose logs | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule blockscout
updated
8 files
+1 −1 | init/data/ArbDebug.abi | |
+1 −1 | init/data/ArbGasInfo.abi | |
+1 −1 | init/data/ArbOwner.abi | |
+1 −1 | init/data/ArbOwnerPublic.abi | |
+1 −1 | init/data/ArbSys.abi | |
+1 −0 | init/data/ArbWasm.abi | |
+1 −0 | init/data/ArbWasmCache.abi | |
+1 −1 | init/data/NodeInterface.abi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:16-bullseye-slim | ||
ARG NITRO_CONTRACTS_BRANCH=main | ||
RUN apt-get update && \ | ||
apt-get install -y git docker.io python3 build-essential curl jq | ||
WORKDIR /workspace | ||
RUN git clone --no-checkout https://github.com/OffchainLabs/nitro-contracts.git ./ | ||
RUN git checkout ${NITRO_CONTRACTS_BRANCH} | ||
RUN curl -L https://foundry.paradigm.xyz | bash | ||
ENV PATH="${PATH}:/root/.foundry/bin" | ||
RUN foundryup | ||
RUN touch scripts/config.ts | ||
RUN yarn install | ||
RUN yarn build:all | ||
ENTRYPOINT ["yarn"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.