Commit graph

13196 commits

Author SHA1 Message Date
Jason Rhinelander 4a87622a8e Fix a couple missed .oxen LNS suffixes 2021-01-07 23:50:27 -04:00
Jason Rhinelander 5cc0bec1b2
Merge pull request #1380 from darcys22/oxen-rebrand
Oxen rebrand
2021-01-07 18:25:01 -04:00
Jason Rhinelander 8c68a20556 Fix android tarfile creation 2021-01-07 17:33:04 -04:00
Jason Rhinelander 8913aecdb1 Config file migration fixes
The loki.conf -> oxen.conf migration wasn't working right when there is
also a ~/.loki -> ~/.oxen migration happening, so this rewrites it to
work properly:

- Make loki.conf -> oxen.conf migration leave behind a symlink
- Fix config file migration to also look for ~/.loki/loki.conf, and also
  consider ~/.loki/oxen.conf as a valid load source.  (The ~/.loki
  consideration only happens when data-dir is default *and* neither
  oxen.conf nor loki.conf are found in ~/.oxen).
- *Don't* look for ~/.loki/{loki,oxen}.conf if the default data dir
  (~/.oxen) exists.

Other changes:

- remove the default handling for the config file/log file and put it in
  main instead.  This is non-trivial, and the existing default is broken
  in that if you specify `--data-dir=blah` it still tries to load
  `~/.oxen/oxen.conf` rather than `blah/oxen.conf`.  With this commit it
  now does the expected thing when a data-dir is specified.
- Append /regtest to data-dir when running in --regtest mode.  The
  existing behaviour of clobbering the mainnet data dir is nasty.
2021-01-07 15:57:36 -04:00
Jason Rhinelander 95537a7e3e Eliminate tools::create_directories_if_necessary
We shouldn't actually use it in `main.cpp` because it is called before
the log system is initialized, and it is a wrapper that saves basically
nothing, so just replace it everywhere with direct calls to
fs::create_directories and delete it.
2021-01-07 15:26:30 -04:00
Jason Rhinelander f4a0d0a22f
Merge pull request #1383 from jagerman/dep-updates-20210106
Update dependencies to latest stable versions
2021-01-07 11:34:57 -04:00
Jason Rhinelander a103dafaa2
Merge pull request #1382 from jagerman/remove-ios-full-headers
ios & android package updates
2021-01-07 11:33:57 -04:00
Jason Rhinelander 02eda1d980
Merge pull request #1381 from jagerman/rpc-stake-amount
Add optional stake amount calculation to rpc
2021-01-07 11:32:37 -04:00
Jason Rhinelander 5e714a22d4
Merge pull request #1374 from darcys22/wallet-sync-height
Replaces check for in sync with is close to being synced
2021-01-07 11:32:13 -04:00
Jason Rhinelander 88b401cf88 Combine is_synced/is_close_to_synced
Add a `grace_blocks` (defaulting to 0) to `is_synced()`.
2021-01-07 10:45:54 -04:00
Jason Rhinelander bf7f4aaba8
Merge pull request #1385 from jagerman/wallet-cli-windows-save-fix
Fix cli wallet on Windows not saving properly
2021-01-07 10:40:44 -04:00
Sean Darcy eccac532ce oxen name system back to passing tests 2021-01-07 16:22:17 +11:00
Sean Darcy d198af3de6 line break 2021-01-07 14:41:14 +11:00
Sean Darcy 04114050e3 make lokid.sock and move the .oxen folder migration to before logs initialise folder 2021-01-07 14:39:58 +11:00
Jason Rhinelander f047c6f6bd
Merge pull request #1384 from jagerman/gui-wallet-build-fixes
Update electron wallet filename
2021-01-06 23:00:41 -04:00
Jason Rhinelander f200c6719b Fix cli wallet on Windows not saving properly
std::filesystem::rename() on windows appears buggy: it is meant to work
like POSIX rename (which atomically replaces the file if it exists), but
either mingw or Windows itself is buggy and just fails instead.  Delete
manually first, on Windows.
2021-01-06 21:56:27 -04:00
Sean Darcy 8261af980c default directory migration, .loki -> .oxen moved to .main 2021-01-07 10:31:28 +11:00
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