From 52f331789eaad428e9b92799026b1e5745a808f3 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Tue, 3 Dec 2024 11:11:42 -0300 Subject: [PATCH] fix: audit feedback (#101) * chore: remove unused code * chore: bump app version * chore: apply format --- app/.cargo/config.toml | 2 +- app/src/ironfish/sapling.rs | 13 ------------- tests_zemu/snapshots/sp-mainmenu/00002.png | Bin 378 -> 414 bytes tests_zemu/snapshots/sp-mainmenu/00006.png | Bin 378 -> 414 bytes tests_zemu/tests/basic.test.ts | 2 +- 5 files changed, 2 insertions(+), 15 deletions(-) diff --git a/app/.cargo/config.toml b/app/.cargo/config.toml index 499b825e..44ca4601 100644 --- a/app/.cargo/config.toml +++ b/app/.cargo/config.toml @@ -1,6 +1,6 @@ [env] HEAP_SIZE = "16384" -APPVERSION = "1.1.1" +APPVERSION = "1.1.2" [unstable] build-std = ["core", "alloc"] diff --git a/app/src/ironfish/sapling.rs b/app/src/ironfish/sapling.rs index 821ea8aa..7ef4cd13 100644 --- a/app/src/ironfish/sapling.rs +++ b/app/src/ironfish/sapling.rs @@ -18,17 +18,6 @@ pub const SPEND_KEY_SIZE: usize = 32; /// world, inside the API they map to Edwards points or scalar values /// on the JubJub curve. pub struct SaplingKey { - /// The private (secret) key from which all the other key parts are derived. - /// The expanded form of this key is required before a note can be spent. - #[allow(unused)] - spending_key: [u8; SPEND_KEY_SIZE], - - /// Part of the expanded form of the spending key, generally referred to as - /// `ask` in the literature. Derived from spending key using a seeded - /// pseudorandom hash function. Used to construct authorizing_key. - #[allow(unused)] - pub(crate) spend_authorizing_key: jubjub::Fr, - /// Part of the expanded form of the spending key, generally referred to as /// `nsk` in the literature. Derived from spending key using a seeded /// pseudorandom hash function. Used to construct nullifier_deriving_key @@ -93,8 +82,6 @@ impl SaplingKey { }; Ok(SaplingKey { - spending_key, - spend_authorizing_key, proof_authorizing_key, outgoing_viewing_key, view_key, diff --git a/tests_zemu/snapshots/sp-mainmenu/00002.png b/tests_zemu/snapshots/sp-mainmenu/00002.png index 4c78b4df7999e914637c1b12f3e2fcc41174ea0c..bb472b982d58f49a72acc2e4ca4f1f9575145f85 100644 GIT binary patch delta 387 zcmeyxG>>_LN`0!Qi(^Q|oVPcliw-OBv?gx7Ja@x?)s55b3=$ck$9~NYEa8yNsAsXfDe*XT z>#Q_>lf8^D1A05lD*S)d*R5rL^)m9Vo^#C7(q}VQ-n`GboQXu~C*_qkQUkbm;?5r)zTA`*~ zRXP28Y=D*E*Z7a?^bSp3+@tt1E2PdZoV)C&@4X}5zxec=)oRVv11Ik@uG%1!zHqAD zZ>yX;QgOMn_SQ@*=>8{hoPA^K`IdZ1MXA_{rTmez`pS1deR0@0>fdI?+MCsOs<+p& zPTjmUr)}d0gEHSkH_LcuBwmfG?|p8b&>p-$@i<$^KaGmleHrIp>Q|d3Ecmqi?AiTX e@Sp-R`akiDH2mzmAu-b$B<$(x=d#Wzp$PyJqOOnt delta 351 zcmbQo{EKOVO1-0}i(^Q|oVPb)#hMfZ+7e%F5&pJc<=Z7zcfR&Ol{&T!-*>L+3EXG6 z#fXgo4nBme7j&Ild`u!cce>TWkbOBPuPN-&l`Gw4ZMkIq`Hn@gCme1obDXq#zHZf2 zliiCS@_q{mc zSd3rpc6PlfB*kms9#kaNEBspeZ05>~^EsEYm6Y##Q?hcI&sN5wdAi2u*ZYZH_34lM z=k;6fguct$@I9-$3m&dGBT#SJ)gOGdCHCLs*%hAg2UAZhS^rEW>r%KIe_E30tjzbX z3!YuukT=<=QsQNV_{PrrocXCvYi=*`Keqdhzu?K6QuFK-{^lN8sLuIrAB*SdTBd)z uyfbo+vWfiD-0^bO(@qkg%t#pUXO@geCxOa-T>5 diff --git a/tests_zemu/snapshots/sp-mainmenu/00006.png b/tests_zemu/snapshots/sp-mainmenu/00006.png index 4c78b4df7999e914637c1b12f3e2fcc41174ea0c..bb472b982d58f49a72acc2e4ca4f1f9575145f85 100644 GIT binary patch delta 387 zcmeyxG>>_LN`0!Qi(^Q|oVPcliw-OBv?gx7Ja@x?)s55b3=$ck$9~NYEa8yNsAsXfDe*XT z>#Q_>lf8^D1A05lD*S)d*R5rL^)m9Vo^#C7(q}VQ-n`GboQXu~C*_qkQUkbm;?5r)zTA`*~ zRXP28Y=D*E*Z7a?^bSp3+@tt1E2PdZoV)C&@4X}5zxec=)oRVv11Ik@uG%1!zHqAD zZ>yX;QgOMn_SQ@*=>8{hoPA^K`IdZ1MXA_{rTmez`pS1deR0@0>fdI?+MCsOs<+p& zPTjmUr)}d0gEHSkH_LcuBwmfG?|p8b&>p-$@i<$^KaGmleHrIp>Q|d3Ecmqi?AiTX e@Sp-R`akiDH2mzmAu-b$B<$(x=d#Wzp$PyJqOOnt delta 351 zcmbQo{EKOVO1-0}i(^Q|oVPb)#hMfZ+7e%F5&pJc<=Z7zcfR&Ol{&T!-*>L+3EXG6 z#fXgo4nBme7j&Ild`u!cce>TWkbOBPuPN-&l`Gw4ZMkIq`Hn@gCme1obDXq#zHZf2 zliiCS@_q{mc zSd3rpc6PlfB*kms9#kaNEBspeZ05>~^EsEYm6Y##Q?hcI&sN5wdAi2u*ZYZH_34lM z=k;6fguct$@I9-$3m&dGBT#SJ)gOGdCHCLs*%hAg2UAZhS^rEW>r%KIe_E30tjzbX z3!YuukT=<=QsQNV_{PrrocXCvYi=*`Keqdhzu?K6QuFK-{^lN8sLuIrAB*SdTBd)z uyfbo+vWfiD-0^bO(@qkg%t#pUXO@geCxOa-T>5 diff --git a/tests_zemu/tests/basic.test.ts b/tests_zemu/tests/basic.test.ts index afe0cf3c..c035773b 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(1) expect(resp.minor).toBe(1) - expect(resp.patch).toBe(1) + expect(resp.patch).toBe(2) } finally { await sim.close() }