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

Add Sepolia configs and address baseFee at genesis case #2933

Merged

Conversation

garyschulte
Copy link
Contributor

PR description

  • add configs for sepolia test net
  • ensure london-at-genesis has a baseFee
  • allow override of the initial baseFee via config and overrides

Fixed Issue(s)

fixes #2920

Changelog

…fee-at-genesis when baseFee is otherwise unspecified in the genesis config

Signed-off-by: garyschulte <[email protected]>
ensure london-at-genesis has a baseFee
allow override of the initial baseFee via config and overrides

Signed-off-by: garyschulte <[email protected]>
Signed-off-by: garyschulte <[email protected]>
@garyschulte garyschulte force-pushed the feature/2920-sepolia-ropsten branch from da3dd24 to 6d18543 Compare October 21, 2021 00:59
Signed-off-by: garyschulte <[email protected]>
@garyschulte garyschulte changed the title Feature/2920 sepolia ropsten Add Sepolia configs and address baseFee at genesis case Oct 21, 2021
@sonarcloud
Copy link

sonarcloud bot commented Oct 21, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

92.7% 92.7% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

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

Quick question regarding the getGenesisBaseFeePerGas method

return getBaseFeePerGas()
.map(Optional::of)
.orElseGet(() -> Optional.of(BASEFEE_AT_GENESIS_DEFAULT_VALUE))
.filter(z -> 0L == getConfigOptions().getLondonBlockNumber().orElse(-1L));
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to return -1 or to throw an exception in this case ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we will return an empty Optional, the -1L will fail to match the filter if we do not have a london block number at all

Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

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

LGTM

@garyschulte garyschulte merged commit e3bf78c into hyperledger:main Oct 21, 2021
@garyschulte garyschulte deleted the feature/2920-sepolia-ropsten branch October 21, 2021 15:24
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
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.

Deprecate Ropsten, Create chainspec for Sepolia
2 participants