This is a nice C++ wrapper that cleans up the data interface
considerably over using the C sqlite3 API.
I also evaluated (and started implementing) sqlite_orm for this, but ran
into considerable obstacles: the orm components get in the way without
being good enough to really solve anything (and essentially just making
you write queries in C++ code that is much less elegant than straight
queries), plus it fundamentally doesn't support threaded operation,
which sucks.
- Replace boost beast http(s) client code with cpr (same as used in
oxen-core and lokinet)
- Replace bootstrap http requests with encrypted/authenticated omq rpc
requests to the bootstrap nodes (rather than unauthenticated,
unencrypted http connections).
- Remove boost::asio
- Remove boost circular buffer; a regular map with a two-line trimming
code is simpler for block hash cache, and a limit on stored snodes
doesn't seem necessary for the rate limiter.
- Make rate_limiter clean itself periodically; currently it only cleans
once it reaches max clients (i.e. 10k).
- Make rate_limiter thread safe, plus various code cleanups/DRYing.
- Remove ip_utils; we now longer really need a check for public ip for
proxy requests because we are sufficiently restrictive on the proxy url
target that we are unlikely to be able to reach anything sensitive (and
we also don't allow redirects).
- Replace /swarms/ping_test_v1 with /ping_test/v1; this new request now
returns the remote pubkey in a header, and no longer includes an SSL
cert signature (so that we can drop the SSL cert signatures after HF19).
The old one will still be used until HF19.
- Add OMQ endpoint for storage tests; it gets used instead of the https
one at HF19.
- Refactor storage test retries into request_handler (needed so both
legacy and omq endpoints can use it).
- Fix HF18 swarms/storage_test endpoint which was missing the snode
signature required for current SS versions to accept the response.
- Move HTTPS server-specific code (validate_snode_signature) out of
RequestHandler into HTTPSServer
- Make onion proxy-to-url timeout a bit less than the onion request
timeout so that the client has a better chance of actually getting a
timeout error.
- Miscellaneous cleanups
- Remove pre-HF18 compatibility code.
- Remove `process_lns_request` onion request target: it was accidentally
broken in HF18; clients are now using an oxend rpc request proxy to
`ons_resolve` instead.
- Shorten timeout values for ping and storage tests (5s and 15s,
respectively) and bootstrap connections (now 10s instead of 60s).
We require 1.0.18 now, apparently, so bump the required version and add
a -DDOWNLOAD_LIBSODIUM (copied from lokinet) that can download and build
it when required (without needing to do a full static build of
everything).