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

[HOTFIX] Genesis ledger generator for mainnet #8168

Merged
merged 5 commits into from
Mar 9, 2021

Conversation

psteckler
Copy link
Member

@psteckler psteckler commented Mar 8, 2021

Update the program to generate the genesis ledger JSON from a tab-separated-values dump of the ledger spreadsheet.

For testnets, the program used dummy keys for accounts we didn't yet have keys for. Here, all accounts must have valid keys. If keys are missing or otherwise invalid, there will be a validation error, and there won't be any JSON output.

Also added another validation and optimization. If the cliff amount and unlock amount are zero, check that the initial min balance is also zero, otherwise that balance will never vest. When the JSON is generated, omit the timing if the cliff amount and unlock amount are both zero.

And allow floats for the cliff_time_months column. When calculating the number of slots that represents, round up, if it's a fractional number of slots.

Tested against a testnet ledger where the accounts with pending keys were removed (to see if it succeeded), and against a testnet ledger with pending keys in place (to see if there were validation errors).

@psteckler psteckler added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Mar 8, 2021
@psteckler psteckler added this to In Review in MainNet Mar 8, 2021
@bkase
Copy link
Member

bkase commented Mar 8, 2021

I wonder if we should land this as a hotfix into master. Here's why:

  1. this doesn't touch any protocol code, so we don't need to worry about accidentally breaking something
  2. it would be nice to tie the version of the genesis generator we used to make the genesis ledger with the commit that we're shipping. It's a bit confusing that we'd have to change branches to get a version of the generator that works. What do you think?

Copy link
Member

@bkase bkase left a comment

Choose a reason for hiding this comment

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

Otherwise looks good

@psteckler psteckler force-pushed the feature/genesis-ledger-for-mainnet branch from 19a43d1 to f8c330a Compare March 8, 2021 23:32
@psteckler psteckler requested a review from a team as a code owner March 8, 2021 23:32
@psteckler psteckler changed the base branch from compatible to master March 8, 2021 23:32
@psteckler psteckler changed the title Genesis ledger generator for mainnet [HOTFIX] Genesis ledger generator for mainnet Mar 8, 2021
@bkase
Copy link
Member

bkase commented Mar 8, 2021

This feels morally okay for me to approve for mainnet as I described above

@bkase
Copy link
Member

bkase commented Mar 8, 2021

!approved-for-mainnet

@mrmr1993 mrmr1993 merged commit 6219803 into master Mar 9, 2021
@mrmr1993 mrmr1993 deleted the feature/genesis-ledger-for-mainnet branch March 9, 2021 03:42
@nholland94 nholland94 moved this from In Review to Done in MainNet Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants