Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions e2e/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
22 changes: 19 additions & 3 deletions e2e/chains/bsc/Dockerfile.bootstrap
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
6 changes: 4 additions & 2 deletions e2e/chains/bsc/Dockerfile.bsc
Original file line number Diff line number Diff line change
@@ -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__"
Expand Down
28 changes: 14 additions & 14 deletions e2e/chains/bsc/docker-compose.simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down