该部分参考自 「区块链系列」以太坊Go-Ethereum(Geth)能做什么
官网: https://geth.ethereum.org/
1 | git clone https://github.com/ethereum/go-ethereum.git |
必须要切到v1.8.0。如果在master上编译,Mac M1会报错:
而在v1.8.0,则可编译通过
通过geth version命令可查看是否安装成功及geth版本号
当然也可以通过brew来安装
项目各目录的作用:
对于p2p目录,可参考 Go学习之go-ethereum【以太坊】源码分析 - Kademlia协议原理(三)
更多 源码分析: go-ethereum-code-analysis 以太坊源码分析, 有2000多个star
原文链接: https://dashen.tech/2023/07/12/Go-Ethereum使用记录/
版权声明: 转载请注明出处.