diff --git a/e2e/Makefile b/e2e/Makefile index 82b711f..916117f 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -1,8 +1,7 @@ .PHONY:chain chain: - # For Apple Silicon explicit declaration 'linux/amd64' is required - DOCKER_DEFAULT_PLATFORM=linux/amd64 make -C chains build - DOCKER_DEFAULT_PLATFORM=linux/amd64 make -C chains network + make -C chains build + make -C chains network # Wait for one epoch to use BEP-126 validator sleep 60 diff --git a/e2e/chains/bsc/Dockerfile.bootstrap b/e2e/chains/bsc/Dockerfile.bootstrap index 1c0e31d..88d10bd 100644 --- a/e2e/chains/bsc/Dockerfile.bootstrap +++ b/e2e/chains/bsc/Dockerfile.bootstrap @@ -1,13 +1,29 @@ -FROM ghcr.io/foundry-rs/foundry:v0.3.0 +FROM ghcr.io/foundry-rs/foundry:v1.2.3 -RUN apk add --d --no-cache npm nodejs bash alpine-sdk expect jq curl bash python3-dev py3-pip +USER root + +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ + curl \ + expect \ + jq \ + python3 \ + && rm -rf /var/cache/apt/* + +# Manually install poetry because the apt version (1.1.12) is too old +# and causes "The Poetry configuration is invalid" errors RUN curl -sSL https://install.python-poetry.org | python3 - +# Manually install Node.js because the apt version (v12.22.9) is too old +# and causes "Error: Cannot find module 'node:crypto'" errors +RUN curl -fsSL https://deb.nodesource.com/setup_lts.x nodesource_setup.sh | bash \ + && apt-get install --no-install-recommends -y nodejs \ + && rm -rf /var/cache/apt/* + RUN git clone https://github.com/bnb-chain/bsc-genesis-contract -b develop /root/genesis \ && cd /root/genesis && git checkout bf3ac733f8aaf93ed88ca0ad2dcddd051166e4e1 && npm ci RUN cd /root/genesis && /root/.local/bin/poetry install -RUN cd /root/genesis && forge install --no-git --no-commit foundry-rs/forge-std@v1.7.3 +RUN cd /root/genesis && forge install --no-git foundry-rs/forge-std@v1.7.3 # override resources COPY genesis/ /root/genesis/ diff --git a/e2e/chains/bsc/Dockerfile.bsc b/e2e/chains/bsc/Dockerfile.bsc index 9ea7fb1..5ad80f4 100644 --- a/e2e/chains/bsc/Dockerfile.bsc +++ b/e2e/chains/bsc/Dockerfile.bsc @@ -1,9 +1,11 @@ -FROM golang:1.23-alpine +FROM golang:1.23 ARG GIT_SOURCE ARG GIT_CHECKOUT_BRANCH -RUN apk add --no-cache make cmake gcc musl-dev linux-headers git bash build-base libc-dev jq +RUN apt-get update && apt-get install --no-install-recommends -y \ + netcat-openbsd \ + && rm -rf /var/cache/apt/* ENV CGO_CFLAGS="-O -D__BLST_PORTABLE__" ENV CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__" diff --git a/e2e/chains/bsc/docker-compose.simple.yml b/e2e/chains/bsc/docker-compose.simple.yml index 84e8a9f..8e173e4 100644 --- a/e2e/chains/bsc/docker-compose.simple.yml +++ b/e2e/chains/bsc/docker-compose.simple.yml @@ -70,9 +70,9 @@ services: - bsc-rpc:/root/.ethereum - ./scripts:/scripts - ./config:/config - command: ash /scripts/bsc-rpc.sh + command: bash /scripts/bsc-rpc.sh healthcheck: - test: ["CMD", "ash", "/scripts/healthcheck.sh"] + test: ["CMD", "bash", "/scripts/healthcheck.sh"] interval: "5s" start_period: "10s" @@ -89,9 +89,9 @@ services: - bsc-rpc2:/root/.ethereum - ./scripts:/scripts - ./config:/config - command: ash /scripts/bsc-rpc.sh + command: bash /scripts/bsc-rpc.sh healthcheck: - test: ["CMD", "ash", "/scripts/healthcheck.sh"] + test: ["CMD", "bash", "/scripts/healthcheck.sh"] interval: "5s" start_period: "10s" @@ -106,7 +106,7 @@ services: volumes: - bsc-validator1-1:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator1-2: image: bsc-geth:docker-local @@ -119,7 +119,7 @@ services: volumes: - bsc-validator1-2:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator1-3: image: bsc-geth:docker-local @@ -132,7 +132,7 @@ services: volumes: - bsc-validator1-3:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator1-4: image: bsc-geth:docker-local @@ -145,7 +145,7 @@ services: volumes: - bsc-validator1-4:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator1-5: image: bsc-geth:docker-local @@ -158,7 +158,7 @@ services: volumes: - bsc-validator1-5:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator2-1: image: bsc-geth:docker-local @@ -171,7 +171,7 @@ services: volumes: - bsc-validator2-1:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator2-2: image: bsc-geth:docker-local @@ -184,7 +184,7 @@ services: volumes: - bsc-validator2-2:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator2-3: image: bsc-geth:docker-local @@ -197,7 +197,7 @@ services: volumes: - bsc-validator2-3:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator2-4: image: bsc-geth:docker-local @@ -210,7 +210,7 @@ services: volumes: - bsc-validator2-4:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh bsc-validator2-5: image: bsc-geth:docker-local @@ -223,7 +223,7 @@ services: volumes: - bsc-validator2-5:/root/.ethereum - ./scripts:/scripts - command: ash /scripts/bsc-validator.sh + command: bash /scripts/bsc-validator.sh autoheal: restart: always