With ++open. Everything left should be easy.

This commit is contained in:
C. Guy Yarvin 2016-09-27 22:20:01 -07:00
parent 453ad8c617
commit f5afb2bc95

View File

@ -16,14 +16,14 @@
sub/jael-subjective :: all subjective state sub/jael-subjective :: all subjective state
== :: == ::
++ jael-subjective :: urbit metadata ++ jael-subjective :: urbit metadata
$: cod/farm :: our + dependencies $: $= car :: secure channels
$= car :: secure channels
%+ map ship :: partner %+ map ship :: partner
$: yen/(set duct) :: trackers $: yen/(set duct) :: trackers
dut/(unit pipe) :: channel state det/pipe :: channel state
== :: == ::
$= neb :: neighborhood $= rel :: neighborhood
$: dad/ship :: parent $: dad/_our :: parent
cod/farm :: cousins
pyr/(set ship) :: peers pyr/(set ship) :: peers
kyz/(set ship) :: children kyz/(set ship) :: children
== :: == ::
@ -59,7 +59,7 @@
jael-delta :: %|/asset change jael-delta :: %|/asset change
:: :: :: ::
++ jael-gift :: report ++ jael-gift :: report
$? {$veil p/(unit pipe)} :: secure channel $? {$veil p/pipe} :: secure channel
{$vest p/jael-tally} :: balance update {$vest p/jael-tally} :: balance update
{$vein p/life q/(map life ring)} :: private keys {$vein p/life q/(map life ring)} :: private keys
{$vine p/(list jael-edit)} :: raw actions {$vine p/(list jael-edit)} :: raw actions
@ -92,7 +92,6 @@
{$mint p/ship q/jael-purse} :: create rights {$mint p/ship q/jael-purse} :: create rights
{$move p/ship q/ship r/jael-purse} :: transfer from/to {$move p/ship q/ship r/jael-purse} :: transfer from/to
{$nuke $~} :: cancel tracker {$nuke $~} :: cancel tracker
{$open p/ship} :: make secret channel
{$step p/bull q/ring} :: update private key {$step p/bull q/ring} :: update private key
{$veil p/ship} :: view secret channel {$veil p/ship} :: view secret channel
{$vein $~} :: view signing keys {$vein $~} :: view signing keys
@ -359,12 +358,6 @@
$nuke $nuke
!! !!
:: ::
:: open secure channel
:: {$open p/ship}
::
$open
!!
::
:: extend our certificate with a new private key :: extend our certificate with a new private key
:: {$step p/bull} :: {$step p/bull}
:: ::
@ -375,7 +368,7 @@
:: {$veil p/ship} :: {$veil p/ship}
:: ::
$veil $veil
(curd abet:(~(veil ~(feed su urb sub) hen) p.tac eny.sys)) (curd abet:(~(veil ~(feed su urb sub) hen) p.tac))
:: ::
:: watch private keys :: watch private keys
:: {$vein $~} :: {$vein $~}
@ -469,15 +462,19 @@
hen/duct hen/duct
:: :: ++veil:feed:su :: :: ++veil:feed:su
++ veil :: secure channel ++ veil :: secure channel
|= {who/ship eny/@e} |= who/ship
^+ ..feed ^+ ..feed
::
:: send initial pki sync as needed
::
=. ..feed (open hen who)
=/ ruc (~(get by car) who) =/ ruc (~(get by car) who)
=/ rec ?~ ruc =/ rec
:- `yen/(set duct)`[hen ~ ~] ?~ ruc
`dut/(unit pipe)`~ [`yen/(set duct)`[hen ~ ~] det=(veil:form who)]
u.ruc(yen (~(put in yen.u.ruc) hen)) u.ruc(yen (~(put in yen.u.ruc) hen))
%_ ..feed %_ ..feed
moz [[hen %give %veil dut.rec] moz] moz [[hen %give %veil det.rec] moz]
car (~(put by car) who rec) car (~(put by car) who rec)
== ==
:: :: ++vein:feed:su :: :: ++vein:feed:su
@ -500,7 +497,7 @@
++ veal :: kick subfarm ++ veal :: kick subfarm
^+ ..feel ^+ ..feel
=/ cod veal:form =/ cod veal:form
?:(=(^cod cod) ..feel ..feel(cod cod)) ?:(=(cod.rel cod) ..feel ..feel(cod.rel cod))
:: :: ++veil:feel:su :: :: ++veil:feel:su
++ veil :: kick secure channel ++ veil :: kick secure channel
|= who/ship |= who/ship
@ -508,9 +505,9 @@
=/ ruc (~(get by car) who) =/ ruc (~(get by car) who)
?~ ruc ..feel ?~ ruc ..feel
=/ det (veil:form who) =/ det (veil:form who)
?: =(`det dut.u.ruc) ..feel ?: =(det det.u.ruc) ..feel
=. car (~(put by car) who [yen.u.ruc `det]) =. car (~(put by car) who [yen.u.ruc det])
(exec yen.u.ruc [%give %veil `det]) (exec yen.u.ruc [%give %veil det])
:: :: ++vein:feel:su :: :: ++vein:feel:su
++ vein :: kick private keys ++ vein :: kick private keys
^+ ..feel ^+ ..feel
@ -650,35 +647,29 @@
:: ::
(~(gas by *(map ship jael-purse)) veg) (~(gas by *(map ship jael-purse)) veg)
-- --
:: :: :: ++open:su
++ open ++ open :: make secure channel
|= $: eny/@e |= $: hen/duct
hen/duct
who/ship who/ship
== ==
^+ +> ^+ +>
!! ::
:: :: a one-time operation to create a secure channel
:: if first meeting, add to child/peer sets. children ::
:: have us as a parent; peers have the same rank as us ?: (~(has by car) who) +>
:: ::
:: :: initial propagation: ourself and dependencies, plus
:: ?. =(1 lyf.led) +>.$ :: all capital ships if meeting a child.
:: ?: =(our dad) ::
:: +>.$(kyz.neb (~(put in kyz.neb) rex.led)) =* hec ^- farm
:: ?. =((clan rex.led) (clan our)) ?. (~(has in kyz.rel) who) cod.rel
:: +>.$ =- (~(uni by cod.rel) -)
:: +>.$(pyr.neb (~(put in pyr.neb) rex.led)) %- ~(gas by *farm)
:: %+ skim (~(tap by pug.urb))
:: =. moz |=({who/ship *} (lth who 65.536))
:: ?. &(=(1 lyf.led) (~(has in kyz.neb) rex.led)) ::
:: moz (~(home fire hec) who)
:: :_ moz :: :: ++paid:su
:: =* rug ^- farm
:: %- ~(gas by *farm)
:: %+ skim (~(tap by pug.urb))
:: |=({who/ship *} (lth who 65.536))
:: [%pass %x ~ %mess rex.led /x %meet rug]
++ paid :: track asset change ++ paid :: track asset change
|= $: :: rex: promise from |= $: :: rex: promise from
:: pal: promise to :: pal: promise to
@ -757,10 +748,16 @@
[who.p.gan lyf.p.gan q.gan] [who.p.gan lyf.p.gan q.gan]
== ==
:: ::
:: if our subfarm may have changed, reset it. :: if our subfarm may have changed, reset it
:: ::
=. +>.$ ?. |(=(our rex) (~(has by cod) rex)) +>.$ =. +>.$ ?. |(=(our rex) (~(has by cod.rel) rex)) +>.$
veal:feel veal:feel
::
:: if a new deed, reset parent
::
=. dad.rel ?. &(=(our rex) ?=($step -.gan))
dad.rel
dad.doc.dat.p.gan
:: ::
:: kick secure channels :: kick secure channels
:: ::
@ -771,6 +768,15 @@
?: &(=([~ ~] vie) !=(our rex)) ?: &(=([~ ~] vie) !=(our rex))
(~(home fire lip) rex) (~(home fire lip) rex)
:: ::
:: if first certificate, add to neighbor lists
::
=. +>.$ ?. &(?=($step -.gan) =(1 lyf)) +>.$
=. kyz.rel ?. =(our dad.doc.dat.p.gan) kyz.rel
(~(put in kyz.rel) rex)
=. pyr.rel ?. =((clan rex) (clan our)) pyr.rel
(~(put in pyr.rel) rex)
+>.$
::
:: propagate new data as appropriate :: propagate new data as appropriate
:: ::
%+ ~(spam fire lip) %+ ~(spam fire lip)
@ -781,17 +787,17 @@
:: if a new deed has been added, also to pals :: if a new deed has been added, also to pals
:: ::
?: =(our rex) ?: =(our rex)
:* [dad.neb ~ ~] :* [dad.rel ~ ~]
kyz.neb kyz.rel
?.(=(%step -.gan) ~ [pyr.neb ~]) ?.(=(%step -.gan) ~ [pyr.rel ~])
== ==
:: ::
:: forward star and galaxy updates to parents and kids :: forward star and galaxy updates to parents and kids
:: ::
?. (lth rex 65.536) ?. (lth rex 65.536)
~ ~
:* [dad.neb ~ ~] :* [dad.rel ~ ~]
kyz.neb kyz.rel
~ ~
== ==
-- --
@ -808,6 +814,11 @@
:: :: ++abet:ur :: :: ++abet:ur
++ abet :: resolve ++ abet :: resolve
[(flop hab) `jael-objective`urb] [(flop hab) `jael-objective`urb]
:: :: ++boss:ur
++ boss :: parent
|= who/ship
^- ship
-:(dads who)
:: ::
++ dads :: ++dads:ur ++ dads :: ++dads:ur
|= who/ship :: lineage |= who/ship :: lineage