Nim implementation of the Ethereum Beacon Chain https://nimbus.guide
Go to file
Dustin Brody d1af069c55 Spec update (#83)
* rm GWEI_PER_ETH

* update EJECTION_BALANCE; rm MAX_CASPER_VOTES/replace with MAX_INDICES_PER_SLASHABLE_VOTE; modify GENESIS_SLOT

* update various constants from slots to epochs; MAX_CASPER_SLASHINGS -> MAX_ATTESTER_SLASHINGS

* AttesterSlashing field renamings; SlashableVote -> SlashableAttestation; add DOMAIN_RANDAO

* rm aggregate_signature_poc_[01]_indices

* centralize some bitfield functions
2019-02-05 19:40:27 +01:00
.vscode vscode: add tasks 2018-12-13 11:14:21 -06:00
beacon_chain Spec update (#83) 2019-02-05 19:40:27 +01:00
benchmarks Update BLS to the latest scheme. (#80) 2019-02-05 17:13:29 +01:00
research Update BLS to the latest scheme. (#80) 2019-02-05 17:13:29 +01:00
tests enable "--threads:on" for tests (#75) 2019-02-05 18:48:34 +01:00
.appveyor.yml Update ci configs 2019-01-17 14:38:16 +02:00
.gitignore initial commit 2018-07-20 15:46:03 +02:00
.travis.yml Update ci configs 2019-01-17 14:38:16 +02:00
LICENSE-APACHEv2 initial commit 2018-07-20 15:46:03 +02:00
LICENSE-MIT initial commit 2018-07-20 15:46:03 +02:00
README.md Update README.md 2019-01-02 14:55:29 +01:00
beacon_chain.nim Add the types used in the beacon chain 2018-07-20 20:18:56 +02:00
beacon_chain.nimble Update BLS to the latest scheme. (#80) 2019-02-05 17:13:29 +01:00
nim.cfg enable "--threads:on" for tests (#75) 2019-02-05 18:48:34 +01:00

README.md

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.