ethereum / testeth

One consensus test generator
GNU General Public License v3.0
10 stars 12 forks source link

testeth - Ethereum consensus test generator.

This repository contains testeth, an Ethereum consensus test generator.

This repository is out of date and should be closed. Anyone wanting to use testeth should instead build and run it from the ethereum/aleth repository.

Contact

Gitter GitHub Issues

Difference from cpp-ethereum

Currently the repository is almost identical to cpp-ethereum

However, eth command in testeth will keep the ability to sync the main network. It's important to generate tests using the code compliant with the main network.

Building from source

Get the source code

Git and GitHub is used to maintain the source code. Clone the repository by:

git clone --recursive https://github.com/ethereum/testeth.git
cd testeth

The --recursive option is important. It orders git to clone additional submodules which are required to build the project. If you missed it you can correct your mistake with command git submodule update --init.

Install CMake

CMake is used to control the build configuration of the project. Quite recent version of CMake is required (at the time of writing 3.4.3 is the minimum). We recommend installing CMake by downloading and unpacking the binary distribution of the latest version available on the CMake download page.

The CMake package available in your operating system can also be installed and used if it meets the minimum version requirement.

Alternative method

The repository contains the scripts/install_cmake.sh script that downloads a fixed version of CMake and unpacks it to the given directory prefix. Example usage: scripts/install_cmake.sh --prefix /usr/local.

Install dependencies (Linux, macOS)

The following libraries are required to be installed in the system in their development variant:

They usually can be installed using system-specific package manager. Examples for some systems:

Operating system Installation command
Debian-based sudo apt-get install libleveldb-dev
RedHat-based dnf install leveldb-devel
macOS brew install leveldb

We also support a "one-button" shell script scripts/install_deps.sh which attempts to aggregate dependencies installation instructions for Unix-like operating systems. It identifies your distro and installs the external packages. Supporting the script is non-trivial task so please inform us if it does not work for your use-case.

Build

Configure the project build with the following command. It will create the build directory with the configuration.

mkdir build; cd build  # Create a build directory.
cmake ..               # Configure the project.
cmake --build .        # Build all default targets.

Testing

To run the tests, make sure you clone https://github.com/ethereum/tests and point the environment variable ETHEREUM_TEST_PATH to that path.

After building,

ctest -j4

will run the tests with some parallelism.

You can also add testeth options (that come after the separator --) like

ctest -j4 -DTESTETH_ARGS="--verbosity 5"

To see the list of options,

test/testeth --help

Documentation

License

License

All contributions are made under the GNU General Public License v3. See LICENSE.