Skip to content

Snapchain/node-launch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

node-launch

git clone https://github.com/Snapchain/node-launch.git
cd node-launch

Overview

Launch Erigon and Prysm to provide L1 RPC of Testnet Sepolia.

Generate JWT token

The HTTP connection between the beacon node and execution node needs to be authenticated using a JWT token. Refer to the Prysm authentication for more details.

Use OpenSSL to create the token via command:

cd sepolia
openssl rand -hex 32 | tr -d "\n" > "jwt.hex"

Set up permission

Run the following command to avoid permission issue like this

sudo chown 1000:1000 <ERIGON_DATA_DIR>

Launch L1 node

docker compose up -d

To check logs:

docker compose logs

To test the HTTP JSON-RPC:

curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[], "id":1}' http://127.0.0.1:8545
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_chainID","params":[],"id":1}' http://127.0.0.1:8545
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x0", false],"id":1}' http://127.0.0.1:8545

To test the Beacon API:

curl -H "Content-Type: application/json" http://127.0.0.1:3500/eth/v1/beacon/headers

To convert hex number in the result to decimal, we can do printf "%d\n" 0x<xxx>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published