Commit Graph

13462 Commits

Author SHA1 Message Date
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
Jason Rhinelander 3a02d9db0f
Merge pull request #1444 from jagerman/v9-deps-updates
V9 deps updates
2021-04-22 01:47:46 -03:00
Sean Darcy c07b713cd5 Mainnet hardfork 18 block and timestamp 2021-04-22 14:06:31 +10:00
Sean Darcy 2f12e84938 Bump versions and minimum versions for uptime proofs 2021-04-22 14:01:56 +10:00
Sean fcee4474a9
Update README.md 2021-04-22 11:12:26 +10:00
Jason Rhinelander 6adb9f8ac2 Don't build libuv on ios 2021-04-21 22:03:19 -03:00
Jason Rhinelander 96245f81d5 Undo version check on zmq patch
Apparently this isn't fixed in 4.3.4
2021-04-21 21:43:34 -03:00
Sean Darcy 411af23b4b Creates a new ons pay_type for show_transfers
The displaying of ONS transactions in show_transfers and
export_transfers previously showed the dummy destination address which
contained zero bytes and converted to a nonsense address. Created a new
ONS type for the display functions and removed the displaying of the destination
address.

In addition refactored how we determine that a transaction was either a
staking, ons or output transaction as we were previously parsing the
tx_extra where the data was already in the
cryptonote::transaction::type.

Finally renamed the wording for staking rewards. Previously "miner" now
"reward"
2021-04-21 15:37:55 +10:00
Jason Rhinelander f470dddcff Fix broken curl hash
I put the .bz2 hash by mistake.
2021-04-21 01:19:33 -03:00
Jason Rhinelander c1cdf4cbaa Try again with cross compiler fix 2021-04-21 01:19:33 -03:00
Jason Rhinelander 5b5e8436d0 Boost build fixes
bootstrap.sh seems completely broken in boost 1.76.0 when you want to
use something other than the default compiler: it doesn't respect CXX
anymore, and if you give it --cxx to specify the CXX compiler it
produces a broken project-config.bjam file that prevents the project
from building.

Just skip that crap and build and use b2 ourselves.
2021-04-21 01:19:33 -03:00
Jason Rhinelander da50c398c1 Update bundled deps for static binaries
- openssl 1.1.1k
- libexpat 2.3.0
- libunbound 1.31.1
- boost 1.76.0
- readline 8.1
- sqlite 3.35.5
- eudev 3.2.10
- libusb 1.0.24
- libzmq 4.3.4
- curl 7.76.1
2021-04-21 01:19:33 -03:00
Jason Rhinelander 7ea286f332 Dep update: miniupnpc to 2.2.2 2021-04-21 01:19:33 -03:00
Jason Rhinelander aa6426451b Dep update: oxenmq to 1.2.5 2021-04-21 01:19:33 -03:00
Jason Rhinelander 82414b29e8 Dep update: libuv to 1.41.0 2021-04-21 01:19:33 -03:00
Jason Rhinelander 6e386813be Dep update: ghc::filesystem v1.5.4 2021-04-21 01:19:33 -03:00
Jason Rhinelander fa1605ca41 Dep update: cpr to 1.6.0 2021-04-21 01:19:33 -03:00
Jason Rhinelander 9c13076c5c Dep update: uWebSockets to 19.2.0 2021-04-21 01:19:33 -03:00
Jason Rhinelander 376268fdc5
Merge pull request #1445 from darcys22/ons-fee-decrease-test
ONS tests - allow for extra burn in certain situations
2021-04-21 01:18:55 -03:00
Sean Darcy e21fe25d51 ONS tests - allow for extra burn in certain situations
The ONS burn price was lowered in HF 18 and the testnet has
transactions that are over the adjusted price. The codebase allows
for transactions already on testnet but in process broke the test suite.

