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

Use Path to Deposit Data JSON File in Generate Genesis State #8575

Merged
merged 4 commits into from
Mar 8, 2021

Conversation

rauljordan
Copy link
Contributor

What type of PR is this?

Feature

What does this PR do? Why is it needed?

The current format for generating a genesis state using our tool is unintuitive, using a weird formatting of data that is hard for any operator to produce. Instead, we allow specifying a path to a standard eth2.0-deposit-cli deposit_data.json file.

The usage is

bazel run //tools/genesis-state-gen -- --output-ssz=/tmp/genesis.ssz --mainnet-config --deposit-json-file=/path/to/deposit_data.json

@rauljordan rauljordan requested a review from a team as a code owner March 8, 2021 14:43
}
beaconState, _, err := interop.GenerateGenesisStateFromDepositData(genesisTime, depositDataList, depositDataRoots)
if err != nil {
return nil, err
}
return beaconState, nil
}

func depositJSONToDepositData(input *DepositDataJSON) (depositData *ethpb.Deposit_Data, dataRoot []byte, err error) {
Copy link
Member

Choose a reason for hiding this comment

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

Nice usage of named returns

@prylabs-bulldozer prylabs-bulldozer bot merged commit 4a98300 into develop Mar 8, 2021
@delete-merged-branch delete-merged-branch bot deleted the specify-deposit-json-path branch March 8, 2021 16:57
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.

2 participants