From 91432cf75fa79af4e41d7b7639907c7e9d5741b2 Mon Sep 17 00:00:00 2001 From: Isaac Visintainer Date: Tue, 9 Oct 2018 18:24:25 -0700 Subject: [PATCH] added sunk note to jael, implements %ames, stubs other vanes --- sys/vane/ames.hoon | 12 ++++++++ sys/vane/clay.hoon | 2 ++ sys/vane/dill.hoon | 1 + sys/vane/eyre.hoon | 2 ++ sys/vane/ford.hoon | 6 ++++ sys/vane/gall.hoon | 2 ++ sys/vane/jael.hoon | 77 ++++++++++++++++++++++++++++------------------ sys/zuse.hoon | 34 +++++++++++++++----- 8 files changed, 98 insertions(+), 38 deletions(-) diff --git a/sys/vane/ames.hoon b/sys/vane/ames.hoon index 0774c117e..7c1cad7b8 100644 --- a/sys/vane/ames.hoon +++ b/sys/vane/ames.hoon @@ -1440,6 +1440,18 @@ fox(bad (~(del in bad.fox) p.kyz)) ~& [%block p.kyz] fox(bad (~(put in bad.fox) p.kyz)) + :: + %sunk + =/ con=corn (~(got by zac.fox) p.kyz) + =. con con(wab (~(del by wab.con) p.kyz)) + =/ suf=sufi (~(got by urb.ton.fox) p.kyz) + =. suf suf(hoc (~(del by hoc.suf) p.kyz)) + :: + :- ~ + %= fox + zac (~(put by zac.fox) p.kyz con) + urb.ton (~(put by urb.ton.fox) p.kyz suf) + == :: %wake (~(wake am [now fox]) hen) diff --git a/sys/vane/clay.hoon b/sys/vane/clay.hoon index 2812b8250..8c01fe825 100644 --- a/sys/vane/clay.hoon +++ b/sys/vane/clay.hoon @@ -3901,6 +3901,8 @@ =+ den=((de now hen ruf) [. .]:our.req des.req) abet:(perm:den pax.req rit.req) [mos ..^$] + :: + $sunk [~ ..^$] :: ?($warp $werp) =^ for req diff --git a/sys/vane/dill.hoon b/sys/vane/dill.hoon index 78f5b256a..8db64710c 100644 --- a/sys/vane/dill.hoon +++ b/sys/vane/dill.hoon @@ -156,6 +156,7 @@ (crud p.kyz q.kyz) $blew (send %rez p.p.kyz q.p.kyz) $heft heft + $sunk +> $veer (dump kyz) $vega (dump kyz) $velo (dump kyz) diff --git a/sys/vane/eyre.hoon b/sys/vane/eyre.hoon index 399bac96e..99a1028bc 100644 --- a/sys/vane/eyre.hoon +++ b/sys/vane/eyre.hoon @@ -736,6 +736,8 @@ hov [~ our] top [[our %home ud+0] /web] == + :: + $sunk +> :: ?($chis $this) :: inbound request %- emule |. ^+ ..apex diff --git a/sys/vane/ford.hoon b/sys/vane/ford.hoon index 9baa98822..81c5d9860 100644 --- a/sys/vane/ford.hoon +++ b/sys/vane/ford.hoon @@ -6155,6 +6155,12 @@ =. state-by-ship.ax (~(put by state-by-ship.ax) our.task ship-state) :: [moves ford-gate] + :: + :: %sunk: foreign ship has lost continutity + :: + %sunk + :: + [~ ford-gate] :: :: %wipe: wipe stored builds, clearing :percent-to-remove of the entries :: diff --git a/sys/vane/gall.hoon b/sys/vane/gall.hoon index 279ed491b..12b5cb76c 100644 --- a/sys/vane/gall.hoon +++ b/sys/vane/gall.hoon @@ -1272,6 +1272,8 @@ $init :: ~& [%gall-init p.q.hic] [~ ..^$(pol.all (~(put by pol.all) p.q.hic %*(. *mast sys hen)))] + :: + $sunk [~ ..^$] :: $west ?. (~(has by pol.all) p.p.q.hic) diff --git a/sys/vane/jael.hoon b/sys/vane/jael.hoon index 4258223d9..e082d4844 100644 --- a/sys/vane/jael.hoon +++ b/sys/vane/jael.hoon @@ -647,7 +647,7 @@ :: {$burn p/ship q/safe} :: $burn - %+ cure our.tac + %^ cure hen our.tac abet:abet:(deal:(burb our.tac) p.tac [~ q.tac]) :: :: boot from keys @@ -666,7 +666,7 @@ |=([=life =pass] `public`[live=| life (my [life pass] ~)]) =. +>.$ %- curd =< abet - (pubs:~(feel su our urb sub etn) kyz) + (pubs:~(feel su hen our urb sub etn) kyz) :: XX sponsor :: XX reconcile with .dns.eth :: set initial domains @@ -727,14 +727,14 @@ :: {$hail p/ship q/remote} :: $hail - %+ cure our.tac + %^ cure hen our.tac abet:abet:(hail:(burb our.tac) p.tac q.tac) :: :: set ethereum source :: [%look p=(each ship purl)] :: %look - %+ cute our.tac =< abet + %^ cute hen our.tac =< abet (~(look et our.tac now.sys etn.lex) src.tac) :: :: create promises @@ -743,7 +743,7 @@ $mint ~| %fake-jael ?< fak.urb - %+ cure our.tac + %^ cure hen our.tac abet:abet:(deal:(burb our.tac) p.tac [q.tac ~]) :: :: @@ -752,10 +752,10 @@ :: $move =. +> - %+ cure our.tac + %^ cure hen our.tac abet:abet:(deal:(burb our.tac) p.tac [~ r.tac]) =. +> - %+ cure our.tac + %^ cure hen our.tac abet:abet:(deal:(burb our.tac) q.tac [r.tac ~]) +> :: @@ -775,13 +775,13 @@ :: %pubs %- curd =< abet - (~(pubs ~(feed su our.tac urb sub etn) hen) who.tac) + (~(pubs ~(feed su hen our.tac urb sub etn) hen) who.tac) :: :: seen after breach :: [%meet our=ship who=ship] :: %meet - %+ cure our.tac + %^ cure hen our.tac [[%meet who.tac life.tac pass.tac]~ urb] :: :: XX should be a subscription @@ -800,20 +800,20 @@ :: {$vein $~} :: $vein - (curd abet:~(vein ~(feed su our.tac urb sub etn) hen)) + (curd abet:~(vein ~(feed su hen our.tac urb sub etn) hen)) :: :: watch ethereum events :: [%vent ~] :: %vent =. moz [[hen %give %mack ~] moz] - (curd abet:~(vent ~(feed su our.tac urb sub etn) hen)) + (curd abet:~(vent ~(feed su hen our.tac urb sub etn) hen)) :: :: monitor assets :: {$vest $~} :: $vest - (curd abet:~(vest ~(feed su our.tac urb sub etn) hen)) + (curd abet:~(vest ~(feed su hen our.tac urb sub etn) hen)) :: :: monitor all :: {$vine $~} @@ -834,7 +834,7 @@ :: [%hail p=remote] :: %hail - %+ cure our + %^ cure hen our abet:abet:(hail:(burb our) dem p.mes) :: :: cancel trackers @@ -856,7 +856,7 @@ ?. &(-.source.etn =(dem p.source.etn)) +>.$ =. moz [[hen %give %mack ~] moz] - %+ cute our =< abet + %^ cute hen our =< abet (~(hear-vent et our now.sys etn.lex) p.mes) == == @@ -877,11 +877,11 @@ +>.$ :: [%e %sigh *] - %+ cute our =< abet + %^ cute hen our =< abet (~(sigh et our now.sys etn.lex) wir p.hin) :: [%b %wake ~] - %+ cute our + %^ cute hen our :: XX cleanup :: ?: ?=([%init ~] wir) @@ -889,7 +889,7 @@ abet:~(wake et our now.sys etn.lex) :: [%j %vent *] - %+ cute our =< abet + %^ cute hen our =< abet (~(hear-vent et our now.sys etn.lex) p.hin) == :: :: ++curd:of @@ -898,19 +898,20 @@ +>(sub sub, moz (weld (flop moz) ^moz)) :: :: ++cure:of ++ cure :: absolute edits - |= {our/ship hab/(list change) urb/state-absolute} + |= {hen/duct our/ship hab/(list change) urb/state-absolute} ^+ +> - (curd(urb urb) abet:(~(apex su our urb sub etn) hab)) + (curd(urb urb) abet:(~(apex su hen our urb sub etn) hab)) :: :: ++cute:of ++ cute :: ethereum changes - |= $: our=ship + |= $: hen=duct + our=ship mos=(list move) ven=chain net=state-eth-node == ^+ +> %- cure(etn net, moz (weld (flop mos) moz)) - [our abet:(link:(burb our) ven)] + [hen our abet:(link:(burb our) ven)] -- :: :: ++su :::: ## relative^heavy :: subjective engine @@ -930,7 +931,8 @@ :: =| moz/(list move) =| evs=logs - =| $: our/ship + =| $: hen/duct + our/ship state-absolute state-relative state-eth-node @@ -939,9 +941,9 @@ :: urb: absolute urbit state :: sub: relative urbit state :: - =* urb ->- - =* sub ->+< - =* etn ->+> + =* urb ->+< + =* sub ->+>- + =* etn ->+>+ |% :: :: ++abet:su ++ abet :: resolve @@ -1241,6 +1243,7 @@ :: ++ file-discontinuity |= who=ship + ^+ kyz =+ (get-public who) (~(put by kyz) who -(live |)) :: @@ -1267,11 +1270,25 @@ |= [who=ship dif=diff-hull] ^+ [kyz ..file] =- ::TODO =; with just the type - :- ?: ?=(%& -.new) - (file-keys who p.new) - ?: p.new kyz - (file-discontinuity who) - ..file(hul.eth (~(put by hul.eth) who hel)) + ?: ?=(%& -.new) + :- (file-keys who p.new) + ..file(hul.eth (~(put by hul.eth) who hel)) + ?: p.new + :- kyz + ..file(hul.eth (~(put by hul.eth) who hel)) + :- (file-discontinuity who) + %= ..file + hul.eth (~(put by hul.eth) who hel) + :: + moz :* [hen %slip %a %sunk who] + [hen %slip %c %sunk who] + [hen %slip %d %sunk who] + [hen %slip %e %sunk who] + [hen %slip %f %sunk who] + [hen %slip %g %sunk who] + moz + == + == :: hel: updated hull :: new: new keypair or "kept continuity?" (yes is no-op) ^- [hel=hull new=(each (pair life pass) ?)] diff --git a/sys/zuse.hoon b/sys/zuse.hoon index 94b171231..f4594f2a8 100644 --- a/sys/zuse.hoon +++ b/sys/zuse.hoon @@ -507,6 +507,7 @@ {$junk p/@} :: entropy {$kick p/@da} :: wake up {$nuke p/@p} :: toggle auto-block + {$sunk p=ship} :: report death {$tend ~} :: watch lane changes {$wake ~} :: timer activate {$wegh ~} :: report memory @@ -737,6 +738,7 @@ {$dirk des/desk} :: mark mount dirty {$ogre pot/$@(desk beam)} :: delete mount point {$perm our/ship des/desk pax/path rit/rite} :: change permissions + {$sunk p=ship} :: report death {$warp wer/sock rif/riff} :: internal file req {$werp who/ship wer/sock rif/riff} :: external file req {$wegh ~} :: report memory @@ -902,6 +904,7 @@ {$harm ~} :: all terms hung up {$init p/ship} :: after gall ready {$noop ~} :: no operation + {$sunk p=ship} :: report death {$talk p/tank} :: {$text p/tape} :: {$veer p/@ta q/path r/@t} :: install vane @@ -1001,6 +1004,7 @@ [%live p=@ud q=(unit @ud)] :: http/s ports [%rule p=http-rule] :: update config [%serv p=$@(desk beam)] :: set serving root + [%sunk p=ship] :: report death [%them p=(unit hiss)] :: outbound request [%they p=@ud q=httr] :: inbound response [%chis p=? q=clip r=httq] :: IPC inbound request @@ -1196,6 +1200,9 @@ :: our=@p == + :: %sunk: recieve a report that a foreign ship has lost continuity + :: + [%sunk =ship] :: %wegh: produce memory usage information :: [%wegh ~] @@ -1886,6 +1893,7 @@ $% {$conf p/dock q/culm} :: configure app {$init p/ship} :: set owner {$deal p/sock q/cush} :: full transmission + {$sunk p=ship} :: report death {$went p/sack q/path r/@ud s/coop} :: response confirm {$west p/sack q/path r/*} :: network request {$wegh ~} :: report memory @@ -2010,14 +2018,24 @@ [%vent p=chain] :: ethereum changes == :: ++ note :: out request $-> - =, eyre - $% [%b %rest p=@da] :: cancel timer - [%b %wait p=@da] :: wait until - [%e %hiss p=(unit user) q=mark r=cage] :: outbound user req - [%a %want p=sock q=path r=*] :: send message - [%j %vent-result p=chain] :: tmp workaround - [@tas %init p=ship] :: report install - == :: + =, eyre :: + $% $: %b :: + $% [%rest p=@da] :: cancel timer + [%wait p=@da] :: wait until + == == :: + $: %e :: + $% [%hiss p=(unit user) q=mark r=cage] :: outbound user req + == == :: + $: %a :: + $% [%want p=sock q=path r=*] :: send message + == == :: + $: %j :: + $% [%vent-result p=chain] :: tmp workaround + == == :: + $: @tas :: + $% [%init p=ship] :: report install + [%sunk p=ship] :: report death + == == == :: ++ public :: public key state $: live=? :: seen in current era life=life :: current key number