Commit Graph

13462 Commits

Author SHA1 Message Date
Kee Jefferys d24ad7c5f8
Update README.md 2021-08-20 11:12:09 +10:00
Kee Jefferys 21202f4b33
Remove CI indicator and update Loki to Oxen 2021-08-17 11:53:43 +10:00
Sean c81cf6fd3b
Update README.md 2021-08-16 09:05:53 +10:00
Jason Rhinelander 16c15c5d26
Merge pull request #1466 from jagerman/wallet-api-refresh-locks
Add locks around the refresh thread
2021-08-09 22:39:46 -03:00
Jason Rhinelander 040f19de5a
Merge pull request #1469 from darcys22/earlier_transfer
Allow HF18 to be used earlier
2021-07-09 03:03:57 -03:00
Sean Darcy ff1b25c961 Explanatory message for workaround 2021-07-09 16:02:13 +10:00
Jason Rhinelander 381a3a4ecd Fix hard_fork_info rpc returning wrong earliest_height
With multiple forks on the same major version `get_hard_fork_heights`
was returning the last one instead of the first one.
2021-07-09 02:55:47 -03:00
Sean Darcy 84f6d08baa Allow HF18 to be used earlier
The get earliest version returns HF 18.1 and this means that our blink
fees that were enabled in HF18 are no longer accepted. Push through to
allow the fees to be used 4000 blocks earlier (current height)
2021-07-09 15:29:06 +10:00
Jason Rhinelander d8662ace7b Add non-blocking isRefreshing(); make height retrieval non-blocking 2021-07-07 18:10:29 -03:00
Jason Rhinelander e09b23a143 Make pointer const 2021-07-07 11:05:17 -03:00
Jason Rhinelander 81eddcd26a Add locks around the refresh thread
Wallet API is really messy with threads -- the refresh thread can run at
any time and change internal wallet state which breaks just about
everything.

This puts all non-trivial wallet access from wallet_api behind a lock of
the refresh thread to lock it out from refresh while other operations
are underway.
2021-07-07 11:05:17 -03:00
Jason Rhinelander 2e7e47a005
Merge pull request #1465 from jagerman/snode-net-revision
Add mandatory upgrade "snode revisions" and start enforcing lokinet/ss versions
2021-07-06 20:46:43 -03:00
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 51ea141ff0 Fix compilation under g++-11 2021-06-23 19:14:41 -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