Commit Graph

7913 Commits (a9a2a115bc2df60f6895d2717ceb5d3380d29e3b)
 

Author SHA1 Message Date
Thomas Winget a9a2a115bc
debian missing yacc apparently all of a sudden 2 years ago
Thomas Winget fcc4f6050d
wait until actually stopped to tell windows we are
We should send STOP_PENDING rather than STOPPED while we aren't yet
actually stopped; STOPPED is already sent when we actually finish
stopping.

Also fixes some silly argc/argv shenanigans, I think.
2 years ago
majestrate e8055a05ad
Merge pull request #2039 from jagerman/shorter-gossip-times
Shorten gossip times in systemd status line
2 years ago
Jason Rhinelander b6924f3ef1
Replace duration/timestamp formats with functions
We're defining formats for std::chrono types, which feels wrong (because
fmt itself also has these), so just replace them with functions:

short_time_from_now(...) gives a short "in 14m12s" or "5.123s ago" time
span relative to now, given a time point.  Precision gets reduced for
larger deviations from now (e.g. "4h12m ago").

ToString(Duration_t) gives a string such as "-3h22m02.123s" for a
duration.
2 years ago
majestrate d91c82c623
Merge pull request #2038 from majestrate/bind-fix-2022-10-26
proper handling of public ips
2 years ago
Jason Rhinelander 67e002c8ee
Fix time_delta<seconds> formatting in milliseconds
The time_delta<T> was using the wrong duration type when formatting, so
was outputting millisecond precision in the systemd status string which
is pointless (and unintended).
2 years ago
Jason Rhinelander 9f10e8003e
Remove useless iterator assignments
A back_inserter doesn't change when you insert onto it.
2 years ago
majestrate 3d0bc4a76c
Merge pull request #2037 from jagerman/ico-using-rsvg-convert
Use rsvg instead of imagemagick to make windows .ico; split up windows build
2 years ago
Jeff Becker 1e5b5ca1f5
proper handling of public ips
in service node mode make sure that when overriding public ip we only
fail when using 2 different public ip.
2 years ago
Jason Rhinelander 491f452dd7
Windows prebuilt gui fixes
Currently you can't use GUI_EXE without BUILD_GUI, but BUILD_GUI also
requires the yarn command (even though it will never use it when GUI_EXE
is set).

This commit fixes it:

- Make `GUI_EXE` a windows-only top-level project options, rather than
  being guarded by `BUILD_GUI`.
- Make `BUILD_GUI` control *building* the GUI instead of bundling it.
- GUI_EXE and BUILD_GUI are now mutually exclusive.
2 years ago
Jason Rhinelander caf97b1861
Split windows into gui/main builds, main now builds on bookworm
The options we need in rsvg-convert are apparently too new for bullseye,
so split the build so that we do the gui separately (in the nodejs-lts
container) and then build lokinet in bookworm.
2 years ago
Jason Rhinelander 11e052cb39
Add rsvg-convert dep to windows readme 2 years ago
Jason Rhinelander c8aa53a456
Use rsvg instead of imagemagick to make windows .ico
imagemagick is messing up the conversion, so just avoid it entirely and
use rsvg-convert directly to do it instead.
2 years ago
Jason Rhinelander 09c05d8206
Merge pull request #2036 from jagerman/win-x64
Use Windows-y 'x64' instead of '64bit' in static upload
2 years ago
Jason Rhinelander 6be4621aea
Use Windows-y 'x64' instead of '64bit' in static upload 2 years ago
majestrate 4c9d076c10
Merge pull request #2034 from jagerman/fix-router-startup
Fix router startup
2 years ago
majestrate 359ea1a3cd
Merge pull request #2033 from jagerman/fix-conf-backcompat
Fix backwards compatible config option handler
2 years ago
Jason Rhinelander 1980ca4d59 Fix bootstrap list bad bootstrap skipping
The iterator here to skip an obsolete bootstrap wasn't properly
reassigning the iterator, so "didn't work" (though why it was hanging
for me is entirely non-obvious).

Also refactored it to simplify/clarify it a bit.
2 years ago
Jason Rhinelander a828ef3f6d Remove obsolete junk
This stuff is already set earlier, in Configure.
2 years ago
Jason Rhinelander 9f49e006e4 Debug Router::Configure; initialize logging earlier
- Move logging initialization to early in Configure rather than at the
  end of FromConfig so that we can add debug logging inside
  Configure/FromConfig/etc.

- add said debug logging to Configure/FromConfig/etc.
2 years ago
Jason Rhinelander 3131297b00
Fix backwards compatible config option handler
Without this, old config (with now-irrelevant settings) won't work in
newer lokinet, making lokinet fatal error on startup if one of the
no-longer-used options is still present.
2 years ago
majestrate e8a27d1db3
Merge pull request #2032 from tewinget/pinned_node_config_cleanup
clarify strict-connect usage and enforce minimum of 2 nodes
2 years ago
majestrate 36dbbd19bf
Merge pull request #2031 from tewinget/get_status_ready_flag
add 'networkReady' to endpoint status
2 years ago
Thomas Winget 3b6953badc clarify strict-connect usage and enforce minimum of 2 nodes 2 years ago
Thomas Winget 1231d4e6c4 add 'networkReady' to endpoint status 2 years ago
majestrate cc2bbc20ca
Merge pull request #2030 from majestrate/issue-2029-keyfile-errors-2022-10-24
llarp_buffer_t idiocy
2 years ago
Jeff Becker bd5da10885
fixes issue #2029
when read/writing a .loki privkey file we dont rewind a llarp_buffer_t
after use. this is an argument in favor of just removing that type
from the code entirely.

