diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8f5b4925..d05c6cee 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -69,4 +69,4 @@ jobs: uses: ./.github/workflows/task-e2e.yml secrets: inherit with: - image-tag: ${{ needs.docker-build-ci.outputs.image-tag }} \ No newline at end of file + image-tag: ${{ needs.docker-build-ci.outputs.image-tag }} diff --git a/contracts/src/DataHavenServiceManager.sol b/contracts/src/DataHavenServiceManager.sol index 31445ca5..be5e695c 100644 --- a/contracts/src/DataHavenServiceManager.sol +++ b/contracts/src/DataHavenServiceManager.sol @@ -99,9 +99,7 @@ contract DataHavenServiceManager is ServiceManagerBase, IDataHavenServiceManager ) external payable onlyOwner { // Send the new validator set message to the Snowbridge Gateway bytes memory message = buildNewValidatorSetMessage(); - _snowbridgeGateway.v2_sendMessage{ - value: msg.value - }( + _snowbridgeGateway.v2_sendMessage{value: msg.value}( message, new bytes[](0), // No assets to send bytes(""), // No claimer diff --git a/docker/datahaven-build.Dockerfile b/docker/datahaven-build.Dockerfile index d93614ec..5fc55325 100644 --- a/docker/datahaven-build.Dockerfile +++ b/docker/datahaven-build.Dockerfile @@ -1,5 +1,5 @@ # --- Setup Build Environment --- -FROM docker.io/paritytech/ci-unified:bullseye-1.88.0 AS base +FROM rust:latest AS base ARG MOLD_VERSION=2.40.4 ARG PROTOC_VER=21.12 @@ -10,42 +10,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ xz-utils \ clang \ libpq-dev \ - && echo "Installing mold v${MOLD_VERSION}..." \ - && curl -Lo mold.tar.gz "https://github.com/rui314/mold/releases/download/v${MOLD_VERSION}/mold-${MOLD_VERSION}-x86_64-linux.tar.gz" \ - && tar -xf mold.tar.gz --strip-components=1 -C /usr/local \ - && rm mold.tar.gz \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && echo "Installing protoc v${PROTOC_VER}..." \ && curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip" \ && unzip -q protoc.zip -d /usr/local/ \ - && rm protoc.zip \ - && echo "Installing sccache v${SCCACHE_VERSION}..." \ - && curl -Lo sccache.tar.gz "https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \ - && tar -xf sccache.tar.gz --strip-components=1 -C /usr/local/bin sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache \ - && rm sccache.tar.gz - -RUN cargo install cargo-chef --version 0.1.72 --locked - -ENV RUSTC_WRAPPER=sccache \ - SCCACHE_DIR=/usr/local/sccache \ - SCCACHE_CACHE_SIZE=25G \ - RUSTFLAGS="-Clinker=clang -Clink-arg=-fuse-ld=/usr/local/bin/mold" - -# --- Prepare build plan with cargo-chef --- -FROM base AS planner -WORKDIR /datahaven -COPY . . -RUN cargo chef prepare --recipe-path recipe.json + && rm protoc.zip # --- Build dependencies using cargo-chef --- FROM base AS builder WORKDIR /datahaven -COPY --from=planner /datahaven/recipe.json recipe.json -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/usr/local/cargo/git \ - cargo chef cook --recipe-path recipe.json --release -COPY . . + +COPY . /datahaven RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/git \ if [ "$FAST_RUNTIME" = "TRUE" ]; then \ @@ -55,30 +31,11 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ fi # --- Create final lightweight runtime image --- -FROM docker.io/parity/base-bin:latest - -# Copy CA certificates and shared libraries from builder -COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --from=builder \ - /lib/x86_64-linux-gnu/libpq.so.5 \ - /lib/x86_64-linux-gnu/libssl.so.3 \ - /lib/x86_64-linux-gnu/libcrypto.so.3 \ - /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 \ - /lib/x86_64-linux-gnu/libldap.so.2 \ - /lib/x86_64-linux-gnu/libz.so.1 \ - /lib/x86_64-linux-gnu/libzstd.so.1 \ - /lib/x86_64-linux-gnu/libkrb5.so.3 \ - /lib/x86_64-linux-gnu/libk5crypto.so.3 \ - /lib/x86_64-linux-gnu/libcom_err.so.2 \ - /lib/x86_64-linux-gnu/libkrb5support.so.0 \ - /lib/x86_64-linux-gnu/liblber.so.2 \ - /lib/x86_64-linux-gnu/libsasl2.so.2 \ - /lib/x86_64-linux-gnu/libkeyutils.so.1 \ - /lib/x86_64-linux-gnu/ - +FROM debian:trixie-slim COPY --from=builder /datahaven/target/release/datahaven-node /usr/local/bin USER root +RUN apt-get update && apt-get install -y gcc libc6-dev libpq-dev && rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1001 -U -s /bin/sh -d /datahaven datahaven && \ mkdir -p /data /datahaven/.local/share && \ chown -R datahaven:datahaven /data && \