matter-labs-zksync
FAILURE
114m 11s
History Source
SummaryIterations3Transcript38Dockerfile
01Iteration 1
WRITEWriteFile· step #1
1s
Dockerfile828 bytes written
text35 lines · 828 chars
FROM rust:1.70-slim-bullseye AS builder
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        pkg-config \
        libssl-dev \
        ca-certificates \
        curl \
        git \
        cmake \
        clang \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Copy the entire project and build in release mode
COPY . .
RUN cargo build --release --workspace

# Final runtime image
FROM debian:bullseye-slim
ENV TZ=UTC

RUN apt-get update \
    && apt-get install -y --no-install-recommends ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Bring the binaries produced in the builder into /usr/local/bin for easy access
COPY --from=builder /workspace/target/release/ /usr/local/bin/

WORKDIR /opt/zksync
CMD ["/bin/bash"]
WRITEWriteFile· step #2
0s
/.dockerignore91 chars
dockerignore7 lines · 91 chars
# Ignore VCS and node_modules and build artifacts
.git
node_modules
target
.DS_Store
*.log
WRITEWriteFile· step #3
0s
.dockerignore91 bytes written
dockerignore7 lines · 91 chars
# Ignore VCS and node_modules and build artifacts
.git
node_modules
target
.DS_Store
*.log
VERIFYVerifyBuild· step #4
10m 30s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #5
0s
Dockerfile1229 bytes written
text46 lines · 1229 chars
FROM rust:1.70-slim-bullseye AS builder
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        pkg-config \
        libssl-dev \
        ca-certificates \
        curl \
        git \
        cmake \
        clang \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# 1) Pre-fetch dependencies using only the manifest to take advantage of cached layers
COPY Cargo.toml Cargo.lock ./
RUN mkdir -p /workspace/.cargo/registry /workspace/.cargo/git
RUN cargo fetch

# 2) Copy the actual source needed for the workspace. Copying selectively helps cache
COPY core ./core
COPY contracts ./contracts
COPY sdk ./sdk
COPY bin ./bin
COPY README.md CHANGELOG.md LICENSE-APACHE LICENSE-MIT .

# 3) Build the entire workspace in release mode
RUN cargo build --release --workspace

# Final runtime image
FROM debian:bullseye-slim
ENV TZ=UTC

RUN apt-get update \
    && apt-get install -y --no-install-recommends ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Bring the binaries produced in the builder into /usr/local/bin for easy access
COPY --from=builder /workspace/target/release/ /usr/local/bin/

WORKDIR /opt/zksync
CMD ["/bin/bash"]
VERIFYVerifyBuild· step #6
1m 10s
VerifyBuildbuild_failed
Build error
Summary (under 1500 chars):

- Exact error message and exit code:
  ERROR: failed to build: failed to solve: process "/bin/sh -c cargo fetch" did not complete successfully: exit code: 101

- Failing command/step:
  [builder  6/12] RUN cargo fetch

- Missing packages or files mentioned:
  - Missing file: /workspace/core/bin/data_restore/Cargo.toml (No such file or or directory)

- Additional context:
  - Cargo reports failure while loading manifest for workspace member /workspace/core/bin/data_restore during cargo fetch

- Version information mentioned:
  - Base images used: rust:1.70-slim-bullseye and debian:bullseye-slim
  - No explicit version mismatch information detected in the log
WRITEWriteFile· step #7
0s
Dockerfile1035 bytes written
text41 lines · 1035 chars
FROM rust:1.70-slim-bullseye AS builder
WORKDIR /workspace
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        pkg-config \
        libssl-dev \
        ca-certificates \
        curl \
        git \
        cmake \
        clang \
    && rm -rf /var/lib/apt/lists/*

# Copy the entire repo for a full build
COPY . .

# Build the entire workspace in release mode
RUN cargo build --release --workspace

# Final runtime image
FROM debian:bullseye-slim
ENV TZ=UTC

RUN apt-get update \
    && apt-get install -y --no-install-recommends ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Include OpenSSL runtime libraries (libssl3) for binaries
RUN apt-get update \
    && apt-get install -y --no-install-recommends libssl3 \
    && rm -rf /var/lib/apt/lists/*

# Bring the binaries produced in the builder into /usr/local/bin for easy access
COPY --from=builder /workspace/target/release/ /usr/local/bin/

WORKDIR /opt/zksync
CMD ["/bin/sh"]
VERIFYVerifyBuild· step #8
58s
VerifyBuildbuild_failed
Build error
Summary of Docker build error

- Failing step (command/step):
  - Stage-1, step 3/5:
    RUN apt-get update     && apt-get install -y --no-install-recommends libssl3     && rm -rf /var/lib/apt/lists/*

- Exact error message and exit code:
  - E: Unable to locate package libssl3
  - The build failure: "ERROR: failed to build: failed to solve: process \"/bin/sh -c apt-get update     && apt-get install -y --no-install-recommends libssl3     && rm -rf /var/lib/apt/lists/*\" did not complete successfully: exit code: 100"

- Missing packages or files mentioned:
  - libssl3 (package not found)

- Version mismatch / context info:
  - Base image: Debian bullseye-slim
  - libssl3 is not available in Debian Bullseye's repositories, causing the package to be unavailable (Bullseye typically provides libssl1.1). This indicates a mismatch between the intended OpenSSL 3 library (libssl3) and the Debian version in use.

- Additional notes:
  - A later step (Stage-1 11/5) attempted a broader install but was canceled due to the previous error. No other failing details are shown beyond the libssl3 package not found.

Potential fixes (brief):
- Install libssl1.1 instead of libssl3, or upgrade the base image to a Debian version that provides libssl3 (e.g., bookworm) if OpenSSL 3 is required.
WRITEWriteFile· step #9
0s
Dockerfile1096 bytes written
text44 lines · 1096 chars
FROM rust:1.72-slim-bullseye AS builder
WORKDIR /workspace
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        pkg-config \
        libssl-dev \
        ca-certificates \
        curl \
        git \
        cmake \
        clang \
        llvm \
    && rm -rf /var/lib/apt/lists/*

# Copy the entire repo for a full build
COPY . .

# Build the entire workspace in release mode
RUN --mount=type=cache,target=/usr/local/cargo/git \
    --mount=type=cache,target=/usr/local/cargo/registry \
    cargo build --release --workspace

# Final runtime image
FROM debian:bullseye-slim
ENV TZ=UTC

RUN apt-get update \
    && apt-get install -y --no-install-recommends ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# OpenSSL runtime libraries (use libssl1.1 for bullseye)
RUN apt-get update \
    && apt-get install -y --no-install-recommends libssl1.1 \
    && rm -rf /var/lib/apt/lists/*

# Copy binaries
COPY --from=builder /workspace/target/release/ /usr/local/bin/

WORKDIR /opt/zksync
CMD ["/bin/sh"]
VERIFYVerifyBuild· step #10
10m 31s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
02Iteration 2
WRITEWriteFile· step #1
0s
Dockerfile1259 bytes written
text46 lines · 1259 chars
# Build from source and produce a runnable image for zkSync server binaries

FROM rust:1.72-slim-bullseye AS builder
WORKDIR /app

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential pkg-config libssl-dev ca-certificates cmake curl \
    && rm -rf /var/lib/apt/lists/*

# Copy the full repository and build
COPY . .

# Build all workspace binaries in release mode
RUN cargo build --release

# Runtime stage
FROM debian:bullseye-slim AS runtime

# Install runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libssl3 ca-certificates \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Bring in the built binaries
COPY --from=builder /app/target/release/* /usr/local/bin/

# Wrapper script to start the server binary (tries common names)
RUN printf '%s\n' '#!/bin/sh' \
    'set -e' \
    'BIN_DIR="/usr/local/bin"' \
    'for name in server zksync_server; do' \
    '  if [ -x "$BIN_DIR/$name" ]; then' \
    '    exec "$BIN_DIR/$name" "$@"' \
    '  fi' \
    'done' \
    'echo "No server binary found"' \
    'exit 1' > /usr/local/bin/run-server \
    && chmod +x /usr/local/bin/run-server

ENTRYPOINT ["/usr/local/bin/run-server"]
WRITEWriteFile· step #2
0s
./.dockerignore182 bytes written
dockerignore14 lines · 182 chars
# Exclude build outputs and large dependencies from the docker context
**/target
**/node_modules
.git
.github
Dockerfile
.dockerignore
*.log
.DS_Store
*.tmp
*.swp
__pycache__*
*.pyc
VERIFYVerifyBuild· step #3
1m 18s
VerifyBuildbuild_failed
Build error
- Exact error and exit code:
  - ERROR: failed to build: failed to solve: process "/bin/sh -c apt-get update     && apt-get install -y --no-install-recommends         libssl3 ca-certificates     && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100
  - E: Unable to locate package libssl3

