Commit Graph

892 Commits

Author SHA1 Message Date
Ted Blackman
8cf4e4bb38 gall: retry if agent fails first build 2020-06-13 00:16:09 -04:00
Philip Monk
4e466214e3
arvo: compile hoon/arvo in separate roads
Adds +mure to run a trap in a separate road.  This should eventually be
just a hint.

Vega was running inside a mule, but since +load was called within vega,
the new kernel was all run within the same mule, so it didn't actually
get to reclaim the space after hoon compiled.

We verified this with printfs in u3m_fall.  On the test ship (from
mainnet) which had 800MB used, vega was taking interior free space from
950MB to 450 over the course of compiling hoon, then each vane would go
from about 450 to 350 and then back to 450 once it finished (which
proves they were correctly isolated).  With this change, after hoon
compiles the free space goes back up to 950MB.  This gives us a lot more
space to compile OTAs.

We had to slightly refactor the logic for doubly-recompiling hoon, since
+mure as written produces a ?(!! _trap), and you can't find faces in the
result of the trap.  We could bake mure, but that's rather awkward.  I
wonder if there's a way to fix this as a wet gate.
2020-06-12 20:51:23 -07:00
Fang
ed09418f7f
Merge pull request #3000 from urbit/m/eyre-login-redirect
eyre: don't lose redirect upon failing login
2020-06-12 21:32:57 +02:00
Fang
dcbdf28cd1
Merge branch 'master' into m/eyre-scries 2020-06-12 15:29:10 +02:00
Philip Monk
05f0e47f68
ames: fix larval +load for fusion 2020-06-11 22:55:08 -07:00
Philip Monk
e34a1a2e61
arvo: filter old-arvo effects for %veer 2020-06-11 22:54:19 -07:00
Philip Monk
a3e15cd64c
clay: send notifications on vega 2020-06-11 19:41:22 -07:00
Fang
4ab55893bc
eyre: slightly better error pages 2020-06-12 02:13:13 +02:00
Fang
3c168eddb4
gall: do mark conversion in +ap-peek
Attempt to convert the scry result to the mark that was asked for,
failing the scry (with ~) if the conversion fails.

Eyre's scry logic, then, can pass the requested mark directly into gall.
2020-06-12 02:11:08 +02:00
Fang
b870466977
eyre: only allow authenticated GET scry requests
Lacking any other permissioning mechanism, we must simply reject
unauthenticated HTTP-scry requests for now.
2020-06-12 00:57:25 +02:00
Ted Blackman
8c6fd1406f gall: clean up state adapter using +any-agent 2020-06-11 18:21:52 -04:00
Philip Monk
895542b93e
Merge remote-tracking branch 'origin/master' into release/next-sys 2020-06-11 13:14:59 -07:00
Ted Blackman
d87d246232 gall: +load runs, +molt still fails 2020-06-11 16:07:54 -04:00
Fang
d20877e414
eyre: support %gx scries
Exposes a scry endpoint. Any requests made to the /app/scry.mark url
under the endpoint will scry into %app using a %gx scry, at the
/scry/noun path, and attempt to convert the scry result into the %mark,
before converting that into the %mime mark, and sending that as an http
response.
2020-06-11 01:45:05 +02:00
Fang
f1fab71d59
eyre: find sub-path for binding
In addition to producing the action bound for a given request, now also
produces the subset of the request url that comes _after_ the path at
which the binding has been established.

Will allow some bindings to more easily dispatch off the relevant part
of the url.
2020-06-11 01:42:21 +02:00
Fang
a4785458d1
eyre: don't lose redirect upon failing login
If we failed the password check, the login page served to us would never
include any redirect details, even if they were there in the original request.

