How to deploy a private PoS Ethereum with Geth and Prysm.
SPEC and usage
1 | curl localhost:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":0}' | jq |
Beacon-api,可采用curl发请求,类似执行层客户端进行调用
1 | curl http://localhost:3500/eth/v1/node/syncing | jq |
Run on mainnet
Clients: Geth and Prysm
Tutorial: https://docs.prylabs.network/docs/install/install-with-script
1 | ./geth --mainnet --http --http.api eth,net,engine,admin --authrpc.jwtsecret=../jwt.hex |
Try to sync a beacon node from checkpoint, and sync chain & state in Geth, will take a few hours.
Warnings from Prysm, validator related.
1 | node: In order to receive transaction fees from proposing blocks, you must provide flag --suggested-fee-recipient with a valid ethereum address when starting your beacon node. Please see our documentation for more information on this requirement (https://docs.prylabs.network/docs/execution-node/fee-recipient). |
Check status
Tutorial: https://docs.prylabs.network/docs/monitoring/checking-status
检查共识层客户端的同步是否完成
1 | curl http://localhost:3500/eth/v1/node/syncing | jq |
共识层客户端已经同步完成,但是和执行层客户端未连通
检查执行层客户端的同步是否完成
1 | ./geth attach |
chain download 70%
state 已经下载完毕
Private testnet via prysm tutorial
Tutorial: https://docs.prylabs.network/docs/advanced/proof-of-stake-devnet
Using go 1.23.3
Not tried yet.
Private testnet via kurtosis
Tutorial: https://geth.ethereum.org/docs/fundamentals/kurtosis
kurtosis offers container-like capability.
First init a .yaml
file with 2 geth-lighthouse clients and a geth-prysm client.
1 | participants: |
Then run:
1 | kurtosis run github.com/ethpandaops/ethereum-package --args-file ./network_params.yaml --image-download always |
Works with some extra docker proxy support.
The explorer is available at http://127.0.0.1:10642/.
You can send rpc requests to the deployed geth-lighthouse client.
1 | $ curl -X POST -H "Content-Type: application/json" --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}' http://127.0.0.1:10305 |
Check and stop the running enclave.
1 | kurtosis enclave ls |
Redo on zgclab server.
1 | git clone https://github.com/ethpandaops/ethereum-package.git |
Need to tag the name of the docker images pulled from third party
1 | docker tag gcr.mirrorify.net/prysmaticlabs/prysm/validator:stable gcr.io/prysmaticlabs/prysm/validator:stable |
Works fine for me. enclave stopped earthy-ocean
.