The tagged 1.0.0 release includes a fix for the fmt::fmt/spdlog::spdlog
targets not being transitively available. (It does require a cmake
version bump to 3.13, though, to make it work).
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.
This updates the coinbase transactions to reward service nodes
periodically rather than every block. If you recieve a service node
reward this reward will be delayed x blocks, if you receive another
reward to the same wallet before those blocks have been completed it
will be added to your total and all will be paid out after those x
blocks has passed.
For example if our batching interval is 2 blocks:
Block 1 - Address A receives reward of 10 oxen - added to batch
Block 2 - Address A receives reward of 10 oxen - added to batch
Block 3 - Address A is paid out 20 oxen.
Batching accumulates a small reward for all nodes every block
The batching of service node rewards allows us to drip feed rewards
to service nodes. Rather than accruing each service node 16.5 oxen every
time they are pulse block leader we now reward every node the 16.5 /
num_service_nodes every block and pay each wallet the full amount that
has been accrued after a period of time (Likely 3.5 days).
To spread each payment evenly we now pay the rewards based on the
address of the recipient. This modulus of their address determines which
block the address should be paid and by setting the interval to our
service_node_batching interval we can guarantee they will be paid out
regularly and evenly distribute the payments for all wallets over this
We have disabled uPnP by default for nearly a year now (#1423) with no
adverse affects; this commit finishes it off entirely, removing it from
the codebase.
Fixes#1419 -- see discussion in that issue for why UPnP really doesn't
add much utility to Oxen.
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.
tx scanning for basic transactions working
- TODO: subadresses. The scanning code is there, but it does not
currently know/care about any subaddresses.
daemon comms for basic syncing working
(multi-)wallet sync more or less working properly
- seem to have a dangling shared_ptr somewhere when removing a wallet from
daemon comms, so not working perfectly yet.
Lots of TODOs and cleanup needed, as well as further features of course.
- Rename endpoint from "send_raw_transaction" to "submit_transaction"
and rename the RPC struct similarly.
- Rename tx_as_hex to just tx, and start accepting it as hex, base64, or
raw bytes. (Transactions formats are consistent enough that we can
easily tell which one we have from the first couple bytes).
- Drop `do_not_relay` parameter as I can see no purpose to ever
submitting a transaction to a daemon that shouldn't be relayed. (The
only use I can see would be to try to exploit a PoW network with
double-spends).
- Drop `do_sanity_checks` parameter; the checks done here should be (and
are!) done by the wallet, not the oxend receiving the completed
transaction.
Converts request parsing and result generation for get_service_nodes and
get_service_node_status.
Note that there are some significant changes here (due to no longer
having to be under epee's output constraints) that significantly reduce
the size of an all-service-nodes request by nearly half, most notably in
a significantly more compact representation of vote/participation
results.
- added a "decomm_reasons" which decomposes the reason codes into string
values such as:
"decomm_reasons": {
"all": ["uptime"],
"some": ["pulse", "lokinet"]
}
- reworded/fixed/expanded various field descriptions
- Various Loki currency references changed to OXEN
- added "operator_fee" which is a rounded operator fee expressed as
thousanths of a percent (e.g. 100000 means 100%, 4567 means 4.567%).
This is inaccurate but much easier to deal with than the raw
portions_for_operator value (especially because the value *usually*
exceeds what can be stored in a double, and thus is not safe with
various JSON parsers).
- added "swarm" which is a hex string representation of the swarm_id,
because swarm_id also isn't double-storage safe.
- reserved and total_reserved fields are now only included if they are
actually different from the amount/total_contributed values.
- various uptime-proof-dependent values (like versions, public ip,
ports) are now omitted if we haven't received an uptime proof yet.
- Flipped inverted descriptions of timestamp participation / synced
values in the RPC documentation.
- checkpoint/pulse/timecheck/timesync participations data is completely
redesigned to be less bloated; the names are now changed to
"checkpoint_votes" and "pulse_votes" and information is returned much
more compactly using lists of lists and/or plain values rather than
lists of dicts that repeat a ton of fields.
- Renamed timestamp_participation in the RPC to quorumnet_tests since,
although we're doing the test for time checking, the main purpose of
the participation is to see that we can reach them. As above, the
result value is significantly more compact: [SUCCESS,FAILS] instead of
an array of dicts.
- Similarly renamed timesync_status to timesync_tests ("status" was
fine, but changing the value completely to [SUCCESS,FAILS] warrants a
name change).
- dropped the "as_json" field because it is asking oxend to
double-encode json, and that is retarded.
- also applies all the same refactoring to get_service_node_status
(which is really just a shortcut for getting the current node's status
out of get_service_nodes).
- overhauled how "fields" works to take a list of field names (the dict
is name: bool values is still supported for backwards compatibility).
Also extended fields to handle "locked_contributions" as a supported
field (so that you can easily omit it, since it often isn't cared
about).
- Convert pkg-config library finding to use IMPORTED_TARGET rather than
the old hacky way of using multiple variables.
- Remove libunbound finding from external (it gets set up already in the
root CMakeLists.txt)
- Remove libzmq searching since we no longer directly depend on it
(except through oxenmq).
We dropped the contrib/depends build system quite a while ago (because
it was nasty), but there are still various DEPENDS checks scattered
through cmake that are just dead code now. This removes them.