mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
## Summary - fixes the untrusted CI failure in `e2e-tests / E2E Tests with Kurtosis Ethereum Network` - keeps validator-set-submitter startup actionable by avoiding test-only contract config imports during container startup - improves submitter readiness diagnostics by capturing both stdout and stderr from container logs and making streamed log matching robust to chunked UTF-8 output - reduces validator-set-submitter Docker build time in CI by building from `test/` and adding a tight `test/.dockerignore` - makes local arm64 E2E runs use a native local Snowbridge relayer image instead of forcing `linux/amd64` emulation - auto-builds the local relayer image when needed for `:local` tags ## Why The original failing untrusted test started as a submitter container startup problem, but the branch now also addresses a second timeout path that showed up while debugging: - the submitter image was being built from the repository root with a large Docker context, which made the `validator-set-update` suite spend most of its hook timeout budget inside `docker build` - on Apple Silicon, forcing `datahavenxyz/snowbridge-relay:latest` through `linux/amd64` caused `generate-beacon-checkpoint` to segfault during local runs These changes make the submitter failure actionable, cut the CI Docker build context down substantially, and keep local E2E runs reliable on arm64. ## Validation - `cd test && bun fmt` - `cd test && bun x tsc --noEmit` - `bun test e2e/suites/validator-set-update.test.ts --timeout 900000` - `cd test && docker build -f tools/validator-set-submitter/Dockerfile -t datahavenxyz/validator-set-submitter:local .`
40 lines
1.1 KiB
Docker
40 lines
1.1 KiB
Docker
# Validator Set Submitter image
|
|
#
|
|
# Build from the test directory:
|
|
# cd test
|
|
# docker build -f tools/validator-set-submitter/Dockerfile \
|
|
# -t datahavenxyz/validator-set-submitter:local .
|
|
#
|
|
# Runtime expectations:
|
|
# - Mount a config file at /config/config.yml
|
|
# - Provide SUBMITTER_PRIVATE_KEY (or pass --submitter-private-key)
|
|
# - Set service_manager_address in config.yml (contracts/deployments is not in the image)
|
|
|
|
FROM oven/bun:1.3.3-slim AS deps
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json bun.lock tsconfig.json ./
|
|
COPY .papi ./.papi
|
|
RUN bun install --frozen-lockfile --production
|
|
|
|
FROM oven/bun:1.3.3-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN useradd -m -u 1001 -U -s /bin/sh -d /submitter submitter
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY tsconfig.json bunfig.toml ./
|
|
COPY tools/validator-set-submitter/ ./tools/validator-set-submitter/
|
|
COPY contract-bindings/ ./contract-bindings/
|
|
COPY utils/ ./utils/
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
EXPOSE 8080
|
|
|
|
USER submitter
|
|
|
|
ENTRYPOINT ["bun", "run", "tools/validator-set-submitter/main.ts", "run"]
|
|
CMD ["--config", "/config/config.yml"]
|