diff --git a/test/python/snapshots/nanos/test_authorize_baking/chain_id.png b/test/python/snapshots/nanos/test_authorize_baking/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/python/snapshots/nanos/test_authorize_baking/chain_id.png differ diff --git a/test/python/snapshots/nanos/test_authorize_baking/high_watermark.png b/test/python/snapshots/nanos/test_authorize_baking/high_watermark.png new file mode 100644 index 00000000..a3b562f2 Binary files /dev/null and b/test/python/snapshots/nanos/test_authorize_baking/high_watermark.png differ diff --git a/test/python/snapshots/nanos/test_authorize_baking/public_key_hash_1.png b/test/python/snapshots/nanos/test_authorize_baking/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/python/snapshots/nanos/test_authorize_baking/public_key_hash_1.png differ diff --git a/test/python/snapshots/nanos/test_authorize_baking/public_key_hash_2.png b/test/python/snapshots/nanos/test_authorize_baking/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/python/snapshots/nanos/test_authorize_baking/public_key_hash_2.png differ diff --git a/test/python/snapshots/nanos/test_deauthorize/chain_id.png b/test/python/snapshots/nanos/test_deauthorize/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/python/snapshots/nanos/test_deauthorize/chain_id.png differ diff --git a/test/python/snapshots/nanos/test_deauthorize/high_watermark.png b/test/python/snapshots/nanos/test_deauthorize/high_watermark.png new file mode 100644 index 00000000..a3b562f2 Binary files /dev/null and b/test/python/snapshots/nanos/test_deauthorize/high_watermark.png differ diff --git a/test/python/snapshots/nanos/test_deauthorize/public_key_hash.png b/test/python/snapshots/nanos/test_deauthorize/public_key_hash.png new file mode 100644 index 00000000..08266a9a Binary files /dev/null and b/test/python/snapshots/nanos/test_deauthorize/public_key_hash.png differ diff --git a/test/python/snapshots/nanos/test_reset_app_context/chain_id.png b/test/python/snapshots/nanos/test_reset_app_context/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/python/snapshots/nanos/test_reset_app_context/chain_id.png differ diff --git a/test/python/snapshots/nanos/test_reset_app_context/high_watermark.png b/test/python/snapshots/nanos/test_reset_app_context/high_watermark.png new file mode 100644 index 00000000..ebb4b637 Binary files /dev/null and b/test/python/snapshots/nanos/test_reset_app_context/high_watermark.png differ diff --git a/test/python/snapshots/nanos/test_reset_app_context/public_key_hash.png b/test/python/snapshots/nanos/test_reset_app_context/public_key_hash.png new file mode 100644 index 00000000..08266a9a Binary files /dev/null and b/test/python/snapshots/nanos/test_reset_app_context/public_key_hash.png differ diff --git a/test/python/snapshots/nanos/test_setup_app_context/chain_id.png b/test/python/snapshots/nanos/test_setup_app_context/chain_id.png new file mode 100644 index 00000000..13fd7604 Binary files /dev/null and b/test/python/snapshots/nanos/test_setup_app_context/chain_id.png differ diff --git a/test/python/snapshots/nanos/test_setup_app_context/high_watermark.png b/test/python/snapshots/nanos/test_setup_app_context/high_watermark.png new file mode 100644 index 00000000..ebb4b637 Binary files /dev/null and b/test/python/snapshots/nanos/test_setup_app_context/high_watermark.png differ diff --git a/test/python/snapshots/nanos/test_setup_app_context/public_key_hash_1.png b/test/python/snapshots/nanos/test_setup_app_context/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/python/snapshots/nanos/test_setup_app_context/public_key_hash_1.png differ diff --git a/test/python/snapshots/nanos/test_setup_app_context/public_key_hash_2.png b/test/python/snapshots/nanos/test_setup_app_context/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/python/snapshots/nanos/test_setup_app_context/public_key_hash_2.png differ diff --git a/test/python/snapshots/nanos/test_sign_attestation/chain_id.png b/test/python/snapshots/nanos/test_sign_attestation/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_attestation/chain_id.png differ diff --git a/test/python/snapshots/nanos/test_sign_attestation/high_watermark.png b/test/python/snapshots/nanos/test_sign_attestation/high_watermark.png new file mode 100644 index 00000000..d14e7b22 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_attestation/high_watermark.png differ diff --git a/test/python/snapshots/nanos/test_sign_attestation/public_key_hash_1.png b/test/python/snapshots/nanos/test_sign_attestation/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_attestation/public_key_hash_1.png differ diff --git a/test/python/snapshots/nanos/test_sign_attestation/public_key_hash_2.png b/test/python/snapshots/nanos/test_sign_attestation/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_attestation/public_key_hash_2.png differ diff --git a/test/python/snapshots/nanos/test_sign_attestation_dal/chain_id.png b/test/python/snapshots/nanos/test_sign_attestation_dal/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_attestation_dal/chain_id.png differ diff --git a/test/python/snapshots/nanos/test_sign_attestation_dal/high_watermark.png b/test/python/snapshots/nanos/test_sign_attestation_dal/high_watermark.png new file mode 100644 index 00000000..d14e7b22 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_attestation_dal/high_watermark.png differ diff --git a/test/python/snapshots/nanos/test_sign_attestation_dal/public_key_hash_1.png b/test/python/snapshots/nanos/test_sign_attestation_dal/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_attestation_dal/public_key_hash_1.png differ diff --git a/test/python/snapshots/nanos/test_sign_attestation_dal/public_key_hash_2.png b/test/python/snapshots/nanos/test_sign_attestation_dal/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_attestation_dal/public_key_hash_2.png differ diff --git a/test/python/snapshots/nanos/test_sign_block/chain_id.png b/test/python/snapshots/nanos/test_sign_block/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_block/chain_id.png differ diff --git a/test/python/snapshots/nanos/test_sign_block/high_watermark.png b/test/python/snapshots/nanos/test_sign_block/high_watermark.png new file mode 100644 index 00000000..d14e7b22 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_block/high_watermark.png differ diff --git a/test/python/snapshots/nanos/test_sign_block/public_key_hash_1.png b/test/python/snapshots/nanos/test_sign_block/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_block/public_key_hash_1.png differ diff --git a/test/python/snapshots/nanos/test_sign_block/public_key_hash_2.png b/test/python/snapshots/nanos/test_sign_block/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_block/public_key_hash_2.png differ diff --git a/test/python/snapshots/nanos/test_sign_preattestation/chain_id.png b/test/python/snapshots/nanos/test_sign_preattestation/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_preattestation/chain_id.png differ diff --git a/test/python/snapshots/nanos/test_sign_preattestation/high_watermark.png b/test/python/snapshots/nanos/test_sign_preattestation/high_watermark.png new file mode 100644 index 00000000..d14e7b22 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_preattestation/high_watermark.png differ diff --git a/test/python/snapshots/nanos/test_sign_preattestation/public_key_hash_1.png b/test/python/snapshots/nanos/test_sign_preattestation/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_preattestation/public_key_hash_1.png differ diff --git a/test/python/snapshots/nanos/test_sign_preattestation/public_key_hash_2.png b/test/python/snapshots/nanos/test_sign_preattestation/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/python/snapshots/nanos/test_sign_preattestation/public_key_hash_2.png differ diff --git a/test/python/snapshots/nanosp/test_authorize_baking/chain_id.png b/test/python/snapshots/nanosp/test_authorize_baking/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanosp/test_authorize_baking/chain_id.png differ diff --git a/test/python/snapshots/nanosp/test_authorize_baking/high_watermark.png b/test/python/snapshots/nanosp/test_authorize_baking/high_watermark.png new file mode 100644 index 00000000..3d322dbd Binary files /dev/null and b/test/python/snapshots/nanosp/test_authorize_baking/high_watermark.png differ diff --git a/test/python/snapshots/nanosp/test_authorize_baking/public_key_hash.png b/test/python/snapshots/nanosp/test_authorize_baking/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanosp/test_authorize_baking/public_key_hash.png differ diff --git a/test/python/snapshots/nanosp/test_deauthorize/chain_id.png b/test/python/snapshots/nanosp/test_deauthorize/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanosp/test_deauthorize/chain_id.png differ diff --git a/test/python/snapshots/nanosp/test_deauthorize/high_watermark.png b/test/python/snapshots/nanosp/test_deauthorize/high_watermark.png new file mode 100644 index 00000000..3d322dbd Binary files /dev/null and b/test/python/snapshots/nanosp/test_deauthorize/high_watermark.png differ diff --git a/test/python/snapshots/nanosp/test_deauthorize/public_key_hash.png b/test/python/snapshots/nanosp/test_deauthorize/public_key_hash.png new file mode 100644 index 00000000..c9472dc4 Binary files /dev/null and b/test/python/snapshots/nanosp/test_deauthorize/public_key_hash.png differ diff --git a/test/python/snapshots/nanosp/test_reset_app_context/chain_id.png b/test/python/snapshots/nanosp/test_reset_app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanosp/test_reset_app_context/chain_id.png differ diff --git a/test/python/snapshots/nanosp/test_reset_app_context/high_watermark.png b/test/python/snapshots/nanosp/test_reset_app_context/high_watermark.png new file mode 100644 index 00000000..90633d62 Binary files /dev/null and b/test/python/snapshots/nanosp/test_reset_app_context/high_watermark.png differ diff --git a/test/python/snapshots/nanosp/test_reset_app_context/public_key_hash.png b/test/python/snapshots/nanosp/test_reset_app_context/public_key_hash.png new file mode 100644 index 00000000..c9472dc4 Binary files /dev/null and b/test/python/snapshots/nanosp/test_reset_app_context/public_key_hash.png differ diff --git a/test/python/snapshots/nanosp/test_setup_app_context/chain_id.png b/test/python/snapshots/nanosp/test_setup_app_context/chain_id.png new file mode 100644 index 00000000..8795bcf1 Binary files /dev/null and b/test/python/snapshots/nanosp/test_setup_app_context/chain_id.png differ diff --git a/test/python/snapshots/nanosp/test_setup_app_context/high_watermark.png b/test/python/snapshots/nanosp/test_setup_app_context/high_watermark.png new file mode 100644 index 00000000..90633d62 Binary files /dev/null and b/test/python/snapshots/nanosp/test_setup_app_context/high_watermark.png differ diff --git a/test/python/snapshots/nanosp/test_setup_app_context/public_key_hash.png b/test/python/snapshots/nanosp/test_setup_app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanosp/test_setup_app_context/public_key_hash.png differ diff --git a/test/python/snapshots/nanosp/test_sign_attestation/chain_id.png b/test/python/snapshots/nanosp/test_sign_attestation/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_attestation/chain_id.png differ diff --git a/test/python/snapshots/nanosp/test_sign_attestation/high_watermark.png b/test/python/snapshots/nanosp/test_sign_attestation/high_watermark.png new file mode 100644 index 00000000..b12898fa Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_attestation/high_watermark.png differ diff --git a/test/python/snapshots/nanosp/test_sign_attestation/public_key_hash.png b/test/python/snapshots/nanosp/test_sign_attestation/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_attestation/public_key_hash.png differ diff --git a/test/python/snapshots/nanosp/test_sign_attestation_dal/chain_id.png b/test/python/snapshots/nanosp/test_sign_attestation_dal/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_attestation_dal/chain_id.png differ diff --git a/test/python/snapshots/nanosp/test_sign_attestation_dal/high_watermark.png b/test/python/snapshots/nanosp/test_sign_attestation_dal/high_watermark.png new file mode 100644 index 00000000..b12898fa Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_attestation_dal/high_watermark.png differ diff --git a/test/python/snapshots/nanosp/test_sign_attestation_dal/public_key_hash.png b/test/python/snapshots/nanosp/test_sign_attestation_dal/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_attestation_dal/public_key_hash.png differ diff --git a/test/python/snapshots/nanosp/test_sign_block/chain_id.png b/test/python/snapshots/nanosp/test_sign_block/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_block/chain_id.png differ diff --git a/test/python/snapshots/nanosp/test_sign_block/high_watermark.png b/test/python/snapshots/nanosp/test_sign_block/high_watermark.png new file mode 100644 index 00000000..b12898fa Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_block/high_watermark.png differ diff --git a/test/python/snapshots/nanosp/test_sign_block/public_key_hash.png b/test/python/snapshots/nanosp/test_sign_block/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_block/public_key_hash.png differ diff --git a/test/python/snapshots/nanosp/test_sign_preattestation/chain_id.png b/test/python/snapshots/nanosp/test_sign_preattestation/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_preattestation/chain_id.png differ diff --git a/test/python/snapshots/nanosp/test_sign_preattestation/high_watermark.png b/test/python/snapshots/nanosp/test_sign_preattestation/high_watermark.png new file mode 100644 index 00000000..b12898fa Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_preattestation/high_watermark.png differ diff --git a/test/python/snapshots/nanosp/test_sign_preattestation/public_key_hash.png b/test/python/snapshots/nanosp/test_sign_preattestation/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanosp/test_sign_preattestation/public_key_hash.png differ diff --git a/test/python/snapshots/nanox/test_authorize_baking/chain_id.png b/test/python/snapshots/nanox/test_authorize_baking/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanox/test_authorize_baking/chain_id.png differ diff --git a/test/python/snapshots/nanox/test_authorize_baking/high_watermark.png b/test/python/snapshots/nanox/test_authorize_baking/high_watermark.png new file mode 100644 index 00000000..3d322dbd Binary files /dev/null and b/test/python/snapshots/nanox/test_authorize_baking/high_watermark.png differ diff --git a/test/python/snapshots/nanox/test_authorize_baking/public_key_hash.png b/test/python/snapshots/nanox/test_authorize_baking/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanox/test_authorize_baking/public_key_hash.png differ diff --git a/test/python/snapshots/nanox/test_deauthorize/chain_id.png b/test/python/snapshots/nanox/test_deauthorize/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanox/test_deauthorize/chain_id.png differ diff --git a/test/python/snapshots/nanox/test_deauthorize/high_watermark.png b/test/python/snapshots/nanox/test_deauthorize/high_watermark.png new file mode 100644 index 00000000..3d322dbd Binary files /dev/null and b/test/python/snapshots/nanox/test_deauthorize/high_watermark.png differ diff --git a/test/python/snapshots/nanox/test_deauthorize/public_key_hash.png b/test/python/snapshots/nanox/test_deauthorize/public_key_hash.png new file mode 100644 index 00000000..c9472dc4 Binary files /dev/null and b/test/python/snapshots/nanox/test_deauthorize/public_key_hash.png differ diff --git a/test/python/snapshots/nanox/test_reset_app_context/chain_id.png b/test/python/snapshots/nanox/test_reset_app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanox/test_reset_app_context/chain_id.png differ diff --git a/test/python/snapshots/nanox/test_reset_app_context/high_watermark.png b/test/python/snapshots/nanox/test_reset_app_context/high_watermark.png new file mode 100644 index 00000000..90633d62 Binary files /dev/null and b/test/python/snapshots/nanox/test_reset_app_context/high_watermark.png differ diff --git a/test/python/snapshots/nanox/test_reset_app_context/public_key_hash.png b/test/python/snapshots/nanox/test_reset_app_context/public_key_hash.png new file mode 100644 index 00000000..c9472dc4 Binary files /dev/null and b/test/python/snapshots/nanox/test_reset_app_context/public_key_hash.png differ diff --git a/test/python/snapshots/nanox/test_setup_app_context/chain_id.png b/test/python/snapshots/nanox/test_setup_app_context/chain_id.png new file mode 100644 index 00000000..8795bcf1 Binary files /dev/null and b/test/python/snapshots/nanox/test_setup_app_context/chain_id.png differ diff --git a/test/python/snapshots/nanox/test_setup_app_context/high_watermark.png b/test/python/snapshots/nanox/test_setup_app_context/high_watermark.png new file mode 100644 index 00000000..90633d62 Binary files /dev/null and b/test/python/snapshots/nanox/test_setup_app_context/high_watermark.png differ diff --git a/test/python/snapshots/nanox/test_setup_app_context/public_key_hash.png b/test/python/snapshots/nanox/test_setup_app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanox/test_setup_app_context/public_key_hash.png differ diff --git a/test/python/snapshots/nanox/test_sign_attestation/chain_id.png b/test/python/snapshots/nanox/test_sign_attestation/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_attestation/chain_id.png differ diff --git a/test/python/snapshots/nanox/test_sign_attestation/high_watermark.png b/test/python/snapshots/nanox/test_sign_attestation/high_watermark.png new file mode 100644 index 00000000..b12898fa Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_attestation/high_watermark.png differ diff --git a/test/python/snapshots/nanox/test_sign_attestation/public_key_hash.png b/test/python/snapshots/nanox/test_sign_attestation/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_attestation/public_key_hash.png differ diff --git a/test/python/snapshots/nanox/test_sign_attestation_dal/chain_id.png b/test/python/snapshots/nanox/test_sign_attestation_dal/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_attestation_dal/chain_id.png differ diff --git a/test/python/snapshots/nanox/test_sign_attestation_dal/high_watermark.png b/test/python/snapshots/nanox/test_sign_attestation_dal/high_watermark.png new file mode 100644 index 00000000..b12898fa Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_attestation_dal/high_watermark.png differ diff --git a/test/python/snapshots/nanox/test_sign_attestation_dal/public_key_hash.png b/test/python/snapshots/nanox/test_sign_attestation_dal/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_attestation_dal/public_key_hash.png differ diff --git a/test/python/snapshots/nanox/test_sign_block/chain_id.png b/test/python/snapshots/nanox/test_sign_block/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_block/chain_id.png differ diff --git a/test/python/snapshots/nanox/test_sign_block/high_watermark.png b/test/python/snapshots/nanox/test_sign_block/high_watermark.png new file mode 100644 index 00000000..b12898fa Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_block/high_watermark.png differ diff --git a/test/python/snapshots/nanox/test_sign_block/public_key_hash.png b/test/python/snapshots/nanox/test_sign_block/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_block/public_key_hash.png differ diff --git a/test/python/snapshots/nanox/test_sign_preattestation/chain_id.png b/test/python/snapshots/nanox/test_sign_preattestation/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_preattestation/chain_id.png differ diff --git a/test/python/snapshots/nanox/test_sign_preattestation/high_watermark.png b/test/python/snapshots/nanox/test_sign_preattestation/high_watermark.png new file mode 100644 index 00000000..b12898fa Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_preattestation/high_watermark.png differ diff --git a/test/python/snapshots/nanox/test_sign_preattestation/public_key_hash.png b/test/python/snapshots/nanox/test_sign_preattestation/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/python/snapshots/nanox/test_sign_preattestation/public_key_hash.png differ diff --git a/test/python/snapshots/stax/test_authorize_baking/app_context.png b/test/python/snapshots/stax/test_authorize_baking/app_context.png new file mode 100644 index 00000000..fe6eda49 Binary files /dev/null and b/test/python/snapshots/stax/test_authorize_baking/app_context.png differ diff --git a/test/python/snapshots/stax/test_deauthorize/app_context.png b/test/python/snapshots/stax/test_deauthorize/app_context.png new file mode 100644 index 00000000..aa2dec0d Binary files /dev/null and b/test/python/snapshots/stax/test_deauthorize/app_context.png differ diff --git a/test/python/snapshots/stax/test_reset_app_context/app_context.png b/test/python/snapshots/stax/test_reset_app_context/app_context.png new file mode 100644 index 00000000..c7e6da3b Binary files /dev/null and b/test/python/snapshots/stax/test_reset_app_context/app_context.png differ diff --git a/test/python/snapshots/stax/test_setup_app_context/app_context.png b/test/python/snapshots/stax/test_setup_app_context/app_context.png new file mode 100644 index 00000000..876686f3 Binary files /dev/null and b/test/python/snapshots/stax/test_setup_app_context/app_context.png differ diff --git a/test/python/snapshots/stax/test_sign_attestation/app_context.png b/test/python/snapshots/stax/test_sign_attestation/app_context.png new file mode 100644 index 00000000..0e29f84c Binary files /dev/null and b/test/python/snapshots/stax/test_sign_attestation/app_context.png differ diff --git a/test/python/snapshots/stax/test_sign_attestation_dal/app_context.png b/test/python/snapshots/stax/test_sign_attestation_dal/app_context.png new file mode 100644 index 00000000..0e29f84c Binary files /dev/null and b/test/python/snapshots/stax/test_sign_attestation_dal/app_context.png differ diff --git a/test/python/snapshots/stax/test_sign_block/app_context.png b/test/python/snapshots/stax/test_sign_block/app_context.png new file mode 100644 index 00000000..0e29f84c Binary files /dev/null and b/test/python/snapshots/stax/test_sign_block/app_context.png differ diff --git a/test/python/snapshots/stax/test_sign_preattestation/app_context.png b/test/python/snapshots/stax/test_sign_preattestation/app_context.png new file mode 100644 index 00000000..0e29f84c Binary files /dev/null and b/test/python/snapshots/stax/test_sign_preattestation/app_context.png differ diff --git a/test/python/test_instructions.py b/test/python/test_instructions.py index d07c2ed2..c38f55d3 100644 --- a/test/python/test_instructions.py +++ b/test/python/test_instructions.py @@ -11,6 +11,7 @@ Preattestation, Attestation, AttestationDal, + Fitness, BlockHeader, Block, DEFAULT_CHAIN_ID @@ -18,8 +19,7 @@ from utils.navigator import TezosNavigator, Instructions from common import ( DEFAULT_ACCOUNT, - TESTS_ROOT_DIR, - EMPTY_PATH + TESTS_ROOT_DIR ) @@ -75,24 +75,34 @@ def test_authorize_baking( account.check_public_key(public_key) + tezos_navigator.check_app_context( + account, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(0), + test_hwm=Hwm(0), + path=test_name + ) + @pytest.mark.parametrize("account", [DEFAULT_ACCOUNT]) def test_deauthorize( account: Account, client: TezosClient, - tezos_navigator: TezosNavigator) -> None: + tezos_navigator: TezosNavigator, + test_name: Path) -> None: """Test the DEAUTHORIZE instruction.""" tezos_navigator.authorize_baking(account) client.deauthorize() - # get_auth_key_with_curve raise EXC_REFERENCED_DATA_NOT_FOUND - - path = client.get_auth_key() - - assert path == EMPTY_PATH, \ - f"Expected the empty path {EMPTY_PATH} but got {path}" + tezos_navigator.check_app_context( + None, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(0), + test_hwm=Hwm(0), + path=test_name + ) @pytest.mark.parametrize("account", [DEFAULT_ACCOUNT]) def test_get_auth_key( @@ -160,35 +170,25 @@ def test_get_public_key_prompt( account.check_public_key(public_key) -def test_reset_app_context( - client: TezosClient, - tezos_navigator: TezosNavigator, - test_name: Path) -> None: +def test_reset_app_context(tezos_navigator: TezosNavigator, test_name: Path) -> None: """Test the RESET instruction.""" reset_level: int = 1 tezos_navigator.reset_app_context(reset_level, path=test_name) - received_main_chain_id, received_main_hwm, received_test_hwm = client.get_all_hwm() - - main_hwm = Hwm(reset_level) - test_hwm = Hwm(reset_level) - - assert received_main_chain_id == DEFAULT_CHAIN_ID, \ - f"Expected main chain id {DEFAULT_CHAIN_ID} but got {received_main_chain_id}" - - assert received_main_hwm == main_hwm, \ - f"Expected main hmw {main_hwm} but got {received_main_hwm}" - - assert received_test_hwm == test_hwm, \ - f"Expected test hmw {test_hwm} but got {received_test_hwm}" + tezos_navigator.check_app_context( + None, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(reset_level), + test_hwm=Hwm(reset_level), + path=test_name + ) @pytest.mark.parametrize("account", [DEFAULT_ACCOUNT]) def test_setup_app_context( account: Account, - client: TezosClient, tezos_navigator: TezosNavigator, test_name: Path) -> None: """Test the SETUP instruction.""" @@ -207,16 +207,13 @@ def test_setup_app_context( account.check_public_key(public_key) - received_main_chain_id, received_main_hwm, received_test_hwm = client.get_all_hwm() - - assert received_main_chain_id == main_chain_id, \ - f"Expected main chain id {main_chain_id} but got {received_main_chain_id}" - - assert received_main_hwm == main_hwm, \ - f"Expected main hmw {main_hwm} but got {received_main_hwm}" - - assert received_test_hwm == test_hwm, \ - f"Expected test hmw {test_hwm} but got {received_test_hwm}" + tezos_navigator.check_app_context( + account, + chain_id=main_chain_id, + main_hwm=main_hwm, + test_hwm=test_hwm, + path=test_name + ) @pytest.mark.parametrize("account", [DEFAULT_ACCOUNT]) @@ -279,7 +276,8 @@ def test_sign_preattestation( account: Account, with_hash: bool, client: TezosClient, - tezos_navigator: TezosNavigator) -> None: + tezos_navigator: TezosNavigator, + test_name: Path) -> None: """Test the SIGN(_WITH_HASH) instruction on preattestation.""" main_chain_id = DEFAULT_CHAIN_ID @@ -293,7 +291,10 @@ def test_sign_preattestation( test_hwm ) - preattestation = Preattestation().forge(chain_id=main_chain_id) + preattestation = Preattestation( + op_level=1, + op_round=2 + ).forge(chain_id=main_chain_id) if with_hash: signature = client.sign_message(account, preattestation) @@ -304,6 +305,14 @@ def test_sign_preattestation( f"Expected hash {preattestation.hash.hex()} but got {preattestation_hash.hex()}" account.check_signature(signature, bytes(preattestation)) + tezos_navigator.check_app_context( + account, + chain_id=main_chain_id, + main_hwm=Hwm(1, 2), + test_hwm=Hwm(0, 0), + path=test_name + ) + @pytest.mark.parametrize("account", [DEFAULT_ACCOUNT]) @pytest.mark.parametrize("with_hash", [False, True]) @@ -311,7 +320,8 @@ def test_sign_attestation( account: Account, with_hash: bool, client: TezosClient, - tezos_navigator: TezosNavigator) -> None: + tezos_navigator: TezosNavigator, + test_name: Path) -> None: """Test the SIGN(_WITH_HASH) instruction on attestation.""" main_chain_id = DEFAULT_CHAIN_ID @@ -325,7 +335,10 @@ def test_sign_attestation( test_hwm ) - attestation = Attestation().forge(chain_id=main_chain_id) + attestation = Attestation( + op_level=1, + op_round=2 + ).forge(chain_id=main_chain_id) if with_hash: signature = client.sign_message(account, attestation) @@ -336,6 +349,14 @@ def test_sign_attestation( f"Expected hash {attestation.hash.hex()} but got {attestation_hash.hex()}" account.check_signature(signature, bytes(attestation)) + tezos_navigator.check_app_context( + account, + chain_id=main_chain_id, + main_hwm=Hwm(1, 2), + test_hwm=Hwm(0, 0), + path=test_name + ) + @pytest.mark.parametrize("account", [DEFAULT_ACCOUNT]) @pytest.mark.parametrize("with_hash", [False, True]) @@ -343,7 +364,8 @@ def test_sign_attestation_dal( account: Account, with_hash: bool, client: TezosClient, - tezos_navigator: TezosNavigator) -> None: + tezos_navigator: TezosNavigator, + test_name: Path) -> None: """Test the SIGN(_WITH_HASH) instruction on attestation.""" main_chain_id = DEFAULT_CHAIN_ID @@ -357,7 +379,10 @@ def test_sign_attestation_dal( test_hwm ) - attestation = AttestationDal().forge(chain_id=main_chain_id) + attestation = AttestationDal( + op_level=1, + op_round=2 + ).forge(chain_id=main_chain_id) if with_hash: signature = client.sign_message(account, attestation) @@ -368,7 +393,13 @@ def test_sign_attestation_dal( f"Expected hash {attestation.hash.hex()} but got {attestation_hash.hex()}" account.check_signature(signature, bytes(attestation)) - + tezos_navigator.check_app_context( + account, + chain_id=main_chain_id, + main_hwm=Hwm(1, 2), + test_hwm=Hwm(0, 0), + path=test_name + ) @pytest.mark.parametrize("account", [DEFAULT_ACCOUNT]) @@ -377,7 +408,8 @@ def test_sign_block( account: Account, with_hash: bool, client: TezosClient, - tezos_navigator: TezosNavigator) -> None: + tezos_navigator: TezosNavigator, + test_name: Path) -> None: """Test the SIGN(_WITH_HASH) instruction on block.""" main_chain_id = DEFAULT_CHAIN_ID @@ -391,7 +423,12 @@ def test_sign_block( test_hwm ) - block = Block(header=BlockHeader(level=1)).forge(chain_id=main_chain_id) + block = Block( + header=BlockHeader( + level=1, + fitness=Fitness(current_round=2) + ) + ).forge(chain_id=main_chain_id) if with_hash: signature = client.sign_message(account, block) @@ -402,6 +439,15 @@ def test_sign_block( f"Expected hash {block.hash.hex()} but got {block_hash.hex()}" account.check_signature(signature, bytes(block)) + tezos_navigator.check_app_context( + account, + chain_id=main_chain_id, + main_hwm=Hwm(1, 2), + test_hwm=Hwm(0, 0), + path=test_name + ) + + # Data generated by the old application itself HMAC_TEST_SET = [ (DEFAULT_ACCOUNT, diff --git a/test/python/utils/navigator.py b/test/python/utils/navigator.py index e397891d..bc51ab59 100644 --- a/test/python/utils/navigator.py +++ b/test/python/utils/navigator.py @@ -17,7 +17,7 @@ ) from ragger.navigator import Navigator, NavInsID, NavIns -from common import TESTS_ROOT_DIR +from common import TESTS_ROOT_DIR, EMPTY_PATH from utils.client import TezosClient, Hwm from utils.account import Account @@ -172,6 +172,69 @@ def _assert_screen(self, path: Path) -> None: golden_run=self._golden_run ), f"Screen does not match golden {path}." + def check_app_context(self, + account: Optional[Account], + chain_id: str, + main_hwm: Hwm, + test_hwm: Hwm, + path: Path) -> None: + """Check that the app context.""" + path = Path(path) + + received_chain_id, received_main_hwm, received_test_hwm = self.client.get_all_hwm() + + # get_auth_key_with_curve raise EXC_REFERENCED_DATA_NOT_FOUND + received_path = self.client.get_auth_key() + + assert received_chain_id == chain_id, \ + f"Expected main chain id {chain_id} but got {received_chain_id}" + assert received_main_hwm == main_hwm, \ + f"Expected main hmw {main_hwm} but got {received_main_hwm}" + assert received_test_hwm == test_hwm, \ + f"Expected test hmw {test_hwm} but got {received_test_hwm}" + + if account is None: + # get_auth_key_with_curve raise EXC_REFERENCED_DATA_NOT_FOUND + received_path = self.client.get_auth_key() + assert received_path == EMPTY_PATH, \ + f"Expected the empty path {EMPTY_PATH} but got {received_path}" + else: + received_sig_scheme, received_path = self.client.get_auth_key_with_curve() + assert received_path == account.path, \ + f"Expected path {account.path} but got {received_path}" + assert received_sig_scheme == account.sig_scheme, \ + f"Expected signature scheme {account.sig_scheme.name} "\ + f"but got {received_sig_scheme.name}" + + if self.firmware.is_nano: + self.navigator.navigate( + [NavInsID.RIGHT_CLICK] * 2, + screen_change_before_first_instruction=False + ) + self._assert_screen(path / "chain_id.png") + self.backend.right_click() + self.backend.wait_for_screen_change() + if account is not None and self.firmware.device == "nanos": + self._assert_screen(path / "public_key_hash_1.png") + self.backend.right_click() + self.backend.wait_for_screen_change() + self._assert_screen(path / "public_key_hash_2.png") + else: + self._assert_screen(path / "public_key_hash.png") + self.backend.right_click() + self.backend.wait_for_screen_change() + self._assert_screen(path / "high_watermark.png") + self.navigator.navigate( + [NavInsID.LEFT_CLICK] * 4, + screen_change_before_first_instruction=False + ) + else: + self.home.settings() + self.backend.wait_for_screen_change() + self._assert_screen(path / "app_context.png") + self.settings.multi_page_exit() + self.backend.wait_for_screen_change() + def authorize_baking(self, account: Optional[Account], **kwargs) -> bytes: """Send an authorize baking request and navigate until accept""" if 'instructions' not in kwargs: