prysm-pulse/k8s/beacon-chain
Preston Van Loon 991ee7e81b "Super sync" and naive p2p reputation (#2550)
* checkpoint on super sync with reputation

* ensure handling only expected peers msg

* exclusive of finalized block

* skip block saved already

* clean up struct

* remove 2 more fields

* _

* everything builds, but doesnt test yet

* lint

* fix p2p tests

* space

* space

* space

* fmt

* fmt
2019-05-09 16:02:24 -05:00
..
beacon-chain.deploy.yaml "Super sync" and naive p2p reputation (#2550) 2019-05-09 16:02:24 -05:00
beacon-chain.service.yaml add production config for testnet release (#2493) 2019-05-05 14:04:28 -05:00
beacon-config.config.yaml Refactor Initial Sync, Enable Catching Up to Chain (#2111) 2019-04-03 10:13:19 -05:00
bootnode.deploy.yaml Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
bootnode.encrypted_secret.yaml Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
bootnode.service.yaml Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
BUILD.bazel Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
cluster-manager.encrypted_secret.yaml Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
cluster-manager.yaml set cluster manager to deposit 3.2 eth (#2416) 2019-04-28 17:23:03 -05:00
contract-address.yaml add nginx proxy caching in front of SSR (#2456) 2019-05-01 07:08:18 -07:00
infura.yaml use infura for now (#2140) 2019-04-01 21:41:31 -05:00
namespace.yaml k8s goerli config (#1517) 2019-02-08 15:30:38 -05:00
README.md Add README to beacon-chain k8s (#1966) 2019-03-17 08:49:25 -06:00
relay.deploy.yaml Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
relay.encrypted_secret.yaml Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
relay.service.yaml Faucet enhancements + cluster private key management system (#1679) 2019-03-07 11:14:57 -05:00
ssz-server.yaml SSZ web api for decoding input data (#2473) 2019-05-03 00:11:54 -05:00
testnet-site.yaml add path for prylabs.net/ssz (#2508) 2019-05-05 21:24:47 -07:00
validator.deploy.yaml Update rollout strategy for validators to 5% max unavailable with no surging (#2169) 2019-04-05 09:51:38 -05:00

Minikube setup for Beacon-chain and 8 Validators

Set up Kubernetes and Minikube

Make sure you have kubectl installed

https://kubernetes.io/docs/tasks/tools/install-minikube/

https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver

Configure Hyperkit as your default

minikube config set vm-driver hyperkit

Running the beacon chain and validators in Minikube

Start Minikube and the dashboard

minikube start --memory 4096

minikube dashboard

Set up the beacon-chain config

Deploy a new deposit contract with:

bazel run //contracts/deposit-contract/deployContract -- --httpPath=https://goerli.prylabs.net --privKey=$(cat /path/to/private/key/file) --chainStart=8 --minDeposit=100000 --maxDeposit=3200000 --customChainstartDelay 120

Place the Goerli network deposit contract address from above in k8s/beacon-chain/beacon-config.config.yaml

Apply the namespace and config yamls

cd k8s/
kubectl apply -f priority.yaml

cd beacon-chain/
kubectl apply -f namespace.yaml
kubectl apply -f beacon-config.config.yaml

Edit the beacon-chain.deploy.yaml to prepare it for a local instance

Change the lines 40-53 to:

  args:
    - --web3provider=ws://goerli.prylabs.com/websocket
    #- --verbosity=debug
    - --deposit-contract=$(DEPOSIT_CONTRACT_ADDRESS)
    - --rpc-port=4000
    - --monitoring-port=9090
#    - --bootstrap-node=/ip4/$(BOOTNODE_SERVICE_HOST)/tcp/$(BOOTNODE_SERVICE_PORT)/p2p/QmQEe7o6hKJdGdSkJRh7WJzS6xrex5f4w2SPR6oWbJNriw
#    - --relay-node=/ip4/35.224.249.2/tcp/30000/p2p/QmfAgkmjiZNZhr2wFN9TwaRgHouMTBT6HELyzE5A3BT2wK
    - --p2p-port=5000
    - --demo-config
#    - --enable-tracing
#    - --tracing-endpoint=http://jaeger-collector.istio-system.svc.cluster.local:14268
#    - --trace-sample-fraction=1.0
    - --datadir=/data

(commenting out the 3 tracing items and the bootstrap/relay nodes, also changing the web3 provider to ws://goerli.prylabs.com/websocket)

Apply the beacon chain yamls to start the beacon-chain

kubectl apply -f beacon-chain.service.yaml
kubectl apply -f beacon-chain.deploy.yaml

Go into the minikube dashboard and set your namespace to "beacon-chain" in the middle of the left side

You should see 3 beacon-chain node replicas

Add your private key into the cluster manger config

Convert a goerli private key with ETH to base64 in a browser js console and set it in k8s/beacon-chain/cluster-manager.encrypted_secret.yaml.

Edit the cluster-manager.yaml to use the Prylabs Goerli node endpoint

Change lines 55-63 to:

  args:
  - --deposit-contract=$(DEPOSIT_CONTRACT_ADDRESS)
  - --private-key=$(PRIVATE_KEY)
  - --rpc=ws://goerli.prylabs.com/websocket
  - --port=8000
  - --metrics-port=9090
  - --deposit-amount=3200000000000000
  - --db-path=/data
  - --verbose

Edit the validator.deploy.yaml to prepare it for a local instance

Change the lines 20-28 to:

  args:
  - --keystore-path=/keystore
  - --password=nopass
  - --datadir=/data
  - --beacon-rpc-provider=beacon-chain:4000
  - --demo-config
#  - --enable-tracing
#  - --tracing-endpoint=http://jaeger-collector.istio-system.svc.cluster.local:14268
#  - --trace-sample-fraction=1.0

(commenting out the bottom 3)

Apply the cluster manager and validator yamls

kubectl apply -f cluster-manager.encrypted_secret.yaml
kubectl apply -f cluster-manager.yaml
kubectl apply -f validator.deploy.yaml

Check the beacon-chain namespace in the dashboard and you should see 8 validators loading

Minikube common commands

To remove all the containers inside the minikube

kubectl delete -f k8s/beacon-chain/namespace.yaml

To stop the minikube instance

minikube stop

To delete the container

minikube delete