diff --git a/book/src/zcash/ywallet-demo.md b/book/src/zcash/ywallet-demo.md index 9e987a88..71bb3ca0 100644 --- a/book/src/zcash/ywallet-demo.md +++ b/book/src/zcash/ywallet-demo.md @@ -117,6 +117,9 @@ cargo run --release -- sign --tx-plan --ufvk -o ` with the session ID you have just copied: +Feel free to close this terminal, or reuse it for the next step. +```admonish warning +Do not use passwords that you use in practice; use dummy ones instead. (You +shouldn't reuse passwords anyway!) For real world usage you would need to take +more care to not end up writing the password to your shell history. (In real +world usage we'd expect this to be done by applications anyway.) ``` -cargo run --bin participant -- -C redpallas --http --key-package key-package-1.json -s -``` -In the fourth terminal, for Participant 2, run the following, again replacing -the session ID: +### Coordinator + +In the second terminal, the Coordinator, run (in the same folder where key +generation was run): ``` -cargo run --bin participant -- -C redpallas --http --key-package key-package-2.json -s +export PW=foobar10 +cargo run --bin coordinator -- -C redpallas --http -u alice -w PW -S alice,bob -r - ``` -Go back to the Coordinator CLI: +We will use "alice" as the Coordinator, so change the value next to `export PW=` +if you used another password when registering "alice". +And then: + +- It should read the public key package from `public-key-package.json`. - When prompted for the message to be signed, paste the SIGHASH printed by the signer above (just the hex value, e.g. ``4d065453cfa4cfb4f98dbc9cff60c4a3904ed91c523b8ef8d67d28bea7f12ea3``). @@ -169,9 +188,32 @@ If you prefer to pass the randomizer as a file by using the `--randomizer` argument, you will need to convert it to binary format. ``` -The protocol should run and complete succesfully. You should still be at the -Coordinator CLI. It has just printed the final FROST-generated signature. -Hurrah! Copy it (just the hex value). +### Participant 1 (alice) + +In the third terminal, Participant 1, run the following: + +``` +export PW=foobar10 +cargo run --bin participant -- -C redpallas --http --key-package key-package-1.json -u alice -w PW +``` + +(We are using "alice" again. There's nothing stopping a Coordinator from being a +Partcipant too!) + +### Participant 2 (bob) + +In the fourth terminal, for Participant 2, run the following: + +``` +export PW=foobar10 +cargo run --bin participant -- -C redpallas --http --key-package key-package-2.json -u bob -w PW +``` + +### Coordinator + +Go back to the Coordinator CLI. The protocol should run and complete +succesfully. It will print the final FROST-generated signature. Hurrah! Copy it +(just the hex value). Go back to the signer and paste the signature. It will write the raw signed transaction to the file you specified.