Add reth stack #435

Merged
iskay merged 3 commits from reth into main 2023-06-28 18:22:59 +00:00
9 changed files with 158 additions and 0 deletions
Showing only changes of commit b120682d8e - Show all commits

View File

@ -0,0 +1,35 @@
version: "3.8"
services:
reth:
restart: unless-stopped
hostname: reth
image: cerc/reth:local
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-reth.sh"]
volumes:
- ../config/reth/start-reth.sh:/docker-entrypoint-scripts.d/start-reth.sh
- reth_data:/root/.local/share/reth
- shared_data:/root/.shared_data
ports:
- "8545:8545" # http rpc
- "8546:8546" # ws rpc
- "30303:30303" # network listening port
- "30303:30303/udp"
- "8551" # consensus auth
lighthouse:
restart: unless-stopped
hostname: lighthouse
image: cerc/lighthouse:local
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-lighthouse.sh"]
volumes:
- ../config/reth/start-lighthouse.sh:/docker-entrypoint-scripts.d/start-lighthouse.sh
- lighthouse_data:/root/.lighthouse/mainnet
- shared_data:/root/.shared_data
ports:
- "8001"
volumes:
reth_data:
lighthouse_data:
shared_data:

View File

@ -0,0 +1,16 @@
#!/bin/bash
# Wait for reth container to create jwt auth token
while [ ! -f /root/.shared_data/jwt.hex ]; do
echo "Jwt auth token not found, sleeping for 5s..."
sleep 5
done
echo "Jwt token found. Starting Lighthouse..."
export RUST_LOG=info
lighthouse bn \
--network mainnet \
--execution-endpoint http://reth:8551 \
--execution-jwt /root/.shared_data/jwt.hex \
--checkpoint-sync-url https://mainnet.checkpoint.sigp.io \
--disable-deposit-contract-sync

View File

@ -0,0 +1,24 @@
#!/bin/bash
# generate jwt token for reth/lighthouse authentication
echo "Installing OpenSSL..."
apt update
apt install openssl
echo "Generating jwt token for lighthouse auth..."
openssl rand -hex 32 | tr -d "\n" | tee /root/.shared_data/jwt.hex
# start reth
echo "Starting Reth..."
export RUST_LOG=info
reth node \
--authrpc.jwtsecret /root/.shared_data/jwt.hex \
--authrpc.addr 0.0.0.0 \
--authrpc.port 8551 \
--http \
--http.addr 0.0.0.0 \
--http.corsdomain * \
--http.api eth,web3,net,rpc \
--ws \
--ws.addr 0.0.0.0 \
--ws.origins * \
--ws.api eth,web3,net,rpc

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build cerc/go-opera
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
docker build -t cerc/reth:local ${build_command_args} ${CERC_REPO_BASE_DIR}/reth

View File

@ -42,3 +42,4 @@ cerc/ipld-eth-state-snapshot
cerc/watcher-gelato
cerc/lotus
cerc/go-opera
cerc/reth

View File

@ -29,3 +29,4 @@ watcher-azimuth
watcher-gelato
fixturenet-lotus
mainnet-go-opera
reth

View File

@ -35,3 +35,4 @@ github.com/cerc-io/gelato-watcher-ts
github.com/filecoin-project/lotus
git.vdb.to/cerc-io/test-project
github.com/Fantom-foundation/go-opera
github.com/paradigmxyz/reth

View File

@ -0,0 +1,65 @@
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
# Reth
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Deploy a Reth API node alongside Lighthouse.
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
## Clone required repositories
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
$ laconic-so --stack reth setup-repositories
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
## Build the fixturenet-eth containers
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
$ laconic-so --stack reth build-containers
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
## Deploy the stack
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
$ laconic-so --stack reth deploy up
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
## Check logs
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
$ laconic-so --stack reth deploy logs
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Verify that your node is syncing. You should see entries similar to this from the Lighthouse container:
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
laconic-200e8f8ff7891515d777cd0f719078e3-lighthouse-1 | Jun 23 20:59:01.226 INFO New block received root: 0x9cd4a2dd9333cf802c2963c2f029deb0f94e511d2481fa0724ae8752e4c49b15, slot: 6727493
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
and entries similar to this from the Reth container:
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
laconic-200e8f8ff7891515d777cd0f719078e3-reth-1 | 2023-06-23T20:59:11.557389Z INFO reth::node::events: Stage committed progress pipeline_stages=1/13 stage=Headers block=0 checkpoint=4.9% eta=1h 3m 57s
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
## Test the API
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Reth's http api is accessible on port `8545` and the websocket api is accessible on port `8546`.
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
$ curl --request POST \
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
--url http://localhost:8545/ \
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
--header 'Content-Type: application/json' \
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
--data '{
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
"jsonrpc": "2.0",
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
"method": "eth_blockNumber",
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
"params": [],
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
"id": 0
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
}'
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
# Response
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
{"jsonrpc":"2.0","result":"0x0","id":0}
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
## Clean up
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Stop all services running in the background:
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```bash
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
$ laconic-so --stack reth deploy down
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
To also delete the docker data volumes:
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
```bash
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed
$ laconic-so --stack reth deploy down --delete-volumes
Review

I assume this is a typo and it should be "Build the reth containers"

I assume this is a typo and it should be "Build the reth containers"
iskay commented 2023-06-26 12:42:29 +00:00 (Migrated from github.com)
Review

Correct, thanks... fixed

Correct, thanks... fixed

View File

@ -0,0 +1,10 @@
version: "1.1"
name: reth
decription: "Reth node"
repos:
- github.com/paradigmxyz/reth
containers:
- cerc/reth
- cerc/lighthouse
pods:
- reth