1

I was able to deploy contract that requires more gas than default Ropsten block gas limit: https://ropsten.etherscan.io/tx/0x7c40cd2c539c03d110da8988641518ff6ff907a284f5074ed3d8517eb80b51f9 (5594037 > 4.7M)

For some reason i can't do the same again with:

$geth --verbosity "4" -rpc --nousb --ipcdisable --rpcaddr "127.0.0.1" --rpccorsdomain "" --rpcvhosts "" --syncmode "fast" --rpcapi="db,personal,eth,net,web3,admin" --cache=2048 --testnet --mine --targetgaslimit 7000000

Does --targetgaslimit work for Ropsten (not private network)? How can i deploy it without splitting/using libraries/etc?

Currently i'm getting Remix deploy error (connected to Web3 provider):

creation of Contract errored: exceeds block gas limit

PS. I did it few times so i'm absolutely sure it's doable. But i can't understand what affects this and how can i deploy it intentionally.

4ntoine
  • 213
  • 2
  • 11
  • why aren't you using private chain for tests? – Nulik Aug 21 '18 at 19:21
  • first i test with private network and custom genesis file. then i test with ropsten as it's close to main net. – 4ntoine Aug 21 '18 at 19:28
  • well, I guess you will have to pay for the transaction on the Main Net , then. – Nulik Aug 21 '18 at 19:30
  • i'm talking about ropsten network, it's free – 4ntoine Aug 21 '18 at 19:30
  • 1
    you can't deploy a contract that uses more Gas than the block limit allows – Nulik Aug 21 '18 at 19:31
  • i did it few times, see https://ropsten.etherscan.io/tx/0x7c40cd2c539c03d110da8988641518ff6ff907a284f5074ed3d8517eb80b51f9, https://ropsten.etherscan.io/tx/0x6889604e2ff7c02d4a8eb9ec9878642c3bad478e3cb1eb90180224daded6d7f6 – 4ntoine Aug 21 '18 at 19:32
  • 1
    but the gas there is 6M, your contract uses 5M, so you can deploy it – Nulik Aug 21 '18 at 19:34
  • how can you explain i can deploy the contract if it requires more gas than block gas limit? i do set gas limit more than 6M while deploying but the transaction is not accepted because of block gas limit – 4ntoine Aug 21 '18 at 19:34
  • 1
    because the gas limit for block on Ropsten is 6M – Nulik Aug 21 '18 at 19:35
  • no, it's 4.7M https://ropsten.etherscan.io/block/3883239. otherwise i don't have any problems with deployment at all. was it changed? – 4ntoine Aug 21 '18 at 19:37
  • 1
    you probably was able to do it 2 weeks ago because there was more demand for mining, but since block gas limit is dynamically adjusted , right now due to low demand, you won't be able to do it. You can setup a rig become a miner and vote to increase block limit until it reaches your block limit target, or just pay for the transaction on the Main Net. – Nulik Aug 21 '18 at 19:41
  • 1
    https://ethereum.stackexchange.com/questions/31491/how-is-the-block-gas-limit-dynamically-adjusted – Nulik Aug 21 '18 at 19:42
  • i see, thanks for explanation. i can see block gas limit in that blocks (where i was able to deploy) was really 6M – 4ntoine Aug 21 '18 at 19:42
  • any chance to evaluate the trend? ("when will it be high demand for mining and it will be set back to 6M"?) – 4ntoine Aug 21 '18 at 19:51

0 Answers0