Now we simply (attempt to) parse out the redirect field a little earlier.
2020-06-10 20:37:12 +02:00
Ted Blackman
db21fad4dd gall: WIP load-lost 2020-06-10 04:16:25 -04:00
Ted Blackman
a2b1b16f60 Merge branch 'ford-fusion' into ota-ford-fusion 2020-06-09 21:34:16 -04:00
Fang
0a32bcda35
Merge branch 'release/next-sys' into ford-fusion 2020-06-09 20:10:28 +02:00
Fang
6e8822ffb5
clay: resurrect ':' for file-change notifications
Instead of printing '+' for both additions and modifications.
2020-06-08 23:24:23 +02:00
Philip Monk
6344a8441d
jael: always restart subscription to breached ship 2020-06-05 17:59:31 -07:00
Philip Monk
c68b0e817a
gall: properly handle empty outstanding ack queue
Fixes #2977
2020-06-05 17:05:22 -07:00
Fang
90ef268a32
Merge branch 'release/next-sys' into m/eyre-kill-channels 2020-06-05 22:25:18 +02:00
Liam Fitzgerald
976da56ced Merge branch 'origin/lf/get-eyre-redirect' into feat/spa 2020-06-05 11:11:37 +10:00
Philip Monk
80ead610ea
Merge remote-tracking branch 'origin/master' into release/next-sys 2020-06-04 17:52:42 -07:00
Liam Fitzgerald
3ff99b0d7f Merge branch 'origin/lf/get-eyre-redirect' into release/next-sys 2020-06-05 10:41:15 +10:00
Fang
b54dc7cd34
eyre, zuse: expire channels with their sessions
Associates channels with the authentication sessions that opened them,
and deletes the channel when its associated session expires.

Also updates the debug dashboard to display channel counts per session.
2020-06-05 00:22:39 +02:00
Fang
68491420d2
eyre: refactor %delete to reuse timeout logic
Turns +on-channel-timeout into +discard-channel, which cleans up the
entirety of the channel, based on its current state. This allows us to
simplify the %delete channel request into a simple function call.
2020-06-05 00:20:06 +02:00
Liam Fitzgerald
b553d57c29 eyre: 303 redirect on successful login
Changes the HTTP status code of the redirect that occurs upon a
successful login from 307 to 303. 307 preserves the method of the
original request, so the redirected request is a POST. With the new SPA,
this causes a 404 as app/file-server validates the method of the
request, something that did not happen in earlier versions of landscape.
303 instead changes the method to always produce a GET request.
2020-06-04 15:09:00 +10:00
Fang
a66cfc31da
eyre: fake duct for on-load logout binding
Empty duct is considered not good.
2020-06-03 14:29:13 +02:00
Fang
6e3284feac
eyre: use 303 to redirect to login post-logout
This ensures the client sends a GET request, which is more appropriate.
2020-06-03 14:28:30 +02:00
Ted Blackman
3834860410 clay: state adapter, still needs :goad 2020-06-03 03:00:45 -04:00
Philip Monk
8b78f04dd3
Merge remote-tracking branch 'origin/master' into ford-fusion 2020-06-02 21:50:20 -07:00
Fang
4d93349402
eyre: provide logout endpoint
Set up, by default, on /~/logout.

Sending a POST request to this expires the current session and redirects
to the login page. If the "all" key is set in the request body, expires
all open sessions.
2020-06-03 01:40:32 +02:00
Philip Monk
818d2231f6
ames: remove jumbo packets 2020-06-02 14:13:28 -07:00
Philip Monk
84b8a67e47
clay: handle reefs for non-home desks
We build a reef for each desk but use the compiler from our kernel.  At
some point we should use the compiler from the desk, but then we need to
validate any results we get from it.
2020-06-01 20:52:20 -07:00
Fang
574b05a88a
Merge pull request #2959 from urbit/m/eyre-cookies
eyre: augmented cookie handling
2020-06-01 22:11:57 +02:00
Ted Blackman
b191636276 clay: WIP reef building 2020-06-01 12:56:21 -04:00
Fang
750ff6e5e1
eyre: respect "forwarded" header from localhost
For request transparency, HTTP proxies may set the Forwarded header to
specify who the original requester is.

