2019-08-07 01:42:37 +03:00
|
|
|
!: :: /vane/jael
|
2016-11-24 07:25:07 +03:00
|
|
|
:: :: %reference/0
|
|
|
|
!? 150
|
|
|
|
::
|
|
|
|
::
|
|
|
|
:: %jael: secrets and promises.
|
|
|
|
::
|
2016-12-16 09:34:01 +03:00
|
|
|
:: todo:
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
:: - communication with other vanes:
|
|
|
|
:: - actually use %behn for expiring secrets
|
|
|
|
:: - report %ames propagation errors to user
|
|
|
|
::
|
|
|
|
:: - nice features:
|
|
|
|
:: - scry namespace
|
|
|
|
:: - task for converting invites to tickets
|
|
|
|
::
|
2020-12-06 11:38:37 +03:00
|
|
|
|= our=ship
|
2016-12-07 06:13:33 +03:00
|
|
|
=, pki:jael
|
2020-12-08 03:47:06 +03:00
|
|
|
=, jael
|
2016-12-02 22:34:07 +03:00
|
|
|
=, crypto
|
2016-11-24 07:25:07 +03:00
|
|
|
=, jael
|
2020-12-06 03:20:42 +03:00
|
|
|
=, ethereum-types
|
|
|
|
=, azimuth-types
|
2020-12-08 03:47:06 +03:00
|
|
|
=, point=point:jael
|
2016-11-24 07:25:07 +03:00
|
|
|
:: ::::
|
|
|
|
:::: # models :: data structures
|
|
|
|
:: ::::
|
|
|
|
:: the %jael state comes in two parts: absolute
|
|
|
|
:: and relative.
|
|
|
|
::
|
|
|
|
:: ++state-relative is subjective, denormalized and
|
|
|
|
:: derived. it consists of all the state we need to
|
|
|
|
:: manage subscriptions efficiently.
|
|
|
|
::
|
|
|
|
=> |%
|
2021-11-10 03:41:23 +03:00
|
|
|
+$ state-2
|
|
|
|
$: %2
|
|
|
|
pki=state-pki-2 ::
|
2018-05-29 00:04:33 +03:00
|
|
|
etn=state-eth-node :: eth connection state
|
2016-11-24 07:25:07 +03:00
|
|
|
== ::
|
2021-11-10 03:41:23 +03:00
|
|
|
+$ state-pki-2 :: urbit metadata
|
2019-08-07 01:42:37 +03:00
|
|
|
$: $= own :: vault (vein)
|
2019-06-21 21:03:53 +03:00
|
|
|
$: yen=(set duct) :: trackers
|
2018-10-16 03:39:55 +03:00
|
|
|
sig=(unit oath) :: for a moon
|
2018-10-15 22:51:53 +03:00
|
|
|
tuf=(list turf) :: domains
|
2019-06-21 21:03:53 +03:00
|
|
|
fak=_| :: fake keys
|
|
|
|
lyf=life :: version
|
2020-07-29 19:14:18 +03:00
|
|
|
step=@ud :: login code step
|
2019-06-21 21:03:53 +03:00
|
|
|
jaw=(map life ring) :: private keys
|
2016-11-24 07:25:07 +03:00
|
|
|
== ::
|
2019-08-07 01:42:37 +03:00
|
|
|
$= zim :: public
|
|
|
|
$: yen=(jug duct ship) :: trackers
|
|
|
|
ney=(jug ship duct) :: reverse trackers
|
2019-08-20 20:22:52 +03:00
|
|
|
nel=(set duct) :: trackers of all
|
2018-05-29 00:04:33 +03:00
|
|
|
dns=dnses :: on-chain dns state
|
2018-12-14 00:23:17 +03:00
|
|
|
pos=(map ship point) :: on-chain ship state
|
2018-05-29 00:04:33 +03:00
|
|
|
== ::
|
2016-12-16 09:34:01 +03:00
|
|
|
== ::
|
2020-12-01 07:33:42 +03:00
|
|
|
+$ message-all
|
|
|
|
$% [%0 message]
|
|
|
|
==
|
2019-08-07 01:42:37 +03:00
|
|
|
+$ message :: message to her jael
|
|
|
|
$% [%nuke whos=(set ship)] :: cancel trackers
|
|
|
|
[%public-keys whos=(set ship)] :: view ethereum events
|
2016-11-24 07:25:07 +03:00
|
|
|
== ::
|
2019-08-20 02:40:57 +03:00
|
|
|
+$ message-result
|
|
|
|
$% [%public-keys-result =public-keys-result] :: public keys boon
|
|
|
|
==
|
2019-08-07 01:42:37 +03:00
|
|
|
+$ card :: i/o action
|
2019-05-25 11:43:13 +03:00
|
|
|
(wind note gift) ::
|
2016-11-24 07:25:07 +03:00
|
|
|
:: ::
|
2019-06-22 00:45:00 +03:00
|
|
|
+$ move :: output
|
2019-06-21 21:03:53 +03:00
|
|
|
[p=duct q=card] ::
|
2019-05-25 11:43:13 +03:00
|
|
|
:: ::
|
|
|
|
+$ note :: out request $->
|
2019-08-20 00:43:39 +03:00
|
|
|
$~ [%a %plea *ship *plea:ames] ::
|
2019-08-07 01:42:37 +03:00
|
|
|
$% $: %a :: to %ames
|
2020-12-08 05:51:58 +03:00
|
|
|
$>(%plea task:ames) :: send request message
|
2019-05-25 11:43:13 +03:00
|
|
|
== ::
|
2019-12-09 22:41:01 +03:00
|
|
|
$: %b :: to %behn
|
2020-12-08 05:51:58 +03:00
|
|
|
$>(%wait task:behn) :: set timer
|
2019-12-09 22:41:01 +03:00
|
|
|
== ::
|
2020-07-29 19:14:18 +03:00
|
|
|
$: %e :: to %eyre
|
|
|
|
[%code-changed ~] :: notify code changed
|
|
|
|
== ::
|
2019-12-09 22:41:01 +03:00
|
|
|
$: %g :: to %gall
|
2020-12-08 05:51:58 +03:00
|
|
|
$>(%deal task:gall) :: talk to app
|
2019-07-04 03:08:23 +03:00
|
|
|
== ::
|
2019-05-25 11:43:13 +03:00
|
|
|
$: %j :: to self
|
2019-08-07 01:42:37 +03:00
|
|
|
$>(%listen task) :: set ethereum source
|
2019-05-25 11:43:13 +03:00
|
|
|
== ::
|
|
|
|
$: @tas ::
|
2019-05-27 10:41:03 +03:00
|
|
|
$% $>(%init vane-task) :: report install
|
2019-05-25 11:43:13 +03:00
|
|
|
== == == ::
|
|
|
|
:: ::
|
|
|
|
+$ sign :: in result $<-
|
2020-12-08 03:22:26 +03:00
|
|
|
$~ [%behn %wake ~] ::
|
|
|
|
$% $: %ames ::
|
2020-12-08 05:51:58 +03:00
|
|
|
$% $>(%boon gift:ames) :: message response
|
|
|
|
$>(%done gift:ames) :: message (n)ack
|
|
|
|
$>(%lost gift:ames) :: lost boon
|
2019-12-09 22:41:01 +03:00
|
|
|
== == ::
|
2020-12-08 03:22:26 +03:00
|
|
|
$: %behn ::
|
2020-12-08 05:51:58 +03:00
|
|
|
$>(%wake gift:behn) ::
|
2019-12-09 22:41:01 +03:00
|
|
|
== ::
|
2020-12-08 03:22:26 +03:00
|
|
|
$: %gall ::
|
2021-09-25 06:14:55 +03:00
|
|
|
$>(%unto gift:gall) ::
|
|
|
|
== ::
|
2019-05-25 11:43:13 +03:00
|
|
|
== ::
|
2016-11-24 07:25:07 +03:00
|
|
|
-- ::
|
|
|
|
:: ::::
|
|
|
|
:::: # light :: light cores
|
|
|
|
:: ::::
|
|
|
|
=> |%
|
2018-05-29 00:04:33 +03:00
|
|
|
:: :: ++ez
|
|
|
|
:::: ## ethereum^light :: wallet algebra
|
|
|
|
:: ::::
|
|
|
|
++ ez
|
|
|
|
:: simple ethereum-related utility arms.
|
|
|
|
::
|
|
|
|
|%
|
2018-05-30 01:40:00 +03:00
|
|
|
::
|
|
|
|
:: +order-events: sort changes by block and log numbers
|
|
|
|
::
|
2018-05-29 00:04:33 +03:00
|
|
|
++ order-events
|
2018-12-14 00:23:17 +03:00
|
|
|
|= loz=(list (pair event-id diff-azimuth))
|
2018-05-29 00:04:33 +03:00
|
|
|
^+ loz
|
|
|
|
%+ sort loz
|
|
|
|
:: sort by block number, then by event log number,
|
|
|
|
::TODO then by diff priority.
|
|
|
|
|= [[[b1=@ud l1=@ud] *] [[b2=@ud l2=@ud] *]]
|
|
|
|
?. =(b1 b2) (lth b1 b2)
|
|
|
|
?. =(l1 l2) (lth l1 l2)
|
|
|
|
&
|
|
|
|
--
|
2016-11-24 07:25:07 +03:00
|
|
|
--
|
|
|
|
:: ::::
|
|
|
|
:::: # heavy :: heavy engines
|
|
|
|
:: ::::
|
2020-03-04 01:12:01 +03:00
|
|
|
=>
|
2020-12-05 07:32:17 +03:00
|
|
|
~% %jael ..part ~
|
2020-03-04 01:12:01 +03:00
|
|
|
|%
|
2016-11-24 07:25:07 +03:00
|
|
|
:: :: ++of
|
|
|
|
:::: ## main^heavy :: main engine
|
|
|
|
:: ::::
|
|
|
|
++ of
|
|
|
|
:: this core handles all top-level %jael semantics,
|
|
|
|
:: changing state and recording moves.
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
:: logically we could nest the ++su core within it, but
|
|
|
|
:: we keep them separated for clarity. the ++curd and
|
|
|
|
:: ++cure arms complete relative and absolute effects,
|
|
|
|
:: respectively, at the top level.
|
|
|
|
::
|
|
|
|
:: XX doc
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
:: a general pattern here is that we use the ++et core
|
2016-12-16 09:34:01 +03:00
|
|
|
:: to generate absolute effects (++change), then invoke
|
2016-11-24 07:25:07 +03:00
|
|
|
:: ++su to calculate the derived effect of these changes.
|
|
|
|
::
|
2018-05-30 01:40:00 +03:00
|
|
|
:: for ethereum-related events, this is preceded by
|
|
|
|
:: invocation of ++et, which produces ethereum-level
|
|
|
|
:: changes (++chain). these get turned into absolute
|
|
|
|
:: effects by ++cute.
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
:: arvo issues: should be merged with the top-level
|
|
|
|
:: vane interface when that gets cleaned up a bit.
|
|
|
|
::
|
2020-11-25 23:22:55 +03:00
|
|
|
=| moz=(list move)
|
2020-12-06 11:38:37 +03:00
|
|
|
=| $: $: :: now: current time
|
2016-11-24 07:25:07 +03:00
|
|
|
:: eny: unique entropy
|
|
|
|
::
|
2018-12-06 00:41:21 +03:00
|
|
|
now=@da
|
|
|
|
eny=@uvJ
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
:: all vane state
|
|
|
|
::
|
2021-11-10 03:41:23 +03:00
|
|
|
state-2
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
:: lex: all durable state
|
|
|
|
:: moz: pending actions
|
|
|
|
::
|
|
|
|
=* lex ->
|
|
|
|
|%
|
|
|
|
:: :: ++abet:of
|
|
|
|
++ abet :: resolve
|
|
|
|
[(flop moz) lex]
|
2018-10-12 19:48:52 +03:00
|
|
|
:: :: ++sein:of
|
2019-08-07 01:42:37 +03:00
|
|
|
++ emit
|
|
|
|
|= =move
|
|
|
|
+>.$(moz [move moz])
|
|
|
|
::
|
|
|
|
++ poke-watch
|
|
|
|
|= [hen=duct app=term =purl:eyre]
|
|
|
|
%- emit
|
|
|
|
:* hen
|
|
|
|
%pass
|
|
|
|
/[app]/poke
|
2019-11-19 07:36:21 +03:00
|
|
|
%g
|
2019-08-07 01:42:37 +03:00
|
|
|
%deal
|
2023-05-22 16:12:09 +03:00
|
|
|
[our our /jael]
|
2019-08-07 01:42:37 +03:00
|
|
|
app
|
|
|
|
%poke
|
2021-04-28 08:58:19 +03:00
|
|
|
%azimuth-poke
|
2021-11-09 09:56:57 +03:00
|
|
|
!>([%watch (crip (en-purl:html purl)) %default])
|
2019-08-07 01:42:37 +03:00
|
|
|
==
|
|
|
|
::
|
2018-10-12 19:48:52 +03:00
|
|
|
++ sein :: sponsor
|
|
|
|
|= who=ship
|
|
|
|
^- ship
|
|
|
|
:: XX save %dawn sponsor in .own.sub, check there
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=/ pot (~(get by pos.zim.pki) who)
|
2018-12-14 00:23:17 +03:00
|
|
|
?: ?& ?=(^ pot)
|
2019-08-07 01:42:37 +03:00
|
|
|
?=(^ sponsor.u.pot)
|
2018-10-12 19:48:52 +03:00
|
|
|
==
|
2019-08-07 01:42:37 +03:00
|
|
|
u.sponsor.u.pot
|
2018-10-15 09:23:34 +03:00
|
|
|
(^sein:title who)
|
2018-10-12 19:48:52 +03:00
|
|
|
:: :: ++saxo:of
|
|
|
|
++ saxo :: sponsorship chain
|
2020-11-25 23:22:55 +03:00
|
|
|
|= who=ship
|
2018-10-12 19:48:52 +03:00
|
|
|
^- (list ship)
|
|
|
|
=/ dad (sein who)
|
|
|
|
[who ?:(=(who dad) ~ $(who dad))]
|
2016-11-24 07:25:07 +03:00
|
|
|
:: :: ++call:of
|
|
|
|
++ call :: invoke
|
|
|
|
|= $: :: hen: event cause
|
|
|
|
:: tac: event data
|
|
|
|
::
|
2020-11-25 23:22:55 +03:00
|
|
|
hen=duct
|
|
|
|
tac=task
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
^+ +>
|
|
|
|
?- -.tac
|
|
|
|
::
|
2018-09-07 04:41:16 +03:00
|
|
|
:: boot from keys
|
2020-11-25 22:39:13 +03:00
|
|
|
:: $: %dawn
|
2018-10-29 22:38:14 +03:00
|
|
|
:: =seed
|
2018-12-21 17:59:12 +03:00
|
|
|
:: spon=ship
|
2019-08-07 01:42:37 +03:00
|
|
|
:: czar=(map ship [=rift =life =pass])
|
2020-11-26 17:09:31 +03:00
|
|
|
:: turf=(list turf)
|
2018-10-29 22:38:14 +03:00
|
|
|
:: bloq=@ud
|
|
|
|
:: node=purl
|
|
|
|
:: ==
|
2018-09-07 04:41:16 +03:00
|
|
|
::
|
|
|
|
%dawn
|
2018-12-12 11:34:05 +03:00
|
|
|
:: single-homed
|
2018-10-15 22:51:53 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
~| [our who.seed.tac]
|
2018-12-12 11:34:05 +03:00
|
|
|
?> =(our who.seed.tac)
|
2018-10-16 03:39:55 +03:00
|
|
|
:: save our parent signature (only for moons)
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=. sig.own.pki sig.seed.tac
|
2019-08-07 23:54:47 +03:00
|
|
|
:: load our initial public key
|
2018-10-16 03:39:55 +03:00
|
|
|
::
|
2019-12-07 07:44:36 +03:00
|
|
|
=/ spon-ship=(unit ship)
|
|
|
|
=/ flopped-spon (flop spon.tac)
|
|
|
|
?~(flopped-spon ~ `ship.i.flopped-spon)
|
2019-08-07 01:42:37 +03:00
|
|
|
=. pos.zim.pki
|
2018-10-16 03:39:55 +03:00
|
|
|
=/ cub (nol:nu:crub:crypto key.seed.tac)
|
2019-08-07 01:42:37 +03:00
|
|
|
%+ ~(put by pos.zim.pki)
|
2018-10-16 03:39:55 +03:00
|
|
|
our
|
2019-12-07 07:44:36 +03:00
|
|
|
[0 lyf.seed.tac (my [lyf.seed.tac [1 pub:ex:cub]] ~) spon-ship]
|
2019-08-07 01:42:37 +03:00
|
|
|
:: our initial private key
|
2018-09-07 04:41:16 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=. lyf.own.pki lyf.seed.tac
|
|
|
|
=. jaw.own.pki (my [lyf.seed.tac key.seed.tac] ~)
|
|
|
|
:: XX save sponsor in .own.pki
|
|
|
|
:: XX reconcile with .dns.eth
|
|
|
|
:: set initial domains
|
|
|
|
::
|
|
|
|
=. tuf.own.pki turf.tac
|
2018-09-07 04:41:16 +03:00
|
|
|
:: our initial galaxy table as a +map from +life to +public
|
|
|
|
::
|
2019-08-21 02:41:50 +03:00
|
|
|
=/ spon-points=(list [ship point])
|
|
|
|
%+ turn spon.tac
|
2020-12-06 03:20:42 +03:00
|
|
|
|= [=ship az-point=point:azimuth-types]
|
2019-08-21 02:41:50 +03:00
|
|
|
~| [%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
|
2019-08-07 01:42:37 +03:00
|
|
|
~
|
2019-08-21 02:41:50 +03:00
|
|
|
`who.sponsor.u.net.az-point
|
2019-08-07 01:42:37 +03:00
|
|
|
==
|
|
|
|
=/ points=(map =ship =point)
|
2018-09-07 04:41:16 +03:00
|
|
|
%- ~(run by czar.tac)
|
2019-08-07 01:42:37 +03:00
|
|
|
|= [=a=rift =a=life =a=pass]
|
|
|
|
^- point
|
|
|
|
[a-rift a-life (malt [a-life 1 a-pass] ~) ~]
|
|
|
|
=. points
|
2019-08-21 02:41:50 +03:00
|
|
|
(~(gas by points) spon-points)
|
2018-09-07 04:41:16 +03:00
|
|
|
=. +>.$
|
|
|
|
%- curd =< abet
|
2020-12-07 11:27:58 +03:00
|
|
|
(public-keys:~(feel su hen now pki etn) pos.zim.pki %full points)
|
2018-10-04 09:43:40 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
:: start subscriptions
|
|
|
|
::
|
2021-11-10 03:41:23 +03:00
|
|
|
=. +>.$
|
|
|
|
%^ poke-watch hen %azimuth
|
|
|
|
%+ fall node.tac
|
|
|
|
(need (de-purl:html 'http://eth-mainnet.urbit.org:8545'))
|
2018-10-04 09:43:40 +03:00
|
|
|
::
|
2018-09-07 04:41:16 +03:00
|
|
|
=. moz
|
|
|
|
%+ weld moz
|
|
|
|
:: order is crucial!
|
|
|
|
::
|
2019-11-19 07:36:21 +03:00
|
|
|
:: %dill must init after %gall
|
2018-10-18 08:27:24 +03:00
|
|
|
:: the %give init (for unix) must be after %dill init
|
|
|
|
:: %jael init must be deferred (makes http requests)
|
2018-09-07 04:41:16 +03:00
|
|
|
::
|
|
|
|
^- (list move)
|
2020-12-06 12:21:57 +03:00
|
|
|
:~ [hen %slip %e %init ~]
|
|
|
|
[hen %slip %d %init ~]
|
|
|
|
[hen %slip %g %init ~]
|
|
|
|
[hen %slip %c %init ~]
|
|
|
|
[hen %slip %a %init ~]
|
2018-09-07 04:41:16 +03:00
|
|
|
==
|
|
|
|
+>.$
|
|
|
|
::
|
2018-09-15 08:38:22 +03:00
|
|
|
:: boot fake
|
2018-12-12 11:50:40 +03:00
|
|
|
:: [%fake =ship]
|
2018-09-15 08:38:22 +03:00
|
|
|
::
|
|
|
|
%fake
|
2018-12-12 11:34:05 +03:00
|
|
|
:: single-homed
|
2018-10-15 22:51:53 +03:00
|
|
|
::
|
2018-12-12 11:50:40 +03:00
|
|
|
?> =(our ship.tac)
|
2018-10-16 03:39:55 +03:00
|
|
|
:: fake keys are deterministically derived from the ship
|
|
|
|
::
|
|
|
|
=/ cub (pit:nu:crub:crypto 512 our)
|
|
|
|
:: our initial public key
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=. pos.zim.pki
|
|
|
|
%+ ~(put by pos.zim.pki)
|
|
|
|
our
|
2023-05-02 18:36:22 +03:00
|
|
|
[rift=0 life=1 (my [`@ud`1 [`life`1 pub:ex:cub]] ~) `(^sein:title our)]
|
2019-08-07 01:42:37 +03:00
|
|
|
:: our private key
|
2018-09-15 08:38:22 +03:00
|
|
|
::
|
|
|
|
:: Private key updates are disallowed for fake ships,
|
|
|
|
:: so we do this first.
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=. lyf.own.pki 1
|
|
|
|
=. jaw.own.pki (my [1 sec:ex:cub] ~)
|
2018-09-15 08:38:22 +03:00
|
|
|
:: set the fake bit
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=. fak.own.pki &
|
2018-09-15 08:38:22 +03:00
|
|
|
:: initialize other vanes per the usual procedure
|
|
|
|
::
|
|
|
|
:: Except for ourselves!
|
|
|
|
::
|
|
|
|
=. moz
|
|
|
|
%+ weld moz
|
|
|
|
^- (list move)
|
2020-12-06 12:21:57 +03:00
|
|
|
:~ [hen %slip %e %init ~]
|
|
|
|
[hen %slip %d %init ~]
|
|
|
|
[hen %slip %g %init ~]
|
|
|
|
[hen %slip %c %init ~]
|
|
|
|
[hen %slip %a %init ~]
|
2018-09-15 08:38:22 +03:00
|
|
|
==
|
|
|
|
+>.$
|
|
|
|
::
|
2018-05-16 00:16:29 +03:00
|
|
|
:: set ethereum source
|
2019-08-07 01:42:37 +03:00
|
|
|
:: [%listen whos=(set ship) =source]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
%listen
|
azimuth: fetch snapshot on boot
Previously, the initial Azimuth snapshot was stored in Clay and shipped
in the pill. This causes several problems:
- It bloats the pill
- Updating the snapshot added large blobs to Clay's state. Even now
that tombstoning is possible, you don't want to have to do that
regularly.
- As a result, the snapshot was never updated.
- Even if you did tombstone those files, it could only be updated as
often as the pill
- And those updates would be sent over the network to people who didn't
need them
This moves the snapshot out of the pill and refactors Azimuth's
initialization process. On boot, when app/azimuth starts up, it first
downloads a snapshot from bootstrap.urbit.org and uses that to
initialize its state. As before, updates after this initial snapshot
come from an Ethereum node directly and are verified locally.
Relevant commands are:
- `-azimuth-snap-state %filename` creates a snapshot file
- `-azimuth-load "url"` downloads and inits from a snapshot, with url
defaulting to https://bootstrap.urbit.org/mainnet.azimuth-snapshot
- `:azimuth &azimuth-poke-data %load snap-state` takes a snap-state any
way you have it
Note the snapshot is downloaded from the same place as the pill, so this
doesn't introduce additional trust beyond what was already required.
When remote scry is released, we should consider allowing downloading
the snapshot in that way.
2022-07-01 08:55:57 +03:00
|
|
|
:: %- (slog leaf+"jael: listen {<whos.tac>} {<source.tac>}" ~)
|
2019-08-07 01:42:37 +03:00
|
|
|
%- curd =< abet
|
2020-12-06 11:38:37 +03:00
|
|
|
(sources:~(feel su hen now pki etn) [whos source]:tac)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
|
|
|
:: cancel all trackers from duct
|
2020-11-26 17:09:31 +03:00
|
|
|
:: [%nuke whos=(set ship)]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%nuke
|
2019-08-07 01:42:37 +03:00
|
|
|
=/ ships=(list ship)
|
|
|
|
%~ tap in
|
|
|
|
%- ~(int in whos.tac)
|
|
|
|
(~(get ju yen.zim.pki) hen)
|
|
|
|
=. ney.zim.pki
|
|
|
|
|- ^- (jug ship duct)
|
|
|
|
?~ ships
|
|
|
|
ney.zim.pki
|
|
|
|
(~(del ju $(ships t.ships)) i.ships hen)
|
|
|
|
=. yen.zim.pki
|
|
|
|
|- ^- (jug duct ship)
|
|
|
|
?~ ships
|
|
|
|
yen.zim.pki
|
|
|
|
(~(del ju $(ships t.ships)) hen i.ships)
|
2019-08-20 20:22:52 +03:00
|
|
|
=? nel.zim.pki ?=(~ whos.tac)
|
|
|
|
(~(del in nel.zim.pki) hen)
|
2019-08-07 01:42:37 +03:00
|
|
|
?^ whos.tac
|
|
|
|
+>.$
|
|
|
|
%_ +>.$
|
|
|
|
yen.own.pki (~(del in yen.own.pki) hen)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-08-08 01:15:25 +03:00
|
|
|
:: update private keys
|
|
|
|
::
|
|
|
|
%rekey
|
|
|
|
%- curd =< abet
|
2020-12-06 11:38:37 +03:00
|
|
|
(private-keys:~(feel su hen now pki etn) life.tac ring.tac)
|
2019-08-08 01:15:25 +03:00
|
|
|
::
|
2022-01-08 11:48:28 +03:00
|
|
|
:: resend private key to subscribers
|
|
|
|
::
|
|
|
|
%resend
|
|
|
|
%- curd =< abet
|
|
|
|
%- ~(exec su hen now pki etn)
|
|
|
|
[yen.own.pki [%give %private-keys [lyf jaw]:own.pki]]
|
|
|
|
::
|
2021-06-04 00:38:36 +03:00
|
|
|
:: register moon keys
|
2019-08-08 03:36:25 +03:00
|
|
|
::
|
|
|
|
%moon
|
|
|
|
?. =(%earl (clan:title ship.tac))
|
|
|
|
~& [%not-moon ship.tac]
|
|
|
|
+>.$
|
|
|
|
?. =(our (^sein:title ship.tac))
|
|
|
|
~& [%not-our-moon ship.tac]
|
|
|
|
+>.$
|
|
|
|
%- curd =< abet
|
2020-12-07 11:27:58 +03:00
|
|
|
(~(new-event su hen now pki etn) [ship udiff]~:tac)
|
2019-08-08 03:36:25 +03:00
|
|
|
::
|
2020-07-29 19:14:18 +03:00
|
|
|
:: rotate web login code
|
|
|
|
::
|
|
|
|
%step
|
|
|
|
%= +>.$
|
|
|
|
step.own.pki +(step.own.pki)
|
|
|
|
moz [[hen %pass / %e %code-changed ~] moz]
|
|
|
|
==
|
|
|
|
::
|
2018-06-01 01:31:45 +03:00
|
|
|
:: watch public keys
|
2019-08-07 01:42:37 +03:00
|
|
|
:: [%public-keys ships=(set ship)]
|
2018-06-01 01:31:45 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
%public-keys
|
2018-06-01 01:31:45 +03:00
|
|
|
%- curd =< abet
|
2020-12-06 11:38:37 +03:00
|
|
|
(~(public-keys ~(feed su hen now pki etn) hen) ships.tac)
|
2018-06-01 01:31:45 +03:00
|
|
|
::
|
2018-08-30 03:05:34 +03:00
|
|
|
:: seen after breach
|
|
|
|
:: [%meet our=ship who=ship]
|
|
|
|
::
|
|
|
|
%meet
|
2019-08-07 01:42:37 +03:00
|
|
|
+>.$
|
2018-08-30 03:05:34 +03:00
|
|
|
::
|
2018-10-04 09:43:40 +03:00
|
|
|
:: XX should be a subscription
|
|
|
|
:: XX reconcile with .dns.eth
|
|
|
|
:: request domains
|
|
|
|
:: [%turf ~]
|
|
|
|
::
|
|
|
|
%turf
|
2018-10-17 19:42:53 +03:00
|
|
|
:: ships with real keys must have domains,
|
|
|
|
:: those with fake keys must not
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
~| [fak.own.pki tuf.own.pki]
|
|
|
|
?< =(fak.own.pki ?=(^ tuf.own.pki))
|
|
|
|
+>.$(moz [[hen %give %turf tuf.own.pki] moz])
|
2018-10-04 09:43:40 +03:00
|
|
|
::
|
2019-02-01 10:37:00 +03:00
|
|
|
:: learn of kernel upgrade
|
|
|
|
:: [%vega ~]
|
|
|
|
::
|
|
|
|
%vega
|
2022-10-03 17:27:52 +03:00
|
|
|
+>.$
|
|
|
|
::
|
2019-09-27 23:00:37 +03:00
|
|
|
:: in response to memory pressure
|
|
|
|
:: [%trim p=@ud]
|
|
|
|
::
|
|
|
|
%trim
|
2019-02-01 10:37:00 +03:00
|
|
|
+>.$
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
:: watch private keys
|
2020-11-26 17:09:31 +03:00
|
|
|
:: [%private-keys ~]
|
2018-05-17 22:48:17 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
%private-keys
|
2020-12-06 11:38:37 +03:00
|
|
|
(curd abet:~(private-keys ~(feed su hen now pki etn) hen))
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
|
|
|
:: authenticated remote request
|
2020-11-26 17:09:31 +03:00
|
|
|
:: [%west p=ship q=path r=*]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-07-29 14:05:52 +03:00
|
|
|
%plea
|
|
|
|
=* her ship.tac
|
2020-12-01 07:33:42 +03:00
|
|
|
=+ ;;(=message-all payload.plea.tac)
|
|
|
|
?> ?=(%0 -.message-all)
|
|
|
|
=/ =message +.message-all
|
|
|
|
?- -.message
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2018-05-17 22:48:17 +03:00
|
|
|
:: cancel trackers
|
2019-08-07 01:42:37 +03:00
|
|
|
:: [%nuke whos=(set ship)]
|
2018-05-17 22:48:17 +03:00
|
|
|
::
|
|
|
|
%nuke
|
2019-08-20 00:43:39 +03:00
|
|
|
=. moz [[hen %give %done ~] moz]
|
2020-12-01 07:33:42 +03:00
|
|
|
$(tac message)
|
2018-05-17 22:48:17 +03:00
|
|
|
::
|
2018-06-01 01:34:21 +03:00
|
|
|
:: view ethereum events
|
2019-08-07 01:42:37 +03:00
|
|
|
:: [%public-keys whos=(set ship)]
|
2018-05-16 00:16:29 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
%public-keys
|
2019-08-20 00:43:39 +03:00
|
|
|
=. moz [[hen %give %done ~] moz]
|
2020-12-01 07:33:42 +03:00
|
|
|
$(tac message)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2021-10-01 00:54:33 +03:00
|
|
|
::
|
|
|
|
:: pretend ships breached
|
|
|
|
:: [%ruin ships=(set ship)]
|
|
|
|
::
|
|
|
|
%ruin
|
|
|
|
::NOTE we blast this out to _all_ known ducts, because the common
|
|
|
|
:: use case for this is comets, about who nobody cares.
|
2022-12-14 01:52:10 +03:00
|
|
|
=/ dus (~(uni in nel.zim.pki) ~(key by yen.zim.pki))
|
2021-10-01 00:54:33 +03:00
|
|
|
=/ sus ~(. su hen now pki etn)
|
|
|
|
=/ sis ~(tap in ships.tac)
|
|
|
|
|-
|
|
|
|
?~ sis (curd abet:sus)
|
|
|
|
=. sus (exec:sus dus %give %public-keys %breach i.sis)
|
|
|
|
$(sis t.sis)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2018-05-29 00:04:33 +03:00
|
|
|
::
|
|
|
|
++ take
|
|
|
|
|= [tea=wire hen=duct hin=sign]
|
|
|
|
^+ +>
|
|
|
|
?- hin
|
2020-12-08 03:22:26 +03:00
|
|
|
[%ames %done *]
|
2019-12-07 07:44:36 +03:00
|
|
|
?~ error.hin +>.$
|
2019-07-29 14:05:52 +03:00
|
|
|
~& [%done-bad tag.u.error.hin]
|
|
|
|
%- (slog tang.u.error.hin)
|
2018-05-29 00:04:33 +03:00
|
|
|
::TODO fail:et
|
|
|
|
+>.$
|
2019-08-20 02:40:57 +03:00
|
|
|
::
|
2020-12-08 03:22:26 +03:00
|
|
|
[%ames %boon *]
|
2019-08-20 02:40:57 +03:00
|
|
|
=+ ;; [%public-keys-result =public-keys-result] payload.hin
|
|
|
|
%- curd =< abet
|
2020-12-07 11:27:58 +03:00
|
|
|
(public-keys:~(feel su hen now pki etn) pos.zim.pki public-keys-result)
|
2019-08-28 06:12:56 +03:00
|
|
|
::
|
2020-12-08 03:22:26 +03:00
|
|
|
[%ames %lost *]
|
2019-08-28 06:12:56 +03:00
|
|
|
:: TODO: better error handling
|
|
|
|
::
|
|
|
|
~| %jael-ames-lost
|
|
|
|
!!
|
2019-12-09 22:41:01 +03:00
|
|
|
::
|
2020-12-08 03:22:26 +03:00
|
|
|
[%behn %wake *]
|
2019-12-09 22:41:01 +03:00
|
|
|
?^ error.hin
|
|
|
|
%- %+ slog
|
2021-11-06 03:08:10 +03:00
|
|
|
leaf+"jael unable to resubscribe, run :azimuth|listen"
|
2019-12-09 22:41:01 +03:00
|
|
|
u.error.hin
|
|
|
|
+>.$
|
|
|
|
?> ?=([%breach @ ~] tea)
|
|
|
|
=/ =source-id (slav %ud i.t.tea)
|
|
|
|
=/ =source (~(got by sources.etn) source-id)
|
|
|
|
=/ ships (~(get ju ship-sources-reverse.etn) source-id)
|
|
|
|
%- curd =< abet
|
2020-12-06 11:38:37 +03:00
|
|
|
(sources:~(feel su hen now pki etn) ships source)
|
2018-05-29 00:04:33 +03:00
|
|
|
::
|
2020-12-08 03:22:26 +03:00
|
|
|
[%gall %unto *]
|
2021-06-19 05:13:55 +03:00
|
|
|
?- +>-.hin
|
|
|
|
%raw-fact !!
|
2021-11-06 03:08:10 +03:00
|
|
|
::
|
|
|
|
%kick
|
|
|
|
?> ?=([@ *] tea)
|
|
|
|
=* app i.tea
|
|
|
|
::NOTE we expect azimuth-tracker to be kill
|
|
|
|
?: =(%azimuth-tracker app) +>.$
|
|
|
|
~|([%jael-unexpected-quit tea hin] !!)
|
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%poke-ack
|
2019-08-07 01:42:37 +03:00
|
|
|
?~ p.p.+>.hin
|
|
|
|
+>.$
|
|
|
|
%- (slog leaf+"jael-bad-coup" u.p.p.+>.hin)
|
|
|
|
+>.$
|
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%watch-ack
|
2019-08-07 01:42:37 +03:00
|
|
|
?~ p.p.+>.hin
|
|
|
|
+>.$
|
|
|
|
%- (slog u.p.p.+>.hin)
|
|
|
|
~|([%jael-unexpected-reap tea hin] +>.$)
|
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%fact
|
2019-08-07 01:42:37 +03:00
|
|
|
?> ?=([@ *] tea)
|
|
|
|
=* app i.tea
|
2020-12-06 02:17:37 +03:00
|
|
|
=+ ;;(=udiffs:point q.q.cage.p.+>.hin)
|
2019-08-07 01:42:37 +03:00
|
|
|
%- curd =< abet
|
2020-12-07 11:27:58 +03:00
|
|
|
(~(new-event su hen now pki etn) udiffs)
|
2019-08-07 01:42:37 +03:00
|
|
|
==
|
2018-05-29 00:04:33 +03:00
|
|
|
==
|
2016-11-24 07:25:07 +03:00
|
|
|
:: :: ++curd:of
|
|
|
|
++ curd :: relative moves
|
2020-11-25 23:22:55 +03:00
|
|
|
|= $: moz=(list move)
|
2021-11-10 03:41:23 +03:00
|
|
|
pki=state-pki-2
|
2020-11-25 23:22:55 +03:00
|
|
|
etn=state-eth-node
|
2018-10-26 00:37:04 +03:00
|
|
|
==
|
2019-08-07 23:54:47 +03:00
|
|
|
+>(pki pki, etn etn, moz (weld (flop moz) ^moz))
|
2016-11-24 07:25:07 +03:00
|
|
|
--
|
|
|
|
:: :: ++su
|
|
|
|
:::: ## relative^heavy :: subjective engine
|
|
|
|
:: ::::
|
|
|
|
++ su
|
2016-12-16 09:34:01 +03:00
|
|
|
:: the ++su core handles all derived state,
|
2016-11-24 07:25:07 +03:00
|
|
|
:: subscriptions, and actions.
|
|
|
|
::
|
2018-05-24 17:54:35 +03:00
|
|
|
:: ++feed:su registers subscriptions.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
|
|
|
:: ++feel:su checks if a ++change should notify
|
|
|
|
:: any subscribers.
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=| moz=(list move)
|
|
|
|
=| $: hen=duct
|
2019-12-09 22:41:01 +03:00
|
|
|
now=@da
|
2021-11-10 03:41:23 +03:00
|
|
|
state-pki-2
|
2018-05-29 00:04:33 +03:00
|
|
|
state-eth-node
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
:: moz: moves in reverse order
|
2019-08-07 01:42:37 +03:00
|
|
|
:: pki: relative urbit state
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2020-12-06 11:38:37 +03:00
|
|
|
=* pki ->+<
|
|
|
|
=* etn ->+>
|
2016-11-24 07:25:07 +03:00
|
|
|
|%
|
2019-08-07 01:42:37 +03:00
|
|
|
++ this-su .
|
2016-11-24 07:25:07 +03:00
|
|
|
:: :: ++abet:su
|
|
|
|
++ abet :: resolve
|
2019-08-07 23:54:47 +03:00
|
|
|
[(flop moz) pki etn]
|
2016-11-24 07:25:07 +03:00
|
|
|
:: :: ++exec:su
|
2019-08-07 01:42:37 +03:00
|
|
|
++ emit
|
|
|
|
|= =move
|
|
|
|
+>.$(moz [move moz])
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ exec :: mass gift
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [yen=(set duct) cad=card]
|
2017-02-13 22:58:49 +03:00
|
|
|
=/ noy ~(tap in yen)
|
2019-08-07 01:42:37 +03:00
|
|
|
|- ^+ this-su
|
|
|
|
?~ noy this-su
|
2016-11-24 07:25:07 +03:00
|
|
|
$(noy t.noy, moz [[i.noy cad] moz])
|
2018-05-29 21:20:25 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
++ emit-peer
|
|
|
|
|= [app=term =path]
|
|
|
|
%- emit
|
|
|
|
:* hen
|
|
|
|
%pass
|
|
|
|
[app path]
|
2019-11-19 07:36:21 +03:00
|
|
|
%g
|
2019-08-07 01:42:37 +03:00
|
|
|
%deal
|
2023-05-22 16:12:09 +03:00
|
|
|
[our our /jael]
|
2019-08-07 01:42:37 +03:00
|
|
|
app
|
2019-11-07 09:19:32 +03:00
|
|
|
%watch
|
2019-08-07 01:42:37 +03:00
|
|
|
path
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ peer
|
|
|
|
|= [app=term whos=(set ship)]
|
|
|
|
?: =(~ whos)
|
|
|
|
(emit-peer app /)
|
|
|
|
=/ whol=(list ship) ~(tap in whos)
|
|
|
|
|- ^+ this-su
|
|
|
|
?~ whol this-su
|
|
|
|
=. this-su (emit-peer app /(scot %p i.whol))
|
|
|
|
$(whol t.whol)
|
|
|
|
::
|
|
|
|
++ public-keys-give
|
|
|
|
|= [yen=(set duct) =public-keys-result]
|
2020-05-29 01:24:19 +03:00
|
|
|
|^
|
2024-02-22 17:33:18 +03:00
|
|
|
=/ yaz %+ skid ~(tap in yen)
|
|
|
|
|= d=duct
|
|
|
|
&(?=([[%ames @ @ *] *] d) !=(%public-keys i.t.i.d))
|
|
|
|
=/ yez (weld p.yaz (sort q.yaz sorter))
|
2019-08-07 01:42:37 +03:00
|
|
|
|- ^+ this-su
|
|
|
|
?~ yez this-su
|
|
|
|
=* d i.yez
|
|
|
|
=. this-su
|
2020-12-08 15:05:36 +03:00
|
|
|
?. &(?=([[%ames @ @ *] *] d) !=(%public-keys i.t.i.d))
|
2019-08-07 01:42:37 +03:00
|
|
|
%- emit
|
|
|
|
[d %give %public-keys public-keys-result]
|
|
|
|
%- emit
|
2019-08-20 02:54:30 +03:00
|
|
|
[d %give %boon %public-keys-result public-keys-result]
|
2019-07-12 00:41:43 +03:00
|
|
|
$(yez t.yez)
|
2020-05-29 01:24:19 +03:00
|
|
|
::
|
|
|
|
:: We want to notify Ames, then Clay, then Gall. This happens to
|
2024-05-01 18:01:51 +03:00
|
|
|
:: be alphabetical, but this is mostly a coincidence. We also have
|
|
|
|
:: to notify Gall the vane before we notify any Gall agents, so we
|
|
|
|
:: can kiss the coincidence goodbye.
|
2020-05-29 01:24:19 +03:00
|
|
|
::
|
|
|
|
++ sorter
|
|
|
|
|= [a=duct b=duct]
|
|
|
|
?. ?=([[@ *] *] a)
|
|
|
|
|
|
|
|
|
?. ?=([[@ *] *] b)
|
|
|
|
&
|
2024-05-01 18:01:51 +03:00
|
|
|
?: &(?=([[%gall *] *] a) ?=([[%gall *] *] b))
|
|
|
|
?=([%gall %sys *] i.a)
|
2020-12-18 02:14:33 +03:00
|
|
|
(lth (end 3 i.i.a) (end 3 i.i.b))
|
2020-05-29 01:24:19 +03:00
|
|
|
--
|
2018-11-03 03:05:41 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
++ get-source
|
|
|
|
|= who=@p
|
|
|
|
^- source
|
|
|
|
=/ ship-source (~(get by ship-sources.etn) who)
|
|
|
|
?^ ship-source
|
|
|
|
(~(got by sources) u.ship-source)
|
|
|
|
?: =((clan:title who) %earl)
|
|
|
|
[%& (^sein:title who)]
|
|
|
|
(~(got by sources) default-source.etn)
|
|
|
|
::
|
|
|
|
++ get-source-id
|
|
|
|
|= =source
|
|
|
|
^- [source-id _this-su]
|
|
|
|
=/ source-reverse (~(get by sources-reverse) source)
|
|
|
|
?^ source-reverse
|
|
|
|
[u.source-reverse this-su]
|
|
|
|
:- top-source-id.etn
|
|
|
|
%_ this-su
|
|
|
|
top-source-id.etn +(top-source-id.etn)
|
|
|
|
sources.etn (~(put by sources) top-source-id.etn source)
|
|
|
|
sources-reverse.etn (~(put by sources-reverse) source top-source-id.etn)
|
2018-11-03 03:05:41 +03:00
|
|
|
==
|
2019-08-07 01:42:37 +03:00
|
|
|
::
|
|
|
|
++ new-event
|
2020-12-05 10:08:47 +03:00
|
|
|
|= =udiffs:point
|
2019-08-07 01:42:37 +03:00
|
|
|
^+ this-su
|
2020-12-05 10:08:47 +03:00
|
|
|
=/ original-pos pos.zim.pki
|
|
|
|
|- ^+ this-su
|
|
|
|
?~ udiffs
|
2019-08-07 01:42:37 +03:00
|
|
|
this-su
|
2020-12-05 10:08:47 +03:00
|
|
|
=/ a-point=point (~(gut by pos.zim.pki) ship.i.udiffs *point)
|
|
|
|
=/ a-diff=(unit diff:point) (udiff-to-diff:point udiff.i.udiffs a-point)
|
2020-12-06 02:17:37 +03:00
|
|
|
=? this-su ?=(^ a-diff)
|
2022-01-12 13:01:06 +03:00
|
|
|
=? this-su
|
|
|
|
?& =(our ship.i.udiffs)
|
2021-05-26 17:02:39 +03:00
|
|
|
?=(%keys -.u.a-diff)
|
|
|
|
(~(has by jaw.own) life.to.u.a-diff)
|
|
|
|
==
|
2022-01-12 13:01:06 +03:00
|
|
|
:: if this about our keys, and we already know these, start using them
|
|
|
|
::
|
|
|
|
=. lyf.own life.to.u.a-diff
|
|
|
|
:: notify subscribers (ames) to start using our new private keys
|
|
|
|
::
|
|
|
|
(exec yen.own [%give %private-keys [lyf jaw]:own])
|
2022-01-08 21:28:11 +03:00
|
|
|
::
|
2022-01-12 13:01:06 +03:00
|
|
|
(public-keys:feel original-pos %diff ship.i.udiffs u.a-diff)
|
2020-12-05 10:08:47 +03:00
|
|
|
$(udiffs t.udiffs)
|
2019-08-07 01:42:37 +03:00
|
|
|
::
|
2019-08-20 20:22:52 +03:00
|
|
|
++ subscribers-on-ship
|
|
|
|
|= =ship
|
|
|
|
^- (set duct)
|
2022-11-23 01:11:39 +03:00
|
|
|
:: union of general and ship-specific subs
|
|
|
|
::
|
|
|
|
%- ~(uni in nel.zim)
|
|
|
|
(~(get ju ney.zim) ship)
|
2019-08-20 20:22:52 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
++ feed
|
2016-11-24 07:25:07 +03:00
|
|
|
|_ :: hen: subscription source
|
|
|
|
::
|
2020-11-25 23:22:55 +03:00
|
|
|
hen=duct
|
2018-06-01 01:31:45 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
:: Handle subscription to public-keys
|
|
|
|
::
|
|
|
|
++ public-keys
|
|
|
|
|= whos=(set ship)
|
|
|
|
?: fak.own.pki
|
|
|
|
(public-keys:fake whos)
|
|
|
|
:: Subscribe to parent of moons
|
|
|
|
::
|
|
|
|
=. ..feed
|
|
|
|
=/ moons=(jug ship ship)
|
|
|
|
%- ~(gas ju *(jug spon=ship who=ship))
|
|
|
|
%+ murn ~(tap in whos)
|
|
|
|
|= who=ship
|
|
|
|
^- (unit [spon=ship child=ship])
|
|
|
|
?. =(%earl (clan:title who))
|
|
|
|
~
|
|
|
|
?: (~(has by ship-sources) who)
|
|
|
|
~
|
|
|
|
`[(^sein:title who) who]
|
|
|
|
=/ moonl=(list [spon=ship ships=(set ship)])
|
|
|
|
~(tap by moons)
|
|
|
|
|- ^+ ..feed
|
|
|
|
?~ moonl
|
|
|
|
..feed
|
2019-08-08 03:36:25 +03:00
|
|
|
?: =(our spon.i.moonl)
|
2019-08-07 01:42:37 +03:00
|
|
|
$(moonl t.moonl)
|
2019-08-08 03:36:25 +03:00
|
|
|
=. ..feed (sources:feel ships.i.moonl [%& spon.i.moonl])
|
|
|
|
$(moonl t.moonl)
|
2019-08-07 01:42:37 +03:00
|
|
|
:: Add to subscriber list
|
|
|
|
::
|
|
|
|
=. ney.zim
|
|
|
|
=/ whol=(list ship) ~(tap in whos)
|
|
|
|
|- ^- (jug ship duct)
|
|
|
|
?~ whol
|
|
|
|
ney.zim
|
|
|
|
(~(put ju $(whol t.whol)) i.whol hen)
|
|
|
|
=. yen.zim
|
|
|
|
%- ~(gas ju yen.zim)
|
|
|
|
%+ turn ~(tap in whos)
|
|
|
|
|= who=ship
|
|
|
|
[hen who]
|
2019-08-20 20:22:52 +03:00
|
|
|
=? nel.zim ?=(~ whos)
|
|
|
|
(~(put in nel.zim) hen)
|
2019-08-07 01:42:37 +03:00
|
|
|
:: Give initial result
|
|
|
|
::
|
|
|
|
=/ =public-keys-result
|
|
|
|
:- %full
|
|
|
|
?: =(~ whos)
|
|
|
|
pos.zim
|
|
|
|
%- my ^- (list (pair ship point))
|
|
|
|
%+ murn
|
|
|
|
~(tap in whos)
|
|
|
|
|= who=ship
|
|
|
|
^- (unit (pair ship point))
|
|
|
|
=/ pub (~(get by pos.zim) who)
|
|
|
|
?~ pub ~
|
|
|
|
?: =(0 life.u.pub) ~
|
|
|
|
`[who u.pub]
|
|
|
|
=. ..feed (public-keys-give (sy hen ~) public-keys-result)
|
|
|
|
..feed
|
|
|
|
::
|
|
|
|
:: Handle subscription to private-keys
|
|
|
|
::
|
|
|
|
++ private-keys
|
2016-11-24 07:25:07 +03:00
|
|
|
%_ ..feed
|
2019-08-07 01:42:37 +03:00
|
|
|
moz [[hen %give %private-keys [lyf jaw]:own] moz]
|
2016-11-24 07:25:07 +03:00
|
|
|
yen.own (~(put in yen.own) hen)
|
|
|
|
==
|
2018-05-29 00:04:33 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
++ fake
|
|
|
|
?> fak.own.pki
|
2018-09-15 08:38:22 +03:00
|
|
|
|%
|
2019-08-07 01:42:37 +03:00
|
|
|
++ public-keys
|
|
|
|
|= whos=(set ship)
|
|
|
|
=/ whol=(list ship) ~(tap in whos)
|
|
|
|
=/ passes
|
|
|
|
|- ^- (list [who=ship =pass])
|
|
|
|
?~ whol
|
|
|
|
~
|
|
|
|
=/ cub (pit:nu:crub:crypto 512 i.whol)
|
|
|
|
:- [i.whol pub:ex:cub]
|
|
|
|
$(whol t.whol)
|
|
|
|
=/ points=(list (pair ship point))
|
|
|
|
%+ turn passes
|
|
|
|
|= [who=ship =pass]
|
|
|
|
^- [who=ship =point]
|
2023-05-02 18:36:22 +03:00
|
|
|
[who [rift=0 life=1 (my [1 1 pass] ~) `(^sein:title who)]]
|
2019-08-07 01:42:37 +03:00
|
|
|
=. moz [[hen %give %public-keys %full (my points)] moz]
|
2018-10-15 22:51:53 +03:00
|
|
|
..feel
|
2019-08-07 01:42:37 +03:00
|
|
|
--
|
2016-11-24 07:25:07 +03:00
|
|
|
--
|
2019-08-07 01:42:37 +03:00
|
|
|
::
|
|
|
|
++ feel
|
2016-11-24 07:25:07 +03:00
|
|
|
|%
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
:: Update public-keys
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
++ public-keys
|
2020-12-05 10:08:47 +03:00
|
|
|
|= [original=(map ship point) =public-keys-result]
|
2019-08-07 01:42:37 +03:00
|
|
|
^+ ..feel
|
|
|
|
?: ?=(%full -.public-keys-result)
|
|
|
|
=/ pointl=(list [who=ship =point])
|
|
|
|
~(tap by points.public-keys-result)
|
|
|
|
|- ^+ ..feel
|
|
|
|
?~ pointl
|
2019-11-06 23:50:03 +03:00
|
|
|
..feel(pos.zim (~(uni by pos.zim) points.public-keys-result))
|
2020-12-06 02:17:37 +03:00
|
|
|
:: if changing rift upward and we already had keys for them,
|
|
|
|
:: then signal a breach
|
jael: provide edge-triggered breach notification
Until now, clients of Jael have had to store the first-seen rift if they
want to reliably detect breaches. Otherwise, they would get a false
positive if they heard an old message about a breach (eg if you kick
azimuth-tracker). Clay and Gall did this correctly, but Ames did not.
Jael already maintains this state, so I added a notification to the
existing subscription that happens whenever it notices a breach (a diff
or full where the new rift is greater than the old one).
Because this is an issue on the live network, I wrote state adapters
for Gall and Clay. The Gall one just removes the rift from our state,
but the Clay one is much more involved because we have to upgrade
instances of the clad monad that are possibly in progress.
Specifically, since more input is possible than before, we must wrap any
in-progress instances of the monad in a function that handles the
potential new input from Jael. This temporarily preservers a copy of
the old kernel, but only until the current commit/merge/update has
completed.
The real solution for Clay is to factor out those IO-heavy instances to
userspace tapp/async/imp/threads, and if an upgrade happens in the
middle, you should simply restart them.
Fixes #1852
2019-10-24 07:26:38 +03:00
|
|
|
::
|
|
|
|
=? ..feel
|
|
|
|
=/ point
|
|
|
|
(~(get by pos.zim) who.i.pointl)
|
2020-12-05 10:08:47 +03:00
|
|
|
?& (~(has by original) who.i.pointl)
|
|
|
|
?=(^ point)
|
jael: provide edge-triggered breach notification
Until now, clients of Jael have had to store the first-seen rift if they
want to reliably detect breaches. Otherwise, they would get a false
positive if they heard an old message about a breach (eg if you kick
azimuth-tracker). Clay and Gall did this correctly, but Ames did not.
Jael already maintains this state, so I added a notification to the
existing subscription that happens whenever it notices a breach (a diff
or full where the new rift is greater than the old one).
Because this is an issue on the live network, I wrote state adapters
for Gall and Clay. The Gall one just removes the rift from our state,
but the Clay one is much more involved because we have to upgrade
instances of the clad monad that are possibly in progress.
Specifically, since more input is possible than before, we must wrap any
in-progress instances of the monad in a function that handles the
potential new input from Jael. This temporarily preservers a copy of
the old kernel, but only until the current commit/merge/update has
completed.
The real solution for Clay is to factor out those IO-heavy instances to
userspace tapp/async/imp/threads, and if an upgrade happens in the
middle, you should simply restart them.
Fixes #1852
2019-10-24 07:26:38 +03:00
|
|
|
(gth rift.point.i.pointl rift.u.point)
|
|
|
|
==
|
2019-12-09 22:41:01 +03:00
|
|
|
=. ..feel
|
|
|
|
%+ public-keys-give
|
|
|
|
(subscribers-on-ship who.i.pointl)
|
|
|
|
[%breach who.i.pointl]
|
|
|
|
=/ sor (~(get by sources-reverse) %& who.i.pointl)
|
|
|
|
?~ sor
|
|
|
|
..feel
|
|
|
|
:: delay resubscribing because Ames is going to clear any
|
|
|
|
:: messages we send now.
|
|
|
|
::
|
|
|
|
(emit hen %pass /breach/(scot %ud u.sor) %b %wait now)
|
|
|
|
::
|
2019-11-15 01:46:14 +03:00
|
|
|
=. ..feel
|
|
|
|
%+ public-keys-give
|
|
|
|
(subscribers-on-ship who.i.pointl)
|
|
|
|
[%full (my i.pointl ~)]
|
|
|
|
$(pointl t.pointl)
|
|
|
|
::
|
jael: provide edge-triggered breach notification
Until now, clients of Jael have had to store the first-seen rift if they
want to reliably detect breaches. Otherwise, they would get a false
positive if they heard an old message about a breach (eg if you kick
azimuth-tracker). Clay and Gall did this correctly, but Ames did not.
Jael already maintains this state, so I added a notification to the
existing subscription that happens whenever it notices a breach (a diff
or full where the new rift is greater than the old one).
Because this is an issue on the live network, I wrote state adapters
for Gall and Clay. The Gall one just removes the rift from our state,
but the Clay one is much more involved because we have to upgrade
instances of the clad monad that are possibly in progress.
Specifically, since more input is possible than before, we must wrap any
in-progress instances of the monad in a function that handles the
potential new input from Jael. This temporarily preservers a copy of
the old kernel, but only until the current commit/merge/update has
completed.
The real solution for Clay is to factor out those IO-heavy instances to
userspace tapp/async/imp/threads, and if an upgrade happens in the
middle, you should simply restart them.
Fixes #1852
2019-10-24 07:26:38 +03:00
|
|
|
?: ?=(%breach -.public-keys-result)
|
|
|
|
:: we calculate our own breaches based on our local state
|
|
|
|
::
|
|
|
|
..feel
|
2019-08-07 01:42:37 +03:00
|
|
|
=* who who.public-keys-result
|
|
|
|
=/ a-diff=diff:point diff.public-keys-result
|
|
|
|
=/ maybe-point (~(get by pos.zim) who)
|
|
|
|
=/ =point (fall maybe-point *point)
|
2020-12-06 02:17:37 +03:00
|
|
|
:: if changing rift upward and we already had keys for them, then
|
|
|
|
:: signal a breach
|
jael: provide edge-triggered breach notification
Until now, clients of Jael have had to store the first-seen rift if they
want to reliably detect breaches. Otherwise, they would get a false
positive if they heard an old message about a breach (eg if you kick
azimuth-tracker). Clay and Gall did this correctly, but Ames did not.
Jael already maintains this state, so I added a notification to the
existing subscription that happens whenever it notices a breach (a diff
or full where the new rift is greater than the old one).
Because this is an issue on the live network, I wrote state adapters
for Gall and Clay. The Gall one just removes the rift from our state,
but the Clay one is much more involved because we have to upgrade
instances of the clad monad that are possibly in progress.
Specifically, since more input is possible than before, we must wrap any
in-progress instances of the monad in a function that handles the
potential new input from Jael. This temporarily preservers a copy of
the old kernel, but only until the current commit/merge/update has
completed.
The real solution for Clay is to factor out those IO-heavy instances to
userspace tapp/async/imp/threads, and if an upgrade happens in the
middle, you should simply restart them.
Fixes #1852
2019-10-24 07:26:38 +03:00
|
|
|
::
|
|
|
|
=? ..feel
|
2020-12-05 10:08:47 +03:00
|
|
|
?& (~(has by original) who)
|
|
|
|
?=(^ maybe-point)
|
2020-05-29 00:38:07 +03:00
|
|
|
?=(%rift -.a-diff)
|
jael: provide edge-triggered breach notification
Until now, clients of Jael have had to store the first-seen rift if they
want to reliably detect breaches. Otherwise, they would get a false
positive if they heard an old message about a breach (eg if you kick
azimuth-tracker). Clay and Gall did this correctly, but Ames did not.
Jael already maintains this state, so I added a notification to the
existing subscription that happens whenever it notices a breach (a diff
or full where the new rift is greater than the old one).
Because this is an issue on the live network, I wrote state adapters
for Gall and Clay. The Gall one just removes the rift from our state,
but the Clay one is much more involved because we have to upgrade
instances of the clad monad that are possibly in progress.
Specifically, since more input is possible than before, we must wrap any
in-progress instances of the monad in a function that handles the
potential new input from Jael. This temporarily preservers a copy of
the old kernel, but only until the current commit/merge/update has
completed.
The real solution for Clay is to factor out those IO-heavy instances to
userspace tapp/async/imp/threads, and if an upgrade happens in the
middle, you should simply restart them.
Fixes #1852
2019-10-24 07:26:38 +03:00
|
|
|
(gth to.a-diff rift.point)
|
|
|
|
==
|
2020-06-06 03:59:31 +03:00
|
|
|
=. ..feel
|
|
|
|
%+ public-keys-give
|
|
|
|
(subscribers-on-ship who)
|
|
|
|
[%breach who]
|
|
|
|
=/ sor (~(get by sources-reverse) %& who)
|
|
|
|
?~ sor
|
|
|
|
..feel
|
|
|
|
:: delay resubscribing because Ames is going to clear any
|
|
|
|
:: messages we send now.
|
|
|
|
::
|
|
|
|
(emit hen %pass /breach/(scot %ud u.sor) %b %wait now)
|
jael: provide edge-triggered breach notification
Until now, clients of Jael have had to store the first-seen rift if they
want to reliably detect breaches. Otherwise, they would get a false
positive if they heard an old message about a breach (eg if you kick
azimuth-tracker). Clay and Gall did this correctly, but Ames did not.
Jael already maintains this state, so I added a notification to the
existing subscription that happens whenever it notices a breach (a diff
or full where the new rift is greater than the old one).
Because this is an issue on the live network, I wrote state adapters
for Gall and Clay. The Gall one just removes the rift from our state,
but the Clay one is much more involved because we have to upgrade
instances of the clad monad that are possibly in progress.
Specifically, since more input is possible than before, we must wrap any
in-progress instances of the monad in a function that handles the
potential new input from Jael. This temporarily preservers a copy of
the old kernel, but only until the current commit/merge/update has
completed.
The real solution for Clay is to factor out those IO-heavy instances to
userspace tapp/async/imp/threads, and if an upgrade happens in the
middle, you should simply restart them.
Fixes #1852
2019-10-24 07:26:38 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=. point
|
|
|
|
?- -.a-diff
|
|
|
|
%spon point(sponsor to.a-diff)
|
|
|
|
%rift point(rift to.a-diff)
|
|
|
|
%keys
|
|
|
|
%_ point
|
|
|
|
life life.to.a-diff
|
|
|
|
keys
|
|
|
|
%+ ~(put by keys.point)
|
|
|
|
life.to.a-diff
|
|
|
|
[crypto-suite pass]:to.a-diff
|
2018-06-01 18:14:35 +03:00
|
|
|
==
|
2018-10-26 00:37:04 +03:00
|
|
|
==
|
jael: provide edge-triggered breach notification
Until now, clients of Jael have had to store the first-seen rift if they
want to reliably detect breaches. Otherwise, they would get a false
positive if they heard an old message about a breach (eg if you kick
azimuth-tracker). Clay and Gall did this correctly, but Ames did not.
Jael already maintains this state, so I added a notification to the
existing subscription that happens whenever it notices a breach (a diff
or full where the new rift is greater than the old one).
Because this is an issue on the live network, I wrote state adapters
for Gall and Clay. The Gall one just removes the rift from our state,
but the Clay one is much more involved because we have to upgrade
instances of the clad monad that are possibly in progress.
Specifically, since more input is possible than before, we must wrap any
in-progress instances of the monad in a function that handles the
potential new input from Jael. This temporarily preservers a copy of
the old kernel, but only until the current commit/merge/update has
completed.
The real solution for Clay is to factor out those IO-heavy instances to
userspace tapp/async/imp/threads, and if an upgrade happens in the
middle, you should simply restart them.
Fixes #1852
2019-10-24 07:26:38 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=. pos.zim (~(put by pos.zim) who point)
|
|
|
|
%+ public-keys-give
|
2019-08-20 20:22:52 +03:00
|
|
|
(subscribers-on-ship who)
|
2019-08-07 01:42:37 +03:00
|
|
|
?~ maybe-point
|
|
|
|
[%full (my [who point]~)]
|
|
|
|
[%diff who a-diff]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
:: Update private-keys
|
2018-10-12 19:48:52 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
++ private-keys
|
|
|
|
|= [=life =ring]
|
|
|
|
^+ ..feel
|
|
|
|
?: &(=(lyf.own life) =((~(get by jaw.own) life) `ring))
|
|
|
|
..feel
|
2021-05-26 17:02:39 +03:00
|
|
|
:: only eagerly update lyf if we were behind the chain life
|
|
|
|
::
|
|
|
|
=? lyf.own
|
2021-09-30 04:51:57 +03:00
|
|
|
?| ?=(%earl (clan:title our))
|
|
|
|
?& (gth life lyf.own)
|
|
|
|
::
|
|
|
|
=+ pon=(~(get by pos.zim) our)
|
|
|
|
?~ pon |
|
|
|
|
(lth lyf.own life.u.pon)
|
|
|
|
== ==
|
2021-05-26 17:02:39 +03:00
|
|
|
life
|
2019-08-07 01:42:37 +03:00
|
|
|
=. jaw.own (~(put by jaw.own) life ring)
|
|
|
|
(exec yen.own [%give %private-keys lyf.own jaw.own])
|
2018-10-26 00:37:04 +03:00
|
|
|
::
|
2019-08-08 03:36:25 +03:00
|
|
|
:: Change sources for ships
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
++ sources
|
|
|
|
|= [whos=(set ship) =source]
|
|
|
|
^+ ..feel
|
|
|
|
=^ =source-id this-su (get-source-id source)
|
|
|
|
=. ..feed
|
|
|
|
?~ whos
|
|
|
|
..feed(default-source.etn source-id)
|
|
|
|
=/ whol=(list ship) ~(tap in `(set ship)`whos)
|
|
|
|
=. ship-sources.etn
|
|
|
|
|- ^- (map ship ^source-id)
|
|
|
|
?~ whol
|
|
|
|
ship-sources.etn
|
|
|
|
(~(put by $(whol t.whol)) i.whol source-id)
|
|
|
|
=. ship-sources-reverse.etn
|
|
|
|
%- ~(gas ju ship-sources-reverse.etn)
|
|
|
|
(turn whol |=(=ship [source-id ship]))
|
|
|
|
..feed
|
2019-12-07 09:04:06 +03:00
|
|
|
::
|
|
|
|
?: ?=(%& -.source)
|
2020-12-01 07:33:42 +03:00
|
|
|
%- emit
|
|
|
|
=/ =message-all [%0 %public-keys whos]
|
|
|
|
[hen %pass /public-keys %a %plea p.source %j /public-keys message-all]
|
2019-08-07 01:42:37 +03:00
|
|
|
(peer p.source whos)
|
|
|
|
--
|
2018-05-16 21:48:20 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
:: No-op
|
2018-05-30 01:40:00 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
++ meet
|
|
|
|
|= [who=ship =life =pass]
|
2018-11-03 01:31:31 +03:00
|
|
|
^+ +>
|
2019-08-07 01:42:37 +03:00
|
|
|
+>.$
|
2018-05-16 00:16:29 +03:00
|
|
|
--
|
2017-04-23 06:13:14 +03:00
|
|
|
--
|
2016-11-24 07:25:07 +03:00
|
|
|
:: ::::
|
|
|
|
:::: # vane :: interface
|
|
|
|
:: ::::
|
|
|
|
::
|
|
|
|
:: lex: all durable %jael state
|
|
|
|
::
|
2021-11-10 03:41:23 +03:00
|
|
|
=| lex=state-2
|
2020-12-06 11:38:37 +03:00
|
|
|
|= $: :: now: current time
|
2016-11-24 07:25:07 +03:00
|
|
|
:: eny: unique entropy
|
2022-10-03 17:27:52 +03:00
|
|
|
:: rof: namespace resolver
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2018-12-06 00:41:21 +03:00
|
|
|
now=@da
|
|
|
|
eny=@uvJ
|
2020-11-24 00:06:50 +03:00
|
|
|
rof=roof
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-04-11 04:49:20 +03:00
|
|
|
^?
|
2016-11-24 07:25:07 +03:00
|
|
|
|%
|
|
|
|
:: :: ++call
|
|
|
|
++ call :: request
|
|
|
|
|= $: :: hen: cause of this event
|
|
|
|
:: hic: event data
|
|
|
|
::
|
2020-11-25 23:22:55 +03:00
|
|
|
hen=duct
|
2020-02-11 01:03:03 +03:00
|
|
|
dud=(unit goof)
|
2020-12-08 03:47:06 +03:00
|
|
|
hic=(hobo task)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2018-12-01 22:31:54 +03:00
|
|
|
^- [(list move) _..^$]
|
2020-02-25 01:10:59 +03:00
|
|
|
?^ dud
|
|
|
|
~|(%jael-call-dud (mean tang.u.dud))
|
|
|
|
::
|
2020-12-08 03:47:06 +03:00
|
|
|
=/ =task ((harden task) hic)
|
2018-12-12 11:34:05 +03:00
|
|
|
=^ did lex
|
2020-12-06 11:38:37 +03:00
|
|
|
abet:(~(call of [now eny] lex) hen task)
|
2016-11-24 07:25:07 +03:00
|
|
|
[did ..^$]
|
|
|
|
:: :: ++load
|
|
|
|
++ load :: upgrade
|
2021-11-10 03:41:23 +03:00
|
|
|
=> |%
|
|
|
|
::
|
|
|
|
+$ any-state $%(state-1 state-2)
|
|
|
|
+$ state-1
|
|
|
|
$: %1
|
|
|
|
pki=state-pki-1
|
|
|
|
etn=state-eth-node
|
|
|
|
==
|
|
|
|
+$ state-pki-1
|
|
|
|
$: $= own
|
|
|
|
$: yen=(set duct)
|
|
|
|
sig=(unit oath)
|
|
|
|
tuf=(list turf)
|
|
|
|
boq=@ud
|
|
|
|
nod=purl:eyre
|
|
|
|
fak=_|
|
|
|
|
lyf=life
|
|
|
|
step=@ud
|
|
|
|
jaw=(map life ring)
|
|
|
|
==
|
|
|
|
$= zim
|
|
|
|
$: yen=(jug duct ship)
|
|
|
|
ney=(jug ship duct)
|
|
|
|
nel=(set duct)
|
|
|
|
dns=dnses
|
|
|
|
pos=(map ship point)
|
|
|
|
== ==
|
|
|
|
--
|
|
|
|
|= old=any-state
|
2016-11-24 07:25:07 +03:00
|
|
|
^+ ..^$
|
2021-11-10 03:41:23 +03:00
|
|
|
=? old ?=(%1 -.old)
|
|
|
|
%= old
|
|
|
|
- %2
|
|
|
|
own.pki own.pki.old(+>+ +>.+>+.own.pki.old)
|
|
|
|
==
|
|
|
|
?> ?=(%2 -.old)
|
2020-11-25 18:22:20 +03:00
|
|
|
..^$(lex old)
|
2016-11-24 07:25:07 +03:00
|
|
|
:: :: ++scry
|
|
|
|
++ scry :: inspect
|
2020-12-08 00:52:12 +03:00
|
|
|
^- roon
|
2023-05-22 16:12:09 +03:00
|
|
|
|= [lyc=gang pov=path car=term bem=beam]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit (unit cage))
|
2020-12-08 00:52:12 +03:00
|
|
|
=* ren car
|
2020-11-24 00:06:50 +03:00
|
|
|
=* why=shop &/p.bem
|
|
|
|
=* syd q.bem
|
|
|
|
=* lot=coin $/r.bem
|
|
|
|
=* tyl s.bem
|
|
|
|
::
|
2018-11-01 06:46:55 +03:00
|
|
|
:: XX review for security, stability, cases other than now
|
2018-10-12 19:48:52 +03:00
|
|
|
::
|
2023-12-13 20:49:36 +03:00
|
|
|
?. &(=(lot [%$ %da now]) =([~ ~] lyc)) ~
|
2023-04-24 23:01:00 +03:00
|
|
|
::
|
|
|
|
?: &(?=(%x ren) =(tyl //whey))
|
2020-05-07 11:51:08 +03:00
|
|
|
=/ maz=(list mass)
|
|
|
|
:~ pki+&+pki.lex
|
|
|
|
etn+&+etn.lex
|
|
|
|
==
|
|
|
|
``mass+!>(maz)
|
2023-04-24 23:01:00 +03:00
|
|
|
::
|
|
|
|
?. =(%$ ren) [~ ~]
|
2018-10-12 19:48:52 +03:00
|
|
|
?+ syd
|
|
|
|
~
|
2020-07-29 19:14:18 +03:00
|
|
|
::
|
|
|
|
%step
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
|
|
|
?. =([%& our] why)
|
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
?~ who [~ ~]
|
|
|
|
``[%noun !>(step.own.pki.lex)]
|
2018-11-01 06:46:55 +03:00
|
|
|
::
|
|
|
|
%code
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
?. =([%& our] why)
|
2018-11-01 06:46:55 +03:00
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
?~ who [~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
=/ sec (~(got by jaw.own.pki.lex) lyf.own.pki.lex)
|
2020-12-11 14:37:56 +03:00
|
|
|
=/ sal (add %pass step.own.pki.lex)
|
|
|
|
``[%noun !>((end 6 (shaf sal (shax sec))))]
|
2021-11-10 09:36:05 +03:00
|
|
|
::
|
|
|
|
%fake
|
|
|
|
?. ?=(~ tyl) [~ ~]
|
|
|
|
?. =([%& our] why)
|
|
|
|
[~ ~]
|
|
|
|
``[%noun !>(fak.own.pki.lex)]
|
2018-10-12 19:48:52 +03:00
|
|
|
::
|
|
|
|
%life
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
?. =([%& our] why)
|
2018-10-12 19:48:52 +03:00
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
?~ who [~ ~]
|
|
|
|
:: fake ships always have life=1
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
?: fak.own.pki.lex
|
2018-10-12 19:48:52 +03:00
|
|
|
``[%atom !>(1)]
|
|
|
|
?: =(u.who p.why)
|
2019-08-07 01:42:37 +03:00
|
|
|
``[%atom !>(lyf.own.pki.lex)]
|
|
|
|
=/ pub (~(get by pos.zim.pki.lex) u.who)
|
2018-10-12 19:48:52 +03:00
|
|
|
?~ pub ~
|
|
|
|
``[%atom !>(life.u.pub)]
|
2019-12-01 04:04:18 +03:00
|
|
|
::
|
|
|
|
%lyfe :: unitized %life
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
|
|
|
?. =([%& our] why)
|
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
?~ who [~ ~]
|
|
|
|
:: fake ships always have life=1
|
|
|
|
::
|
|
|
|
?: fak.own.pki.lex
|
|
|
|
``[%noun !>((some 1))]
|
|
|
|
?: =(u.who p.why)
|
|
|
|
``[%noun !>((some lyf.own.pki.lex))]
|
|
|
|
=/ pub (~(get by pos.zim.pki.lex) u.who)
|
|
|
|
?~ pub ``[%noun !>(~)]
|
|
|
|
``[%noun !>((some life.u.pub))]
|
2019-02-02 00:46:09 +03:00
|
|
|
::
|
|
|
|
%rift
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
?. =([%& our] why)
|
2019-02-02 00:46:09 +03:00
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
?~ who [~ ~]
|
2023-05-02 18:36:22 +03:00
|
|
|
:: fake ships always have rift=0
|
2019-02-02 00:46:09 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
?: fak.own.pki.lex
|
2023-05-02 18:36:22 +03:00
|
|
|
``[%atom !>(0)]
|
2019-08-07 01:42:37 +03:00
|
|
|
=/ pos (~(get by pos.zim.pki.lex) u.who)
|
2019-02-02 00:46:09 +03:00
|
|
|
?~ pos ~
|
2019-08-07 01:42:37 +03:00
|
|
|
``[%atom !>(rift.u.pos)]
|
2019-12-01 04:04:18 +03:00
|
|
|
::
|
|
|
|
%ryft :: unitized %rift
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
|
|
|
?. =([%& our] why)
|
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
?~ who [~ ~]
|
2023-05-02 18:36:22 +03:00
|
|
|
:: fake ships always have rift=0
|
2019-12-01 04:04:18 +03:00
|
|
|
::
|
|
|
|
?: fak.own.pki.lex
|
2023-05-02 18:36:22 +03:00
|
|
|
``[%noun !>((some 0))]
|
2019-12-01 04:04:18 +03:00
|
|
|
=/ pos (~(get by pos.zim.pki.lex) u.who)
|
|
|
|
?~ pos ``[%noun !>(~)]
|
|
|
|
``[%noun !>((some rift.u.pos))]
|
2019-08-10 00:07:43 +03:00
|
|
|
::
|
|
|
|
%vein
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
|
|
|
?. &(?=(%& -.why) =(p.why our))
|
|
|
|
[~ ~]
|
|
|
|
=/ lyf (slaw %ud i.tyl)
|
|
|
|
?~ lyf [~ ~]
|
|
|
|
::
|
|
|
|
?~ r=(~(get by jaw.own.pki.lex) u.lyf)
|
|
|
|
[~ ~]
|
|
|
|
::
|
|
|
|
[~ ~ %noun !>(u.r)]
|
2020-12-01 00:35:22 +03:00
|
|
|
::
|
|
|
|
%vile
|
|
|
|
=* life lyf.own.pki.lex
|
|
|
|
=/ =seed [our life (~(got by jaw.own.pki.lex) life) ~]
|
|
|
|
[~ ~ %atom !>((jam seed))]
|
2018-10-16 02:55:13 +03:00
|
|
|
::
|
|
|
|
%deed
|
|
|
|
?. ?=([@ @ ~] tyl) [~ ~]
|
2018-12-12 11:34:05 +03:00
|
|
|
?. &(?=(%& -.why) =(p.why our))
|
2018-10-16 02:55:13 +03:00
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
=/ lyf (slaw %ud i.t.tyl)
|
|
|
|
?~ who [~ ~]
|
|
|
|
?~ lyf [~ ~]
|
2018-10-18 01:56:41 +03:00
|
|
|
::
|
2019-08-10 00:07:43 +03:00
|
|
|
?: fak.own.pki.lex
|
|
|
|
=/ cub (pit:nu:crub:crypto 512 u.who)
|
|
|
|
:^ ~ ~ %noun
|
2019-08-20 02:40:57 +03:00
|
|
|
!> [1 pub:ex:cub ~]
|
2019-08-10 00:07:43 +03:00
|
|
|
::
|
|
|
|
=/ rac (clan:title u.who)
|
2018-10-18 01:56:41 +03:00
|
|
|
?: ?=(%pawn rac)
|
|
|
|
?. =(u.who p.why)
|
|
|
|
[~ ~]
|
|
|
|
?. =(1 u.lyf)
|
|
|
|
[~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
=/ sec (~(got by jaw.own.pki.lex) u.lyf)
|
2018-10-18 01:56:41 +03:00
|
|
|
=/ cub (nol:nu:crub:crypto sec)
|
|
|
|
=/ sig (sign:as:cub (shaf %self (sham [u.who 1 pub:ex:cub])))
|
|
|
|
:^ ~ ~ %noun
|
2019-07-29 14:05:52 +03:00
|
|
|
!> [1 pub:ex:cub `sig]
|
2018-10-18 01:56:41 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=/ pub (~(get by pos.zim.pki.lex) u.who)
|
2018-12-19 22:36:05 +03:00
|
|
|
?~ pub
|
|
|
|
~
|
|
|
|
?: (gth u.lyf life.u.pub)
|
|
|
|
~
|
2019-08-07 01:42:37 +03:00
|
|
|
=/ pas (~(get by keys.u.pub) u.lyf)
|
2018-12-19 22:36:05 +03:00
|
|
|
?~ pas
|
|
|
|
~
|
2018-10-16 02:55:13 +03:00
|
|
|
:^ ~ ~ %noun
|
2019-08-20 00:43:39 +03:00
|
|
|
!> [u.lyf pass.u.pas ~]
|
2018-10-12 19:48:52 +03:00
|
|
|
::
|
|
|
|
%earl
|
2019-08-07 01:42:37 +03:00
|
|
|
?. ?=([@ @ ~] tyl) [~ ~]
|
|
|
|
?. =([%& our] why)
|
2018-10-12 19:48:52 +03:00
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
=/ lyf (slaw %ud i.t.tyl)
|
|
|
|
?~ who [~ ~]
|
|
|
|
?~ lyf [~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
?: (gth u.lyf lyf.own.pki.lex)
|
2018-10-12 19:48:52 +03:00
|
|
|
~
|
2019-08-07 01:42:37 +03:00
|
|
|
?: (lth u.lyf lyf.own.pki.lex)
|
2018-10-12 19:48:52 +03:00
|
|
|
[~ ~]
|
|
|
|
:: XX check that who/lyf hasn't been booted
|
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
=/ sec (~(got by jaw.own.pki.lex) u.lyf)
|
|
|
|
=/ moon-sec (shaf %earl (sham our u.lyf sec u.who))
|
|
|
|
=/ cub (pit:nu:crub:crypto 128 moon-sec)
|
|
|
|
=/ =seed [u.who 1 sec:ex:cub ~]
|
|
|
|
``[%seed !>(seed)]
|
2018-10-12 19:48:52 +03:00
|
|
|
::
|
|
|
|
%sein
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
?. =([%& our] why)
|
2018-10-12 19:48:52 +03:00
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
?~ who [~ ~]
|
|
|
|
:^ ~ ~ %atom
|
|
|
|
!> ^- ship
|
2020-12-06 11:38:37 +03:00
|
|
|
(~(sein of [now eny] lex) u.who)
|
2018-10-12 19:48:52 +03:00
|
|
|
::
|
|
|
|
%saxo
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
?. =([%& our] why)
|
2018-10-12 19:48:52 +03:00
|
|
|
[~ ~]
|
|
|
|
=/ who (slaw %p i.tyl)
|
|
|
|
?~ who [~ ~]
|
|
|
|
:^ ~ ~ %noun
|
|
|
|
!> ^- (list ship)
|
2020-12-06 11:38:37 +03:00
|
|
|
(~(saxo of [now eny] lex) u.who)
|
2019-12-04 13:27:35 +03:00
|
|
|
::
|
|
|
|
%subscriptions
|
|
|
|
?. ?=([@ ~] tyl) [~ ~]
|
|
|
|
?. =([%& our] why)
|
|
|
|
[~ ~]
|
|
|
|
:^ ~ ~ %noun
|
|
|
|
!>([yen ney nel]:zim.pki.lex)
|
2019-01-16 02:50:51 +03:00
|
|
|
::
|
2019-08-07 01:42:37 +03:00
|
|
|
%sources
|
2019-01-16 02:50:51 +03:00
|
|
|
?. ?=(~ tyl) [~ ~]
|
|
|
|
:^ ~ ~ %noun !>
|
2019-08-07 01:42:37 +03:00
|
|
|
etn.lex
|
2019-04-12 04:01:35 +03:00
|
|
|
::
|
|
|
|
%turf
|
|
|
|
?. ?=(~ tyl) [~ ~]
|
2019-08-07 01:42:37 +03:00
|
|
|
[~ ~ %noun !>(tuf.own.pki.lex)]
|
2018-10-12 19:48:52 +03:00
|
|
|
==
|
2016-11-24 07:25:07 +03:00
|
|
|
:: :: ++stay
|
|
|
|
++ stay :: preserve
|
|
|
|
lex
|
|
|
|
:: :: ++take
|
|
|
|
++ take :: accept
|
|
|
|
|= $: :: tea: order
|
|
|
|
:: hen: cause
|
|
|
|
:: hin: result
|
|
|
|
::
|
2020-11-25 23:22:55 +03:00
|
|
|
tea=wire
|
|
|
|
hen=duct
|
2020-02-11 01:03:03 +03:00
|
|
|
dud=(unit goof)
|
2020-12-06 11:38:37 +03:00
|
|
|
hin=sign
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2018-12-01 22:31:54 +03:00
|
|
|
^- [(list move) _..^$]
|
2020-02-25 01:10:59 +03:00
|
|
|
?^ dud
|
|
|
|
~|(%jael-take-dud (mean tang.u.dud))
|
|
|
|
::
|
2020-12-06 11:38:37 +03:00
|
|
|
=^ did lex abet:(~(take of [now eny] lex) tea hen hin)
|
2018-05-29 00:04:33 +03:00
|
|
|
[did ..^$]
|
2016-11-24 07:25:07 +03:00
|
|
|
--
|