7

In section 5 of the yellow paper, it states "there will be a (weighted) dustribution of minimum acceptable gas prices.." My question is what, if any, is the enforcement mechanism that ensures this distribution? What's to stop every miner from wanting a high gas price?

4

Every client can set the minimum gas price of incoming transactions. Transactions with gas price below the limit will not be propagated and included in the pending block. That means that even there might exists miners with minimum gas price of 0, transactions with low gas price may not reach them as they are not propagated by other clients.

4
  • 1
    More concretely how would you set an acceptable gas price of 0 in ethminer / geth ?
    – euri10
    Apr 1 '16 at 7:46
  • 1
    The --gasprice command line switch would do so. Jun 11 '16 at 14:42
  • That means that normal geth client does not propagate transaction with gasPrice lower the 20GWei (current default gasPrice)? Is there a way to check if a transaction is propagated at least by 1 other client, or be notified by peer if it refuses to propagate a transaction? Aug 27 '16 at 20:33
  • @GiuseppeBertone, unfortunately it seems there is currently no way to get any information about your transaction status in the network (if it was sent, accepted by other, etc). Aug 28 '16 at 13:22
7

Replying to euri10's question (this should be a comment instead of an answer but I cannot format in comments), here is the geth --help snippet that displays the options to set the gas price options - try setting it to "0":

MINER OPTIONS:
...
  --gasprice "20000000000"  Minimal gas price to accept for mining a transactions
...
1
  • Sometimes it's worth to suggest edits to answers if they only contain minor adjustments.
    – Afr
    Apr 10 '16 at 19:28
3

Every miner can set their own minimum gas price that they are accepting. So there is no consensus on what value should that be. Its just like how the transaction fee in Bitcoin works.

2

What's to stop every miner from wanting a high gas price?

Competition with other miners.

Say I set a high gas price, and you set a low gas price that's still high enough to be profitable. I will ignore transactions with a medium gas price, but they won't disappear; you'll mine them instead. This will make you more profitable than me. You'll be better able to fund higher hash rates, and if I continue I may find myself unprofitable as difficulty increases.

(This will be true as long as blocks aren't full of high-price transactions anyway.)

0

in current geth 1.10.4 , the gas price defaults are:

eth/ethconfig/config.go , line number 84:

Miner: miner.Config{
    GasFloor: 8000000,
    GasCeil:  8000000,
    GasPrice: big.NewInt(params.GWei),
    Recommit: 3 * time.Second,
},

here the big.NewInt(params.GWei), means the gas price is exactly 1 GWei

now, the minimum possible gas price is defined here:

params/protocol_params.go , line number 23

package params

import "math/big"

const (
    GasLimitBoundDivisor uint64 = 1024    // The bound divisor of the gas limit, used in update calculations.
    MinGasLimit          uint64 = 5000    // Minimum the gas limit may ever be.
    GenesisGasLimit      uint64 = 4712388 // Gas limit of the Genesis block.

so, the minimum gas as defined in the protocol is 5000 wei

Of course , every miner will set his defaults, but if you set the gas to 1Gwei , your transaction won't be stuck and will be propagated by the network because the majority of nodes will have it set on default and will re-broadcast your transaction forward

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.