diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2a87287..b8dda17d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,6 +45,12 @@ jobs: run: make zemu_install - name: Run tests run: make zemu_test + - name: Upload Snapshots (only failure) + if: ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: snapshots-tmp + path: tests_zemu/snapshots-tmp/ build_package_nanosp: needs: [configure, build_and_test] diff --git a/README.md b/README.md index 3ce55893..5686737f 100644 --- a/README.md +++ b/README.md @@ -11,19 +11,73 @@ _Please visit our website at [zondax.ch](https://www.zondax.ch)_ --- -## Compilation and load +This project contains the Ironfish DKG app for Ledger Nano S+, Stax and Flex. -You can follow the following steps to setup a development environment on a host running a Debian based Linux distribution (such as Ubuntu). +- Ledger Nano S+/Stax/Flex Ironfish app +- Specs / Documentation +- Zemu tests -### Prerequisites +## ATTENTION -* Install the [Rust language](https://www.rust-lang.org/) +Please: + +- **Do not use in production** +- **Do not use a Ledger device with funds for development purposes.** +- **Have a separate and marked device that is used ONLY for development and testing** + + +## Download and install a prerelease + +*Once the app is approved by Ledger, it will be available in their app store (Ledger Live). +You can get builds generated by Github Actions from the release tab. THESE ARE UNVETTED DEVELOPMENT RELEASES* + +Download a release from here (https://github.com/Zondax/ledger-ironfish/releases). You only need `installer.sh` + +If the file is not executable, run +```sh +chmod +x ./installer.sh +``` + +then run: + +```sh +./installer.sh load +``` + +# Development + +## Preconditions + +- Be sure you checkout submodules too: + + ``` + git submodule update --init --recursive + ``` + +- Install Docker CE + - Instructions can be found here: https://docs.docker.com/install/ + +- We only officially support Ubuntu. Install the following packages: + ``` + sudo apt update && apt-get -y install build-essential git wget cmake \ + libssl-dev libgmp-dev autoconf libtool + ``` + +- Install `node > v13.0`. We typically recommend using `n` + +- You will need python 3 and then run + - `make deps` + +- This project requires Ledger firmware 2.0 + - The current repository keeps track of Ledger's SDK but it is possible to override it by changing the git submodule. + +- Install the [Rust language](https://www.rust-lang.org/) ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -* Install Ledger Rust building tools dependencies +- Install Ledger Rust building tools dependencies ```bash # Clang compiler, GCC ARM cross-compiling toolchain @@ -36,7 +90,7 @@ rustup default nightly-2023-11-10 rustup component add rust-src --toolchain nightly-2023-11-10 ``` -* Install [ledgerwallet](https://github.com/LedgerHQ/ledgerctl/) and [cargo-ledger](https://github.com/LedgerHQ/cargo-ledger) +- Install [ledgerwallet](https://github.com/LedgerHQ/ledgerctl/) and [cargo-ledger](https://github.com/LedgerHQ/cargo-ledger) ```bash # Install ledgerwallet, a Python dependency of cargo-ledger to sideload binaries on Ledger devices @@ -47,14 +101,125 @@ cargo install cargo-ledger cargo ledger setup ``` -You are now ready to build the app for Ledger devices! +*Warning*: Some IDEs may not use the same python interpreter or virtual enviroment as the one you used when running `pip`. +If you see conan is not found, check that you installed the package in the same interpreter as the one that launches `cmake`. + +## How to build ? + +> We like clion or vscode but let's have some reproducible command line steps +> + +- Building the app itself + + If you installed the what is described above, just run: + ```bash + make all + ``` + +## Running tests + +- Running rust tests (x64) + + If you installed the what is described above, just run: + ```bash + make rust_test + ``` + +- Running device emulation+integration tests!! + + ```bash + Use Zemu! Explained below! + ``` + +## How to test with Zemu? + +> What is Zemu?? Great you asked!! +> As part of this project, we are making public a beta version of our internal testing+emulation framework for Ledger apps. +> +> Npm Package here: https://www.npmjs.com/package/@zondax/zemu +> +> Repo here: https://github.com/Zondax/zemu -### Building +Let's go! First install everything: +> At this moment, if you change the app you will need to run `make` before running the test again. -Now that you have followed the [prerequisites](#prerequisites) guide, you can build the app with the following command executed in the root directory of the app. +```bash +make zemu_install +``` + +Then you can run JS tests: ```bash -cargo ledger build nanox +make zemu_test ``` -This command will build the app for the Nano X, but you can use any supported device (`nanox`, `nanosplus`, `stax`, `flex`) \ No newline at end of file +To run a single specific test: + +> At the moment, the recommendation is to run from the IDE. Remember to run `make` if you change the app. + +## Using a real device + +### How to prepare your DEVELOPMENT! device: + +> You can use an emulated device for development. This is only required if you are using a physical device +> +> **Please do not use a Ledger device with funds for development purposes.** +>> +> **Have a separate and marked device that is used ONLY for development and testing** + + There are a few additional steps that increase reproducibility and simplify development: + +**1 - Ensure your device works in your OS** +- In Linux hosts it might be necessary to adjust udev rules, etc. + + Refer to Ledger documentation: https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues + +**2 - Set a test mnemonic** + +Many of our integration tests expect the device to be configured with a known test mnemonic. + +- Plug your device while pressing the right button + +- Your device will show "Recovery" in the screen + +- Double click + +- Run `make dev_init`. This will take about 2 minutes. The device will be initialized to: + + ``` + PIN: 5555 + Mnemonic: equip will roof matter pink blind book anxiety banner elbow sun young + ``` + +**3 - Add a development certificate** + +- Plug your device while pressing the right button + +- Your device will show "Recovery" in the screen + +- Click both buttons at the same time + +- Enter your pin if necessary + +- Run `make dev_ca`. The device will receive a development certificate to avoid constant manual confirmations. + + +### Loading into your development device + +The Makefile will build the firmware in a docker container and leave the binary in the correct directory. + +- Build + + ``` + make # Builds the app + ``` + +- Upload to a device + The following command will upload the application to the ledger. _Warning: The application will be deleted before uploading._ + ``` + make load # Builds and loads the app to the device + ``` + +## APDU Specifications + +- [APDU Protocol](docs/APDUSPEC.md) diff --git a/app/Cargo.lock b/app/Cargo.lock index 577679cd..500dcba5 100644 --- a/app/Cargo.lock +++ b/app/Cargo.lock @@ -838,16 +838,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "include_gif" -version = "1.2.0" -source = "git+https://github.com/Zondax/ledger-device-rust-sdk?rev=9408c1ffc278a363e1903b4cc0b765a31c4eeace#9408c1ffc278a363e1903b4cc0b765a31c4eeace" -dependencies = [ - "flate2", - "image", - "syn 1.0.109", -] - [[package]] name = "inout" version = "0.1.3" @@ -960,7 +950,7 @@ dependencies = [ "getrandom", "group 0.12.1", "hex", - "include_gif 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "include_gif", "insta", "ironfish-frost", "jubjub", @@ -978,11 +968,12 @@ dependencies = [ [[package]] name = "ledger_device_sdk" -version = "1.17.0" -source = "git+https://github.com/Zondax/ledger-device-rust-sdk?rev=9408c1ffc278a363e1903b4cc0b765a31c4eeace#9408c1ffc278a363e1903b4cc0b765a31c4eeace" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5994587541e97058c8acfac99dbd3130b65d7daba2221d4917f0be72de0ce5c" dependencies = [ "const-zero", - "include_gif 1.2.0 (git+https://github.com/Zondax/ledger-device-rust-sdk?rev=9408c1ffc278a363e1903b4cc0b765a31c4eeace)", + "include_gif", "ledger_secure_sdk_sys", "num-traits", "numtoa", @@ -993,7 +984,8 @@ dependencies = [ [[package]] name = "ledger_secure_sdk_sys" version = "1.5.0" -source = "git+https://github.com/Zondax/ledger-device-rust-sdk?rev=9408c1ffc278a363e1903b4cc0b765a31c4eeace#9408c1ffc278a363e1903b4cc0b765a31c4eeace" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc289cbd2e3d451002a1cba0c71aeee97a5c7745e0570f05a665a8d9f8971688" dependencies = [ "bindgen", "cc", diff --git a/app/Cargo.toml b/app/Cargo.toml index d0438396..f94de36c 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ledger-ironfish-dkg" -version = "0.0.0" # The version is being taken from Makefile.version file +version = "0.0.0" # The version is being taken from Makefile.version file edition = "2021" [[bin]] @@ -9,8 +9,8 @@ test = false path = "bin-app/app.rs" [dependencies] -ledger_device_sdk = { git = "https://github.com/Zondax/ledger-device-rust-sdk", rev = "9408c1ffc278a363e1903b4cc0b765a31c4eeace", optional = true } -# ledger_device_sdk = { version="1.14.0" , optional = true} +# ledger_device_sdk = { git = "https://github.com/Zondax/ledger-device-rust-sdk", rev = "923e5cf53d09e0e81c64eecc92c26800fad4bf45", optional = true } +ledger_device_sdk = { version = "1.17.1", optional = true } # ledger_device_sdk = { path="../../ledger-device-rust-sdk/ledger_device_sdk" , optional = true} include_gif = "1.2.0" serde = { version = "1.0.192", default_features = false, features = ["derive"] } @@ -44,7 +44,9 @@ lazy_static = { version = "1.5.0", default-features = false, features = [ spin = { version = "0.9.8", default-features = false, features = [ "spin_mutex", ], optional = true } -lexical-core = { version = "1.0.1", default-features = false, features = ["write-integers"] } +lexical-core = { version = "1.0.1", default-features = false, features = [ + "write-integers", +] } [dev-dependencies] lazy_static = { version = "1.5.0" } @@ -70,6 +72,8 @@ lto = true [features] default = ["ledger"] ledger = ["ledger_device_sdk", "spin", "lazy_static/spin_no_std"] +# This will require to use zondax ledger device sdk, where zlog is added. +ledger-debug = ["ledger_device_sdk", "spin", "lazy_static/spin_no_std"] [package.metadata.ledger] curve = ["ed25519"] diff --git a/app/Makefile.version b/app/Makefile.version index 45073748..0c3f9cd0 100644 --- a/app/Makefile.version +++ b/app/Makefile.version @@ -3,4 +3,4 @@ APPVERSION_M=0 # This is the minor version APPVERSION_N=5 # This is the patch version -APPVERSION_P=1 +APPVERSION_P=2 diff --git a/app/src/app_ui/run_action.rs b/app/src/app_ui/run_action.rs index 4499d826..8150cab6 100644 --- a/app/src/app_ui/run_action.rs +++ b/app/src/app_ui/run_action.rs @@ -87,7 +87,7 @@ pub fn ui_review_transaction<'a>( .map(|(name, value)| Field { name, value }) .collect(); - let mut review = NbglReview::new() + let review = NbglReview::new() .tx_type(TransactionType::Transaction) .titles("Review", "Transaction", "Approve Transaction?") .glyph(&FERRIS); @@ -391,7 +391,7 @@ pub fn ui_review<'a>( #[cfg(target_os = "flex")] const ICON: NbglGlyph = NbglGlyph::from_include(include_gif!("flex_icon.gif", NBGL)); - let mut review = NbglReview::new() + let review = NbglReview::new() .tx_type(TransactionType::Operation) .light() .titles(title, _subtitle, _finish_title) diff --git a/app/src/bolos.rs b/app/src/bolos.rs index 5827f446..3c2d6343 100644 --- a/app/src/bolos.rs +++ b/app/src/bolos.rs @@ -1,4 +1,4 @@ -#[cfg(feature = "ledger")] +#[cfg(feature = "ledger-debug")] extern "C" { fn check_app_canary(); fn zemu_log_stack(ctx: *const u8); @@ -7,14 +7,14 @@ extern "C" { } pub fn app_canary() { - #[cfg(feature = "ledger")] + #[cfg(feature = "ledger-debug")] unsafe { check_app_canary() } } pub fn zlog(_buf: &str) { - #[cfg(feature = "ledger")] + #[cfg(feature = "ledger-debug")] unsafe { zemu_log(_buf.as_bytes().as_ptr()) } @@ -23,7 +23,7 @@ pub fn zlog(_buf: &str) { } pub fn zlog_stack(_buf: &str) { - #[cfg(feature = "ledger")] + #[cfg(feature = "ledger-debug")] unsafe { zemu_log_stack(_buf.as_bytes().as_ptr()) } @@ -31,9 +31,9 @@ pub fn zlog_stack(_buf: &str) { std::println!("{_buf}") } -pub fn zlog_num(buf: &str, num: u32) { - #[cfg(feature = "ledger")] +pub fn zlog_num(_buf: &str, _num: u32) { + #[cfg(feature = "ledger-debug")] unsafe { - zemu_log_num(buf.as_bytes().as_ptr(), num) + zemu_log_num(_buf.as_bytes().as_ptr(), _num) } } diff --git a/docs/APDUSPEC.md b/docs/APDUSPEC.md new file mode 100644 index 00000000..712f1299 --- /dev/null +++ b/docs/APDUSPEC.md @@ -0,0 +1,580 @@ +# Ironfish App + +## General structure + +The general structure of commands and responses is as follows: + +### Commands + +| Field | Type | Content | Note | +| :------ | :------- | :--------------------- | ---- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | | +| P1 | byte (1) | Parameter 1 | | +| P2 | byte (1) | Parameter 2 | | +| L | byte (1) | Bytes in payload | | +| PAYLOAD | byte (L) | Payload | | + +### Response + +| Field | Type | Content | Note | +| ------- | -------- | ----------- | ------------------------ | +| ANSWER | byte (?) | Answer | depends on the command | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +### Return codes + +| Return code | Description | +| ----------- | ------------------------ | +| 0x6985 | Deny | +| 0x6A86 | Wrong P1/P2 | +| 0x6D00 | INS not supported | +| 0x6E00 | CLA not supported | +| 0xB001 | Tx display fail | +| 0xB002 | Addr display fail | +| 0xB004 | Tx wrong length | +| 0xB005 | Tx parsing fail | +| 0xB006 | Tx hash fail | +| 0xB008 | Tx sign fail | +| 0xB009 | Key derive fail | +| 0xB00A | Version parsing fail | +| 0xB00B | Dkg round 2 fail | +| 0xB00C | Dkg round 3 fail | +| 0xB00D | Invalid key type | +| 0xB00E | Invalid identity | +| 0xB00F | Invalid payload | +| 0xB010 | Buffer out of bounds | +| 0xB011 | Invalid signing package | +| 0xB012 | Invalid randomizer | +| 0xB013 | Invalid signing nonces | +| 0xB014 | Invalid identity index | +| 0xB015 | Invalid key package | +| 0xB016 | Invalid public package | +| 0xB017 | Invalid group secret key | +| 0xB018 | Invalid scalar | +| 0xB019 | Decryption fail | +| 0xB020 | Encryption fail | +| 0xB021 | Invalid NVM write | +| 0xB022 | Invalid Dkg status | +| 0xB023 | Invalid Dkg keys version | +| 0xB024 | Too many participants | +| 0xB025 | Invalid Tx hash | +| 0x9000 | Success | + +--- + +## Command definition + +### GET_VERSION + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | -------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x00 | +| P1 | byte (1) | Parameter 1 | ignored | +| P2 | byte (1) | Parameter 2 | ignored | +| L | byte (1) | Bytes in payload | 0 | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ---------------- | ------------------------------- | +| TEST | byte (1) | Test Mode | 0xFF means test mode is enabled | +| MAJOR | byte (2) | Version Major | 0..65535 | +| MINOR | byte (2) | Version Minor | 0..65535 | +| PATCH | byte (2) | Version Patch | 0..65535 | +| LOCKED | byte (1) | Device is locked | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_GET_IDENTITY + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ------------------------- | -------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x10 | +| P1 | byte (1) | Request User confirmation | No = 0 | +| P2 | byte (1) | KeyType | 0 ~ 3 | +| L | byte (1) | Bytes in payload | 0 | + +#### Response + +| Field | Type | Content | Note | +| ------------ | ---------- | ------------ | ------------------------ | +| DKG Identity | byte (129) | DKG Identity | The derived DKG identity | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_GET_KEYS + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ------------------------- | -------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x16 | +| P1 | byte (1) | Request User confirmation | No = 0 | +| P2 | byte (1) | --- | not used | +| L | byte (1) | Bytes in payload | 1 | +| Index | byte (1) | Identity to derive | 0 ~ 5 | + +#### Response + +If the input parameters are wrong or some error happens during the computation of this command, the app will return only the error code. + +**|---> For KeyType = 0 (PublicAddress)** + +| Field | Type | Content | Note | +| ------- | --------- | -------------- | ------------------------ | +| Address | byte (32) | Public address | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +**|---> For KeyType = 1 (ViewKey)** + +| Field | Type | Content | Note | +| ------- | --------- | ------------------ | ------------------------ | +| ViewKey | byte (64) | ViewKey | {ak, nk} | +| IVK | byte (32) | IncomingViewingKey | {ivk} | +| OVK | byte (32) | OutgoingViewingKey | {ovk} | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +**|---> For KeyType = 2 (ProofGenerationKey)** + +| Field | Type | Content | Note | +| ------------------- | --------- | ------------------ | ------------------------ | +| ProofGeneration key | byte (64) | ProofGenerationKey | {ak, nsk} | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +**|---> For KeyType = 3 (Current DKG Identity)** + +| Field | Type | Content | Note | +| ------------ | ---------- | ------------ | ------------------------------------------------------ | +| DKG Identity | byte (129) | DKG Identity | The DKG identity used for the current multisig account | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_SIGN + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | --------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x15 | +| P1 | byte (1) | Payload desc | 0 = init | +| | | | 1 = add | +| | | | 2 = last | +| P2 | byte (1) | ---- | not used | +| L | byte (1) | Bytes in payload | (depends) | + +The first packet/chunk includes only the derivation path + +All other packets/chunks contain data chunks that are described below + +##### First Packet + +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | -------- | +| Path[0] | byte (4) | Derivation Path Data | 44 | +| Path[1] | byte (4) | Derivation Path Data | 434 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | + +##### Other Chunks/Packets + +| Field | Type | Content | Expected | +| --------------------------- | --------- | ------------------------------------- | -------- | +| TxRandomizer Len | byte (2) | Tx randomizer value len (u16 be) | | +| TxRandomizer Content | bytes... | Tx randomizer value | | +| FrostSigningPackage Len | byte (2) | Tx frost signing package len (u16 be) | | +| FrostSigningPackage Content | bytes... | Tx frost signing package | | +| Tx Hash | byte (32) | Tx Hash | | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_ROUND_1 + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | --------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x11 | +| P1 | byte (1) | Payload desc | 0 = init | +| | | | 1 = add | +| | | | 2 = last | +| P2 | byte (1) | ---- | not used | +| L | byte (1) | Bytes in payload | (depends) | + +The first packet/chunk includes only the derivation path + +All other packets/chunks contain data chunks that are described below + +##### First Packet + +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | -------- | +| Path[0] | byte (4) | Derivation Path Data | 44 | +| Path[1] | byte (4) | Derivation Path Data | 434 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | + +##### Other Chunks/Packets + +| Field | Type | Content | Expected | +| ------------------- | -------- | ------------------------------------------ | -------- | +| Identity Index | byte (1) | DKG Identities Index to derive secret from | | +| Identities Elements | byte (1) | Identities qty (u8) | | +| Identities | bytes... | Identities involved on the DKG process | | +| Min Signers | byte (1) | Minimum signers for the DKG process | | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_ROUND_2 + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | --------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x12 | +| P1 | byte (1) | Payload desc | 0 = init | +| | | | 1 = add | +| | | | 2 = last | +| P2 | byte (1) | ---- | not used | +| L | byte (1) | Bytes in payload | (depends) | + +The first packet/chunk includes only the derivation path + +All other packets/chunks contain data chunks that are described below + +##### First Packet + +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | -------- | +| Path[0] | byte (4) | Derivation Path Data | 44 | +| Path[1] | byte (4) | Derivation Path Data | 434 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | + +##### Other Chunks/Packets + +| Field | Type | Content | Expected | +| -------------------------- | -------- | ------------------------------------------------------- | --------- | +| Identity Index | byte (1) | DKG Identities Index to derive secret from | (depends) | +| Round 1 PP Qty | byte (1) | Qty of round 1 public packages (u8) | (depends) | +| Round 1 Package Len | byte (1) | Length of each public package | (depends) | +| Round 1 Packages | bytes... | Round 1 public package from participants (concatenated) | (depends) | +| Round 1 Secret Package Len | byte (1) | Length of the secret package | (depends) | +| Round 1 Secret Package | bytes... | Secret pakcage generated on round 1 | (depends) | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_ROUND_3 + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | --------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x15 | +| P1 | byte (1) | Payload desc | 0 = init | +| | | | 1 = add | +| | | | 2 = last | +| P2 | byte (1) | ---- | not used | +| L | byte (1) | Bytes in payload | (depends) | + +The first packet/chunk includes only the derivation path + +All other packets/chunks contain data chunks that are described below + +##### First Packet + +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | -------- | +| Path[0] | byte (4) | Derivation Path Data | 44 | +| Path[1] | byte (4) | Derivation Path Data | 434 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | + +##### Other Chunks/Packets + +| Field | Type | Content | Expected | +| -------------------------- | -------- | ------------------------------------------------------- | --------- | +| Identity Index | byte (1) | DKG Identities Index to derive secret from | (depends) | +| Round 1 PP Qty | byte (1) | Qty of round 1 public packages (u8) | (depends) | +| Round 1 Package Len | byte (1) | Length of each public package | (depends) | +| Round 1 Packages | bytes... | Round 1 public package from participants (concatenated) | (depends) | +| Round 2 PP Qty | byte (1) | Qty of round 2 public packages (u8) | (depends) | +| Round 2 Package Len | byte (1) | Length of each public package | (depends) | +| Round 2 Packages | bytes... | Round 2 public package from participants (concatenated) | (depends) | +| Round 2 Secret Package Len | byte (1) | Length of the secret package | (depends) | +| Round 2 Secret Package | bytes... | Secret pakcage generated on round 2 | (depends) | +| Identities Qty | byte (1) | Identities qty (u8) | (depends) | +| Identities | bytes... | Identities involved on the DKG process | (depends) | +| GSK Qty | byte (1) | Qty of group shared keys (u8) | (depends) | +| GSK Len | byte (1) | Length of each group shared keys | (depends) | +| GSK | bytes... | Group shared keys from participants (concatenated) | (depends) | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_COMMITMETS + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | --------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x14 | +| P1 | byte (1) | Payload desc | 0 = init | +| | | | 1 = add | +| | | | 2 = last | +| P2 | byte (1) | ---- | not used | +| L | byte (1) | Bytes in payload | (depends) | + +The first packet/chunk includes only the derivation path + +All other packets/chunks contain data chunks that are described below + +##### First Packet + +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | -------- | +| Path[0] | byte (4) | Derivation Path Data | 44 | +| Path[1] | byte (4) | Derivation Path Data | 434 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | + +##### Other Chunks/Packets + +| Field | Type | Content | Expected | +| ------- | --------- | ---------------------------------- | --------- | +| Tx Hash | byte (32) | Tx hash to calculated commitmet to | (depends) | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_GET_IDENTITIES + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | -------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x17 | +| P1 | byte (1) | Parameter 1 | ignored | +| P2 | byte (1) | Parameter 2 | ignored | +| L | byte (1) | Bytes in payload | 0 | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_GET_PUBLIC_PACKAGE + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | -------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x18 | +| P1 | byte (1) | Parameter 1 | ignored | +| P2 | byte (1) | Parameter 2 | ignored | +| L | byte (1) | Bytes in payload | 0 | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +--- + +### INS_DKG_BACKUP_KEYS + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | -------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x19 | +| P1 | byte (1) | Parameter 1 | ignored | +| P2 | byte (1) | Parameter 2 | ignored | +| L | byte (1) | Bytes in payload | 0 | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_DKG_RESTORE_KEYS + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | --------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x1a | +| P1 | byte (1) | Payload desc | 0 = init | +| | | | 1 = add | +| | | | 2 = last | +| P2 | byte (1) | ---- | not used | +| L | byte (1) | Bytes in payload | (depends) | + +The first packet/chunk includes only the derivation path + +All other packets/chunks contain data chunks that are described below + +##### First Packet + +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | -------- | +| Path[0] | byte (4) | Derivation Path Data | 44 | +| Path[1] | byte (4) | Derivation Path Data | 434 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | + +##### Other Chunks/Packets + +| Field | Type | Content | Expected | +| ---------------- | -------- | --------------------------------------- | --------- | +| Encrypted Backup | bytes... | Encrypted data from backup keys command | (depends) | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ----------- | ------------------------ | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_REVIEW_TX + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | --------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x1c | +| P1 | byte (1) | Payload desc | 0 = init | +| | | | 1 = add | +| | | | 2 = last | +| P2 | byte (1) | ---- | not used | +| L | byte (1) | Bytes in payload | (depends) | + +The first packet/chunk includes only the derivation path + +All other packets/chunks contain data chunks that are described below + +##### First Packet + +| Field | Type | Content | Expected | +| ------- | -------- | -------------------- | -------- | +| Path[0] | byte (4) | Derivation Path Data | 44 | +| Path[1] | byte (4) | Derivation Path Data | 434 | +| Path[2] | byte (4) | Derivation Path Data | ? | +| Path[3] | byte (4) | Derivation Path Data | ? | +| Path[4] | byte (4) | Derivation Path Data | ? | + +##### Other Chunks/Packets + +| Field | Type | Content | Expected | +| ------------- | -------- | -------------------------- | --------- | +| Serialized Tx | bytes... | Serialized tx to be signed | (depends) | + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ------------------------------ | ------------------------ | +| CHUNKS | byte (1) | Chunks of data to be retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- + +### INS_GET_RESULT + +#### Command + +| Field | Type | Content | Expected | +| ----- | -------- | ---------------------- | -------- | +| CLA | byte (1) | Application Identifier | 0x63 | +| INS | byte (1) | Instruction ID | 0x1b | +| P1 | byte (1) | Chunk index to fetch | 0..255 | +| P2 | byte (1) | ---- | not used | +| L | byte (0) | Bytes in payload | not used | + +Some instructions save the result on flash once executed. The response on those cases is the amount of pages/chunks (data len / 253) to fetch. This command allows to fetch those pages/chunks. + +#### Response + +| Field | Type | Content | Note | +| ------- | -------- | ----------------------- | ------------------------ | +| CHUNK | bytes... | Chunk of data retrieved | | +| SW1-SW2 | byte (2) | Return code | see list of return codes | + +--- diff --git a/tests_zemu/snapshots/fl-dkg-1-backup-keys/00000.png b/tests_zemu/snapshots/fl-dkg-1-backup-keys/00000.png index bf416e80..0c1b3338 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-backup-keys/00000.png and b/tests_zemu/snapshots/fl-dkg-1-backup-keys/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-backup-keys/00001.png b/tests_zemu/snapshots/fl-dkg-1-backup-keys/00001.png index 701cc8a0..61b7b155 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-backup-keys/00001.png and b/tests_zemu/snapshots/fl-dkg-1-backup-keys/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-identity/00001.png b/tests_zemu/snapshots/fl-dkg-1-identity/00001.png index b83f15f3..6d75bb52 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-identity/00001.png and b/tests_zemu/snapshots/fl-dkg-1-identity/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-proof-keys/00000.png b/tests_zemu/snapshots/fl-dkg-1-proof-keys/00000.png index e338c437..e2c6836b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-proof-keys/00000.png and b/tests_zemu/snapshots/fl-dkg-1-proof-keys/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-proof-keys/00001.png b/tests_zemu/snapshots/fl-dkg-1-proof-keys/00001.png index c1c82b10..de6c3dc0 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-proof-keys/00001.png and b/tests_zemu/snapshots/fl-dkg-1-proof-keys/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-public-addr/00000.png b/tests_zemu/snapshots/fl-dkg-1-public-addr/00000.png index e338c437..e2c6836b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-public-addr/00000.png and b/tests_zemu/snapshots/fl-dkg-1-public-addr/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-public-addr/00001.png b/tests_zemu/snapshots/fl-dkg-1-public-addr/00001.png index 71df2eec..dc224958 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-public-addr/00001.png and b/tests_zemu/snapshots/fl-dkg-1-public-addr/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-restore-keys/00000.png b/tests_zemu/snapshots/fl-dkg-1-restore-keys/00000.png index 8d7940ae..0f868264 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-restore-keys/00000.png and b/tests_zemu/snapshots/fl-dkg-1-restore-keys/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-restore-keys/00001.png b/tests_zemu/snapshots/fl-dkg-1-restore-keys/00001.png index 701cc8a0..61b7b155 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-restore-keys/00001.png and b/tests_zemu/snapshots/fl-dkg-1-restore-keys/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-view-keys/00000.png b/tests_zemu/snapshots/fl-dkg-1-view-keys/00000.png index 80803202..383cbb51 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-view-keys/00000.png and b/tests_zemu/snapshots/fl-dkg-1-view-keys/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-1-view-keys/00001.png b/tests_zemu/snapshots/fl-dkg-1-view-keys/00001.png index a529523e..f30bee8d 100644 Binary files a/tests_zemu/snapshots/fl-dkg-1-view-keys/00001.png and b/tests_zemu/snapshots/fl-dkg-1-view-keys/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-0/00000.png b/tests_zemu/snapshots/fl-dkg-identity-0/00000.png index 88759f0c..18461de7 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-0/00000.png and b/tests_zemu/snapshots/fl-dkg-identity-0/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-0/00001.png b/tests_zemu/snapshots/fl-dkg-identity-0/00001.png index b83f15f3..9b4b19da 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-0/00001.png and b/tests_zemu/snapshots/fl-dkg-identity-0/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-1/00000.png b/tests_zemu/snapshots/fl-dkg-identity-1/00000.png index 88759f0c..18461de7 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-1/00000.png and b/tests_zemu/snapshots/fl-dkg-identity-1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-1/00001.png b/tests_zemu/snapshots/fl-dkg-identity-1/00001.png index 3cea36eb..f71a4d03 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-1/00001.png and b/tests_zemu/snapshots/fl-dkg-identity-1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-2/00000.png b/tests_zemu/snapshots/fl-dkg-identity-2/00000.png index 88759f0c..18461de7 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-2/00000.png and b/tests_zemu/snapshots/fl-dkg-identity-2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-2/00001.png b/tests_zemu/snapshots/fl-dkg-identity-2/00001.png index aa99d0d0..0e49ed9b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-2/00001.png and b/tests_zemu/snapshots/fl-dkg-identity-2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-3/00000.png b/tests_zemu/snapshots/fl-dkg-identity-3/00000.png index 88759f0c..18461de7 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-3/00000.png and b/tests_zemu/snapshots/fl-dkg-identity-3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-3/00001.png b/tests_zemu/snapshots/fl-dkg-identity-3/00001.png index 6d75bb52..471b46a0 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-3/00001.png and b/tests_zemu/snapshots/fl-dkg-identity-3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-4/00000.png b/tests_zemu/snapshots/fl-dkg-identity-4/00000.png index 88759f0c..18461de7 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-4/00000.png and b/tests_zemu/snapshots/fl-dkg-identity-4/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-4/00001.png b/tests_zemu/snapshots/fl-dkg-identity-4/00001.png index 95612f47..27fcae7c 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-4/00001.png and b/tests_zemu/snapshots/fl-dkg-identity-4/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-5/00000.png b/tests_zemu/snapshots/fl-dkg-identity-5/00000.png index 88759f0c..18461de7 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-5/00000.png and b/tests_zemu/snapshots/fl-dkg-identity-5/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-identity-5/00001.png b/tests_zemu/snapshots/fl-dkg-identity-5/00001.png index ac51efc3..cf5849ef 100644 Binary files a/tests_zemu/snapshots/fl-dkg-identity-5/00001.png and b/tests_zemu/snapshots/fl-dkg-identity-5/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round1/00001.png index 3b335ec6..438acd8f 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round2/00001.png index 657dd96c..aa77262a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round3/00001.png index 7435266a..5fc510d3 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-0-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-0-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round1/00001.png index 31009c3e..bcaf443a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round2/00001.png index 443e0b8a..489d3262 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round3/00001.png index 8ed85a3c..266db490 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p2-m2-1-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p2-m2-1-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round1/00001.png index 0fe04a6f..7e46bab1 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round2/00001.png index 026b1c5a..1b620708 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round3/00001.png index 049b06bc..a6c43a49 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-0-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-0-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round1/00001.png index 74eb47e0..5fb0e618 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round2/00001.png index 27bfa57a..dc3a0a7d 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round3/00001.png index 75ea9122..3748a8b9 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-1-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-1-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round1/00001.png index 898c4d9e..7999d0d2 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round2/00001.png index 777f2696..cf71c6c9 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round3/00001.png index fa985be4..7900d30a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p3-m2-2-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p3-m2-2-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round1/00001.png index c5a3bd77..58708630 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round2/00001.png index 71c28e08..aff31504 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round3/00001.png index 433a503c..b05cf92a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-0-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-0-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round1/00001.png index e7a4f0a6..0ec4e9ed 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round2/00001.png index 8d519b28..b0778d25 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round3/00001.png index 31310be9..9883e893 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-1-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-1-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round1/00001.png index 5f9cd139..0bffc48a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round2/00001.png index 55cdbcba..b53793cd 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round3/00001.png index 0b3143a9..595323ad 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-2-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-2-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round1/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round1/00000.png index 6efb6da7..7eb52611 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round1/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round1/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round1/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round1/00001.png index f87accc2..fae83ae6 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round1/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round1/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round2/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round2/00000.png index 821789d1..df8a549a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round2/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round2/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round2/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round2/00001.png index 9b79d57a..2d6aa3b3 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round2/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round2/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round3/00000.png b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round3/00000.png index d5aff29f..b1fa399b 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round3/00000.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round3/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round3/00001.png b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round3/00001.png index 816a4882..22e2e738 100644 Binary files a/tests_zemu/snapshots/fl-dkg-p4-m2-3-round3/00001.png and b/tests_zemu/snapshots/fl-dkg-p4-m2-3-round3/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-sign-1-restore-keys/00000.png b/tests_zemu/snapshots/fl-dkg-sign-1-restore-keys/00000.png index 8d7940ae..0f868264 100644 Binary files a/tests_zemu/snapshots/fl-dkg-sign-1-restore-keys/00000.png and b/tests_zemu/snapshots/fl-dkg-sign-1-restore-keys/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-sign-1-restore-keys/00001.png b/tests_zemu/snapshots/fl-dkg-sign-1-restore-keys/00001.png index 701cc8a0..61b7b155 100644 Binary files a/tests_zemu/snapshots/fl-dkg-sign-1-restore-keys/00001.png and b/tests_zemu/snapshots/fl-dkg-sign-1-restore-keys/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00000.png b/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00000.png index 52230648..bc0265f5 100644 Binary files a/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00000.png and b/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00000.png differ diff --git a/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00001.png b/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00001.png index 31119fc4..2604847a 100644 Binary files a/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00001.png and b/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00001.png differ diff --git a/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00004.png b/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00004.png index eab2477d..64bf5bbd 100644 Binary files a/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00004.png and b/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00004.png differ diff --git a/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00005.png b/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00005.png index e66bd7d0..41dc54b6 100644 Binary files a/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00005.png and b/tests_zemu/snapshots/fl-dkg-sign-1-review-transaction/00005.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00001.png new file mode 100644 index 00000000..7cd8ae05 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00001.png new file mode 100644 index 00000000..7cd8ae05 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p2-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00001.png new file mode 100644 index 00000000..979a8b18 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00001.png new file mode 100644 index 00000000..979a8b18 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00001.png new file mode 100644 index 00000000..979a8b18 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p3-m2-2-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00001.png new file mode 100644 index 00000000..b599c238 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00001.png new file mode 100644 index 00000000..b599c238 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00001.png new file mode 100644 index 00000000..b599c238 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-2-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00000.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00000.png new file mode 100644 index 00000000..0c1b3338 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00001.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00001.png new file mode 100644 index 00000000..b599c238 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00002.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00002.png new file mode 100644 index 00000000..02027fe4 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00003.png b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00003.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-dkg-p4-m2-3-backup/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-review-transaction/00000.png b/tests_zemu/snapshots/fl-tmp-review-transaction/00000.png new file mode 100644 index 00000000..bc0265f5 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-review-transaction/00000.png differ diff --git a/tests_zemu/snapshots/fl-tmp-review-transaction/00001.png b/tests_zemu/snapshots/fl-tmp-review-transaction/00001.png new file mode 100644 index 00000000..0a623f44 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-review-transaction/00001.png differ diff --git a/tests_zemu/snapshots/fl-tmp-review-transaction/00002.png b/tests_zemu/snapshots/fl-tmp-review-transaction/00002.png new file mode 100644 index 00000000..3d132594 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-review-transaction/00002.png differ diff --git a/tests_zemu/snapshots/fl-tmp-review-transaction/00003.png b/tests_zemu/snapshots/fl-tmp-review-transaction/00003.png new file mode 100644 index 00000000..76d6c6cc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-review-transaction/00003.png differ diff --git a/tests_zemu/snapshots/fl-tmp-review-transaction/00004.png b/tests_zemu/snapshots/fl-tmp-review-transaction/00004.png new file mode 100644 index 00000000..8234fdfd Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-review-transaction/00004.png differ diff --git a/tests_zemu/snapshots/fl-tmp-review-transaction/00005.png b/tests_zemu/snapshots/fl-tmp-review-transaction/00005.png new file mode 100644 index 00000000..41dc54b6 Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-review-transaction/00005.png differ diff --git a/tests_zemu/snapshots/fl-tmp-review-transaction/00006.png b/tests_zemu/snapshots/fl-tmp-review-transaction/00006.png new file mode 100644 index 00000000..43555d3b Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-review-transaction/00006.png differ diff --git a/tests_zemu/snapshots/fl-tmp-review-transaction/00007.png b/tests_zemu/snapshots/fl-tmp-review-transaction/00007.png new file mode 100644 index 00000000..c4340efc Binary files /dev/null and b/tests_zemu/snapshots/fl-tmp-review-transaction/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-backup-keys/00000.png b/tests_zemu/snapshots/sp-dkg-1-backup-keys/00000.png index e1d96ead..0611dce7 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-backup-keys/00000.png and b/tests_zemu/snapshots/sp-dkg-1-backup-keys/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-backup-keys/00005.png b/tests_zemu/snapshots/sp-dkg-1-backup-keys/00005.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-backup-keys/00005.png and b/tests_zemu/snapshots/sp-dkg-1-backup-keys/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-backup-keys/00006.png b/tests_zemu/snapshots/sp-dkg-1-backup-keys/00006.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-backup-keys/00006.png and b/tests_zemu/snapshots/sp-dkg-1-backup-keys/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-identity/00000.png b/tests_zemu/snapshots/sp-dkg-1-identity/00000.png index 2e930e02..b878f3ca 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-identity/00000.png and b/tests_zemu/snapshots/sp-dkg-1-identity/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-identity/00001.png b/tests_zemu/snapshots/sp-dkg-1-identity/00001.png index b3bb937a..7c48715b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-identity/00001.png and b/tests_zemu/snapshots/sp-dkg-1-identity/00001.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-identity/00002.png b/tests_zemu/snapshots/sp-dkg-1-identity/00002.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-identity/00002.png and b/tests_zemu/snapshots/sp-dkg-1-identity/00002.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-identity/00003.png b/tests_zemu/snapshots/sp-dkg-1-identity/00003.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-identity/00003.png and b/tests_zemu/snapshots/sp-dkg-1-identity/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-proof-keys/00000.png b/tests_zemu/snapshots/sp-dkg-1-proof-keys/00000.png index 12d3ac28..1b4d9d53 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-proof-keys/00000.png and b/tests_zemu/snapshots/sp-dkg-1-proof-keys/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-proof-keys/00005.png b/tests_zemu/snapshots/sp-dkg-1-proof-keys/00005.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-proof-keys/00005.png and b/tests_zemu/snapshots/sp-dkg-1-proof-keys/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-proof-keys/00006.png b/tests_zemu/snapshots/sp-dkg-1-proof-keys/00006.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-proof-keys/00006.png and b/tests_zemu/snapshots/sp-dkg-1-proof-keys/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-public-addr/00000.png b/tests_zemu/snapshots/sp-dkg-1-public-addr/00000.png index 12d3ac28..1b4d9d53 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-public-addr/00000.png and b/tests_zemu/snapshots/sp-dkg-1-public-addr/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-public-addr/00003.png b/tests_zemu/snapshots/sp-dkg-1-public-addr/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-public-addr/00003.png and b/tests_zemu/snapshots/sp-dkg-1-public-addr/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-public-addr/00004.png b/tests_zemu/snapshots/sp-dkg-1-public-addr/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-public-addr/00004.png and b/tests_zemu/snapshots/sp-dkg-1-public-addr/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-restore-keys/00000.png b/tests_zemu/snapshots/sp-dkg-1-restore-keys/00000.png index 9a159645..13e766f3 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-restore-keys/00000.png and b/tests_zemu/snapshots/sp-dkg-1-restore-keys/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-restore-keys/00005.png b/tests_zemu/snapshots/sp-dkg-1-restore-keys/00005.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-restore-keys/00005.png and b/tests_zemu/snapshots/sp-dkg-1-restore-keys/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-restore-keys/00006.png b/tests_zemu/snapshots/sp-dkg-1-restore-keys/00006.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-restore-keys/00006.png and b/tests_zemu/snapshots/sp-dkg-1-restore-keys/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-view-keys/00000.png b/tests_zemu/snapshots/sp-dkg-1-view-keys/00000.png index 12d3ac28..1b4d9d53 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-view-keys/00000.png and b/tests_zemu/snapshots/sp-dkg-1-view-keys/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-view-keys/00008.png b/tests_zemu/snapshots/sp-dkg-1-view-keys/00008.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-view-keys/00008.png and b/tests_zemu/snapshots/sp-dkg-1-view-keys/00008.png differ diff --git a/tests_zemu/snapshots/sp-dkg-1-view-keys/00009.png b/tests_zemu/snapshots/sp-dkg-1-view-keys/00009.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-1-view-keys/00009.png and b/tests_zemu/snapshots/sp-dkg-1-view-keys/00009.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-0/00000.png b/tests_zemu/snapshots/sp-dkg-identity-0/00000.png index 2e930e02..b878f3ca 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-0/00000.png and b/tests_zemu/snapshots/sp-dkg-identity-0/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-0/00002.png b/tests_zemu/snapshots/sp-dkg-identity-0/00002.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-0/00002.png and b/tests_zemu/snapshots/sp-dkg-identity-0/00002.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-0/00003.png b/tests_zemu/snapshots/sp-dkg-identity-0/00003.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-0/00003.png and b/tests_zemu/snapshots/sp-dkg-identity-0/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-1/00000.png b/tests_zemu/snapshots/sp-dkg-identity-1/00000.png index 2e930e02..b878f3ca 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-1/00000.png and b/tests_zemu/snapshots/sp-dkg-identity-1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-1/00002.png b/tests_zemu/snapshots/sp-dkg-identity-1/00002.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-1/00002.png and b/tests_zemu/snapshots/sp-dkg-identity-1/00002.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-1/00003.png b/tests_zemu/snapshots/sp-dkg-identity-1/00003.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-1/00003.png and b/tests_zemu/snapshots/sp-dkg-identity-1/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-2/00000.png b/tests_zemu/snapshots/sp-dkg-identity-2/00000.png index 2e930e02..b878f3ca 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-2/00000.png and b/tests_zemu/snapshots/sp-dkg-identity-2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-2/00002.png b/tests_zemu/snapshots/sp-dkg-identity-2/00002.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-2/00002.png and b/tests_zemu/snapshots/sp-dkg-identity-2/00002.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-2/00003.png b/tests_zemu/snapshots/sp-dkg-identity-2/00003.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-2/00003.png and b/tests_zemu/snapshots/sp-dkg-identity-2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-3/00000.png b/tests_zemu/snapshots/sp-dkg-identity-3/00000.png index 2e930e02..b878f3ca 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-3/00000.png and b/tests_zemu/snapshots/sp-dkg-identity-3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-3/00002.png b/tests_zemu/snapshots/sp-dkg-identity-3/00002.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-3/00002.png and b/tests_zemu/snapshots/sp-dkg-identity-3/00002.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-3/00003.png b/tests_zemu/snapshots/sp-dkg-identity-3/00003.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-3/00003.png and b/tests_zemu/snapshots/sp-dkg-identity-3/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-4/00000.png b/tests_zemu/snapshots/sp-dkg-identity-4/00000.png index 2e930e02..b878f3ca 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-4/00000.png and b/tests_zemu/snapshots/sp-dkg-identity-4/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-4/00002.png b/tests_zemu/snapshots/sp-dkg-identity-4/00002.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-4/00002.png and b/tests_zemu/snapshots/sp-dkg-identity-4/00002.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-4/00003.png b/tests_zemu/snapshots/sp-dkg-identity-4/00003.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-4/00003.png and b/tests_zemu/snapshots/sp-dkg-identity-4/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-5/00000.png b/tests_zemu/snapshots/sp-dkg-identity-5/00000.png index 2e930e02..b878f3ca 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-5/00000.png and b/tests_zemu/snapshots/sp-dkg-identity-5/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-5/00002.png b/tests_zemu/snapshots/sp-dkg-identity-5/00002.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-5/00002.png and b/tests_zemu/snapshots/sp-dkg-identity-5/00002.png differ diff --git a/tests_zemu/snapshots/sp-dkg-identity-5/00003.png b/tests_zemu/snapshots/sp-dkg-identity-5/00003.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-identity-5/00003.png and b/tests_zemu/snapshots/sp-dkg-identity-5/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-0-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p2-m2-1-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-0-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-1-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p3-m2-2-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-0-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-1-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-2-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00000.png index 58c5e3d2..e5efbc0e 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00004.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00004.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00004.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00005.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00005.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00005.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round1/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00000.png index c5358bad..21abbd71 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00003.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00003.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00003.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00003.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00004.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00004.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00004.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round2/00004.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00000.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00000.png index 4372aec5..ce72dbb2 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00000.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00006.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00006.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00006.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00007.png b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00007.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00007.png and b/tests_zemu/snapshots/sp-dkg-p4-m2-3-round3/00007.png differ diff --git a/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00000.png b/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00000.png index 9a159645..13e766f3 100644 Binary files a/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00000.png and b/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00005.png b/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00005.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00005.png and b/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00005.png differ diff --git a/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00006.png b/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00006.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00006.png and b/tests_zemu/snapshots/sp-dkg-sign-1-restore-keys/00006.png differ diff --git a/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00000.png b/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00000.png index 9bc91322..ea847540 100644 Binary files a/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00000.png and b/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00000.png differ diff --git a/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00019.png b/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00019.png index 40b6e213..b77eec5b 100644 Binary files a/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00019.png and b/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00019.png differ diff --git a/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00020.png b/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00020.png index 141aeeb1..83832953 100644 Binary files a/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00020.png and b/tests_zemu/snapshots/sp-dkg-sign-1-review-transaction/00020.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00001.png new file mode 100644 index 00000000..a7f50f7d Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00002.png new file mode 100644 index 00000000..c0ea98a8 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00003.png new file mode 100644 index 00000000..ca4d0684 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-0-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00001.png new file mode 100644 index 00000000..a7f50f7d Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00002.png new file mode 100644 index 00000000..c0ea98a8 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00003.png new file mode 100644 index 00000000..ca4d0684 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p2-m2-1-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00001.png new file mode 100644 index 00000000..32ad87e0 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00002.png new file mode 100644 index 00000000..df4bc582 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00003.png new file mode 100644 index 00000000..2b743255 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-0-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00001.png new file mode 100644 index 00000000..32ad87e0 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00002.png new file mode 100644 index 00000000..df4bc582 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00003.png new file mode 100644 index 00000000..2b743255 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-1-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00001.png new file mode 100644 index 00000000..32ad87e0 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00002.png new file mode 100644 index 00000000..df4bc582 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00003.png new file mode 100644 index 00000000..2b743255 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p3-m2-2-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00001.png new file mode 100644 index 00000000..2533ebac Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00002.png new file mode 100644 index 00000000..c6ab9e4f Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00003.png new file mode 100644 index 00000000..1bcb9fde Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-0-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00001.png new file mode 100644 index 00000000..2533ebac Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00002.png new file mode 100644 index 00000000..c6ab9e4f Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00003.png new file mode 100644 index 00000000..1bcb9fde Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-1-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00001.png new file mode 100644 index 00000000..2533ebac Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00002.png new file mode 100644 index 00000000..c6ab9e4f Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00003.png new file mode 100644 index 00000000..1bcb9fde Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-2-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00000.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00000.png new file mode 100644 index 00000000..0611dce7 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00001.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00001.png new file mode 100644 index 00000000..2533ebac Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00002.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00002.png new file mode 100644 index 00000000..c6ab9e4f Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00003.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00003.png new file mode 100644 index 00000000..1bcb9fde Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00004.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00004.png new file mode 100644 index 00000000..44d07229 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00005.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00005.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00006.png b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00006.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-dkg-p4-m2-3-backup/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00000.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00000.png new file mode 100644 index 00000000..ea847540 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00000.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00001.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00001.png new file mode 100644 index 00000000..de81e15b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00001.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00002.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00002.png new file mode 100644 index 00000000..d5075ba4 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00002.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00003.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00003.png new file mode 100644 index 00000000..bbeedbeb Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00003.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00004.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00004.png new file mode 100644 index 00000000..787102d6 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00004.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00005.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00005.png new file mode 100644 index 00000000..7e3caeeb Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00005.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00006.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00006.png new file mode 100644 index 00000000..e5f44ed0 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00006.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00007.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00007.png new file mode 100644 index 00000000..74d64632 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00007.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00008.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00008.png new file mode 100644 index 00000000..d9924075 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00008.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00009.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00009.png new file mode 100644 index 00000000..09363c32 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00009.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00010.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00010.png new file mode 100644 index 00000000..90a03abd Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00010.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00011.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00011.png new file mode 100644 index 00000000..dc0288bc Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00011.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00012.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00012.png new file mode 100644 index 00000000..95808d30 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00012.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00013.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00013.png new file mode 100644 index 00000000..1814bce0 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00013.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00014.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00014.png new file mode 100644 index 00000000..2f0ccb06 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00014.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00015.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00015.png new file mode 100644 index 00000000..8179a020 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00015.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00016.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00016.png new file mode 100644 index 00000000..645a8610 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00016.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00017.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00017.png new file mode 100644 index 00000000..4c8283d9 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00017.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00018.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00018.png new file mode 100644 index 00000000..149ec2f9 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00018.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00019.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00019.png new file mode 100644 index 00000000..b77eec5b Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00019.png differ diff --git a/tests_zemu/snapshots/sp-tmp-review-transaction/00020.png b/tests_zemu/snapshots/sp-tmp-review-transaction/00020.png new file mode 100644 index 00000000..83832953 Binary files /dev/null and b/tests_zemu/snapshots/sp-tmp-review-transaction/00020.png differ diff --git a/tests_zemu/snapshots/st-dkg-1-identity/00001.png b/tests_zemu/snapshots/st-dkg-1-identity/00001.png index 640c7a20..2243ff83 100644 Binary files a/tests_zemu/snapshots/st-dkg-1-identity/00001.png and b/tests_zemu/snapshots/st-dkg-1-identity/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00001.png new file mode 100644 index 00000000..3e9475fa Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00001.png new file mode 100644 index 00000000..3e9475fa Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p2-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00001.png new file mode 100644 index 00000000..5b5f6df1 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00001.png new file mode 100644 index 00000000..5b5f6df1 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00001.png new file mode 100644 index 00000000..5b5f6df1 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p3-m2-2-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00001.png new file mode 100644 index 00000000..20c22179 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-0-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00001.png new file mode 100644 index 00000000..20c22179 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-1-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00001.png new file mode 100644 index 00000000..20c22179 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-2-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00000.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00000.png new file mode 100644 index 00000000..e7f8905f Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00001.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00001.png new file mode 100644 index 00000000..20c22179 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00002.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00002.png new file mode 100644 index 00000000..2d2762b8 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00003.png b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00003.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-dkg-p4-m2-3-backup/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-review-transaction/00000.png b/tests_zemu/snapshots/st-tmp-review-transaction/00000.png new file mode 100644 index 00000000..18cf8503 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-review-transaction/00000.png differ diff --git a/tests_zemu/snapshots/st-tmp-review-transaction/00001.png b/tests_zemu/snapshots/st-tmp-review-transaction/00001.png new file mode 100644 index 00000000..95262231 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-review-transaction/00001.png differ diff --git a/tests_zemu/snapshots/st-tmp-review-transaction/00002.png b/tests_zemu/snapshots/st-tmp-review-transaction/00002.png new file mode 100644 index 00000000..efd67044 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-review-transaction/00002.png differ diff --git a/tests_zemu/snapshots/st-tmp-review-transaction/00003.png b/tests_zemu/snapshots/st-tmp-review-transaction/00003.png new file mode 100644 index 00000000..ab7d2ed3 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-review-transaction/00003.png differ diff --git a/tests_zemu/snapshots/st-tmp-review-transaction/00004.png b/tests_zemu/snapshots/st-tmp-review-transaction/00004.png new file mode 100644 index 00000000..0309819e Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-review-transaction/00004.png differ diff --git a/tests_zemu/snapshots/st-tmp-review-transaction/00005.png b/tests_zemu/snapshots/st-tmp-review-transaction/00005.png new file mode 100644 index 00000000..dae44ec2 Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-review-transaction/00005.png differ diff --git a/tests_zemu/snapshots/st-tmp-review-transaction/00006.png b/tests_zemu/snapshots/st-tmp-review-transaction/00006.png new file mode 100644 index 00000000..22f8f6dc Binary files /dev/null and b/tests_zemu/snapshots/st-tmp-review-transaction/00006.png differ diff --git a/tests_zemu/tests/basic.test.ts b/tests_zemu/tests/basic.test.ts index 07f8d394..7bff4f67 100644 --- a/tests_zemu/tests/basic.test.ts +++ b/tests_zemu/tests/basic.test.ts @@ -59,7 +59,7 @@ describe('Basic', function () { expect(resp.testMode).toBe(false) expect(resp.major).toBe(0) expect(resp.minor).toBe(5) - expect(resp.patch).toBe(1) + expect(resp.patch).toBe(2) } finally { await sim.close() } diff --git a/tests_zemu/tests/dkg.test.ts b/tests_zemu/tests/dkg.test.ts index 7c5929fb..b222fe60 100644 --- a/tests_zemu/tests/dkg.test.ts +++ b/tests_zemu/tests/dkg.test.ts @@ -19,16 +19,12 @@ import { defaultOptions, identities, models, restoreKeysTestCases } from './comm import IronfishApp, { IronfishKeys } from '@zondax/ledger-ironfish' import { isValidPublicAddress, multisig, UnsignedTransaction, verifyTransactions } from '@ironfish/rust-nodejs' import { Transaction } from '@ironfish/sdk' -import { buildTx, minimizeRound3Inputs } from './utils' +import { buildTx, minimizeRound3Inputs, runMethod, startTextFn } from './utils' import { TModel } from '@zondax/zemu/dist/types' import aggregateSignatureShares = multisig.aggregateSignatureShares jest.setTimeout(4500000) -// Not sure about the start text for flex and stax, so we go with what it always work, which is the app name. -// That is always displayed on the main menu -const startTextFn = (model: TModel) => (isTouchDevice(model) ? 'Ironfish DKG' : DEFAULT_START_OPTIONS.startText) - // ONE_GLOBAL_APP: Use this flag if the whole DKG process will run in only one app (all participants, all rounds). This takes precedence over ONE_APP_PER_PARTICIPANT. // ONE_APP_PER_PARTICIPANT: Use this flag if the whole DKG process will run in one app per participant // Otherwise, if both are falsy, one app will be started per request (each round for each participant) @@ -39,47 +35,6 @@ const SKIP_ERRORS_IN_PHASE = true // Reference taken from https://github.com/iron-fish/ironfish/pull/5324/files -const checkSimRequired = (m: IDeviceModel, sims: Zemu[], i: number): { sim: Zemu; created: boolean } => { - let created = false - let sim: Zemu | undefined - - if (!sims.length) { - sim = new Zemu(m.path) - created = true - } else if (sims.length === 1) { - sim = sims[0] - } else { - sim = sims[i] - } - - if (!sim) throw new Error('sim should have a value here') - return { sim, created } -} - -const runMethod = async (m: IDeviceModel, rcvSims: Zemu[], i: number, fn: (sim: Zemu, app: IronfishApp) => Promise): Promise => { - const { sim, created } = checkSimRequired(m, rcvSims, i) - - try { - if (created) - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - const resp = await fn(sim, app) - - // Clean events from previous commands as each sim lives for many commands (DKG generation + signing) - await sim.deleteEvents() - - return resp - } finally { - if (created) await sim.close() - } -} - describe.each(models)('DKG', function (m) { it.concurrent(`${m.name} - can start and stop container`, async function () { const sim = new Zemu(m.path) @@ -423,550 +378,4 @@ describe.each(models)('DKG', function (m) { } }) }) - - describe.each(restoreKeysTestCases)( - `${m.name} - restore keys`, - ({ index, encrypted, publicAddress, identities, proofKeys, viewKeys, publicPackage }) => { - test.concurrent(index + '', async () => { - for (let i = 0; i < encrypted.length; i++) { - const e = encrypted[i] - - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - - // Restore keys - let respReq: any = app.dkgRestoreKeys(e) - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-restore-keys`) - let resp = await respReq - await sim.deleteEvents() - - // Backup restored keys to compare snapshots for this process as it is deterministic (fixed keys) - respReq = app.dkgBackupKeys() - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-backup-keys`) - resp = await respReq - await sim.deleteEvents() - - // Generate keys from the restored package to check we are generating the same keys when they were generated - respReq = app.dkgRetrieveKeys(IronfishKeys.ViewKey, true) - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-view-keys`) - resp = await respReq - await sim.deleteEvents() - - expect(resp.viewKey.toString('hex')).toEqual(viewKeys.viewKey) - expect(resp.ovk.toString('hex')).toEqual(viewKeys.ovk) - expect(resp.ivk.toString('hex')).toEqual(viewKeys.ivk) - - respReq = app.dkgRetrieveKeys(IronfishKeys.ProofGenerationKey, true) - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-proof-keys`) - resp = await respReq - await sim.deleteEvents() - - expect(resp.ak.toString('hex')).toEqual(proofKeys.ak) - expect(resp.nsk.toString('hex')).toEqual(proofKeys.nsk) - - respReq = app.dkgRetrieveKeys(IronfishKeys.PublicAddress, true) - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-public-addr`) - resp = await respReq - await sim.deleteEvents() - - expect(resp.publicAddress.toString('hex')).toEqual(publicAddress) - - respReq = app.dkgRetrieveKeys(IronfishKeys.DkgIdentity, true) - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - try { - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-identity`) - } catch (e) { - // TODO navigate and approve, but do not compare snapshots... needs to be added to zemu - // Skip error, as a new public address is generated each time. Snapshots will be different in every run - } - resp = await respReq - await sim.deleteEvents() - - expect(resp.identity.toString('hex')).toEqual(identities[i]) - - resp = await app.dkgGetPublicPackage() - - expect(resp.publicPackage.toString('hex')).toEqual(publicPackage) - - resp = await app.dkgGetIdentities() - - const identitiesStr = resp.identities.map((i: any) => i.toString('hex')) - identities.forEach(i => expect(identitiesStr.includes(i)).toBeTruthy()) - } finally { - await sim.close() - } - } - }) - }, - ) - - describe.each(restoreKeysTestCases)(`${m.name} - sign transaction`, ({ index, encrypted }) => { - test(index + '', async () => { - const participants = encrypted.length - const globalSims: Zemu[] = [] - - let identities: any[] = [] - let commitments: any[] = [] - let signatures: any[] = [] - - if (ONE_GLOBAL_APP) globalSims.push(new Zemu(m.path)) - else if (ONE_APP_PER_PARTICIPANT) for (let i = 0; i < participants; i++) globalSims.push(new Zemu(m.path)) - - for (let i = 0; i < globalSims.length; i++) - await globalSims[i].start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - - try { - for (let i = 0; i < participants; i++) { - await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - let result = app.dkgRestoreKeys(encrypted[i]) - - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-sign-${index}-restore-keys`) - - await result - }) - } - - let viewKey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { - let result: any = await app.dkgRetrieveKeys(IronfishKeys.ViewKey) - - return { - viewKey: result.viewKey.toString('hex'), - ivk: result.ivk.toString('hex'), - ovk: result.ovk.toString('hex'), - } - }) - - let proofKey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { - let result: any = await app.dkgRetrieveKeys(IronfishKeys.ProofGenerationKey) - - return { ak: result.ak.toString('hex'), nsk: result.nsk.toString('hex') } - }) - - let pubkey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { - let result: any = await app.dkgRetrieveKeys(IronfishKeys.PublicAddress) - - return result.publicAddress.toString('hex') - }) - - let publicPackage = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { - let result = await app.dkgGetPublicPackage() - - return result.publicPackage.toString('hex') - }) - - for (let i = 0; i < participants; i++) { - const identity = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - return await app.dkgRetrieveKeys(IronfishKeys.DkgIdentity) - }) - - if (!identity.identity) throw new Error('no identity found') - - identities.push(identity.identity.toString('hex')) - } - - const unsignedTxRaw = buildTx(pubkey, viewKey, proofKey) - const unsignedTx = new UnsignedTransaction(unsignedTxRaw) - - const serialized = unsignedTx.serialize() - - for (let i = 0; i < participants; i++) { - await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - // Change the approve button type to hold, as we are signing a tx now. - sim.startOptions.approveAction = ButtonKind.ApproveHoldButton - const resultReq = app.reviewTransaction(serialized.toString('hex')) - - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-sign-${index}-review-transaction`) - - const result = await resultReq - expect(result.hash.length).toBeTruthy() - expect(result.hash.toString('hex')).toBe(unsignedTx.hash().toString('hex')) - - return result - }) - } - - for (let i = 0; i < participants; i++) { - const result = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - let result = await app.dkgGetCommitments(unsignedTx.hash().toString('hex')) - - expect(result.commitments.length).toBeTruthy() - - return result - }) - - commitments.push( - multisig.SigningCommitment.fromRaw(identities[i], result.commitments, unsignedTx.hash(), identities) - .serialize() - .toString('hex'), - ) - } - - const signingPackageHex = unsignedTx.signingPackage(commitments) - const signingPackage = new multisig.SigningPackage(Buffer.from(signingPackageHex, 'hex')) - - for (let i = 0; i < participants; i++) { - const result = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - let result = await app.dkgSign( - unsignedTx.publicKeyRandomness(), - signingPackage.frostSigningPackage().toString('hex'), - unsignedTx.hash().toString('hex'), - ) - - expect(result.signature.length).toBeTruthy() - - return result - }) - - signatures.push( - multisig.SignatureShare.fromFrost(result.signature, Buffer.from(identities[i], 'hex')).serialize().toString('hex'), - ) - } - - // Attempt to sign again. It should fail as the tx hash is cleaned - for (let i = 0; i < participants; i++) { - await expect( - runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - await app.dkgSign( - unsignedTx.publicKeyRandomness(), - signingPackage.frostSigningPackage().toString('hex'), - unsignedTx.hash().toString('hex'), - ) - }), - ).rejects.toThrow() - } - - let signedTxRaw = aggregateSignatureShares(publicPackage, signingPackageHex, signatures) - expect(verifyTransactions([signedTxRaw])).toBeTruthy() - - const signedTx = new Transaction(signedTxRaw) - expect(signedTx.spends.length).toBe(1) - expect(signedTx.mints.length).toBe(1) - expect(signedTx.burns.length).toBe(0) - } finally { - for (let i = 0; i < globalSims.length; i++) await globalSims[i].close() - } - }) - }) - - describe.each(restoreKeysTestCases)(`${m.name} - attempt to sign after sending wrong command`, ({ index, encrypted }) => { - test(index + '', async () => { - const participants = encrypted.length - const globalSims: Zemu[] = [] - - let identities: any[] = [] - - if (ONE_GLOBAL_APP) globalSims.push(new Zemu(m.path)) - else if (ONE_APP_PER_PARTICIPANT) for (let i = 0; i < participants; i++) globalSims.push(new Zemu(m.path)) - - for (let i = 0; i < globalSims.length; i++) - await globalSims[i].start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - - try { - const reqs = [] - for (let i = 0; i < participants; i++) { - await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - let result = app.dkgRestoreKeys(encrypted[i]) - - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-sign-${index}-restore-keys`) - - await result - }) - } - - let viewKey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { - let result: any = await app.dkgRetrieveKeys(IronfishKeys.ViewKey) - - return { - viewKey: result.viewKey.toString('hex'), - ivk: result.ivk.toString('hex'), - ovk: result.ovk.toString('hex'), - } - }) - - let proofKey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { - let result: any = await app.dkgRetrieveKeys(IronfishKeys.ProofGenerationKey) - - return { ak: result.ak.toString('hex'), nsk: result.nsk.toString('hex') } - }) - - let pubkey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { - let result: any = await app.dkgRetrieveKeys(IronfishKeys.PublicAddress) - - return result.publicAddress.toString('hex') - }) - - let publicPackages = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { - let result = await app.dkgGetPublicPackage() - - return result.publicPackage - }) - - for (let i = 0; i < participants; i++) { - const identity = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - return await app.dkgRetrieveKeys(IronfishKeys.DkgIdentity) - }) - - if (!identity.identity) throw new Error('no identity found') - - identities.push(identity.identity.toString('hex')) - } - - const unsignedTxRaw = buildTx(pubkey, viewKey, proofKey) - const unsignedTx = new UnsignedTransaction(unsignedTxRaw) - - const serialized = unsignedTx.serialize() - - for (let i = 0; i < participants; i++) { - await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - // Change the approve button type to hold, as we are signing a tx now. - sim.startOptions.approveAction = ButtonKind.ApproveHoldButton - const resultReq = app.reviewTransaction(serialized.toString('hex')) - - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-sign-${index}-review-transaction`) - - const result = await resultReq - expect(result.hash.length).toBeTruthy() - expect(result.hash.toString('hex')).toBe(unsignedTx.hash().toString('hex')) - - return result - }) - } - - // Send wrong command in the middle of signing process (review + commitments + sign) - for (let i = 0; i < participants; i++) { - const identity = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - return await app.dkgRetrieveKeys(IronfishKeys.DkgIdentity) - }) - - if (!identity.identity) throw new Error('no identity found') - } - - // Attempt to get commitments - for (let i = 0; i < participants; i++) { - await expect( - runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { - let result = await app.dkgGetCommitments(unsignedTx.hash().toString('hex')) - - expect(result.commitments.length).toBeTruthy() - - return result - }), - ).rejects.toThrow() - } - } finally { - for (let i = 0; i < globalSims.length; i++) await globalSims[i].close() - } - }) - }) - - test.concurrent(`${m.name} - attempt to retrieve viewKeys when no keys are present`, async () => { - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - - await expect(app.dkgRetrieveKeys(IronfishKeys.ViewKey)).rejects.toThrow() - } finally { - await sim.close() - } - }) - - // TODO implement a way to send the command, and but no get the response - /* - test.concurrent(`${m.name} - attempt to retrieve result after another command`, async () => { - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - - let respReq = app.dkgBackupKeys() - - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-d`) - - const resp = await respReq - } finally { - await sim.close() - } - }) - */ - - test.concurrent(`${m.name} - attempt to retrieve proof keys when no keys are present`, async () => { - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - - await expect(app.dkgRetrieveKeys(IronfishKeys.ProofGenerationKey)).rejects.toThrow() - } finally { - await sim.close() - } - }) - - test.concurrent(`${m.name} - attempt to retrieve public address when no keys are present`, async () => { - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - - await expect(app.dkgRetrieveKeys(IronfishKeys.PublicAddress)).rejects.toThrow() - } finally { - await sim.close() - } - }) - - test.concurrent(`${m.name} - attempt to retrieve public package when no keys are present`, async () => { - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - - await expect(app.dkgGetPublicPackage()).rejects.toThrow() - } finally { - await sim.close() - } - }) - - test.concurrent(`${m.name} - attempt to backup keys when no keys are present`, async () => { - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - - await expect(app.dkgBackupKeys()).rejects.toThrow() - } finally { - await sim.close() - } - }) - - test.concurrent(`${m.name} - attempt to run round1 with 5 participants`, async () => { - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - - await expect( - app.dkgRound1( - 0, - identities.map(({ v }) => v), - 3, - ), - ).rejects.toThrow() - } finally { - await sim.close() - } - }) - - // TODO complete me - /* - test.concurrent(`${m.name} - attempt to run round3 when no round1 was executed`, async () => { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name, startText: startTextFn(m.name) }) - const app = new IronfishApp(sim.getTransport(), true) - let resp: any = await app.dkgRound3() - - await expect(app.dkgRound3()).rejects.toThrow() - } finally { - await sim.close() - } - }) - */ - - describe.each(identities)(`${m.name} - generate identities`, function ({ i, v }) { - test.concurrent(i + '', async function () { - const sim = new Zemu(m.path) - try { - await sim.start({ - ...defaultOptions, - model: m.name, - startText: startTextFn(m.name), - approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', - approveAction: ButtonKind.ApproveTapButton, - }) - const app = new IronfishApp(sim.getTransport(), true) - const identityReq = app.dkgGetIdentity(i, true) - - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-identity-${i}`) - - let identity = await identityReq - - expect(identity.identity.toString('hex')).toEqual(v) - } finally { - await sim.close() - } - }) - }) }) diff --git a/tests_zemu/tests/failures.test.ts b/tests_zemu/tests/failures.test.ts new file mode 100644 index 00000000..12be9f11 --- /dev/null +++ b/tests_zemu/tests/failures.test.ts @@ -0,0 +1,290 @@ +import { defaultOptions, identities, models, restoreKeysTestCases } from './common' +import Zemu, { ButtonKind, isTouchDevice } from '@zondax/zemu' +import { buildTx, runMethod, startTextFn } from './utils' +import IronfishApp, { IronfishKeys } from '@zondax/ledger-ironfish' +import { UnsignedTransaction } from '@ironfish/rust-nodejs' + +jest.setTimeout(450000) + +// ONE_GLOBAL_APP: Use this flag if the whole DKG process will run in only one app (all participants, all rounds). This takes precedence over ONE_APP_PER_PARTICIPANT. +// ONE_APP_PER_PARTICIPANT: Use this flag if the whole DKG process will run in one app per participant +// Otherwise, if both are falsy, one app will be started per request (each round for each participant) +const ONE_GLOBAL_APP = 0 +const ONE_APP_PER_PARTICIPANT = 1 + +describe.each(models)('wrong actions', function (m) { + describe.each(restoreKeysTestCases)(`${m.name} - attempt to sign after sending wrong command`, ({ index, encrypted }) => { + test(index + '', async () => { + const participants = encrypted.length + const globalSims: Zemu[] = [] + + let identities: any[] = [] + + if (ONE_GLOBAL_APP) globalSims.push(new Zemu(m.path)) + else if (ONE_APP_PER_PARTICIPANT) for (let i = 0; i < participants; i++) globalSims.push(new Zemu(m.path)) + + for (let i = 0; i < globalSims.length; i++) + await globalSims[i].start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + + try { + const reqs = [] + for (let i = 0; i < participants; i++) { + await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + let result = app.dkgRestoreKeys(encrypted[i]) + + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-sign-${index}-restore-keys`) + + await result + }) + } + + let viewKey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { + let result: any = await app.dkgRetrieveKeys(IronfishKeys.ViewKey) + + return { + viewKey: result.viewKey.toString('hex'), + ivk: result.ivk.toString('hex'), + ovk: result.ovk.toString('hex'), + } + }) + + let proofKey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { + let result: any = await app.dkgRetrieveKeys(IronfishKeys.ProofGenerationKey) + + return { ak: result.ak.toString('hex'), nsk: result.nsk.toString('hex') } + }) + + let pubkey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { + let result: any = await app.dkgRetrieveKeys(IronfishKeys.PublicAddress) + + return result.publicAddress.toString('hex') + }) + + let publicPackages = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { + let result = await app.dkgGetPublicPackage() + + return result.publicPackage + }) + + for (let i = 0; i < participants; i++) { + const identity = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + return await app.dkgRetrieveKeys(IronfishKeys.DkgIdentity) + }) + + if (!identity.identity) throw new Error('no identity found') + + identities.push(identity.identity.toString('hex')) + } + + const unsignedTxRaw = buildTx(pubkey, viewKey, proofKey) + const unsignedTx = new UnsignedTransaction(unsignedTxRaw) + + const serialized = unsignedTx.serialize() + + for (let i = 0; i < participants; i++) { + await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + // Change the approve button type to hold, as we are signing a tx now. + sim.startOptions.approveAction = ButtonKind.ApproveHoldButton + const resultReq = app.reviewTransaction(serialized.toString('hex')) + + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-sign-${index}-review-transaction`) + + const result = await resultReq + expect(result.hash.length).toBeTruthy() + expect(result.hash.toString('hex')).toBe(unsignedTx.hash().toString('hex')) + + return result + }) + } + + // Send wrong command in the middle of signing process (review + commitments + sign) + for (let i = 0; i < participants; i++) { + const identity = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + return await app.dkgRetrieveKeys(IronfishKeys.DkgIdentity) + }) + + if (!identity.identity) throw new Error('no identity found') + } + + // Attempt to get commitments + for (let i = 0; i < participants; i++) { + await expect( + runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + let result = await app.dkgGetCommitments(unsignedTx.hash().toString('hex')) + + expect(result.commitments.length).toBeTruthy() + + return result + }), + ).rejects.toThrow() + } + } finally { + for (let i = 0; i < globalSims.length; i++) await globalSims[i].close() + } + }) + }) + + test.concurrent(`${m.name} - attempt to retrieve viewKeys when no keys are present`, async () => { + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + + await expect(app.dkgRetrieveKeys(IronfishKeys.ViewKey)).rejects.toThrow() + } finally { + await sim.close() + } + }) + + // TODO implement a way to send the command, and but no get the response + /* + test.concurrent(`${m.name} - attempt to retrieve result after another command`, async () => { + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + + let respReq = app.dkgBackupKeys() + + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-d`) + + const resp = await respReq + } finally { + await sim.close() + } + }) + */ + + test.concurrent(`${m.name} - attempt to retrieve proof keys when no keys are present`, async () => { + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + + await expect(app.dkgRetrieveKeys(IronfishKeys.ProofGenerationKey)).rejects.toThrow() + } finally { + await sim.close() + } + }) + + test.concurrent(`${m.name} - attempt to retrieve public address when no keys are present`, async () => { + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + + await expect(app.dkgRetrieveKeys(IronfishKeys.PublicAddress)).rejects.toThrow() + } finally { + await sim.close() + } + }) + + test.concurrent(`${m.name} - attempt to retrieve public package when no keys are present`, async () => { + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + + await expect(app.dkgGetPublicPackage()).rejects.toThrow() + } finally { + await sim.close() + } + }) + + test.concurrent(`${m.name} - attempt to backup keys when no keys are present`, async () => { + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + + await expect(app.dkgBackupKeys()).rejects.toThrow() + } finally { + await sim.close() + } + }) + + test.concurrent(`${m.name} - attempt to run round1 with 5 participants`, async () => { + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + + await expect( + app.dkgRound1( + 0, + identities.map(({ v }) => v), + 3, + ), + ).rejects.toThrow() + } finally { + await sim.close() + } + }) + + // TODO complete me + /* + test.concurrent(`${m.name} - attempt to run round3 when no round1 was executed`, async () => { + const sim = new Zemu(m.path) + try { + await sim.start({ ...defaultOptions, model: m.name, startText: startTextFn(m.name) }) + const app = new IronfishApp(sim.getTransport(), true) + let resp: any = await app.dkgRound3() + + await expect(app.dkgRound3()).rejects.toThrow() + } finally { + await sim.close() + } + }) + */ +}) diff --git a/tests_zemu/tests/identities.test.ts b/tests_zemu/tests/identities.test.ts new file mode 100644 index 00000000..5f4f96ef --- /dev/null +++ b/tests_zemu/tests/identities.test.ts @@ -0,0 +1,34 @@ +import { defaultOptions, identities, models } from './common' +import Zemu, { ButtonKind, isTouchDevice } from '@zondax/zemu' +import IronfishApp from '@zondax/ledger-ironfish' +import { startTextFn } from './utils' + +jest.setTimeout(450000) + +describe.each(models)('generate identities', function (m) { + describe.each(identities)(`${m.name}`, function ({ i, v }) { + test.concurrent(i + '', async function () { + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + const identityReq = app.dkgGetIdentity(i, true) + + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-identity-${i}`) + + let identity = await identityReq + + expect(identity.identity.toString('hex')).toEqual(v) + } finally { + await sim.close() + } + }) + }) +}) diff --git a/tests_zemu/tests/restore.test.ts b/tests_zemu/tests/restore.test.ts new file mode 100644 index 00000000..6c99f9ec --- /dev/null +++ b/tests_zemu/tests/restore.test.ts @@ -0,0 +1,97 @@ +import { defaultOptions, models, restoreKeysTestCases } from './common' +import Zemu, { ButtonKind, isTouchDevice } from '@zondax/zemu' +import { startTextFn } from './utils' +import IronfishApp, { IronfishKeys } from '@zondax/ledger-ironfish' + +jest.setTimeout(450000) + +describe.each(models)('restore keys', function (m) { + describe.each(restoreKeysTestCases)( + `${m.name}`, + ({ index, encrypted, publicAddress, identities, proofKeys, viewKeys, publicPackage }) => { + test.concurrent(index + '', async () => { + for (let i = 0; i < encrypted.length; i++) { + const e = encrypted[i] + + const sim = new Zemu(m.path) + try { + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + + // Restore keys + let respReq: any = app.dkgRestoreKeys(e) + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-restore-keys`) + let resp = await respReq + await sim.deleteEvents() + + // Backup restored keys to compare snapshots for this process as it is deterministic (fixed keys) + respReq = app.dkgBackupKeys() + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-backup-keys`) + resp = await respReq + await sim.deleteEvents() + + // Generate keys from the restored package to check we are generating the same keys when they were generated + respReq = app.dkgRetrieveKeys(IronfishKeys.ViewKey, true) + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-view-keys`) + resp = await respReq + await sim.deleteEvents() + + expect(resp.viewKey.toString('hex')).toEqual(viewKeys.viewKey) + expect(resp.ovk.toString('hex')).toEqual(viewKeys.ovk) + expect(resp.ivk.toString('hex')).toEqual(viewKeys.ivk) + + respReq = app.dkgRetrieveKeys(IronfishKeys.ProofGenerationKey, true) + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-proof-keys`) + resp = await respReq + await sim.deleteEvents() + + expect(resp.ak.toString('hex')).toEqual(proofKeys.ak) + expect(resp.nsk.toString('hex')).toEqual(proofKeys.nsk) + + respReq = app.dkgRetrieveKeys(IronfishKeys.PublicAddress, true) + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-public-addr`) + resp = await respReq + await sim.deleteEvents() + + expect(resp.publicAddress.toString('hex')).toEqual(publicAddress) + + respReq = app.dkgRetrieveKeys(IronfishKeys.DkgIdentity, true) + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + try { + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-${index}-identity`) + } catch (e) { + // TODO navigate and approve, but do not compare snapshots... needs to be added to zemu + // Skip error, as a new public address is generated each time. Snapshots will be different in every run + } + resp = await respReq + await sim.deleteEvents() + + expect(resp.identity.toString('hex')).toEqual(identities[i]) + + resp = await app.dkgGetPublicPackage() + + expect(resp.publicPackage.toString('hex')).toEqual(publicPackage) + + resp = await app.dkgGetIdentities() + + const identitiesStr = resp.identities.map((i: any) => i.toString('hex')) + identities.forEach(i => expect(identitiesStr.includes(i)).toBeTruthy()) + } finally { + await sim.close() + } + } + }) + }, + ) +}) diff --git a/tests_zemu/tests/sign.test.ts b/tests_zemu/tests/sign.test.ts new file mode 100644 index 00000000..839f2291 --- /dev/null +++ b/tests_zemu/tests/sign.test.ts @@ -0,0 +1,173 @@ +import { defaultOptions, models, restoreKeysTestCases } from './common' +import Zemu, { ButtonKind, isTouchDevice } from '@zondax/zemu' +import { buildTx, runMethod, startTextFn } from './utils' +import IronfishApp, { IronfishKeys } from '@zondax/ledger-ironfish' +import { multisig, UnsignedTransaction, verifyTransactions } from '@ironfish/rust-nodejs' +import { Transaction } from '@ironfish/sdk' +import aggregateSignatureShares = multisig.aggregateSignatureShares + +jest.setTimeout(450000) + +// ONE_GLOBAL_APP: Use this flag if the whole DKG process will run in only one app (all participants, all rounds). This takes precedence over ONE_APP_PER_PARTICIPANT. +// ONE_APP_PER_PARTICIPANT: Use this flag if the whole DKG process will run in one app per participant +// Otherwise, if both are falsy, one app will be started per request (each round for each participant) +const ONE_GLOBAL_APP = 0 +const ONE_APP_PER_PARTICIPANT = 1 + +describe.each(models)('restore keys', function (m) { + describe.each(restoreKeysTestCases)(`${m.name} - sign transaction`, ({ index, encrypted }) => { + test(index + '', async () => { + const participants = encrypted.length + const globalSims: Zemu[] = [] + + let identities: any[] = [] + let commitments: any[] = [] + let signatures: any[] = [] + + if (ONE_GLOBAL_APP) globalSims.push(new Zemu(m.path)) + else if (ONE_APP_PER_PARTICIPANT) for (let i = 0; i < participants; i++) globalSims.push(new Zemu(m.path)) + + for (let i = 0; i < globalSims.length; i++) + await globalSims[i].start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + + try { + for (let i = 0; i < participants; i++) { + await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + let result = app.dkgRestoreKeys(encrypted[i]) + + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-sign-${index}-restore-keys`) + + await result + }) + } + + let viewKey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { + let result: any = await app.dkgRetrieveKeys(IronfishKeys.ViewKey) + + return { + viewKey: result.viewKey.toString('hex'), + ivk: result.ivk.toString('hex'), + ovk: result.ovk.toString('hex'), + } + }) + + let proofKey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { + let result: any = await app.dkgRetrieveKeys(IronfishKeys.ProofGenerationKey) + + return { ak: result.ak.toString('hex'), nsk: result.nsk.toString('hex') } + }) + + let pubkey = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { + let result: any = await app.dkgRetrieveKeys(IronfishKeys.PublicAddress) + + return result.publicAddress.toString('hex') + }) + + let publicPackage = await runMethod(m, globalSims, 0, async (sim: Zemu, app: IronfishApp) => { + let result = await app.dkgGetPublicPackage() + + return result.publicPackage.toString('hex') + }) + + for (let i = 0; i < participants; i++) { + const identity = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + return await app.dkgRetrieveKeys(IronfishKeys.DkgIdentity) + }) + + if (!identity.identity) throw new Error('no identity found') + + identities.push(identity.identity.toString('hex')) + } + + const unsignedTxRaw = buildTx(pubkey, viewKey, proofKey) + const unsignedTx = new UnsignedTransaction(unsignedTxRaw) + + const serialized = unsignedTx.serialize() + + for (let i = 0; i < participants; i++) { + await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + // Change the approve button type to hold, as we are signing a tx now. + sim.startOptions.approveAction = ButtonKind.ApproveHoldButton + const resultReq = app.reviewTransaction(serialized.toString('hex')) + + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-dkg-sign-${index}-review-transaction`) + + const result = await resultReq + expect(result.hash.length).toBeTruthy() + expect(result.hash.toString('hex')).toBe(unsignedTx.hash().toString('hex')) + + return result + }) + } + + for (let i = 0; i < participants; i++) { + const result = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + let result = await app.dkgGetCommitments(unsignedTx.hash().toString('hex')) + + expect(result.commitments.length).toBeTruthy() + + return result + }) + + commitments.push( + multisig.SigningCommitment.fromRaw(identities[i], result.commitments, unsignedTx.hash(), identities) + .serialize() + .toString('hex'), + ) + } + + const signingPackageHex = unsignedTx.signingPackage(commitments) + const signingPackage = new multisig.SigningPackage(Buffer.from(signingPackageHex, 'hex')) + + for (let i = 0; i < participants; i++) { + const result = await runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + let result = await app.dkgSign( + unsignedTx.publicKeyRandomness(), + signingPackage.frostSigningPackage().toString('hex'), + unsignedTx.hash().toString('hex'), + ) + + expect(result.signature.length).toBeTruthy() + + return result + }) + + signatures.push( + multisig.SignatureShare.fromFrost(result.signature, Buffer.from(identities[i], 'hex')).serialize().toString('hex'), + ) + } + + // Attempt to sign again. It should fail as the tx hash is cleaned + for (let i = 0; i < participants; i++) { + await expect( + runMethod(m, globalSims, i, async (sim: Zemu, app: IronfishApp) => { + await app.dkgSign( + unsignedTx.publicKeyRandomness(), + signingPackage.frostSigningPackage().toString('hex'), + unsignedTx.hash().toString('hex'), + ) + }), + ).rejects.toThrow() + } + + let signedTxRaw = aggregateSignatureShares(publicPackage, signingPackageHex, signatures) + expect(verifyTransactions([signedTxRaw])).toBeTruthy() + + const signedTx = new Transaction(signedTxRaw) + expect(signedTx.spends.length).toBe(1) + expect(signedTx.mints.length).toBe(1) + expect(signedTx.burns.length).toBe(0) + } finally { + for (let i = 0; i < globalSims.length; i++) await globalSims[i].close() + } + }) + }) +}) diff --git a/tests_zemu/tests/utils.ts b/tests_zemu/tests/utils.ts index c471bdfd..3ae3e88b 100644 --- a/tests_zemu/tests/utils.ts +++ b/tests_zemu/tests/utils.ts @@ -1,6 +1,10 @@ import { Asset, LATEST_TRANSACTION_VERSION, Note, Transaction } from '@ironfish/rust-nodejs' import { deserializePublicPackage, deserializeRound2CombinedPublicPackage } from '@ironfish/rust-nodejs' import { devUtils, Note as NoteSDK } from '@ironfish/sdk' +import { TModel } from '@zondax/zemu/dist/types' +import Zemu, { ButtonKind, DEFAULT_START_OPTIONS, IDeviceModel, isTouchDevice } from '@zondax/zemu' +import IronfishApp from '@zondax/ledger-ironfish' +import { defaultOptions } from './common' export const buildTx = (publicAddress: string, viewKeys: any, proofKey: any) => { // create raw/proposed transaction @@ -62,3 +66,53 @@ export const minimizeRound3Inputs = (index: number, round1PublicPackages: string gskBytes, } } + +// Not sure about the start text for flex and stax, so we go with what it always work, which is the app name. +// That is always displayed on the main menu +export const startTextFn = (model: TModel) => (isTouchDevice(model) ? 'Ironfish DKG' : DEFAULT_START_OPTIONS.startText) + +export const checkSimRequired = (m: IDeviceModel, sims: Zemu[], i: number): { sim: Zemu; created: boolean } => { + let created = false + let sim: Zemu | undefined + + if (!sims.length) { + sim = new Zemu(m.path) + created = true + } else if (sims.length === 1) { + sim = sims[0] + } else { + sim = sims[i] + } + + if (!sim) throw new Error('sim should have a value here') + return { sim, created } +} + +export const runMethod = async ( + m: IDeviceModel, + rcvSims: Zemu[], + i: number, + fn: (sim: Zemu, app: IronfishApp) => Promise, +): Promise => { + const { sim, created } = checkSimRequired(m, rcvSims, i) + + try { + if (created) + await sim.start({ + ...defaultOptions, + model: m.name, + startText: startTextFn(m.name), + approveKeyword: isTouchDevice(m.name) ? 'Approve' : '', + approveAction: ButtonKind.ApproveTapButton, + }) + const app = new IronfishApp(sim.getTransport(), true) + const resp = await fn(sim, app) + + // Clean events from previous commands as each sim lives for many commands (DKG generation + signing) + await sim.deleteEvents() + + return resp + } finally { + if (created) await sim.close() + } +}