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.

  • 1
    you can't deploy a contract that uses more Gas than the block limit allows – Nulik Aug 21 '18 at 19:31
  • 1
    but the gas there is 6M, your contract uses 5M, so you can deploy it – Nulik Aug 21 '18 at 19:34
  • 1
    because the gas limit for block on Ropsten is 6M – Nulik Aug 21 '18 at 19:35
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.