I admit that I don't understand Gas at all. But I think it is basically the currency which dapps use to interact with each other and the blockchain. Yes?

If you're creating a custom/private network, is there a way to set the required gas per transaction to be 2x the cost of the ethereum blockchain? I have looked at the chainspec and genesis files and the setting doesn't jump out at me as something obvious.

If you did that, would that mean more reward for miners? And would the tradeoff be that is is more expensive to deploy a dapp?

Thank you.

  • 1
    This question ethereum.stackexchange.com/questions/3/… explain what is gas. In a private nework you can set the gas limit in the genesis file, the gas limit is dynamic and can be adjusted with --targetgaslimit parameter, and with --gasprice you can set the lower accepted price. – Ismael Aug 20 '17 at 23:13
  • 1
    I have read that page. I have it bookmarked in my tabs. It does not help me answer the question that I asked. Also I do not know what "--gasprice" and "--targetgaslimit" have to do with my question. Maybe everything? If you know the answer, please share it. – stone.212 Aug 21 '17 at 15:56
  • 1
    @Ismael did you read my reply? I am not looking for a way to set the gas limit. I know how to do that. I wonder if you have any leads to help me answer my question? – stone.212 Aug 22 '17 at 7:48
  • 1
    This question explain each parameter of the genesis file ethereum.stackexchange.com/questions/2376/…, you should modify the gasLimit parameter. If you already have the blockchain started you can use targetgastlimit to increase it. You can also lower the gas price with gasprice so transaction will be cheaper. – Ismael Aug 22 '17 at 17:34
  • 1
    @Ismael I'm confused. gasLimit refers to "limit of Gas expenditure per block." That's not what my question is about. – stone.212 Aug 23 '17 at 21:29

Without making a significant change to the Ethereum protocol, you cannot enforce gas prices on the network. Ethereum works like so: users submit transactions at any gas price they choose. At every block, the winning miner chooses whether to include the pending transaction. The gas price is one of the factors the miner uses to decide.

If you wanted to make it impermissible for a miner to accept a transaction at a gas price lower than some fixed amount, you would have to change the protocol to consider those transactions invalid.

Alternatively, on a private network, you might control the miners. If so, you can define whatever gas price standards that you like.

It's worth noting that there is a dramatic spread in gas prices on the main network right now. The median price is 20 Gwei* (mostly because many clients default to that flat rate), but many transactions get processed at 0.6 Gwei*. The low price transactions take longer to process, because only ~15% of miners accept transactions at that rate.

* source: http://ethgasstation.info/

| improve this answer | |
  • 1
    Thank you. Can you tell me (in the context of your answer) what the gasLimit, minGasLimit variables mean in the genesis file? – stone.212 Aug 24 '17 at 3:59
  • 1
    These values only indirectly affect gas price, so barely related. They set the initial and minimum acceptable gasLimit in a block. gasLimit puts a cap on the sum of gas used by transactions which are included in a block. github.com/ethereum/wiki/wiki/… – carver Aug 24 '17 at 15:42
  • 1
    Thank you. So what is minGasLimit then? – stone.212 Aug 25 '17 at 8:28

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.