Commit graph

13388 commits

Author SHA1 Message Date
Jason Rhinelander
e285cf0af1 Update dependencies to latest stable versions
I tried to update protobuf as well, but it doesn't compile on mingw, so
leave it as-is for now.
2021-01-06 19:30:08 -04:00
Jason Rhinelander
af115b7c5c Rename loki.conf -> oxen.conf when appropriate
Requires:
- config-file argument is not given
- default DATA/oxen.conf does not exist
- old DATA/loki.conf does exist
2021-01-06 18:12:07 -04:00
Jason Rhinelander
6e3ab03923 Add some color in main.cpp before log init 2021-01-06 18:11:57 -04:00
Jason Rhinelander
fd13a2250d Revert .oxen back to .loki in lns unit tests 2021-01-06 17:23:43 -04:00
Jason Rhinelander
7c62d94597 Change Loki startup message from green -> cyan 2021-01-06 17:23:08 -04:00
Jason Rhinelander
37053204f6 Update default ipc socket in lmq-rpc.py 2021-01-06 16:35:08 -04:00
Jason Rhinelander
c3d921e8aa Change Jason.oxen -> Blocks.loki in lmq lookup example script 2021-01-06 16:34:26 -04:00
Jason Rhinelander
c90e290e6f
Merge pull request #1379 from jagerman/fix-remote-oom-dos
Fix Monero P2P remote DOS
2021-01-06 16:00:54 -04:00
Jason Rhinelander
9dc41763d8 Update electron wallet filename 2021-01-06 14:22:58 -04:00
Jason Rhinelander
27d826b274 builds.lokinet.dev -> oxen.rocks 2021-01-06 14:07:20 -04:00
Jason Rhinelander
7e583f7137 Add 'include' & 'lib' dirs into android deps archive
This makes it directly extractable into what the new android wallet
expects (and matches the ios archive, aside from the arch subdirs).
2021-01-06 14:06:22 -04:00
Jason Rhinelander
de276503ad Remove all but the wallet2_api header for ios
The new ios wallet now uses the wallet2_api.h rather than directly
including core loki headers which greatly simplifies what we have to
package.
2021-01-06 12:51:56 -04:00
Sean Darcy
2e2fd28a2e handle .loki directory, leave .loki namespace 2021-01-06 17:04:17 +11:00
Jason Rhinelander
8771eb1255 Add optional stake amount calculation to rpc
Currently stake amounts are not exposed via RPC, although they *are*
public knowledge.  This adds an optional "stake_info" request field to
GET_TRANSACTIONS and GET_TRANSACTION_POOL which, if enabled, calculates
the staked amount and sets it in the response.
2021-01-05 22:25:20 -04:00
Sean Darcy
ed0eb9dc97 poor grammar 2021-01-05 14:32:31 +11:00
Sean Darcy
74107dc89a straighten ascii 2021-01-05 14:18:00 +11:00
Sean Darcy
b4901b54bb ascii art 2021-01-05 13:44:19 +11:00
Sean Darcy
29c2637946 tests 2021-01-05 13:29:04 +11:00
Sean Darcy
af653dac90 Drone static upload still looking for loki executables 2021-01-04 16:01:00 +11:00
Sean Darcy
b361902cb9 previously used an old monero log version 2021-01-04 15:55:23 +11:00
Sean Darcy
851f9af707 lokinet revert 2021-01-04 15:21:21 +11:00
Sean Darcy
432dc319a9 executable names changed 2021-01-04 14:19:42 +11:00
Sean Darcy
87811fe2ea compiles 2021-01-04 13:09:59 +11:00
Sean Darcy
0396698ee7 initial loki -> oxen pass 2021-01-04 11:09:45 +11:00
Jason Rhinelander
a0a80bebef Fix Monero P2P remote DOS
Monero serialization reserves memory before validating the size of the
incoming data, thus allowing a remote node to send malicious data that
causes the local node to run itself out of memory.

