首页 文章

geth --targetgaslimit不工作?

提问于
浏览
0

我的 Contract 创建需要 5633321 gas - 超过默认的区块气体限制 . 我几次能够在 Ropsten 网络上进行部署:https://ropsten.etherscan.io/tx/0xe90e8920018f8b633620c731c68b63f3ce11dc19f59ddb49401c9e2c9cd1f8c2 .

现在我想部署带有(可能更新的)geth版本的修改版本,从Remix连接到geth作为web3提供者 .

在没有挖掘参数的情况下运行 geth -testnet 时,Remix IDE报告:

创建... Contract 错误:超过块气限制

我试图通过以下方式挖掘自己的交易:

$ geth -rpc --nousb --ipcdisable --rpcaddr“127.0.0.1”--rpccorsdomain“*” - synmode“fast”--rpcapi =“db,personal,eth,net,web3,admin” - cache = 2048 --testnet --targetgaslimit“5800000”--gasprice“0”--mine --verbosity 4

而且我仍然得到相同的Remix IDE错误 . 同时在geth日志中,我可以看到:

DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=1.128698ms DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=585.129µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=585.857µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=586.8µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=572.322µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=556.395µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=586.05µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=591.607µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=593.849µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=558.404µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=559.293µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=725.188µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=698.486µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=593.769µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=705.957µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=886.8µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=993.159µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=612.746µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=594.387µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=551.487µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=643.653µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=583.393µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=588.098µs DEBUG[07-20|12:32:53] VM returned with error err="contract creation code storage out of gas" DEBUG[07-20|12:32:53] Executing EVM call finished runtime=573.148µs DEBUG[07-20|12:32:55] Recalculated downloader QoS values rtt=18.543326462s confidence=0.984 ttl=56.512994931s DEBUG[07-20|12:32:57] Revalidated node b=7 id=38e1eb00a922f0b7 DEBUG[07-20|12:32:59] Transaction pool status report executable=114 queued=0 stales=16 DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=1.029656ms DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=882.256µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=567.244µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=665.415µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=499.283µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=840.601µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=449.378µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=404.487µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=885.109µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=648.022µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=731.928µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=649.778µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=485.086µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=472.941µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=724.858µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=547.733µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=1.340049ms DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=892.869µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=709.442µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=424.299µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=419.544µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=381.663µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=702.104µs DEBUG[07-20|12:32:59] VM returned with error err="evm: execution reverted" DEBUG[07-20|12:32:59] Executing EVM call finished runtime=444.091µs

BTW Remix IDE估计气体需求错误: { "Creation": { "codeDepositCost": "4072000", "executionCost": "65552", "totalCost": "4137552" }, 我试图使用此值部署它并失败:https://ropsten.etherscan.io/tx/0x092199ab2a8b535aaed5a954ae549ff8dcb78f4985774f6ad2ea6c1143a7c501 .

我应该怎么做才能在Ropsten网络上部署我的 Contract ,这需要超过默认的区块气体?

PS . geth 1.8.10--fast 同步,帐户已解锁,帐户已足够以太 .

PPS . 据我所知,矿工之间达成了块气限制,并且't be set for single personal miner instance. So what i' m试图这样做是行不通的 . 但是,我的第一份 Contract 部署交易所在的区块是如何发生的,几乎有9.000.000的天然气限制? https://ropsten.etherscan.io/block/3426903

1 回答

  • 0

    我们也遇到了 --targetgaslimit 的问题 . 我刚删除那个标志,突然一切正常 . 考虑到这篇文章是新的,我会在Github上的go-ethereum repo上创建一个问题 .

相关问题