-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from ethereum/develop
version 0.2.2 develop
- Loading branch information
Showing
134 changed files
with
4,124 additions
and
1,958 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,72 @@ | ||
# retesteth | ||
testeth via RPC (wiki: https://github.com/ethereum/retesteth/wiki) | ||
testeth via RPC (wiki: https://github.com/ethereum/retesteth/wiki) | ||
tests execution/generation via transition tool (https://ethereum-tests.readthedocs.io/en/latest/t8ntool-ref.html) | ||
(Execution stats: http://retesteth.ethdevops.io/) | ||
|
||
* A test generaion tool for the test fillers https://github.com/ethereum/tests/tree/develop/src | ||
* A test generation tool for the test fillers https://github.com/ethereum/tests/tree/develop/src | ||
* Building instruction for beginners: [retesteth + solidity build](https://github.com/ethereum/retesteth#building-instructions-for-beginners) | ||
* [Usage tutorial](https://ethereum-tests.readthedocs.io/en/latest/retesteth-tutorial.html) | ||
|
||
# The Goal | ||
|
||
* A test tool that would be capable of running current Blockchain tests against any client by sending rpc request to the client instatnce on either local or remote host. (using unix or TCP sockets) | ||
* Filling existing tests (generating post state from *Filler.json instruction files) using rpc and any exisiting client | ||
* Running rpc request - response tests with a provided client on localhost | ||
* A test tool that would be capable of running current Blockchain/State tests against any client | ||
* On client side use test RPC or transition tool executable which exports client core logic of transaction execution on given state | ||
* Filling existing tests (generating post state from *Filler.json instruction files) using the above and any existing client | ||
* Running request - response tests with a provided client on localhost | ||
* Bunch tests execution with many clients with many threads | ||
* A minimum set of additional rpc methods for client to negotiate with the tool: https://github.com/ethereum/retesteth/wiki/RPC-Methods | ||
* A minimum set of additional RPC methods for client to negotiate with the tool: https://github.com/ethereum/retesteth/wiki/RPC-Methods | ||
* Or a simple transition tool that is also usefull for transaction debugging: https://ethereum-tests.readthedocs.io/en/latest/t8ntool-ref.html | ||
|
||
# Current progress | ||
|
||
* done: State tests execution and filling was done as PoC on ethereum cpp client (aleth) | ||
* done: Tests execution using threads on localhost with multimple instances of a client (geth + aleth) | ||
* done: Develop minimum set of rpc methods that are to be implemented on other clients and could be used to run tests via rpc | ||
* done: State tests execution and filling was done as PoC on Ethereum cpp client (aleth) | ||
* done: Tests execution using threads on localhost with multiple instances of a client (geth + aleth) | ||
* done: Develop minimum set of RPC methods that are to be implemented on other clients and could be used to run tests via RPC | ||
* done: PoC Running Blockchain tests using geth client | ||
* done: Implement a set of PoC methods in other client then aleth | ||
* done: Refactoring and stability when generating GeneralStateTests | ||
* done: Blockchain test generation support | ||
* now: Use retesteth to produce fork tests with geth/besu/aleth | ||
* now: Refactor the code, impove stability | ||
* done: Use retesteth to produce fork tests with geth/besu | ||
* done: Refactor the code, improve stability | ||
* now: Support and development, support teams | ||
|
||
# Building instructions | ||
Ubuntu (retesteth): | ||
``` | ||
git clone [email protected]:ethereum/retesteth.git | ||
cd retesteth | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake .. -DCMAKE_BUILD_TYPE=Release | ||
make -j4 | ||
``` | ||
Or try building instruction for begginers: [retesteth + solidity build](https://github.com/ethereum/retesteth#building-instructions-for-beginners) | ||
|
||
MacOS (retesteth + tests + geth): | ||
``` | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew install -q cmake ninja git [email protected] | ||
git clone --depth 1 https://github.com/ethereum/go-ethereum.git | ||
git clone --depth 1 https://github.com/ethereum/tests.git | ||
cd go-ethereum | ||
make all | ||
ln -s ./build/bin/evm /usr/local/bin/evm | ||
cd .. | ||
git clone https://github.com/ethereum/retesteth.git | ||
cd retesteth | ||
mkdir build | ||
cd build | ||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake | ||
cmake --build . | ||
``` | ||
Or try building instruction for beginners: [retesteth + solidity build](https://github.com/ethereum/retesteth#building-instructions-for-beginners) | ||
|
||
|
||
# Usage | ||
WIKI: https://github.com/ethereum/retesteth/wiki | ||
Requres to have a client installed on your system. Read the wiki page on detailed instruction on how to configure your client to work with `retesteth` | ||
Wiki: https://github.com/ethereum/retesteth/wiki | ||
Requires to have a client installed on your system. Read the wiki page on detailed instruction on how to configure your client to work with `retesteth` | ||
https://github.com/ethereum/retesteth/wiki/Add-client-configuration-to-Retesteth | ||
``` | ||
./retesteth -t GeneralStateTests | ||
```bash | ||
./retesteth -t GeneralStateTests -- --testpath "your path to ethereum/tests repo" | ||
``` | ||
|
||
# Docker instructions | ||
|
@@ -82,11 +105,11 @@ cd build | |
cmake .. | ||
``` | ||
|
||
Now you should see the successful build files generation result: | ||
Now you should see the successful build files generation result: | ||
``` | ||
Configuring done | ||
-- Generating done | ||
-- Build files have been written | ||
-- Build files have been written | ||
``` | ||
|
||
Run the build command to compile: | ||
|
@@ -97,10 +120,10 @@ make -j4 | |
|
||
#### Solidity | ||
|
||
check the available boost version by | ||
check the available boost version by | ||
`sudo apt-cache policy libboost-all-dev` | ||
|
||
install boost dependency boost if version >=1.65 | ||
install boost dependency boost if version >=1.65 | ||
`sudo apt-get install libboost-all-dev` | ||
|
||
Solidity building instructions: | ||
|
@@ -118,5 +141,3 @@ make lllc -j4 | |
``` | ||
|
||
### DONE! | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,14 +31,24 @@ defaults: | |
name: "ConfigureMac" | ||
working_directory: ~/build | ||
command: | | ||
cmake ../project -G "$GENERATOR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCOVERAGE=ON $CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=~/project/toolchain.cmake | ||
cmake ../project -G "$GENERATOR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=~/project/toolchain.cmake | ||
build: &build | ||
run: | ||
name: "Build" | ||
working_directory: ~/build | ||
command: cmake --build . -- -j $BUILD_PARALLEL_JOBS | ||
|
||
test-retesteth: &test-retesteth | ||
run: | ||
name: "Test-retesteth" | ||
working_directory: ~/build/retesteth | ||
command: | | ||
./retesteth -t GeneralStateTests/stExample -- --testpath ~/project/tests | ||
./retesteth -t BlockchainTests/ValidBlocks/bcExample -- --testpath ~/project/tests | ||
./retesteth -t GeneralStateTests -- --checkhash --testpath ~/project/tests | ||
./retesteth -t BlockchainTests -- --checkhash --testpath ~/project/tests | ||
test: &test | ||
run: | ||
name: "Test" | ||
|
@@ -51,7 +61,11 @@ defaults: | |
./retesteth -t EthObjectsSuite | ||
./retesteth -t DataObjectTestSuite | ||
./retesteth -t OptionsSuite | ||
./retesteth -t ExpectSectionSuite | ||
./retesteth -t StructTest | ||
./retesteth -t MemoryLeak | ||
# ./retesteth -t LLLCSuite | ||
# ./retesteth -t trDataCompileSuite | ||
# git clone --depth 1 https://github.com/ethereum/tests.git | ||
# export ETHEREUM_TEST_PATH=~/build/testeth/tests | ||
# ctest --output-on-failure -j $TEST_PARALLEL_JOBS | ||
|
@@ -149,29 +163,35 @@ jobs: | |
- image: ethereum/cpp-build-env:7 | ||
steps: *linux-steps | ||
|
||
macOS-XCode11: | ||
macOS-XCode12: | ||
environment: | ||
- BUILD_TYPE: Release | ||
- CXX: clang++ | ||
- GCOV: gcov | ||
- GENERATOR: Ninja | ||
- BUILD_PARALLEL_JOBS: 8 | ||
- TEST_PARALLEL_JOBS: 8 | ||
macos: | ||
xcode: "11.3.1" | ||
xcode: "12.5.1" | ||
steps: | ||
- checkout | ||
- *environment-info | ||
- run: | ||
name: "Install macOS dependencies" | ||
# Python3 and requests are needed for Hunter upload. | ||
command: | | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew install -q cmake ninja | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew install -q cmake ninja git [email protected] | ||
git clone --depth 1 https://github.com/ethereum/go-ethereum.git | ||
git clone --depth 1 https://github.com/ethereum/tests.git | ||
cd go-ethereum | ||
make all | ||
ln -s ~/project/go-ethereum/build/bin/evm /usr/local/bin/evm | ||
- *environment-info | ||
- *configureMac | ||
# - *upload-hunter-cache | ||
# - *install-solidity-mac | ||
- *build | ||
- *store-retesteth | ||
- *test | ||
- *test-retesteth | ||
# - *upload-coverage-data | ||
|
||
# TODO: Run GCC6 build only in develop branch. | ||
|
@@ -181,6 +201,6 @@ workflows: | |
version: 2 | ||
cpp-ethereum: | ||
jobs: | ||
- macOS-XCode11 | ||
- macOS-XCode12 | ||
- Linux-Clang6 | ||
- Linux-GCC6-Debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/sh | ||
echo "Build dependencies: " | ||
echo "BOOST 1.79" | ||
|
||
echo "working dir: "$(pwd) | ||
if [ ! -d "dependecies" ]; then | ||
mkdir dependecies | ||
cd dependecies | ||
mkdir boost | ||
cd boost | ||
else | ||
cd "dependecies/boost" | ||
fi | ||
|
||
|
||
FILE=boost_1_79_0.tar.gz | ||
if test -f "$FILE"; then | ||
echo "$FILE exists, use downloaded version..." | ||
else | ||
curl -L --output boost_1_79_0.tar.gz "https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.gz" | ||
fi | ||
|
||
if [ ! -d "boost_1_79_0" ]; then | ||
echo "unpack $FILE..." | ||
tar -xf $FILE | ||
cd boost_1_79_0 | ||
mkdir build | ||
echo "configure boost: " | ||
echo "bootstrap.sh --prefix=$(pwd)/build" | ||
./bootstrap.sh --prefix=$(pwd)/build | ||
libs="" | ||
for var in "$@" | ||
do | ||
libs=$libs" --with-$var" | ||
done | ||
./b2 $libs link=static | ||
else | ||
echo "found boost previous build in $(pwd)/boost_1_79_0" | ||
fi | ||
|
||
|
||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.