Commit Graph

100 Commits

Author SHA1 Message Date
Sean Darcy 432dc319a9 executable names changed 2021-01-04 14:19:42 +11:00
Sean Darcy 0396698ee7 initial loki -> oxen pass 2021-01-04 11:09:45 +11:00
Jason Rhinelander b627b3b4bb Move epee includes under "epee/..."
This ends epee's include pollution.
2020-10-24 12:46:27 -03:00
Jason Rhinelander 1dd98f3dae std::filesystem
Converts all use of boost::filesystem to std::filesystem.

For macos and potentially other exotic systems where std::filesystem
isn't available, we use ghc::filesystem instead (which is a drop-in
replacement for std::filesystem, unlike boost::filesystem).

This also greatly changes how we handle filenames internally by holding
them in filesystem::path objects as soon as possible (using
fs::u8path()), rather than strings, which avoids a ton of issues around
unicode filenames.  As a result this lets us drop the boost::locale
dependency on Windows along with a bunch of messy Windows ifdef code,
and avoids the need for doing gross boost locale codecvt calls.
2020-10-24 12:45:37 -03:00
Jason Rhinelander 463b2cbf01 Add simple delimiter joining string function
Because:

    boost::join(v | boost::adaptors::transformed([](uint64_t out){return std::to_string(out);}), " ")

is ugly as sin, while:

    tools::join(" ", v)

is nice and simple.

Also removes a few unnecessary boost iterator adaptor includes and uses.
2020-08-07 17:14:02 -03:00
Jason Rhinelander 48a0dc9eef More string_view niceties
- Adds a tools::trim that operates on a string_view to replace boost
string trim usage.

- Replaces some boost::split's with tools::split's

- updates vercmp to operate on string_views instead of c strings
2020-07-02 12:52:13 -03:00
Jason Rhinelander 24f084a73c Miscellaneous header updates via iwyu
Adds some missing required headers and removes some unnecessary ones.
2020-07-02 12:52:13 -03:00
Jason Rhinelander 6f3d3edd0d Use string_view for address lookups
Also DRY out a bunch of identical address-from-string code blocks.
2020-07-02 12:52:13 -03:00
Jason Rhinelander 29b18f6cc3 DNS: async multi-address lookup
Add a multi-address lookup mode to the unbound lookup code and remove
the gross code in net_node.inl that creates one thread per address.
(And worse, tries to use boost thread interruption which cannot work at
all since any such interruption is voluntary and won't do anything to a
thread that is stalled waiting for a synchronous libunbound lookup).

The replacement has unbound create and manage a single thread for async
lookups then waits up to the given timeout for results.

Currently this code isn't actually used because our seed node DNS list
is empty, but this lets us eliminate a boost::thread dependency while
not removing the feature (also includes a test case).
2020-07-02 12:52:13 -03:00
Jason Rhinelander e02545ca4b boost->std: mutex, locks; C++17 lock vars
Changes all boost mutexes, locks, and condition_variables to their stl
equivalents.

Changes all lock_guard/unique_lock/shared_lock to not specify the mutex
type (C++17), e.g.

    std::lock_guard foo{mutex};

instead of

    std::lock_guard<oh::um::what::mutex> foo{mutex};

Also changes some related boost::thread calls to std::thread, and some
related boost chrono calls to stl chrono.

boost::thread isn't changed here to std::thread because some of the
instances rely on some boost thread extensions.
2020-07-02 12:52:12 -03:00
Jason Rhinelander 96354a0e0f boost::optional -> std::optional 2020-07-02 12:52:12 -03:00
Jason Rhinelander 52838aa5b2 "Remove namespace pollution" << ENDL
Removes all "using namespace epee;" and "using namespace std;" from the
code and fixes up the various crappy places where unnamespaced types
were being used.

Also removes the ENDL macro (which was defined to be `std::endl`)
because it is retarded, and because even using std::endl instead of a
plain "\n" is usually a mistake (`<< std::endl` is equivalent to `<<
"\n" << std::flush`, and that explicit flush is rarely desirable).
2020-05-11 18:44:45 -03:00
Doyle a8365c9f7e Merge commit '633f14b9766f0aa9786147c0c151322380bb5c18' into MergeUpstream 2020-04-06 15:23:05 +10:00
tobtoht 037f94c54e
Remove Xiala.net from the list of dns resolvers
It is down permanently. See: https://xiala.net/
"Ende November 2018 werden alle Dienste von xiala.net abgeschaltet."
2019-06-21 09:40:10 +00:00
Doyle 8f1e65522e Merge commit '98f4c8a' into LokiMergeUpstream 2019-05-01 17:04:00 +10:00
Doyle aded2cef69 Merge commit '1ed6441' into LokiMergeUpstream 2019-04-12 17:44:20 +10:00
Doyle 9f2e091280 Merge commit 'e4b049d' into LokiMergeUpstream 2019-04-12 16:45:24 +10:00
Doyle 8f292af653 Don't query moneropulse in DNS code 2019-04-12 15:37:23 +10:00
Doyle 2fe5ddb2ca Merge commit 'f2f725d8db3535055d1c7e102c0bba75b22a3409' into LokiMergeUpstream 2019-04-12 15:23:01 +10:00
Doyle f9a6b06771 Merge commit '09b3b061bc4913b805a1207eb64f2bee6c1d0894' into LokiMergeUpstream 2019-04-12 14:53:01 +10:00
Doyle 892469ded1 Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
stoffu a2195b9b7f
crypto: replace rand<T>()%N idiom with unbiased rand_idx(N) 2019-04-04 22:38:19 +09:00
Riccardo Spagni c994dc7ec0
Merge pull request #5306
8a97563a Use threadpool instead of new threads for DNS queries (Howard Chu)
2019-04-01 17:27:09 +02:00
moneromooo-monero 223c6b0796
dns_utils: really add default DNSSEC servers on failure
Coverity 196597
2019-03-20 23:46:22 +00:00
Riccardo Spagni 2900f6a3ca
Merge pull request #5198
9c4d403a dns_utils: use fallback if the default resolver does not support DNSSEC (moneromooo-monero)
2019-03-19 10:58:25 +02:00
Riccardo Spagni 6031a1f5b4
Merge pull request #5179
7c09882a dns_utils: remove MoneroPulse/checkpoints mention in TXT record code (moneromooo-monero)
2019-03-17 17:53:53 +02:00
Howard Chu 8a97563a93
Use threadpool instead of new threads for DNS queries 2019-03-17 15:39:15 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero 9c4d403ae0
dns_utils: use fallback if the default resolver does not support DNSSEC 2019-02-27 11:08:56 +00:00
moneromooo-monero 7c09882a27
dns_utils: remove MoneroPulse/checkpoints mention in TXT record code
This code is used for more than just these
2019-02-21 17:38:43 +00:00
doy-lee 40506127a4 Merge commit '7e957c1' into LokiMergeUpstream 2018-12-11 13:46:35 +11:00
doy-lee d5beaee824 Merge commit 'a605c0d' into LokiMergeUpstream 2018-12-10 19:32:50 +11:00
Riccardo Spagni 81418cb281
Merge pull request #4894
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero)
1a0733e5 windows_service: fix memory leak (moneromooo-monero)
0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero)
5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero)
d4f50cb1 remove some unused code (moneromooo-monero)
61163971 a few minor (but easy) performance tweaks (moneromooo-monero)
30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
2018-12-04 17:33:19 +02:00
Riccardo Spagni c00ac446fd
Merge pull request #4854
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04 17:08:42 +02:00
moneromooo-monero d4f50cb109
remove some unused code
Found by codacy.com
2018-11-23 15:37:36 +00:00
doy-lee 5c6a7eaa85 Merge commit '84dd674' into LokiMergeUpstream 2018-11-22 14:42:14 +11:00
Martijn Otto bd98e99c80
Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
moneromooo-monero 71eb32a976
dns_utils: do not exit if DNS records are corrupt 2018-11-01 22:53:48 +00:00
doy-lee 339f96b0cc Merge commit 'c23b6f8' into LokiMergeUpstreamUntil_20181010_77e1ebf 2018-10-10 15:07:16 +11:00
doy-lee 2d3adf003b Merge commit '7addabc' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-10 10:30:31 +11:00
moneromooo-monero 8110bea34b
dns_utils: refresh list of usable DNSSEC servers
A few of them are now returning invalid replies.
2018-09-28 15:23:59 +00:00
moneromooo-monero 5083614ffa
dns_util: add new DNSSEC trust anchor for rollover
It should be useful from the 11th of october 2018.

The old key is still trusted for now.

https://www.icann.org/resources/pages/ksk-rollover
2018-08-28 11:29:51 +00:00
Haafingar c9e51bd178 Merge branch 'master' of https://github.com/monero-project/monero into upstream 2018-04-13 09:52:05 +10:00
moneromooo-monero a9cc88ee76
common: make this build with unbound 1.4.20
Common on currently used distros
2018-04-10 23:46:18 +01:00
Doyle T 161eda3fd1 First pass Monero to Loki refs 2018-04-10 14:49:20 +10:00
moneromooo-monero 71806327f5
dns: change default DNS to a worldwide selection
DNSSEC aware servers picked from https://wiki.ipfire.org/dns/public-servers
2018-02-08 09:46:16 +00:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero 09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
moneromooo-monero a4b4651cb0
dns_utils: allow an optional DNS server IP in DNS_PUBLIC
tcp://a.b.c.d
2017-10-10 12:29:05 +01:00
Riccardo Spagni abe24f4429
Merge pull request #2504
f182acdd dns_utils: query DNS records in parallel (moneromooo-monero)
2017-10-02 23:21:10 +04:00