Commit Graph

38 Commits

Author SHA1 Message Date
Jason Rhinelander d02558350a
Crank oxen-mq to (1.2.)11; switch to oxen-encoding
- Update oxen-mq submodule to latest stable
- Add oxen-encoding submodule
- Convert all oxenmq encoding usage to oxenc
- Modernize cmake handling of oxenmq/oxenc
2022-02-17 16:30:17 -04:00
Jason Rhinelander 0fa39c89dc
Make format 2021-06-07 16:16:18 -04:00
Jason Rhinelander 40ad286bf4
Don't pass last hash into UpdateServiceNodeList
It's there for polling, which we aren't doing anymore; we just got the
hash from oxend's push notification, so if it pass it in then we will
always get an "unchanged" result because we're telling oxend that we
already have the data for that hash updated.

This just drops the hash completely because we don't need it anymore.
2021-06-07 16:16:18 -04:00
Jason Rhinelander cd6962f538
Avoid copying & keep router alive by moving shared_ptr 2021-06-07 16:16:18 -04:00
Jason Rhinelander 4974ce6f98
Add warning when can't update whitelist 2021-06-07 16:16:18 -04:00
Jeff Becker 95537804cd
separate white/grey list for active/decommissioned nodes.
allow sessions to decommissioned nodes but not paths.
2021-06-07 10:57:33 -04:00
Jason Rhinelander 4630c5673a
Fix use after move 2021-06-07 10:00:36 -04:00
Jeff Becker 9ad90d029d
* use weak_ptr on core rpc
* use reachability testing code lifted storage server's code
2021-06-07 08:41:35 -04:00
Jeff Becker b830eeb535
initial lokinet router testing:
* report via rpc to oxen core connection stats on success and failure
* connect to random service node by pubkey every 5 seconds for testing
2021-06-04 16:52:41 -04:00
Jeff Becker 554a44c8bf
report block height reported by oxend in systemd status 2021-05-03 16:53:00 -04:00
Jeff Becker 8a74b55af3
limit calls to service node list updates for when we are synching the chain we dont spam with list updates 2021-04-27 16:13:05 -04:00
Jeff Becker 7f93b95080
add_command instead of add_request_command 2021-04-20 12:37:25 -04:00
Jeff Becker 545021aa3d
temp commit 2021-04-19 07:02:46 -04:00
Thomas Winget 7caa87862e standardize include format and pragma once
All #ifndef guards on headers have been removed, I think,
in favor of #pragma once

Headers are now included as `#include "filename"` if the included file
resides in the same directory as the file including it, or any
subdirectory therein.  Otherwise they are included as
`#include <project/top/dir/relative/path/filename>`

The above does not include system/os headers.
2021-03-09 19:01:41 -05:00
Jason Rhinelander c4559d158e Make format 2021-03-04 16:51:18 -04:00
Jason Rhinelander ccc7b5c9e9 Merge Logic functions into EventLoop
loop->call(...) is similar to the old logic->Call(...), but is smart
about the current thread: if called from within the event loop it simply
runs the argument directly, otherwise it queues it.

Similarly most of the other event loop calls are also now thread-aware:
for example, `call_later(...)` can queue the job directly when called if
in the event loop rather than having to double-queue through the even
loop (once to call, then inside the call to initiate the time).
2021-03-04 16:51:18 -04:00
Jeff Becker 242e56507c
proper lokimq -> oxenmq refactor 2021-02-03 13:12:21 -05:00
Jeff ff23106852
don't allow running lokid-rpc as client (#1394) 2020-10-05 12:55:19 -04:00
Jeff f797405318 ping lokid every 30 second after starting up 2020-10-02 14:11:39 -04:00
Jeff Becker bb67b42f0b
put pubkey_ed25519 in fields 2020-10-02 10:06:35 -04:00
Jeff 21930cf667
LNS (#1342)
* initial relay side lns

* fix typo

* add reserved names and refactor test for dns

* lns name decryption

* all wired up (allegedly)

* refact to use service::EncryptedName for LNS responses to include nonce with ciphertext

* fully rwemove tag_lookup_job

* replace lns cache with DecayingHashTable

* check for lns name validity against the following rules:

* not localhost.loki, loki.loki, or snode.loki

* if it contains no dash then max 32 characters long, not including the .loki tld (and also assuming a leading subdomain has been stripped)

* These are from general DNS requirements, and also enforced in
registrations:

* Must be all [A-Za-z0-9-]. (A-Z will be lower-cased by the RPC call).

* cannot start or end with a -

* max 63 characters long if it does contain a dash

* cannot contain -- in the third and fourth characters unless it starts with xn--

* handle timeout in name lookup job by calling the right handler with std::nullopt
2020-09-17 15:18:08 -04:00
Stephen Shelton 83d337ddfd
Send response on error conditions in API request 2020-07-24 11:55:15 -06:00
Stephen Shelton b037cf0ae4
Handle get_peer_stats request's list of router ids 2020-07-24 11:49:14 -06:00
Stephen Shelton 1d9c337021
Grab lokimq::ConnectionID on connection attempt 2020-07-23 10:53:34 -06:00
Stephen Shelton eedf7ca599
Add implementation of get_peer_stats API 2020-07-20 13:48:57 -06:00
Stephen Shelton bbc1cd5a31
Stub out get_peer_stats LMQ API request 2020-07-16 16:48:26 -06:00
Stephen Shelton c07dcaa2ef
Handle service node privkeys response correctly 2020-07-16 16:48:04 -06:00
Stephen Shelton acb0248f94
Use LMQ request instead of command for lokid ping 2020-07-16 16:46:59 -06:00
Jeff Becker d7ff6c579c
address feedback from jason
* split up ipv6 netmask
* revert iwp ack interval change
* c++17-isms in ip range map
* lambda-ize nodedb
* mutable lambdas in transit hops
* perfect forwarding of args in abstract router
* mutable lambdas in lokid rpc client
* notes in readme about nproc
2020-07-02 11:13:32 -04:00
Jeff Becker a9109aa91b
* deprecate old unused lokid rpc options
* use lokimq::address in config and in lokid rpc
* bump lokimq submodule
2020-07-02 11:13:31 -04:00
Jeff Becker 80919a3b76
address feedback.
* use exceptions when fetching identity key instead of std::optional, will throw on fail
* fix up config options for endpoint auth and add better docs
* add llarp::serive::AuthType enum for controlling what kind of endpoint auth to use
2020-07-02 11:13:31 -04:00
Jeff Becker 1779f33506
fix makefile fromat target
use lokimq::address instead of std::string or std::string_view
2020-07-02 11:07:34 -04:00
Jeff Becker f4971a88fd
use lokimq workers instead of llarp:🧵:ThreadPool 2020-07-02 11:07:34 -04:00
Jeff Becker 9bfff61d08
initial wack at lokimq 2020-07-02 11:07:32 -04:00
Stephen Shelton fd4b03f896
WIP: LokidRpcClient 2020-07-02 11:07:32 -04:00
Jeff Becker ad882d0d70
initial working code 2020-07-02 11:07:31 -04:00
Jeff Becker 0006751d80
initial wack at lokimq 2020-07-02 11:07:31 -04:00
Stephen Shelton 91725a8530
WIP: LokidRpcClient 2020-07-02 11:07:31 -04:00