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

Holesky support #12821

Merged
merged 4 commits into from
Aug 29, 2023
Merged

Holesky support #12821

merged 4 commits into from
Aug 29, 2023

Conversation

prestonvanloon
Copy link
Member

@prestonvanloon prestonvanloon commented Aug 28, 2023

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Adds holesky config support for the upcoming holesky testnet.

The holesky genesis state is far too large to bundle inside of the prysm distribution binary (200Mb) so it must be loaded from disk or checkpoint sync. This is existing behavior for other testnets, but I felt it would be helpful to provide a meaningful failure message when the user attempts to run prysm on a non-mainnet network.

Which issues(s) does this PR fix?

#12724

Other notes for review

Example of running Prysm without a genesis state

[2023-08-28 11:37:34]  WARN flags: Running on the Holesky Beacon Chain Testnet
[2023-08-28 11:37:34]  WARN node: In order to receive transaction fees from proposing blocks, you must provide flag --suggested-fee-recipient with a valid ethereum address when starting your beacon node. Please see our documentation for more information on this requirement (https://docs.prylabs.network/docs/execution-node/fee-recipient).
[2023-08-28 11:37:34]  INFO node: Checking DB database-path=/tmp/data/beaconchaindata
[2023-08-28 11:37:34]  INFO db: Opening Bolt DB at /tmp/data/beaconchaindata/beaconchain.db
[2023-08-28 11:37:34]  INFO node: Deposit contract: 0x4242424242424242424242424242424242424242
[2023-08-28 11:37:34] ERROR node: No genesis block/state is found. Prysm only provides a mainnet genesis state bundled in the application. You must provide the --genesis-state or --genesis-beacon-api-url flag to load a genesis block/state for this network.
unable to start beacon node: could not get genesis block root
OriginGenesisRoot: not found in db

if errors.Is(err, stategen.ErrNoGenesisBlock) {
log.Errorf("No genesis block/state is found. Prysm only provides a mainnet genesis "+
"state bundled in the application. You must provide the --%s or --%s flag to load "+
"a genesis block/state for this network.", "genesis-state", "genesis-beacon-api-url")
Copy link
Contributor

@kasey kasey Aug 28, 2023

Choose a reason for hiding this comment

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

I see you used variable interpolation for the flag names - did you intend to replace these with direct flag var .Name references?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried this and got hit with a circular dep. I would have to refactor / move those flags to another package so I just hard coded it in the laziest way. I could remove the templating if that's your feedback here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, in that case, yes the templating seems to introduce a smidge of confusion for no discernible benefit, but I don't feel strongly about it.

Copy link
Contributor

@kasey kasey left a comment

Choose a reason for hiding this comment

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

Some nitpicks but otherwise LGTM

@@ -154,6 +161,10 @@ func applyPraterFeatureFlags(ctx *cli.Context) {
func applySepoliaFeatureFlags(ctx *cli.Context) {
}

// Insert feature flags within the function to be enabled for Holesky testnet.
func applyHoleskyFeatureFlags(ctx *cli.Context) {
Copy link
Contributor

Choose a reason for hiding this comment

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

i think deepsource is complaining these parameters are not used

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's fine. These are essentially reserved functions for future use anyway

Copy link
Member

@terencechain terencechain left a comment

Choose a reason for hiding this comment

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

This looks good to me

@prestonvanloon will you be updating the prysm docs? if not, we should get an owner on that task?

@prestonvanloon
Copy link
Member Author

This looks good to me

@prestonvanloon will you be updating the prysm docs? if not, we should get an owner on that task?

@terencechain -- yes, i will update docs as well. #12724 as assigned to me and we have a task item there.

@prylabs-bulldozer prylabs-bulldozer bot merged commit 63126fd into develop Aug 29, 2023
5 checks passed
@prylabs-bulldozer prylabs-bulldozer bot deleted the holesky branch August 29, 2023 14:27
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.

4 participants