Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into merge-v1.11.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan-Wilson committed Jun 29, 2023
2 parents d1d9d18 + 47f76bb commit 2b63530
Show file tree
Hide file tree
Showing 114 changed files with 1,555 additions and 2,983 deletions.
6 changes: 1 addition & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ solgen/go
target/**/*
brotli/buildfiles/**/*

# these go to different docker images
testnode-scripts/node_modules
blockscout/**/*

# these are used by environment outside the docker:
test-node.bash
nitro-testnode/**/*

# Arbitrator ignores

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/arbitrator-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI
name: Arbitrator CI
run-name: Arbitrator CI triggered from @${{ github.actor }} of ${{ github.head_ref }}

on:
workflow_dispatch:
Expand Down Expand Up @@ -37,7 +38,7 @@ jobs:
- name: Install go
uses: actions/setup-go@v2
with:
go-version: 1.19.x
go-version: 1.20.x

- name: Setup nodejs
uses: actions/setup-node@v2
Expand Down Expand Up @@ -109,12 +110,12 @@ jobs:
target/lib/libbrotlicommon-static.a
target/lib/libbrotlienc-static.a
target/lib/libbrotlidec-static.a
key: ${{ runner.os }}-brotli-2-${{ hashFiles('build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}
key: ${{ runner.os }}-brotli-3-${{ hashFiles('scripts/build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}
restore-keys: ${{ runner.os }}-brotli-2-

- name: Build cbrotli-local
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./build-brotli.sh -l
run: ./scripts/build-brotli.sh -l

- name: Setup emsdk
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
Expand All @@ -130,7 +131,7 @@ jobs:

- name: Build cbrotli-wasm
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./build-brotli.sh -w
run: ./scripts/build-brotli.sh -w

- name: Add wabt to path
run: echo "$HOME/wabt-prefix/bin" >> "$GITHUB_PATH"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/arbitrator-skip-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI
name: Arbitrator skip CI
run-name: Arbitrator skip CI triggered from @${{ github.actor }} of ${{ github.head_ref }}

on:
pull_request:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI
name: Go tests CI
run-name: Go tests CI triggered from @${{ github.actor }} of ${{ github.head_ref }}

on:
workflow_dispatch:
Expand Down Expand Up @@ -44,7 +45,7 @@ jobs:
- name: Install go
uses: actions/setup-go@v2
with:
go-version: 1.19.x
go-version: 1.20.x

- name: Install wasm-ld
run: |
Expand Down Expand Up @@ -105,16 +106,16 @@ jobs:
target/lib/libbrotlicommon-static.a
target/lib/libbrotlienc-static.a
target/lib/libbrotlidec-static.a
key: ${{ runner.os }}-brotli-${{ hashFiles('build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}-${{ matrix.test-mode }}
key: ${{ runner.os }}-brotli-${{ hashFiles('scripts/build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}-${{ matrix.test-mode }}
restore-keys: ${{ runner.os }}-brotli-

- name: Build cbrotli-local
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./build-brotli.sh -l
run: ./scripts/build-brotli.sh -l

- name: Build cbrotli-wasm in docker
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./build-brotli.sh -w -d
run: ./scripts/build-brotli.sh -w -d

- name: Build
run: make build test-go-deps -j
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Install go
uses: actions/setup-go@v2
with:
go-version: 1.19.x
go-version: 1.20.x

- name: Install rust stable
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -108,12 +108,12 @@ jobs:
target/lib/libbrotlicommon-static.a
target/lib/libbrotlienc-static.a
target/lib/libbrotlidec-static.a
key: ${{ runner.os }}-brotli-${{ hashFiles('build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}
key: ${{ runner.os }}-brotli-3a-${{ hashFiles('scripts/build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}
restore-keys: ${{ runner.os }}-brotli-

- name: Build cbrotli-local
if: steps.cache-cbrotli.outputs.cache-hit != 'true'
run: ./build-brotli.sh -l
run: ./scripts/build-brotli.sh -l

- name: Cache Build Products
uses: actions/cache@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI
name: Docker build CI
run-name: Docker build CI triggered from @${{ github.actor }} of ${{ github.head_ref }}

on:
workflow_dispatch:
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
path = contracts
url = https://github.com/OffchainLabs/nitro-contracts.git
branch = develop
[submodule "blockscout"]
path = blockscout
url = https://github.com/OffchainLabs/blockscout.git
[submodule "arbitrator/wasm-testsuite/testsuite"]
path = arbitrator/wasm-testsuite/testsuite
url = https://github.com/WebAssembly/testsuite.git
[submodule "nitro-testnode"]
path = nitro-testnode
url = https://github.com/OffchainLabs/nitro-testnode.git
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ RUN apt-get update && \
cd emsdk && \
./emsdk install 3.1.7 && \
./emsdk activate 3.1.7
COPY build-brotli.sh .
COPY scripts/build-brotli.sh scripts/
COPY brotli brotli
RUN cd emsdk && . ./emsdk_env.sh && cd .. && ./build-brotli.sh -w -t install/
RUN cd emsdk && . ./emsdk_env.sh && cd .. && ./scripts/build-brotli.sh -w -t /workspace/install/

FROM scratch as brotli-wasm-export
COPY --from=brotli-wasm-builder /workspace/install/ /

FROM debian:bullseye-slim as brotli-library-builder
WORKDIR /workspace
COPY build-brotli.sh .
COPY scripts/build-brotli.sh scripts/
COPY brotli brotli
RUN apt-get update && \
apt-get install -y cmake make gcc git && \
./build-brotli.sh -l -t install/
./scripts/build-brotli.sh -l -t /workspace/install/

FROM scratch as brotli-library-export
COPY --from=brotli-library-builder /workspace/install/ /
Expand Down Expand Up @@ -53,7 +53,7 @@ COPY --from=wasm-libs-builder /workspace/ /

FROM wasm-base as wasm-bin-builder
# pinned go version
RUN curl -L https://golang.org/dl/go1.19.linux-`dpkg --print-architecture`.tar.gz | tar -C /usr/local -xzf -
RUN curl -L https://golang.org/dl/go1.20.linux-`dpkg --print-architecture`.tar.gz | tar -C /usr/local -xzf -
COPY ./Makefile ./go.mod ./go.sum ./
COPY ./arbcompress ./arbcompress
COPY ./arbos ./arbos
Expand Down Expand Up @@ -146,7 +146,7 @@ FROM debian:bullseye-slim as machine-versions
RUN apt-get update && apt-get install -y unzip wget curl
WORKDIR /workspace/machines
# Download WAVM machines
COPY ./testnode-scripts/download-machine.sh .
COPY ./scripts/download-machine.sh .
#RUN ./download-machine.sh consensus-v1-rc1 0xbb9d58e9527566138b682f3a207c0976d5359837f6e330f4017434cca983ff41
#RUN ./download-machine.sh consensus-v2.1 0x9d68e40c47e3b87a8a7e6368cc52915720a6484bb2f47ceabad7e573e3a11232
#RUN ./download-machine.sh consensus-v3 0x53c288a0ca7100c0f2db8ab19508763a51c7fd1be125d376d940a65378acaee7
Expand All @@ -161,7 +161,7 @@ COPY ./testnode-scripts/download-machine.sh .
RUN ./download-machine.sh consensus-v10 0x6b94a7fc388fd8ef3def759297828dc311761e88d8179c7ee8d3887dc554f3c3
RUN ./download-machine.sh consensus-v10.1 0xda4e3ad5e7feacb817c21c8d0220da7650fe9051ece68a3f0b1c5d38bbb27b21

FROM golang:1.19-bullseye as node-builder
FROM golang:1.20-bullseye as node-builder
WORKDIR /workspace
ARG version=""
ARG datetime=""
Expand All @@ -188,11 +188,11 @@ RUN NITRO_BUILD_IGNORE_TIMESTAMPS=1 make build

FROM node-builder as fuzz-builder
RUN mkdir fuzzers/
RUN ./fuzz.bash --build --binary-path /workspace/fuzzers/
RUN ./scripts/fuzz.bash --build --binary-path /workspace/fuzzers/

FROM debian:bullseye-slim as nitro-fuzzer
COPY --from=fuzz-builder /workspace/fuzzers/*.fuzz /usr/local/bin/
COPY ./fuzz.bash /usr/local/bin
COPY ./scripts/fuzz.bash /usr/local/bin
RUN mkdir /fuzzcache
ENTRYPOINT [ "/usr/local/bin/fuzz.bash", "--binary-path", "/usr/local/bin/", "--fuzzcache-path", "/fuzzcache" ]

Expand All @@ -215,7 +215,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
chown -R user:user /home/user && \
chmod -R 555 /home/user/target/machines && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /usr/share/doc/* && \
rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/ldconfig/aux-cache /usr/lib/python3.9/__pycache__/ /usr/lib/python3.9/*/__pycache__/ /var/log/* && \
nitro --version

USER user
Expand All @@ -234,7 +234,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
node-ws vim-tiny python3 \
dnsutils && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /usr/share/doc/* && \
rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/ldconfig/aux-cache /usr/lib/python3.9/__pycache__/ /usr/lib/python3.9/*/__pycache__/ /var/log/* && \
nitro --version

USER user
Expand All @@ -258,7 +258,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
adduser user sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /usr/share/doc/* && \
rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/ldconfig/aux-cache /usr/lib/python3.9/__pycache__/ /usr/lib/python3.9/*/__pycache__/ /var/log/* && \
nitro --version

USER user
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -332,23 +332,23 @@ contracts/test/prover/proofs/%.json: $(arbitrator_cases)/%.wasm $(arbitrator_pro
@touch $@

.make/cbrotli-lib: $(DEP_PREDICATE) $(ORDER_ONLY_PREDICATE) .make
test -f target/include/brotli/encode.h || ./build-brotli.sh -l
test -f target/include/brotli/decode.h || ./build-brotli.sh -l
test -f target/lib/libbrotlicommon-static.a || ./build-brotli.sh -l
test -f target/lib/libbrotlienc-static.a || ./build-brotli.sh -l
test -f target/lib/libbrotlidec-static.a || ./build-brotli.sh -l
test -f target/include/brotli/encode.h || ./scripts/build-brotli.sh -l
test -f target/include/brotli/decode.h || ./scripts/build-brotli.sh -l
test -f target/lib/libbrotlicommon-static.a || ./scripts/build-brotli.sh -l
test -f target/lib/libbrotlienc-static.a || ./scripts/build-brotli.sh -l
test -f target/lib/libbrotlidec-static.a || ./scripts/build-brotli.sh -l
@touch $@

.make/cbrotli-wasm: $(DEP_PREDICATE) $(ORDER_ONLY_PREDICATE) .make
test -f target/lib-wasm/libbrotlicommon-static.a || ./build-brotli.sh -w -d
test -f target/lib-wasm/libbrotlienc-static.a || ./build-brotli.sh -w -d
test -f target/lib-wasm/libbrotlidec-static.a || ./build-brotli.sh -w -d
test -f target/lib-wasm/libbrotlicommon-static.a || ./scripts/build-brotli.sh -w -d
test -f target/lib-wasm/libbrotlienc-static.a || ./scripts/build-brotli.sh -w -d
test -f target/lib-wasm/libbrotlidec-static.a || ./scripts/build-brotli.sh -w -d
@touch $@

.make/wasm-lib: $(DEP_PREDICATE) $(ORDER_ONLY_PREDICATE) .make
test -f arbitrator/wasm-libraries/soft-float/bindings32.o || ./build-brotli.sh -f -d -t .
test -f arbitrator/wasm-libraries/soft-float/bindings64.o || ./build-brotli.sh -f -d -t .
test -f arbitrator/wasm-libraries/soft-float/SoftFloat/build/Wasm-Clang/softfloat.a || ./build-brotli.sh -f -d -t .
test -f arbitrator/wasm-libraries/soft-float/bindings32.o || ./scripts/build-brotli.sh -f -d -t .
test -f arbitrator/wasm-libraries/soft-float/bindings64.o || ./scripts/build-brotli.sh -f -d -t .
test -f arbitrator/wasm-libraries/soft-float/SoftFloat/build/Wasm-Clang/softfloat.a || ./scripts/build-brotli.sh -f -d -t .
@touch $@

.make:
Expand Down
Loading

0 comments on commit 2b63530

Please sign in to comment.