# Local Node

"Node" refers to a running piece of client software. A client is an implementation of Ethereum that verifies all transactions in each block, keeping the network secure and the data accurate.

In this guide we are going to use Geth as execution client, and Prysm as consensus client.

# Suggested Requirements

  • Software: Execution client, beacon node client (instructions for clients below), curl
  • OS: 64-bit Linux, Mac OS X 10.14+, Windows 10+ 64-bit
  • CPU: 4+ cores @ 2.8+ GHz
  • Memory: 16GB+ RAM
  • Storage: SSD with at least 2TB free space
  • Network: 8 MBit/sec broadband

# Why should I run an Ethereum Node?

Running a node allows you to trustlessly and privately use Ethereum while supporting the ecosystem. Also lately, providers like Alchemy have been kinda over-saturated and congested, from time to time, in our honest opinion.

# Benefits

Running your own node enables you to use Ethereum in a truly private, self-sufficient and trustless manner. You don't need to trust the network because you can verify the data yourself with your client. "Don't trust, verify" is a popular blockchain mantra.

  • Your node verifies all the transactions and blocks against consensus rules by itself. This means you don’t have to rely on any other nodes in the network or fully trust them.
  • You won't have to leak your addresses and balances to random nodes. Everything can be checked with your own client.
  • Your dapp can be more secure and private if you use your own node. Metamask, MyEtherWallet and some other wallets can be easily pointed to your own local node.

# Node types

# Full node -> fast / snap

  • Stores full blockchain data.
  • Participates in block validation, verifies all blocks and states.
  • All states can be derived from a full node.
  • Serves the network and provides data on request.

# Light node -> light

  • Stores the header chain and requests everything else.
  • Can verify the validity of the data against the state roots in the block headers.
  • Useful for low capacity devices, such as embedded devices or mobile phones, which can't afford to store gigabytes of blockchain data.

# Setup your Consensus Client (ETH2 Client)

To setup your Beacon client through Prysm, open terminal and navigate to a folder where you want to install your beacon client in, for example simply under C:\, then execute these commands through terminal:

  • mkdir prysm && cd prysm
  • curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.bat --output prysm.bat
  • reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1

This will download the Prysm client and update your registry to enable verbose logging. The HTTP connection between your beacon node and execution node needs to be authenticated using a JWT token. There are several ways to generate this JWT token, either:

  • Use an online generator like this. Copy and paste this value into a jwt.hex file.
  • Use a utility like OpenSSL to create the token via command: openssl rand -hex 32 | tr -d "\n" > "jwt.hex".
  • Use an execution client to generate the jwt.hex file.
  • Use Prysm to generate the jwt.hex file with: prysm.bat beacon-chain generate-auth-secret

Once done, Prysm will output a jwt.hex file path. You will be then required to link this file when running your Geth client.

# Setup your Execution Client (ETH1 Client)

  • Download GETH and install it.

Command to execute and edit according to your needs:

geth --syncmode "snap" --ws --ws.addr 0.0.0.0 --ws.port 8989 --http --http.addr 0.0.0.0 --http.port 8551 --http.corsdomain="chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn" --rpc.txfeecap "0" --cache=2048 --http.api eth,net,engine,admin --authrpc.jwtsecret "C:\path\to\jwt.hex"

  • You can change light with snap (it requires around 500gb of storage, but it's faster than light mode).
  • If it's properly working, it should keep importing new chain segment.
  • The node to be fully completed will take from 12-18 hours based on the performance of the PC for snap, way less (1 hour max, usually) with light node. It's recommended using snap only if you have a really powerful PC or on a server.
  • If you're running Finesser on the same computer hosting your local node, you simply add ws://127.0.0.1:8989 as RPC URL in settings. (depends on which port websocket connection is using. Keep in mind you could also customize the port with ws.port=7777 when executing your local node.)
  • In case you're running Finesser on another computer, you just need to replace 127.0.0.1 with the actual IP address of the computer hosting your node.
  • If you close the node remember to reactivate it at least 30+ minutes before a release because it will take some time before it restores, (the longer you kept it closed, the longer it will take for it to be complete if you using snap, as it's going to gather missing blocks to heal).

Syncing can take a long time - from hours to days. You can proceed to the next step while your execution node syncs.

Once it's synced and it says Post-merge network, but no beacon client seen. Please launch one to follow the chain! you are ready to run the beacon node, previously set up through Prysm, with this command, executed in your Prysm directory.

  • prysm.bat beacon-chain --execution-endpoint=http://127.0.0.1:8551 --jwt-secret="C:\path\to\jwt.hex"

If you wish to run a validator node (needs 32 ETH staked), you can then add another flag --suggested-fee-recipient your_wallet_address_here with a wallet address where you want to to earn what were previously miner transaction fee tips. See How to configure Fee Recipient for more information about this feature.

Your beacon node will now begin syncing. This usually takes a couple days, but it can take longer depending on your network and hardware specs. You can speed up this process with the checkpoint sync flags suggested above.

# Test and use your node

Once your ETH1 and ETH2 clients are fully synced, you can then simply add "http:ip:port" / "ws:ip:port" as RPC URL in your config.json to use your local node while running the Bot. Check RPC URL if you don't know how to change it.

config.json example
config.json example

synced geth prints example
synced geth prints example

synced prysm prints example
synced prysm prints example

Keep in mind to change 127.0.0.1 to your server address, if you are running the Bot through a different PC than your node.

To test if it's properly working, try to in-Bot check wallets balance. If balances are out-dated it means node is in a "heal" state. You should let the node heal for some time if so.