# Node setup guide for Beverly Hills testnet Please use the teku-geth combination as its been the most stable option for verkle testnets. There are two options to setup the nodes: 1. With Docker 2. With binary builds I will elaborate each option in this guide. # Preparation - Download the configs from [here](https://github.com/ethpandaops/verkle-testnet/tree/main/beverly-hills-testnet/custom_config_data) ``` git clone https://github.com/ethpandaops/verkle-testnet.git cd beverly-hills-testnet/custom_config_data ``` - Generate the JWT secret with `openssl rand -hex 32 | tr -d "\n" > "/tmp/jwtsecret"`. This file needs to be passed to both the Execution Client and the Consensus Client. # Setup with docker In the `beverly-hills-testnet` folder, run: ``` docker run --name=geth --volume=$PWD/eldata:/eldata:rw --volume=$PWD/custom_config_data:/networkdata:rw --volume=/tmp/jwtsecret:/jwtsecret:rw --network=host parithoshj/geth:fix-beverly-hills-v0.2-c65f6b0 --datadir=/eldata --networkid=90210 --http --http.api net,eth,debug,engine,web3 --http.port 8545 --http.addr 0.0.0.0 --http.corsdomain '*' '--http.vhosts=*' --ws --ws.api net,eth --ws.port=8546 --ws.addr 0.0.0.0 --authrpc.port=8551 --authrpc.addr=0.0.0.0 '--authrpc.vhosts=*' --authrpc.jwtsecret=/jwtsecret --syncmode=full --bootnodes="enode://80485311e1f22ab86630db23d5d77b7c67d535c7c2aa6df99f10b63250602b230093143b49b40640b227b97eb226c01eaed5a4eb5d66349d78371515b243f4cb@134.122.74.110:30303" ``` Followed by: ``` docker run --name=beacon --env='JAVA_OPTS=-XX:SoftMaxHeapSize=2g -Xmx3g' --env=JAVA_HOME=/opt/java/openjdk --volume=$PWD/beacon:/beacondata:rw --volume=$PWD/custom_config_data:/custom_config_data:rw --volume=/tmp/jwtsecret:/jwtsecret:rw --network=host consensys/teku:22.12.0 --network=/custom_config_data/config.yaml --initial-state=/custom_config_data/genesis.ssz --data-path=/beacondata --data-storage-mode=PRUNE --p2p-enabled=true --p2p-port=9000 --p2p-advertised-port=9000 --logging=info --p2p-peer-upper-bound=25 --ee-endpoint=http://127.0.0.1:8560 --p2p-discovery-bootnodes=enr:-Iq4QJk4WqRkjsX5c2CXtOra6HnxN-BMXnWhmhEQO9Bn9iABTJGdjUOurM7Btj1ouKaFkvTRoju5vz2GPmVON2dffQKGAX53x8JigmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk --ee-jwt-secret-file=/jwtsecret ``` # Setup with source build ### Geth We need to download and install geth Pre-requisites: `git`, `make`, `go`, `gcc`. (use geth branch `beverly-hills-head` from github.com/gballet/go-ethereum) ``` git clone -b beverly-hills-head https://github.com/gballet/go-ethereum.git cd go-ethereum make geth cd .. ``` In the `beverly-hills-testnet/custom_config_data` folder: ``` ./go-ethereum/build/bin/geth --datadir "geth-datadir" init genesis.json ./go-ethereum/build/bin/geth --datadir "geth-datadir" --http --http.api="net,eth,debug,engine,web3" --ws --ws.api="net,eth,debug,engine,web3" --http.corsdomain="*" --networkid=90210 --syncmode=full --authrpc.addr=0.0.0.0 --authrpc.vhosts="*" --authrpc.jwtsecret=/tmp/jwtsecret --bootnodes="enode://80485311e1f22ab86630db23d5d77b7c67d535c7c2aa6df99f10b63250602b230093143b49b40640b227b97eb226c01eaed5a4eb5d66349d78371515b243f4cb@134.122.74.110:30303" ``` ## Teku Ensure Java 11 or above is installed (Ubuntu: `sudo apt install default-jre`). ``` git clone https://github.com/ConsenSys/teku.git cd teku ./gradlew installDist cd .. ``` The teku executable is now available in `./teku/build/install/teku/bin/teku`. You can also use the [pre-built distribution](https://artifacts.consensys.net/public/teku/raw/names/teku.tar.gz/versions/develop/teku-develop.tar.gz) or the `consensys/teku:develop` docker image. In the `beverly-hills-testnet/custom_config_data` folder: ``` ./teku/build/install/teku/bin/teku \ --data-path "datadir-teku" \ --network=/custom_config_data/config.yaml \ --initial-state=/custom_config_data/genesis.ssz \ --p2p-enabled=true \ --ee-endpoint=http://localhost:8551 \ --ee-jwt-secret-file "/tmp/jwtsecret" \ --p2p-discovery-bootnodes=enr:-Iq4QJk4WqRkjsX5c2CXtOra6HnxN-BMXnWhmhEQO9Bn9iABTJGdjUOurM7Btj1ouKaFkvTRoju5vz2GPmVON2dffQKGAX53x8JigmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIy ``` ## Lighthouse Minimum requirement: rustc 1.59.0 Clone and build from source (use branch stable) ``` git clone -b stable https://github.com/sigp/lighthouse.git cd lighthouse make cd .. ``` Start the client ``` lighthouse --debug-level="info" --datadir "datadir-teku" --testnet-dir="/custom_config_data" bn --disable-enr-auto-update --eth1 --boot-nodes="enr:-Iq4QJk4WqRkjsX5c2CXtOra6HnxN-BMXnWhmhEQO9Bn9iABTJGdjUOurM7Btj1ouKaFkvTRoju5vz2GPmVON2dffQKGAX53x8JigmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIy" --execution-endpoint=http://localhost:8551 --jwt-secrets="/tmp/jwtsecret" ```