git clone https://github.com/Snapchain/node-launch.git
cd node-launch
Launch Erigon and Prysm to provide L1 RPC of Testnet Sepolia.
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"
Run the following command to avoid permission issue like this
sudo chown 1000:1000 <ERIGON_DATA_DIR>
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>