以太坊源码阅读环境安装MAC

Posted 刚好遇见你9527

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了以太坊源码阅读环境安装MAC相关的知识,希望对你有一定的参考价值。

系统环境

Go SDK 1.16

1, 下载源码

git clone https://github.com/ethereum/go-ethereum.git

 2,配置idea go环境 

GOPROXY=https://mirrors.aliyun.com/goproxy/

 3,初始化配置

Program arguments: --datadir /Users/liuhao/go/geth/data init /Users/liuhao/go/geth/genesis.json

genesis.json 文件内容:

{
  "config": {
    "chainId": 666,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "berlinBlock": 0,
    "londonBlock": 0
  },
  "alloc": {},
  "coinbase": "0x0000000000000000000000000000000000000000",
  "difficulty": "0x20000",
  "extraData": "",
  "gasLimit": "0x2fefd8",
  "nonce": "0x0000000000000042",
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp": "0x00"
}

 4,启动

Program arguments: --datadir /Users/liuhao/go/geth/data

5,控制台

以上是关于以太坊源码阅读环境安装MAC的主要内容,如果未能解决你的问题,请参考以下文章

基于Ubuntu系统搭建以太坊go-ethereum源码的开发环境

以太坊源码阅读Transaction(交易模块)

2.安装以太坊客户端(mac os)

[Ethereum] 以太坊区块链搭建与使用-私有链

Mac安装更新ethereum/cpp-ethereum

Mac geth中不能编译Solidity代码解决方案