回顾 ETH2.0 Phase0 BeaconChain Blog
2020年的12月份,ETH上线了2.0-0阶段的信标链,ETH2.0 Proof of Stacking(pos)的底层应用,它不像现在在运行的ETH1.0主链,Beacon Chain上面没有智能合约也没有账户管理,它的主要功能就是2.0的共识机制,用户通过质押ETH(我们称之为validator)来保护整个2.0主网的安全性,更多的人运行validator节点,能够更好的去中心化以及抵御外部攻击。0阶段,用户是只能质押ETH代币,无法运行合约以及转账操作。
合并 在2022年的三月份ETH开发者上线了kiln ETH2.0合并测试网,当前的1.0主网将合并到2.0的Beacon Chain,这样做是为了结束1.0上面的pow共识机制,并全面的过渡到pos,用ethereum.org官方的表述意思就是像宇宙飞船的对接,1.0已经无法再进行较远距离的星际航行,于是开发者们设计2.0的新引擎,1.0将与2.0飞船进行对接合并,然后驶向宇宙的更深处。当合并完成之后,ETH1.0主网将与Beacon Chain进行合并,成为ETH分片链,并且将转向Pos权益证明而非Pow工作量证明。主网将智能合约带入到Proof-of-stack系统中,并且导入ETH1.0中的所有历史数据和现状,确保ETH的持有者和用户能够平滑的过度到2.0。当合并发生时,validator节点将接管主网,miner将不再需要。
操作指引 我选择的是lighthouse beacon chain做为自己的验证节点,以下是具体在kubernetes中进行操作的yaml文件,还可以参考相关网站用于部署节点。
帮助文档 ETH Kiln TestNet
kiln testnet on arm
How to run a node on Kiln
Join the kiln testnet - lighthouse
我的节点 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://c354db99124f0faf677ff0e75c3cbbd568b2febc186af664e0c51ac435609badedc67a18a63adb64dacc1780a28dcefebfc29b83fd1a3f4aa3c0eb161364cf94@164.92.130.5: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
...