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.
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).
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.
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.
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.
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).
* 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
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.
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.
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.
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.
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"
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.
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.
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.
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).
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).
This moves all the responsibility of ping testing (deciding when it's
unreachable, etc.) into oxend, allowing for better reporting on SS ping
results and eliminating some edge cases that can lead to oxend and
storage server getting "stuck" thinking each is in a different state.