Status:
I’m on my Mac, getting the ephemery testnet running locally. Documenting steps here for future reference.
Ephemery
Download the latest Ephemery release from https://github.com/ephemery-testnet/ephemery-genesis/releases
(testnet-all.tar.gz)
Extract all files with tar -xzf testnet-all.tar.gz
Next up: download the client pair to run on Ephemery.
Geth (EL)
Verify file is correct on Mac with md5 geth-darwin-amd64-1.12.0-e501b3b0.tar.gz
This will output an MD5 hash which can be compared to the one provided.
Result:
MD5 (geth-darwin-amd64-1.12.0-e501b3b0.tar.gz) = 26d72e758f54dff126702adf50bdfb79
This is the correct result and I can proceed.
Extract contents with tar -xyf geth-darwin-amd64-1.12.0-e501b3b0.tar.gz
Nethermind (EL) https://downloads.nethermind.io/
Verify file is correct on Mac with md5 nethermind-1.20.1-9f39c0c7-macos-arm64.zip
This will output an MD5 hash which can be compared to the one provided.
Result:
MD5 (nethermind-1.20.1-9f39c0c7-macos-arm64.zip) = 23c63520f4aad7a44f256f4eb05d829d
This is the correct result and I can proceed.
[Note: can also use sha256 on Mac as follows:
shasum -a 256 nethermind-1.20.1-9f39c0c7-macos-arm64.zip
]
Lodestar (CL)
Lodestar doesn’t provide a prebuilt binary, so we must build from source - see https://chainsafe.github.io/lodestar/install/source/
Note: Lodestar is a monorepo comprising a number of packages, some of which are useful outside of the cli.
Clone the repo and cd into the project directory
Run yarn
(note: needs node >= v18.15.0) at root level
Then yarn run build
to build the source code
unstable
branch for Lodestar? The installation guidance refers to stable
…In the ephemery testnet directory, grab the testnet chainId:
cat genesis.json | head -n 30
This gives the chainId 39438086
We’ll also need to grab some other env vars so let’s make sure the ephemery config is visible in terminal:
cat config.yaml
A shared JWT secret is needed for the execution client and Lodestar to have a secure connection via port 8551. openssl rand -hex 32 | tr -d "\n" > “/tmp/jwtsecret”
——————
Initialize Geth
Inside the geth directory, I ran
./geth --datadir ../gethData init ../ephemery/genesis.json
❗ Must specify datadir at init, or make sure to use the default path when starting geth below otherwise geth will not be correctly initialized ❗
This wrote Geth’s genesis state based on ephemery.
Get env_vars from ephemery
We can see CHAIN_ID, BOOTNODE_ENR, BOOTNODE_ENODE in this file, among other variables.
cat ephemery/nodevars_env.txt
Start Geth
See https://github.com/ephemery-testnet/ephemery-scripts/blob/6612411587af1939f306d5605a273de69ea5034e/cloud-config/fullnode-geth-lodestar.yaml#L59C25-L59C145 for help on inputs!
[In geth directory]
✅ ./geth --datadir ../gethData --port 30303 --http --http.addr 0.0.0.0 --http.port 8545 --http.api eth,net,personal,web3 --ws --ws.addr 0.0.0.0 --ws.port 8546 --ws.api eth,net,personal,web3 --authrpc.jwtsecret=/tmp/jwtsecret --syncmode=full --bootnodes "enode://0f2c301a9a3f9fa2ccfa362b79552c052905d8c2982f707f46cd29ece5a9e1c14ecd06f4ac951b228f059a43c6284a1a14fce709e8976cac93b50345218bf2e9@135.181.140.168:30343" --networkid 39438086
——————
Lodestar
More installation guidance at https://lodestar.chainsafe.io/#install => https://hackmd.io/@philknows/HkROkZW55
https://chainsafe.github.io/lodestar/reference/cli/
https://chainsafe.github.io/lodestar/usage/local/
.env
Start Lodestar
[In Lodestar directory] note: uses BOOTNODE_ENR_LIST
✅ ./lodestar beacon --dataDir=../lodestarData --paramsFile=../ephemery/config.yaml --genesisStateFile=../ephemery/genesis.ssz --eth1.depositContractDeployBlock=0 --network.connectToDiscv5Bootnodes=true --discv5=true --eth1=true --eth1.providerUrls=http://localhost:8545 --execution.urls=http://localhost:8551 --rest=true --rest.address=0.0.0.0 --rest.port=4000 --bootnodes="enr:-Iq4QNMYHuJGbnXyBj6FPS2UkOQ-hnxT-mIdNMMr7evR9UYtLemaluorL6J10RoUG1V4iTPTEbl3huijSNs5_ssBWFiGAYhBNHOzgmlkgnY0gmlwhIlKy_CJc2VjcDI1NmsxoQNULnJBzD8Sakd9EufSXhM4rQTIkhKBBTmWVJUtLCp8KoN1ZHCCIyk,enr:-Iq4QIc297-de1P6hznMX2cIdVsQkve9BD9NUsJ7vVQa7eh5UpekA9rLid5A-yLiS3gZwOGugYZPi58x76zNs2cEQFCGAYhBJlTYgmlkgnY0gmlwhEFtmi6Jc2VjcDI1NmsxoQJDyix-IHa_mVwLBEN9NeG8I-RUjNQK_MGxk9OqRQUAtIN1ZHCCIyg,enr:-Ly4QH8GrTqs0XF1UWwg8E6okU8Gs2hXeG-RiMlQ_X0qwVuYe-PxsAU-GAarI2_YknauLRKmj0-wh2pSWC6JqYbQNDYBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpBFv17XQAAQG___________gmlkgnY0gmlwhIe1jKiJc2VjcDI1NmsxoQI9CPbTH3VqDH5KKgLX5w5yXEuYNE8cKIiKBMnIRE1lpohzeW5jbmV0cwCDdGNwgiNQg3VkcIIjUA" --jwt-secret=/tmp/jwtsecret
🆘 TODO: Fix warnings & errors
Geth: runs but with the following warnings even after Lodestar starts
WARN [08-05|16:09:08.897] Post-merge network, but no beacon client seen. Please launch one to follow the chain!
WARN [08-05|16:24:38.270] Snapshot extension registration failed peer=05180ebe err="peer connected on snap without compatible eth support"
Lodestar: runs fine afterwards
warn: Initializing from a stale db state vulnerable to long range attacks slot=0, epoch=0, stateRoot=0x3e3e60e1b96cb9ef05c056d4c1ea0d2a6963259616b6b26aa25ce4c1ecfd589e, isWithinWeakSubjectivityPeriod=false
warn: Checkpoint sync recommended, please use --help to see checkpoint sync options
info: PeerId 16Uiu2HAmUF7JDdnR7x7McUGjCmUseMZTRJ94zKQkYvEuNFVCxEpA, Multiaddrs /ip4/0.0.0.0/tcp/9000
error: Discv5 worker sent enr without tcp multiaddr enr=enr:-Iq4QNMYHuJGbnXyBj6FPS2UkOQ-hnxT-mIdNMMr7evR9UYtLemaluorL6J10RoUG1V4iTPTEbl3huijSNs5_ssBWFiGAYhBNHOzgmlkgnY0gmlwhIlKy_CJc2VjcDI1NmsxoQNULnJBzD8Sakd9EufSXhM4rQTIkhKBBTmWVJUtLCp8KoN1ZHCCIyk
error: Discv5 worker sent enr without tcp multiaddr enr=enr:-Iq4QIc297-de1P6hznMX2cIdVsQkve9BD9NUsJ7vVQa7eh5UpekA9rLid5A-yLiS3gZwOGugYZPi58x76zNs2cEQFCGAYhBJlTYgmlkgnY0gmlwhEFtmi6Jc2VjcDI1NmsxoQJDyix-IHa_mVwLBEN9NeG8I-RUjNQK_MGxk9OqRQUAtIN1ZHCCIyg
info: Started REST API server address=http://0.0.0.0:4000
warn: REST API server is exposed, ensure untrusted traffic cannot reach this API
warn: Low peer count peers=0
info: Searching peers - peers: 0 - slot: 63666 - head: 0 0x8673…3726 - exec-block: valid(0 0x339b…) - finalized: 0x0000…0000:0
info: discv5 worker started peerId=16Uiu2HAmUF7JDdnR7x7McUGjCmUseMZTRJ94zKQkYvEuNFVCxEpA, initialENR=enr:-IO4QDle11ccVU1RFPlsnMDoMhqxBJh_pPxOhhUIqYTslYZ2aLhh3CZ7hhC1dbDanLX7ucllUfS6LIg8hsPWPf2FyZYHgmlkgnY0iXNlY3AyNTZrMaED55zoDXzQ9PUKwD6boCQ67HX1nXMmpyDkvupPA76Gl0uDdGNwgiMog3VkcIIjKA, bindAddr4=/ip4/0.0.0.0/udp/9000
VALIDATOR SERVICE
❔./lodestar validator --dataDir=../dataLodestar --paramsFile=../ephemery/config.yaml --server http://localhost:4000 --keystoresDir=/tmp/data-keys/keys --secretsDir=/tmp/data-keys/secrets --graffiti “hol” --suggested-fee-recipient 0x14627ea0e2B27b817DbfF94c3dA383bB73F8C30b