Commit Graph

337 Commits (1ef77cccbd9ca9ec27e7d552e4ca1d0da40bbd1c)

Author SHA1 Message Date
dr7ana 826ef2bbe6 libquic bump 10 months ago
dr7ana af0ac28119 Review fixes + misc fixes 11 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)
11 months ago
dr7ana 07271f9ae7 RC refactor layout
- Local and Remote RC's now implemented with discrete functionalities and uses
11 months ago
dr7ana 7314c2a22a CI Fixes, squash 11 months ago
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
11 months ago
dr7ana bda8b211dd Cmake restructuring 11 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.
11 months ago
dr7ana e710cfea47 Review commit 11 months ago
dr7ana 0e451db77f Compilation fixes
- almost all errors have been commented out for refactor or already refactored
- committing this prior to sorting out the cmake structure
- upcoming include-what-you-use application
11 months ago
dr7ana 3ae8fce77d Outbound context absorbed sendcontex
- message transmission routed through refactored handling
- still work to be done, but now to make it compile at least
11 months ago
dr7ana 41312abab0 introset and message transmission underway
- message handling through classes that inherit from PathSet
- cleanups around link_manager
- etc etc
11 months ago
Jason Rhinelander 6d1566572b
Coalesce from_string/from_string_view
The version taking a string_view will already be perfectly callable with
a string, so just combine them into one.
11 months ago
dr7ana e4315cdc69 More message handling underway 11 months ago
dr7ana 6b1e3fbbc0 Touched up path build message handling 11 months ago
dr7ana a6f901a3a9 RIP everything 12 months ago
dr7ana 577f5e61ea De-mutexing
- mutexes in nodedb and rc_lookup_handler removed
- implemented thread-safe queueing to event loop for previously locked accesses
12 months ago
dr7ana 5ccec24470 callsafe
- Added call_get to ev.hpp to queue event loop operations w/ a return value
- de-mutexed NodeDB and made all operations via event loop. Some calls to NodeDB methods (like ::put_if_newer) were wrapped in call->get's, but some weren't. All function bodies were using mutex locks
12 months ago
dr7ana c8dae875b5 Path routing partially implementing
- Reworking how paths to services and snodes
- pushing for Tom to rebase for path handling
12 months ago
Thomas Winget 2cc02d7b60 handle path build requests, generate responses 12 months ago
dr7ana bd81357f62 Path message transmission
- implementing DHT message transmission methods and surrounding functionalities across paths
12 months ago
dr7ana 65bd224cf0 Exit endpoints implemented
- free standing functions in link_manager
- sign and serialize functionalities siloed in llarp/messages/exit.hpp
12 months ago
dr7ana 4ed6a01e02 following up before Tom meeting 12 months ago
Thomas Winget f35f7fe3f2 refactor path build message construction, no more async nonsense 12 months ago
dr7ana 206bd0b85e wawaweewa 12 months ago
dr7ana 1a9f977208 Message method implementation continued
- tons of surrounding stupid refactoring required
12 months ago
dr7ana ad007ff832 libquic/oxen-mq/oxenc version bumps 12 months ago
dr7ana d9ead7d0f6 crypto and message encoding
- libsodium calls streamlined and moved away from stupid typedefs
- buffer handling taken away from buffer_t and towards ustrings and strings
- lots of stuff deleted
- team is working well
- re-implementing message handling in proper link_manager methods
12 months ago
dr7ana d0c3837384 libquic bparser merged
- bumped version to latest main branch commit
- wired up callbacks to set RPC request stream on creation
- methods for I/O of control and data messages through link_manager
1 year ago
dr7ana a3e6cec7e7 Address type migration + libquic bump
- llarp/router/router.hpp, route_poker, and platform code moved to libquic Address types
- implementing required methods in link_manager for connection establishment
- coming along nicely
1 year ago
dr7ana bfa9629779 More carving + libquic bump
- bumped libquic to begin implementing dependent features on connection open/close signals
- more gutting of interface classes
1 year ago
dr7ana aaf688cf81 Deleted a lot
- RIP llarp/iwp/* and most of llarp/link
1 year ago
dr7ana fd527d612f Carving through llarp/link 1 year ago
dr7ana 7f8207d5d3 Nuked superfluous interface classes
RIP:
- i_link_manager
- i_outbound_message_handler
- i_gossiper
- i_outbound_session_maker
- i_rc_lookup_handler
1 year ago
dr7ana 11e54f6552 More message refactoring
- routing messages and surrounding code
- shim code in place for iteration and optimization after deciding what to do with buffer, string handling, and subsequent function calls
1 year ago
dr7ana a921575c55 mein gott 1 year ago
Thomas Winget e2e7ed3490 pass datagram data cb to endpoint ctor, not listen/connect
Still ngtcp2 link errors, but everything else seems to build.  Have not
checked tests; not likely they will build or be correct if broken.
1 year ago
Thomas Winget a44fdab460 LinkManager linker issues / explicit constructor 1 year ago
Jason Rhinelander c92facc15e
Minor cleanups 1 year ago
Thomas Winget 99be31b72f compiles, but does not link 1 year ago
dr7ana 0260da6bd9 cleaning up after tom 1 year ago
dr7ana 620f916e65 Bump oxen-libquic to latest PR's 1 year ago
Thomas Winget ab86318404 Partial implementation of libquic as wire protocol
TODO:

- set up all the callbacks for libquic

- define control message requests, responses, commands

- plug new control messages into lokinet (path creation, network state, etc)

- plug connection state changes (established, failed, closed, etc.) into lokinet

- lots of cleanup and miscellanea
1 year ago
dr7ana ad5055b85f cmake tweaks for redundant dependencies (WIP) 1 year ago
Thomas Winget 22ac3cd26e initial quic wire proto Endpoint skeleton 1 year ago
Thomas Winget 9b42a21ca2 initial quic wire proto Connection skeleton 1 year ago
Jason Rhinelander d011f8fb4a
Bump clang-format to 14 2 years ago
Jason Rhinelander 36792d4337
Fix multi-field < ordering
Lots and lots of places in the code had broken < operators because they
are returning something like:

    foo < other.foo or bar < other.bar;

but this breaks both the strict weak ordering requirements that are
required for the "Compare" requirement for things like
std::map/set/priority_queue.

For example:

    a = {.foo=1, .bar=3}
    b = {.foo=3, .bar=1}

does not have an ordering over a and b (both `a < b` and `b < a` are
satisfied at the same time).

This needs to be instead something like:

    foo < other.foo or (foo == other.foo and bar < other.bar)

but that's a bit clunkier, and it is easier to use std::tie for tuple's
built-in < comparison which does the right thing:

    std::tie(foo, bar) < std::tie(other.foo, other.bar)

(Initially I noticed this in SockAddr/sockaddr_in6, but upon further
investigation this extends to the major of multi-field `operator<`'s.)

This fixes it by using std::tie (or something similar) everywhere we are
doing multi-field inequalities.
2 years ago
Jeff 68148e098f
* add mockable network functions
* add unit tests with ability to pretend to be different network setups
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