Skip to content

Instantly share code, notes, and snippets.

@prestonvanloon
Forked from rauljordan/README.md
Last active December 5, 2019 00:27
Show Gist options
  • Save prestonvanloon/67573fc865cf99d3ea48ed196d48f59c to your computer and use it in GitHub Desktop.
Save prestonvanloon/67573fc865cf99d3ea48ed196d48f59c to your computer and use it in GitHub Desktop.
Run beacon chain

First, generate a JSON file of 64 unencrypted private keys in a common directory:

mkdir /tmp/keys
bazel run //tools/unencrypted-keys-gen -- --num-keys 64 --output-json /tmp/keys/val_1.json 

Then, run the Eth1-Mock-RPC server:

bazel run //:eth1-mock-rpc -- --genesis-deposits 64 --unencrypted-keys-dir /tmp/keys

Then, run a Prysm node:

bazel run //beacon-chain -- \
--no-genesis-delay \
--bootstrap-node= \
--deposit-contract 0x8687B025bf5B5378Aa6000a8a7ab0D24d13adB1e \
--web3provider ws://localhost:7778 \
--http-web3provider http://localhost:7777 \
--clear-db \
--datadir=/tmp/data \
--next

Next, attach the validators to the node

 bazel run //validator -- --unencrypted-keys /tmp/keys/val_1.json

Let the node run for a while and reach finality. Note the multiaddr format from the first node and use that when running the second node:

bazel run //beacon-chain -- \
--no-genesis-delay \
--bootstrap-node= \
--deposit-contract 0x8687B025bf5B5378Aa6000a8a7ab0D24d13adB1e \
--web3provider ws://localhost:7778 \
--http-web3provider http://localhost:7777 \
--clear-db \
--next \
--p2p-port 32302 \
--rpc-port 4001 \
--datadir=/tmp/data2 \
--peer MULTIADDRSTRING

The second node will now perform initial sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment