# EPF5 Week-3: Running nodes ## Week overview - [X] Learned node archtecture - [X] Installed Geth - [X] Installed Lighthouse - [X] Ran Holesky - [X] Ran Ephemery - [X] Collaborated with other EPF Fellows on using shared server This week, I learned about, downloaded, installed, and ran Ethereum nodes. Running nodes is crucial for my deep understanding of the Ethereum protocol. I successfully set up and ran Holesky and Ephemery locally on my machine. Additionally, I collaborated with Dan and Mercy on projects involving interaction with remote servers. We are currently in the process of adjusting access controls to development roles. ## Hardware requirements To run a full node, it is generally recommended to use at least 16GB of RAM and a 2TB SSD. Currently, I do not possess such hardware, so I plan to utilize a remote server for this purpose. In addition, I will install Ephemery on my local machine for testing. An ephemeral testnet is a single network that rolls back to the genesis after a set period of time. This kind of network is focused on short term and heavy testing usecases. ## Installing clients and running a node The materials that significantly aided my practice were a video from EPF Study Group [Running a node](https://www.youtube.com/watch?v=KxXowOZ2DLs&t=4885s) by Mario Havel. I followed it step by step and also used clients guides. Geth's documentation, especially its clear explanations of node architecture, really helped me understand better. Additionally, I found the [ Running node guide](https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/) by Ethereum Docs to be very helpful. ### Installing Geth Download the Geth binary, its signature, and an OpenPGP key from the [Geth Downloads](https://geth.ethereum.org/downloads) page. When obtaining the binary, verify its authenticity using the provided keys and signatures. This step is crucial for security reasons, especially important when running a validator and dealing with real ETH deposits. Alternatively, you can compile the binary yourself. Import the key: ``` gpg --import <key-filename>.asc ``` Verify the signature: ``` gpg --verify geth-darwin-amd64-1.14.5-0dd173a7.tar.gz.asc ``` The fingerprints from the terminal and the download page should match: ![Screenshot 2024-06-30 at 17.55.51](https://hackmd.io/_uploads/rJXxXeyDR.png) ![Screenshot 2024-06-30 at 17.56.41](https://hackmd.io/_uploads/BkTGmgJD0.png) ### Installing Lighthouse Download Lighthouse binary from [Ligthouse releases](https://github.com/sigp/lighthouse/releases). To verify Lighthouse binary, I installed Sigma Prime public key and ran verification: ``` gpg --recv-keys <sigma-prime-public-key> gpg --verify lighthouse-v5.2.1-x86_64-apple-darwin.tar.gz.asc ``` ### Creating jwt Create a jwt in some secret folder: ``` openssl rand -hex 32 > jwtsecret ``` ### Running a node Let's run Holesky testnet starting from running Geth: ``` geth --holesky \ --datadir "<path-to-data-folder>" \ --syncmode snap \ --http --authrpc.addr localhost \ --authrpc.vhosts="localhost" \ --authrpc.port 8551 \ --authrpc.jwtsecret <path-to-jwt-file> \ --http ``` In this example, I am running the beacon node without running the validator client, which is suitable for non-staking purposes such as supporting the network. Run Lighthouse: ``` ./lighthouse beacon_node \ --network holesky \ --datadir <path-to-data-folder> \ --http \ --execution-endpoint http://127.0.0.1:8551 \ --execution-jwt <path-to-jwt-file> \ --checkpoint-sync-url <checkpoint-sync-endpoint> \ --disable-deposit-contract-sync ``` You can find checkpoint-sync-endpoints [here](https://eth-clients.github.io/checkpoint-sync-endpoints/#sepolia). Here is an example of running a node locally: ![Screenshot 2024-06-30 at 21.02.57](https://hackmd.io/_uploads/ry5zCz1vA.png) ## Ephemery testnet Ephemery is a temporary network that is reset or rolled back to its initial state (the genesis block) after a certain period. This type of network is designed for short-term, intensive testing scenarios, allowing developers and testers to experiment with new features. You can find all the details on running Ephemery testnet [here](https://github.com/ephemery-testnet/ephemery-resources). Download the latest release [here](https://github.com/ephemery-testnet/ephemery-genesis/releases/). The initial info is in the genesis.json file: ``` cat genesis.json ``` You will see this: ![Screenshot 2024-06-30 at 21.21.08](https://hackmd.io/_uploads/HJ-Bz7JvC.png) Initialize geth genesis: ``` ./geth --datadir ephemery-data init <path-to-genesis.json> ``` Values and varisable are in the `nodevars_env.txt` file: ``` cat nodevars_env.txt ``` ![Screenshot 2024-06-30 at 21.35.20](https://hackmd.io/_uploads/Bkstr71P0.png) Copy variables into the shell: ``` source nodevars_env.txt ``` ![Screenshot 2024-06-30 at 21.38.06](https://hackmd.io/_uploads/HJDSUQ1D0.png) Run Ephemery Geth: ``` geth \ --datadir ephemery-data \ --authrpc.jwtsecret=<path-to-jwt-file> \ --bootnodes $BOOTNODE_ENODE ``` ![Screenshot 2024-06-30 at 22.08.26](https://hackmd.io/_uploads/SkuL67kPR.png) Run Lighthouse: ``` ./lighthouse bn \ -t ../ephemery \ --execution-endpoint http://localhost:8551 \ --execution-jwt=<path-to-jwt-file> ``` The result: ![Screenshot 2024-06-30 at 22.19.54](https://hackmd.io/_uploads/BJBKlNJwR.png) ## Weekly EPF Activity - **EPF5 Standup** - **EPF5 Office Hours** Cohort 4 fellows Agnish and Advaita Saha shared their EPF experience, joining Nimbus team and working on cryptography libs. - [PeerDAS Breakout Room #2](https://youtu.be/5U79hZOH4Uw) [Github issue #1070](https://github.com/ethereum/pm/issues/1070) Peerdas-devnet-1. Specs discusson: blob max limit, get_extended_sample_count. - [ACDC #136](https://www.youtube.com/live/T-w5dzte36c) [Github issue #1084](https://github.com/ethereum/pm/issues/1084) Nethermind research team presentation on improving data on client divirsity. Discussing Pectra Devnet 1. PeerDAS: blob gas limit. SSZ updates. ## TODO - [ ] Run a validator in Ephemery - [ ] Run another pair of EL+CL - [ ] Continue diving into Kurtosis - [ ] Run tests on PeerDas ## Links [epf.wiki Nodes Workshop by Mario](https://epf.wiki/#/eps/nodes_workshop) [Youtube tutorial on running a validator node by Radek](https://www.youtube.com/watch?v=23mx4wvE2_4) [Geth Docs](https://geth.ethereum.org/docs/getting-started) [Lighthouse Docs](https://lighthouse-book.sigmaprime.io/intro.html) [Ephemery.dev](https://ephemery.dev/) [Ephemery testnet](https://github.com/ephemery-testnet/ephemery-resources) [Ephemery project: An ephemeral testnet](https://ethereum-magicians.org/t/ephemery-project-an-ephemeral-testnet/11955) [Ephemery launchpad](https://ephemery.launchpad.remyroy.com/en/overview)