jael: re-enable ship-to-ship communication

Also fix bug in eth-watcher that didn't cancel outstanding threads when
config changes.

And set default rift for ourselves to 0.
This commit is contained in:
Philip Monk 2019-12-06 20:44:36 -08:00
parent e88f91f3b2
commit e5ac690fd3
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
7 changed files with 37 additions and 11 deletions

View File

@ -149,7 +149,7 @@
=/ already (~(has by dogs.state) path.poke)
~? &(already restart)
[dap.bowl 'overwriting existing watchdog on' path.poke]
=/ wait-cards
=/ wait-cards=(list card)
?: already
~
[(wait-shortcut path.poke now.bowl) ~]
@ -162,7 +162,8 @@
==
~
=/ =cage [%spider-stop !>([u.running.u.dog &])]
[%pass [%starting path] %agent [our.bowl %spider] %poke cage]~
:_ ~
`card`[%pass [%starting path.poke] %agent [our.bowl %spider] %poke cage]
=/ new-dog
=/ dog=watchdog
?: restart *watchdog
@ -172,11 +173,11 @@
number from.config.poke
==
=. dogs.state (~(put by dogs.state) path.poke new-dog)
[wait-cards this]
[(weld wait-cards restart-cards) this]
::
%clear
=. dogs.state (~(del by dogs.state) path.poke)
[(weld wait-cards restart-cards) this]
[~ this]
==
::
:: +on-watch: subscribe & get initial subscription data

View File

@ -257,14 +257,14 @@
=. sig.own.pki sig.seed.tac
:: load our initial public key
::
=/ spon-ship=(unit ship)
=/ flopped-spon (flop spon.tac)
?~(flopped-spon ~ `ship.i.flopped-spon)
=. pos.zim.pki
=/ cub (nol:nu:crub:crypto key.seed.tac)
%+ ~(put by pos.zim.pki)
our
=/ spon-ship
=/ flopped-spon (flop spon.tac)
?~(flopped-spon ~ `ship.i.flopped-spon)
[1 lyf.seed.tac (my [lyf.seed.tac [1 pub:ex:cub]] ~) spon-ship]
[0 lyf.seed.tac (my [lyf.seed.tac [1 pub:ex:cub]] ~) spon-ship]
:: our initial private key
::
=. lyf.own.pki lyf.seed.tac
@ -307,8 +307,20 @@
::
=. +>.$ (poke-watch hen %azimuth-tracker nod.own.pki)
=. +>.$
%- curd =< abet
(sources:~(feel su hen our pki etn) ~ [%| %azimuth-tracker])
?- (clan:title our)
%czar
%- curd =< abet
(sources:~(feel su hen our pki etn) ~ [%| %azimuth-tracker])
::
*
=. +>.$
%- curd =< abet
%+ sources:~(feel su hen our pki etn)
(silt (turn spon-points head))
[%| %azimuth-tracker]
%- curd =< abet
(sources:~(feel su hen our pki etn) ~ [%& (need spon-ship)])
==
::
=. moz
%+ weld moz
@ -508,7 +520,7 @@
^+ +>
?- hin
[%a %done *]
?~ error.hin ~&(%ares-fine +>.$)
?~ error.hin +>.$
~& [%done-bad tag.u.error.hin]
%- (slog tang.u.error.hin)
::TODO fail:et

View File

@ -14,6 +14,7 @@
%ph-child-sync
%ph-breach-multiple
%ph-breach-sudden
%ph-breach-hi-cousin
%ph-hi-linnup-az
%ph-moon-az
==

View File

@ -1,3 +1,7 @@
:: This is useful to test that we properly hear about breaches outside
:: our sponsorship tree. We usually hear about these via ship-to-ship
:: communication.
::
/- spider
/+ *ph-io
=, strand=strand:spider

View File

@ -1,3 +1,5 @@
:: This tests breaches of both parent and child in succession.
::
/- spider
/+ *ph-io
=, strand=strand:spider

View File

@ -1,3 +1,7 @@
:: This tests whether we can handle the case where our immediate
:: sponsor dies without telling us about its breach, so we must hear
:: about it from somewhere else.
::
/- spider
/+ *ph-io
=, strand=strand:spider

View File

@ -1,3 +1,5 @@
:: This tests that syncs are correctly restarted after a breach
::
/- spider
/+ *ph-io
=, strand=strand:spider