This fixes it by limiting the amount of memory we'll reserve in advance
to a sane amount.
2020-12-31 12:04:21 -04:00
Sean
b59ee4f84a
Merge pull request #1377 from darcys22/time-sync
Time sync
2020-12-19 07:42:50 +11:00
Jason Rhinelander
0dfc63137c
Merge pull request #1376 from jagerman/wallet-api-uint64-stakes
wallet api: Change stake amounts to uint64_t's
2020-12-18 01:47:00 -04:00
Jason Rhinelander
bca80dd5a9
Merge pull request #1371 from jagerman/stake-unlock-compilation-fixes
Fix some stake unlock wallet_api code compilation problems
2020-12-18 01:46:42 -04:00
Sean Darcy
9c51ffc4f5 hardfork hardcoded 2020-12-18 16:27:39 +11:00
Sean Darcy
426ad6b5f3 min version, delay testnet hardfork 2020-12-18 16:21:23 +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
b476a927d1
Merge pull request #1375 from darcys22/stake-pending-api-change
Clean up stake pending api call
2020-12-17 19:32:43 -04:00
Jason Rhinelander
1b8e80f693 Change stake amounts to uint64_t's
uint32_t's aren't big enough to hold typical stake amounts
2020-12-17 14:29:39 -04:00
Sean Darcy
158c385c86 Clean up stake pending api call
Changed the amount parameter to uint64_t rather than parsing a string
parameter, absorbed the error message into the pending transaction
struct.
2020-12-17 10:31:58 +11:00
Sean Darcy
cbbd1208f9 Replaces check for in sync with is close to being synced
The wallet can occassionally become "out of sync" when a new block is
added so it becomes one block behind the chain height. This results in
errors in the wallet which are unnecessary because the user immediately
calls the function after it fails and it will succeed.
2020-12-17 09:10:55 +11:00
Jason Rhinelander
4befe3f111
Merge pull request #1360 from jagerman/view-only-sign-errors
Error when trying to sign using a watch-only wallet
2020-12-14 18:27:35 -04:00
Jason Rhinelander
83d07ba55d
Merge pull request #1195 from jagerman/ledger-updates
Ledger updates
2020-12-14 18:26:15 -04:00
Jason Rhinelander
fa8ccd4f5d Compilation fixes for windows/mobile 2020-12-14 16:16:19 -04:00
Jason Rhinelander
3d4d6ba916 Inline get_unlock_time to resolve build dep issue
device_ledger needs to call it, but can't link against
cryptonote_basic, so provide an inline version.
2020-12-14 13:54:05 -04:00
Jason Rhinelander
438f403c01 Don't invoke cryptonote_core functions from device code
We can't call cryptonote::add_tx_secret_key_to_tx_extra from `device`
code because that isn't necessarily available in `device` (though for
some odd reason this only actually showed up on the i386 build).

This amends the call to just get the secret key, leaving the actual job
of adding it to tx.extra to the caller (which is a cleaner way to do it
anyway).
2020-12-14 11:51:29 -04:00
Jason Rhinelander
0ac05514b1 Fix the staking requirement test
7293311c52 broke these tests -- they were
broken already because they were testing values under HF13 rules, so the
15k requirement wasn't kicking in.  Updated them to better HF versions,
and fixed the tests to respect the HF16 requirement drop.
2020-12-14 03:38:00 -04:00
Jason Rhinelander
c7dde1c3d4 Annotate and fix double spend test
For some reason we aren't keeping the old chain as an alt chain anymore,
but that shouldn't be a problem: fix the test as well as make some
improvements in the tests it does.
2020-12-13 23:46:31 -04:00
Jason Rhinelander
7d9a565a8f Remove invalid Borromean test case
What we are passing here is invalid, and so raises an exception, but the
test structure here doesn't have a nice way to catch that, so just
disable the test.
2020-12-13 22:02:51 -04:00
Jason Rhinelander
aeefb62815 Fix multisig tests: switch to CLSAG txes 2020-12-13 21:49:20 -04:00
Jason Rhinelander
1f03bb41b7 Test suite: add tx version hack and remove broken tests
This adds a variable hack into loki-core that lets us disable the
transaction hard fork requirement so that the test suite can still
generate transactions under older tx rules even though the transactions
will be modern CLSAG txes.

These are sort of bastardized txes that can never occur on the proper
mainnet, but let us keep tests that apply to v2/v3 transactions even
though we can't actually generate proper v2/v3 transactions anymore.

A few tests got removed here because they are testing for old invalid
bulletproof formats that don't matter anymore because they will never be
accepted on the current chain anyway.
2020-12-13 21:42:10 -04:00
Jason Rhinelander
9cbb2261c7 Make deferred properly movable
Moving it does what you'd expect: moves the lambda, copies the current
cancel status, and cancels the old one.

The implicit move constructor could malfunction: the old one wouldn't
necessarily end up cancelled.
2020-12-13 21:34:40 -04:00
Jason Rhinelander
7293311c52 Remove dead LSR values
HF16's fixed requirement made the higher values here irrelevant.
2020-12-12 14:38:57 -04:00
Jason Rhinelander
331b14e8c3 Fix some stake unlock wallet_api code compilation problems
- stake_unlock_result.cpp wasn't actually getting built
- the `ptx()` return value wasn't compiling because there was no way to
convert the low-level pending_tx into a high-level PendingTransaction,
so I added code to make that work.
2020-12-12 13:32:07 -04:00
Jason Rhinelander
b2536f0d4b Make hf table generation non-sequential
There's no reason we need intermediate blocks, so make it just generate
v7@0 (for genesis), v14s to make funds, and the the target.  (Or just
v7@0 + target for <v14 hard fork versions).
2020-12-10 20:22:34 -04:00