From e9b77881d129f65e5b6fed0c1c3f017c33471763 Mon Sep 17 00:00:00 2001 From: drbeefsupreme Date: Fri, 16 Jul 2021 11:59:21 -0400 Subject: [PATCH] naive: wrong nonce l1 l2 adopt --- pkg/arvo/tests/lib/naive.hoon | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pkg/arvo/tests/lib/naive.hoon b/pkg/arvo/tests/lib/naive.hoon index 0035f8c86d..d700953452 100644 --- a/pkg/arvo/tests/lib/naive.hoon +++ b/pkg/arvo/tests/lib/naive.hoon @@ -1514,20 +1514,32 @@ =^ f state (n state (escape-accepted:l1 ~rigred ~rabsum-ravtyd)) [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) :: -++ test-l1-adoption-on-l2-wrong-key +++ test-l1-adoption-on-l2-wrong-key-or-nonce :: this is really bad =/ rr-escape [[~rabsum-ravtyd %own] %escape ~rigred] =/ rr-adopt [rigred-own %adopt ~rabsum-ravtyd] :: - %+ expect-eq - !> [~ %.y ~holrut] - :: - !> - =| =^state:naive - =^ f state (init-red-full state) - =^ f state (n state %bat q:(gen-tx 1 rr-escape %wrong-key)) - =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + ;: weld + %+ expect-eq + !> [~ %.y ~holrut] + :: + !> + =| =^state:naive + =^ f state (init-red-full state) + =^ f state (n state %bat q:(gen-tx 1 rr-escape %wrong-key)) + =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) + [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + :: + %+ expect-eq + !> [~ %.y ~holrut] + :: + !> + =| =^state:naive + =^ f state (init-red-full state) + =^ f state (n state %bat q:(gen-tx 999 rr-escape %holrut-rr-key-0)) + =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) + [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + == :: ++ test-marbud-l2-change-keys-new ^- tang =/ new-keys [%configure-keys encr auth suit |]