0

I've connected to my custom private ethereum network in remix with web3 provider. Everything was fine, account balance, and address was retrieved successfully. But I don't know why, but I could not set gas limit for my transaction (e.g. contract deploy). The remix has gas limit issue. Here

Is there any way to increase default gas limit for my custome private network? Because I cannot send any transactions (i.e. contract deploy, call function, etc.) except normal ETH send transaction because of the gas limit is too low.

0

On a private blockchain you set the default gas limit in the genesis file.

After that you can play on gas limit by mining with geth specifying a target gas limit :

How to increase gas limit in block using geth?

  • I know how to increase the gas limit in a block, but I want to know how to increase default gas limit for each transaction if I don't set anything. – Kronos Feb 26 at 9:11
  • You increase gas limit for a block, not for a transaction. To make the gas limit leading towards the required one you have to start geth with a --targetgaslimit flag and start mining. "The above will start your node and keep pushing the gas limit towards 9000000000000 as mining continues. Over time, the gas limit would have grown so large that you'll not have the Error: exceeds block gas limit issue anymore." "Basically, --targetgaslimit is a very convenient way to increase or decrease the gas limit of a private chain while developing." – qCazelles Feb 26 at 9:23
  • the targetgaslimit flag is gas limit for each block. I didn't want to do that. I want to increase gas limit for each transaction, not the block. As you know, in eth_sendTransaction, if I don't setup "gas" param, then how to change the default gas limit for each transaction. – Kronos Feb 26 at 9:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.