英文:
Make command in go-ethereum installation?
问题
我正在尝试修改geth的源代码,我有一些疑问。
我需要修改tx_pool.go文件中的以下语句,以便接受更多数据的交易:txMaxSize = 4 * txSlotSize // 128KB
文件链接:https://github.com/ethereum/go-ethereum/blob/master/core/tx_pool.go
我已经运行了以下命令:
git clone https://github.com/ethereum/go-ethereum.git
我的疑问是在运行make geth
之前还是之后修改文件。
谢谢。
英文:
i am trying to change the source code of geth and I have some doubts.
I need to modify the following sentence in order to admit transactions with more data in them: txMaxSize = 4 * txSlotSize // 128KB
of tx_pool.go file: https://github.com/ethereum/go-ethereum/blob/master/core/tx_pool.go
I have run
git clone https://github.com/ethereum/go-ethereum.git
My doubt is whether i have to modify the file before or after running make geth
Thanks
答案1
得分: 1
从构建应用程序的角度来看,你可以简单地执行以下步骤:
git clone $repo
对文件进行修改。然后执行以下命令:
make geth
或者
cd cmd/geth/
go build
来构建你的应用程序。只运行go build
通常在开发/测试中会更快,但是make geth
可以提供更可复制的构建。
不过,我要提醒你的是,除非你计划使用具有更大交易的单独客户端创建自己的网络,否则构建具有更大交易的Geth只会导致你创建的交易在网络中无法成功传播,因为网络上的其他节点将拒绝它们。大多数矿工使用Geth(或Geth的分叉版本)来组装新的区块,而你自己更改参数并不会影响网络上的其他节点。
英文:
From the perspective of building the application, you can simply:
git clone $repo
Make modifications to the file. Then
make geth
or
cd cmd/geth/
go build
to build your application. Just running go build
will generally be faster for development / testing, but make geth
gives more reproducible builds.
I would warn you though, that unless your plan is to make your own network with a separate client that has larger transactions, building Geth with larger transactions will just mean you can create transactions that won't propagate across the network very successfully as other nodes on the network will reject them. Most miners use Geth (or Geth forks) to assemble new blocks, and changing the parameters yourself won't change it for other nodes on the network.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论