fixes by using 2 distinct locally scoped llarp_buffer_t, one for read,
one for write.
2 years ago
majestrate cd858a00ea
Merge pull request #2027 from jagerman/clang-format-14
Bump clang-format to 14
2 years ago
majestrate 37ddecbd20
Merge pull request #2024 from jagerman/dep-updates
Dep updates
2 years ago
majestrate bb904294b1
Merge pull request #2023 from jagerman/drone-fixes
Drone fixes
2 years ago
Jason Rhinelander d011f8fb4a
Bump clang-format to 14 2 years ago
Jason Rhinelander 02108f0504
Merge pull request #2021 from tewinget/route-metric-preference
select gateway with lowest metric
2 years ago
Jason Rhinelander f01b075d3e
Rename darwin -> macos in uploaded build file 2 years ago
Jason Rhinelander f2454285fe
Set _WIN32_WINNT in static deps
Set -D_WIN32_WINNT for static deps; unbound, in particular, needs this
as the latest version appears to rely on something only provided in
non-ancient windows to build properly.

This required moving _winver into the toolchain file so that it is
available earlier in cmake code (StaticBuild is included long before
win32.cmake), but also this seems a more appropriate place for it.
2 years ago
Jason Rhinelander 0e09539b61 CI fixes
- cd .. after the build, before running extra_cmds, because the scripts
  we invoke expect to be in the root, not in the build dir (and it's
  dirtier for the build function to not undo the `cd build` that it
  runs).
- fix unclosed parenthesis in mac static lib checker
2 years ago
Jason Rhinelander 081dfd3328 Update submodules to latest version:
cpr: 1.9.2
cxxopts: 3.0.0
ghc-filesystem: 1.5.12
nlohmann-json: 3.11.2
pybind11: 2.10.0
sqlite_orm: 1.7.1

Plus other updates need to make these work:
- cpr needs a cprver.h configured with the version (cmake code copied
  from oxen-core).
2 years ago
Jason Rhinelander 0ed3d51aa2 Update static deps to latest stable versions 2 years ago
majestrate 86c3b2f4ae
Merge pull request #2019 from jagerman/config-reformat
Config setting documentation edits
2 years ago
Thomas Winget 0c0ba29bae use first gateway, not last... 2 years ago
Jason Rhinelander c3a515da49
Config setting documentation edits
Rewords/reformats the documentation of various configuration options.
2 years ago
jeff 011bd2e84f format 2 years ago
Jeff Becker e5b7ea5f2d
dont do queries while down 2 years ago
Jeff Becker 082756c64c
cancel pending queries on down.
after calling Down() any pending queries will not be properly
canceled and results in a crash when we destruct the queries on our side.
2 years ago
Jeff Becker 306d54e285
when running as a client squelch warnings about snode status and make sure we connect out 2 years ago
majestrate 8f532dec89
Merge pull request #2015 from jagerman/oxend-rpc-updates
Oxend RPC updates
2 years ago
jeff 6813dd659c lint 2 years ago
majestrate 9176ab1157
Merge pull request #2014 from jagerman/fix-sockaddr-ordering
Fix multi-field ordering
2 years ago
majestrate 666642f906
Merge pull request #2016 from jagerman/zlib-bump
zlib version bump
2 years ago
Jason Rhinelander e143bd13cd
zlib version bump 2 years ago
Jason Rhinelander c5e787b8cb Oxend error ping + unfunded tracking
Currently (from a recent PR) we aren't pinging oxend if not active, but
that behaviour ended up being quite wrong because lokinet needs to ping
even when decommissioned or deregistered (when decommissioned we need
the ping to get commissioned again, and if not registered we need the
ping to get past the "lokinet isn't pinging" nag screen to prepare a
registration).

This considerably revises the pinging behaviour:

- We ping oxend *unless* there is a specific error with our connections
  (i.e. we *should* be establishing peer connections but don't have any)
- If we do have such an error, we send a new oxend "error" ping to
  report the error to oxend and get oxend to hold off on sending uptime
  proofs.

Along the way this also changes how we handle the current node state:
instead of just tracking deregistered/decommissioned, we now track three
states:

- LooksRegistered -- which means the SN is known to the network (but not
  necessarily active or fully staked)
- LooksFunded -- which means it is known *and* is fully funded, but not
  necessarily active
- LooksDecommissioned -- which means it is known, funded, and not
  currently active (which implies decommissioned).

The funded (or more precisely, unfunded) state is now tracked in
rc_lookup_handler in a "greenlist" -- i.e. new SNs that are so new (i.e.
"green") that they aren't even fully staked or active yet.
2 years ago