Commit Graph

17 Commits (a4bd7806b3ee51b64315287da60b235a83decbf0)

Author SHA1 Message Date
dr7ana 30f62d2689 zero cost exception handling my ass
- rework bootstrap loading to move all logic into BootstrapList object
- ability to parse lists and dicts of bootstraps implemented
- netid parsing refers to the correct fallback
- cross your fingers boys here we go
5 months ago
dr7ana b69f754599 come on already work already 5 months ago
dr7ana f812d5471b send localrc, receive as remoterc 5 months ago
dr7ana 9084d39e5a Squashed misc testnet fixes 5 months ago
dr7ana cef2ff7782 Local router mode
- Up and running locally, no connections yet
- Next: flip testnet and do the gosh dang thing
5 months ago
dr7ana 91121ea22b pull yourself up by your bootstraps sonny
- initial/subsequent fetching combined for RouterContacts and RouterIDs
- bootstraps fallback implemented and looped into fetch logic
6 months ago
dr7ana af0ac28119 Review fixes + misc fixes 7 months ago
dr7ana fa4471f566 {Remote,Local}RC's
- RemoteRC supplants most of the functionality throughout the code of RouterContact
- Next step will be to sort out CI issues, then see if we can get rid of either LocalRC (and therefore RouterContact entirely)
7 months ago
dr7ana 07271f9ae7 RC refactor layout
- Local and Remote RC's now implemented with discrete functionalities and uses
7 months ago
dr7ana e710cfea47 Review commit 7 months ago
Jeff Becker 259114b51d
add omitted header
certain files needed to include either fstream and our shim for std::filesystem.
this includes fstream into our shim and includes this shim in places
that require fstream. this is done because some toolchains (cough
cough broke af arch linux amalgums) can have weird subsets of the
requirements of C++17 that overlap, except when they dont, denoted by
unknowable undisclosed circumstances.

this issue was reported by a user in the wild, and this fixes it.
2 years ago
Thomas Winget cc1bcf86fa
Fallback bootstrap router build parameter
Adds a fallback bootstrap file path parameter to CMake, specify
-DBOOTSTRAP_SYSTEM_PATH="/path/to/file" to use.

Adds a list of (currently 1) obsolete bootstrap RouterIDs to check
bootstrap RCs against.  Will not use bootstrap RCs if they're on that
list.

Log an error periodically if we appear to be an active service node but
have fewer than a set number (5) known peers.

Bumps oxen-logging version for literal _format.
2 years ago
Jason Rhinelander b81f7025c9
Replace logging with oxen-logger
Replaces custom logging system with spdlog-based oxen logging.  This
commit mainly replaces the backend logging with the spdlog-based system,
but doesn't (yet) convert all the existing LogWarn, etc. to use the new
format-based logging.

New logging statements will look like:

    llarp::log::warning(cat, "blah: {}", val);

where `cat` should be set up in each .cpp or cluster of .cpp files, as
described in the oxen-logging README.

As part of spdlog we get fmt, which gives us nice format strings, where
are applied generously in this commit.

Making types printable now requires two steps:
- add a ToString() method
- add this specialization:

      template <>
      constexpr inline bool llarp::IsToStringFormattable<llarp::Whatever> = true;

This will then allow the type to be printed as a "{}" value in a
fmt::format string.  This is applied to all our printable types here,
and all of the `operator<<` are removed.

This commit also:
- replaces various uses of `operator<<` to ToString()
- replaces various uses of std::stringstream with either fmt::format or
  plain std::string
- Rename some to_string and toString() methods to ToString() for
  consistency (and to work with fmt)
- Replace `stringify(...)` and `make_exception` usage with fmt::format
  (and remove stringify/make_exception from util/str.hpp).
2 years ago
Jeff Becker bbb082931a more logging 2 years ago
Thomas Winget 7caa87862e standardize include format and pragma once
All #ifndef guards on headers have been removed, I think,
in favor of #pragma once

Headers are now included as `#include "filename"` if the included file
resides in the same directory as the file including it, or any
subdirectory therein.  Otherwise they are included as
`#include <project/top/dir/relative/path/filename>`

The above does not include system/os headers.
3 years ago
Stephen Shelton 273270916e
The Great Wall of Blame
This commit reflects changes to clang-format rules. Unfortunately,
these rule changes create a massive change to the codebase, which
causes an apparent rewrite of git history.

Git blame's --ignore-rev flag can be used to ignore this commit when
attempting to `git blame` some code.
4 years ago
Jeff Becker 0afb3b320b
add bootstrap list functionality and utility 5 years ago