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.
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.
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.
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.
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.
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