-
Notifications
You must be signed in to change notification settings - Fork 721
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 genesis create-cardano command #3832
Conversation
c5bf030
to
7a15823
Compare
7a15823
to
76387a2
Compare
* combines generation of byron and shelley eras genesis * auto generates a config based on a node config template * slot timing and start time parameters override template * generates all keys in byron era and converts to shelley era
76387a2
to
7eb2159
Compare
bors r+ |
Build succeeded: |
@@ -42,6 +46,7 @@ library | |||
-- we create wrapper types for the ledger types | |||
-- in this module | |||
Cardano.Api.Orphans | |||
Cardano.Api.SerialiseTextEnvelope |
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.
This should not be exposed @cleverca22. I will be undoing this in a future PR
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.
how else is this code going to convert keys into json?
@@ -663,7 +663,9 @@ module Cardano.Api ( | |||
|
|||
chainPointToSlotNo, | |||
chainPointToHeaderHash, | |||
makeChainTip | |||
makeChainTip, |
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 should not be exposed here
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.
yeah, these could be moved until a cardano-cli utils file
Nothing -> fail msg | ||
Just a -> pure a | ||
|
||
parseFilePath :: String -> String -> Opt.Parser FilePath |
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 these do not belong in Cardano.Api. They should live in cadano-cli.
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.
yeah, these could be moved until a cardano-cli utils file
@@ -148,6 +171,7 @@ runGenesisCmd (GenesisVerKey vk sk) = runGenesisVerKey vk sk | |||
runGenesisCmd (GenesisTxIn vk nw mOutFile) = runGenesisTxIn vk nw mOutFile | |||
runGenesisCmd (GenesisAddr vk nw mOutFile) = runGenesisAddr vk nw mOutFile | |||
runGenesisCmd (GenesisCreate gd gn un ms am nw) = runGenesisCreate gd gn un ms am nw | |||
runGenesisCmd (GenesisCreateCardano gd gn un ms am k slotLength sc nw bg sg ag mNodeCfg) = runGenesisCreateCardano gd gn un ms am k slotLength sc nw bg sg ag mNodeCfg |
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.
Should be on a newline
toCounter = LBS.toStrict . textEnvelopeToJSON Nothing . snd | ||
|
||
generateShelleyNodeSecrets :: [SigningKey GenesisDelegateExtendedKey] -> [VerificationKey GenesisKey] | ||
-> IO (Map (Hash GenesisKey) |
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.
Wrong indent
-- | ||
|
||
runGenesisCreateCardano :: GenesisDir | ||
-> Word -- ^ num genesis & delegate keys to make |
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.
Wrong indent
fixed #3798