-
Notifications
You must be signed in to change notification settings - Fork 20.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gas price cannot be set to 0 with miner.gasprice option set to 0 #26285
Comments
I think |
The gas price oracle will ignore transactions below the price configured by In general, the gas price oracle is not designed to work well in an environment where transactions can be submitted with zero fee. |
You cannot set the miner.gasPrice to 0, if you try, you'll see a warning in the logs:
Geth explicitly does not allow this because accepting 0 priced transactions would mean that you also accept/pool them from the network and propagate them, which is essentially a very potent DoS vector (I can send arbitrary junk tx from arbitrary non-existing account since there's no cost). |
Hey, I want to set up private network with zero gas price. Please help me with that. |
Hello, In the latest geth version 1.12, I am unable to set and use gas price as zero (--miner.gasprice 0). I was able to set and use gas price to 0 until geth version 1.10.15 If I have geth private blockchain network and I don't want to charge anything for any transaction I would set gas price to 0. Is this feature removed in geth version 1.12 ? https://github.com/SirajChaudhary/setup-a-private-ethereum-blockchain-multinodes-network |
I also noticed that this seemed to stop working recently. I've used geth's private clique networks to test contract behavior as recently as 5 months ago using 0-gas transactions and I can no longer do this. What gives? |
@GTMN-bradbrown we solved this by setting:
and adding the following switch at startup time:
This sets a gas price of 2. While not zero, it's a decent workaround. |
System information
Geth
Version: 1.10.25-stable
Git Commit: 69568c5
Architecture: amd64
Go Version: go1.18.5
Operating System: linux
Expected behaviour
The geth was started with the option miner.gasprice set to 0:
geth --datadir /data2 --nodiscover --networkid 5291592 --netrestrict 10.32.80.0/27 --allow-insecure-unlock --unlock 0x879769d76BEad81e23aDBdd993Ca37872b0e6aa4 --mine --password /data/password.txt --http --http.addr="127.0.0.1" --http.api="eth,web3,net,admin,personal,miner" --http.corsdomain="*" --miner.gasprice 0 --port 30310 --http.port 8555
When run the following command to check gas price:
It should return 0 gas price:
Actual behaviour
When run the following command to check gas price:
It returns the default value of 1 trillion gas price
The text was updated successfully, but these errors were encountered: