geth --targetgaslimit не работает?

Для создания моего контракта требуется газ 5633321 - больше, чем установленный по умолчанию лимит газа. Мне удалось развернуть его в сети Ropsten несколько раз назад: ropsten.etherscan.io/tx/0xe90e8920018f8b633620c731c68b63f3ce11dc19f59ddb49401c9e2c9cd1f8c2.

Теперь я хочу развернуть модифицированную версию с (возможно, обновленной) версией geth прямо из Remix, подключенного через geth в качестве провайдера web3.

При запуске 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" }, я попытался развернуть его с этим значением, но потерпел неудачу:

person 4ntoine    schedule 20.07.2018    source источник


Ответы (1)


У нас тоже были проблемы с --targetgaslimit. Я просто удалил этот флаг, и вдруг все работает нормально. Учитывая, что этот пост новый, я рад, что кто-то еще столкнулся с этой ошибкой. Я создам проблему с репозиторием go-ethereum на Github.

person zakcole    schedule 29.07.2018
comment
я считаю, что он не должен не работать без этого флага, так как требуемое количество газа больше, чем установленный по умолчанию лимит газа на Ropsten - person 4ntoine; 30.07.2018
comment
@ 4ntoine А, ладно. Я не видел, чтобы он пытался направиться в Ропстен. Я предположил, что это была частная тестовая сеть. Да, в этом есть смысл. - person zakcole; 31.07.2018