See PR #1441 for further details
2021-04-21 11:29:51 +10:00
Sean 6d189d2ab0
Merge pull request #1443 from darcys22/pretty-print-versions
initialise version and pretty print if no version
2021-04-21 09:42:04 +10:00
Sean Darcy 435c187ca0 initialise version and pretty print if no version 2021-04-20 16:22:00 +10:00
Jason Rhinelander dfb3f29bfe Add warning if restoring an ed25519 key to a file name .../key
A couple people have messaged me now because they tried transferring
keys and used the `restore` command on their legacy `key` file, but it
restored an ed25519 key.

This adds a red warning if attempting to restore an ed key to a filename
ending in `/key` with a note about probably wanting the restore-legacy
command instead.
2021-04-20 00:27:48 -03:00
Sean 89f1850355
Merge pull request #1441 from jagerman/testnet-fee-sync-fix
Fixes testnet sync problem caused by retroactivitly dropping the ONS fees
2021-04-20 13:26:57 +10:00
Sean 5ffb5b27b5
Merge pull request #1442 from darcys22/sn-status-missing-timesync-info
Serialise extra fields for participation checks
2021-04-20 13:26:44 +10:00
Sean Darcy f151386cbe Serialise extra fields for participation checks 2021-04-20 13:21:22 +10:00
Jason Rhinelander ec5f548db5 Add hack to fix testnet sync
PR #1433 getting merged changed the fees within HF18 on testnet, which
broke syncing/ONS rescanning because the per-merged testnet has higher
fee ONS txes on it.

This adds a hack to allow wrong fees for blocks before yesterday.
2021-04-20 00:20:21 -03:00
Jason Rhinelander fd7c35801f Increase various potentially fatal error log levels
MERROR doesn't come through at default low-logging level so promote them
to MFATAL so it's more obvious where things are failing when they fail.
2021-04-20 00:16:20 -03:00
Sean 2047edcd79
Merge pull request #1439 from jagerman/macos-time-fix
macOS build fix
2021-04-19 15:48:15 +10:00
Sean cdcf7f251b
Merge pull request #1438 from jagerman/swarmid-fix
Swarm id fix
2021-04-19 15:48:06 +10:00
Jason Rhinelander 8e39c84e70 Add a virtual destructor to http_server_base
Clang warns about http_server having a non-virtual destructor; we aren't
actually doing anything that would cause problems, but the warning is
legit and a correct thing to fix.
2021-04-19 01:22:50 -03:00
Jason Rhinelander d205bc4400 Fix time_t conversion on macos
macOS's system_clock apparently only has microsecond resolution while
steady_clock has nanosecond, so the conversion here was failing (because
time_point conversions are only implicit when converting to a more
precise type).
2021-04-19 01:18:14 -03:00
Jason Rhinelander 4786320fcc Add tests for a couple 1-swarm starting point ids 2021-04-19 00:46:02 -03:00
Jason Rhinelander e5a46af41a Add a pre-determined list of random swarm ids
To immediately fail if any change break swarm id generation (at least in
a non-subtle way).
2021-04-19 00:17:03 -03:00
Sean aa3c599f68
Merge pull request #1436 from jagerman/ss-ping-redo
Storage server ping redo
2021-04-19 13:15:14 +10:00
Jason Rhinelander 2c96fa0f6c Don't sort an already-sorted vector
The swarm_ids are std::map keys, which means they are already sorted.

Put an assert in just to be paranoid.
2021-04-19 00:14:47 -03:00
Jason Rhinelander 1fb10d8b1d Fix get_new_swarm_id() returning MAX_ID/2 when single swarm
The important part here is removing this line:

    if (swarm_to_snodes.size() == 1) return MAX_ID / 2;

because, if we end up in a case where we have only one swarm and it
*already* has that ID (e.g. create 2, which will be [MAX/2,0] then drop
0) then this returns a swarm_id that already exists, which is bad
because then we fail to insert the new swarm, a service node gets left
with an unassigned swarm id, and that then causes issues in SS because
that node thinks it is deactivated because it doesn't have a swarm id
(yet it *is* in the active nodes list, so other network members still
try to talk to it).
2021-04-18 23:47:22 -03:00
Jason Rhinelander 7ecef1529d print_sn display tweaks
- decrease indent
- show lokinet address
2021-04-18 22:20:10 -03:00