Commit Graph

287 Commits

Author SHA1 Message Date
fang
50651cd76e
Merge pull request #3849 from urbit/pppf/eyre-slog
kh: webslogs
2020-10-31 21:22:09 +01:00
fang
2497283ff2
king: more code style weaks, remove stale todo's 2020-10-31 21:00:00 +01:00
pilfer-pandex
82606e03e3
Merge pull request #3852 from urbit/pp/fix-kh-again
king: fix a warning
2020-10-30 17:31:15 -07:00
Elliot Glaysher
15d2c18368
Merge pull request #3809 from urbit/kh-specify-eth-node
king: port the '-e' option to specify ethereum node endpoint.
2020-10-30 20:06:00 -04:00
pilfer-pandex
a211390e77 king: and fix a warning in Packet.hs 2020-10-30 16:35:52 -07:00
pilfer-pandex
06f3dc2d3e king: fix MonadFail issue in Packet.hs caused by merge 2020-10-30 16:29:57 -07:00
fang
c0f1fe8433
king: improve code style in KingSubsite 2020-10-30 23:42:33 +01:00
fang
77fc886570
Merge branch 'release/next-vere' into pppf/eyre-slog 2020-10-30 23:30:00 +01:00
pilfer-pandex
bd0672cb8e king: 1 TiB mapsize for event log 2020-10-30 14:54:33 -07:00
pilfer-pandex
6f0bb5990c
Merge pull request #3595 from urbit/pp/stateless
Implement stateless forwarding in the king
2020-10-30 14:48:38 -07:00
Joe Bryan
bafa1ef7f5
Merge pull request #3806 from urbit/release/next-ci
build: migrate to hercules ci, haskell.nix, and upgrade to ghc 8.8.4
2020-10-30 14:33:26 -07:00
fang
3f9cd4a794
king: get rid of unnecessary helper 2020-10-29 23:22:48 +01:00
Brendan Hay
6599a85b99
king: ensure tests are enabled on ci and don't depend on lfs pills 2020-10-29 16:20:41 +01:00
fang
5615b5dc1a
king: factor scrying logic into helper lib
Takes care of constructing the full scry path based off the given
components. Fills in timestamp with the current time. Logs errors on
result conversion failures.
2020-10-28 19:59:48 +01:00
fang
af225f673a
king: scry to check authentication of webslog reqs
Instead of giving webslogs to anyone who asks, only acknowledge requests
with valid session cookies. Send 403s to all others.
2020-10-28 19:33:21 +01:00
Elliot Glaysher
d1c5f97bd7 king: cancel http servers immediately on shutdown. 2020-10-28 14:24:52 -04:00
fang
418b9fda7e
king: add helper for escaping Text into @ta format
Behavior should match (scot %t the-text).
2020-10-28 19:13:23 +01:00
Elliot Glaysher
b3c145ee35 king: port the '-e' option to specify ethereum node endpoint. 2020-10-27 14:01:59 -04:00
Brendan Hay
de17409fd6
king: various warning and -Werror related fixes
This also removes -Werror from racqure due to the sheer number
build failures arising from compiler warnings.
2020-10-27 14:28:08 +01:00
Brendan Hay
74db584ad7
king: simplify parser types to avoid invalid existential newtype 2020-10-27 14:28:08 +01:00
Brendan Hay
2b74a8edd6
king: disable overlapping patterns for deriveNoun/Void usage 2020-10-27 14:28:08 +01:00
Brendan Hay
d752256126
king: replace use of deprecated network/socket address lookup 2020-10-27 14:28:08 +01:00
Brendan Hay
8a830934b1
build: reorganising top-level .gitignore and add nix ignores 2020-10-27 14:28:07 +01:00
Brendan Hay
345bf2c39a
king: remove broken/unused regex-tdfa-text dependency
Text instances are now contained in the parent regex-tdfa package.
2020-10-27 13:56:17 +01:00
Brendan Hay
eeff3034cd
king: update stackage resolver to lts-16.15
This allows us to drop flat/urbit-hob as they're now in the package set,
web3/vinyl need to be added to account for urbit-azimuth's dependencies.
2020-10-27 13:56:04 +01:00
Brendan Hay
ce3cbf0857
build: rework all nix expressions to support hercules-ci builds
This also removes nixcrpkgs and OSX cross compilation in favour of
compiling on the target. x86_64/musl targets are still supported
on Linux.

All sources are now managed via niv (see nix/sources.json) and Haskell
package sets are provided/organised via IOHK's haskell.nix.

Some effort has been made to expose similar top-level attributes for
development, but in some cases there have been changes. Please see
the comments in the top-level default.nix and ci.nix files for usage.
2020-10-27 13:55:49 +01:00
fang
2e7b2ceedb
Merge branch 'pp/stateless' into pppf/eyre-slog 2020-10-26 16:34:41 +01:00
Elliot Glaysher
759ac51f27 king: Don't hard error on injected event failure. 2020-10-26 10:57:07 -04:00
pilfer-pandex
e254c72788 king: address #3778 per joe 2020-10-23 00:10:33 -07:00
pilfer-pandex
66e3df0b06 king: address joe's comments 2020-10-22 16:13:26 -07:00
Elliot Glaysher
5cdeecc627 king: undo undo 2020-10-22 13:06:57 -04:00
Elliot Glaysher
61af5b104e king: patch cleanup 2020-10-22 10:53:28 -04:00
Elliot Glaysher
04ab7b5eb6 king: implement -I and --inject-event-list
This makes it so during `run`, you can inject a series of Events
into your Urbit. The `-I` injection was implemented in Vere, and
has been ported to KH, with the extended `--inject-event-list`
flag which handles a jammed list of events.

Also included is a sample generator which builds a list of events.
2020-10-21 14:39:35 -04:00
pilfer-pandex
c8159b7fe8 king: multi-request support lol 2020-10-20 16:42:20 -07:00
Elliot Glaysher
c6de028fc2
Merge pull request #3728 from urbit/kh-fix-newline
Revert "king: fix zig-zag in stderr logging"
2020-10-16 10:30:49 -04:00
fang
7853c7df9b
king: improve king subsite implementation
Make KingSubsite part of ServConf, handle 404 case more gracefully, make
slog endpoint send SSE headers immediately.

Remaining work mostly revolves around the slog endpoint's slog queue. It
builds up even if nobody is listening, and only the first to pull from
the queue gets to handle/emit the slog event.
2020-10-16 14:13:07 +02:00
pilfer-pandex
359d6c881b king: scry reform 2020-10-15 21:22:48 -07:00
Elliot Glaysher
aa8634ecdd Revert "king: fix zig-zag in stderr logging"
This reverts commit e9ed97f8a8.
2020-10-15 13:58:41 -04:00
Elliot Glaysher
9e2039ee2f arvo: Simplify the actual +code implemetation in jael. 2020-10-15 13:20:06 -04:00
Elliot Glaysher
16b3edfbd0 king: derive +code from Ring and print login +code on startup
We need to be able to programatically get the +code outside of
Urbit, so add an implementation of the derivation in king haskell.
2020-10-15 13:17:43 -04:00
pilfer-pandex
b35f879502 king: implement ~_~/slog without cookies; problems with MultiEyre 2020-10-14 17:05:56 -07:00
pilfer-pandex
e9ed97f8a8 king: fix zig-zag in stderr logging 2020-10-13 12:01:04 -07:00
pilfer-pandex
def318abd9 king: packet tests, scry tqueue 2020-10-12 21:57:01 -07:00
Elliot Glaysher
5eeb86a935 king: actually try shutting down the piers 2020-10-07 13:00:05 -04:00
Elliot Glaysher
ce92c405fe king: --serf="" is a host option, not a per ship option.
This means you don't need to specify this per ship in a multitenant
environment when you are alwyas going to set it to the same binary
if you're overriding it in the first place.
2020-10-07 13:00:00 -04:00
Elliot Glaysher
7e117f86b7 king: move internal IPC types to own file
This lets us put a StrictData annotation on these datas, without
touching the rest.
2020-10-05 14:28:17 -04:00
Elliot Glaysher
77a11a82be
Merge branch 'release/next-vere' into kh-strict 2020-10-05 13:26:46 -04:00
Elliot Glaysher
8d3e15c62b king: strictify all parsed nouns
At least some of the parsed plea structures were holding on to the raw
bytestrings through laziness.
2020-10-05 13:16:45 -04:00
Elliot Glaysher
0451953822 king: evaluate text which goes into the log 2020-10-05 13:15:57 -04:00
Elliot Glaysher
37a52136ab king: Use modifyTVar' instead of modifyTVar.
We mostly used modifyTVar', but there were a few lazy cases.
2020-10-05 13:12:22 -04:00