Commit Graph

1494 Commits

Author SHA1 Message Date
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
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