- Failing command/step:
  - [runtime 2/5] RUN apt-get update     && apt-get install -y --no-install-recommends         libssl3 ca-certificates     && rm -rf /var/lib/apt/lists/*

- Missing packages or files mentioned:
  - libssl3 (not found in the Debian bullseye-slim apt repo)

- Version mismatch / context:
  - Base image context shows Debian bullseye-slim (Debian 11). libssl3 is not available in this repo for bullseye, while the log shows an upgrade of libssl1.1 (The following upgraded: ca-certificates libssl1.1 libtinfo6 perl-base), indicating the expected SSL package on this image is libssl1.1, not libssl3.
WRITEWriteFile· step #4
0s
Dockerfile1367 bytes written
text47 lines · 1367 chars
# Build from source and produce a runnable image for zkSync server binaries

FROM rust:1.72-slim-bullseye AS builder
WORKDIR /app

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential pkg-config libssl-dev ca-certificates cmake curl \
    && rm -rf /var/lib/apt/lists/*

# Copy the full repository and build
COPY . .

# Build all workspace binaries in release mode
RUN cargo build --release

# Runtime stage
FROM debian:bullseye-slim AS runtime

# Install runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libssl1.1 ca-certificates \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Bring in the built binaries
COPY --from=builder /app/target/release/ /usr/local/bin/

# Wrapper script to start one of the compiled binaries
RUN mkdir -p /usr/local/bin
RUN printf '%s\n' '#!/bin/sh' \
    'set -e' \
    'BIN_DIR="/usr/local/bin"' \
    'for name in server data_restore prover parse_pub_data block_revert remove_proofs tx_count_migration exit_tree_generator; do' \
    '  if [ -x "$BIN_DIR/$name" ]; then' \
    '    exec "$BIN_DIR/$name" "$@"' \
    '  fi' \
    'done' \
    'echo "No runnable binary found"' \
    'exit 1' > /usr/local/bin/run-server \
    && chmod +x /usr/local/bin/run-server

ENTRYPOINT ["/usr/local/bin/run-server"]
VERIFYVerifyBuild· step #5
2m 04s
VerifyBuildbuild_failed
Summary:
- VerifyBuild status: build_failed

- Key concerns
  - Entrypoint binaries assumed in loop: server, data_restore, prover, parse_pub_data, block_revert, remove_proofs, tx_count_migration, exit_tree_generator. If workspace uses different names, container may start and exit with 'No runnable binary found'.
  - Runtime dependencies fragile: relies on libssl1.1 and Debian Bullseye libs; missing shared libs could cause runtime failures.
  - Copying entire release dir to /usr/local/bin may include non-binary files; may be cleaner to copy only built binaries.

- Build error
  - Failing step: [builder 5/5] RUN cargo build --release (Dockerfile)
  - Exact error and exit code:
    - ERROR: failed to build: failed to solve: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101
    - Underlying cargo git dependency error:
      - 13.16 Caused by: revision 9e3c2a12053c014df9b6c1f227db4470e02b4c5b not found
      - 13.16 Caused by: could not execute process `git fetch --no-tags --force --update-head-ok 'https://github.com/matter-labs/franklin-crypto.git' '+9e3c2a12053c014df9b6c1f227db4470e02b4c5b'` (never executed)
      - 13.16 Caused by: No such file or directory (os error 2)
  - Failing command/step location: Dockerfile: RUN cargo build --release (builder 5/5)

- Missing packages/files
  - Franklin Crypto cannot be loaded due to Git revision not found for matter-labs/franklin-crypto (branch beta); prevents fetching commit 9e3c2a12053c014df9b6c1f227db4470e02b4c5b.

- Version/resolver notes
  - 13.10: virtual workspace defaulting to resolver = "1" despite edition 2024 implying resolver = "3"; set workspace.resolver accordingly.
  - Rust toolchain during cargo fetch: rust version 1.91.1 (ed61e7d7e 2025-11-07) with components cargo, rust-std, rustc installed.

- Failing area
  - The build failure stems from a git dependency revision not found for matter-labs/franklin-crypto (commit 9e3c2a12053c014df9b6c1f227db4470e02b4c5b on branch beta).
WRITEWriteFile· step #6
3s
Dockerfile1393 bytes written
text47 lines · 1393 chars
# Build from source and produce a runnable image for zkSync server binaries

FROM rust:1.72-slim-bullseye AS builder
WORKDIR /app

# Install build and git dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential pkg-config libssl-dev ca-certificates cmake curl git \
    && rm -rf /var/lib/apt/lists/*

# Copy the full repository and build
COPY . .

# Build all workspace binaries in release mode
RUN cargo build --release

# Runtime stage
FROM debian:bullseye-slim AS runtime

# Install runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libssl1.1 ca-certificates \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Bring in the built binaries
COPY --from=builder /app/target/release/ /usr/local/bin/

# Wrapper script to start one of the compiled binaries
RUN mkdir -p /usr/local/bin
RUN printf '%s\n' '#!/bin/sh' \
    'set -e' \
    'BIN_DIR="/usr/local/bin"' \
    'for name in zksync_server server data_restore prover parse_pub_data block_revert remove_proofs tx_count_migration exit_tree_generator; do' \
    '  if [ -x "$BIN_DIR/$name" ]; then' \
    '    exec "$BIN_DIR/$name" "$@"' \
    '  fi' \
    'done' \
    'echo "No runnable binary found"' \
    'exit 1' > /usr/local/bin/run-server \
    && chmod +x /usr/local/bin/run-server

ENTRYPOINT ["/usr/local/bin/run-server"]
VERIFYVerifyBuild· step #7
10m 26s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
03Iteration 3
WRITEWriteFile· step #1
0s
Dockerfile998 bytes written
text32 lines · 998 chars
# Multi-stage Dockerfile for zkSync core

FROM rust:1.72-slim AS builder
WORKDIR /build

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy entire repository and build in release mode
COPY . .
RUN cargo build --release --workspace

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the release binaries from the builder
COPY --from=builder /build/target/release /usr/local/bin

# Lightweight entrypoint wrapper to select which binary to run
RUN bash -lc 'cat > /usr/local/bin/entrypoint.sh << "EOS"\n#!/bin/sh\nset -e\nBIN=\${ZKSYNC_BIN:-server}\nexec \"/usr/local/bin/\$BIN\" \"$@\"\nEOS'
RUN chmod +x /usr/local/bin/entrypoint.sh

WORKDIR /data
EXPOSE 3030 3001
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
WRITEWriteFile· step #2
0s
.dockerignore127 bytes written
dockerignore11 lines · 127 chars
# Exclude VCS and large build outputs
.git
.github
node_modules
target
sdk/node_modules
contracts/node_modules
bin
*.log
*.tmp
VERIFYVerifyBuild· step #3
10m 35s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #4
1s
Dockerfile1205 bytes written
text33 lines · 1205 chars
# Multi-stage Dockerfile for zkSync core

FROM rust:1.72-slim AS builder
WORKDIR /build

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the essential binaries in release mode
COPY . .
# Build a subset of binaries to speed up the CI build
RUN cargo build --release -p data_restore -p key_generator -p server -p prover -p parse_pub_data -p block_revert -p remove_proofs -p tx_count_migration -p exit_tree_generator

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the release binaries from the builder
COPY --from=builder /build/target/release /usr/local/bin

# Lightweight entrypoint wrapper to select which binary to run
RUN bash -lc 'cat > /usr/local/bin/entrypoint.sh << "EOS"\n#!/bin/sh\nset -e\nBIN=\${ZKSYNC_BIN:-server}\nexec \"/usr/local/bin/\$BIN\" \"$@\"\nEOS'
RUN chmod +x /usr/local/bin/entrypoint.sh

WORKDIR /data
EXPOSE 3030 3001
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
VERIFYVerifyBuild· step #5
58s
VerifyBuildrejected
Concerns: Entrypoint script is generated with escaped dollar signs, which prevents runtime expansion of BIN and the $BIN path. The script may try to execute a binary literally named '$BIN' and fail., The here-doc content uses escaping that will produce an invalid entrypoint at runtime. It should contain BIN=${ZKSYNC_BIN:-server} and exec "/usr/local/bin/$BIN" "$@" (without escaping for the runtime shell).
WRITEWriteFile· step #6
1s
Dockerfile1199 bytes written
text33 lines · 1199 chars
# Multi-stage Dockerfile for zkSync core

FROM rust:1.72-slim AS builder
WORKDIR /build

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the essential binaries in release mode
COPY . .
# Build a subset of binaries to speed up the CI build
RUN cargo build --release -p data_restore -p key_generator -p server -p prover -p parse_pub_data -p block_revert -p remove_proofs -p tx_count_migration -p exit_tree_generator

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the release binaries from the builder
COPY --from=builder /build/target/release /usr/local/bin

# Lightweight entrypoint wrapper to select which binary to run
RUN bash -lc 'cat > /usr/local/bin/entrypoint.sh << "EOS"\n#!/bin/sh\nset -e\nBIN=${ZKSYNC_BIN:-server}\nexec "/usr/local/bin/$BIN" "$@"\nEOS'
RUN chmod +x /usr/local/bin/entrypoint.sh

WORKDIR /data
EXPOSE 3030 3001
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
VERIFYVerifyBuild· step #7
1m 09s
VerifyBuildbuild_failed
Build error
Failing step
- [builder 5/5] RUN cargo build --release -p data_restore -p key_generator -p server -p prover -p parse_pub_data -p block_revert -p remove_proofs -p tx_count_migration -p exit_tree_generator

Exact error and exit code
- error: package ID specification `data_restore` did not match any packages
- Exit code: 101

Missing packages/files mentioned
- The error indicates the workspace does not contain a package named data_restore (i.e., the -p data_restore target cannot be resolved). Other -p entries may also be invalid if data_restore is not present in the workspace Cargo.toml.

Version/resolver information
- Rust toolchain: rust 1.91.1 (ed61e7d7e 2025-11-07)
- Cargo workspace resolver note: virtual workspace defaulting to resolver = "1" despite members being on edition 2024; to keep resolver 1, set workspace.resolver = "1" in the workspace root manifest; to use the edition 2024 resolver, set workspace.resolver = "3" (see guidance in log).
WRITEWriteFile· step #8
0s
Dockerfile1011 bytes written
text32 lines · 1011 chars
# Multi-stage Dockerfile for zkSync core

FROM rust:1.72-slim AS builder
WORKDIR /build

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the entire workspace in release mode
COPY . .
RUN cargo build --release --workspace

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the release binaries from the builder
COPY --from=builder /build/target/release /usr/local/bin

# Lightweight entrypoint wrapper to select which binary to run
RUN bash -lc 'cat > /usr/local/bin/entrypoint.sh << "EOS"\n#!/bin/sh\nset -e\nBIN=${ZKSYNC_BIN:-server}\nexec \"/usr/local/bin/\$BIN\" \"$@\"\nEOS'
RUN chmod +x /usr/local/bin/entrypoint.sh

WORKDIR /data
EXPOSE 3030 3001
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
VERIFYVerifyBuild· step #9
10m 27s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #10
1s
Dockerfile833 bytes written
text29 lines · 833 chars
# Multi-stage Dockerfile for zkSync core (server binary only)

FROM rust:1.72-slim AS builder
WORKDIR /workspace

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the server binary from the specific manifest
COPY . .
RUN cargo build --release --manifest-path core/bin/server/Cargo.toml

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the release binaries from the builder
COPY --from=builder /workspace/target/release /usr/local/bin

WORKDIR /data
EXPOSE 3030 3001
ENTRYPOINT ["/usr/local/bin/server"]
CMD ["--help"]
VERIFYVerifyBuild· step #11
10m 01s
VerifyBuildbuild_failed
- VerifyBuild status: build_failed

- Failing command/step:
  - builder step 5/5: RUN cargo build --release --manifest-path core/bin/server/Cargo.toml

- Exact error:
  - error[E0432]: unresolved import `self::types::StateKeeperTestkitRequest`
    --> core/bin/zksync_core/src/state_keeper/mod.rs:41:5
  - note: found an item that was configured out
    --> core/bin/zksync_core/src/state_keeper/types.rs:13:10
  - #[cfg(feature = "testkit")]
    pub enum StateKeeperTestkitRequest

- Failing/related code context:
  - Import referencing StateKeeperTestkitRequest from state_keeper::types in core/bin/zksync_core/src/state_keeper/mod.rs
  - StateKeeperTestkitRequest is behind #[cfg(feature = "testkit")] in core/bin/zksync_core/src/state_keeper/types.rs (not compiled unless testkit feature is enabled)

- Missing packages or files mentioned:
  - This is a feature-flag issue (testkit) causing a symbol to be missing, not a missing system package or file.

- Version / configuration notes:
  - Rust/Cargo workspace resolver: "virtual workspace defaulting to resolver = 1"; may need workspace.resolver = "1" (old) or "3" (edition 2024)
  - Toolchain note: Rust version around 1.91.1 referenced; long dependency download/compile sequence prior to the error

- Concerns (from output):
  - The final image runs as root (no USER defined); add a non-root user for security
  - CMD default is --help; server would exit without arguments
  - COPY --from=builder /workspace/target/release /usr/local/bin copies the entire release directory; safer to copy only the actual server binary

- Suggested next steps:
  - If testkit is required, enable the feature (e.g., cargo build --release --manifest-path core/bin/server/Cargo.toml --features testkit)
  - Otherwise, gate or remove the import to StateKeeperTestkitRequest when testkit is disabled
  - Consider setting workspace.resolver to "1" or "3" as appropriate
  - Address image hardening: define a non-root USER, ensure CMD is appropriate, and copy only the server binary

- Repro context details:
  - Error source file: core/bin/zksync_core/src/state_keeper/mod.rs:41
  - Gate/definition: core/bin/zksync_core/src/state_keeper/types.rs: pub enum StateKeeperTestkitRequest (behind testkit feature)
WRITEWriteFile· step #12
1s
Dockerfile1121 bytes written
text32 lines · 1121 chars
# Multi-stage Dockerfile for zkSync core (server binary and compatibility with testkit-enabled crates)

FROM rust:1.72-slim AS builder
WORKDIR /workspace

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the entire workspace in release mode with testkit feature
COPY . .
RUN cargo build --release --workspace --features testkit

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the release binaries from the builder
COPY --from=builder /workspace/target/release /usr/local/bin

# Lightweight entrypoint wrapper to select which binary to run
RUN bash -lc 'cat > /usr/local/bin/entrypoint.sh << "EOS"\n#!/bin/sh\nset -e\nBIN=${ZKSYNC_BIN:-server}\nexec \"/usr/local/bin/\$BIN\" \"$@\"\nEOS'
RUN chmod +x /usr/local/bin/entrypoint.sh

WORKDIR /data
EXPOSE 3030 3001
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
VERIFYVerifyBuild· step #13
10m 18s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #14
0s
Dockerfile926 bytes written
text31 lines · 926 chars
# Build only the zkSync core server binary from source
FROM rust:1.72-slim AS builder
WORKDIR /workspace

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the server binary from its manifest
COPY . .
RUN cargo build --release --manifest-path core/bin/server/Cargo.toml

# Runtime image
FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the server binary from the builder
COPY --from=builder /workspace/target/release/server /usr/local/bin/server

# Expose typical zkSync server ports
EXPOSE 3030 3001

# Run the server by default; allow extra args to be passed to the binary
ENTRYPOINT ["/usr/local/bin/server"]

VERIFYVerifyBuild· step #15
7m 53s
VerifyBuildunknown
- Build command: Dockerfile RUN cargo build --release --manifest-path core/bin/server/Cargo.toml
- Build status: build_failed; exit code 101
- Error: E0432 unresolved import self::types::StateKeeperTestkitRequest
  - Location: core/bin/zksync_core/src/state_keeper/mod.rs:41:5
  - Details: imports StateKeeperTestkitRequest from state_keeper::types, but no such item when the code is compiled
- Root cause: StateKeeperTestkitRequest is #[cfg(feature = "testkit")] gated in core/bin/zksync_core/src/state_keeper/types.rs:13; item is compiled only if the testkit feature is enabled
- Context: Failure occurs during building the Rust project for the server cargo manifest
  - Dockerfile line: RUN cargo build --release --manifest-path core/bin/server/Cargo.toml
- Related notes: The item is present but configured out due to the testkit feature gating
- Missing/required action: Enable the testkit feature (e.g., enable feature "testkit" in the workspace or crate) or adjust code to compile without that item
- Version/compatibility notes:
  - rustc version: 1.91.1 (ed61e7d7e 2025-11-07)
- Resolver warning observed:
  - virtual workspace defaulting to resolver "1" despite members on edition 2024; to keep resolver 1, set workspace.resolver = "1" in the workspace root manifest; to use edition 2024 resolver, set workspace.resolver = "3" in the workspace root manifest
WRITEWriteFile· step #16
0s
Dockerfile932 bytes written
text28 lines · 932 chars
# Build only the zkSync core server binary from source
FROM rust:1.72-slim AS builder
WORKDIR /workspace

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the server binary from its manifest with testkit feature enabled
COPY . .
RUN cargo build --release --manifest-path core/bin/server/Cargo.toml --features testkit

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the server binary from the builder
COPY --from=builder /workspace/target/release/server /usr/local/bin/server

EXPOSE 3030 3001

# Run the zkSync server by default; allow extra arguments to be passed to the server
ENTRYPOINT ["/usr/local/bin/server"]
VERIFYVerifyBuild· step #17
1m 13s
VerifyBuildbuild_failed
Build error
- Failing command/step:
  - RUN cargo build --release --manifest-path core/bin/server/Cargo.toml --features testkit

- Exact error message and exit code:
  - error: package `zksync_server v1.0.0 (/workspace/core/bin/server)` does not have the feature `testkit`
  - The Docker build then reports: ERROR: process "/bin/sh -c cargo build --release --manifest-path core/bin/server/Cargo.toml --features testkit" did not complete successfully: exit code: 101

- Missing packages/files mentioned:
  - The feature flag is not defined for the package: zksync_server v1.0.0 (/workspace/core/bin/server) does not have the feature testkit. This indicates a feature mismatch rather than a missing file; cargo cannot enable a non-existent feature in that crate.

- Version/resolver information (relevant for mismatch context):
  - Rust toolchain being resolved/installed shows version updates (e.g., rust 1.91.1) and components (cargo, rust-std, rustc) being set up.
  - A cargo workspace resolver warning: “virtual workspace defaulting to resolver = 1 despite one or more workspace members being on edition 2024 which implies resolver = 3” with notes on how to fix (workspace.resolver = "1" to keep current, or set to "3" to use the 2024 resolver).

Root cause summary:
- The cargo build attempted to enable a feature named testkit, but the zksync_server crate does not define that feature, causing exit code 101. The feature flag should be removed or the crate must define the testkit feature.
WRITEWriteFile· step #18
0s
Dockerfile884 bytes written
text28 lines · 884 chars
# Build only the zkSync core server binary from source
FROM rust:1.72-slim AS builder
WORKDIR /workspace

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the server binary from its manifest
COPY . .
RUN cargo build --release --manifest-path core/bin/server/Cargo.toml

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Copy the server binary from the builder
COPY --from=builder /workspace/target/release/server /usr/local/bin/server

EXPOSE 3030 3001

# Run the zkSync server by default; allow extra arguments to be passed to the server
ENTRYPOINT ["/usr/local/bin/server"]
VERIFYVerifyBuild· step #19
8m 18s
VerifyBuildunknown
- Build status: build_failed
- Failing step: RUN cargo build --release --manifest-path core/bin/server/Cargo.toml
- Exact error:
  - error: could not compile `zksync_core` (lib) due to 1 previous error; 5 warnings emitted
  - error[E0432]: unresolved import `self::types::StateKeeperTestkitRequest`
    - Location: core/bin/zksync_core/src/state_keeper/mod.rs:41:5
    - Code: `types::StateKeeperTestkitRequest`
  - note: found an item that was configured out
    - Location: core/bin/zksync_core/src/state_keeper/types.rs:13:10
    - `#[cfg(feature = "testkit")]` gates the item
  - The build then reports again: could not compile `zksync_core` (lib) due to 1 previous error; 5 warnings emitted
- Docker/Cargo exit: exit code 101
- Missing/packages: StateKeeperTestkitRequest is gated behind the testkit feature; importing it unconditionally fails when the feature is not enabled
- Rust toolchain notes:
  - syncing channel updates for '1.91-x86_64-unknown-linux-gnu'
  - latest update: 2025-11-10
  - rust version: 1.91.1 (ed61e7d7e 2025-11-07)
- Cargo resolver note:
  - virtual workspace defaulting to resolver = "1" despite members on edition 2024 (resolver = "3" possible)
  - to keep current resolver: set workspace.resolver = "1" in workspace root manifest
  - to use edition 2024 resolver: set workspace.resolver = "3" in workspace root manifest
- Concerns from log:
  - Consider adding a .dockerignore to avoid copying unnecessary files into the build context
  - Validate all runtime dependencies of the server binary are satisfied; consider pinning library versions
  - Container runs as root by default; consider adding a non-root user
- Summary: Cargo build failed due to unresolved import gated by the testkit feature; StateKeeperTestkitRequest is missing when testkit is not enabled. Also a cargo resolver mismatch is noted. Exit code 101.
WRITEWriteFile· step #20
0s
Dockerfile1005 bytes written
text34 lines · 1005 chars
# Build only the zkSync core server binary from source
FROM rust:1.72-slim AS builder
WORKDIR /workspace

# Install build dependencies
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     build-essential pkg-config libssl-dev ca-certificates git curl \
  && rm -rf /var/lib/apt/lists/*

# Copy repository and build the server binary from its manifest
COPY . .
RUN cargo build --release --manifest-path core/bin/server/Cargo.toml

FROM debian:bookworm-slim AS runtime
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
     libssl3 ca-certificates \
  && rm -rf /var/lib/apt/lists/*

# Create non-root user for better security
RUN useradd -m zksync

# Copy the server binary from the builder
COPY --from=builder /workspace/target/release/server /usr/local/bin/server
RUN chown zksync:zksync /usr/local/bin/server

USER zksync

EXPOSE 3030 3001

# Run the zkSync server by default; arguments can be passed to the server binary
ENTRYPOINT ["/usr/local/bin/server"]
VERIFYVerifyBuild· step #21
6m 48s
VerifyBuildbuild_failed
Build status
- VerifyBuild status: build_failed

Concerns (from build notes)
- COPY . . in the build stage copies the entire repository; consider adding a .dockerignore to avoid shipping large or sensitive files.
- If the server binary is not statically linked, the runtime image must include all necessary dynamic libraries (e.g., checks for libssl dependencies). libssl3 is installed, but verify that all required libraries are present at runtime.
- No default configuration or environment variables are applied; consider documenting required config or embedding sensible defaults.

Build error
- Failing command/step:
  - RUN cargo build --release --manifest-path core/bin/server/Cargo.toml
- Exit code: 101

Exact error message
- error[E0432]: unresolved import `self::types::StateKeeperTestkitRequest`
- --> core/bin/zksync_core/src/state_keeper/mod.rs:41:5
- 41 |     types::StateKeeperTestkitRequest,
-     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `StateKeeperTestkitRequest` in `state_keeper::types`
- note: found an item that was configured out
- --> core/bin/zksync_core/src/state_keeper/types.rs:13:10
- |
- 12 | #[cfg(feature = "testkit")]
- 13 | pub enum StateKeeperTestkitRequest {
-  |          ^^^^^^^^^^^^^^^^^^^^^^^^^

Why this failed (root cause)
- StateKeeperTestkitRequest is gated behind the feature "testkit" (cfg(feature = "testkit")) in core/bin/zksync_core/src/state_keeper/types.rs.
- The importing code in core/bin/zksync_core/src/state_keeper/mod.rs expects StateKeeperTestkitRequest to exist regardless of features, causing an unresolved import when the testkit feature is not enabled.
- This is effectively a feature flag mismatch between code path expecting the type and the build configuration.

Version/mismatch notes
- Note observed: an item is configured out due to cfg(feature = "testkit") gating.
- Additional context shows Rust toolchain updates and workspace resolver notes; actionable mismatch is the testkit feature gating.

Missing packages/files mentioned
- Not a missing OS/apt package or file; the issue is a conditional compilation gap: StateKeeperTestkitRequest is not compiled unless feature testkit is enabled.

Relevant/exact lines (for quick reference)
- error[E0432]: unresolved import `self::types::StateKeeperTestkitRequest`
- --> core/bin/zksync_core/src/state_keeper/mod.rs:41:5
- 41 |     types::StateKeeperTestkitRequest,
-  |     ^^^^^^^^^^^^^^^^^^^^^^^^^
- note: found an item that was configured out
- --> core/bin/zksync_core/src/state_keeper/types.rs:13:10
- |
- 12 | #[cfg(feature = "testkit")]
- 13 | pub enum StateKeeperTestkitRequest {
-  |          ^^^^^^^^^^^^^^^^^^^^^^^^^

Suggested fixes (not required, but helpful)
- Enable the testkit feature when building (e.g., ensure Cargo.toml enables the testkit feature for the relevant crates), or guard the import in mod.rs with #[cfg(feature = "testkit")] to match the gated type.
- Alternatively, remove the unconditional import if the testkit feature remains disabled in this build.