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

Set mainnet default gasLimit to 30M. Fixed #3767 #3768

Closed
wants to merge 1 commit into from

Conversation

jmcpheron
Copy link

Update default gasLimit in preparation for The Merge™.

@jmcpheron
Copy link
Author

This would close Issue #3767

@jmcpheron jmcpheron changed the title Set mainnet default gasLimit to 30M. Fixed 3767 Set mainnet default gasLimit to 30M. Fixed #3767 Apr 27, 2022
Copy link
Contributor

@shemnon shemnon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't actually change the default gas for mainnet. It changes a block value in the genesis block of Ethereum Mainnet, which changes the hash of the genesis block, which breaks validation from the very first block.

This value must be 5000 (0x1388 hex), as shown here - https://etherscan.io/block/0

@matkt
Copy link
Contributor

matkt commented Apr 28, 2022

This doesn't actually change the default gas for mainnet. It changes a block value in the genesis block of Ethereum Mainnet, which changes the hash of the genesis block, which breaks validation from the very first block.

This value must be 5000 (0x1388 hex), as shown here - https://etherscan.io/block/0

idk what do you think @shemnon but for me the gaslimit will increase automatically thanks to this https://github.com/hyperledger/besu/blob/ed1329cf848a9d7858d039a55add810da3c428b5/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/LondonTargetingGasLimitCalculator.java

@jmcpheron
Copy link
Author

Thanks for the feedback. The documentation on the target-gas-limit CLI option states:

If a value for target-gas-limit is not specified, the block gas limit remains at the value specified in the genesis file.

Does that update in the LondonTargetingGasLimitCalculator change to default gasLimit to whatever the mainnet is voting for?

@garyschulte
Copy link
Contributor

This doesn't actually change the default gas for mainnet. It changes a block value in the genesis block of Ethereum Mainnet, which changes the hash of the genesis block, which breaks validation from the very first block.
This value must be 5000 (0x1388 hex), as shown here - https://etherscan.io/block/0

idk what do you think @shemnon but for me the gaslimit will increase automatically thanks to this https://github.com/hyperledger/besu/blob/ed1329cf848a9d7858d039a55add810da3c428b5/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/LondonTargetingGasLimitCalculator.java

I need to check the interplay between this default and the targeting gas limit calculator for producing blocks, but I believe we currently have a hardcoded 30m gas limit for all post-merge blocks if it is otherwise unspecified:

https://github.com/hyperledger/besu/blob/main/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java#L78-L81

@macfarla
Copy link
Contributor

macfarla commented May 6, 2022

@garyschulte can we close this one since the gas limit is hardcoded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants