Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release urbit-os-v2.138 #6507

Merged
merged 31 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9ae28a9
clay: %pass %drip with context, expect and handle errors in +take
joemfb Apr 4, 2023
b619471
behn: hurl errors on %drip %crud
joemfb Apr 4, 2023
66678ac
ames: ping faster to sponsors
belisarius222 Apr 5, 2023
056ff35
app/ping: lower timeout to ~s25
belisarius222 Apr 5, 2023
e300fa2
dill: exclude wrapped-task from most +call traces
Fang- Apr 6, 2023
0223cf9
Merge pull request #6452 from urbit/i/6444/lesser-dill-call-trace
belisarius222 Apr 6, 2023
eddbe86
ames: fix syntax error
belisarius222 Apr 6, 2023
d2eda08
Merge branch 'develop' into ted/ames-ping-2
joemfb Apr 6, 2023
b273f30
arvo: print module compilation times
belisarius222 Apr 7, 2023
59567b9
Merge pull request #6449 from urbit/ted/ames-ping-2
jalehman Apr 7, 2023
af3ad86
Merge pull request #6454 from urbit/ted/arvo-bout
jalehman Apr 7, 2023
cd161a5
+vats: fix crash on nonexistent desks
belisarius222 Apr 7, 2023
48a60d6
ames: reset timer for naxplanation on corked bones
yosoyubik Apr 9, 2023
4840b2a
ames: simplify reset timer
yosoyubik Apr 11, 2023
6b5a836
Merge pull request #6458 from urbit/ted/fix-vats
pkova Apr 11, 2023
365a1d5
Merge pull request #6447 from urbit/jb/drip-hurl
belisarius222 Apr 11, 2023
0f4be52
ted/test.hoon: repair vestigial select-by-prefix feature
dr-frmr Apr 11, 2023
4c2bc33
Merge branch 'develop' into i/6451/reset-naxplanations
yosoyubik Apr 12, 2023
fa40fd7
eyre: do not clear unacked events in +on-get-request
pkova Apr 12, 2023
898ed99
ames: no-op on naxplanation acks for corked bones
yosoyubik Apr 13, 2023
69a5c5e
ames: factor out is-corked logic into a gate
yosoyubik Apr 14, 2023
802cdb0
sss: fix memory leak on publisher
wicrum-wicrun Apr 14, 2023
4cf5193
Merge pull request #6461 from urbit/i/6451/reset-naxplanations
belisarius222 Apr 14, 2023
24f7f35
ames: properly migrate old %snub tasks
pkova Apr 14, 2023
1d1a81b
Merge pull request #6471 from urbit/pkova/fix-eyre-unacked
jalehman Apr 14, 2023
9ce37f0
Merge pull request #6483 from urbit/pkova/fix-ames-load
belisarius222 Apr 14, 2023
888bad3
Merge pull request #6487 from urbit/master
jalehman Apr 17, 2023
e0904c1
sss: add `+fork` and `+copy`
wicrum-wicrun Apr 18, 2023
5661bfe
Merge pull request #6467 from urbit/dr/clean-up-test-thread
belisarius222 Apr 19, 2023
281084a
Merge pull request #6481 from urbit/i/6469
belisarius222 Apr 20, 2023
d8ce64b
Merge pull request #6492 from urbit/i/6491
belisarius222 Apr 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions pkg/arvo/app/ping.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@
%- (slog leaf+"ping: strange state {<ship s>}" ~)
`state
:: NAT timeouts are often pretty short for UDP entries. 5
:: minutes is a common value. We use 30 seconds, which is fairly
:: aggressive, but should be safe.
:: minutes is a common value. We use 25 seconds, same as Wireguard.
::
=/ until (add ~s30 now)
=/ until (add ~s25 now)
=. ships.state
(~(put by ships.state) ship u.s(ship-state [%waiting until]))
:_ state
Expand Down
11 changes: 10 additions & 1 deletion pkg/arvo/sys/arvo.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@
::
~> %slog.[0 leaf+"1-c (compiling compiler, wait a few minutes)"]
=/ compiler-tool
~> %bout
.*([compiler-gate noun/hoon.log] [%9 2 %10 [6 %0 3] %0 2])
::
:: switch to the second-generation compiler. we want to be
Expand All @@ -781,7 +782,7 @@
:: generate last-generation spans for `!>`, etc.
::
~> %slog.[0 leaf+"1-d"]
=. compiler-gate .*(0 +.compiler-tool)
=. compiler-gate ~>(%bout .*(0 +.compiler-tool))
::
:: get the span (type) of the kernel core, which is the context
:: of the compiler gate. we just compiled the compiler,
Expand All @@ -791,17 +792,20 @@
::
~> %slog.[0 leaf+"1-e"]
=/ kernel-span
~> %bout
-:.*([compiler-gate -.compiler-tool '+>'] [%9 2 %10 [6 %0 3] %0 2])
::
:: compile the arvo source against the kernel core.
::
~> %slog.[0 leaf+"1-f"]
=/ kernel-tool
~> %bout
.*([compiler-gate kernel-span arvo.log] [%9 2 %10 [6 %0 3] %0 2])
::
:: create the arvo kernel, whose subject is the kernel core.
::
~> %slog.[0 leaf+"1-g"]
~> %bout
[.*(+>.compiler-gate +.kernel-tool) epic.log]
--
::
Expand Down Expand Up @@ -1046,6 +1050,7 @@
|= [cap=tape sub=vase pax=path txt=@t]
^- vase
~> %slog.[0 leaf/"{cap}: {(scow p+(mug txt))}"]
~> %bout
%- road |.
~_ leaf/"{cap}: build failed"
(slap sub (rain pax txt))
Expand Down Expand Up @@ -1623,6 +1628,7 @@
?~ hun
=/ gat
~> %slog.[0 'arvo: compiling next arvo']
~> %bout
%- road |.
(slap !>(..ride) (rain /sys/arvo/hoon van))
=/ lod
Expand All @@ -1640,6 +1646,7 @@
::
=/ raw
~> %slog.[0 'arvo: compiling hoon']
~> %bout
(road |.((ride %noun u.hun)))
:: activate the new compiler gate, producing +ride
::
Expand All @@ -1665,6 +1672,7 @@
[raw cop]
=/ hot
~> %slog.[0 leaf/"arvo: recompiling hoon %{(scow %ud nex)}"]
~> %bout
(road |.((slum cop [%noun u.hun])))
[hot .*(0 +.hot)]
:: extract the hoon core from the outer gate (+ride)
Expand All @@ -1680,6 +1688,7 @@
::
=/ rav
~> %slog.[0 'arvo: compiling next arvo']
~> %bout
(road |.((slum cop [hyp van])))
:: activate arvo and extract the arvo core from the outer gate
::
Expand Down
61 changes: 40 additions & 21 deletions pkg/arvo/sys/vane/ames.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@
%. &
(ev-trace &(dry odd.veb) ship |.((weld "stale %watch plea " log)))
:: the current subscription can be safely corked if there
:: is a flow with a naxplanation ack on a backward bone
:: is a flow with a naxplanation ack on a backward bone
::
=+ backward-bone=(mix 0b10 bone)
?. =(2 (mod backward-bone 4))
Expand Down Expand Up @@ -2352,6 +2352,13 @@
::
++ pump-core |=(=bone (mu bone *message-pump-state))
++ sink-core |=(=bone (mi bone *message-sink-state))
++ is-corked
|= =bone
?| (~(has in corked.peer-state) bone)
?& =(1 (end 0 bone))
=(1 (end 0 (rsh 0 bone)))
(~(has in corked.peer-state) (mix 0b10 bone))
== ==
::
+| %tasks
::
Expand Down Expand Up @@ -2399,10 +2406,9 @@
:_ tang.u.dud
leaf+"ames: {<her>} fragment crashed {<mote.u.dud>}"
abet:(call:abed:(sink-core bone) %hear lane shut-packet ?=(~ dud))
:: benign ack on corked bone
:: benign ack on corked bone (also for naxplanation acks)
::
?: (~(has in corked.peer-state) bone)
peer-core
?: (is-corked bone) peer-core
:: Just try again on error, printing trace
::
:: Note this implies that vanes should never crash on %done,
Expand Down Expand Up @@ -2503,10 +2509,10 @@
=(1 current:(~(got by snd.peer-state) bone))
==
(send-blob | her (attestation-packet [her her-life]:channel))
?: (~(has in corked.peer-state) bone)
:: if the bone was corked the flow doesn't exist anymore
:: TODO: clean up corked bones in the peer state when it's _safe_?
:: (e.g. if this bone is N blocks behind the next one)
?: (is-corked bone)
:: no-op if the bone (or, if a naxplanation, the reference bone)
:: was corked, because the flow doesn't exist anymore
:: TODO: clean up corked bones?
::
peer-core
:: maybe resend some timed out packets
Expand Down Expand Up @@ -2645,21 +2651,23 @@
::
++ handle-cork
|= =bone
^+ peer-core
|^ ^+ peer-core
?. (~(has in closing.peer-state) bone) peer-core
=/ =message-pump-state
=/ pump=message-pump-state
(~(gut by snd.peer-state) bone *message-pump-state)
=? peer-core ?=(^ next-wake.packet-pump-state.message-pump-state)
=* next-wake u.next-wake.packet-pump-state.message-pump-state
=/ =wire (make-pump-timer-wire her bone)
:: resetting timer for boons
=? event-core ?=(^ next-wake.packet-pump-state.pump)
:: reset-timer for boons
::
(pe-emit [/ames]~ %pass wire %b %rest next-wake)
(reset-timer her bone u.next-wake.packet-pump-state.pump)
=/ nax-bone=^bone (mix 0b10 bone)
=? peer-core (~(has by snd.peer-state) nax-bone)
%. peer-core
%+ pe-trace odd.veb
|.("remove naxplanation flow {<[her bone=nax-bone]>}")
=/ nax-pump=message-pump-state
(~(gut by snd.peer-state) nax-bone *message-pump-state)
=? event-core ?=(^ next-wake.packet-pump-state.nax-pump)
%- %^ ev-trace odd.veb her
|.("remove naxplanation flow {<[her bone=nax-bone]>}")
:: reset timer for naxplanations
::
(reset-timer her nax-bone u.next-wake.packet-pump-state.nax-pump)
=. peer-state
=, peer-state
%_ peer-state
Expand All @@ -2671,6 +2679,11 @@
closing (~(del in closing) bone)
==
peer-core
::
++ reset-timer
|= [=ship =^bone wake=@da]
(emit [/ames]~ %pass (make-pump-timer-wire ship bone) %b %rest wake)
--
::
+| %internals
:: +mu: constructor for |pump message sender core
Expand Down Expand Up @@ -3330,13 +3343,19 @@
++ num-slots
^- @ud
(sub-safe cwnd live-packets)
::
:: +clamp-rto: apply min and max to an .rto value
::
++ clamp-rto
|= rto=@dr
^+ rto
(min ~m2 (max ^~((div ~s1 5)) rto))
(min max-backoff (max ^~((div ~s1 5)) rto))
:: +max-backoff: calculate highest re-send interval
::
:: Keeps pinhole to sponsors open by inspecting the duct (hack).
::
++ max-backoff
^- @dr
?:(?=([[%gall %use %ping *] *] duct) ~s25 ~m2)
:: +in-slow-start: %.y iff we're in "slow-start" mode
::
++ in-slow-start
Expand Down
5 changes: 2 additions & 3 deletions pkg/arvo/sys/vane/behn.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,9 @@
[duct card]
=/ =tang
(weld u.error `tang`[leaf/"drip failed" ~])
:: XX should be
:: [duct %hurl fail/tang card]
:: XX we don't know the mote due to the %wake pattern
::
[duct %pass /drip-slog %d %flog %crud %drip-fail tang]
[duct %hurl fail/tang card]
::
+| %tasks
::
Expand Down
26 changes: 22 additions & 4 deletions pkg/arvo/sys/vane/clay.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@
`[[care.mood case.mood syd] path.mood cage]:[u.res syd=syd]
?~ ref
[%give %writ riot]
[%slip %b %drip !>([%writ riot])]
[%pass /drip %b %drip !>([%writ riot])]
::
++ case-to-date
|= =case
Expand Down Expand Up @@ -3781,7 +3781,7 @@
(~(run in moods) |=(m=mood [care.m path.m]))
=/ gift [%wris cas res]
?: ?=(^ ref)
[%slip %b %drip !>(gift)]
[%pass /drip %b %drip !>(gift)] :: XX s/b [%behn %wris ...] in $sign?
[%give gift]
?> ?=([* ~ ~] res)
:_ ~
Expand Down Expand Up @@ -5753,7 +5753,25 @@
|= [tea=wire hen=duct dud=(unit goof) hin=sign]
^+ [*(list move) ..^$]
?^ dud
~|(%clay-take-dud (mean tang.u.dud))
?+ tea
~|(%clay-take-dud (mean tang.u.dud))
::
[%drip ~]
%. [~ ..^$]
%- slog
^- tang
:* 'clay: drip fail'
[%rose [": " "" ""] 'bail' mote.u.dud ~]
tang.u.dud
==
==
::
:: pseudo %slip on %drip
::
?: ?=([%drip ~] tea)
?> ?=([?(%behn %clay) ?(%writ %wris) *] hin)
[[`move`[hen %give +.hin] ~] ..^$]
::
?: ?=([%lu %load *] tea)
?> ?=(%unto +<.hin)
?> ?=(%poke-ack -.p.hin)
Expand Down Expand Up @@ -5909,7 +5927,7 @@
~(tap in ducts)
=/ cancel-moves=(list move)
%+ turn cancel-ducts
|=(=duct [duct %slip %b %drip !>([%writ ~])])
|=(=duct [duct %pass /drip %b %drip !>([%writ ~])])
:: delete local state of foreign desk
::
=. hoy.ruf (~(del by hoy.ruf) who)
Expand Down
6 changes: 4 additions & 2 deletions pkg/arvo/sys/vane/dill.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@
wrapped-task=(hobo task)
==
^+ [*(list move) ..^$]
~| wrapped-task
=/ task=task ((harden task) wrapped-task)
=/ task=task
~| wrapped-task
((harden task) wrapped-task)
~| -.task
:: unwrap session tasks, default to session %$
::
=^ ses=@tas task
Expand Down
4 changes: 2 additions & 2 deletions pkg/arvo/sys/vane/eyre.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -1348,13 +1348,13 @@
::
=/ heartbeat-time=@da (add now ~s20)
=/ heartbeat (set-heartbeat-move channel-id heartbeat-time)
:: clear the event queue, record the duct for future output and
:: record the duct for future output and
:: record heartbeat-time for possible future cancel
::
=. session.channel-state.state
%+ ~(jab by session.channel-state.state) channel-id
|= =channel
channel(events ~, state [%| duct], heartbeat (some [heartbeat-time duct]))
channel(state [%| duct], heartbeat (some [heartbeat-time duct]))
::
[[heartbeat :(weld http-moves cancel-moves moves)] state]
:: +acknowledge-events: removes events before :last-event-id on :channel-id
Expand Down
19 changes: 4 additions & 15 deletions pkg/arvo/ted/test.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
&+[leaf+"OK {name}"]~
|+(flop `tang`[leaf+"FAILED {name}" p.run])
==
:: +filter-tests-by-prefix: TODO document
::
++ filter-tests-by-prefix
|= [prefix=path tests=(list test)]
^+ tests
=/ prefix-length=@ud (lent prefix)
(skim tests |=([p=path *] =(prefix (scag prefix-length p))))
:: +resolve-test-paths: add test names to file paths to form full identifiers
::
++ resolve-test-paths
Expand Down Expand Up @@ -130,15 +123,11 @@
gather-tests(fiz t.fiz, build-ok |)
~> %slog.0^leaf+"built {(spud s.beam.i.fiz)}"
=/ arms=(list test-arm) (get-test-arms u.cor)
::
:: XX this logic appears to be vestigial
::
:: if test path specified an arm prefix, filter arms to match
=? arms ?=(^ test.i.fiz)
|- ^+ arms
?~ arms ~|(no-test-arm+i.fiz !!)
?: =(name.i.arms u.test.i.fiz)
[i.arms]~
$(arms t.arms)
%+ skim arms
|= test-arm
=((end [3 (met 3 u.test.i.fiz)] name) u.test.i.fiz)
=. test-arms (~(put by test-arms) (snip s.beam.i.fiz) arms)
gather-tests(fiz t.fiz)
%- pure:m !> ^= ok
Expand Down
19 changes: 18 additions & 1 deletion pkg/base-dev/lib/sss.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,27 @@
%+ ~(put by pub) path
=/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
=. wav.tide (put:wav wav.tide next wave)
=. mem.tide (~(del by mem.tide) next)
=. mem.tide ~
?. =(next (add aeon.last waves.rul.tide)) buoy
buoy(tid (form tide))
::
++ fork :: Fork a pub into an empty path.
|= [from=paths to=paths]
^- pubs
:- %0
?< (~(has by pub) to)
(~(put by pub) to (~(got by pub) from))
::
++ copy :: Fork a sub into an empty path.
|= [sub=_(mk-subs lake *) from=[ship dude *] to=paths]
^- pubs
:- %0
?< (~(has by pub) to)
%+ ~(put by pub) to
%* . *$<(aeon buoy)
rok.tid (put:rok ~ [aeon rock]:(need (~(got by +:sub) from)))
==
::
++ perm :: Change permissions with gate.
|= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
^- pubs
Expand Down