Commit Graph

5010 Commits

Author SHA1 Message Date
Joe Bryan
047481667a u3: clarifies forward-declaration comment in allocate.h 2020-09-11 15:12:46 -07:00
Joe Bryan
8db9a4d394 u3: only perform road stack checks in +stir jet if necessary 2020-09-11 15:10:49 -07:00
Joe Bryan
2e8d84c173 u3: removes redundant stack reads from +reel and +stir jets 2020-09-11 14:57:57 -07:00
Joe Bryan
a78b303bb4 u3: adds further improvements to road-stack api 2020-09-11 14:54:49 -07:00
Joe Bryan
b719a738f4 u3: refactors road stack api, limiting overflow checks 2020-09-11 13:38:04 -07:00
Joe Bryan
2af18a6659 Merge branch 'release/next-vere' into jb/stir-tail
* release/next-vere: (317 commits)
  u3: improves error output on c3_assert()
  vere: improves error messages on ipc EOF
  vere: fixes %trim effect handler
  vere: fix crash on u3_pier_bail()
  king: move most things from debug log level to info
  vere: support rendering +stub as ansi escape codes
  king: change logging from tracing to info in Wai.hs
  king dawn: export functions used in tests
  king dawn: nits
  king dawn: remove stray marks
  king dawn: instead of crashing, return an error
  king dawn: replace web3 usage with hand rolled jsonrpc messages.
  vere: v0.10.9-rc1
  vere: more correct lane cache commentary
  vere: reset instead of decrement scry fail counter
  vere: ames.c stylistic improvements
  vere: only touch forward queue counter if scrying
  vere: cache lanes for stateless forwarding
  vere: give up ames scry after successive failures
  vere: properly clean up dropped laneless packets
  ...
2020-09-11 12:53:30 -07:00
pilfer-pandex
98bb534930
Merge pull request #3470 from urbit/pp/loud
Use logInfo in place of logDebug in most situations
2020-09-10 12:47:39 -07:00
Joe Bryan
f4c58ff256 u3: improves error output on c3_assert() 2020-09-09 22:43:28 -07:00
Joe Bryan
0699f6f3f1 vere: improves error messages on ipc EOF 2020-09-09 22:42:53 -07:00
Joe Bryan
3eb51b13d6 vere: fixes %trim effect handler 2020-09-09 22:40:46 -07:00
Joe Bryan
0641769875 vere: fix crash on u3_pier_bail() 2020-09-09 22:39:39 -07:00
pilfer-pandex
ba79aa713a king: move most things from debug log level to info 2020-09-09 18:20:21 -07:00
fang
7889a663b2
Merge pull request #3467 from urbit/m/term-escape-vere
vere: support rendering +stub as ansi escape codes
2020-09-09 20:08:55 +02:00
Fang
467d8d239b
vere: support rendering +stub as ansi escape codes
Adds support to term.c for a %klr blit, containing a +stub describing
styled text.

Dill will start making use of this in a separate commit, for release
cutting reasons.
2020-09-09 19:06:40 +02:00
Joe Bryan
40dabb3bac u3: tweaks +stir jet for refcount clarity 2020-09-08 13:11:29 -07:00
Elliot Glaysher
0a3fe85c06
Merge pull request #3439 from urbit/kh-sending-chunk
king: change logging from tracing to info in Wai.hs
2020-09-08 10:32:23 -04:00
Elliot Glaysher
d6762a8baf
Merge pull request #3431 from urbit/fixup-galaxy-table
king dawn: replace web3 usage with hand rolled jsonrpc messages.
2020-09-08 10:10:50 -04:00
Elliot Glaysher
ecbcdf7d00 king: change logging from tracing to info in Wai.hs
I noticed that the king's text log file kept filling up, and it's
mostly 'sending chunk "\n"' from eyre. This changes the log level
of every partial send over an active eyre channel to info, instead
of always.
2020-09-05 21:49:23 -04:00
Elliot Glaysher
a42c90db9c king dawn: export functions used in tests 2020-09-04 17:02:11 -04:00
Joe Bryan
89f833365c u3: optimizes +stir jet, pushes incremental results onto the road stack 2020-09-04 13:07:52 -07:00
Joe Bryan
836715ff31 u3: optimizes +stir jet, reducing incremental allocations in fold 2020-09-04 13:08:11 -07:00
Joe Bryan
8e1468b2e0 u3: rewrites +stir to use loops (constant stack space) 2020-09-04 13:07:52 -07:00
Elliot Glaysher
74b40e0e52 king dawn: nits 2020-09-04 14:44:26 -04:00
Elliot Glaysher
07089a1c93 king dawn: remove stray marks 2020-09-04 11:01:47 -04:00
Elliot Glaysher
4bd0882e7d king dawn: instead of crashing, return an error 2020-09-04 10:54:31 -04:00
Elliot Glaysher
4a7e1b2009 king dawn: replace web3 usage with hand rolled jsonrpc messages.
This replaces the autogenerated bindings to the Azimuth contracts
which use Network.Web3 with hand rolled json messages. Booting a
ship involved 256 individual galaxy point lookups using web3, while
Vere batched all of that into one JSONRPC message.

With this patch, we also batch everything at each phase into one
JSONRPC batch.
2020-09-03 16:05:08 -04:00
Fang
626c4671da
vere: v0.10.9-rc1 2020-09-01 14:30:42 +02:00
Fang
45ad5adbfd
vere: more correct lane cache commentary
@da are 128 bits, just like the worst-case @p.
2020-08-31 22:37:52 +02:00
Fang
e90258627f
vere: reset instead of decrement scry fail counter
If scries succeed, they work. No need to make this smarter.
2020-08-31 22:36:32 +02:00
Fang
7aa452b2fa
vere: ames.c stylistic improvements
Primarily, be consistent about parenthesis spacing around conditionals.
2020-08-31 22:34:10 +02:00
Fang
585fb248ec
vere: only touch forward queue counter if scrying
Slightly simplify the logic around changing the queue size counter by
only modifying it when we're _actually_ scrying, instead of
synchronously processing the forward.
2020-08-29 17:33:31 +02:00
Fang
5f77200d0d
vere: cache lanes for stateless forwarding
While stateless forwarding doesn't need to touch disk, there's still
overhead in needing to communicate with the serf over IPC. By caching
lanes, we get to skip the IPC pipeline, and can respond to forwarding
requests synchronously.

We include timestamps alongside the entries in the cache, and consider
entries older than two minutes as stale.

The cache is capped at around ~100mb of memory use. Further commentary
is provided inline.

Previously, ~nus would drop 3 forward requests, for every one it
fulfilled. Now, it seems able to keep up with demand, only dropping
forwards shortly after boot, while the cache isn't primed yet.
2020-08-29 17:17:45 +02:00
Fang
024c16cd97
vere: give up ames scry after successive failures
Instead of giving up on scrying at the first sight of a u3_none result,
keep trying for a little bit. If five scries fail in direct succession,
consider scrying not worth the effort, and stop trying as before.
2020-08-28 15:34:19 +02:00
Fang
d76a5e9077
vere: properly clean up dropped laneless packets
Previously, if ames told us there was no lane for a target, we would
drop the packet, but fail to register this in the queue, or even reclaim
the memory it was using.

Now, we do all the required book-keeping when dropping packets in the
"no lane for this" case.
2020-08-28 12:53:18 +02:00
Joe Bryan
1e8158b683
Merge pull request #3355 from frodwith/rolljet
+roll and +reel stack space
2020-08-24 19:16:47 -07:00
Paul Driver
8bc148acc3 use road stack instead of heap vector in reel 2020-08-24 15:01:02 -07:00
Elliot Glaysher
5f0fa9b2a0
Merge pull request #3354 from urbit/king-reestablish-natpmp
natpmp: when reopening laptop, reestablish a connection to the router.
2020-08-21 10:01:33 -04:00
Elliot Glaysher
8255fc0e8c natpmp: formatting and cleanup old pmp handle 2020-08-20 20:23:25 -04:00
Paul Driver
6125ac4fe4 fix vector allocation in reel 2020-08-20 12:54:27 -07:00
Elliot Glaysher
15f0df81f1 natpmp: when reopening laptop, reestablish a connection to the router. 2020-08-20 15:47:02 -04:00
Paul Driver
e3cafdd464 roll/reel with while loops 2020-08-20 11:58:08 -07:00
pilfer-pandex
c164f12922
Merge pull request #3339 from urbit/jt/rehob
urbit-king: update urbit-hob to v0.3.3
2020-08-20 08:35:12 -07:00
Elliot Glaysher
88428961dd natpmp: also detect 172.16.0/0/12 ips as private. 2020-08-19 14:02:03 -04:00
Elliot Glaysher
1401d7bc5c natpmp: fix error handling and don't die on errors in getpubliaddress
This fixes a case where the natpmp async could pure () instead of
recursing, which would lock ames. This also adds some more error
handling on the haskell side of things and disables the raw fprintfs
in the c bindings layer.
2020-08-19 12:53:59 -04:00
Elliot Glaysher
5c7f846d71 natpmp: change the library's timeout system to not wait 4 minutes. 2020-08-19 12:05:13 -04:00
Elliot Glaysher
60e2ae02a2 natpmp: cleanup by using a tristate 2020-08-18 15:43:31 -04:00
Elliot Glaysher
dca4344a45 natpmp: By default, only try to talk to the router on private ips.
Since startup hangs for seconds when you are not behind a router,
but still attempt to ask one to open ports for you, by default,
only try to contact the router if the local ip is 192.168.*.* or
10.*.*.*.

Also make port forwarding force on/off.
2020-08-18 12:22:45 -04:00
Jared Tobin
5662a085d5
urbit-king: update urbit-hob to v0.3.3
v0.3.2 fixed an important bug that should be pulled in here.
2020-08-18 13:48:05 -02:30
pilfer-pandex
750b986370 Merge branch 'release/next-vere' into pp/log-cli
Rename `koUseNatPmp` to `hUseNatPmp`; cleanup
2020-08-17 11:43:30 -07:00
pilfer-pandex
6a236a2749 king: use XDG cache directory for default log location 2020-08-17 11:27:30 -07:00