Commit Graph

376 Commits

Author SHA1 Message Date
Ted Blackman
6b836bb56d ames: fix no-op for messages on closing bones 2022-08-10 20:18:57 +03:00
Ted Blackman
20ccac22a2 ames: clean up closing bone check and printfs 2022-08-10 19:55:07 +03:00
Ted Blackman
0baad53fb4 ames: drop pleas on dead bones 2022-08-10 19:47:59 +03:00
Ted Blackman
ce9f692ecd ames: clean up %cork plea handling
+on-plea gets called in two very different ways:
1) handling request from local vane to send %plea to peer
2) handling %cork request from another ship, which our local ames has %pass'ed
   to ourselves

In the second case, we shouldn't print misleadingly, or bind a duct in the ossuary.
2022-08-10 00:47:38 +03:00
Ted Blackman
2dc7171dfa ames: no-op on acks on corked bones 2022-08-10 00:44:54 +03:00
Ted Blackman
da591a4078 ames: invert busted conditional in recork timer 2022-08-05 02:37:03 +03:00
Ted Blackman
56d4906a13 ames: try next recork on cork ack
Without this, a ship would send a cork on a max of one flow per
recork timer, which could take years to clear for some ships.
This starts a hot loop of trying the next cork once one gets
positively acked.
2022-08-05 01:35:34 +03:00
Ted Blackman
54cd1a5eca ames: simplify recork timer
The previous recork timer queued up %cork messages without sending them.
It also relied on making sure pump timers didn't get set for recork bones.
This was fragile.

The new design enqueues up to one new %cork message per ship during each
recork timer, based on the state of the flow.  If the flow is closing but
there are no outstanding messages in it, then it needs to be recorked.
Flows will be recorked in ascending numerical order by bone.
2022-08-05 01:13:21 +03:00
fang
9433d3354d
ames: unsent-fragments is a list, not a tree
Measure accordingly.
2022-08-03 21:03:49 +02:00
fang
7af527e605
ames: correctly measure queue size 2022-08-03 20:52:03 +02:00
fang
e6453bae3c
ames: more detailed "future msg" trace
This additional information may come in handy when debugging this crash
we shouldn't be seeing.
2022-08-03 20:46:54 +02:00
fang
e16c499724
ames: make recork timer faster
This will aid visibility and debugging. We'll probably want to make this
slower again later.
2022-08-03 20:33:04 +02:00
fang
7c01ee9b35
ames: account for corked flows during %stir
Also patches the behn scry in %stir handling to be correct for latest behn.
2022-08-03 19:37:53 +02:00
fang
b860bef066
ames: correctly avoid setting pump timer
The condition got butchered during refactor: instead of avoiding the creation
of pump timers during recork wake, it was setting them _exclusively_ during
recork wake.
2022-08-02 23:23:48 +02:00
Ted Blackman
e5e4c8602d ames: properly set recork flag in +on-wake 2022-08-02 23:15:43 +03:00
Ted Blackman
67efb2ad7c ames: don't start pump timers on recork 2022-08-02 23:03:34 +03:00
yosoyubik
a5aedaccc5 ames: delete naxplanation flows if bone is corked 2022-07-18 10:27:36 +02:00
yosoyubik
35c6ac416e ames: fix predicate for detecting %cork acks 2022-07-16 07:40:05 +02:00
yosoyubik
c599e60c5b ames: add recork set 2022-07-15 16:45:32 +02:00
yosoyubik
a3518ef4d6 ames: add trace for %cork plea 2022-07-13 09:17:42 +02:00
yosoyubik
34a7496720 ames: clean up nack flows after a cork 2022-07-08 07:29:04 +02:00
yosoyubik
ca1b586a46 ames: init cork timer on larval +take 2022-07-07 11:35:28 +02:00
yosoyubik
d4d443db13 ames: remove cork wire from state 2022-07-07 09:20:57 +02:00
yosoyubik
e366e55dbc ames: add global daily timer for pending corks
WIP compiles and upgrades, and the timer gets properly reset
but untested for actual re-subscriptions with old publishers
2022-07-06 17:00:35 +02:00
yosoyubik
76919ce07c ames: resend %cork after a naxplanation in one day 2022-07-06 10:52:19 +02:00
yosoyubik
ea4a31558f ames: ack last fragment from closing bone 2022-07-01 09:59:24 +02:00
fang
f2d6104e9c
ames: remove debug printfs
Accidentally included.
2022-06-30 20:38:32 +02:00
yosoyubik
a967b42c30 ames: print bone if "hear last in-progress" 2022-06-30 17:12:07 +02:00
fang
292a65f64c
Merge branch 'next/arvo' into yu/content-dist-merged
Includes patched versions of ames' and clay's +load arms.

In clay, we do a dumb ;; hack to get the state to adapt properly. This
shouldn't be needed ($case had an extra... case added to it, old ones
should still nest), and so we should revisit the logic there to make it
cleaner/better before release.
2022-06-30 16:27:02 +02:00
yosoyubik
b0766c2f53 ames: remove misleading trace printf 2022-06-30 10:46:02 +02:00
yosoyubik
27ac0b601e ames: use %$ as recipient vane for %corks 2022-06-30 10:18:37 +02:00
yosoyubik
17d52b8535 ames: handle bounce %cork from old publisher
Because the publisher will send the cork plea back to the subscriber on
the next bone, we are not able to know the bone for the original cork.
To handle it, we add the cork bone to the plea path

still wip: it keeps resending the cork plea faster than its ~h1 timer
2022-06-28 12:48:07 +02:00
yosoyubik
7de9c72f36 ames: add rift when inserting new peer state 2022-06-27 13:55:07 +02:00
yosoyubik
2e92331a0b Merge branch 'next/arvo' into yu/gall-rq-wire-ames-flow-kill 2022-06-16 08:54:24 +02:00
Ted Blackman
0190a477f5 ames: adjust comments 2022-06-15 15:35:41 -06:00
Ted Blackman
1380e83b55 ames: clog on 5 messages and 100kB 2022-06-15 15:28:34 -06:00
yosoyubik
d7544e9bde ames: fix parsing rift/life in ke-rcv 2022-06-06 15:50:02 +02:00
Ted Blackman
d2ea33ddfe
ames: condense message size calculation
Co-authored-by: fang <git@fang.io>
2022-06-05 08:49:47 -05:00
Ted Blackman
953273004a ames: clog at 100kB instead of 5 messages 2022-06-04 17:18:21 -05:00
Ted Blackman
4825f8968c lull,ames: renames, more packet verification
Regularized arm names to +etch-* and +sift-* to match Vere.  Renamed
$packet to $shot.  Used $meow, $purr, and $keen to match Vere's naming.
Reorganized packet decoding arms and moved some to Lull for later use in
Aqua.
2022-06-03 22:58:50 -05:00
Ted Blackman
3466f9854b ames: fix forwarding, use +send-blob in fine 2022-06-03 18:22:55 -05:00
Ted Blackman
32cc092704 ames: ;; scry result instead of \!< 2022-06-03 11:24:03 -05:00
Ted Blackman
0a3a793161 ames: don't forward to ourselves 2022-06-02 23:43:22 -05:00
Ted Blackman
44954dec7b ames: fix packet forwarding 2022-06-02 23:26:42 -05:00
Ted Blackman
d6428a9023 ames: cleaned up printing, signature bug appears fixed 2022-06-01 17:08:12 -05:00
fang
43dff9c279
ames: do not use old lanes during stateful forward
As 999f0e8, but for the stateful code path in +send-blob.
2022-06-01 21:47:15 +02:00
fang
999f0e84e9
ames: do not produce stale forward lanes
Stale lanes may cause forwarding loops. Imagine the following:
1) Planet A is live. Galaxy B, its indirect sponsor, learns of its route.
2) A goes offline. Another ship, C, is started in its place, at the same route.
3) B receives a packet for A, forwards it to the known route.
4) C received the packet, forwards it to B.
5) Repeat from 3.

Here, we update the forward lane(s) scry used by the runtime to not produce a
peer's lane if they haven't communicated with us in the last hour. Everyone's
supposed to ping their sponsorship chain every 30 seconds. If those aren't
going through, you shouldn't expect to be reachable anyway.

We may or may not want to update +send-blob to match.
2022-06-01 17:17:37 +02:00
Ted Blackman
6a13048cf1 ames: WIP modernized tests pass, still haven't found signature bug 2022-05-31 18:31:38 -05:00
Ted Blackman
930ce64343 ames: fix some meow and mug encoding issues; still signature problems 2022-05-28 20:23:37 -05:00
Ted Blackman
f159f38f16 ames: (debug build) fix yawn 2022-05-27 15:54:38 -05:00
Ted Blackman
062fbc71d7 ames: merge driver rework 2022-05-27 14:52:30 -05:00
Ted Blackman
aaffad63b0 ames: fix up packet encoding 2022-05-27 13:14:53 -05:00
Ted Blackman
a596322202 ames: remote scry works again 2022-05-27 10:35:03 -05:00
fang
984d2845a4
ames: correctly scry into jael for sponsors
+saxo:title uses .^, which doesn't work from kernelspace. We manually
call the scry function instead.

Also, we want the end of the list, not the head.
2022-05-27 13:06:26 +02:00
Ted Blackman
302d406a94 ames: WIP runs and ames works, but scrying kills ships 2022-05-26 21:23:09 -05:00
Ted Blackman
a1f202deb0 fine: refactor driver and arvo/vere interface 2022-05-25 17:30:35 -05:00
fang
830ee80325
ames: fall back to galaxy if no scry lane known
Will need to be updated alongside other routing logic eventually.
2022-05-25 20:58:14 +02:00
Philip Monk
5b773723b3 Merge remote-tracking branch 'origin/yu/ames-fixes' into next/arvo 2022-05-20 22:52:00 -07:00
Philip Monk
ac64f44538 clay: update tests 2022-05-20 20:03:34 -07:00
Philip Monk
f16abbd992 ames: fix comet communication with breached ship 2022-05-19 20:20:00 -07:00
fang
a0f7891f50
Merge branch 'philip/tomb' into lf/content-dist-rc
Beware, the ames conflict was particularly nasty. State migrations as of
yet untested.

Includes patched-up fine tests.
2022-05-19 17:07:35 +02:00
fang
e7f9686b1c
fine: re-enable scry permission check
Only expose fully public clay data over scry. Other vanes and permission
modes to follow at a later date.
2022-05-18 20:25:57 +02:00
yosoyubik
16920a894e Merge branch 'yu/ames-fixes' into yu/gall-rq-wire-ames-flow-kill 2022-05-18 17:37:24 +02:00
yosoyubik
c2576cdc46 ames: handle +call moves if re-evolving from larva 2022-05-18 17:36:40 +02:00
yosoyubik
fe412b1ca7 gall: remove $watches from egg/yoke
Also renames $beat to $boar so it signifies more its closeness to $boat
2022-05-18 15:27:17 +02:00
Philip Monk
7e4ad62a51 Merge remote-tracking branch 'origin/yu/ames-fixes' into philip/tomb 2022-05-17 14:07:05 -07:00
yosoyubik
4dae3ae3e2 ames: indent 2022-05-17 07:49:15 +02:00
yosoyubik
f81061fe40 Merge branch 'yu/ames-fixes' into yu/gall-cork-wip 2022-05-17 07:47:58 +02:00
yosoyubik
2553573be0 ames: start drainage timer if regressed from adult
This accounts for a possible race condition where ames expects a
response, but regresses into the larval state. Upon receiving the
$sign on +take, we would remain stuck as a larva. Now we check
that we have enough information to re-evolve and then start a
/larval timer to begin draining the queue.
2022-05-17 07:11:09 +02:00
fang
9e3bcf14c1
fine: more straightforwardly cancel keen timer
When +ke-abet-gone gets called, we're going to remove this keen
entirely. +ke-set-wake does a whole song-and-dance and may even set a
new timer. So instead, we simply call +ke-rest, if we have a known
outstanding timer.
2022-05-16 22:52:07 +02:00
Philip Monk
d25194c7a3 arvo: reduce priority of lifecycle printfs 2022-05-14 23:59:21 -07:00
Philip Monk
8a2eac7c70 Merge remote-tracking branch 'origin/ted/ames-prod-2' into philip/tomb 2022-05-14 21:17:10 -07:00
Philip Monk
2e31f87068 Merge branch 'pr' into philip/tomb 2022-05-14 20:59:01 -07:00
yosoyubik
350636fe2a ames: don't relay acks for naxplanations of %corks
This avoids closing a subscription prematurely, before the
server ames has had time to process the innitial %cork.
2022-05-14 10:52:45 +02:00
yosoyubik
76ddc359f5 ames: fixt 6-to-7 state update 2022-05-09 14:17:27 +02:00
yosoyubik
a2b771f704 Merge branch 'yu/ames-fixes' into yu/gall-cork-wip 2022-05-09 14:16:07 +02:00
yosoyubik
5d6b2d8997 ames: fix 4-to-5 state migration 2022-05-09 14:13:51 +02:00
yosoyubik
a278b63c66 ames: add tracing printf 2022-05-06 09:47:19 +02:00
yosoyubik
6318aa283b ames: retry sending a %cork if publisher is behind 2022-05-05 14:04:18 +02:00
yosoyubik
06883b617e ames: add new state version in +stay 2022-05-05 13:00:23 +02:00
fang
b42833a568
Merge branch 'm/scry-vane-next' into lf/content-dist-rc 2022-05-03 15:29:16 +02:00
yosoyubik
53e1c86833 Merge remote-tracking branch 'origin/yu/ames-fixes' into yu/gall-rq-wire-ames-flow-kill 2022-05-03 13:57:39 +02:00
yosoyubik
ec60399cdf ames: restore previous +decode-shut-packet 2022-05-03 12:49:10 +02:00
yosoyubik
3f7f4dbd5a gall: handle %kicks for nonexistent subscriptions 2022-05-03 12:49:10 +02:00
yosoyubik
a288d455c3 ames: remove %cork from |ack-meat 2022-05-03 12:49:10 +02:00
yosoyubik
8be9257164 ames: style indentation 2022-05-03 12:49:09 +02:00
yosoyubik
52ef6ba08e ames: handles decoding old-format shut-packets 2022-05-03 12:49:09 +02:00
h5gq3
c95cce4404 style fixes 2022-05-03 12:49:09 +02:00
h5gq3
5583fc1320 ames-flow-kill 2022-05-03 12:49:09 +02:00
yosoyubik
02806f63a1 ames: hardcode rift for comets in state upgrade 2022-04-27 06:24:55 +02:00
yosoyubik
9cb425e0ef ames: remove unused ames-to-ames %plea logic
This seems to have been used in the past for pinging the ship's
sponsor, but was later removed when the :ping app was introduced
2022-04-22 15:49:15 +02:00
yosoyubik
087f24e931 ames: use +trace to print logs 2022-04-22 12:29:16 +02:00
yosoyubik
e2f8e21529 ames: remove sigwut 2022-04-22 12:26:53 +02:00
yosoyubik
471b9be22d ames: fix emit of parsing old wire log 2022-04-22 12:26:24 +02:00
yosoyubik
91435a92ca ames: don't drop events with old wires
Previously we were dropping events that used old
wires that lacked a rift in them. This seems a
bad behavior because we don't want to destroy a
flow that has not been processed by both ends.

