Commit Graph

14 Commits (42337388f90b1d9ea7cb86bdba24a86efb79f308)

Author SHA1 Message Date
dr7ana 46ad8d4058 Clang format include sorting + CMake
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use
- shuffled around some cmake linking to simplify dependency graph
- superfluous files removed
7 months ago
Jason Rhinelander f4f5ab0109 "Refactor" aka delete Crypto/CryptoManager
- Get rid of CryptoManager.
- Get rid of Crypto.
- Move all the Crypto instance methods to llarp::crypto functions.
  (None of them needed to be methods at all, so this is simple).
- Move sodium/ntru initialization into static initialization.
- Add llarp::csrng, which is an available llarp::CSRNG instance which is
  a bit easier than needing to construct a `CSRNG rng{};` in various
  places.
- Various related small simplifications/cleanups.
7 months ago
dr7ana e710cfea47 Review commit 7 months ago
dr7ana aaf688cf81 Deleted a lot
- RIP llarp/iwp/* and most of llarp/link
9 months 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
Jason Rhinelander 1ddfb7420a
Merge pull request #1791 from majestrate/exclude-failing-from-queue-2021-10-29
exclude fully failed nodes from service node testing list
3 years ago
Jason Rhinelander 0ec50e6624 Fix comment typo 3 years ago
Jeff Becker fcba709fcb
do not requeue nodes for testing from failing queue if we do not have them marked as failing anymore 3 years ago
Jeff Becker afe55f0932
fix for testing:
dont remove from failing set
3 years ago
Jeff Becker f3deabdb96
* get_failing does not need abstract router as paramter so we remove it
* add remove_node_from_failing to remove a node by pubkey from the failing set
* if a router is deregistered we remove it from the failing set so we don't retest it
* remove a router from the failing set if we get a test success
3 years ago
Jason Rhinelander 7f41c6092c
Fix failing pks not being populated 3 years ago
Jeff Becker 95537804cd
separate white/grey list for active/decommissioned nodes.
allow sessions to decommissioned nodes but not paths.
3 years ago
Jason Rhinelander e332bbe3f3
Switch stl mt19937_64 to CSRNG 3 years ago
Jeff Becker 9ad90d029d
* use weak_ptr on core rpc
* use reachability testing code lifted storage server's code
3 years ago