From 31d4c4e61f84a25e7b7cf33e70e1c186fbd48cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Palmer?= Date: Mon, 5 Feb 2024 14:21:17 +0100 Subject: [PATCH] Tests: add test check HWM after signing when a chain has been setup --- .../app_context/chain_id.png | Bin 0 -> 421 bytes .../app_context/high_watermark.png | Bin 0 -> 345 bytes .../app_context/public_key_hash_1.png | Bin 0 -> 559 bytes .../app_context/public_key_hash_2.png | Bin 0 -> 569 bytes .../app_context/chain_id.png | Bin 0 -> 460 bytes .../app_context/high_watermark.png | Bin 0 -> 400 bytes .../app_context/public_key_hash.png | Bin 0 -> 792 bytes .../app_context/chain_id.png | Bin 0 -> 460 bytes .../app_context/high_watermark.png | Bin 0 -> 400 bytes .../app_context/public_key_hash.png | Bin 0 -> 792 bytes .../app_context/app_context.png | Bin 0 -> 15835 bytes test/python/test_instructions.py | 59 ++++++++++++++++++ 12 files changed, 59 insertions(+) create mode 100644 test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/chain_id.png create mode 100644 test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/high_watermark.png create mode 100644 test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/public_key_hash_1.png create mode 100644 test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/public_key_hash_2.png create mode 100644 test/python/snapshots/nanosp/test_sign_when_chain_is_setup/app_context/chain_id.png create mode 100644 test/python/snapshots/nanosp/test_sign_when_chain_is_setup/app_context/high_watermark.png create mode 100644 test/python/snapshots/nanosp/test_sign_when_chain_is_setup/app_context/public_key_hash.png create mode 100644 test/python/snapshots/nanox/test_sign_when_chain_is_setup/app_context/chain_id.png create mode 100644 test/python/snapshots/nanox/test_sign_when_chain_is_setup/app_context/high_watermark.png create mode 100644 test/python/snapshots/nanox/test_sign_when_chain_is_setup/app_context/public_key_hash.png create mode 100644 test/python/snapshots/stax/test_sign_when_chain_is_setup/app_context/app_context.png diff --git a/test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/chain_id.png b/test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/chain_id.png new file mode 100644 index 0000000000000000000000000000000000000000..13fd76040a79388d55efd0686e5edf8315fe24e8 GIT binary patch literal 421 zcmV;W0b2fvP)T(kuIFE6p;WLW0U`;3x_C@kDAKk0RR91Ovm>A{<6h55VS&dr^d_i zIy-)mx4D8s466~GuQTd*LSfV{qrM$DOIzc*%m6b(Co z=76;mrN#1XC}Fd(BPChH0F2ldQ`z&lGwr6>MTFdk;F1+N=npgn0NjZW!;cVr1LKx4 P00000NkvXXu0mjfa~`>T literal 0 HcmV?d00001 diff --git a/test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/high_watermark.png b/test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/high_watermark.png new file mode 100644 index 0000000000000000000000000000000000000000..0cccb5b4aca404479c52128b4de8509cf54e81ad GIT binary patch literal 345 zcmV-f0jBFBFgn0000OW#8l?t5=%T9_<@124d~~ zV{1-eSvy;aL*2Kk!B}B>`MP_^A!7kzl~;8tt!1^+w`jR6ifxbo)H|t6g&0zzC_lNr z`GchSTgLQQJT?@qHGL_mQfX_q+Dumfn;@<TY@DXU9;J3hxK6|hAfrW4%i2li5nqu9DktByTf*CD4BRg+5Fk?>`wiz7 zc0zqELIe<$n}G(Agk>Q>f%~u($}Teh1~Ym0+9ZUPwZNP)>XbRG!X z0Sze|9qs3pEGd z#JP8&v*W*!Z$@<}Yu21djtt#Iddtii=yLPA+th7KH^;}M_dTyb+QG#Q2<)6$1LPK2_Im(> z4JPzcz^K)yWiB61RU{j_#xF5>X(DU?{Zbl+SOMnB_0GeoIm9O8g`thJ?3i7^3NZ0X xm=`p`;m|lbzi;A@4>E-`TqAi|C=?18#RJ!@m~(NYZ)5-f002ovPDHLkV1fe>`k?>- literal 0 HcmV?d00001 diff --git a/test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/public_key_hash_2.png b/test/python/snapshots/nanos/test_sign_when_chain_is_setup/app_context/public_key_hash_2.png new file mode 100644 index 0000000000000000000000000000000000000000..a30fbd958349d4762e483737696ec94262127b42 GIT binary patch literal 569 zcmV-90>=G`P)sI5;qIy?%dHPC#^tSD6_D zcqN!KcR`Iqq{!7aFOYGhp;aOlZ?=1O0#piEB@Fnga+o$fzV-hRiDHQ`Y?8THmCTm4 z36WnK08E;R)&y8kvr@pdlqfMkc@9)P>O&`^97Lck%gG$8kWY*Nmw;tYhib8_A{DU% z8k!?(o&F}ZTmn{}N|}QpyQ`I_AqQB*ukh*Hehp#{@M=$GAUBd29sSVt4!}JRFeP`} zVoT?MVP;@8NL8K1i3A;iRNIo0F|F%lEH-jfTdYx@?te+E&v`!o5P$2 zbtq^F7DHXU9XVpOHU-94#etnUg=jIE7}7Uk(!(p8i~~0H{xYM(xn8&5-vgb1ynzMh zDAMB%mPeZuuRQ5*kOf}LyfTzKy2sJW2BiZxmEvix;JS)RPVjm#(4By{+?=JK0PC+W|UfXS-p$%nlW_vv7tIp|;+;;bV{}XQ@*B}G#y`ZwW*#7&MJB~6tWvjrx z!+d04q1`K02bR9!7-A!wvl%D9>aty=w$~|F@5bP|sEjroRcwSv0lN7O#4ShI?XGfE zj#VUTknYTLUDPEu+G*R-gZtgJ6pTlZEv^{muuMTESOEE&>1y4wS?2rk!cU+JV2@S3 z>T6&7wJpZqhL*aJT2e~OkynrQ`>8!MypZ-kwgmCr>`92FYqJ;GFI;&ztp;Sjnv)7@ za3@xwJMAQy8eEF>0ssI2000000000000000m-z>nK5wo|ZNr%W0000|>c0$z4^E>BgPkk5s z(CX}&Nl{{|hqM01JKkC=TlKDR?~9=2wRJ1LHO!BT{>z`Z_G!er*?Bi&*6s9D<|?QW zwOem2F;}T-%L>~+5ff)!(WyKgd-%)jl$`?N21)D+i~mh8;QZ{$$l$Q_Om0{Awa4fF z%!)kspFJsZcC7RL^8Q&R*@DEc;OCdW5JEglf*RU;#An+5(`+ce z_;#QI`M%yBC>%@-VHmwD@_i>5K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%{Yz#jPlOt4l{ z82|D2XKz0`CMIi4Q+}0tMl6OAc7QJKchj|cnCf*$2(xibMtLQEiTzlj@U3-p0wi0h z)rx7_t+F?7JdeSoBm;gN>hVz>F}X9PXP=~NZ%2~xoStPcHnr0#nc^y$V)|8|t>oY$ zHCwFaL2VQLxVbA--R4QNoEX@pZqrH1d+$btFx%Tc2&IlT@!%{c)<^2D)vvmnx|ARP zGhk#%C(KUy3~b&0UjrUkW>d)vXR& z7uJ9M+3oOigM|X)bP>A{Z@sTmnq7#Dp~HSZa^#?IaQ_)q{*{!M(t$`GM+2g#hIiIZ zDDt7l(Uqo>sf*M6ww4&yY^96Y?&Y0%){j?WsNep%MHQuY!sw$WV&{5xi!ZQK&Uzkp zFB&W;jMEp7asX>$3Si^XQFVF9UIadB6_DLJ62hSA9L68N$`!3{dHE9a#&n$_l~~_s zVDww}G)MZikD#BxfJ6MY0u$@Lxsx47-~T!4QbB)4p1hzW7wrQ+8Eowl+F?e7Lp zV1WXr$8;*KP>4hX5HS1->$0sk|ClXVPW_nqP_AF>Ut zB>ofh&j%v(nb9qAw3|r|#D67%oLJqTKsY8gz0&u_7X8nt{WvKZuVhSArYYZaj=b|IESz#cI%8`kH|-{Jxh@q*VLaED^JC!02SU5B>ITkezrw~0Ja`)T zmE=fkRT=*xpY4x~soH`HKZn2>SktPz^T|h(yR*K_D|n@cj}^8T7BKu3w$cdC3$(*; zSBoQV6_-)|T>@UGH{QvA$89<3sokm!LaWz;$aUjg;{`g6ZL4rzGR3U6{-3N)ikXu2 zI6yq|=l8%xb%)uBwN59x$DH{tgDcqlPkT6jGp{MvpVDEz5eK}qO=qZYcB}fP%k%#M Dwk|O3 literal 0 HcmV?d00001 diff --git a/test/python/test_instructions.py b/test/python/test_instructions.py index 8746c631..67fffcaa 100644 --- a/test/python/test_instructions.py +++ b/test/python/test_instructions.py @@ -669,6 +669,65 @@ def test_sign_when_no_chain_setup( ) +def test_sign_when_chain_is_setup( + client: TezosClient, + tezos_navigator: TezosNavigator) -> None: + """Check that signing when chain has been setup change main HWM.""" + + account = DEFAULT_ACCOUNT + main_chain_id = "NetXH12AexHqTQa" # Chain = 1 + + tezos_navigator.setup_app_context( + account, + main_chain_id, + main_hwm=Hwm(0), + test_hwm=Hwm(0) + ) + + attestation = build_attestation( + 1, 0, + main_chain_id + ) + + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=main_chain_id, + main_hwm=Hwm(1, 0), + test_hwm=Hwm(0, 0), + ) + + attestation = build_attestation( + 2, 0, + DEFAULT_CHAIN_ID # Chain = 0 + ) + + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=main_chain_id, + main_hwm=Hwm(1, 0), + test_hwm=Hwm(2, 0), + ) + + attestation = build_attestation( + 2, 0, + "NetXH12Af5mrXhq" # Chain = 2 + ) + + with StatusCode.WRONG_VALUES.expected(): + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=main_chain_id, + main_hwm=Hwm(1, 0), + test_hwm=Hwm(2, 0), + ) + + # Data generated by the old application itself HMAC_TEST_SET = [ (DEFAULT_ACCOUNT,