Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Client refactor #2232

Draft
wants to merge 181 commits into
base: quic-wip
Choose a base branch
from
Draft

[WIP] Client refactor #2232

wants to merge 181 commits into from

Conversation

dr7ana
Copy link
Collaborator

@dr7ana dr7ana commented Feb 5, 2024

No description provided.

jagerman and others added 30 commits January 31, 2024 07:54
lokinet-cryptography depends on lokinet-base which depends on
lokinet-cryptography.

Fixed this but splitting lokinet-cryptography into the libntrup code
(which is what is really needed) and the llarp/crypto code (which isn't
needed for lokinet-base).
I don't think Kee needs it anymore.
Whitelisting is now always-on for relays.  Disabling the option is never
used and is unsupported/unmaintained (it was, in theory, to allow
lokinet as a separate usage in a non-service-node relay mode, i.e. on a
completely separate network).

Confusingly, the option was enabled by the `[lokid]:enabled` config
parameter.
We don't have/want this anymore (and on top of that, we *never* used
it in the first place and it probably didn't even work).
The version taking a string_view will already be perfectly callable with
a string, so just combine them into one.
TODO: handle at transit hop, handle at terminal hop, create and handle responses
- message handling through classes that inherit from PathSet
- cleanups around link_manager
- etc etc
- message transmission routed through refactored handling
- still work to be done, but now to make it compile at least
- 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
- 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.
- 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
As long as it's loaded before oxen-mq or libquic, this should end up
being the one that gets used in oxen-mq/libquic, and so we don't have to
update those when we want something in a newer oxen-encoding.
- cleaned up include-what-you-use errors (mostly quoted includes)
- misc fixes
They aren't useful right now.
Also deliberately don't provide the function at all if we aren't
compiled with libcrypt so that we can't link if we try to call it when
not available.
There are some bugfix releases, but also the upstream hash was wrong for
the current release anyway (upstream changed it?).
- some weird function call business
- string formatting
- etc
This was causing cmake to double-invoke ccache for compilation units,
and broke oxen-mq's local zmq build for the same reason.
dr7ana and others added 30 commits January 31, 2024 07:54
- 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
If you start without -DWITH_SETCAP=OFF, but then later re-run cmake,
SETCAP is still set (and so still gets tried).  This fixes it.
- removed superfluous typedefs obfuscating what is actually happening
- Builder -> PathBuilder; next is moving PathSet into PathBuilder
- enum -> enum class where appropriate
- ran linter
- misc libquic fixes squashed into this
- thread-safe wrapping
- When two relays are repeatedly attempting connections to one another simultaneously, the connection initiated by the RouterID that appears first (in lexicographical order) is deferred to. The connection initiated by the other endpoint is marked to close quietly (w/o executing callbacks), and is rejected in the TLS verification hook
- Bypassing callback execution is critical, as it will clean-up the link::Connection object for the connection that is being deferred to; this results in BOTH connections being destroyed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants