nimbus-eth2/README.md

3.3 KiB

Ethereum Beacon Chain

Build Status (Travis) Windows build status (Appveyor) License: Apache License: MIT Stability: experimental

An alternative implementation of the Ethereum beacon chain in Nim.

Please see Full Beacon chain specs and the Ethereum Foundation reference implementation.

You can check where the beacon chain fits in the Ethereum research ecosystem in the Status Athenaeum.

Test vectors

The Eth 2.0 test vectors and their generators are available in a dedicated repository.

Convention

Ethereum Foundation uses:

  • snake_case for fields and procedure names
  • MACRO_CASE for constants
  • PascalCase for types

Nim NEP-1 recommends:

  • camelCase for fields and procedure names
  • PascalCase for constants
  • PascalCase for types

To facilitate collaboration and comparison, Nim-beacon-chain uses the Ethereum Foundation convention.

Installation

You can install the developement version of the library through nimble with the following command

nimble install https://github.com/status-im/nim-beacon-chain@#master

Building and Testing

To try out the implementation, please first make sure you have a Nim environment configured.

Alternatively, fire up our experimental Vagrant instance with Nim pre-installed and give us yout feedback about the process!

Then:

git clone git@github.com:status-im/nim-beacon-chain
cd nim-beacon-chain
nimble install
nimble test

This should produce some passing tests.

Additionally, you can run our simulation which generates a genesis file from some randomly generated validators. It then fires up 10 beacon nodes (each hosting 9 validators) which talk to each other and try to do state transitions. The simulation can be run by executing:

bash tests/simulation/start.sh

You can find out more about it in the development update.

License

Licensed and distributed under either of

or

at your option. This file may not be copied, modified, or distributed except according to those terms.