lighthouse/docs/env.md
Paul Hauner 845f336a59
Interop chain start strategies (#479)
* Implement more flexible beacon chain genesis

* Fix compile issues from rebase on master

* Rename CLI flag

* Adds initial documentation for TOML files

* Update docs readme

* Add first version of cli_util

* Dont write cache fields in serde

* Tidy cli_util

* Add code to load genesis YAML file

* Move serde_utils out of tests in `types`

* Update logging text

* Fix serde YAML for Fork

* Make yaml hex decoding more strict

* Update deterministic key generate for interop

* Set deposit count on testing genesis state

* Make some fixes for deposit count

* Remove code fragements

* Large restructure of docs

* Tidy docs

* Fix readme link

* Add interop docs

* Tidy README
2019-08-06 13:29:27 +10:00

2.3 KiB

Development Environment Setup

This document describes how to setup a development environment. It is intended for software developers and researchers who wish to contribute to development.

Lighthouse is a Rust project and cargo is used extensively. As such, you'll need to install Rust in order to build the project. Generally, Rust is installed using the rustup tool-chain manager.

Steps

A fully-featured development environment can be achieved with the following steps:

  1. Install rustup.
  2. Use the command rustup show to get information about the Rust installation. You should see that the active tool-chain is the stable version.
    • Updates can be performed using rustup update, Lighthouse generally requires a recent version of Rust.
  3. Install build dependencies (Arch packages are listed here, your distribution will likely be similar):
    • clang: required by RocksDB.
    • protobuf: required for protobuf serialization (gRPC).
    • cmake: required for building protobuf
    • git-lfs: The Git extension for Large File Support (required for Ethereum Foundation test vectors).
  4. Clone the repository with submodules: git clone --recursive https://github.com/sigp/lighthouse. If you're already cloned the repo, ensure testing submodules are present: $ git submodule init; git submodule update
  5. Change directory to the root of the repository.
  6. Run the test suite with cargo test --all --release. The build and test process can take several minutes. If you experience any failures on master, please raise an issue.

Notes:

Lighthouse targets Rust stable but generally runs on nightly too.

Note for Windows users:

Perl may also be required to build lighthouse. You can install Strawberry Perl, or alternatively use a choco install command choco install strawberryperl.

Additionally, the dependency protoc-grpcio v0.3.1 is reported to have issues compiling in Windows. You can specify a known working version by editing version in protos/Cargo.toml section to protoc-grpcio = "<=0.3.0".