For requests from localhost only, we make Eyre respect the Forwarded
header, and adjust the handled ip address accordingly.

Note that we do not support X-Forwarded or other non-standard variants.
The header remains in the request, so server applications can handle
them as desired.

Fixes #2723.
2020-05-31 17:45:22 +02:00
Fang
a87000149d
zuse: add parsers for http header field values
Multi-value format as used by some headers.

Also updates pill with recent zuse changes.
2020-05-31 17:45:20 +02:00
Fang
b1daaec7bf
zuse: add parsers for ip addresses
Parses into +address:eyre.
2020-05-31 17:45:18 +02:00
Fang
63c26151a3
eyre: extend session duration on-use
When sending a response to an authenticated request, update the session
to last for +session-timeout again, and send an updated cookie to match.

Assuming the user makes an actual HTTP request at least once a week,
this will make sure they don't get logged out automatically. Simply
keeping a channel open, unfortunately, doesn't count.
2020-05-30 02:29:20 +02:00
Fang
a51d93326a
eyre: clean up old +load code
Removes pre-breach state adapter logic and touches up code style.
2020-05-29 15:33:22 +02:00
Fang
00e3159287
eyre: clear expired sessions/cookies from state
Instead of setting a timer for every session, we set a single expiry
timer when the first session is created. On the subsequent wake event,
we clear all cookies that have expired at that time, then set a timer
for when the next session expires.

This approach gives us flexibility wrt sessions going forward, allowing
extending or early deleting of sessions without having to care about the
related timers.

Note that in +load, we clear all existing sessions. We would start the
expiry timer flow there, but can't. Forcing the user to login again
post-ota once isn't the end of the world.
2020-05-29 15:28:44 +02:00
Philip Monk
18e396cf53
release: urbit-os-v1.0.20
Previous urbit-os-v1.0.20 was not released
2020-05-28 18:43:20 -07:00
Philip Monk
d49e8adc08
Merge remote-tracking branch 'origin/philip/behn-fix' into release/hotfix
behn: fix +unset-timer
2020-05-28 18:37:39 -07:00
Philip Monk
3ab618e234
behn: fix +unset-timer
It was throwing away timers sometimes if you cancelled a timer at the
same date as other timers.
2020-05-28 17:09:25 -07:00
Philip Monk
0cfee46fa8
jael: send breach notifications in order
See #2952 for details
2020-05-28 15:24:19 -07:00
Philip Monk
1be5411c75
jael: don't notify breach on initial update to ship
See #2952 for details
2020-05-28 14:38:07 -07:00
Philip Monk
c20cd29932
jael: look for correct wire
We inspect the wire of our subscriber to see if we need to produce the
result as a %public-keys or a %boon.  This is bad -- we should proxy the
subscription to avoid this need, but this doesn't make that change yet.

%pubs is an old name that doesn't exist anymore (last existed around
September 2019).  The new version is /public-keys, but it's worked so
far because /public-keys has only one item in the path, so it missed the
conditional.  This commit makes the intent more clear.

The [%a @ @ *] could be just [%a @ *], but I leave it to reduce the
chance of breaking stuff.
2020-05-28 14:27:08 -07:00
Philip Monk
0642cc5861
ames: add |ames-wake
Somehow we ended up with flows which expected to awaken but did not wake
up.  This was likely caused by the error in r920j OTA, urbit-os-v1.0.18.

This adds a command which ensures that every flow has an active timer.
I expect this to be needed only once, but it's a pretty general tool, so
it's worth keeping.

I've included an unused @t parameter to more easily add simple debug
commands to ames without having to add a new task
2020-05-28 10:28:31 -07:00
Philip Monk
472ad18c90
behn: already deleted, don't need to do it again 2020-05-27 18:47:50 -07:00
Philip Monk
86fb78d933
Merge remote-tracking branch 'origin/ted/behn-same-date' into release/hotfix 2020-05-27 18:36:10 -07:00
Philip Monk
ff01a1ea04
ames: don't set new timer if we woke up too early
Otherwise if we end up having multple outstanding timers, they never
coalesce to a single timer.
2020-05-27 17:38:18 -07:00
Ted Blackman
8ed07dfc7e behn: fix bug with timers at same date 2020-05-27 02:59:07 -04:00
Fang
36b7fc2e4f
Merge branch 'release/next-sys' into m/debug-dashboard 2020-05-26 20:36:27 +02:00
pkova
28cd252ce7 zuse: improve json to rn parsing
Allow the exponent token to be 'e' or 'E', allow the explicit sign of '+'.
Following the spec at https://json.org. Fixes #2935.
2020-05-26 19:29:24 +03:00
pilfer-pandex
78729f4f87 hoon: better comment for +slab 2020-05-25 22:42:49 -04:00
pilfer-pandex
831206d4fe hoon: comment and syn mod for +slab 2020-05-25 22:35:54 -04:00
Fang
58e85fa661
Merge branch 'release/next-sys' into m/debug-dashboard 2020-05-23 01:00:45 +02:00
Fang
52ef23ccca
eyre, zuse: add scry interfaces for eyre state
Scries for getting out open connections, cookie sessions, and existing
channels.

Moves the involved types from eyre into zuse.
2020-05-22 23:55:17 +02:00
Philip Monk
a4a44f1e21
kiln: cleanup 2020-05-22 14:32:32 -07:00
Philip Monk
096149713a
drum: relink to chat-cli
The subscription changes in drum broke existing subscriptions.  This
worked alright (though loud) for dojo, but it left chat-cli "frozen"
unless you manually unlinked/relinked.  This does that automatically.

It also includes a refactoring of +on-load in drum, to avoid vain
repetition.
2020-05-22 00:17:56 -07:00
Philip Monk
4aff4d74e2
kiln: get updates into %home, remove %base
We need to get updates directly into %home in case the marks depend on
changes to hoon.hoon.  %base has no reason to exist.

Our ota strategy is now to merge from parent/kids to home, then
parent/kids to kids.
2020-05-21 23:45:17 -07:00
Philip Monk
4fcd9f23c0
Merge branch 'release/behn-fast' (#2915)
* release/behn-fast:
  zuse: add +ordered-map
  behn: switch to ordered-map
  chat: virtualize message-to-json conversion
2020-05-21 22:43:53 -07:00
Philip Monk
0e7b07e061
Merge branch 'release/link-dojo' (#2867)
* origin/release/link-dojo:
  chat-cli: allow sending • character
  chat-cli: always talk to local ship only
  chat-cli: single-target sole effects as needed
  chat-cli: don't allow excessively small cli widths
  chat-cli: pull in sole-sur namespace where relevant
  chat-cli: remove unused entropy from state
  chat-cli: print newlines correctly
  chat-cli: support multiple sole connections
  chat-cli: don't crash on %bad-text
  dojo: rename remote access generators
  gall: fix handling of empty path list
  dojo: remove unused %json poke
  dojo: add remote access controls
  drum: switch to per-ship /sole/drum duct

Signed-off-by: Philip Monk <phil@pcmonk.me>
2020-05-21 22:42:18 -07:00
Philip Monk
274215ec6b
zuse: add +ordered-map
At some point this should be more properly styled similar to +by, +in,
and +to, but for now this reduces duplication and makes the ordered map
available to everyone.
2020-05-21 22:28:16 -07:00
pilfer-pandex
90e8c9a2b0 hoon: make +slab respect variance using given mode and return false 2020-05-21 19:38:10 -04:00
pilfer-pandex
7e4c0036f6 hoon: make +slab respect variance (%read) and return false 2020-05-21 19:37:20 -04:00
Fang
4c9d18e5c0
Merge branch 'release/next-sys' into m/debug-dashboard 2020-05-21 20:09:58 +02:00
Philip Monk
8c4c0f31fc
Merge pull request #2920 from urbit/ted/ames-mass-alien
ames: fix %alien |mass over-reporting
2020-05-21 01:40:30 -07:00
Philip Monk
a84b0db733
clay: fix clobbering changes if identical changes 2020-05-21 01:23:04 -07:00
Philip Monk
560e3375f5
clay: drip if foreign desk 2020-05-21 01:10:39 -07:00
Ted Blackman
a0eafa8aa3 zuse,ames: handle %trim task 2020-05-21 03:45:08 -04:00
Ted Blackman
0f7b213f38 ames: fix %alien |mass over-reporting 2020-05-21 03:19:20 -04:00
Ted Blackman
96264f7fa3 eyre: clarify common prints 2020-05-20 04:36:33 -04:00
Ted Blackman
1028e9fd7c hoon,kiln: clean up boot prints; new pill 2020-05-20 04:36:16 -04:00
Ted Blackman
5a1f227622 clay: remove beak from compiler path 2020-05-20 04:25:00 -04:00
Ted Blackman
917c55eaa3 gall: remove pupal queue, molt on any event 2020-05-20 03:30:29 -04:00
Ted Blackman
7e69e66280 ames/zuse: handle %trim event 2020-05-20 03:29:54 -04:00
Philip Monk
56c66be87a
behn: switch to ordered-map 2020-05-19 21:40:39 -07:00
Ted Blackman
044c22357d clay: virtualize +read-at-aeon:ze so failures don't kill event 2020-05-19 20:28:24 -04:00
Philip Monk
aaf7a45e25
arvo: properly print %warn 2020-05-17 02:01:17 -07:00
Philip Monk
161cc7aa15
clay: put ship/desk in compiler path 2020-05-17 01:59:10 -07:00
Philip Monk
2583da4d31
gall: subscribe to hoon/arvo/zuse as well 2020-05-17 00:22:51 -07:00
Philip Monk
b7beb6a697
clay: make covariant in type of +hoon 2020-05-16 05:22:39 -07:00
Ted Blackman
88b834107c gall: pupal phase 2020-05-14 07:24:44 -04:00
Philip Monk
a874ab4355
zuse: remove +ford 2020-05-14 00:22:39 -07:00
Philip Monk
2c2e16df7a
language-server: convert to fusion 2020-05-13 23:30:52 -07:00
Philip Monk
fd26b2184e
kiln: convert to fusion 2020-05-13 20:13:53 -07:00
Philip Monk
af1a26aa5d
clay: abort mate on conflicts 2020-05-13 19:29:20 -07:00
Ted Blackman
2ce063f409 ford: delete, update /lib/pill 2020-05-13 21:10:35 -04:00
Ted Blackman
4dde2081f1 Merge branch 'ted/leap-arvo' into ford-fusion 2020-05-13 19:44:44 -04:00
Philip Monk
9b434af44e clay: only reload vanes that changed 2020-05-13 18:27:14 -04:00
Ted Blackman
778f6e9d05 /sys: make hoon optional in %lyra 2020-05-13 18:27:14 -04:00
Philip Monk
6da1424f8a
clay: remove last turbo references 2020-05-12 23:36:55 -07:00
Philip Monk
be77fa39db
clay: convert foreign-update to fusion 2020-05-12 22:53:23 -07:00
Philip Monk
ee13aa73d4
clay: move foreign-request to fusion 2020-05-12 20:22:25 -07:00
Philip Monk
8536c6b1ca
clay: remove move of +util 2020-05-12 03:03:07 -07:00
Philip Monk
6e10a7439a
clay: remove fusion mount and queuing infrastructure 2020-05-12 02:09:41 -07:00