I'm working on something that is almost exclusively using a private blockchain. We're using Ethereum because of its support for smart contracts.

While developing the contracts, I constantly run into issues with out-of-gas errors, especially in testing. For instance, with truffle's Assert library, little by little I have to comment out more and more functions to avoid getting an error deploying my test contract.

I'm wondering first, whether there's a configuration where I could tell Ethereum (ganache, say) that gas just doesn't matter? I tried setting its maximum gas extremely high, and even that didn't do the trick.

Second, is it possible that the issue isn't actually gas, but that's a red herring, and instead it's some inherent limitation on the size of a contract?

I tried asking about this on the truffle gitter, and got a bit of help, but mostly suggestions to raise the gas limit (only marginal change) and to remove Assert functions.

  • Since it is a private blockchain, you have the ability to allocate a "very high" amount of ether to an account on creation. For example, in geth's genesis.json file, there is the alloc object that contains initially defined accounts and their balances. "alloc": { "0x34ede9b637f0163ab0bb13ae9908bc25f7f6023b": { "balance": "88888888888888888888000000000000000000" }, "0xbc4773626fed4d763e5d02e3aaef85be6ec67994": { "balance": "88888888888888888888000000000000000000" }, ... Feb 8, 2018 at 19:05
  • @AjoyBhatia, thanks. It's not a problem with my account having too low a balance. It seems to be a different problem. I do wonder if the out of gas message is a red herring. For instance, I saw another thread where someone said a require failed on contract creation, and he got that error. Here, I don't have any such require calls, so I can't see why it'd die. But what if "your contract is too big, and I don't care about your gas" is the real message it's trying to convey? Feb 8, 2018 at 19:24

1 Answer 1


Gas is a necessary feature in order for the main Ethereum network to be resilient against attacks (amongst other methods). I suggest checking out Quorum a lightweight Ethereum fork from JP Morgan, that does away with a gas price :)

  • Excellent! I am aware why gas is needed for the main network. I wondered if I would need to figure out how to do away with that limit. If someone already has added that feature, definitely worth checking out. Thanks. Feb 8, 2018 at 19:04
  • 1
    Quorum does that all for ya :D along with some very cool additional features
    – hextet
    Feb 8, 2018 at 21:20
  • Does it really do away with gas, or does it do away with gas pricing? Two different things. Feb 9, 2018 at 20:04
  • gas price good catch!
    – hextet
    Feb 10, 2018 at 3:10
  • Ok... too bad! May not be as useful to me. Feb 10, 2018 at 3:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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