From 769d10fdd4ab76702b028c1febec31feeef25645 Mon Sep 17 00:00:00 2001 From: fang Date: Fri, 28 Jan 2022 14:30:59 +0100 Subject: [PATCH] fine: use keys from ames state instead of jael --- pkg/arvo/sys/vane/ames.hoon | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index ade806d30..cd9107092 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -3373,29 +3373,27 @@ |= [=path mess=*] (sign (shax (jam [our life path mess]))) :: - ++ life ~+ (jael ^life %life /(scot %p our)) - ++ ring ~+ (jael ^ring %vein /(scot %ud life)) - ++ sign sign:as:(nol:nu:crub:crypto ring) - :: - ++ jael - |* [=mold =desk =path] - !< mold - %- tail %- need %- need - (rof `[our ~ ~] [%jael %$] [our desk da+now] path) + ++ life life.ames-state + ++ sign sign:as:crypto-core.ames-state :: + ::TODO for the unknown case, should use the alien-agenda ++ lyfe |= who=ship - (jael (unit ^life) %lyfe /(scot %p our)) + ^- ^life + ~| [%fine %unknown-peer who] + =/ ship-state (~(got by peers.ames-state) who) + ?> ?=([%known *] ship-state) + life.ship-state :: - ::TODO don't scry! subscribe & get from state instead - ::TODO literally copy the ames code lol - ::TODO the fact that we share pki and lane data with ames is... suspect - :: also the en/decoding etc + ::TODO for the unknown case, should use the alien-agenda ++ pass |= [who=ship lyf=^life] - ::TODO but might fail need checks? - :: (jael * %deed ) - !! + ~| [%fine %unknown-peer who lyf] + =/ ship-state (~(got by peers.ames-state) who) + ?> ?=([%known *] ship-state) + ~| [%fine %life-mismatch who lyf] + ?> =(lyf life.ship-state) + public-key.ship-state -- :: ++ get-lane