From 96f11441c4e2eb26be5aaf592c87d8dccd36c840 Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Thu, 30 May 2024 12:10:37 -0300 Subject: [PATCH] docs: update Ywallet demo section for phase 2 (#652) * docs: update Ywallet demo section for phase 2 * fix unrelated SecretPackage -> KeyPackage * Update book/src/zcash/ywallet-demo.md --- book/src/tutorial/trusted-dealer.md | 2 +- book/src/zcash/ywallet-demo.md | 61 ++++++++++++----------------- 2 files changed, 26 insertions(+), 37 deletions(-) diff --git a/book/src/tutorial/trusted-dealer.md b/book/src/tutorial/trusted-dealer.md index 999485d5..8dcfe904 100644 --- a/book/src/tutorial/trusted-dealer.md +++ b/book/src/tutorial/trusted-dealer.md @@ -59,7 +59,7 @@ to generate signatures. ``` ```admonish danger -The `SecretPackage` contents must be stored securely. For example: +The `KeyPackage` contents must be stored securely. For example: - Make sure other users in the system can't read it; - If possible, use the OS secure storage such that the package diff --git a/book/src/zcash/ywallet-demo.md b/book/src/zcash/ywallet-demo.md index d5537fcb..bed39d5f 100644 --- a/book/src/zcash/ywallet-demo.md +++ b/book/src/zcash/ywallet-demo.md @@ -161,71 +161,60 @@ When prompted, paste the UFVK generated previously. The program will print a SIGHASH and a Randomizer. Now you will need to simulate two participants and a Coordinator to sign the -transaction. It's probably easier to open three terminals. +transaction, and the FROST server that handles communications between them. +It's probably easier to open four terminals. -In the first one, the Coordinator, run (in the same folder where key -generation was run): +In the first one, the server, run (in the same folder where key generation was +run): ``` -cargo run --bin coordinator --features redpallas -- --cli +RUST_LOG=debug cargo run --bin server --features redpallas -- +``` + +In the second one, the Coordinator, run (in the same folder where key generation +was run): + +``` +cargo run --bin coordinator --features redpallas -- --http -r - ``` And then: - It should read the public key package from `public-key-package.json`. - Type `2` for the number of participants. -- Paste the identifier of the first participant, you can see it in - `key-package-1.json`. If you used trusted dealer key generation, it will be - `0100000000000000000000000000000000000000000000000000000000000000`. +- Copy the session ID that is printed. -Create a new terminal, for participant 1, and run: +In the third terminal, Participant 1, run the following, replacing +`` with the session ID you have just copied: ``` -cargo run --bin participant --features redpallas -- --cli --key-package key-package-1.json +cargo run --bin participant --features redpallas -- --cli --key-package key-package-1.json -s ``` -And then: - -- Copy the SigningCommitments line and paste into the Coordinator CLI. - -Go back to the coordinator and: - -- Paste the second identifier, e.g. - `0200000000000000000000000000000000000000000000000000000000000000`. - -Create a new terminal, for participant 2, and run: +In the fourth terminal, for Participant 2, run the following, again replacing +the session ID: ``` -cargo run --bin participant --features redpallas -- --cli --key-package key-package-2.json +cargo run --bin participant --features redpallas -- --cli --key-package key-package-2.json -s ``` -And then: +Go back to the Coordinator CLI: -- Copy the SigningCommitments line and paste into the Coordinator CLI. - When prompted for the message to be signed, paste the SIGHASH printed by the signer above (just the hex value, e.g. ``4d065453cfa4cfb4f98dbc9cff60c4a3904ed91c523b8ef8d67d28bea7f12ea3``). - -You should be at the Coordinator CLI. Paste the Randomizer generated by the -signer before and copy the Signing Package line that it was printed by the -Coordinator CLI before the Randomizer prompt. +- When prompted for the randomizer, paste the randomizer printed by the signer + above (again just the hex value) ```admonish warning If you prefer to pass the randomizer as a file by using the `--randomizer` argument, you will need to convert it to binary format. ``` -Switch to participant 1 and: - -- Paste the Signing Package -- Paste the Randomizer printed by the signer before. -- Copy the SignatureShare line and paste it into the Coordinator CLI. - -Do the same for participant 2. - -You should be at the Coordinator CLI. It has just printed the final -FROST-generated signature. Hurrah! Copy it (just the hex value). +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). Go back to the signer and paste the signature. It will write the raw signed transaction to the file you specified.