-
Notifications
You must be signed in to change notification settings - Fork 15
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
create-testnet-data: create byron genesis #974
Conversation
2072ac2
to
b984f7a
Compare
b984f7a
to
10f6517
Compare
757e3e6
to
d0fe09b
Compare
dcbe34d
to
af8d233
Compare
byron-gen-command/genesis-keys.000.key | ||
byron-gen-command/genesis-keys.001.key |
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.
Those files are not used by create-testnet-data
, but they are present anyway in the workspace created by create-testnet
, so I've left them in the same position.
Waiting @Jimbo4350's approval before merging |
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.
LGTM but a few comments for a follow up PR.
@@ -377,7 +388,32 @@ runGenesisCreateTestNetDataCmd | |||
stuffedUtxoAddrs | |||
shelleyGenesis | |||
|
|||
-- Write genesis.json file to output | |||
let byronGenesisFp = outputDir </> "byron.genesis.spec.json" -- This file is used by the performance testing team. |
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.
I think this default should live in the parsers.
byronPoolNumber = max 1 numPools -- byron genesis creation needs a >= 1 number of pools | ||
|
||
-- All arbitrary values come from cardano-testnet | ||
mkByronGenesisParameters actualNetworkWord32 byronGenesisFp shelleyGenesis = |
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 of the Byron functionality should be factored out on its own as much as possible. A separate module for it would make sense.
mkByronGenesisParameters actualNetworkWord32 byronGenesisFp shelleyGenesis = | ||
Byron.GenesisParameters{..} | ||
where | ||
gpStartTime = sgSystemStart shelleyGenesis |
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.
These needs comments or need to point to documentation that explains them.
@@ -496,6 +557,37 @@ runGenesisCreateTestNetDataCmd | |||
desiredKeyOutputFormat :: KeyOutputFormat | |||
desiredKeyOutputFormat = KeyOutputFormatTextEnvelope | |||
|
|||
-- | We need to pass these values to create the Byron genesis file. | |||
-- The values here don't matter as the testnet conditions are ultimately determined | |||
-- by the Shelley genesis. |
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.
Is there any documentation we can point to?
@Jimbo4350> created issue to follow-up on improvements: #976 |
Changelog
Context
create-testnet-data
by key stakeholdersHow to trust this PR
cardano-testnet
cardano-testnet
: see cardano-testnet: use create-testnet-data's byron genesis generation feature cardano-node#6039Checklist