mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
add keys to sponsor in preboot validation
This commit is contained in:
parent
418a05f833
commit
54a3031397
@ -257,6 +257,10 @@
|
||||
^- dawn-event
|
||||
=/ spon
|
||||
=/ =ship (^sein:title who)
|
||||
=/ spon-spon
|
||||
?: ?=(%czar (clan:title ship))
|
||||
[| ~zod]
|
||||
[& (^sein:title ship)]
|
||||
=/ life-rift (~(got by lives) ship)
|
||||
=/ =life lyfe.life-rift
|
||||
=/ =rift rut.life-rift
|
||||
@ -265,7 +269,10 @@
|
||||
(as-octs:mimes:html (get-public ship life %crypt))
|
||||
(as-octs:mimes:html (get-public ship life %auth))
|
||||
1
|
||||
[ship rift life pass (^sein:title ship)]
|
||||
:^ ship
|
||||
*[address address address address]:azimuth
|
||||
`[life pass rift spon-spon ~]
|
||||
~
|
||||
=/ life-rift (~(got by lives) who)
|
||||
=/ =life lyfe.life-rift
|
||||
:* [who life sec:ex:(get-keys who life) ~]
|
||||
|
@ -65,7 +65,7 @@
|
||||
::
|
||||
+$ dawn-event
|
||||
$: =seed:able:jael
|
||||
spon=[=ship =rift =life =pass spon=ship]
|
||||
spon=[=ship point:azimuth]
|
||||
czar=(map ship [=rift =life =pass])
|
||||
turf=(list turf)
|
||||
bloq=@ud
|
||||
|
@ -278,13 +278,23 @@
|
||||
=. 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
|
||||
~
|
||||
`who.sponsor.u.net.spon.tac
|
||||
==
|
||||
=/ points=(map =ship =point)
|
||||
%- ~(run by czar.tac)
|
||||
|= [=a=rift =a=life =a=pass]
|
||||
^- point
|
||||
[a-rift a-life (malt [a-life 1 a-pass] ~) ~]
|
||||
=. points
|
||||
(~(put by points) [ship rift life [[life 1 pass] ~ ~] `spon]:spon.tac)
|
||||
(~(put by points) ship.spon.tac spon-point)
|
||||
=. +>.$
|
||||
%- curd =< abet
|
||||
(public-keys:~(feel su hen our pki etn sap) %full points)
|
||||
|
@ -2306,7 +2306,7 @@
|
||||
$~ [%vega ~] ::
|
||||
$% $: %dawn :: boot from keys
|
||||
=seed:able:kale :: identity params
|
||||
spon=[=ship =rift =life =pass spon=ship] :: sponsor
|
||||
spon=[=ship point:azimuth-types] :: sponsor
|
||||
czar=(map ship [=rift =life =pass]) :: galaxy table
|
||||
turf=(list turf) :: domains
|
||||
bloq=@ud :: block number
|
||||
|
@ -300,7 +300,7 @@ _dawn_turf(c3_c* dns_c)
|
||||
u3_noun
|
||||
u3_dawn_vent(u3_noun seed)
|
||||
{
|
||||
u3_noun url, bok, pon, zar, tuf, sap;
|
||||
u3_noun url, bok, pos, pon, zar, tuf, sap;
|
||||
|
||||
u3_noun ship = u3h(seed);
|
||||
u3_noun rank = u3do("clan:title", u3k(ship));
|
||||
@ -428,7 +428,7 @@ u3_dawn_vent(u3_noun seed)
|
||||
// produced by +veri:dawn to avoid coupling to +point structure
|
||||
// XX reconsider
|
||||
//
|
||||
pon = u3k(u3t(sas));
|
||||
pos = u3k(u3t(sas));
|
||||
|
||||
u3z(pot); u3z(liv); u3z(sas);
|
||||
}
|
||||
@ -476,6 +476,25 @@ u3_dawn_vent(u3_noun seed)
|
||||
u3z(oct); u3z(fut);
|
||||
}
|
||||
|
||||
if ( c3y == u3_Host.ops_u.etn ) {
|
||||
u3l_log("boot: extracting sponsor keys from snapshot\r\n");
|
||||
|
||||
pon = _dawn_need_unit(u3do("point:snap:dawn", u3k(u3t(sap))),
|
||||
"boot: failed to extract "
|
||||
"sponsor keys from snapshot");
|
||||
}
|
||||
else {
|
||||
u3l_log("boot: retrieving sponsor keys\r\n");
|
||||
|
||||
u3_noun oct = u3dc("point:give:dawn", u3k(bok), u3k(pos));
|
||||
u3_noun luh = _dawn_eth_rpc(url_c, u3k(oct));
|
||||
|
||||
pon = _dawn_need_unit(u3dc("point:take:dawn", u3k(pos), u3k(luh)),
|
||||
"boot: failed to retrieve sponsor keys");
|
||||
u3z(oct); u3z(luh);
|
||||
}
|
||||
|
||||
|
||||
u3z(rank);
|
||||
|
||||
// [%dawn seed sponsor galaxies domains block eth-url snap]
|
||||
|
Loading…
Reference in New Issue
Block a user