Interested in what's next? Be sure to read our Roadmap Reference Implementation document. This page outlines the basics of sharding as well as the various short-term milestones that we hope to achieve over the coming year.
Prysm can be installed either with Docker (recommended) or using our build tool, Bazel. The below instructions include sections for performing both.
The latest release of Docker
The latest release of Bazel
A modern UNIX operating system (MacOS included)
Ensure you are running the most recent version of Docker by issuing the command:
To pull the Prysm images from the server, issue the following commands:
docker pull gcr.io/prysmaticlabs/prysm/validator:latestdocker pull gcr.io/prysmaticlabs/prysm/beacon-chain:latest
This process will also install any related dependencies.
Open a terminal window. Ensure you are running the most recent version of Bazel by issuing the command:
Clone Prysm's main repository and enter the directory:
git clone https://github.com/prysmaticlabs/prysmcd prysm
Build both the beacon chain node implementation and the validator client:
bazel build //beacon-chain:beacon-chainbazel build //validator:validator
Bazel will automatically pull and install any dependencies as well, including Go and necessary compilers.
To start your beacon node, issue the following command:
docker run -v $HOME/prysm-data:/data -p 4000:4000 \gcr.io/prysmaticlabs/prysm/beacon-chain:latest \--name beacon-node \--datadir=/data
The beacon node can be halted by either using
Ctrl+c or with the command:
docker stop beacon-node
To restart the beacon node, issue the following command:
docker start -ai beacon-node
To delete a corrupted container, issue the following command:
docker rm beacon-node
To recreate a deleted container and refresh the chain database, issue the start command with an additional
docker run -it -v $HOME/prysm-data:/data -p 4000:4000 \gcr.io/prysmaticlabs/prysm/beacon-chain:latest \--name beacon-node \--datadir=/data \--clear-db
You will need to share the local drive you wish to mount to to container (e.g. C:).
Enter Docker settings (right click the tray icon)
Click 'Shared Drives'
Select a drive to share
You will next need to create a directory named
/tmp/prysm-data/ within your selected shared Drive. This folder will be used as a local data directory for Beacon Node chain data as well as account and keystore information required by the validator. Docker will not create this directory if it does not exist already. For the purposes of these instructions, it is assumed that
C: is your prior-selected shared Drive.
To run the beacon node, issue the following command:
docker run -it -v c:/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, issue the following command:
bazel run //beacon-chain -- --clear-db --datadir=/tmp/prysm-data
This will sync up the Beacon Node with the latest head block in the network. Note that the beacon node must be completely synced before attempting to initialise a validator client, otherwise the validator will not be able to complete the deposit and funds will be lost.
Once your beacon node is up, the chain will be waiting for you to deposit 3.2 Goerli ETH into the Validator Deposit Contract to activate your validator (discussed in the section below). First though, you will need to create a validator client to connect to this node in order to stake and participate. Each validator represents 3.2 Goerli ETH being staked in the system, and it is possible to spin up as many as you desire in order to have more stake in the network.
Using your validator deposit data from the previous step, follow the instructions found on prylabs.net to make a deposit.
It will take a while for the nodes in the network to process your deposit, but once your node is active, the validator will begin doing its responsibility. In your validator client, you will be able to frequently see your validator balance as it goes up over time. Note that, should your node ever go offline for a long period, you'll start gradually losing your deposit until you are removed from the system.
Open another terminal window. Enter your Prysm directory and run the validator by issuing the following command:
cd prysmbazel run //validator
Congratulations, you are now running Ethereum 2.0 Phase 0!
To run the unit tests of our system, issue the command:
bazel test //...
To run our linter, make sure you have golangci-lint installed and then issue the command: