I want to play with a custom chain that has a gas price that's different from the ETH mainnet. By "gas price" I mean how much gas is required to deploy a dapp.

But I don't see anywhere in the chain spec file that gasprice is specified. So I don't know what the default is. For reference: https://github.com/paritytech/parity/blob/master/ethcore/res/ethereum/foundation.json

Also (separate question): does anyone know how I specify the gas price in the chain spec AND genesis files?


1 Answer 1


You can not change the gas price of EVM instructions without hacking the core and totally forking off to a new client. This is true for both Geth and Parity.

If the gas limits are not sufficient for you, you can just increase the following configuration options for Parity:

--gas-floor-target GAS         Amount of gas per block to target when sealing a new
                               block (default: 4700000).
--gas-cap GAS                  A cap on how large we will raise the gas limit per
                               block due to transaction volume (default: 6283184).

You could try to start with a floor of around 9999999 and a cap of 99999999. And see if this works out for you. Now we covered the limits.

If you want to override gas prices to be accepted by miners, you have to change the following parameter:

--gasprice WEI                 Minimum amount of Wei per GAS to be paid for a
                               transaction to be accepted for mining. Overrides

You could try to set it as low as 1 Wei.

And to cover your last question: You can not specify gas price in a genesis block.

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.