mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-26 00:12:28 +03:00
Merge remote-tracking branch 'origin/master' into philip/snap
This commit is contained in:
commit
ed3b028d9a
46
pkg/arvo/gen/ames-flows.hoon
Normal file
46
pkg/arvo/gen/ames-flows.hoon
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
:: print [len] %ames flows, sorted by number-per-ship
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= [[now=@da eny=@uvJ bec=beak] arg=$@(~ [len=@ ~]) ~]
|
||||||
|
:- %noun
|
||||||
|
::
|
||||||
|
=; flows
|
||||||
|
^- (list [=ship open=[out-open=@ out-closing=@ in=@ nax=@] corked=@])
|
||||||
|
=/ len ?^(arg len.arg 50)
|
||||||
|
(scag len (sort flows |=([[@ [a=@ud *] *] @ [b=@ud *] *] (gth a b))))
|
||||||
|
::
|
||||||
|
=/ peers-map
|
||||||
|
.^ (map ship ?(%alien %known))
|
||||||
|
%ax /(scot %p p.bec)//(scot %da now)/peers
|
||||||
|
==
|
||||||
|
=/ peers=(list ship)
|
||||||
|
%+ murn ~(tap by peers-map)
|
||||||
|
|= [=ship val=?(%alien %known)]
|
||||||
|
?: =(ship p.bec)
|
||||||
|
~ :: this is weird, but we saw it
|
||||||
|
?- val
|
||||||
|
%alien ~
|
||||||
|
%known (some ship)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
^- (list [=ship open=[out-open=@ out-closing=@ in=@ nax=@] corked=@])
|
||||||
|
%+ turn peers
|
||||||
|
|= =ship
|
||||||
|
=+ .^ =ship-state:ames
|
||||||
|
%ax /(scot %p p.bec)//(scot %da now)/peers/(scot %p ship)
|
||||||
|
==
|
||||||
|
=/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state)
|
||||||
|
=/ corked ~(wyt in corked.peer-state)
|
||||||
|
=- [ship - corked]
|
||||||
|
::
|
||||||
|
=+ %+ roll ~(tap in ~(key by snd.peer-state))
|
||||||
|
|= [b=bone [out=(list bone) in=(list bone) nax=(list bone)]]
|
||||||
|
=/ m (mod b 4)
|
||||||
|
?+ m ~|([%odd-bone b] !!)
|
||||||
|
%0 [[b out] in nax]
|
||||||
|
%1 [out [b in] nax]
|
||||||
|
%3 [out in [b nax]]
|
||||||
|
==
|
||||||
|
=/ [out-closing=(list bone) out-open=(list bone)]
|
||||||
|
(skid out ~(has ^in closing.peer-state))
|
||||||
|
[(lent out-open) (lent out-closing) (lent in) (lent nax)]
|
20
pkg/arvo/gen/ames-timers.hoon
Normal file
20
pkg/arvo/gen/ames-timers.hoon
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
:: print [len] %ames message-pump timers, sorted by number-per-ship
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= [[now=@da eny=@uvJ bec=beak] arg=$@(~ [len=@ ~]) ~]
|
||||||
|
:- %noun
|
||||||
|
::
|
||||||
|
=; who
|
||||||
|
^- (list [@ta @ud])
|
||||||
|
=/ len ?^(arg len.arg 50)
|
||||||
|
(scag len (sort ~(tap by who) |=([[@ a=@ud] @ b=@ud] (gth a b))))
|
||||||
|
::
|
||||||
|
=| who=(map @ta @ud)
|
||||||
|
=/ tim .^((list (pair @da duct)) bx+/(scot %p p.bec)//(scot %da now)/debug/timers)
|
||||||
|
|- ^+ who
|
||||||
|
?~ tim who
|
||||||
|
?. &(?=(^ q.i.tim) ?=([%ames %pump ^] i.q.i.tim))
|
||||||
|
$(tim t.tim)
|
||||||
|
=* her i.t.t.i.q.i.tim
|
||||||
|
=/ i (~(gut by who) her 0)
|
||||||
|
$(tim t.tim, who (~(put by who) her +(i)))
|
10
pkg/arvo/gen/gall-nonces.hoon
Normal file
10
pkg/arvo/gen/gall-nonces.hoon
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
:: +gall-nonces: print %gall agent subscription nonces, highest-last
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= [[now=@da eny=@uvJ bec=beak] ~ ~]
|
||||||
|
:- %noun
|
||||||
|
^- (list [dude:gall @ud])
|
||||||
|
%+ sort
|
||||||
|
%~ tap by
|
||||||
|
.^((map dude:gall @ud) %gf /(scot %p p.bec)//(scot %da now))
|
||||||
|
|=([[* a=@ud] [* b=@ud]] (lth a b))
|
8
pkg/arvo/gen/hood/doff.hoon
Normal file
8
pkg/arvo/gen/hood/doff.hoon
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
:- %say
|
||||||
|
|= $: [now=@da eny=@uvJ bec=beak]
|
||||||
|
~
|
||||||
|
[dude=_`dude:gall`%$ ship=_`@p`(bex 128)]
|
||||||
|
==
|
||||||
|
=/ darg=(unit dude:gall) ?:(=(%$ dude) ~ `dude)
|
||||||
|
=/ sarg=(unit ^ship) ?:(=((bex 128) ship) ~ `ship)
|
||||||
|
[%helm-doff darg sarg]
|
8
pkg/arvo/gen/hood/gall-sift.hoon
Normal file
8
pkg/arvo/gen/hood/gall-sift.hoon
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
:: Helm: Set Gall Verbosity by Agent
|
||||||
|
::
|
||||||
|
/? 310
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= [^ dudes=(list dude:gall) ~]
|
||||||
|
:- %helm-gall-sift
|
||||||
|
dudes
|
11
pkg/arvo/gen/hood/gall-verb.hoon
Normal file
11
pkg/arvo/gen/hood/gall-verb.hoon
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
:: Helm: Adjust Gall verbosity
|
||||||
|
::
|
||||||
|
:: List of diagnostic flags is in verb:gall in zuse.hoon, documented in
|
||||||
|
:: gall.hoon
|
||||||
|
::
|
||||||
|
/? 310
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= [^ veb=(list verb:gall) ~]
|
||||||
|
:- %helm-gall-verb
|
||||||
|
veb
|
@ -77,7 +77,8 @@
|
|||||||
::
|
::
|
||||||
++ de-gill :: gill from wire
|
++ de-gill :: gill from wire
|
||||||
|= way=wire ^- gill:gall
|
|= way=wire ^- gill:gall
|
||||||
?>(?=([@ @ ~] way) [(slav %p i.way) i.t.way])
|
~| way
|
||||||
|
?>(?=([@ @ *] way) [(slav %p i.way) i.t.way])
|
||||||
--
|
--
|
||||||
:: TODO: remove .ost
|
:: TODO: remove .ost
|
||||||
::
|
::
|
||||||
|
@ -230,6 +230,14 @@
|
|||||||
|= veb=(list verb:ames) =< abet
|
|= veb=(list verb:ames) =< abet
|
||||||
(emit %pass /helm %arvo %a %spew veb)
|
(emit %pass /helm %arvo %a %spew veb)
|
||||||
::
|
::
|
||||||
|
++ poke-gall-sift
|
||||||
|
|= dudes=(list dude:gall) =< abet
|
||||||
|
(emit %pass /helm %arvo %g %sift dudes)
|
||||||
|
::
|
||||||
|
++ poke-gall-verb
|
||||||
|
|= veb=(list verb:gall) =< abet
|
||||||
|
(emit %pass /helm %arvo %g %spew veb)
|
||||||
|
::
|
||||||
++ poke-ames-wake
|
++ poke-ames-wake
|
||||||
|= ~ =< abet
|
|= ~ =< abet
|
||||||
(emit %pass /helm %arvo %a %stir '')
|
(emit %pass /helm %arvo %a %stir '')
|
||||||
@ -252,6 +260,11 @@
|
|||||||
=< abet
|
=< abet
|
||||||
(emit %pass /helm/cors/reject %arvo %e %reject-origin origin)
|
(emit %pass /helm/cors/reject %arvo %e %reject-origin origin)
|
||||||
::
|
::
|
||||||
|
++ poke-doff
|
||||||
|
|= [dude=(unit dude:gall) ship=(unit ship)]
|
||||||
|
=< abet
|
||||||
|
(emit %pass /helm/doff %arvo %g %doff dude ship)
|
||||||
|
::
|
||||||
++ poke
|
++ poke
|
||||||
|= [=mark =vase]
|
|= [=mark =vase]
|
||||||
?> ?| ?=(%helm-hi mark)
|
?> ?| ?=(%helm-hi mark)
|
||||||
@ -269,6 +282,9 @@
|
|||||||
%helm-code =;(f (f !<(_+<.f vase)) poke-code)
|
%helm-code =;(f (f !<(_+<.f vase)) poke-code)
|
||||||
%helm-cors-approve =;(f (f !<(_+<.f vase)) poke-cors-approve)
|
%helm-cors-approve =;(f (f !<(_+<.f vase)) poke-cors-approve)
|
||||||
%helm-cors-reject =;(f (f !<(_+<.f vase)) poke-cors-reject)
|
%helm-cors-reject =;(f (f !<(_+<.f vase)) poke-cors-reject)
|
||||||
|
%helm-doff =;(f (f !<(_+<.f vase)) poke-doff)
|
||||||
|
%helm-gall-sift =;(f (f !<(_+<.f vase)) poke-gall-sift)
|
||||||
|
%helm-gall-verb =;(f (f !<(_+<.f vase)) poke-gall-verb)
|
||||||
%helm-hi =;(f (f !<(_+<.f vase)) poke-hi)
|
%helm-hi =;(f (f !<(_+<.f vase)) poke-hi)
|
||||||
%helm-knob =;(f (f !<(_+<.f vase)) poke-knob)
|
%helm-knob =;(f (f !<(_+<.f vase)) poke-knob)
|
||||||
%helm-pans =;(f (f !<(_+<.f vase)) poke-pans)
|
%helm-pans =;(f (f !<(_+<.f vase)) poke-pans)
|
||||||
|
12
pkg/arvo/mar/aqua/effect.hoon
Normal file
12
pkg/arvo/mar/aqua/effect.hoon
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/- *aquarium
|
||||||
|
|_ af=aqua-effect
|
||||||
|
++ grad %noun
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ noun af
|
||||||
|
--
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ noun aqua-effect
|
||||||
|
--
|
||||||
|
--
|
@ -351,6 +351,7 @@
|
|||||||
:: %hear: packet from unix
|
:: %hear: packet from unix
|
||||||
:: %heed: track peer's responsiveness; gives %clog if slow
|
:: %heed: track peer's responsiveness; gives %clog if slow
|
||||||
:: %jilt: stop tracking peer's responsiveness
|
:: %jilt: stop tracking peer's responsiveness
|
||||||
|
:: %cork: request to delete message flow
|
||||||
:: %plea: request to send message
|
:: %plea: request to send message
|
||||||
::
|
::
|
||||||
:: System and Lifecycle Tasks
|
:: System and Lifecycle Tasks
|
||||||
@ -367,6 +368,7 @@
|
|||||||
$% [%hear =lane =blob]
|
$% [%hear =lane =blob]
|
||||||
[%heed =ship]
|
[%heed =ship]
|
||||||
[%jilt =ship]
|
[%jilt =ship]
|
||||||
|
[%cork =ship]
|
||||||
$>(%plea vane-task)
|
$>(%plea vane-task)
|
||||||
::
|
::
|
||||||
$>(%born vane-task)
|
$>(%born vane-task)
|
||||||
@ -511,6 +513,9 @@
|
|||||||
:: entry and emit a nack to the local vane that asked us to send
|
:: entry and emit a nack to the local vane that asked us to send
|
||||||
:: the message.
|
:: the message.
|
||||||
:: heeds: listeners for %clog notifications
|
:: heeds: listeners for %clog notifications
|
||||||
|
:: closing: bones closed on the sender side
|
||||||
|
:: corked: bones closed on both sender and receiver
|
||||||
|
:: krocs: bones that need to be sent again to the publisher
|
||||||
::
|
::
|
||||||
+$ peer-state
|
+$ peer-state
|
||||||
$: $: =symmetric-key
|
$: $: =symmetric-key
|
||||||
@ -526,6 +531,9 @@
|
|||||||
rcv=(map bone message-sink-state)
|
rcv=(map bone message-sink-state)
|
||||||
nax=(set [=bone =message-num])
|
nax=(set [=bone =message-num])
|
||||||
heeds=(set duct)
|
heeds=(set duct)
|
||||||
|
closing=(set bone)
|
||||||
|
corked=(set bone)
|
||||||
|
krocs=(set bone)
|
||||||
==
|
==
|
||||||
:: $qos: quality of service; how is our connection to a peer doing?
|
:: $qos: quality of service; how is our connection to a peer doing?
|
||||||
::
|
::
|
||||||
@ -1651,15 +1659,18 @@
|
|||||||
[%jolt =desk =dude] :: (re)start agent
|
[%jolt =desk =dude] :: (re)start agent
|
||||||
[%idle =dude] :: suspend agent
|
[%idle =dude] :: suspend agent
|
||||||
[%nuke =dude] :: delete agent
|
[%nuke =dude] :: delete agent
|
||||||
|
[%doff dude=(unit dude) ship=(unit ship)] :: kill subscriptions
|
||||||
|
[%rake dude=(unit dude) all=?] :: reclaim old subs
|
||||||
$>(%init vane-task) :: set owner
|
$>(%init vane-task) :: set owner
|
||||||
$>(%trim vane-task) :: trim state
|
$>(%trim vane-task) :: trim state
|
||||||
$>(%vega vane-task) :: report upgrade
|
$>(%vega vane-task) :: report upgrade
|
||||||
$>(%plea vane-task) :: network request
|
$>(%plea vane-task) :: network request
|
||||||
|
[%spew veb=(list verb)] :: set verbosity
|
||||||
|
[%sift dudes=(list dude)] :: per agent
|
||||||
== ::
|
== ::
|
||||||
+$ bitt (map duct (pair ship path)) :: incoming subs
|
+$ bitt (map duct (pair ship path)) :: incoming subs
|
||||||
+$ boat :: outgoing subs
|
+$ boat (map [=wire =ship =term] [acked=? =path]) :: outgoing subs
|
||||||
%+ map [=wire =ship =term] ::
|
+$ boar (map [=wire =ship =term] nonce=@) :: and their nonces
|
||||||
[acked=? =path] ::
|
|
||||||
+$ bowl :: standard app state
|
+$ bowl :: standard app state
|
||||||
$: $: our=ship :: host
|
$: $: our=ship :: host
|
||||||
src=ship :: guest
|
src=ship :: guest
|
||||||
@ -1695,6 +1706,9 @@
|
|||||||
$% [%raw-fact =mark =noun]
|
$% [%raw-fact =mark =noun]
|
||||||
sign:agent
|
sign:agent
|
||||||
==
|
==
|
||||||
|
:: TODO: add more flags?
|
||||||
|
::
|
||||||
|
+$ verb ?(%odd)
|
||||||
::
|
::
|
||||||
:: +agent: app core
|
:: +agent: app core
|
||||||
::
|
::
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2178,7 +2178,7 @@
|
|||||||
:: XX cancel active too if =(0 trim-priority) ?
|
:: XX cancel active too if =(0 trim-priority) ?
|
||||||
::
|
::
|
||||||
?: ?=(%trim -.task)
|
?: ?=(%trim -.task)
|
||||||
=/ event-args [[eny duct now rof] server-state.ax]
|
=* event-args [[eny duct now rof] server-state.ax]
|
||||||
=* by-channel by-channel:(per-server-event event-args)
|
=* by-channel by-channel:(per-server-event event-args)
|
||||||
=* channel-state channel-state.server-state.ax
|
=* channel-state channel-state.server-state.ax
|
||||||
::
|
::
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -353,10 +353,14 @@
|
|||||||
!> [~[/g/talk] %give %boon [%post 'first1']]
|
!> [~[/g/talk] %give %boon [%post 'first1']]
|
||||||
!> (snag 0 `(list move:ames)`moves6)
|
!> (snag 0 `(list move:ames)`moves6)
|
||||||
==
|
==
|
||||||
|
:: +test-comet-message-flow: galaxy<->comet comms
|
||||||
|
::
|
||||||
|
:: same as test-message-flow, but ~nec will send a sendkeys packet to
|
||||||
|
:: request comet's self-attestation directly
|
||||||
::
|
::
|
||||||
++ test-comet-message-flow ^- tang
|
++ test-comet-message-flow ^- tang
|
||||||
:: same as test-message-flow, but ~nec will send a sendkeys packet to request
|
::=^ * nec (call nec ~[//nemo] %spew ~[%snd %rcv %odd %msg])
|
||||||
:: comet's self-attestation directly
|
::=^ * comet (call comet ~[//nemo] %spew ~[%snd %rcv %odd %msg])
|
||||||
::
|
::
|
||||||
=^ moves0 nec (call nec ~[/g/talk] %plea our-comet %g /talk [%get %post])
|
=^ moves0 nec (call nec ~[/g/talk] %plea our-comet %g /talk [%get %post])
|
||||||
=^ moves1 comet (call comet ~[//unix] %hear (snag-packet 0 moves0))
|
=^ moves1 comet (call comet ~[//unix] %hear (snag-packet 0 moves0))
|
||||||
@ -371,27 +375,34 @@
|
|||||||
:^ comet /public-keys ~[//unix]
|
:^ comet /public-keys ~[//unix]
|
||||||
^- sign:ames
|
^- sign:ames
|
||||||
[%jael %public-keys %full [n=[~nec point] ~ ~]]
|
[%jael %public-keys %full [n=[~nec point] ~ ~]]
|
||||||
:: give comet's self-attestation to ~nec; at this point, we have established
|
:: give comet's self-attestation to ~nec; at this point, we have
|
||||||
:: a channel, and can proceed as usual
|
:: established a channel, and can proceed as usual
|
||||||
::
|
::
|
||||||
|
=/ post [%post 'first1!!']
|
||||||
=^ moves3 nec (call nec ~[//unix] %hear (snag-packet 0 moves2))
|
=^ moves3 nec (call nec ~[//unix] %hear (snag-packet 0 moves2))
|
||||||
|
%+ weld
|
||||||
|
%- expect-fail |.
|
||||||
|
(call nec ~[//unix] %hear (snag-packet 1 moves2))
|
||||||
|
::
|
||||||
=^ moves4 comet (call comet ~[//unix] %hear (snag-packet 0 moves3))
|
=^ moves4 comet (call comet ~[//unix] %hear (snag-packet 0 moves3))
|
||||||
=^ moves5 comet (take comet /bone/~nec/0/1 ~[//unix] %g %done ~)
|
=^ moves5 comet (take comet /bone/~nec/1/1 ~[//unix] %g %done ~)
|
||||||
=^ moves6 nec (call nec ~[//unix] %hear (snag-packet 0 moves5))
|
=^ moves6 nec (call nec ~[//unix] %hear (snag-packet 0 moves5))
|
||||||
=^ moves7 comet (take comet /bone/~nec/0/1 ~[//unix] %g %boon [%post 'first1!!'])
|
=^ moves7 comet (take comet /bone/~nec/1/1 ~[//unix] %g %boon post)
|
||||||
=^ moves8 nec (call nec ~[//unix] %hear (snag-packet 0 moves7))
|
=^ moves8 nec (call nec ~[//unix] %hear (snag-packet 0 moves7))
|
||||||
::
|
::
|
||||||
;: weld
|
;: weld
|
||||||
%+ expect-eq
|
%+ expect-eq
|
||||||
!> [~[//unix] %pass /qos %d %flog %text "; ~nec is your neighbor"]
|
!> =- [~[//unix] %pass /qos %d %flog %text -]
|
||||||
|
"; ~nec is your neighbor"
|
||||||
!> (snag 0 `(list move:ames)`moves4)
|
!> (snag 0 `(list move:ames)`moves4)
|
||||||
::
|
::
|
||||||
%+ expect-eq
|
%+ expect-eq
|
||||||
!> [~[//unix] %pass /qos %d %flog %text "; {<our-comet>} is your neighbor"]
|
!> =- [~[//unix] %pass /qos %d %flog %text -]
|
||||||
|
"; {<our-comet>} is your neighbor"
|
||||||
!> (snag 0 `(list move:ames)`moves6)
|
!> (snag 0 `(list move:ames)`moves6)
|
||||||
::
|
::
|
||||||
%+ expect-eq
|
%+ expect-eq
|
||||||
!> [~[/g/talk] %give %boon [%post 'first1!!']]
|
!> [~[/g/talk] %give %boon post]
|
||||||
!> (snag 0 `(list move:ames)`moves8)
|
!> (snag 0 `(list move:ames)`moves8)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
::
|
::
|
||||||
++ rest
|
++ rest
|
||||||
|= p=@da
|
|= p=@da
|
||||||
(arvo %b %wait p)
|
(arvo %b %rest p)
|
||||||
::
|
::
|
||||||
++ warp
|
++ warp
|
||||||
|= [wer=ship =riff:clay]
|
|= [wer=ship =riff:clay]
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
%da s+(scot %da p.c)
|
%da s+(scot %da p.c)
|
||||||
%tas s+(scot %tas p.c)
|
%tas s+(scot %tas p.c)
|
||||||
%ud (numb p.c)
|
%ud (numb p.c)
|
||||||
|
%uv s+(scot %uv p.c)
|
||||||
==
|
==
|
||||||
++ foreign-desk
|
++ foreign-desk
|
||||||
|= [s=^ship =desk]
|
|= [s=^ship =desk]
|
||||||
|
Loading…
Reference in New Issue
Block a user