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] The Everything Refactor #2212

Draft
wants to merge 226 commits into
base: dev
Choose a base branch
from
Draft

[WIP] The Everything Refactor #2212

wants to merge 226 commits into from

Conversation

dr7ana
Copy link
Collaborator

@dr7ana dr7ana commented Oct 16, 2023

(This PR is tracking all of the experimental code going in for the quic refactor; it will eventually move to dev once it works again, but is just here to track the branch until then).

tewinget and others added 30 commits August 28, 2023 10:59
TODO: correctly plug it into CMake and remove ngtcp2 submodule from lokinet
as it will now come from oxen-libquic, if even used directly by lokinet at all.
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
Resolves a conflict with libquic's StaticBuild.
- re-structure docs
- add diagrams
Note: this is compilation-fixing only.  Behavior fixing will come later with combining
the earlier efforts on liblokinet with the new wire protocol changes.
-std=c99 breaks ngtcp2's build -- it appears to depend on GNU extensions
when compiling on linux, so don't force compiler C extensions off.
Still ngtcp2 link errors, but everything else seems to build.  Have not
checked tests; not likely they will build or be correct if broken.
By not having BUILD_SHARED_LIBS as a defaulted option, if it was not set
in the invocation of cmake then any submodule could come along and set
it instead by declaring it as an option.  If/when this happens in the
middle of the cmake process, some modules will have the flag unset and
others will have it as the default that the submodule set, leading to
inconsistent compilation parameters at best, but likely linking failure.
- 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
- `::handle_message` is transposed; Rather than the message calling the method and taking a reference to the router, the router should have a handle_message method and take a reference to the message
- `::EndcodeBuffer` takes a string reference, to which the result of `::bt_encode()` is assigned
- added CI fixes for gnutls build
- stupid warn deprecated stupid
RIP:
- i_link_manager
- i_outbound_message_handler
- i_gossiper
- i_outbound_session_maker
- i_rc_lookup_handler
dr7ana and others added 28 commits December 15, 2023 07:51
- implemented ngtcp2 ping to keep connections alive
- fixed weird lambda captures
- fetch logic
- lets see what happens
- new btdc method used to ensure no junk at the end of our bt data
- DRYed out the RC code
- check inbound bootstraps against all registered routers, not just whitelist
- libquic vbump
- try closing the connection via link::Endpoint like we probably should be doing..
- testing out dropping stream constructor, godspeed
It's a gross implementation, and even if it wasn't, using it takes more
code than not using it.
If given and true then return nullopt if we don't find the requested
number; otherwise return them even if there aren't as many as we
requested.
- laying the groundwork for functional client->service node connections. this requires ALPNs verification as a secondary method of identification to the remote key
- refactored btreq stream creation to use improved stream creation logic in libquic
- pending_conns removed in favor of direct creation of link::Connection objects in link::Endpoint::{service,client}_conn containers
- conn lookup maps removed, they were pointless
- 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.
@dr7ana dr7ana mentioned this pull request Jan 26, 2024
@dr7ana dr7ana changed the title [WIP] Messaging Refactor (general quicwip branch PR) [WIP] The Everything Refactor Apr 9, 2024
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

4 participants