Commit graph

13 commits

Author SHA1 Message Date
Sean Darcy d7992b5940
Logging Refactor
This replaces the current epee logging system with our oxen::log
library. It replaces the easylogging library with spdlog, removes the
macros and replaces with functions and standardises how we call the
logs.
2022-10-17 13:41:10 -03:00
Thomas Winget 1311a20e9f merge dev branch with RPC/wallet3 changes
Incomplete, many things to fix, some annotated with
a comment MERGEFIX
2022-07-11 20:40:50 -04:00
Jason Rhinelander 6fcfd0b8ba
Update oxenmq to latest oxen-mq+oxen-encoding
All the encoding parts move to oxen-encoding recently; this updates to
the latest version of oxen-mq, adds oxen-encoding, and converts
everything to use oxenc headers rather than the oxenmq compatibility
shims.
2022-04-14 14:32:01 -03:00
Jason Rhinelander 7551f5c137 Remove p2p rpc_port; p2p code clean-ups
The public rpc port code from Monero is not used on Oxen (we have no
ability to enable it because we didn't want it), but still carried
around and printed pointlessly.  This removes it entirely.

Along the way I ran into some really nasty p2p code using templates for
absolutely no reason at all, so I fixed that crap, and moved some p2p
serialization out of headers into a .cpp file.  (This only scratches the
surface, but as we're going to replace the p2p code entirely eventually
I don't want to waste time trying to polish a turd).
2021-11-01 17:08:56 -04:00
Jason Rhinelander 03add6ebe3 Move operator== into namespace
Argument-dependent lookup will find these if in the same namespace as
Proof itself.
2021-09-03 02:17:07 -03:00
Jason Rhinelander e3999ccb26 Rearrange proof/service node forward declarations to help gcc-8
gcc-8's unique_ptr apparently isn't okay with a forward declared type.
This reverses how proof and service_node_list include/fwd declare each
other to get around it.
2021-09-03 02:15:37 -03:00
Jason Rhinelander 3644861971 lokinet/SS minimum proof versions; 9.2.0 version bump
Remove support for old (non-bt) proofs with the 9.2.0 snode revision
block (I'm not 100% sure on what to call this; "snode revision"? "soft
fork"? "spork"?).

Also bumps the working version to 9.2.0; this likely isn't release
ready, but allows for testing of this on testnet.
2021-06-19 15:13:57 -03:00
Jason Rhinelander c5143f0a31 9.1.2 hotfix -- fix proofs for older nodes with both pubkeys
bt-encoded proofs have a bug for nodes with different legacy/ed25519
pubkeys that isn't easily solvable (it needs a fix on *both* sender and
receiver ends).  That fix is in here (in uptime_proof.cpp) but that
isn't enough to solve it immediately.

This works around the issue by submitting old-style proofs if we are a
node with different legacy/ed25519 pubkeys.
2021-04-29 21:23:16 -03:00
Jason Rhinelander ce9d0a9c1e Storage server RPC improvements
Improves the oxend<->storage server communications protocol:

- pass storage server HTTPS port as part of the storage server ping
(which already carries the also-required OMQ port) rather than needing
to provide it when starting up oxend.  --storage-server-port is now
obsolete (and ignored, if specified).
- Fix up the internal API to use `storage_https_port` and
`storage_omq_port` rather than `storage_port` and `storage_lmq_port`.
- Redo and the SS ping RPC endpoint so that it is less verbose and more
closely matches the lokinet endpoint; instead of:

    { "version_major": 2, "version_minor": 0, "version_patch": 9, "storage_lmq_port": 22222 }

we now expect:

    { "version": [2,0,9], "https_port": 11111, "omq_port": 22222 }

- Tweaks the (not-yet-released) SS proof key names: "s"->"shp" and "slp"->"sop"
2021-04-08 13:42:33 -03:00
Jason Rhinelander c719d45518 Fix lokimq -> oxenmq namespace that crept in
A recent PR started off prior to the rebrand code and was apparently
still using the legacy header names.
2021-03-16 21:09:43 -03:00
Sean Darcy 90232dd217 shorten wire names 2021-02-09 11:54:27 +11:00
Sean Darcy 2ba4438e6a RPC to return SS and lokinet versions, renaming variables 2021-02-09 11:54:19 +11:00
Sean Darcy b720e8ace6 Serialize the uptime proof using btencoding 2021-02-09 11:54:00 +11:00