Commit Graph

13449 Commits

Author SHA1 Message Date
Jason Rhinelander 14cb314f70 Add patch for hidapi + autoconf 2.70+
Fixes the mac build, and will fix future linux build once distros start
shipping 2.70+.
2021-07-06 20:07:52 -03:00
Jason Rhinelander 4f6f67d151 Fix segfault triggered in test suite on macos
It seems that the `m_tinfo` can be null, sometimes, when `m_cursors ==
&m_wcursors` is true, and the upstream Monero code (which is pure macro)
doesn't touch the bool in such a case.

For some reason this started segfaulting now, only on macos, only on a
release build because of the access into `m_tinfo`.

The workaround (which is indeed a correct fix) appears to avoid the
segfault, but the segfault could retrigger if that invariant doesn't
hold (and it isn't immediately obvious why that invariant *should*
hold).

This, like pretty much all of the LMDB code, is garbage.
2021-07-06 17:37:01 -03:00
Jason Rhinelander aafd0a6282 Update gtest 2021-07-06 16:31:07 -03:00
Jason Rhinelander cc2a3be7c9 Remove obsolete embedded copy of gtest 2021-07-06 16:27:37 -03:00
Jason Rhinelander f42eca07b1 Remove useless option
This option never actually *did* anything (the tests would run whether
or not you specify it), and is now gone.
2021-07-06 00:59:19 -03:00
Jason Rhinelander 74171b8128 Finalize mainnet soft fork for July 13. 2021-07-06 00:06:26 -03:00
Jason Rhinelander 58cb24b9df Bump required lokinet version to 0.9.5 2021-07-05 23:51:54 -03:00
Jason Rhinelander de3340e5c8 Test suite fixes 2021-07-05 23:48:18 -03:00
Jason Rhinelander a841886e62 Fix copyright statement
Though this statement seems dubious since "The Oxen Project" is no a
legal entity.  Should perhaps be "Oxen Privacy Tech Foundation"?  Or
alternatively we could have a statement somewhere that "The Oxen
Project" refers to the OPTF + code contributed by Oxen community members
through github, etc.

Okay enough copyright law.
2021-06-21 09:50:57 -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 ead4819fec Minor code simplification
Eliminates a pointless local variable and a pointless block.
2021-06-19 15:13:57 -03:00
Jason Rhinelander e5ec5ae76d Fix compiler warning in debug builds 2021-06-19 15:13:57 -03:00
Jason Rhinelander 7b00cb251b Add snode revision soft forks & drop hard fork voting code
Snode revisions are a secondary version that let us put out a mandatory
update for snodes that isn't a hardfork (and so isn't mandatory for
wallets/exchanges/etc.).

The main point of this is to let us make a 9.2.0 release that includes
new mandatory minimums of future versions of storage server (2.2.0) and
lokinet (0.9.4) to bring upgrades to the network.

This slightly changes the HF7 blocks to 0 (instead of 1) because,
apparently, we weren't properly checking the HF value of the
pre-first-hf genesis block at all before.  (In practice this changes
nothing because genesis blocks are v7 anyway).

This also changes (slightly) how we check for hard forks: now if we skip
some hard forks then we still want to know the height when a hard fork
triggers.  For example, if the hf tables contains {7,14} then we still
need to know that the HF14 block height also is the height that
activates HF9, 10, etc.
2021-06-19 15:13:57 -03:00
Jason Rhinelander a4cd3dda3f
Merge pull request #1464 from jagerman/v913
Version bump
2021-06-10 16:04:22 -03:00
Jason Rhinelander b665b2f0b1
Merge pull request #1459 from jagerman/lokinet-reachability
Lokinet reachability testing
2021-06-10 16:03:52 -03:00
Jason Rhinelander f24fc05f2f Version bump 2021-06-10 16:00:41 -03:00
Jason Rhinelander 41ba779834 Increase minimum versions for SS/lokinet 2021-06-10 15:32:50 -03:00
Jason Rhinelander 821837368e
Merge pull request #1463 from jagerman/ons-lookup-fix
ONS backup owner lookup fixes
2021-06-10 15:09:41 -03:00
Jason Rhinelander 138dfeb023
Merge pull request #1461 from jagerman/ons-counts
Add registered active ONS registrations counts to get_info RPC
2021-06-10 15:09:08 -03:00
Jason Rhinelander c2d6e095b2 Don't enforce lokinet reachability yet
This makes reachability testing activate at HF19.  We probably want to
come back and update this before HF19, but for now we just check but
don't enforce lokinet reachability.
2021-06-10 14:47:17 -03:00
Jason Rhinelander f5c5f7e9f8 Remove obsolete (pre-HF18) code paths 2021-06-10 12:13:33 -03:00
Jason Rhinelander bbb8bdb1af Add lokinet reachability to quorum testing
It works just like storage server testing.

Renames the report_peer_storage_server_status to report_peer_status, and
repurposes the code to handle both SS and lokinet.

This *doesn't* need a HF by design because the reason bit field was
deliberately designed so that we can add reason fields (older clients
will just ignore unknown bits).
2021-06-10 12:13:33 -03:00
Jason Rhinelander 5b1ca27e2e Fix cli wallet showing wrong Owner value for backup owner
When doing a lookup by owner in simplewallet (`ons_by_owner`) the wallet
was always writing "Owner: ..." for whatever owner row was requested,
*not* the actual Owner row returned.

