-
Notifications
You must be signed in to change notification settings - Fork 879
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
Support free gas networks when using London fee market #4003
Conversation
If baseFeePerGas is configured to "0x0" in the genesis file, bypass the need for a transaction to have a gas price of > 7 Wei Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
It's a fiddly one! We talked about previously over at #3397 Should we tie the minimum to what is set in the genesis? |
It is indeed! I saw that PR, was planning on asking for your review for this ;) Pre-London, configuring a free gas network only involved setting --min-gas-price=0 on the nodes but post-London, with this fix it would involve the user setting baseFeePerGas to zero in the genesis as well, which is a bit annoying but documentable. The reason I've gone with that for now is because zero baseFee is also required to pass this validation: Lines 134 to 141 in 645fdd0
Another option could be to default baseFee to zero and set it explicitly for public networks. Was trying to get my head around how the fee gets burned and if there would be any implications for this configuration. |
Add more tests Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Keeping open for @garyschulte to look at. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 or >=7 seems like a viable way to support both zero gas and "working" base fee networks 👍
In order to support free gas private networks in a London/EIP1559 context, I propose that we support setting a zero baseFee.
If
baseFeePerGas
is overridden as 0 wei, then bypass the need for a transaction to have a gas price of >= 7 wei.The genesis would look something like this:
One potential downside is that once baseFeePerGas is set to 0, there's no going back for that chain. You can still use
--min-gas-price
to enforce some gas, but the London base fee calculation will be forever opted out of as a consequence of the zero baseFee in the genesis block. This also means no ether would get burned since base fee will always be zero.This is currently blocking users with free gas networks from upgrading past the Berlin fork.
Fixed Issue(s)
Fixes #3374
Fixes #3763
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog