Commit Graph

1799 Commits

Author SHA1 Message Date
dachus
318e001c28 trace removed from main core 2023-02-08 14:46:05 -05:00
dachus
e00e959100 trace moved into +per-server-event 2023-02-08 14:43:13 -05:00
dachus
69f7fc40c3 slog calls replaced with trace 2023-02-08 14:15:55 -05:00
dachus
c377008f62 fixed kick messages 2023-02-08 13:47:43 -05:00
dachus
54d655aeda all ~& replaced with trace calls 2023-02-08 13:44:09 -05:00
dachus
a03be0e6f9 verb added 2023-02-08 12:43:03 -05:00
jose
7de9c45c38
Merge pull request #6129 from urbit/yu/clean-flows
ames: add |close-flows
2023-02-08 16:50:16 +01:00
Josh Lehman
88e853cf69
Merge branch 'develop' into i/6236/clay-cult-inspection 2023-02-08 06:42:32 -08:00
ryjm
a5512fe9bc add bad desk name to all traces 2023-02-08 07:38:44 -05:00
Jake Miller
972588e573
add bad desk name to stack trace
Co-authored-by: fang <github@fang.io>
2023-02-08 07:11:50 -05:00
ryjm
62b6e8c8f8 clay: desk name sanity check
Ensures no desk with an illegal name can be created by sanity checking
in `%fuse`, `%park`, and `%merge`.
2023-02-07 21:24:33 -05:00
fang
c5aece980e
Merge pull request #6116 from urbit/fix-host-scry
eyre: fix %host scry so it says secure even if no domains configured
2023-02-07 16:28:47 +01:00
fang
92066f3a33
Merge branch 'develop' into m/http-auth-tokens 2023-02-06 19:44:01 +01:00
yosoyubik
46c27d33cd ames: fix check for stale resubscriptions 2023-02-06 16:48:32 +01:00
yosoyubik
fbb95b0d9f ames: check if we have a flow for a nax ack bone 2023-02-06 16:39:00 +01:00
yosoyubik
1522e4ab96 ames: don't scry dudes for every peer 2023-02-06 16:39:00 +01:00
yosoyubik
108e0cd023 ames: fix syntax error 2023-02-06 16:39:00 +01:00
yosoyubik
5f9d6b23d1 ames: improve logging in dry mode for on-kroc 2023-02-06 16:39:00 +01:00
yosoyubik
24140d5f12 ames: clarify forward/backward bones 2023-02-06 16:38:59 +01:00
yosoyubik
e32c18b677 ames: style fixes and comments 2023-02-06 16:38:59 +01:00
yosoyubik
1d8214530a ames: fix |close-flows generator 2023-02-06 16:38:50 +01:00
yosoyubik
1e04e9498e ames: clean all stale %watches in on-kroc
This removes the logic from cleaning up stale subscriptions in %gall,
leaving +ap-rake as it was, and moves it to the +on-kroc arm in %ames.

Failed subscriptions from nacking a %watch plea that were
not properly corked (fixed in https://github.com/urbit/urbit/pull/6102)
are a subset of the more general "stale re-subscription" issue, so
we take care of all stale flows at the same time, by focusing on the
current  subscription—leaving all others to be corked automatically—and
checking if it received a nack, to subsequently cork it.
2023-02-06 16:38:04 +01:00
yosoyubik
ad712caccf ames, gall: move |close-flows logic to vanes
This modifies the %rake task in %gall, to select what kind of
subscriptions we try to close:

=mode %o: kill old pre-nonce subscriptions
=mode %z: kill old pre-nonce subscriptions, including sub-nonce = 0
=mode %r: kills all stale resubscription flows

It also adds a dry-run option to both tasks (%kroc in ames, %rake in gall)
2023-02-06 16:36:32 +01:00
yosoyubik
872db0efcc ames, +close-flows: combine stale flows
This combines two types of flows that can be closed:

- nacking %watch pleas
- resubscriptions that were not properly corked
2023-02-06 16:36:31 +01:00
yosoyubik
7d4959db2e ames: don't send %kroc cards in |close-flows 2023-02-06 16:36:30 +01:00
yosoyubik
7c26716bab ames: remove stale comment 2023-02-06 16:36:29 +01:00
yosoyubik
05582d12c2 ames: refactor +on-krock 2023-02-06 16:36:28 +01:00
yosoyubik
3a7bd3a67f ames: add tool for removing failed %watch flows 2023-02-06 16:36:27 +01:00
Ted Blackman
2bae8127bf
Merge branch 'develop' into i/6236/clay-cult-inspection 2023-02-03 15:31:08 -06:00
Ted Blackman
09a0da4c84 clay: refuse %cs subs scry unless at now 2023-02-03 12:33:27 -06:00
bacwyls
4c2e5460bd
clay: revise /subs %cs scry again
return an empty set instead of crashing if desk doesn't exist
2023-02-03 11:46:54 -06:00
Josh Lehman
3ec1172c5b
Merge branch 'develop' into fix-host-scry 2023-02-03 07:50:27 -08:00
bacwyls
3c7ff0c1f2
Merge branch 'develop' into bwyl/clay-subs 2023-02-03 09:47:04 -06:00
bacwyls
f75e52b9ff clay: revise scry for subscribers to a desk
Address PR6136 comments to improve the interface to this scry.
Now it looks like .^((set ship) %cs /=landscape=/subs)
  instead of .^((set ship) %cs %/subs/landscape)
2023-02-02 17:20:21 -06:00
tadad
ae6187dd06
Merge branch 'develop' into da/flow-scry 2023-02-01 15:35:15 -06:00
Philip Monk
fa451613ec
Merge pull request #6246 from urbit/i/6245/is-ok
ames: put "is ok"/"not responding" behind |ames-verb
2023-02-01 14:07:38 -07:00
fang
faa16a1811
eyre: provide proper secure flag in %host scry 2023-01-27 14:37:56 +01:00
fang
eab40abcc9
Merge branch 'develop' into fix-host-scry 2023-01-27 11:54:28 +01:00
tadad
a5e0356fd6
Merge branch 'develop' into da/flow-scry 2023-01-26 17:10:11 -06:00
dachus
9e9fdeb2c6 flow scry added, moved to lull 2023-01-26 17:04:08 -06:00
Philip Monk
8609599035 ames: put "is ok"/"not responding" behind |ames-verb
Fixes #6245
2023-01-24 13:07:19 -07:00
fang
c61a9f8bd7
clay: update %prep task for pages instead of blobs 2023-01-23 21:10:28 +01:00
fang
f2d3a64d9c
clay: add /cs/===/bloc scry for all desk blobs
Lets you retrieve all blobs from the blob store that are in use by the
desk, both presently and in all its history.
2023-01-23 20:39:18 +01:00
fang
3fa5856f94
clay: add %prep task for priming the blob store 2023-01-23 20:36:34 +01:00
fang
b3b5400cec
boot: partial prop support
Doesn't yet support pre-userspace props, and the code might need to be
shuffled around a bit, but what's here works already.
2023-01-23 20:34:56 +01:00
fang
50cfdb0f2a
clay: allow scrying out of pending requests
Implements a /cx/[our]//[now]/cult/[desk] endpoint, for getting a set of
pending requests for any given desk. We don't give the $cult for the
desk as-is, but instead slim the $roves back down into $raves, remove
clay protocol version metadata, and make sure to put our @p in place of
empty "for" fields.
2023-01-22 21:42:57 +01:00
Philip Monk
9d56637916 clay: Drop foreign %wris responses
This flow is not supported, and it was causing issues releasing
416.  This change just drops the responses to avoid crashing, but at
some point we should either support this flow or reject the request in
the first place.
2023-01-18 17:28:51 -07:00
Philip Monk
8a013d147d Merge remote-tracking branch 'origin/master' into next/arvo 2023-01-18 16:13:44 -07:00
Philip Monk
77616520c3 ames: add logging for snubbing 2023-01-17 15:16:35 -07:00
Philip Monk
ecdd16dcf3 Merge remote-tracking branch 'origin/next/arvo' into lf/ames-snub 2023-01-17 15:06:11 -07:00
fang
0556e30e08
dill: clean up old-style userspace subscriptions
As of version %5, dill uses a new wire format for its userspace
subscriptions. Its existing subscriptions (read: the one subscription
into %hood for the default session) was never updated to use this new
style.

We observed a bug on one ship, where it had both old-style and new-style
subscriptions into hood, resulting in output being rendered twice. How
exactly this happened remains as of yet unclear.

Here, we forcefully clean up the old-style subscription, and
(re)establish the equivalent new-style subscription. This will prevent
issues like this from reoccurring.
2023-01-17 19:07:57 +01:00
fang
b78902c30e
Merge branch 'next/dill' into next/arvo 2023-01-10 20:22:29 +01:00
fang
db3fcdf4d5
Merge branch 'next/arvo' into fix-host-scry 2023-01-05 13:35:22 +01:00
fang
a15111a35c
Merge branch 'next/arvo' into m/drum-sessions 2023-01-03 17:19:32 +01:00
Zach Alberico
34e8ff7616
Merge branch 'next/arvo' into ted/ames-clog-less 2022-12-15 19:17:45 -08:00
Zach Alberico
a2173f1eb3
Merge branch 'next/arvo' into lf/ames-snub 2022-12-15 17:40:04 -08:00
Liam Fitzgerald
14baf6f3d6 ames: add %snub functionality
Adds .snub to ames-state, a global blocklist for ships. If a packet is
received from a ship that is in the .snub set, it is immediately
dropped. Adds %snub to ames' $task, to allow manipulating this list
2022-12-15 13:37:14 -06:00
fang
94dd77bb0e
jael: also send %ruin breaches to catch-all subs
Previously, fake breaches triggered by a %ruin task would only get sent to
subscribers watching for the affected ship specifically. Now, we send them to
both those subscribers, and the ones watching for pubkey changes on all ships.
2022-12-13 23:52:10 +01:00
bacwyls
94519cbfbf clay: add scry for subscribers of a desk
This data is valuable for app developers and %base OTA providers
2022-12-07 17:16:11 -06:00
Tinnus Napbus
3f60cd9f90 eyre: fix %host scry so it still says secure if localhost 2022-12-01 14:17:23 +13:00
Philip Monk
c23fec3e70 Merge remote-tracking branch 'origin/next/417' into next/arvo 2022-11-28 18:32:05 -07:00
Philip Monk
4e95a45dab clay: don't clear ford cache on %trim
Most of the memory stays in gall anyway, and this means you need to
recompile everything the next time anything changes, which could be
counterproductive.  It's important that %trim not make things worse.

The functionality is moved to the debug %stir task.
2022-11-28 16:17:41 -07:00
Philip Monk
cb0bbf1e32 clay: don't eagerly build marks
Building the marks adds 50% to the memory requirements for reloading
clay on ~wicdev, from 320MB to 470MB.  This isn't worth it for now.
2022-11-28 16:11:34 -07:00
Philip Monk
38a26041c2 clay: don't add road transitions in clay
These were originally added because they reduced memory usage, primarily
by clearing the memoization cache.  Now that the memoization cache is
no longer used, we use less memory without them.  On ~wicdev-wisryt with
~30 apps, updating Clay now takes ~320MB.
2022-11-28 16:08:41 -07:00
Ted Blackman
35194a6a08
Merge pull request #6102 from urbit/yu/kill-nack-flows
ames, gall: send a %cork if getting a %nack for a %watch
2022-11-28 11:57:07 -06:00
Ted Blackman
da4046a859
Merge pull request #6076 from urbit/yu/remove-num-live
ames: remove num-live from pump-metrics
2022-11-28 11:50:01 -06:00
yosoyubik
a7eee8ae6b Merge branch 'next/arvo' into yu/kill-nack-flows 2022-11-28 17:22:15 +01:00
yosoyubik
403b3eef82 ames, gall: address feedback 2022-11-28 17:21:41 +01:00
fang
3ef5260efc
Merge branch 'next/arvo' into pkova/ruin-comets 2022-11-25 12:20:46 +01:00
Ted Blackman
fc32dde010
Merge pull request #6059 from urbit/ames-verb-fixes
ames: debug print msg formatting fixes
2022-11-23 17:23:16 -06:00
Philip Monk
c4eb399839
Merge pull request #6094 from urbit/m/jael-broader-subs
jael: send updates to all "general" pubkey subs
2022-11-22 17:27:25 -07:00
Philip Monk
15c5447a05 Merge branch 'philip/agent-clay' into next/arvo 2022-11-22 17:24:15 -07:00
fang
95e7b8598e
jael: send updates to all "general" pubkey subs
Subscribing with `[%public-keys ~]` should give updates for all ships we know
about, including moons.
2022-11-22 23:11:39 +01:00
Philip Monk
280c1cb19a clay: crash if conflicting agent names 2022-11-21 11:05:55 -07:00
yosoyubik
430233a3de ames, gall: cork flow if getting %nack for %watch 2022-11-21 14:23:19 +01:00
Philip Monk
a600ca0663 clay: don't re-commit %base during kelvin upgrade 2022-11-20 22:06:29 -07:00
Philip Monk
d5ecc3c053 lull: bump to 328 2022-11-20 20:58:39 -07:00
Philip Monk
8376a759ae clay: make compile 2022-11-20 18:41:00 -07:00
Philip Monk
45b5257c04 clay: document [tare] invariant 2022-11-17 19:32:40 -07:00
Philip Monk
8255dcd4bd clay: document [goad] invariant 2022-11-17 17:45:19 -07:00
Philip Monk
54c2b652e5 clay: document [wick] invariant 2022-11-17 17:30:06 -07:00
Philip Monk
3ec3516ccb clay: document [ergo] invariant 2022-11-17 17:19:02 -07:00
Philip Monk
df130fc015 clay: document [wake] invariant 2022-11-17 16:47:56 -07:00
yosoyubik
012c1e19bf ames: don't use num-live from pump-metrics 2022-11-17 08:38:50 -08:00
yosoyubik
8bb969c2ec Revert "ames: remove num-live from pump-metrics"
This reverts commit b2a0f2fd304f961e4db89499aedefe0be95e6239.
2022-11-17 08:38:50 -08:00
yosoyubik
a3e8607cb1 ames: remove num-live from pump-metrics 2022-11-17 08:38:50 -08:00
yosoyubik
4b0c1fab3b ames: count in flight packets in packet pump
num-live is still used—the state update will be addressed later, as well as the update in %lull
2022-11-17 08:38:50 -08:00
fang
2027907db5
Merge branch 'master' into next/arvo 2022-11-16 16:11:53 +01:00
Philip Monk
57be9e28bc clay: light cleanup 2022-11-14 16:12:20 -07:00
Philip Monk
c382eb14f9 clay: call +tare when tire might have changed 2022-11-14 14:59:44 -07:00
yosoyubik
3b5110ed1d ames: enqueue %cork in alien-agenda 2022-11-09 16:05:45 +01:00
Tinnus Napbus
d3c2c734e3 ames: debug print msg formatting fixes
- fix `fragment-num` and `num-fragments` having duplicate faces
- fix faces being wrapped around wrong things in various places
- fix `bone` not being printed in "hear last in-progess" message
- make pretty tape interpolation style more uniform
2022-11-07 21:46:15 +13:00
Liam Fitzgerald
26aac7581a ames: prevent crashes when corking an alien flow
The +on-cork handler asserts that the peer is known to us. This is the
incorrect behaviour, because it will crash when corking a flow to a peer
that is still an %alien. This can happen, for instance, when making a
gall subscription for the first time and then corking it before the
alien naturalises.
2022-11-01 15:50:10 +10:00
Philip Monk
ebf09bd248 clay: defer all calls to %wick 2022-10-26 22:09:53 -07:00
Philip Monk
301158c40a clay: use single-weft wafts when possible 2022-10-23 14:52:32 -07:00
Philip Monk
4490e98470 clay: move goads into wick 2022-10-17 21:16:54 -07:00
Philip Monk
5f5878cf6f clay: add %stay, which removes commit-in-waiting 2022-10-17 20:20:22 -07:00
pkova
708c95b6b2 ames: correct %ruin comet logic 2022-10-17 23:05:49 +03:00
Philip Monk
8ba63236d8 Merge remote-tracking branch 'origin/jb/gall-mass' into philip/agent-clay 2022-10-13 22:17:24 -07:00
Philip Monk
846dda88b4 Merge remote-tracking branch 'origin/m/ames-no-stale-forwards' into philip/agent-clay 2022-10-13 21:42:58 -07:00
Philip Monk
4f5600df15 clay: don't cast in +stay 2022-10-13 21:42:36 -07:00
Philip Monk
fc70193ef6 Merge remote-tracking branch 'origin/next/arvo' into philip/agent-clay 2022-10-13 20:54:00 -07:00
Philip Monk
de76b70286 Merge remote-tracking branch 'origin/tinnus/eyre-https-redirect' into philip/agent-clay 2022-10-13 20:52:10 -07:00
Philip Monk
478da3b77b clay: support ranges in sys.kelvin 2022-10-13 20:36:33 -07:00
Philip Monk
ca8249a0be clay: rename %next -> %held 2022-10-13 19:27:50 -07:00
Philip Monk
79f520c56c Merge remote-tracking branch 'origin/master' into philip/agent-clay 2022-10-13 18:42:19 -07:00
Philip Monk
f01f046af3 clay: add verbose output to goad 2022-10-08 22:50:44 -07:00
Philip Monk
2829f5b354 clay: allow old kelvins on best-effort basis
also add back |bump, with no arguments
2022-10-04 23:57:37 -07:00
pkova
3d8772bde4 jael: remove TODO, fix comment 2022-10-03 17:27:52 +03:00
pkova
1d73558163 ames: ruin comets not seen for six months 2022-10-03 17:03:49 +03:00
Tinnus Napbus
cd6432aa86 Merge remote-tracking branch 'origin/tinnus/eyre-https-redirect' into tinnus/eyre-https-redirect 2022-10-01 22:35:24 +13:00
Tinnus Napbus
0fad85b3d0 eyre: change (cury cat 3) to rap in https redirect 2022-10-01 22:31:59 +13:00
tinnus-napbus
e481aded3c
Update pkg/arvo/sys/vane/eyre.hoon
Co-authored-by: fang <git@fang.io>
2022-09-29 13:32:32 +13:00
tinnus-napbus
66f543289d
Update pkg/arvo/sys/vane/eyre.hoon
Co-authored-by: fang <git@fang.io>
2022-09-29 13:32:18 +13:00
tinnus-napbus
387b48bed6
Update pkg/arvo/sys/vane/eyre.hoon
Co-authored-by: fang <git@fang.io>
2022-09-29 13:32:07 +13:00
tinnus-napbus
c0e2974678
Update pkg/arvo/sys/vane/eyre.hoon
Co-authored-by: fang <git@fang.io>
2022-09-29 13:31:47 +13:00
Tinnus Napbus
ac1dac0c6c eyre: simplify auto-https logic 2022-09-24 21:52:34 +12:00
Joe Bryan
9df08c5e72 ames: ignore pki nponsorship loss 2022-09-22 10:38:39 -04:00
fang
bdf9f9d044
Merge pull request #5929 from urbit/jon/remove-dork
clay: remove $dork
2022-09-15 22:23:56 +02:00
fang
16f78af00a
Merge pull request #5982 from urbit/m/eyre-head-down
eyre: look for lowercase last-event-id header
2022-09-15 22:22:32 +02:00
Edward Amsden
105710d54e
clay: remove stack tracing 2022-09-14 19:28:17 -05:00
Edward Amsden
4f8c851ef7
Don't print a stack trace for read-at-aeon-fail
We shouldn't get a clay stack trace for read-at-aeon-fail because that gives us miles of clay stack trace whenever hoon compilation fails
2022-09-14 19:26:21 -05:00
Philip Monk
77319d20c4 clay: fix kelvin upgrade issues 2022-09-14 01:04:13 -08:00
Philip Monk
c3f5fe923a docket: update to use tire instead of kiln 2022-09-13 16:14:43 -08:00
Philip Monk
c46fb686ff kiln: remove resolve XX's 2022-09-12 20:51:39 -08:00
Philip Monk
1102288d75 kiln: remove old |sync, various fixes 2022-09-06 22:52:59 -08:00
fang
108c6253d3
Merge branch 'philip/nuke' into next/arvo 2022-09-06 22:25:19 +02:00
fang
f46d8dd557
Merge pull request #5974 from urbit/m/recork-slower
ames: bump recork timer back up to a day
2022-09-06 22:18:14 +02:00
fang
7a4034f48a
Merge pull request #5977 from urbit/m/cork-undone
ames, gall: no %done on corks
2022-09-06 22:17:34 +02:00
fang
9c931f844b
Merge pull request #5976 from urbit/m/ames-restir
ames: clean & re-set recork timer during %stir
2022-09-06 22:17:18 +02:00
fang
36dd2f8ace
Merge branch 'next/arvo' into m/recork-slower 2022-09-06 22:16:41 +02:00
fang
fec3c45d30
Merge pull request #5971 from urbit/jb/recork-error
ames: handle failed recork timers
2022-09-06 22:15:12 +02:00
Tinnus Napbus
27349c51ab eyre: add auto-https redirects
if a cert is configured and a secure port is live it will set the
redirect flag in http-config.state.

When it gets a ++request it will return a 301 redirect to
https://[host]/[path] if:

  1. not already secure
  2. redirect flag set
  3. secure port live
  4. is not requesting /.well-known/acme-challenge/...
  5. the host is in domains.state

It will not happen if forwarded-secured, localhost, local loopback, ip
addresses or domains not in domains.state.

in ++load it checks the secure port is live and a cert is set and
enables it if so (for people who already use in-urbit letencrypt)

%rule %cert tasks also toggle it (only turning it on if secure port
live)

%live tasks also toggle it (only turning it on if cert set)

Have tested with a couple of ships and seems to work fine.

This is useful in combination with pyry's auto arvo.network dns config
system - can finally get rid of reverse proxies entirely.
2022-09-04 02:58:09 +12:00
Philip Monk
8884e7dfbc kiln: make compile 2022-09-02 16:51:39 -08:00
Philip Monk
093f0ae9de Merge branch 'philip/inline-thread' into philip/agent-clay-wip 2022-09-01 19:03:17 -08:00
fang
53cc33b291
eyre: look for lowercase last-event-id header
Eyre always gets passed request headers in lowercase, so we should search for
the lowercased version of the header.

Arguably `+get-header` should lowercase keys before comparing them, but that's
a more serious behavioral change.
2022-08-30 16:44:11 +02:00
Philip Monk
e3a8cab943 khan: support inline threads
This allows you to pass a thread directly into khan, instead of passing
a filename.  This has several implications:

- The friction for using threads from an app is significantly lower.
  Consider:

    =/  shed
      =/  m  (strand ,vase)
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('there'))
      (pure:m !>('product'))
    [%pass /wire %arvo %k %lard %base shed]

- These threads close over their subject, so you don't need to parse
  arguments out from a vase -- you can just refer to them.  The produced
  value must still be a vase.

    ++  hi-ship
      |=  [=ship msg1=@t msg2=@t]
      =/  shed
        =/  m  (strand ,vase)
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg1))
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg2))
        (pure:m !>('product'))
      [%pass /wire %arvo %k %lard %base shed]

- Inline threads can be added to the dojo, though this PR does not add
  any sugar for this.

    =strandio -build-file %/lib/strandio/hoon
    =sh |=  message=@t
        =/  m  (strand:rand ,vase)
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>(message))
        (pure:m !>('product'))
    |pass [%k %lard %base (sh 'the message')]

Implementation notes:
- Review the commits separately: the first is small and implements the
  real feature.  The second moves the strand types into lull so khan can
  refer to them.

- In lull, I wanted to put +rand inside +khan, but this fails to that
  issue that puts the compiler in a loop.  +rand depends on +gall, which
  depends on +sign-arvo, which depends on +khan.  If +rand is in +khan,
  this spins the compiler.  The usual solution is to either move
  everything into the same battery (very ugly here) or break the
  recursion (which we do here).
2022-08-29 21:04:50 -08:00
Philip Monk
fa569cf7f3 kiln: wip 2022-08-29 10:53:36 -08:00
Philip Monk
9a4d754429 clay: add +tire subscription for app state 2022-08-25 19:13:51 -08:00
Philip Monk
1ce53d06ba gall: don't add duplicate nonce in +ap-nuke
This gets added in +ap-handle-peers.  This caused outgoing subscriptions
to not get cleaned up properly.

Issue introduced in c2d77a5d.
2022-08-25 13:29:51 -08:00
fang
ab75e83398
gall: don't enqueue %cork as outstanding
Ames will no longer send acks. Consider it completed immediately, and
clean up the outstanding queue whenever it's empty.
2022-08-25 18:14:40 +02:00
fang
0e5b3b4107
ames: don't give %done on cork
Locally, %cork is guaranteed to succeed instantly. The requesting vane
doesn't need an ack to safely consider the flow "closed".
2022-08-25 18:13:29 +02:00
fang
81462da7aa
ames: clean & re-set recork timer during %stir
Pre-release ships may have multiple recork timers. This ensures that,
after stir, we always have exactly one.
2022-08-25 14:42:16 +02:00
fang
0871c24e24
ames: bump recork timer back up to a day
We had lowered this initially for easier testing, but a day should be
sufficient for real-world use.
2022-08-25 14:11:45 +02:00
fang
b2422030f7
ames: correctly identify stale routes 2022-08-25 13:41:55 +02:00
fang
9c3c2b13c7
eyre: send valid auth tokens to the runtime
Whenever a session gets created or removed, send the set of valid auth
tokens to the runtime, so that it may use them in determining whether
incoming requests are authenticated or not.
2022-08-24 00:34:08 +02:00
Philip Monk
ed3b028d9a Merge remote-tracking branch 'origin/master' into philip/snap 2022-08-23 14:16:57 -08:00
Joe Bryan
76cc8939d3 ames: fix error slog on failed attestation timer 2022-08-23 14:34:08 -04:00
Joe Bryan
5b8f26558e ames: handle failed recork timers 2022-08-23 14:33:53 -04:00
Joe Bryan
679b38138d ames: prevent larval stage from possibly clobbering adult state 2022-08-23 10:37:01 -04:00
Ted Blackman
5a96f3bdbe ames: drop %hear as larva; check duct before metamorpohse 2022-08-23 16:45:17 +03:00
Ted Blackman
07601c6bee ames: metamorphose on first +take if possible 2022-08-23 16:09:35 +03:00
Ted Blackman
9abe49489d ames: +on-stir clean up comments 2022-08-23 13:31:10 +03:00
Joe Bryan
9439841ce8 ames: refactor %stir, %rest stale/wrong timers 2022-08-22 20:14:02 -04:00
fang
a04d564269
Merge pull request #5963 from urbit/m/ames-eager-molt
ames: ensure larva initializes adult's state
2022-08-20 00:35:50 +02:00
fang
3a7938f057
ames: say "metamorphosis" in all relevant cases 2022-08-20 00:05:20 +02:00
fang
53b0e7ecaa
ames: ensure larva initializes adult's state
Previously, when the larva got to processing enqueued events, it was
doing so without loading state into the adult beforehand, resulting in
incorrect processing of events.

Here, we make the larva call +molt more eagerly, ensuring that the adult
always has its state available when we use it.
2022-08-19 23:58:10 +02:00
Philip Monk
ca0a00cb3c Merge remote-tracking branch 'origin/master' into philip/snap 2022-08-19 12:37:25 -08:00
fang
8108595b2b
gall: don't inject potentially-fake acks
We shouldn't be hitting this case anymore. Injecting events into agents
which they might not expect, and might not even be real, is bad.
2022-08-19 21:39:44 +02:00
fang
59f0556e3b
Merge pull request #5958 from urbit/ted/rake
gall: %rake task to clean up dead %leave's
2022-08-19 21:29:08 +02:00
fang
a79f2f27e5
Merge pull request #5961 from urbit/m/ames-stir-thoroughly
ames: don't skip closing flows in +on-stir
2022-08-19 21:22:49 +02:00
fang
a9a8619daa
Merge pull request #5947 from urbit/ted/staying-alive-rebase
gall: revive %hood and %dojo on keypress
2022-08-19 21:22:28 +02:00
fang
ce2e433a8a
ames: don't skip closing flows in +on-stir
Yes, there is a global timer for closing flows, but all that does is
enqueue a cork message. +on-stir needs to set _pump_ timers for all
flows that might still have messages to send, which includes closing
flows.
2022-08-19 20:26:08 +02:00
fang
cfa18b1f1f
gall: when kicked, register %cork as outstanding
When ames notifies us that our subscription has been kicked, we enqueue
a cork to clean up the flow. Unlike the %leave case, however, we were
not registering the cork in the queue of outstanding comms. We would
eventually get an ack, but not know what for, and erroneously inject
%poke-acks and %watch-acks.

Here we simply add a %cork entry to the queue before sending it.
2022-08-19 16:04:36 +02:00
fang
c8a163fedb
gall: clean up big wire construction 2022-08-18 22:46:58 +02:00
fang
a5335f5851
gall: improve match detection in +ap-rake
Making sure to stringify the nonce and including all the target details in the
wire, and excluding flows that are already closing.
2022-08-18 22:39:54 +02:00
Ted Blackman
d8df2787a0 gall: %rake task to clean up dead %leave's 2022-08-18 20:34:42 +03:00
Philip Monk
50c22343b6 clay: wip 2022-08-16 20:33:25 -08:00
fang
18019d6d83
gall: re-enable doff, only for old-style subs
This is sufficient to bring the normal (non-prerelease-bugged) cases
into the new world.

For the prerelease ships that ran a buggier version of the new gall
subscription logic, we note that the conditional may trigger for the
nonce=1 case where it had already triggered for their
(shouldn't-be-possible) nonce=0 case. This results in a %leave on a wire
that wasn't in use. This no-ops on the publisher side though, and the
flow gets corked right away, so this is considered harmless.
2022-08-16 23:02:59 +02:00
Ted Blackman
c972c0fbe2 gall: roundtrip through arvo to revive %hood and %dojo 2022-08-16 01:37:35 +03:00
Ted Blackman
95580f7e83 gall: revive %hood and %dojo on poke 2022-08-16 00:40:38 +03:00
Ted Blackman
a70c2ffe1a gall: now restarts %hood, but not %dojo yet 2022-08-16 00:40:38 +03:00
Ted Blackman
ac072729c2 gall: force load %hood and %dojo on poke 2022-08-16 00:40:38 +03:00
fang
81f18d13ad
gall: remove outdated fixme comment
This is part of the %doff work, which is getting integrated elsewhere.
2022-08-15 12:24:18 +02:00
Ted Blackman
1898483a45 gall: disable %doff for now 2022-08-12 00:55:19 +03:00
Ted Blackman
b1bab79f58 gall: add %f scry for sub-nonce's 2022-08-11 22:33:57 +03:00
fang
350f33d6ba
Merge branch 'next/arvo' into ted/doff-6 2022-08-11 21:06:30 +02:00
fang
5b4a964cdf
gall: fix the %doff conditional
No comment.
2022-08-11 19:48:27 +02:00
fang
06b7f52755
gall: print less during %doff 2022-08-11 17:04:44 +02:00
fang
cd0ea06ad4
gall: use a fully-formed wire when sending %cork
In response to clog notification from remote ames, we were sending a
%cork to clean up the flow. However, the wire we were using had the /sys
prefix already stripped off. Here, we put it back in.
2022-08-11 16:53:45 +02:00
fang
39cd895a55
gall: in +ap-doff, process oldest subs first
Start by killing subscription nonce 0, then work our way up instead of
down. We enhance the printf with a "total nonces" indicator so we can
still easily see the progress being made.
2022-08-10 22:51:38 +02:00
fang
2fe27bd8d7
gall: simplify +ap-doff filter conditional 2022-08-10 22:25:01 +02:00
fang
04b7b86cae
gall: support %doff-ing specific apps and/or ships
This gives us more control over exactly which subscriptions get culled,
which is useful in debugging and targetted recovery scenarios.
2022-08-10 20:33:07 +02:00
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
9e47490c95 gall: fix %doff handling
Previous +ap-doff kicked the agent repeatedly.  We needed to kick
it only once.  Now publisher agents clear their incoming subscription
state without the subscriber making lots of new subscriptions because
of repeated kicking.
2022-08-10 19:48:39 +03:00
Ted Blackman
0baad53fb4 ames: drop pleas on dead bones 2022-08-10 19:47:59 +03:00
Ted Blackman
ef09595788 gall: update comment 2022-08-10 19:13:32 +03:00
Ted Blackman
543efac183 gall: kill old subscriptions on %doff (still has bug)
Squashed commit of the following:

commit 1e31ab96c14e7506d5cb746d90153cb5658df6e0
Author: Ted Blackman <ted@tlon.io>
Date:   Wed Aug 10 19:08:39 2022 +0300

    ames: revert prints on bad memos

commit c47f9c6053c05da0177f0c64210a88161e8adc98
Author: Ted Blackman <ted@tlon.io>
Date:   Wed Aug 10 18:44:56 2022 +0300

    Merge fix to +ap-kill-down and use that pattern in +mo-doff.

    This doesn't seem to work properly, but I'm not sure why so far.

commit e696816b8d3ab81534de6c2910d0fd4bebcfb68a
Merge: 4edb247cd7 a5f08643ff
Author: Ted Blackman <ted@tlon.io>
Date:   Wed Aug 10 18:29:42 2022 +0300

    Merge branch 'next/arvo' into ted/doff-revival

commit 4edb247cd77ac988e5b11806d0d9b5e7cec4a39e
Author: Ted Blackman <ted@tlon.io>
Date:   Sat Aug 6 00:09:04 2022 +0300

    ames,gall: fix lopsided bitt/boar state from old doffs

commit b21ffd9cfab0987297f3ae4cd16447ed0c3a467e
Merge: 7d532afaf8 8eb8a1da29
Author: Ted Blackman <ted@tlon.io>
Date:   Fri Aug 5 17:53:15 2022 +0300

    Merge branch 'next/arvo' into ted/kill-subs

commit 7d532afaf80b773139b66d787c4a446e3d6a9a33
Author: Ted Blackman <ted@tlon.io>
Date:   Fri Aug 5 17:52:16 2022 +0300

    gall: add subscription nonce to %doff

commit f750de9aacdb19f796bff527e220df9c10e41e71
Merge: 38540658b5 aad5fa6fae
Author: Ted Blackman <ted@tlon.io>
Date:   Fri Aug 5 11:24:55 2022 +0300

    Merge branch 'next/arvo' into ted/kill-subs

commit 38540658b59d703b0fa162af4f958948b7ee2031
Author: fang <git@fang.io>
Date:   Thu Jul 28 21:10:57 2022 +0200

    gall: account for renaming of subscription state

commit c015dc8446fc02729ad492e24635c9c521f09965
Merge: 7c222e4c60 731e27d5a1
Author: Zach Alberico <git@zalberico.com>
Date:   Thu Jul 28 10:14:24 2022 -0700

    Merge branch 'next/arvo' into ted/kill-subs

commit 7c222e4c60d946042fd06d858086a883bf8a0f7b
Author: Ted Blackman <ted@tlon.io>
Date:   Thu Jul 28 14:01:00 2022 +0200

    hood: |doff generator

commit 8d00cf1bd1b304f30431614b68002827e498d97e
Author: Ted Blackman <ted@tlon.io>
Date:   Thu Jul 28 13:21:45 2022 +0200

    gall: fix compile errors

commit 6a1fd360ffc65d8c6f90e491bb21fa7799a98c31
Author: Ted Blackman <ted@tlon.io>
Date:   Thu Jul 28 13:01:16 2022 +0200

    gall: add %doff task to kill subscriptions
2022-08-10 19:09:47 +03:00
fang
a5f08643ff
Merge pull request #5932 from urbit/ted/ack-crash
ames: fix "ack crash"
2022-08-10 16:02:10 +02:00
fang
682dde904c
Merge pull request #5931 from urbit/m/gall-kill-down-accurately
gall: handle nonces in wires correctly
2022-08-10 00:04:10 +02: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
fang
db1e8d1b92
gall: explain reason for strange conditional 2022-08-09 21:36:08 +02:00
fang
52d8ef6a99
gall: initialize sub-nonce as 1 during upgrade
This matches the bunt of 1 for the new ship case. A nonce of 0 is
semantically mapped to old-style subscriptions.
2022-08-09 21:22:40 +02:00
fang
c2d77a5d47
gall: in/exclude the nonce from the wire as needed
+ap-nuke was not including the nonce, but should.
+ap-handle-peers was potentially including a zero nonce.

(The latter shouldn't have been possible, but there's a bug in +load
where sub-nonce.yoke gets initialized as 0 instead of 1.)
2022-08-09 21:21:10 +02:00
fang
0a3f542fcc
gall: refactor sub-wire-with-nonce construction
Into +ap-nonce-wire.
2022-08-09 21:20:24 +02:00
fang
1f30dccddf
gall: use correct wires in +ap-kill-down
For potentially-outgoing moves, we need to make sure the nonce is in the
wire so that it gets associated with the right instance of the
subscription.
2022-08-09 20:53:43 +02:00
fang
e396ddcdaa
gall: cork a subscription's ames flow on-kick
Gall tells ames to %cork flows for subscriptions it has closed.
Receiving a kick also closes a subscription, but gall wasn't issuing a
%cork in that case. We correct that here.

Inlines +mo-handle-ames-response's logic at its only callsite.
2022-08-08 22:21:34 +02:00
drbeefsupreme
2b7b3266ac clay: remove $dork
seems that this structure has been unused since
e75ab631a4 and confuses
newbies trying to figure out exactly what the commit
structure is (which is how I came across this)
2022-08-07 13:08:55 -04:00