Go to file
terence tsao cf8e474410 Avoid Panic Retrieving Validator Public Key (#2566)
* exclusive of finalized block

* fixed saveValidatorIdx to skip validator not in state

* fixed test

* tests

* comment

* comment

* fixed test

* comment
2019-05-11 17:08:00 -04:00
.github Add config for probot stale bot (#1349) 2019-01-19 10:30:49 -05:00
beacon-chain Avoid Panic Retrieving Validator Public Key (#2566) 2019-05-11 17:08:00 -04:00
contracts Display Only Active Validator Data (#2490) 2019-05-05 09:40:21 -07:00
docs Update All Our Documentation (#2012) 2019-03-17 16:30:46 -06:00
k8s Add alert manager config (#2564) 2019-05-11 09:21:21 -07:00
proto Fetch Block Tree from Justified Block to Highest Observed Slot via RPC (#2549) 2019-05-09 12:38:05 -05:00
scripts Add GCP test configuration and p2p-host-ip flag (#2510) 2019-05-06 13:33:19 -04:00
shared Fix Bitfield in Attestations (#2565) 2019-05-11 16:49:09 -04:00
tools Fix BlockTree RPC Server Response (#2556) 2019-05-10 10:07:43 -07:00
validator Fix Bitfield in Attestations (#2565) 2019-05-11 16:49:09 -04:00
.buildkite-bazelrc Remote caching with GCP (#2294) 2019-04-18 16:29:09 -05:00
.codecov.yml Adding Basic Private Key Management (#671) 2018-11-08 11:22:31 +08:00
.gitattributes linguist-generated=true for mock and pb go files (#1465) 2019-02-02 17:25:28 -05:00
.gitignore Validator: performing for multiple keys - update rpc proto (#2040) 2019-03-23 19:46:25 -05:00
.golangci.yml upgrading linter from gometalinter to golangci-lint (#2100) 2019-04-26 14:24:01 +08:00
.soliumignore Moving solidity lint check to bazel / buildkite (#629) 2018-10-07 13:20:59 -04:00
.soliumrc.json Update Registration Contract in Solidity (#996) 2018-11-30 07:12:23 -08:00
.travis.yml upgrading linter from gometalinter to golangci-lint (#2100) 2019-04-26 14:24:01 +08:00
BUILD.bazel Prevent Canceling Goroutines in Validator Client (#2324) 2019-04-21 16:49:57 -04:00
CONTRIBUTING.md Update All Our Documentation (#2012) 2019-03-17 16:30:46 -06:00
LICENSE.md update to GPLv3 (#297) 2018-07-20 10:23:48 -05:00
nogo_config.json Prevent Canceling Goroutines in Validator Client (#2324) 2019-04-21 16:49:57 -04:00
package.json Major Renovate Updates (#2264) 2019-04-15 18:32:59 +08:00
PULL_REQUEST_TEMPLATE.md Update All Our Documentation (#2012) 2019-03-17 16:30:46 -06:00
README.md Update Prysm README (#2477) 2019-05-03 12:55:15 -05:00
renovate.json Update renovate.json (#1965) 2019-03-11 11:04:14 -04:00
service-account.json.enc Bazel cache for travis (#236) 2018-07-07 16:01:58 -04:00
WORKSPACE "Super sync" and naive p2p reputation (#2550) 2019-05-09 16:02:24 -05:00
yarn.lock Major Renovate Updates (#2264) 2019-04-15 18:32:59 +08:00

Prysmatic Labs Ethereum Serenity Implementation

Build status

This is the main repository for the Go implementation of the Ethereum 2.0 Serenity Prysmatic Labs.

Before you begin, check out our official documentation portal and join our active chat room on Discord or Gitter below:

Discord Gitter

Also, read our Roadmap Reference Implementation Doc. This doc provides a background on the milestones we aim for the project to achieve.

Table of Contents

Join Our Testnet

You can now participate in our public testnet release for Ethereum 2.0 phase 0. Visit prylabs.net 💎 to participate!

Installing Prysm

Installation Options

You can either choose to run our system via:

  • Our latest release (Easiest)
  • Using Docker (Recommended)
  • Using Our Build Tool, Bazel

Docker is a convenient way to run Prysm, as all you need to do is fetch the latest images:

docker pull gcr.io/prysmaticlabs/prysm/validator:latest
docker pull gcr.io/prysmaticlabs/prysm/beacon-chain:latest

Build Via Bazel

First, clone our repository:

git clone https://github.com/prysmaticlabs/prysm

Download the Bazel build tool by Google here and ensure it works by typing:

bazel version

Bazel manages all of the dependencies for you (including go and necessary compilers) so you are all set to build prysm. Then, build both parts of our system: a beacon chain node implementation, and a validator client:

bazel build //beacon-chain:beacon-chain
bazel build //validator:validator

Prysm Main Components

Prysm ships with two important components: a beacon node and a validator client. The beacon node is the server that performs the heavy lifting of Ethereum 2.0., A validator client is another piece of software that securely connects to the beacon node and allows you to stake 3.2 Goerli ETH in order to secure the network. You'll be mostly interacting with the validator client to manage your stake. Another critical component of Ethereum 2.0 is the Validator Deposit Contract, which is a smart contract deployed on the Ethereum 1.0 chain which can be used for current holders of ETH to do a one-way transfer into Ethereum 2.0.

Running an Ethereum 2.0 Beacon Node

With docker:

docker run -v /tmp/prysm-data:/data -p 4000:4000 \
  gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
  --datadir=/data
  --clear-db

To start your beacon node with bazel:

bazel run //beacon-chain -- --clear-db --datadir=/tmp/prysm-data

This will sync you up with the latest head block in the network, and then you'll have a ready beacon node. The chain will then be waiting for you to deposit 3.2 Goerli ETH into the Validator Deposit Contract before your validator can become active! Now, you'll need to create a validator client to connect to this node and stake 3.2 Goerli ETH to participate as a validator in Ethereum 2.0's Proof of Stake system.

Staking ETH: Running a Validator Client

Once your beacon node is up, you'll need to attach a validator client as a separate process. Each validator represents 3.2 Goerli ETH being staked in the system, so you can spin up as many as you want to have more at stake in the network

Activating Your Validator: Depositing 3.2 Goerli ETH

Using your validator deposit data from the previous step, use the instructions in https://alpha.prylabs.net/participate to deposit.

It'll take a while for the nodes in the network to process your deposit, but once you're active, your validator will begin doing its responsibility! In your validator client, you'll be able to frequently see your validator balance as it goes up. If you ever go offline for a while, you'll start gradually losing your deposit until you get kicked out of the system. Congratulations, you are now running Ethereum 2.0 Phase 0 :).

Testing

To run the unit tests of our system do:

bazel test //...

To run our linter, make sure you have golangci-lint installed and then run:

golangci-lint run

Contributing

We have put all of our contribution guidelines into CONTRIBUTING.md! Check it out to get started.

nyancat

License

GNU General Public License v3.0