Commit Graph

1528 Commits

Author SHA1 Message Date
fang
a15111a35c
Merge branch 'next/arvo' into m/drum-sessions 2023-01-03 17:19:32 +01: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
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