
Review
ETH2.0 Phase0 BeaconChain Blog
In December of 2020, ETH went online with the 2.0-0 stage beacon chain, the underlying application of ETH 2.0 Proof of Stacking (pos), which is not like the ETH 1.0 main chain that is running now, there is no smart contract nor account management on Beacon Chain, its main function is the 2.0 consensus mechanism, users protect the security of the whole 2.0 main network by pledging. In stage 0, users can only pledge ETH tokens and cannot run contracts or transfer money.
Merge
In March 2022 ETH developers launched the kiln ETH2.0 merge test network, the current 1.0 main network will be merged into the 2.0 Beacon Chain, this is done to end the 1.0 above the pow consensus mechanism, and a full transition to Pos, using ethereum.org official expression means like a spaceship docking, 1.0 is no longer capable of long-distance interstellar voyages, so the developers designed a new engine for 2.0, where 1.0 will dock and merge with 2.0 ships and sail deeper into the universe. When the merger is complete, the ETH 1.0 mainnet will merge with Beacon Chain to become the ETH main chain, and will move to Pos (Proofs of Stacking) instead of Pow (proofs of work). The main-net brings smart contracts into the Proof-of-stacking system and imports all historical data and current status from ETH 1.0, ensuring a smooth transition from 1.0 to 2.0 for ETH holders and users. when the merge occurs, the validator node will take over the mainnet and the miner will no longer be needed.
Operation Guidelines
I chose the lighthouse beacon chain as my own validator node, the following is the specific yaml file for the operation in kubernetes, you can also refer to the relevant website for deploying the node.
Help Documents
Join the kiln testnet - lighthouse
My Node
kubernetes kiln testnet node and validator
geth-kiln-net.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: geth-merge-devnets
namespace: eth
labels:
app: geth-merge-devnets
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: geth-merge-devnets
template:
metadata:
labels:
app: geth-merge-devnets
spec:
nodeSelector:
kubernetes.io/hostname: deep-dream
initContainers:
- name: geth-init
image: 192.168.1.114:5000/geth-merge-devnets:4c57d09-20220316
args:
- geth
- --datadir=/execution_data
- init
- /custom_config_data/genesis.json
volumeMounts:
- name: geth-merge-devnets-data
mountPath: /execution_data
- name: merge-devnets-genesis-json
mountPath: /custom_config_data
containers:
- name: geth-merge-devnets
resources:
limits:
memory: 5Gi
cpu: 4
requests:
memory: 2Gi
cpu: 1
image: 192.168.1.114:5000/geth-merge-devnets:4c57d09-20220316
args:
- geth
- --datadir=/execution_data
- --syncmode=full
- --http
- --metrics
- --http.api
- "engine,eth,web3,net,debug"
- --authrpc.jwtsecret=/execution_data/jwtsecret
- --metrics.expensive
- --networkid=1337802
- --http.corsdomain
- "*"
- --authrpc.addr
- "0.0.0.0"
- --authrpc.vhosts=*
- --http.addr
- "0.0.0.0"
- --http.vhosts=*
- --bootnodes
- "enode://c354db99124f0faf677ff0e75c3cbbd568b2febc186af664e0c51ac435609badedc67a18a63adb64dacc1780[email protected]:30303"
ports:
- containerPort: 8545
name: port
- containerPort: 8551
name: secure
volumeMounts:
- name: geth-merge-devnets-data
mountPath: /execution_data
volumes:
- name: geth-merge-devnets-data
persistentVolumeClaim:
claimName: geth-merge-devnets-data
- name: merge-devnets-genesis-json
configMap:
name: kiln-genesis-json
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: geth-merge-devnets-data
namespace: eth
spec:
accessModes:
- ReadWriteOnce
storageClassName: openebs-hostpath
resources:
requests:
storage: 500Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: geth-merge-devnets-service
project: geth-merge-devnets-service
name: geth-merge-devnets-service
namespace: eth
spec:
ports:
- protocol: TCP
port: 8545
targetPort: 8545
name: port
- protocol: TCP
port: 8551
targetPort: 8551
name: secure
selector:
app: geth-merge-devnets
lighthouse-beacon-chain-kiln-net.yaml
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: lighthouse-beacon-merge-devnets
namespace: eth
labels:
app: lighthouse-beacon-merge-devnets
spec:
serviceName: "lighthouse-beacon-merge-devnets"
selector:
matchLabels:
app: lighthouse-beacon-merge-devnets
template:
metadata:
labels:
app: lighthouse-beacon-merge-devnets
spec:
nodeSelector:
kubernetes.io/hostname: deep-tesla
containers:
- name: lighthouse-beacon-merge-devnets
resources:
limits:
memory: 7Gi
cpu: 4
requests:
memory: 4Gi
cpu: 250m
image: 192.168.1.114:5000/lighthouse-workflow:v2.1.4
args:
- lighthouse
- bn
- --network
- kiln
- --staking
- --http-allow-sync-stalled
- --merge
- --eth1-endpoints
- http://geth-merge-devnets-service:8545
- --execution-endpoints
- http://geth-merge-devnets-service:8551
- --datadir
- /data
- --metrics
- --jwt-secrets
- /data/jwtsecret
- --validator-monitor-auto
- --http
- --http-address
- 0.0.0.0
- --boot-nodes
- "enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk"
ports:
- containerPort: 5052
volumeMounts:
- name: lighthouse-beacon-merge-devnets-data
mountPath: /data
volumes:
- name: lighthouse-beacon-merge-devnets-data
persistentVolumeClaim:
claimName: lighthouse-beacon-merge-devnets-data
volumeClaimTemplates:
- metadata:
name: lighthouse-beacon-merge-devnets-data
spec:
accessModes:
- ReadWriteOnce
storageClassName: openebs-hostpath
resources:
requests:
storage: 300Gi
---
---
apiVersion: v1
kind: Service
metadata:
labels:
app: lighthouse-beacon-chain-kiln-service
project: lighthouse-beacon-chain-kiln-service
name: lighthouse-beacon-chain-kiln-service
namespace: eth
spec:
ports:
- protocol: TCP
port: 5052
targetPort: 5052
name: port
- protocol: TCP
port: 9000
targetPort: 9000
name: upnp-tcp
- protocol: UDP
port: 9000
targetPort: 9000
name: upnp-udp
selector:
app: lighthouse-beacon-merge-devnets
lighthouse-validator-kiln-net.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: lighthouse-validator-kiln
namespace: eth
labels:
app: lighthouse-validator-kiln
spec:
serviceName: "lighthouse-validator-kiln"
selector:
matchLabels:
app: lighthouse-validator-kiln
template:
metadata:
labels:
app: lighthouse-validator-kiln
spec:
initContainers:
- name: lighthouse-validator-kiln-import-keys
image: 192.168.1.114:5000/lighthouse-workflow:v2.1.4
args:
- /bin/bash
- -c
- |
mkdir -pv /keys-copy;
cp -v /keys/*.json /keys-copy/;
lighthouse account validator \
--network kiln \
import \
--password-file /pass/account_pass \
--directory /keys-copy \
--reuse-password \
--datadir /data
volumeMounts:
- name: lighthouse-validator-kiln-keys
mountPath: /keys
- name: lighthouse-validator-kiln-pass
mountPath: /pass
- name: lighthouse-validator-kiln-data
mountPath: /data
containers:
- name: lighthouse-validator-kiln
image: 192.168.1.114:5000/lighthouse-workflow:v2.1.4
livenessProbe:
exec:
command:
- sh
- -c
- touch /data/disk_health_fine && ls /data/validators
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 10
args:
- lighthouse
- vc
- --network
- kiln
- --datadir
- /data
- --beacon-nodes
- http://lighthouse-beacon-chain-kiln-service:5052
- --suggested-fee-recipient
- "0x0000000000000000000000000000000000000000"
volumeMounts:
- name: lighthouse-validator-kiln-pass
mountPath: /pass
- name: lighthouse-validator-kiln-data
mountPath: /data
volumes:
- name: lighthouse-validator-kiln-pass
configMap:
name: lighthouse-validator-kiln-pass
- name: lighthouse-validator-kiln-data
persistentVolumeClaim:
claimName: lighthouse-validator-kiln-data
- name: lighthouse-validator-kiln-keys
configMap:
name: lighthouse-validator-kiln-keys
volumeClaimTemplates:
- metadata:
name: lighthouse-validator-kiln-data
spec:
accessModes:
- ReadWriteOnce
storageClassName: cineneural-git-zfs
resources:
requests:
storage: 6Gi