Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

ethereum/testeth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • testeth will drop MacOS and Windows supports
  • testeth will drop commands except eth and testeth
  • testeth will drop key management features except needed for generating tests

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:

  • leveldb

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.