Skip to content

Commit 68a2186

Browse files
author
winsvega
authored
Merge pull request #205 from ethereum/develop
version 0.3.1 development (update docker instructions to master)
2 parents 3a8e440 + fb2c7e7 commit 68a2186

File tree

278 files changed

+9552
-4743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+9552
-4743
lines changed

CMakeLists.txt

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/toolchain.cmake)
44

55
include("./cmake/Hunter/HunterGate.cmake")
66

7+
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
8+
add_compile_definitions("__DEBUG__")
9+
endif()
10+
if (${UNITTESTS})
11+
add_compile_definitions("UNITTESTS")
12+
endif()
13+
714
set(HUNTER_CONFIGURATION_TYPES Release)
815
set(HUNTER_JOBS_NUMBER 4 CACHE STRING "Hunter jobs number")
916
set(HUNTER_CACHE_SERVERS "https://github.com/ethereum/hunter-cache" CACHE STRING "Hunter cache servers")
@@ -15,7 +22,7 @@ HunterGate(
1522
)
1623
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
1724

18-
project(retesteth VERSION 0.3.0)
25+
project(retesteth VERSION 0.3.1)
1926
set(VERSION_SUFFIX "shanghai")
2027

2128
set(Boost_USE_STATIC_LIBS ON)
@@ -48,8 +55,13 @@ if (POLICY CMP0135)
4855
cmake_policy(SET CMP0135 NEW) # Use provided package_ROOT variables
4956
endif()
5057

51-
hunter_add_package(CURL)
52-
find_package(CURL CONFIG REQUIRED)
58+
IF (NOT LOCALDEPS MATCHES ".*CURL")
59+
hunter_add_package(CURL)
60+
find_package(CURL CONFIG REQUIRED)
61+
ELSE()
62+
message(STATUS "[retesteth] LOCALDEPS=CURL looking for locally installed version")
63+
find_package(CURL CONFIG REQUIRED)
64+
ENDIF()
5365

5466

5567
#Cmake files configuration
@@ -70,4 +82,8 @@ endif()
7082
add_subdirectory(libdevcore)
7183
add_subdirectory(libdevcrypto)
7284
add_subdirectory(libdataobj)
85+
if (${UNITTESTS})
86+
set(LIBSSZ ssz)
87+
add_subdirectory(libssz)
88+
endif()
7389
add_subdirectory(retesteth)

Dockerfile

Lines changed: 110 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,133 @@
11
FROM ubuntu:20.04 as retesteth
22

3+
ARG BESU_SRC="https://github.com/hyperledger/besu.git"
4+
ARG PYSPECS_SRC="https://github.com/ethereum/execution-spec-tests"
5+
ARG ETEREUMJS_SRC="https://github.com/ethereumjs/ethereumjs-monorepo.git"
6+
ARG RETESTETH_SRC="https://github.com/ethereum/retesteth.git"
7+
ARG GETH_SRC="https://github.com/ethereum/go-ethereum.git"
8+
ARG NIMBUS_SRC="https://github.com/status-im/nimbus-eth1.git"
9+
ARG EVMONE_SRC="https://github.com/ethereum/evmone.git"
10+
11+
# Leave empty to disable the build, can point to commit hash as well
12+
ARG BESU="main"
13+
ARG GETH="master"
14+
ARG NIMBUS="master"
15+
ARG ETHEREUMJS="master"
16+
ARG RETESTETH="develop"
17+
ARG PYSPECS="main"
18+
ARG EVMONE="master"
19+
20+
SHELL ["/bin/bash", "-c"]
321
ENV TZ=Etc/UTC
422
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
523

624
# Get necessary packages
725
RUN apt-get update \
8-
&& apt-get install --yes git cmake g++ make perl psmisc curl python3 wget libboost-all-dev \
26+
&& apt install software-properties-common -y \
27+
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
28+
&& add-apt-repository -y ppa:deadsnakes/ppa \
29+
&& add-apt-repository ppa:linuxuprising/java \
30+
&& apt-get install --yes git cmake make perl psmisc curl wget gcc-11 g++-11 python3.10 python3.10-venv python3-pip python3-dev \
31+
&& apt-get install --yes libboost-filesystem-dev libboost-system-dev libboost-program-options-dev libboost-test-dev \
32+
&& echo oracle-java17-installer shared/accepted-oracle-license-v1-3 select true | /usr/bin/debconf-set-selections \
33+
&& apt-get install --yes oracle-java17-installer oracle-java17-set-default \
934
&& rm -rf /var/lib/apt/lists/*
35+
RUN rm /usr/bin/python3 && ln -s /usr/bin/python3.10 /usr/bin/python3 \
36+
&& rm /usr/bin/gcc && rm /usr/bin/g++ \
37+
&& ln -s /usr/bin/gcc-11 /usr/bin/gcc \
38+
&& ln -s /usr/bin/g++-11 /usr/bin/g++
1039

11-
# Retesteth
12-
# ADD . /retesteth
13-
RUN git clone --depth 1 -b master https://github.com/ethereum/retesteth.git /retesteth
14-
RUN mkdir /build && cd /build \
15-
&& cmake /retesteth -DCMAKE_BUILD_TYPE=Release \
16-
&& make -j8 \
17-
&& cp /build/retesteth/retesteth /usr/bin/retesteth \
18-
&& rm -rf /build /retesteth /var/cache/* /root/.hunter/*
19-
40+
# Tests
2041
#RUN git clone --depth 1 -b master https://github.com/ethereum/tests /tests
2142

2243
# Solidity LLLC
23-
RUN git clone --depth 1 -b master https://github.com/winsvega/solidity.git /solidity
24-
RUN mkdir /build && cd /build \
44+
RUN test -n "$RETESTETH" \
45+
&& git clone --depth 1 -b master https://github.com/winsvega/solidity.git /solidity \
46+
&& mkdir /build && cd /build \
2547
&& cmake /solidity -DCMAKE_BUILD_TYPE=Release -DLLL=1 && make lllc \
2648
&& cp /build/lllc/lllc /bin/lllc \
27-
&& rm -rf /build /solidity /var/cache/* /root/.hunter/*
49+
&& rm -rf /build /solidity /var/cache/* /root/.hunter/* \
50+
|| echo "Retesteth is empty, skip LLLC"
2851

2952
# Solidity solc
30-
# RUN git clone https://github.com/ethereum/solidity.git /solidity
31-
# RUN mkdir /build && cd /build \
32-
# && cmake /solidity -DCMAKE_BUILD_TYPE=Release && make solc \
33-
# && cp /build/solc/solc /bin/solc \
34-
# && rm -rf /build /solidity /var/cache/* /root/.hunter/*
3553
RUN wget https://github.com/ethereum/solidity/releases/download/v0.8.17/solc-static-linux \
3654
&& cp solc-static-linux /bin/solc \
3755
&& chmod +x /bin/solc
3856

57+
# Pyspecs
58+
RUN git clone $PYSPECS_SRC /execution-spec-tests
59+
RUN cd /execution-spec-tests && git fetch && git checkout $PYSPECS \
60+
&& python3 -m venv ./venv/ \
61+
&& source ./venv/bin/activate \
62+
&& pip install -e . \
63+
&& wget https://raw.githubusercontent.com/ethereum/retesteth/develop/web/tfinit.sh \
64+
&& cp tfinit.sh /usr/bin/tfinit.sh \
65+
&& chmod +x /usr/bin/tfinit.sh
66+
67+
3968
# Geth
40-
RUN git clone --depth 1 -b master https://github.com/ethereum/go-ethereum.git /geth
41-
RUN cd /geth \
42-
&& wget https://dl.google.com/go/go1.19.linux-amd64.tar.gz \
43-
&& tar -xvf go1.19.linux-amd64.tar.gz \
44-
&& mv go /usr/local && ln -s /usr/local/go/bin/go /bin/go \
45-
&& make all && cp /geth/build/bin/evm /bin/evm \
46-
&& cp /geth/build/bin/geth /bin/geth \
47-
&& rm -rf /geth && rm -rf /usr/local/go
69+
RUN test -n "$GETH" \
70+
&& git clone $GETH_SRC /geth \
71+
&& cd /geth && git fetch && git checkout $GETH \
72+
&& wget https://dl.google.com/go/go1.19.linux-amd64.tar.gz \
73+
&& tar -xvf go1.19.linux-amd64.tar.gz \
74+
&& mv go /usr/local && ln -s /usr/local/go/bin/go /bin/go \
75+
&& make all && cp /geth/build/bin/evm /bin/evm \
76+
&& cp /geth/build/bin/geth /bin/geth \
77+
&& rm -rf /geth && rm -rf /usr/local/go \
78+
|| echo "Geth is empty"
79+
80+
# Nimbus
81+
RUN test -n "$NIMBUS" \
82+
&& apt-get update \
83+
&& apt-get install --yes librocksdb-dev \
84+
&& rm -rf /var/lib/apt/lists/* \
85+
&& git clone --recursive $NIMBUS_SRC /nimbus \
86+
&& cd /nimbus && git fetch && git checkout $NIMBUS && make t8n \
87+
&& cp /nimbus/tools/t8n/t8n /bin/evm_nimbus \
88+
&& rm -rf /nimbus \
89+
|| echo "Nimbus is empty"
90+
91+
# Ethereumjs
92+
RUN test -n "$ETHEREUMJS" \
93+
&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
94+
&& . ~/.nvm/nvm.sh \
95+
&& nvm install 19 && nvm alias default 19 && nvm use default \
96+
&& cp -r ~/.nvm/versions/node/v19*/* /usr \
97+
&& git clone $ETEREUMJS_SRC /ethereumjs \
98+
&& cd /ethereumjs && git fetch && git checkout $ETHEREUMJS && npm i && npm run build --workspaces \
99+
|| echo "Ethereumjs is empty"
100+
101+
# Besu
102+
RUN test -n "$BESU" \
103+
&& git clone $BESU_SRC /besu \
104+
&& cd /besu && git fetch && git checkout $BESU \
105+
&& ./gradlew build \
106+
|| echo "Besu is empty"
107+
108+
RUN test -n "$BESU" \
109+
&& cd /besu && ./gradlew ethereum:evmtool:installDist \
110+
&& ln -s /besu/ethereum/evmtool/build/install/evmtool/bin/evm /usr/bin/besuevm \
111+
|| echo "Besu is empty"
112+
113+
# Evmone
114+
RUN test -n "$EVMONE" \
115+
&& git clone --recursive $EVMONE_SRC /evmone \
116+
&& cd /evmone && git fetch && git checkout $evmone \
117+
&& cmake -S . -B build -DEVMONE_TESTING=ON \
118+
&& cmake --build build \
119+
&& ln -s /evmone/build/bin/evmone-t8n /usr/bin/evmone \
120+
&& rm -rf /var/cache/* /root/.hunter/* \
121+
|| echo "Evmone is empty"
122+
123+
# Retesteth
124+
RUN test -n "$RETESTETH" \
125+
&& git clone $RETESTETH_SRC /retesteth \
126+
&& cd /retesteth && git fetch && git checkout $RETESTETH && mkdir /build && cd /build \
127+
&& cmake /retesteth -DCMAKE_BUILD_TYPE=Release \
128+
&& make -j2 \
129+
&& cp /build/retesteth/retesteth /usr/bin/retesteth \
130+
&& rm -rf /build /retesteth /var/cache/* /root/.hunter/* \
131+
|| echo "Retesteth is empty" > /usr/bin/retesteth
48132

49133
ENTRYPOINT ["/usr/bin/retesteth"]

0 commit comments

Comments
 (0)