From 51fdf1f1dc96aa6e4a3ca51db8f1dfa12d87b277 Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Wed, 26 Jun 2024 14:08:19 +0200 Subject: [PATCH 1/9] fix: docker build for worker and leader --- leader.Dockerfile | 48 ++++++++++++++++++++++++++++++++++++++ worker.Dockerfile | 37 +++++++++++++++++++++++++++++ zero_bin/leader.Dockerfile | 43 ---------------------------------- zero_bin/worker.Dockerfile | 35 --------------------------- 4 files changed, 85 insertions(+), 78 deletions(-) create mode 100644 leader.Dockerfile create mode 100644 worker.Dockerfile delete mode 100644 zero_bin/leader.Dockerfile delete mode 100644 zero_bin/worker.Dockerfile diff --git a/leader.Dockerfile b/leader.Dockerfile new file mode 100644 index 000000000..8d66b43fb --- /dev/null +++ b/leader.Dockerfile @@ -0,0 +1,48 @@ +FROM rustlang/rust:nightly-bullseye-slim as builder + +RUN apt-get update && apt-get install -y libjemalloc2 libjemalloc-dev make libssl-dev pkg-config + +RUN mkdir -p zero_bin +COPY Cargo.toml . +# Cleanup all workspace members and add again selected crates +RUN sed -i '/members =/{:a;N;/]/!ba};//d' Cargo.toml +RUN sed -i 's#\[workspace\]#\[workspace\]\nmembers = \["zero_bin\/leader", "zero_bin\/prover", "zero_bin\/rpc", "zero_bin\/common", \ + "zero_bin\/ops"\, "evm_arithmetization", "trace_decoder", "mpt_trie"\]#' Cargo.toml +COPY Cargo.lock . +COPY ./rust-toolchain.toml ./ +RUN cat ./Cargo.toml + +COPY proof_gen proof_gen +COPY mpt_trie mpt_trie +COPY trace_decoder trace_decoder +COPY evm_arithmetization evm_arithmetization +COPY zero_bin/common zero_bin/common +COPY zero_bin/ops zero_bin/ops +COPY zero_bin/rpc zero_bin/rpc +COPY zero_bin/prover zero_bin/prover +COPY zero_bin/leader zero_bin/leader + + +RUN \ + touch zero_bin/common/src/lib.rs && \ + touch zero_bin/ops/src/lib.rs && \ + touch zero_bin/leader/src/main.rs && \ + touch zero_bin/rpc/src/lib.rs && \ + touch zero_bin/prover/src/lib.rs && \ + touch evm_arithmetization/src/lib.rs && \ + touch trace_decoder/src/lib.rs && \ + touch mpt_trie/src/lib.rs + +# Disable the lld linker for now, as it's causing issues with the linkme package. +# https://github.com/rust-lang/rust/pull/124129 +# https://github.com/dtolnay/linkme/pull/88 +ENV RUSTFLAGS='-C target-cpu=native -Zlinker-features=-lld' + +RUN cargo build --release --bin leader + +RUN ls -la ./target/release + +FROM debian:bullseye-slim +RUN apt-get update && apt-get install -y ca-certificates libjemalloc2 +COPY --from=builder ./target/release/leader /usr/local/bin/leader +ENTRYPOINT ["/usr/local/bin/leader"] \ No newline at end of file diff --git a/worker.Dockerfile b/worker.Dockerfile new file mode 100644 index 000000000..c91ff2fb3 --- /dev/null +++ b/worker.Dockerfile @@ -0,0 +1,37 @@ +FROM rustlang/rust:nightly-bullseye-slim as builder + +RUN apt-get update && apt-get install -y libjemalloc2 libjemalloc-dev make libssl-dev pkg-config + +RUN mkdir -p zero_bin +COPY Cargo.toml . +# Cleanup all workspace members and add again selected crates +RUN sed -i '/members =/{:a;N;/]/!ba};//d' Cargo.toml +RUN sed -i 's#\[workspace\]#\[workspace\]\nmembers = \["zero_bin\/worker", "zero_bin\/common", "zero_bin\/ops"\, "evm_arithmetization", "mpt_trie"\]#' Cargo.toml +COPY Cargo.lock . +COPY ./rust-toolchain.toml ./ + +COPY proof_gen proof_gen +COPY mpt_trie mpt_trie +COPY evm_arithmetization evm_arithmetization +COPY zero_bin/common zero_bin/common +COPY zero_bin/ops zero_bin/ops +COPY zero_bin/worker zero_bin/worker + +RUN \ + touch zero_bin/common/src/lib.rs && \ + touch zero_bin/ops/src/lib.rs && \ + touch zero_bin/worker/src/main.rs && \ + touch evm_arithmetization/src/lib.rs && \ + touch mpt_trie/src/lib.rs + +# Disable the lld linker for now, as it's causing issues with the linkme package. +# https://github.com/rust-lang/rust/pull/124129 +# https://github.com/dtolnay/linkme/pull/88 +ENV RUSTFLAGS='-C target-cpu=native -Zlinker-features=-lld' + +RUN cargo build --release --bin worker + +FROM debian:bullseye-slim +RUN apt-get update && apt-get install -y ca-certificates libjemalloc2 +COPY --from=builder ./target/release/worker /usr/local/bin/worker +ENTRYPOINT ["/usr/local/bin/worker"] diff --git a/zero_bin/leader.Dockerfile b/zero_bin/leader.Dockerfile deleted file mode 100644 index 7e0eb6e8c..000000000 --- a/zero_bin/leader.Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM rustlang/rust:nightly-bullseye-slim as builder - -RUN apt-get update && apt-get install -y libjemalloc2 libjemalloc-dev make libssl-dev pkg-config - -RUN \ - mkdir -p ops/src && touch ops/src/lib.rs && \ - mkdir -p common/src && touch common/src/lib.rs && \ - mkdir -p rpc/src && touch rpc/src/lib.rs && \ - mkdir -p prover/src && touch prover/src/lib.rs && \ - mkdir -p leader/src && echo "fn main() {println!(\"YO!\");}" > leader/src/main.rs - -COPY Cargo.toml . -RUN sed -i "2s/.*/members = [\"ops\", \"leader\", \"common\", \"rpc\", \"prover\"]/" Cargo.toml -COPY Cargo.lock . - -COPY ops/Cargo.toml ./ops/Cargo.toml -COPY common/Cargo.toml ./common/Cargo.toml -COPY rpc/Cargo.toml ./rpc/Cargo.toml -COPY prover/Cargo.toml ./prover/Cargo.toml -COPY leader/Cargo.toml ./leader/Cargo.toml - -COPY ./rust-toolchain.toml ./ - -RUN cargo build --release --bin leader - -COPY ops ./ops -COPY common ./common -COPY rpc ./rpc -COPY prover ./prover -COPY leader ./leader -RUN \ - touch ops/src/lib.rs && \ - touch common/src/lib.rs && \ - touch rpc/src/lib.rs && \ - touch prover/src/lib.rs && \ - touch leader/src/main.rs - -RUN cargo build --release --bin leader - -FROM debian:bullseye-slim -RUN apt-get update && apt-get install -y ca-certificates libjemalloc2 -COPY --from=builder ./target/release/leader /usr/local/bin/leader -CMD ["leader"] diff --git a/zero_bin/worker.Dockerfile b/zero_bin/worker.Dockerfile deleted file mode 100644 index 39036aa2c..000000000 --- a/zero_bin/worker.Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM rustlang/rust:nightly-bullseye-slim as builder - -RUN apt-get update && apt-get install -y libjemalloc2 libjemalloc-dev make libssl-dev - -RUN \ - mkdir -p common/src && touch common/src/lib.rs && \ - mkdir -p ops/src && touch ops/src/lib.rs && \ - mkdir -p worker/src && echo "fn main() {println!(\"YO!\");}" > worker/src/main.rs - -COPY Cargo.toml . -RUN sed -i "2s/.*/members = [\"common\", \"ops\", \"worker\"]/" Cargo.toml -COPY Cargo.lock . - -COPY common/Cargo.toml ./common/Cargo.toml -COPY ops/Cargo.toml ./ops/Cargo.toml -COPY worker/Cargo.toml ./worker/Cargo.toml - -COPY ./rust-toolchain.toml ./ - -RUN cargo build --release --bin worker - -COPY common ./common -COPY ops ./ops -COPY worker ./worker -RUN \ - touch common/src/lib.rs && \ - touch ops/src/lib.rs && \ - touch worker/src/main.rs - -RUN cargo build --release --bin worker - -FROM debian:bullseye-slim -RUN apt-get update && apt-get install -y ca-certificates libjemalloc2 -COPY --from=builder ./target/release/worker /usr/local/bin/worker -CMD ["worker"] From 9f5076e75cf920d329ae532c23850d0ded3ea2fc Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Wed, 26 Jun 2024 20:05:55 +0200 Subject: [PATCH 2/9] fix: missing env and cargo lock search path --- leader.Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/leader.Dockerfile b/leader.Dockerfile index 8d66b43fb..b983e05ab 100644 --- a/leader.Dockerfile +++ b/leader.Dockerfile @@ -11,6 +11,7 @@ RUN sed -i 's#\[workspace\]#\[workspace\]\nmembers = \["zero_bin\/leader", "zero COPY Cargo.lock . COPY ./rust-toolchain.toml ./ RUN cat ./Cargo.toml +COPY ./.env ./.env COPY proof_gen proof_gen COPY mpt_trie mpt_trie @@ -39,10 +40,17 @@ RUN \ ENV RUSTFLAGS='-C target-cpu=native -Zlinker-features=-lld' RUN cargo build --release --bin leader +RUN cargo build --release --bin rpc -RUN ls -la ./target/release FROM debian:bullseye-slim RUN apt-get update && apt-get install -y ca-certificates libjemalloc2 COPY --from=builder ./target/release/leader /usr/local/bin/leader +COPY --from=builder ./target/release/rpc /usr/local/bin/rpc +COPY --from=builder ./.env /.env + +# Workaround for the issue with the Cargo.lock search path +# Related to issue https://github.com/0xPolygonZero/zk_evm/issues/311 +RUN mkdir -p zero_bin/leader + ENTRYPOINT ["/usr/local/bin/leader"] \ No newline at end of file From d57ad12d3bf36e1bab5d869158e748a2f343e798 Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Thu, 27 Jun 2024 10:53:30 +0200 Subject: [PATCH 3/9] add: build and push leader and worker docker images to ghcr.io --- .github/workflows/docker-build-push.yml | 86 +++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/docker-build-push.yml diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml new file mode 100644 index 000000000..2c94e6a53 --- /dev/null +++ b/.github/workflows/docker-build-push.yml @@ -0,0 +1,86 @@ +name: Docker_build_push + +on: + push: + branches: [develop] + release: + types: [created] + # TODO to debug build and push, remove before merge + pull_request: + branches: [develop] + +env: + REGISTRY: ghcr.io + IMAGE_NAME_LEADER: ${{ github.repository }}-leader + IMAGE_NAME_WORKER: ${{ github.repository }}-worker + +jobs: + docker: + name: Build and push leader and worker docker image to GitHub Container Registry + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Leader Docker + id: meta_leader + uses: docker/metadata-action@v5 + with: + images: | + name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LEADER }}, enable=true + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Push to GitHub Container Registry - Leader + uses: docker/build-push-action@v3 + with: + context: . + file: ./leader.Dockerfile + push: true + # platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta_leader.outputs.tags }} + labels: ${{ steps.meta_leader.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Extract metadata (tags, labels) for Worker Docker + id: meta_worker + uses: docker/metadata-action@v5 + with: + images: | + name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_WORKER }}, enable=false + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Push to GitHub Container Registry - Worker + uses: docker/build-push-action@v3 + with: + context: . + file: ./worker.Dockerfile + push: true + # platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta_worker.outputs.tags }} + labels: ${{ steps.meta_worker.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file From 261377e78a282d8e590796230387970d64a6acc8 Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Thu, 27 Jun 2024 11:28:54 +0200 Subject: [PATCH 4/9] feat: add docker build test --- .github/workflows/docker_build.yml | 27 +++++++++++++++++++ ...r-build-push.yml => docker_build_push.yml} | 13 +++++---- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/docker_build.yml rename .github/workflows/{docker-build-push.yml => docker_build_push.yml} (93%) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml new file mode 100644 index 000000000..61ac8e4c6 --- /dev/null +++ b/.github/workflows/docker_build.yml @@ -0,0 +1,27 @@ +name: Docker Build & Run + +on: + push: + branches: [develop, main] + pull_request: + branches: + - "**" + workflow_dispatch: + branches: + - "**" + +jobs: + docker: + name: Build and run for sanity check leader and worker docker images + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build leader docker container + run: | + docker build --progress plain -t leader:${{ github.ref_name }} -f leader.Dockerfile . + + - name: Run leader docker container + run: | + docker run -it leader:${{ github.ref_name }} --help \ No newline at end of file diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker_build_push.yml similarity index 93% rename from .github/workflows/docker-build-push.yml rename to .github/workflows/docker_build_push.yml index 2c94e6a53..2489b61b9 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker_build_push.yml @@ -1,14 +1,17 @@ -name: Docker_build_push +name: Docker Build & Push on: push: - branches: [develop] + branches: [develop, main] release: types: [created] # TODO to debug build and push, remove before merge pull_request: branches: [develop] + + + env: REGISTRY: ghcr.io IMAGE_NAME_LEADER: ${{ github.repository }}-leader @@ -16,7 +19,7 @@ env: jobs: docker: - name: Build and push leader and worker docker image to GitHub Container Registry + name: Build and push leader and worker docker images to GitHub Container Registry runs-on: ubuntu-latest permissions: packages: write @@ -42,7 +45,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LEADER }}, enable=true + name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LEADER }} tags: | type=ref,event=branch type=ref,event=pr @@ -66,7 +69,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_WORKER }}, enable=false + name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_WORKER }} tags: | type=ref,event=branch type=ref,event=pr From f79028b7eaafb4f5b50b7f2f62b6cdd99d4384aa Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Thu, 27 Jun 2024 11:43:11 +0200 Subject: [PATCH 5/9] fix: change image names --- .github/workflows/docker_build.yml | 10 +++++++++- .github/workflows/docker_build_push.yml | 3 --- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 61ac8e4c6..af6cb6d9a 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -24,4 +24,12 @@ jobs: - name: Run leader docker container run: | - docker run -it leader:${{ github.ref_name }} --help \ No newline at end of file + docker run leader:${{ github.ref_name }} --help + + - name: Build worker docker container + run: | + docker build --progress plain -t worker:${{ github.ref_name }} -f worker.Dockerfile . + + - name: Run worker docker container + run: | + docker run worker:${{ github.ref_name }} --help \ No newline at end of file diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml index 2489b61b9..6c9c7f20c 100644 --- a/.github/workflows/docker_build_push.yml +++ b/.github/workflows/docker_build_push.yml @@ -9,9 +9,6 @@ on: pull_request: branches: [develop] - - - env: REGISTRY: ghcr.io IMAGE_NAME_LEADER: ${{ github.repository }}-leader From b618fca1d82f6abd54f59b99bddf7737cc936cb9 Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Thu, 27 Jun 2024 12:09:53 +0200 Subject: [PATCH 6/9] fix: remove debug build and push --- .github/workflows/docker_build.yml | 6 +++--- .github/workflows/docker_build_push.yml | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index af6cb6d9a..dc90404fc 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -12,7 +12,7 @@ on: jobs: docker: - name: Build and run for sanity check leader and worker docker images + name: Build and run leader and worker docker images for regression check runs-on: ubuntu-latest steps: - name: Checkout @@ -24,7 +24,7 @@ jobs: - name: Run leader docker container run: | - docker run leader:${{ github.ref_name }} --help + docker run --rm leader:${{ github.ref_name }} --help - name: Build worker docker container run: | @@ -32,4 +32,4 @@ jobs: - name: Run worker docker container run: | - docker run worker:${{ github.ref_name }} --help \ No newline at end of file + docker run --rm worker:${{ github.ref_name }} --help \ No newline at end of file diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml index 6c9c7f20c..716e9ea67 100644 --- a/.github/workflows/docker_build_push.yml +++ b/.github/workflows/docker_build_push.yml @@ -5,9 +5,6 @@ on: branches: [develop, main] release: types: [created] - # TODO to debug build and push, remove before merge - pull_request: - branches: [develop] env: REGISTRY: ghcr.io From 46468e209d8394c4260d348c8c8ee22ce5110842 Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Thu, 27 Jun 2024 12:36:02 +0200 Subject: [PATCH 7/9] fix: add eof line --- .github/workflows/docker_build.yml | 2 +- .github/workflows/docker_build_push.yml | 2 +- leader.Dockerfile | 2 +- worker.Dockerfile | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index dc90404fc..8d74a2fa4 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -32,4 +32,4 @@ jobs: - name: Run worker docker container run: | - docker run --rm worker:${{ github.ref_name }} --help \ No newline at end of file + docker run --rm worker:${{ github.ref_name }} --help diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml index 716e9ea67..112ea158e 100644 --- a/.github/workflows/docker_build_push.yml +++ b/.github/workflows/docker_build_push.yml @@ -80,4 +80,4 @@ jobs: tags: ${{ steps.meta_worker.outputs.tags }} labels: ${{ steps.meta_worker.outputs.labels }} cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-to: type=gha,mode=max diff --git a/leader.Dockerfile b/leader.Dockerfile index b983e05ab..d3e9a92a0 100644 --- a/leader.Dockerfile +++ b/leader.Dockerfile @@ -53,4 +53,4 @@ COPY --from=builder ./.env /.env # Related to issue https://github.com/0xPolygonZero/zk_evm/issues/311 RUN mkdir -p zero_bin/leader -ENTRYPOINT ["/usr/local/bin/leader"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/leader"] diff --git a/worker.Dockerfile b/worker.Dockerfile index c91ff2fb3..bcd3e1c18 100644 --- a/worker.Dockerfile +++ b/worker.Dockerfile @@ -35,3 +35,4 @@ FROM debian:bullseye-slim RUN apt-get update && apt-get install -y ca-certificates libjemalloc2 COPY --from=builder ./target/release/worker /usr/local/bin/worker ENTRYPOINT ["/usr/local/bin/worker"] + From 9cce16c18eb5744daa525d878f1d2effe0c8bb4f Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Mon, 1 Jul 2024 19:28:23 +0200 Subject: [PATCH 8/9] fix: comment --- leader.Dockerfile | 2 +- worker.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/leader.Dockerfile b/leader.Dockerfile index d3e9a92a0..4f150f9c9 100644 --- a/leader.Dockerfile +++ b/leader.Dockerfile @@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y libjemalloc2 libjemalloc-dev make libss RUN mkdir -p zero_bin COPY Cargo.toml . -# Cleanup all workspace members and add again selected crates +# Cleanup all workspace members and add selected crates again RUN sed -i '/members =/{:a;N;/]/!ba};//d' Cargo.toml RUN sed -i 's#\[workspace\]#\[workspace\]\nmembers = \["zero_bin\/leader", "zero_bin\/prover", "zero_bin\/rpc", "zero_bin\/common", \ "zero_bin\/ops"\, "evm_arithmetization", "trace_decoder", "mpt_trie"\]#' Cargo.toml diff --git a/worker.Dockerfile b/worker.Dockerfile index bcd3e1c18..b28a2db79 100644 --- a/worker.Dockerfile +++ b/worker.Dockerfile @@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y libjemalloc2 libjemalloc-dev make libss RUN mkdir -p zero_bin COPY Cargo.toml . -# Cleanup all workspace members and add again selected crates +# Cleanup all workspace members and add selected crates again RUN sed -i '/members =/{:a;N;/]/!ba};//d' Cargo.toml RUN sed -i 's#\[workspace\]#\[workspace\]\nmembers = \["zero_bin\/worker", "zero_bin\/common", "zero_bin\/ops"\, "evm_arithmetization", "mpt_trie"\]#' Cargo.toml COPY Cargo.lock . From bf85c464cdc9f9090401128ba844c0d9473ab7da Mon Sep 17 00:00:00 2001 From: Marko Atanasievski Date: Mon, 1 Jul 2024 20:10:54 +0200 Subject: [PATCH 9/9] fix: build --- leader.Dockerfile | 8 ++++++-- worker.Dockerfile | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/leader.Dockerfile b/leader.Dockerfile index 4f150f9c9..ef69a430f 100644 --- a/leader.Dockerfile +++ b/leader.Dockerfile @@ -7,7 +7,7 @@ COPY Cargo.toml . # Cleanup all workspace members and add selected crates again RUN sed -i '/members =/{:a;N;/]/!ba};//d' Cargo.toml RUN sed -i 's#\[workspace\]#\[workspace\]\nmembers = \["zero_bin\/leader", "zero_bin\/prover", "zero_bin\/rpc", "zero_bin\/common", \ - "zero_bin\/ops"\, "evm_arithmetization", "trace_decoder", "mpt_trie"\]#' Cargo.toml + "zero_bin\/ops"\, "evm_arithmetization", "trace_decoder", "mpt_trie", "proc_macro", "compat"\]#' Cargo.toml COPY Cargo.lock . COPY ./rust-toolchain.toml ./ RUN cat ./Cargo.toml @@ -15,6 +15,8 @@ COPY ./.env ./.env COPY proof_gen proof_gen COPY mpt_trie mpt_trie +COPY proc_macro proc_macro +COPY compat compat COPY trace_decoder trace_decoder COPY evm_arithmetization evm_arithmetization COPY zero_bin/common zero_bin/common @@ -32,7 +34,9 @@ RUN \ touch zero_bin/prover/src/lib.rs && \ touch evm_arithmetization/src/lib.rs && \ touch trace_decoder/src/lib.rs && \ - touch mpt_trie/src/lib.rs + touch mpt_trie/src/lib.rs && \ + touch proc_macro/src/lib.rs && \ + touch compat/src/lib.rs # Disable the lld linker for now, as it's causing issues with the linkme package. # https://github.com/rust-lang/rust/pull/124129 diff --git a/worker.Dockerfile b/worker.Dockerfile index b28a2db79..865fb7bb6 100644 --- a/worker.Dockerfile +++ b/worker.Dockerfile @@ -6,13 +6,14 @@ RUN mkdir -p zero_bin COPY Cargo.toml . # Cleanup all workspace members and add selected crates again RUN sed -i '/members =/{:a;N;/]/!ba};//d' Cargo.toml -RUN sed -i 's#\[workspace\]#\[workspace\]\nmembers = \["zero_bin\/worker", "zero_bin\/common", "zero_bin\/ops"\, "evm_arithmetization", "mpt_trie"\]#' Cargo.toml +RUN sed -i 's#\[workspace\]#\[workspace\]\nmembers = \["zero_bin\/worker", "zero_bin\/common", "zero_bin\/ops"\, "evm_arithmetization", "mpt_trie", "proc_macro"\]#' Cargo.toml COPY Cargo.lock . COPY ./rust-toolchain.toml ./ COPY proof_gen proof_gen COPY mpt_trie mpt_trie COPY evm_arithmetization evm_arithmetization +COPY proc_macro proc_macro COPY zero_bin/common zero_bin/common COPY zero_bin/ops zero_bin/ops COPY zero_bin/worker zero_bin/worker @@ -22,7 +23,8 @@ RUN \ touch zero_bin/ops/src/lib.rs && \ touch zero_bin/worker/src/main.rs && \ touch evm_arithmetization/src/lib.rs && \ - touch mpt_trie/src/lib.rs + touch mpt_trie/src/lib.rs && \ + touch proc_macro/src/lib.rs # Disable the lld linker for now, as it's causing issues with the linkme package. # https://github.com/rust-lang/rust/pull/124129