-
Notifications
You must be signed in to change notification settings - Fork 1k
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 a Generate Genesis State Command to Prysmctl #11259
Conversation
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
fPath string, | ||
data interface{}, | ||
marshalFn func(o interface{}) ([]byte, error), | ||
) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I don't think you need to break this into multi-line func signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All my comments are nitpicks, otherwise lgtm!
noOutputFlag := outputSSZ == "" && outputJson == "" && outputYaml == "" | ||
if noOutputFlag { | ||
return errors.New( | ||
"no --output-ssz, --output-json, or --output-yaml flag specified. At least one is required", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment: can you parameterize flag names for easier maintenance? In case names change in the future?
Hi sorry for asking this here. I tried discord, didn't get any reply. How do I generate equivalent https://github.com/eth-clients/eth2-networks/tree/master/shared/prater I'm a noob. Any pointer towards better understanding the genesis file and how to generate it is greatly appreciated. Thanks :) |
Hi @cshintov looks like our tool might not work well for regenerating these testnet states. Instead, I would recommend trying https://github.com/protolambda/eth2-testnet-genesis and passing in the config.yml from the link in your message above as one of the options. I hope this helps |
Thanks @rauljordan 🙂 I will check out this tool. |
Unable to find any way to generate equivalent genesis.ssz file for my own devnet? Any help would be highly appreciated! |
How generate genesis state in 2023.10.27? |
hi @HorcruxAshu and @wangyufsn do you run into any issues when using this command?
|
As part of making Prysm easy to use for running a local devnet, it would be ideal if the tool for generating a genesis state can live under the prysmctl binary, which we are increasingly building to be a really great CLI tool for all things related to Prysm. This will be published as a Docker image under our GCR and will make instructions trivial. This is a refactor of the tool that already existed under tools/genesis-state-gen, but written with cleaner code and smaller functions.
Usage is: