Skip to content
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

Is it possible to set up a PoS private chain with 0 gas price using Kurtosis? #30102

Closed
milc0x opened this issue Jul 1, 2024 · 6 comments
Closed

Comments

@milc0x
Copy link

milc0x commented Jul 1, 2024

Hi Geth Team,

Our development team is currently conducting performance testing for blockchain transactions, which requires a large number of test tokens to complete. Collecting test tokens on the Sepolia testnet takes a considerable amount of time. Therefore, we are planning to adopt a more efficient approach by setting up a private testnet (private chain) with the gas price set to 0 so that there won't be any transaction fees.

However, in the past, we used the POA consensus algorithm provided by Geth through the Clique protocol. I recently discovered that in version 1.14.0 of Geth, POA (Clique) is deprecated and it is recommended to migrate to PoS using Kurtosis. I wonder if I can still build a PoS private chain with a gas price of 0.

If not, I may choose to use a version of Geth below 1.14.0, which is compatible with the POA consensus. Could you please specify which latest versions are suitable for this?

@s1na
Copy link
Contributor

s1na commented Jul 1, 2024

with the gas price set to 0 so that there won't be any transaction fees.

Please help me understand why you need the gas price to be 0? It is your private network. You can assign an account as much ether as you want to pay for gas.

@milc0x
Copy link
Author

milc0x commented Jul 2, 2024

Please help me understand why you need the gas price to be 0? It is your private network. You can assign an account as much ether as you want to pay for gas.

Given the premise that this is built on our private chain within a private subnet, with a low likelihood of being exposed to DoS attacks.

Enabling 0-gas transactions in developer private chains simplifies the testing process by allowing developers to focus on testing smart contract functionality without the overhead of managing gas for every address involved. This approach streamlines testing efforts, ensuring that developers can concentrate on the core aspects of their smart contracts without the need to allocate gas funds or set up complex automation scripts for each testing scenario.

@milc0x
Copy link
Author

milc0x commented Jul 2, 2024

#27517 (comment)

After the London fork, if setting the gas price to 0 is not feasible, what is the minimum gas price that can be set for the least base fee using Kurtosis or a similar tool?

@s1na
Copy link
Contributor

s1na commented Jul 2, 2024

what is the minimum gas price that can be set for the least base fee using Kurtosis or a similar tool?

7 is the minimum base fee allowed by the protocol.

without the overhead of managing gas for every address involved

Right I believe that overhead is minimal since the addresses will need to be managed anyway so they can send transactions. And kurtosis ethereum-package comes with a list of prefunded accounts. See https://github.com/ethpandaops/ethereum-package?tab=readme-ov-file#pre-funded-accounts-at-genesis. Unless the issue is estimating gas?

@chanderprakash20
Copy link

Hi Please try one of the methood to take it gas fee to zero
Options for Setting Up a Private Ethereum Network:

  1. Using Proof of Stake (PoS) with Geth 1.14.0 and Later:

    Kurtosis for PoS:
    With Geth 1.14.0 and later, you can set up a private network using Proof of Stake (PoS) as recommended.
    Gas Price: You can configure the gas price to be zero in your network settings, although this is unusual for PoS, it can be done for testing purposes.
    Setup: Utilize Kurtosis to create a PoS network. Kurtosis provides tooling to help configure Ethereum networks with different consensus mechanisms, including PoS.

  2. Using Clique (PoA) with Geth Version Below 1.14.0:

    Clique Consensus:
    You can use Clique (PoA) by running a Geth version earlier than 1.14.0.
    Versions: The latest version before 1.14.0 would be 1.13.x, which supports Clique.
    Gas Price: In Clique, you can set the gas price to zero, effectively allowing transactions without fees.
    Setup: Follow the Clique documentation for setting up a private PoA network. This involves configuring genesis.json and adding sealers.
    Happy to connect for further Discusison

@lightclient
Copy link
Member

Geth isn't really geared toward private network use, so this isn't really functionality we are focused on supporting. It's probably not possible anymore since you would need to run pre-London when EIP-1559 was introduced. I recommend using an older version of geth.

@lightclient lightclient closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants