Skip to content

Conversation

dcoutts
Copy link
Contributor

@dcoutts dcoutts commented May 7, 2020

Basic walk through, so far just covering genesis construction. Also fix a few things to make it true.

dcoutts added 7 commits May 7, 2020 01:37
It was using the wrong file type for the utxo keys, and not creating the
signing key.

Change it to reuse the same code as for the other command that creates
utxo keys.

For collecting the keys to put into the genesis file, use the same
method as for the other keys: scan the directory and collect them all.
This makes it possible to use with manually created utxo keys.
The number of genesis keys to make and the number of utxo keys should be
independent.
Derive the dir names in only once place.
Create the directories only once. Expect parent dirs to exist.
This is actually useful. This means that by default the create-genesis
command will just pick up existing files that are there already, either
that have been created manually or from previous invocations of
create-genesis where some keys were generated.

This makes it convenient to re-generate the genesis with minor changes
rather than re-creating all the keys.

This takes advantage of the behaviour where it scans the directories for
files of the expected names.
When making a genesis file manually, one needs a way to get from a
genesis initial utxo key file to the address that one stuffs into the
genesis InitialFunds mapping.
@dcoutts dcoutts requested review from erikd, Jimbo4350 and intricate May 7, 2020 01:58
@@ -0,0 +1,518 @@
# Making a Shelley blockchain from scratch
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

Copy link
Contributor

@erikd erikd left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM!

-> FilePath
-> ExceptT CliError IO (Map (GenKeyHash TPraosStandardCrypto)
(KeyHash TPraosStandardCrypto))
readGenDelegsMap gendir deldir = do
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

--gen-genesis-keys 3 \
--gen-utxo-keys 2
```
Yes [ONE MILLION LOVELACE](https://www.youtube.com/watch?v=l91ISfcuzDw).
Copy link
Contributor

Choose a reason for hiding this comment

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

🤣

@Jimbo4350
Copy link
Contributor

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 7, 2020

@iohk-bors iohk-bors bot merged commit 17591d9 into master May 7, 2020
@iohk-bors iohk-bors bot deleted the dcoutts/shelley-from-scratch branch May 7, 2020 06:38
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.

4 participants