Commit Graph

8266 Commits

Author SHA1 Message Date
dr7ana
8f99ead7ba doofus 2024-01-31 07:54:12 -08:00
Jason Rhinelander
cb39f64cae Fix std::set move semantics
This is, apparently, the only way to move an element out of a std::set.
2024-01-31 07:54:12 -08:00
dr7ana
fcbfc1919d update seeds before returning no 2024-01-31 07:54:12 -08:00
dr7ana
8bdfb206c2 wrap dat 2024-01-31 07:54:12 -08:00
Jason Rhinelander
d6cc702025 Bump libquic for register_command fix 2024-01-31 07:54:12 -08:00
Jason Rhinelander
6505c7badb Replace GetBestNetIF with quic::Address version
It is now called get_best_public_address, and takes (bool, port)
argument to return an optional quic::Address to make life easier: the
caller now can just give the default port to set, and we keep the C
sockaddr* more constrained.
2024-01-31 07:54:12 -08:00
dr7ana
90a530a114 whatever 2024-01-31 07:54:12 -08:00
dr7ana
1e1f4dd40b come on already work already 2024-01-31 07:54:12 -08:00
dr7ana
4c2512494c libquic vbump 2024-01-31 07:54:12 -08:00
dr7ana
0e888395d6 who cares 2024-01-31 07:54:12 -08:00
Jason Rhinelander
f00137adeb Bump libquic for message move/copy fixes 2024-01-31 07:54:12 -08:00
Jason Rhinelander
96c93c9981 Bump libquic 2024-01-31 07:54:12 -08:00
Jason Rhinelander
0cf5805a7e DRY duplicated code in RCRemote 2024-01-31 07:54:12 -08:00
dr7ana
cd96497fd6 print but better 2024-01-31 07:54:12 -08:00
dr7ana
97fe3c6271 send localrc, receive as remoterc 2024-01-31 07:54:12 -08:00
dr7ana
b8c8a2c696 log 2024-01-31 07:54:12 -08:00
Jason Rhinelander
31616837e0 Revert me: fix double-hex in debug output 2024-01-31 07:54:12 -08:00
Jason Rhinelander
ff3a495f0e Fix pubkey parsing to be read as bytes
from_string was trying to parse it as base32z.snode

Also leave FIXMEs behind for the badly named methods (both in RouterID
itself and in ancestor classes).
2024-01-31 07:54:12 -08:00
Jason Rhinelander
329acaf56c Revert me: debug print the msg/sig/signer 2024-01-31 07:54:12 -08:00
dr7ana
4328212c2c shoot 2024-01-31 07:54:12 -08:00
Jason Rhinelander
eb62185160 RemoteRC: explicit single-argument constructors 2024-01-31 07:54:12 -08:00
dr7ana
aabd413ed6 D 2024-01-31 07:54:12 -08:00
Jason Rhinelander
dab6e90f7d Fix version encoding
We are reinterpret_cast'ing the version to a string to send it as raw
bytes, but it was sending \x00\x00\x09 instead of \x00\x09\x0a because
the version constant was actually a uint16_t array.

This just makes the version constant a uint8_t array instead so that it
works (and I am not at all worried about any version component getting
larger than 255).
2024-01-31 07:54:12 -08:00
Jason Rhinelander
ba6c8ee320 REVERT ME: debug incoming dict data 2024-01-31 07:54:12 -08:00
dr7ana
384cb7a8bd dont bomb with bootstrap reqs 2024-01-31 07:54:12 -08:00
dr7ana
3d9e3aef7f kiiiiiick 2024-01-31 07:54:12 -08:00
dr7ana
9c92c30180 try queueing 2024-01-31 07:54:12 -08:00
dr7ana
7568b71893 kick 2024-01-31 07:54:12 -08:00
dr7ana
2405d36d33 libquic vbump 2024-01-31 07:54:12 -08:00
dr7ana
0b7997ef8f kick 2024-01-31 07:54:12 -08:00
dr7ana
4c3f7dc38d kick 2024-01-31 07:54:12 -08:00
dr7ana
c4f0a70360 Bootstrap seed
- nodes now send their RC to the bootstrap seed on making a request
- allows the bootstrap seed to distribute RCs
2024-01-31 07:54:12 -08:00
dr7ana
4b426f52e9 Crit logging
- TODO: discuss authentication for nodes connecting to bootstrap seed
- crit log num connected/RC's, conn open/closed, etc
2024-01-31 07:54:12 -08:00
Jason Rhinelander
950ebfe2df Update libquic 2024-01-31 07:54:12 -08:00
Jason Rhinelander
be613734b4 Remove duplicate connection closing method
`deregister_peer` does the exact same thing as `close_connection` so
just remove it.

