# How to join the Verkle Devnet *Update (12/3/2024): Change to verkle-gen-devnet-4* ## 👋 Intro This guide will demonstrate how to setup nodes on the Verkle testnet (verkle-gen-devnet-4). Please note that the current verkle testnets change very frequently, so some configurations may be outdated. However, the overall setup flow should look pretty much the same. ## ⚙️ Preparation #### 1. Clone repository ```bash git clone https://github.com/ethpandaops/verkle-devnets/ ``` We will need the configuration and genesis files from the above repository later. #### 2. Create directories ```bash mkdir consensus execution ``` We will handle the consensus client and the execution client in their respective folder later. #### 3. Generate JWT token ```bash openssl rand -hex 32 | tr -d "\n" > "jwt.hex" ``` The JWT token is needed to authenticate the HTTP connection between the consensus client and execution client. By now, your folder should have the following structure: ``` ├── consensus ├── execution ├── jwt.hex └── verkle-devnets ``` ## 🔵 Consensus Client (Lighthouse) As of writing this guide, only Lighthouse and Lodestar have supported the Verkle Testnet. Here, we will use Lighthouse. First, go into the consensus client folder: ```bash cd consensus ``` #### 1. Clone repository ```bash git clone -b verkle-trees-capella https://github.com/macladson/lighthouse ``` #### 2. Build the binary Follow the [official guide](https://lighthouse-book.sigmaprime.io/installation-source.html) to build the lighthouse binary. #### 3. Run consensus client ```bash /root/.cargo/bin/lighthouse beacon_node \ --datadir /home/eth-verkle/consensus/lighthouse/data-seed \ --testnet-dir /home/eth-verkle/verkle-devnets/network-configs/gen-devnet-4 \ --boot-nodes "enr:-Iq4QF2WB38aEbYwA-zuXk-yZQgTsLmx7cKe8eJ_7jY4CL_eFzOD694n37UCigxi0obDpK0YVInLNK3bxyjQX_Kfuq-GAYwBEDLMgmlkgnY0gmlwhICMaGCJc2VjcDI1NmsxoQJJ3h8aUO3GJHv-bdvHtsQZ2OEisutelYfGjXO4lSg8BYN1ZHCCIyk" \ --execution-endpoint "http://localhost:8551" \ --jwt-secrets "/home/eth-verkle/jwt.hex" \ --metrics ``` Some notes: - `--testnet-dir`: This points to the `network-configs/gen-devnet-4` folder of the `verkle-devnets` repository that you have cloned [just now](#1-Clone-repository). - `--boot-nodes`: Refer to this [file](https://github.com/ethpandaops/verkle-devnets/blob/master/network-configs/gen-devnet-4/bootstrap_nodes.txt). If you need more details on all flags, do `/root/.cargo/bin/lighthouse --help`. You should see something like this when you start the node: ``` Nov 26 12:55:59.572 INFO Logging to file path: "/home/eth-verkle/consensus/lighthouse/data-seed/beacon/logs/beacon.log" Nov 26 12:55:59.573 INFO Lighthouse started version: Lighthouse/v4.5.0-2ffb8a9 Nov 26 12:55:59.573 INFO Configured for network name: custom (/home/eth-verkle/verkle-devnets/network-configs/gen-devnet-4) Nov 26 12:55:59.574 INFO Data directory initialised datadir: /home/eth-verkle/consensus/lighthouse/data-seed Nov 26 12:55:59.574 INFO Deposit contract address: 0x6f22ffbc56eff051aecf839396dd1ed9ad6bba9d, deploy_block: 0 Nov 26 12:55:59.671 INFO Starting from known genesis state service: beacon Nov 26 12:55:59.738 INFO Block production enabled method: json rpc via http, endpoint: Auth { endpoint: "http://localhost:8551/", jwt_path: "/home/eth-verkle/jwt.hex", jwt_id: None, jwt_version: None } ... ``` ## 🟢 Execution Client (Geth) As of writing this guide, only geth supports Verkle Testnet. First, go into the execution client folder: ```bash cd execution ``` #### 1. Clone repository ```bash git clone -b kaustinen-with-shapella https://github.com/gballet/go-ethereum ``` #### 2. Build the binary ```bash cd go-ethereum make geth ``` #### 3. Init genesis ```bash ./build/bin/geth init --datadir node /home/eth-verkle/verkle-devnets/network-configs/gen-devnet-4/genesis.json ``` We are using the `genesis.json` file that is included in the `verkle-devnets` repository. #### 4. Run execution client ```bash ./build/bin/geth --datadir node \ --networkid=69420 --http --http.api "net,eth,debug,engine,web3" \ --ws --ws.api "net,eth,debug,engine,web3" \ --http.corsdomain "*" \ --syncmode full \ --authrpc.addr=0.0.0.0 \ --authrpc.vhosts "*" \ --authrpc.jwtsecret "/home/eth-verkle/jwt.hex" \ --bootnodes="enode://3cc0be5b2cd2831b938525198885783c250b2345e16e41d9116f1a15e4584a4703868bc5013072d7125d6ef07579903105e96d666c08531c1e0f0c3acbe92f0c@78.47.30.10:30303?discport=30303" \ --metrics \ --metrics.addr 0.0.0.0 \ ``` You should see something like this: ```bash= INFO [11-28|10:17:22.650] Starting Geth on Ethereum mainnet... INFO [11-28|10:17:22.650] Bumping default cache on mainnet provided=1024 updated=4096 INFO [11-28|10:17:22.650] Enabling metrics collection INFO [11-28|10:17:22.650] Enabling stand-alone metrics HTTP endpoint address=0.0.0.0:6060 INFO [11-28|10:17:22.650] Starting metrics server addr=http://0.0.0.0:6060/debug/metrics INFO [11-28|10:17:22.657] Maximum peer count ETH=50 LES=0 total=50 INFO [11-28|10:17:22.659] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory" INFO [11-28|10:17:22.665] Set global gas cap cap=50,000,000 INFO [11-28|10:17:22.667] Initializing the KZG library backend=gokzg INFO [11-28|10:17:22.878] Allocated trie memory caches clean=614.00MiB dirty=1024.00MiB INFO [11-28|10:17:22.878] Using pebble as the backing database INFO [11-28|10:17:22.878] Allocated cache and file handles database=/home/eth-verkle/execution/data-seed/node/geth/chaindata cache=2.00GiB handles=524,288 INFO [11-28|10:17:22.942] Opened ancient database database=/home/eth-verkle/execution/data-seed/node/geth/chaindata/ancient/chain readonly=false INFO [11-28|10:17:22.946] Initialising Ethereum protocol network=1 dbversion=<nil> INFO [11-28|10:17:22.952] INFO [11-28|10:17:22.952] --------------------------------------------------------------------------------------------------------------------------------------------------------- INFO [11-28|10:17:22.953] Chain ID: 69420 (unknown) INFO [11-28|10:17:22.953] Consensus: unknown INFO [11-28|10:17:22.953] INFO [11-28|10:17:22.953] Pre-Merge hard forks (block based): INFO [11-28|10:17:22.953] - Homestead: #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/homestead.md) INFO [11-28|10:17:22.953] - Tangerine Whistle (EIP 150): #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/tangerine-whistle.md) INFO [11-28|10:17:22.953] - Spurious Dragon/1 (EIP 155): #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/spurious-dragon.md) INFO [11-28|10:17:22.953] - Spurious Dragon/2 (EIP 158): #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/spurious-dragon.md) INFO [11-28|10:17:22.953] - Byzantium: #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/byzantium.md) INFO [11-28|10:17:22.953] - Constantinople: #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/constantinople.md) INFO [11-28|10:17:22.953] - Petersburg: #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/petersburg.md) INFO [11-28|10:17:22.953] - Istanbul: #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/istanbul.md) INFO [11-28|10:17:22.953] - Berlin: #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/berlin.md) INFO [11-28|10:17:22.953] - London: #0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/london.md) INFO [11-28|10:17:22.953] INFO [11-28|10:17:22.953] Merge configured: INFO [11-28|10:17:22.953] - Hard-fork specification: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md INFO [11-28|10:17:22.953] - Network known to be merged: true INFO [11-28|10:17:22.953] - Total terminal difficulty: 0 INFO [11-28|10:17:22.953] - Merge netsplit block: #0 INFO [11-28|10:17:22.953] INFO [11-28|10:17:22.953] Post-Merge hard forks (timestamp based): INFO [11-28|10:17:22.953] - Shanghai: @0 (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md) INFO [11-28|10:17:22.953] - Prague: @1700825700 INFO [11-28|10:17:22.953] INFO [11-28|10:17:22.953] --------------------------------------------------------------------------------------------------------------------------------------------------------- INFO [11-28|10:17:22.953] INFO [11-28|10:17:22.954] Loaded most recent local block number=0 hash=0884fa..de45d7 td=1 age=3d22h42m ``` ## 📖 Resources Check out [verkle.info](https://verkle.info/) for the latest updates. If you need educational materials on Verkle Tree, you can refer to this [awesome-verkle](https://github.com/weiihann/awesome-verkle) repository.