-
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
You cannot set the miner.gasPrice to 0 or the txpool.pricelimit to 0 in private chains #27517
Comments
You can't really have true zero gas price post 1559 though. The basefee must always be burnt.
Do note, that Geth is an implementation of Ethereum. There never was nor ever will be a promise to support anything else. Our private network support is meant to run testnets for local testing, it is not meant to run alternative production L1s with different rule sets. You are welcome to use our code - it's open source after all - but wherever you diverge from Ethereum mainnet behavior, it's up to you to support your fork. |
"Our private network support is meant to run testnets for local testing, it is not meant to run alternative production L1s with different rule sets." I'm trying to run a testnet for local testing, using transactions with 0 gas costs so that I don't have to fiddle with and set up automation scripts for allocating gas money. Five months ago, I was able to do this just fine. That convenience let me just get right into testing the functionality of Ethereum smart contracts, to be deployed on the Ethereum mainnet. I am not "running alternative production L1s with different rulesets", I am trying to test smart contracts to be deployed on the mainnet. It's one thing that such a feature should be wanted simply as a quality of life feature for developers, it's another thing that it already existed and it was removed, and there seems to be no adequate reasoning for removing it from the perspective of a developer testing their smart contracts prior to mainnet deployment. |
But how did you run 0 gas prices with London enabled (basefee)?
…On Mon, 19 Jun 2023 at 22:55, GTMN-bradbrown ***@***.***> wrote:
"Our private network support is meant to run testnets for local testing,
it is not meant to run alternative production L1s with different rule sets."
I'm trying to run a testnet for local testing, using transactions with 0
gas costs so that I don't have to fiddle with and set up automation scripts
for allocating gas money. Five months ago, I was able to do this just fine.
That convenience let me just get right into testing the functionality of
Ethereum smart contracts, to be deployed on the Ethereum mainnet. I am not
"running alternative production L1s with different rulesets", I am trying
to test smart contracts to be deployed on the mainnet.
It's one thing that such a feature should be wanted simply as a quality of
life feature for developers, it's another thing that it already existed and
it was removed, and there seems to be no adequate reasoning for removing it
from the perspective of a developer testing their smart contracts prior to
mainnet deployment.
—
Reply to this email directly, view it on GitHub
<#27517 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA7UGJWOEFHVXOA6TDFRULXMCVCTANCNFSM6AAAAAAZMKTEQA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I was able to do it without London enabled, genesis looks like
This setup no longer works. There are more comments about it in #26285 (comment), but they are all unanswered. |
Hmm, ok. So some hard forks only change the EVM internals, but others also introduce behavioural changes to other parts of the code too (e.g. tx pooling). Whilst we do take care during a transition period to be able to operate in both "old" and "new" feature sets, eventually we need to start removing old modes of operation (that are not EVM related) as it's a significant burden to tiptoe around code that is not exercised any more. We removed Ethash in a similar vein and will remove Clique too because those require the network to do forward sync whereas Ethereum mainnet nowadays operates on sync directed via the beacon chain (backwards). It is a huge piece of code everywhere to keep both modes of operation and track all the attack vectors and mitigations for both. Similarly, transaction pooling is constantly evolving, we are introducing blob transactions now which requires a complete overhaul of the tx pooling and there's no reason to re-introduce old mechanisms into the new transaction pools that serve no purpose any more. My only suggestion is that you need to keep up with the Ethereum hard forks on private networks too as our code base is constantly evolving to track the current network behaviour and we don't have the capacity to be indefinitely backwards compatible to all past versions of network that someone uses. |
Do you not agree that this feature would still be very convenient and useful for Ethereum mainnet smart contract developers right now, and would remain convenient and useful for as long as Ethereum transactions require some form of gas? That enabling 0-gas transactions in developer private chains would allow developers to test the functionality of their smart contracts without needing to manage the gas of every address involved in testing? The beacon chain still uses gas, doesn't it, so this would apply to that, too? |
And even more importantly, if "We removed Ethash in a similar vein and will remove Clique too" is true, then why does the documentation page (https://geth.ethereum.org/docs/fundamentals/private-network) about private networks recommend either of those at all? Is there any documentation about making a private Beacon chain (perhaps one where gas costs can be made zero for development convenience)? |
You can easily get gas for private chains |
Was taking a look at the documentation again, noticed that it explicitly says that enabling dev mode "Sets the gas price to 0". |
I cannot understand why the documentation should be updated to reflect that developers can no longer set their gas costs to zero on private test chains for the purpose of development intended to support the Ethereum Mainnet. This is very clearly a nice feature that has been removed and nobody can provide an adequate or relevant reason. I am baffled. |
@bradbrown-gtmn 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. |
As @karalabe has explained:
|
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).
Originally posted by @karalabe in #26285 (comment)
It makes no sense to limit the functionality of geth for developers using private chains because of a potential "attack vector" possibly experienced by geth nodes attached to real networks. You cannot send arbitrary junk tx to my private chain, since it is private and my ports aren't open. Please allow developers to continue to choose to use zero gas transactions in their private chains.
The text was updated successfully, but these errors were encountered: