Commit Graph

20238 Commits

Author SHA1 Message Date
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
33cb1c1dce
Merge pull request #3350 from urbit/king-nat-on-private-networks-only
natpmp: change nat-pmp startup behaviour.
2020-08-19 16:27:14 -04: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
7bf4ff4b00
Merge pull request #3320 from urbit/pp/log-cli
king: configure logging via cli flags
2020-08-17 12:14:58 -07:00
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
Elliot Glaysher
5ee32841d2
Merge pull request #3261 from urbit/king-natpmp
King should open ames ports via NAT-PMP
2020-08-17 14:12:48 -04:00
pilfer-pandex
e40bd3cf6f Merge branch 'master' into release/next-vere 2020-08-17 11:05:46 -07:00
Elliot Glaysher
b25c0b3443 natpmp: oops. missed a sav_errno 2020-08-17 13:08:22 -04:00
Elliot Glaysher
81e3a8f927 natpmp: cleanups for ~master-morzod 2020-08-17 10:58:48 -04:00
pilfer-pandex
2d1f3cdfa0 king: thread LogLevel through, make output better 2020-08-16 10:33:52 -07:00
pilfer-pandex
8ab60b9133 king: configure logging via cli flags 2020-08-14 19:40:48 -07:00
Elliot Glaysher
1b3a69e24d
Merge branch 'release/next-vere' into king-natpmp 2020-08-14 16:17:47 -04:00
Elliot Glaysher
14d1b59117 natpmp: even more cleanup 2020-08-14 10:23:39 -04:00
Elliot Glaysher
b4878a8b03 natpmp: Separate out the PortThreadMsgs from the heap actions. 2020-08-13 13:36:20 -04:00
Elliot Glaysher
a3336fde41 natpmp: more nits 2020-08-13 11:52:42 -04:00
Elliot Glaysher
1183ac0b22 natpmp: checkpoint while addressing comments 2020-08-13 11:12:26 -04:00
Elliot Glaysher
ac4b5a99e5 natpmp: Rename RunningEnv to HostEnv. 2020-08-13 10:19:35 -04:00
Elliot Glaysher
3e6fd0f8e8 natpmp: ~pilfer style nits 2020-08-13 10:08:02 -04:00
Matilde Park
b0d252fa76 publish: no-op when joining our own notebook
Fixes #3300.
2020-08-12 23:08:31 -04:00
pilfer-pandex
36ee3da818
Merge pull request #3267 from urbit/pp/print-http-ports
king: eyre: add missing printouts with ports
2020-08-11 22:11:35 -07:00
Liam Fitzgerald
993ba2d00f glob: update to 0v2.pbthv.gd1q2.h2ura.5esrn.d361c 2020-08-11 22:14:07 -04:00
matildepark
71985e2764
Merge pull request #3296 from urbit/mp/omni/links-join
leap: results link to join routes
2020-08-11 22:02:28 -04:00
Matilde Park
271a9ef235 leap: results link to join routes
Fixes #3274.
2020-08-11 21:52:49 -04:00
matildepark
d07a40b4cd
Merge pull request #3294 from tylershuster/leap-tab
leap: set default select behavior
2020-08-11 18:46:46 -04:00
matildepark
d8a832ceba
Merge pull request #3293 from urbit/mp/chat-regex-mobile
chat: fix syntax of regex check
2020-08-11 18:36:08 -04:00
Tyler Brown Cifu Shuster
62042a067b omni: set default select behavior 2020-08-11 15:35:00 -07:00
Matilde Park
02bd2e795a chat: fix syntax of regex check 2020-08-11 17:57:59 -04:00
matildepark
273bc9c0f3
Merge pull request #3287 from urbit/mp/omnibox-fixes
leap: small fixes
2020-08-11 16:54:19 -04:00
matildepark
97bbac159c
Merge pull request #3292 from urbit/la/chat-read
chat: don't show green line when unread is on page 1
2020-08-11 16:22:20 -04:00
Matilde Park
a123dd67dd interface: allow pinch zooming if needed 2020-08-11 16:20:19 -04:00