In particular, when we get back a record where WalletX is the backup
owner and WalletA is the primary owner then when looking up ons records
by owner for WalletX it would print:

Owner: WalletX
BackupOwner: WalletX

Instead of properly showing the record owner details of:

Owner: WalletA
BackupOwner: WalletX

This fixes it.
2021-06-10 12:01:36 -03:00
Jason Rhinelander 7fbe15e96b Fix handling of ONS names when a backup owner
When looking up the ONS names by owner (e.g. ons_by_owner in the cli
wallet) the oxend RPC method returns an error for any records that get
returned where the looked up owner is a backup owner, because it tries
to map (only) the primary owner to a response index and fails if it got
back a record from the database that wasn't in the list of requested
addresses.

This fixes the RPC method to properly check both owner and backup owner.
2021-06-10 12:00:48 -03:00
Jason Rhinelander 470bca770e
Merge pull request #1452 from jagerman/debug-build-fix
Fix SN info upgrade in debug build
2021-06-10 10:43:39 -03:00
Jason Rhinelander b0108481c9 Update boost download URL 2021-06-10 10:42:55 -03:00
Jason Rhinelander 8a2078b51e Fix broken index
This index was being created on a column that doesn't exist, and
apparently because it was quoted (until the commit earlier in this PR),
sqlite was apparently treating it as a string literal.

Cursed AF.

Drop the old name and recreate the index.
2021-06-09 22:07:22 -03:00
Jason Rhinelander a0047a1321 Remove unneeded raw string literals
Without identifier quoting we don't need this anymore.
2021-06-09 15:27:18 -03:00
Jason Rhinelander 740daddb1e Remove superfluous SQL identifier quoting
SQL identifiers are generally meant to be used unquoted, with quoting
only used when strictly necessary (e.g. to avoid keyword conflicts).
2021-06-09 14:02:56 -03:00
Jason Rhinelander 2aebfc4bce Add missing unique index
This index was only getting created on upgraded (from v7, I think)
databases but not new ones.

Also adds a comment about what the "prune" queries actually do (because
the `>=` seems really counterintuitive to me until I figured out that
they are only meant for handling a rollback).
2021-06-09 13:55:07 -03:00
Jason Rhinelander 5de150a475 Add registered ons entry counts to get_info RPC 2021-06-09 13:55:07 -03:00
javabudd e32cbcbccd
Check if SN has a ping from lokinet and the storage server before registration (#1457)
* Make preparing registration fail if lokinet or the storage server have not received a ping yet

* Add prepare_registration boolean default

* Add signature override for get_human_time_ago to accept an optional uint64. Add stricter comparisons to ping checks

* Remove duplicate logic

* Remove method override and assign/cast last_lokinet_ping/last_storage_server_ping

* Use auto definition and static_cast res.last_lokinet_ping
2021-05-20 21:59:21 -03:00
Sean 3ddcf4879b
Merge pull request #1454 from darcys22/local-devnet
local devnet script
2021-05-18 13:24:21 +10:00
Sean Darcy 2ddf644844 local devnet scripts 2021-05-18 09:50:17 +10:00
Sean 17413713b4
Merge pull request #1456 from jagerman/cmake-cleanups
CMake/build cleanups
2021-05-14 09:20:03 +10:00
Jason Rhinelander 65b97494ba Add local deps mirror to android builds 2021-05-12 12:20:12 -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 f287d3d614 Remove STACK_TRACE option
This option is incredibly misguided: exceptions are a normal part of C++
error handling that are used *as intended* in lots of places in the
code.  Spewing massive amounts of output every time any exception is
thrown anywhere (even when caught!) is terrible.

More than that, we don't ever build with it enabled (for the above
reasons) so this is all just unused code.
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 6d13152f4e
Merge pull request #1453 from jagerman/emerge912
9.1.2 hotfix -- fix proofs for older nodes with both pubkeys
2021-04-30 03:26:04 -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 730b3c7142 Fix SN info upgrade in debug build
The v7 info doesn't need anything done, but it fails the assert() here
for a debug build.
2021-04-29 13:12:17 -03:00
Jason Rhinelander d3a35c42cc Don't use timestamp from proof
The timestamp inside the proof is only for signature validation, but we
were using it in some places as the uptime proof time, but not updating
it everywhere we needed to.  This fixes it by using our own timestamp
for all local timed events (e.g. when we received it, when the node is
not sending proofs, etc.) to fix the issue.
2021-04-23 02:41:41 -03:00
Jason Rhinelander 9eb1743949 Update codename 2021-04-23 00:28:19 -03:00
Jason Rhinelander 086d0f2fc6
Merge pull request #1448 from buccella/dockerfile_bump_version_9_1_0
Bump version used in oxend dockerfile to 9.1.0
2021-04-22 23:50:29 -03:00
Chris Buccella c89082a9d2 Bump version used in oxend dockerfile to 9.1.0 2021-04-23 02:48:55 +00:00
Jason Rhinelander 422d82e205
Merge pull request #1447 from darcys22/version-bump-9.1.0
Version bump 9.1.0
2021-04-22 03:13:35 -03:00
Jason Rhinelander b72a6b4f6e
Merge pull request #1446 from darcys22/print-transfers
Creates a new ons pay_type for show_transfers
2021-04-22 03:13:14 -03:00