From 2c2ef195a7b0713eab97af57113bf088518db476 Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Tue, 20 Aug 2019 16:41:50 -0700 Subject: [PATCH] add sponsorship chain keys to %dawn event --- pkg/arvo/lib/ph/azimuth.hoon | 39 ++++++++++++++++++++---------------- pkg/arvo/lib/pill.hoon | 2 +- pkg/arvo/sys/vane/jael.hoon | 31 +++++++++++++++++----------- pkg/arvo/sys/zuse.hoon | 2 +- 4 files changed, 43 insertions(+), 31 deletions(-) diff --git a/pkg/arvo/lib/ph/azimuth.hoon b/pkg/arvo/lib/ph/azimuth.hoon index 6284014b3..6d6677e90 100644 --- a/pkg/arvo/lib/ph/azimuth.hoon +++ b/pkg/arvo/lib/ph/azimuth.hoon @@ -266,24 +266,29 @@ ++ dawn |= [who=ship seed=(unit seed:able:jael)] ^- dawn-event - =/ spon + =/ spon=(list [ship point:azimuth]) + |- ^- (list [ship point:azimuth]) =/ =ship (^sein:title who) - =/ spon-spon - ?: ?=(%czar (clan:title ship)) - [| ~zod] - [& (^sein:title ship)] - =/ life-rift ~|([ship lives] (~(got by lives) ship)) - =/ =life lyfe.life-rift - =/ =rift rut.life-rift - =/ =pass - %^ pass-from-eth:azimuth - (as-octs:mimes:html (get-public ship life %crypt)) - (as-octs:mimes:html (get-public ship life %auth)) - 1 - :^ ship=ship - *[address address address address]:azimuth - `[life=life pass rift spon-spon ~] - ~ + =/ a-point=[^ship point:azimuth] + =/ spon-spon + ?: ?=(%czar (clan:title ship)) + [| ~zod] + [& (^sein:title ship)] + =/ life-rift ~|([ship lives] (~(got by lives) ship)) + =/ =life lyfe.life-rift + =/ =rift rut.life-rift + =/ =pass + %^ pass-from-eth:azimuth + (as-octs:mimes:html (get-public ship life %crypt)) + (as-octs:mimes:html (get-public ship life %auth)) + 1 + :^ ship + *[address address address address]:azimuth + `[life=life pass rift spon-spon ~] + ~ + ?: ?=(%czar (clan:title ship)) + [a-point]~ + [a-point $(who who.sponsor:(need net.a-point))] =/ =seed:able:jael ?^ seed u.seed diff --git a/pkg/arvo/lib/pill.hoon b/pkg/arvo/lib/pill.hoon index 29d981cbe..4838982b4 100644 --- a/pkg/arvo/lib/pill.hoon +++ b/pkg/arvo/lib/pill.hoon @@ -19,7 +19,7 @@ :: +$ dawn-event $: =seed:able:jael - spon=[=ship point:azimuth] + spon=(list [=ship point:azimuth]) czar=(map ship [=rift =life =pass]) turf=(list turf) bloq=@ud diff --git a/pkg/arvo/sys/vane/jael.hoon b/pkg/arvo/sys/vane/jael.hoon index 865e5cb2b..b2e601401 100644 --- a/pkg/arvo/sys/vane/jael.hoon +++ b/pkg/arvo/sys/vane/jael.hoon @@ -255,7 +255,8 @@ =/ cub (nol:nu:crub:crypto key.seed.tac) %+ ~(put by pos.zim.pki) our - [1 lyf.seed.tac (my [lyf.seed.tac [1 pub:ex:cub]] ~) `ship.spon.tac] + =/ spon-ship ?~(spon.tac ~ `ship.i.spon.tac) + [1 lyf.seed.tac (my [lyf.seed.tac [1 pub:ex:cub]] ~) spon-ship] :: our initial private key :: =. lyf.own.pki lyf.seed.tac @@ -267,15 +268,18 @@ =. tuf.own.pki turf.tac :: our initial galaxy table as a +map from +life to +public :: - =/ spon-point=point - ~| [%sponsor-point point] - ?> ?=(^ net.spon.tac) - :* continuity-number.u.net.spon.tac - life.u.net.spon.tac - (malt [life.u.net.spon.tac 1 pass.u.net.spon.tac] ~) - ?. has.sponsor.u.net.spon.tac + =/ spon-points=(list [ship point]) + %+ turn spon.tac + |= [=ship az-point=point:azimuth] + ~| [%sponsor-point az-point] + ?> ?=(^ net.az-point) + :* ship + continuity-number.u.net.az-point + life.u.net.az-point + (malt [life.u.net.az-point 1 pass.u.net.az-point] ~) + ?. has.sponsor.u.net.az-point ~ - `who.sponsor.u.net.spon.tac + `who.sponsor.u.net.az-point == =/ points=(map =ship =point) %- ~(run by czar.tac) @@ -283,7 +287,7 @@ ^- point [a-rift a-life (malt [a-life 1 a-pass] ~) ~] =. points - (~(put by points) ship.spon.tac spon-point) + (~(gas by points) spon-points) =. +>.$ %- curd =< abet (public-keys:~(feel su hen our pki etn) %full points) @@ -298,13 +302,16 @@ (sources:~(feel su hen our pki etn) ~ [%| %azimuth-tracker]) :: * + =/ spon-ship + ?> ?=(^ spon.tac) + ship.i.spon.tac =. +>.$ %- curd =< abet %+ sources:~(feel su hen our pki etn) - (silt ship.spon.tac ~) + (silt spon-ship ~) [%| %azimuth-tracker] %- curd =< abet - (sources:~(feel su hen our pki etn) ~ [%& ship.spon.tac]) + (sources:~(feel su hen our pki etn) ~ [%& spon-ship]) == :: =. moz diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 37a69c39e..0f1588e7a 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -2074,7 +2074,7 @@ $~ [%vega ~] :: $% $: %dawn :: boot from keys =seed:able:jael :: identity params - spon=[=ship point:azimuth-types] :: sponsor + spon=(list [=ship point:azimuth-types]) :: czar=(map ship [=rift =life =pass]) :: galaxy table turf=(list turf) :: domains bloq=@ud :: block number