我的合同创建需要 5633321 气体-超过默认的块状气体限制。几次前,我能够在 Ropsten 网络上进行部署:https://ropsten.etherscan.io/tx/0xe90e8920018f8b633620c731c68b63f3ce11dc19f59ddb49401c9e2c9cd1f8c2。
现在,我想从Remix通过web3提供程序连接到与geth一起的具有(可能已更新的)geth版本的修改版本。
在不挖掘参数的情况下运行geth -testnet
时,Remix IDE报告:
...创建合同错误:超出了限制气体限制
我尝试通过以下方式在自己身上进行交易:
$ geth -rpc --nousb --ipcdisable --rpcaddr“ 127.0.0.1” –rpccorsdomain“ *” –syncmode“ 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网络上的合同部署到需要更多默认区块气的地方?
PS。 geth 1.8.10
与--fast
同步,帐户已解锁,帐户有足够的以太币。
PPS。据我了解,矿工之间同意使用限制气体限制,不能为单个个人矿工实例设置。因此,我要尝试执行的操作将无法正常工作。但是,发生在我的第一个合同部署交易被开采的区块几乎有9.000.000天然气限额的情况如何发生? https://ropsten.etherscan.io/block/3426903
答案 0 :(得分:1)
我们也遇到--targetgaslimit
的问题。我只是删除了那个标志,突然一切正常。考虑到这篇文章是新的,我很高兴其他人也遇到了这个错误。我将在Github上的以太坊仓库上创建一个问题。