Commit Graph

560 Commits

Author SHA1 Message Date
Jason Rhinelander 466e08e413
Disable stringop-overflow warnings under GCC12
They are really buggy and produce tons of false positives and, as far as
I've seen, no true positives so just disable them.

I kept this only to 12.x in the hope that gcc 13 will improve the
warning's usefulness.
2022-12-20 18:23:39 -04:00
Sean Darcy bd6b4f1e7b option to exclude making pybind on android and windows by default 2022-12-06 11:25:19 +11:00
Sean Darcy 172093fbbf wallet3 cli
This introduces wallet3 cli to the codebase, build using python and
wraps the c++ wallet3 core using pybind.
2022-12-06 08:10:31 +11:00
Jason Rhinelander 469a6ebdb6
Bump oxen-logging to stable release; fix imported fmt/spdlog targets
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).
2022-10-17 13:41:12 -03:00
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
Jason Rhinelander 8dad0a1529
Change dev version to 11.0.0 2022-09-01 18:57:23 -03:00
Jason Rhinelander 2bd874e0b5
Merge remote-tracking branch 'tewinget/wallet3' into dev 2022-09-01 18:56:14 -03:00
Jason Rhinelander c3a00f57a2
Oxen 10.2 version bumps & mandatory upgrade date
- 10.2.0 oxend version
- keep lokinet at 0.9.9
- require storage server 2.4.0
- schedule 10.2.0 mandatory date as 14 September 00:00 UTC (10am in
  Australia Eastern Time; 8pm (on the 13th) in US Eastern time.
2022-08-30 19:06:58 -03:00
Thomas Winget d4b6f967fd Merge most recent dev and wallet3 branches
Fixes a few merge conflicts, several compilation errors, and
some behavioral incorrectness.  Still a few bugs with wallet3
but as far as I can tell wallet2 and daemon etc. should be working
correctly.
2022-08-22 19:25:49 -04: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 7145cdae6e
Bump version for next point update 2022-07-07 18:23:13 -03:00
Jason Rhinelander ec00efc887
Bump release version 2022-06-19 12:42:03 -03:00
Jason Rhinelander 75b8af602d
Make sure we have sqlite 3.24.0+
Batching code relies on UPSERTs which were added in 3.24.

(This broke initial bionic debs, which needed a sqlite3 backport from
newer Ubuntu to address).
2022-06-16 21:40:36 -03:00
Jason Rhinelander 946b182384
Version bump 2022-06-13 11:52:31 -03:00
Jason Rhinelander e120075c37
Remove check for unbound
We don't use it anymore, but the top-level cmake was still looking for
it.
2022-05-30 19:24:24 -03:00
Jason Rhinelander 0db9520ebc
Merge pull request #1561 from jagerman/prefer-system-libs
Prefer system libs
2022-05-30 18:53:51 -03:00
Jason Rhinelander 5f140e4572
Update release codename 2022-05-30 17:13:27 -03:00
Jason Rhinelander 6b785958b4
Clean up sys-or-submodule code, support system fmt, rename loki-mq
Synced up with oxen-storage-server.

Also rename loki-mq submodule to oxen-mq.
2022-05-30 15:59:03 -03:00
Sean Darcy f3b6742572 bump version to 10.1.0 2022-05-30 19:48:44 +10:00
Jason Rhinelander d59ccbf82c
Bump version 2022-05-24 18:54:32 -03:00
Sean Darcy 866691d9d8 Batching of service node rewards
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
2022-04-29 09:51:14 +10:00
Jason Rhinelander 5e95cef882
Remove openssl, unbound, expat, OpenAlias
openssl is a miserable dependency to fight with, especially for
iOS/Android, and we use it for very little:

- it gets (mis)used to write base64 data to a file in wallet2 for things
  like multisig data.  However this mode is *not* enabled by default,
  basically completely unknown, completely unused, only exists in the
  cli wallet, and is just dumb.  (Honestly the justification given in
  the PR is that "Windows users might want it", presupposing that there
  exists Windows users who are capable of generating a multisig wallet
  in a CLI-only application and yet are incapable of dealing with binary
  files).

- it's a dependency of unbound (in order to do dnssec, I believe).
  Unbound itself is fairly useless for Oxen, so I've removed it too:
    - it does OpenAlias lookups, which are a Monero thing that has never
      been used outside Monero, doesn't work reliably (because it fails
      if the result isn't DNSSEC validated) and is pointless when we
      have ONS.

    - it does DNS resolution on seed nodes, but we have never set seed
      nodes by name and just use seed node IPs instead (which seems a
      bit better anyway since the DNS lookup leaks some metadata).

- it *was* being used for sha256, but an earlier commit in this PR
  already replaced that with libsodium (entirely coincidentally).

- for static deps, it enables HTTPS support for the wallet.  However
  only the CLI wallet actually supports this (the GUI and mobile wallets
  don't), and since oxend hasn't support this for a while I have strong
  doubts it is being used anywhere.  (Plus wallet3 will do everything
  encrypted using zmq/libsodium, so doesn't need this to be secure).
  Note here that it is *only* removed by this commit for static builds:
  if doing a system build that links to libcurl supporting HTTPS then
  HTTPS support will still work.

Libexpat is also gone because it was only there for libunbound.
2022-04-15 13:51:57 -03:00
Jason Rhinelander 47ff596533
Remove UPnP support
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.
2022-04-14 14:34:49 -03:00
Thomas Winget ecb62e8fab Wallet3 squashed initial commit
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.
2021-11-30 16:31:54 -05:00
Thomas Winget 73e787a9ec sqlitecpp cmake nonsense 2021-10-06 19:36:46 -04:00
Jeff 5597fc748b
Update CMakeLists.txt
consolidate the cmake logic
2021-10-04 21:18:08 -04:00
Thomas Winget 435c189a9b sqlitecpp 2021-10-04 20:33:24 -04:00
Jason Rhinelander 5f1bd2f1e4 Drop integration test code.
This code is bitrotting, doesn't compile, and isn't being maintained
anymore.

The integration test suite was an interesting idea, in early Loki days,
but is no longer being maintained and is quite cumbersome to run (for
instance, it is not possible to run it via CI because it depends on
xterm to actually run).  The code to actually run it (in doy-lee's
loki-integration-testing repository) is also a large burden of "janky"
code that isn't worth maintaining.

Remove this from the code; if someone wants to pick it back up in the
future reverting this commit shouldn't be too difficult (though I'd
suggest that a much better approach to integration testing would be to
run different daemons/wallets via rpc commands, as the network-tests do,
rather than trying to feed stdin and parse stdout from running
individual oxends/wallets).
2021-08-19 16:42:15 -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 f24fc05f2f Version bump 2021-06-10 16:00:41 -03:00
Jason Rhinelander 041d01318e Disable -fstack-clash-protection on macOS
It breaks the build on the latest Big Sur Xcode version because it
accepts the option but then later produces warnings about it being
unused when trying to use it.
2021-05-12 12:00:23 -03:00
Jason Rhinelander add87f2519 Modernize how -pie gets set
Let cmake deal with setting up -pie; this ought to avoid a bunch of
unused argument errors on apple clang where -pie is being forced on
incorrectly.
2021-05-12 12:00:23 -03:00
Jason Rhinelander e5bc4e31c4 Clean up pkg-config use
- 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).
2021-05-12 11:59:22 -03:00
Jason Rhinelander c789fd5d77 Remove dead DEPENDS code
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.
2021-05-12 10:46: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 9eb1743949 Update codename 2021-04-23 00:28:19 -03:00
Sean Darcy 2f12e84938 Bump versions and minimum versions for uptime proofs 2021-04-22 14:01:56 +10:00
Jason Rhinelander 2fb0dbcaa3 Tweak uptime proof times; reduce times for testnet
This makes uptime proof times network-dependent, and tweaks them a bit.
Also converts the times to type-safe std::chrono types rather than
macros.

Mainnet/testnet/devnet:

- Send the first proof 30s after startup rather than waiting 2 minutes.
- Check for whether we need to send a proof every 30s rather than every
5mins.

Mainnet:

Other times unchanged.

Testnet/devnet:

- Send proofs every 10min instead of 1h, and consider nodes to be down
after 21m instead of 2h5m.

Fakechain:

- Send 5s after startup, check every 5s, and send every 1min.
- Expiry after 2min5s

Also remove the cmake debug option for short proofs since the fakechain
changes above basically incorporate what it did.
2021-03-25 11:46:23 -03:00
Jason Rhinelander 2861648627 Merge remote-tracking branch 'origin/stable' into dev 2021-01-08 19:36:58 -04:00
Jason Rhinelander eca6b6ad8d Disable Trezor by default
Trezor support currently doesn't work (Trezor's hardware wallet is
hard-coded for a Monero net-id), and this saves needing to muck around
with protobuf.
2021-01-08 18:15:25 -04:00
Jason Rhinelander 645ce86393 Bump version to 8.1.5 2021-01-07 18:43:40 -04:00
Sean Darcy ccd712542d executable names changed 2021-01-07 18:40:18 -04:00
Sean Darcy 432dc319a9 executable names changed 2021-01-04 14:19:42 +11:00
Sean Darcy 5b30dea2a4 bump to 9.0.0 2020-12-18 16:06:02 +11:00
Sean Darcy ed5b946c0a quorumnet message for timestamp requests
random sampling of service nodes, call timestamp lmq message

checks timestamp of 5 service nodes, if local time is 30 seconds different from 80% of the nodes tested then warn user

tracks external timesync status and timestamp participation of service nodes

clean up includes

new template struct for participation history, individual types for participation entry

refactor checking participation

update select_randomly, move the testing for variance overflow

version locks, bump to 8.1.5

explicit casting for mac & clang

note to remove after hard fork

timestamp debugging log messages

debugging messages for before timesync - before message sent

logging errord with compiling

print version and change add_command to add_request_command

log if statement test

std::to_string replaced with tools::view_guts for x25519 key

check if my sn is active before sending timestamp requests

logging the failures

checking if statement for success of message

more logging, if guards arn't passing

more logging, successfully tests if service node might be out of sync

more tests before we decide we are out of sync

logging output if sn isn't passing tests

if check_participation fails then disconnect

print timestamp status

remove saving variance from the participation history

reduce MIN_TIME_IN_S_BEFORE_VOTING

reset participation history on recommission

undo reduction in startup time

reduce log levels

Set hardfork time in testnet
2020-12-18 16:05:51 +11:00
Jason Rhinelander 8e3ed0efa8
Merge pull request #1355 from loki-project/dev
Merge dev -> stable branch for 8.1.4 release
2020-11-19 23:29:29 -04:00
Jason Rhinelander 77424b0edf 8.1.4 version bump 2020-11-19 22:56:17 -04:00
Jason Rhinelander 24dd1ee800 Merge remote-tracking branch 'origin/dev' into 813-release 2020-11-11 15:19:21 -04:00
Jason Rhinelander 4d8718692a Bump version 2020-11-11 15:18:34 -04:00
Jason Rhinelander 8db38d6f23 Replace CMakeLists_IOS.txt hack job with proper toolchain file 2020-11-04 15:06:59 -04:00