fine: use keys from ames state instead of jael

This commit is contained in:
fang 2022-01-28 14:30:59 +01:00
parent 4c045a9c4f
commit 769d10fdd4
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -3373,29 +3373,27 @@
|= [=path mess=*] |= [=path mess=*]
(sign (shax (jam [our life path mess]))) (sign (shax (jam [our life path mess])))
:: ::
++ life ~+ (jael ^life %life /(scot %p our)) ++ life life.ames-state
++ ring ~+ (jael ^ring %vein /(scot %ud life)) ++ sign sign:as:crypto-core.ames-state
++ sign sign:as:(nol:nu:crub:crypto ring)
::
++ jael
|* [=mold =desk =path]
!< mold
%- tail %- need %- need
(rof `[our ~ ~] [%jael %$] [our desk da+now] path)
:: ::
::TODO for the unknown case, should use the alien-agenda
++ lyfe ++ lyfe
|= who=ship |= 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 for the unknown case, should use the alien-agenda
::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
++ pass ++ pass
|= [who=ship lyf=^life] |= [who=ship lyf=^life]
::TODO but might fail need checks? ~| [%fine %unknown-peer who lyf]
:: (jael * %deed ) =/ 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 ++ get-lane