Note: pending a fix to test-old-ames-wire
2022-04-22 12:26:14 +02:00
yosoyubik
6cdebea1af ames: address review 2022-04-22 12:26:08 +02:00
yosoyubik
60cc44e961 ames: fix cached state in larval upgrade 2022-04-22 12:26:02 +02:00
yosoyubik
1b01455fe5 ames: fix dangling-bone error 2022-04-22 12:25:55 +02:00
fang
12ca0f45e5
ames: move various types and gates into lull
So that userspace may also en- and decode (scry) packets.
2022-04-20 00:09:00 +02:00
Liam Fitzgerald
4ae93c8bd0 ames: strip out notifications system 2022-04-15 16:42:33 -05:00
fang
af4de87ff2
Merge branch 'm/aqua-revival' into m/scry-vane-next 2022-04-07 12:59:14 +02:00
lukechampine
8399b7b96c ames: add resend timer for attestation requests 2022-04-04 00:19:55 -04:00
Liam Fitzgerald
92e52c9f7e ames: fix path handling in %bide 2022-03-15 10:40:34 -06:00
Liam Fitzgerald
0587e0e836 ames: add %pine task
%pine automatically scries for the latest case of a path
2022-03-14 15:04:14 -06:00
Liam Fitzgerald
49e53290a1 Merge remote-tracking branch 'origin/yu/dangling-bone' into lf/content-dist-rc 2022-03-11 11:07:51 -06:00
yosoyubik
5ecf87cf52 ames: fix cached state in larval upgrade 2022-03-11 10:22:50 +01:00
yosoyubik
ab116653e8 wip fix dangling bone 2022-03-11 10:21:12 +01:00
lukechampine
53a0c87cdb ames: add sendkeys-packet 2022-03-02 00:56:57 -05:00
lukechampine
df6318acd0 ames: fix comet self-attestation handling 2022-03-02 00:52:48 -05:00
lukechampine
1044d42a15 ames: don't enqueue blobs sent to unknown comets 2022-03-02 00:46:18 -05:00
Liam Fitzgerald
b4da246f01 strandio: add +keen gate 2022-02-24 12:03:07 -06:00
Liam Fitzgerald
f1c24c07dd ames: refactor to remove unused state 2022-02-23 16:00:56 -06:00
Liam Fitzgerald
c16aaae201 ames: correct behaviour for %yawn 2022-02-23 16:00:56 -06:00
Liam Fitzgerald
479e060e32 ames: add +load for remote scry 2022-02-23 16:00:56 -06:00
Liam Fitzgerald
5baa1b8318 ames: add fast retransmit 2022-02-23 16:00:55 -06:00
Liam Fitzgerald
4be4e9a7a0 ames: fix keen ducts 2022-02-23 16:00:55 -06:00
Liam Fitzgerald
5f5092168f ames: fix sig + data catenation 2022-02-23 16:00:55 -06:00
Liam Fitzgerald
22f3e49823 ames: add |yawn, fix duct wrangling 2022-02-23 16:00:31 -06:00
Liam Fitzgerald
6bd6029f57 ames: use finger trees for packet storage 2022-02-16 15:35:59 -06:00
Liam Fitzgerald
a36dc3aaff ames: per-lane congestion control 2022-02-15 08:47:38 -06:00
Ted Blackman
b2051fcc2b fine: WIP second list for performance 2022-02-14 10:34:26 -06:00
Liam Fitzgerald
e97d99275b ames: congestion control for remote scry 2022-02-11 19:30:40 -06:00
fang
a5b16b1673
fine: consolidate duplicate logic
Further merge cleanup.
2022-02-04 13:36:32 +01:00
fang
47feec3ecc
Merge branch 'lf/ames-notifs' into m/scry-vane 2022-02-03 22:00:24 +01:00
fang
a8574df401
ames: retrieve pk from old crypto core on load
Since we cannot scry the key out of jael during load, and the
alternative is defering this logic through the larval core in some way,
we simply include the type for the old acru interface, letting us reuse
the old core to initialize the new one.
2022-02-03 13:49:38 +01:00
fang
39959942d2
ames: use +safe:as:crub instead of +veri:ed
+safe now exists to wrap that, so we should use it instead of deriving
the relevant key and calling +veri:ed directly.
2022-02-02 22:16:16 +01:00
fang
5776226a6c
lull: add acru arms for simply signing & authing
Instead of exporting keys so that caller can do this themselves, we
expose arms for signing and authenticating that produce and operate on
just the signature, without mangling it into the message.
2022-02-02 21:52:48 +01:00
fang
83e315cccd
lull: add arms to ex:acru for separate keys
We may want _just_ the encryption key, or _just_ the signing key.
2022-02-02 20:10:30 +01:00
fang
1302c5fa0b
fine: fix broken +full:keys callsite
Straggler from last commit about data type consistency.
2022-02-02 19:55:20 +01:00
Liam Fitzgerald
9dad96332b ames: remove logging 2022-02-01 20:50:02 -06:00
Liam Fitzgerald
6ee2e1626f ames: unify path format 2022-02-01 20:48:04 -06:00
Liam Fitzgerald
1eaad36d4d ames: working notifications 2022-02-01 20:30:11 -06:00
Liam Fitzgerald
7205625abf wip 2022-02-01 13:25:28 -06:00
fang
c72c187edd
fine: use $@(~ (cask)) consistently
It's what ends up in the packet, probably better than passing units and
converting them all over.
2022-02-01 12:02:47 +01:00
fang
4bea69bc7d
fine: verify life & signatures of packets & msgs
In addition to doing signing & verification consistently with each
other, we now handle the "no data" case sanely.

