geth
是将计算机变成一个以太坊节点,连接到以太坊网络的客户端。
对于geth
的几个问题:
geth
之后能做什么?能做几件事:
一句话总结:geth
就代表运行在你电脑上的以太坊程序。
这里说明只基于对开发环境的基础配置,官方要求的配置更高
注意需要修改一下go代理:
go env -w GOPROXY=https://goproxy.cn
安装gcc
yum install gcc
下载源码之后,看一下README.md
,使用make geth
就行编译,编译一下
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
# 查看所有分支 git brarnch -a
git checkout release/1.9
make geth
make all
开始编译后输出:
github.com/ethereum/go-ethereum/eth/filters
github.com/ethereum/go-ethereum/light
github.com/ethereum/go-ethereum/eth/protocols/eth
github.com/ethereum/go-ethereum/accounts/abi/bind/backends
github.com/ethereum/go-ethereum/internal/ethapi
github.com/ethereum/go-ethereum/eth/fetcher
github.com/ethereum/go-ethereum/eth/protocols/snap
github.com/ethereum/go-ethereum/eth/tracers
github.com/ethereum/go-ethereum/graphql
github.com/ethereum/go-ethereum/les/downloader
github.com/ethereum/go-ethereum/eth/downloader
github.com/ethereum/go-ethereum/eth/tracers/js
github.com/ethereum/go-ethereum/eth/tracers/native
github.com/ethereum/go-ethereum/miner
github.com/ethereum/go-ethereum/eth/ethconfig
github.com/ethereum/go-ethereum/eth
github.com/ethereum/go-ethereum/les
github.com/ethereum/go-ethereum/eth/catalyst
github.com/ethereum/go-ethereum/les/catalyst
github.com/ethereum/go-ethereum/ethstats
github.com/ethereum/go-ethereum/cmd/utils
github.com/ethereum/go-ethereum/cmd/geth
Done building.
Run "./build/bin/geth" to launch geth.
可以看到geth
被编译到了: ./build/bin/geth
,这个路径。
执行下看看编译是否成功:
./build/bin/geth --help
成功
--txpool.globalqueue value (default: 1024)
Maximum number of non-executable transaction slots for all accounts
--txpool.globalslots value (default: 5120)
Maximum number of executable transaction slots for all accounts
--txpool.journal value (default: "transactions.rlp")
Disk journal for local transaction to survive node restarts
--txpool.lifetime value (default: 3h0m0s)
Maximum amount of time non-executable transaction are queued
--txpool.locals value
Comma separated accounts to treat as locals (no flush, priority inclusion)
--txpool.nolocals (default: false)
Disables price exemptions for locally submitted transactions
--txpool.pricebump value (default: 10)
Price bump percentage to replace an already existing transaction
--txpool.pricelimit value (default: 1)
Minimum gas price limit to enforce for acceptance into the pool
--txpool.rejournal value (default: 1h0m0s)
Time interval to regenerate the local transaction journal
VIRTUAL MACHINE
--vmdebug (default: false)
Record information useful for VM and contract debugging
COPYRIGHT:
Copyright 2013-2022 The go-ethereum Authors
如果是 windows 机器,建议装个虚拟机操作,在Linux环境下使用起来更顺手一些。
https://github.com/ethereum/go-ethereum https://geth.ethereum.org/docs/getting-started