Also removes an unnecessary loop dispatch call (because we *have* to be
in the logic thread already to be able to touch the variables we are
touching before the dispatch).
2024-01-31 07:54:12 -08:00
Jason Rhinelander
ed87b73f23 Bump libquic 2024-01-31 07:54:12 -08:00
Jason Rhinelander
72276e33ef Update libquic 2024-01-31 07:54:12 -08:00
Jason Rhinelander
6231b4908e Remove release motto
This doesn't really have a purpose.
2024-01-31 07:54:12 -08:00
Jason Rhinelander
e43833ad32 Update logging in daemon.cpp
Some of these were wrong (trying to use formats that didn't work); this
updates them all to new-style logging.
2024-01-31 07:54:12 -08:00
dr7ana
03976d8731 Squashed misc testnet fixes 2024-01-31 07:54:12 -08:00
Jason Rhinelander
686c7e0207 testnet: don't give oxend and error when testing is disabled 2024-01-31 07:54:12 -08:00
dr7ana
aeb0798a6f TELL ME WHEN IT WORKS 2024-01-31 07:54:12 -08:00
dr7ana
6a32148402 address parsing
- straightened out setting of public addr and public port in config vs listen ("bind") addr
- fixed small bug in router contact writing and saving
2024-01-31 07:54:12 -08:00
dr7ana
267a698da1 libquic vbump
- now pointing to jason/void-listen
2024-01-31 07:54:12 -08:00
dr7ana
66ad28a2f1 Local router mode
- Up and running locally, no connections yet
- Next: flip testnet and do the gosh dang thing
2024-01-31 07:54:12 -08:00
dr7ana
32e55b0f17 testnet prep
- redoing link_manager functions again to implement previously ignored review comments on several PRs
- conceptually merging "whitelist_routers" and new "known_{rids,rcs}", s.t. we can completely eliminate white/red/gray/green/etc lists in favor of something that isn't dumb
2024-01-31 07:54:12 -08:00
dr7ana
44696b1ba3 trust model edge case handling
- Once we have our set of returned rc's and accepted rid's (ones that were found locally), the remainder are placed in an "unconfirmed" state
- Once there, they have five subsequent successful fetches to be found in request response, at which point their verification counter is incremented and their attempt counter is reset
- If they appear three times, they are "promoted" and moved to our "known_{rid,rc}" list
2024-01-31 07:54:12 -08:00
dr7ana
ec887062e9 testnet prep
- disable reachability testing with config option; required to be done on testnet
- reachability testing pipeline through link_manager executes pings similar to storage server. connection established hook reports successful reachability, while connection closed callback (with non-default error code) reports unsuccessful testing
2024-01-31 07:54:12 -08:00
dr7ana
63a57d5ae4 trust model fetch fails
- bootstrap cooldown implemented with 1min timer in case all bootstraps fail
- set comparison implemented in non-initial and non-bootstrap rc fetching; set comparison in rid fetching is done every fetch
- nodedb get_random functions refactored into conditional/non-conditional methods. Conditional search implements reservoir sampling for one-pass accumulation of n random rcs
2024-01-31 07:54:12 -08:00
dr7ana
e02ddd61d0 trust model
- greedy evaluation of returned rid's, simplifying post-processing logic to simple frequency comparison per rid against a constant threshold
- tidied up link_manager request/response handling
- TODO:
  - review and decide thresholds
  - evaluate necessity and potential implementation of rc comparison
2024-01-31 07:54:12 -08:00