创建geth节点
創建swarm的swap-endpoint節點,也就是geth的G?rli網絡節點
官方建議的配置是:
Minimum:
- CPU with 2+ cores
- 4GB RAM
- 320GB free storage space to sync the Mainnet
- 8 MBit/sec download Internet service
Recommended:
- Fast CPU with 4+ cores
- 16GB+ RAM
- Fast SSD with at least 500GB free space
- 25+ MBit/sec download Internet service
安裝geth和clef命令
ubuntu 主機安裝命令如下,其他的參考(https://geth.ethereum.org/docs/install-and-build/installing-geth#install-on-ubuntu-via-ppas)
sudo add-apt-repository -y ppa:ethereum/ethereum sudo apt-get update sudo apt-get install ethereum sudo apt-get install ethereum-unstable準備一塊100G左右的硬盤
硬盤掛載到 /hdd 目錄
mkdir /hdd/ethereum ln -s /hdd/ethereum /root/.ethereum初始化 Clef
clef init > ok > <password> > <password>創建賬戶
clef newaccount > ok > <password>啟動clef
我用的screen啟動的:
screen -S clef clef --keystore /root/.ethereum/keystore --chainid 5CTRL +A +D 推出screen
啟動Geth
同樣,我用screen啟動的,啟動的fast節點(full 節點也行),我在嘗試輕節點時無法同步高度。
screen -S geth geth --goerli --syncmode "fast" --http --http.addr 0.0.0.0 --rpcapi="db,eth,net,web3,personal,txpool"CTRL +A +D 推出screen
查看同步進度
geth attach http://localhost:8545 > eth.syncing {currentBlock: 1668491,highestBlock: 4902608,knownStates: 0,pulledStates: 0,startingBlock: 0 } >等currentBlock和highestBlock 相同時,同步高度完成
bee使用
bee的配置文件(/etc/bee/bee.yaml)中,swap-endpoint替換為http://<節點IP>:8545
總結
- 上一篇: python+django医院固定资产设
- 下一篇: HCIE 实验