7f1bddb267 | ||
---|---|---|
.vscode | ||
beacon_chain | ||
benchmarks | ||
research | ||
tests | ||
.appveyor.yml | ||
.gitignore | ||
.travis.yml | ||
LICENSE-APACHEv2 | ||
LICENSE-MIT | ||
README.md | ||
beacon_chain.nim | ||
beacon_chain.nimble | ||
nim.cfg |
README.md
Ethereum Beacon Chain
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
- MIT license: LICENSE-MIT or http://opensource.org/licenses/MIT
or
- Apache License, Version 2.0, (LICENSE-APACHEv2 or http://www.apache.org/licenses/LICENSE-2.0)
at your option. This file may not be copied, modified, or distributed except according to those terms.