Still uses the wrong keys though.
2022-02-01 11:55:04 +01:00
fang
b42dc477c5
fine: move into per-event core
This is an obviously more ergonomic factoring.
2022-01-28 23:54:01 +01:00
fang
fb72b7df7d
fine: set receiver life in request packet 2022-01-28 23:11:27 +01:00
fang
709dd75d74
fine: track pending requests for unknown peers 2022-01-28 23:09:50 +01:00
fang
769d10fdd4
fine: use keys from ames state instead of jael 2022-01-28 14:30:59 +01:00
fang
4c045a9c4f
ames, fine: minimal compilable unification 2022-01-27 14:32:49 +01:00
fang
dd4eb87f42
ames: move packet en/decoding into lull
By moving this behavior for packets with ames-style headers into lull,
other vanes that want to do protocols in similar style (like the upcoming
%fine vane) can reuse the logic here.

Note that we parameterize the main en- and decoding functions, so that
we may pass in the "is ames" flag and protocol versions as appropriate
to the context.
2022-01-20 01:59:43 +01:00
yosoyubik
3d943ec201 ames: ignore missing peer-state on-publ-sponsor 2022-01-18 20:34:32 +01:00
Ted Blackman
bbc80f9d45 zuse,ames: ^^sein:title 2021-09-25 16:52:53 -04:00
Ted Blackman
bce8dfd477 ames: pop the next packet, not the first packet again 2021-08-28 23:01:15 +03:00
Ted Blackman
e2fd0b61e4 ames: |ames-prod to reset congestion control 2021-08-28 22:48:23 +03:00
Philip Monk
e2e4d28548
Merge pull request #4788 from urbit/la/sys-fast-orm
zuse: add +all, +any, +got, +has, +run, and +tab to ++ordered-map, jet hints, and reorganize alphabetically
2021-05-18 10:24:31 -07:00
Ted Blackman
4c94c7edd4 ames: expire direct lanes faster after inactivity 2021-05-03 17:33:56 -04:00
Logan Allen
dd6eeccdae zuse: update names of +subset to +lot, +peek to +pry, remove unnecessary comments 2021-04-28 16:12:46 -05:00
Logan Allen
6b0dc98952 ames: reflect update of name +traverse -> +dip 2021-04-20 15:04:28 -05:00
Joe Bryan
19d5bd0de4 ames: gate "fragment crashed" printf on msg.veb 2021-03-18 17:04:08 -07:00