Commit graph

315 commits

Author SHA1 Message Date
Erik de Castro Lopo
ece9bcf5c6 rpc_client: Fix error handling
Previous code was unable to distingush between a connection error
and a communication error.
2018-01-29 11:54:57 +11:00
Riccardo Spagni
4c302c6385
Merge pull request #3120
6cf56682 perf_timer: add faster x86_64 timers, and pause/resume (moneromooo-monero)
411da337 perf_timer: use std::unique_ptr instead of new/delete (moneromooo-monero)
2018-01-27 17:24:49 -08:00
Matt Little
1dfed567e2 Fixed #if instead of #ifdef 2018-01-27 13:33:11 -07:00
xmr-eric
84a7f6a482 Readd copyright starting date 2018-01-26 10:03:20 -05:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
Riccardo Spagni
700b3193f8
Merge pull request #3084
5f5a51a6 util: warn if unbound was not built with threads (moneromooo-monero)
2018-01-25 16:56:28 -08:00
Riccardo Spagni
ea75e71dd2
Merge pull request #3052
d507167f Removed unused mac-specific output folder path (Maxithi)
2018-01-25 16:54:45 -08:00
Riccardo Spagni
c16261c8da
Merge pull request #3013
fe436eca apply_permutation.h: add #pragma once (moneromooo-monero)
2018-01-25 16:37:28 -08:00
Matt Little
7c4424531f Support building cncrypto lib with msvc 2018-01-25 13:00:45 -07:00
moneromooo-monero
6cf56682bc
perf_timer: add faster x86_64 timers, and pause/resume 2018-01-15 00:35:55 +00:00
moneromooo-monero
411da337d2
perf_timer: use std::unique_ptr instead of new/delete 2018-01-15 00:35:24 +00:00
Riccardo Spagni
e61f655440
Merge pull request #3061
fc041b58 common cmake: make sure translation_files.h is generated for i18n.cpp (stoffu)
2018-01-10 11:55:35 +01:00
moneromooo-monero
fdd4c5e577
move memwipe to epee to avoid common<->crypto circular dependencies 2018-01-10 01:57:54 +00:00
moneromooo-monero
40ab12a773
epee: remove dependency on common 2018-01-10 01:57:51 +00:00
moneromooo-monero
5f5a51a6c8
util: warn if unbound was not built with threads
This can causes crashes in libunbound
2018-01-08 10:58:50 +00:00
Maxithi
d507167fa5
Removed unused mac-specific output folder path 2018-01-04 21:16:44 +01:00
stoffu
fc041b58d6
common cmake: make sure translation_files.h is generated for i18n.cpp 2018-01-04 12:24:06 +09:00
Riccardo Spagni
aa4195e199
Merge pull request #2977
c70e8daa threadpool: fix deadlock in recursive waiter usage (moneromooo-monero)
2018-01-02 00:31:56 +02:00
Riccardo Spagni
dd11bfb89c
Merge pull request #2934
db2bc965 Embed the translation files in the binary (Guillaume LE VAILLANT)
2018-01-02 00:28:45 +02:00
moneromooo-monero
fe436eca46
apply_permutation.h: add #pragma once 2017-12-27 12:15:51 +00:00
moneromooo-monero
da0fd71d3e
only include the easylogging++ stack trace code when needed 2017-12-26 11:40:15 +00:00
Riccardo Spagni
b38f6dcf0b
Merge pull request #2929
ae55bacd resumption support for updates using range requests (moneromooo-monero)
fe0fae50 epee: add a get_file_size function (moneromooo-monero)
2017-12-25 21:20:22 +02:00
Riccardo Spagni
32c14e0f37
Merge pull request #2922
a1d44f27 updates: use https for updates (moneromooo-monero)
472a93c8 download: SSL suport (moneromooo-monero)
2017-12-25 21:18:29 +02:00
Riccardo Spagni
2f09828ea8
Merge pull request #2890
83b0f9e6 version: add -master to master version (moneromooo-monero)
493f7d09 util: allow non numeric version parts (moneromooo-monero)
2017-12-25 21:13:59 +02:00
moneromooo-monero
c70e8daa91
threadpool: fix deadlock in recursive waiter usage
If a queued job uses a waiter, then we want to run that waiter's
jobs in the current thread if all threads are busy, even if the
queue is empty, since there is no guarantee that any thread will
free up to take care of that new job, since all the threads might
be running a job which spawns such a recursive job and will block
till that recursive job is done, which it will never be since it
relies on the queue being polled by one of those blocked threads.
2017-12-23 09:00:43 +00:00
Riccardo Spagni
a3a8343051
Merge pull request #2857
7193b89f Scrub keys from memory just before scope end. (moneromooo-monero)
2017-12-17 13:00:11 +02:00
moneromooo-monero
09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
moneromooo-monero
7193b89fe5 Scrub keys from memory just before scope end.
Partially implements #74.

Securely erases keys from memory after they are no longer needed. Might have a
performance impact, which I haven't measured (perf measurements aren't
generally reliable on laptops).

Thanks to @stoffu for the suggestion to specialize the pod_to_hex/hex_to_pod
functions. Using overloads + SFINAE instead generalizes it so other types can
be marked as scrubbed without adding more boilerplate.
2017-12-16 15:40:33 -07:00
Riccardo Spagni
b88f0879b5
Merge pull request #2873
1c838552 Simplewallet.cpp: Fewer pleases in seed NOTE (xmr-eric)
3f18c642 Fix password capitalization mismatch (xmr-eric)
2017-12-16 23:25:43 +02:00
Riccardo Spagni
6c0953b15a
Merge pull request #2860
3dffe71b new wipeable_string class to replace std::string passphrases (moneromooo-monero)
7a2a5741 utils: initialize easylogging++ in on_startup (moneromooo-monero)
54950829 use memwipe in a few relevant places (moneromooo-monero)
000666ff add a memwipe function (moneromooo-monero)
2017-12-16 23:19:27 +02:00
Guillaume LE VAILLANT
db2bc96512 Embed the translation files in the binary
If a translation file exists in a "translations" directory located in
the same directory as the binary, it is used in priority (this can be
useful when working on translations as you don't have to recompile the
whole program all the time), and if no such file is found the embedded
translation file is used (if it exists).
2017-12-15 18:44:01 +01:00
moneromooo-monero
ae55bacd8c
resumption support for updates using range requests 2017-12-15 10:46:23 +00:00
moneromooo-monero
a1d44f2746
updates: use https for updates 2017-12-14 13:33:06 +00:00
moneromooo-monero
472a93c83a
download: SSL suport 2017-12-14 09:12:58 +00:00
moneromooo-monero
fe1202646c
perf_timer: add non scoped start/stop timer defines 2017-12-07 19:23:14 +00:00
moneromooo-monero
493f7d0974
util: allow non numeric version parts 2017-12-07 10:32:48 +00:00
xmr-eric
3f18c642fc
Fix password capitalization mismatch 2017-11-28 11:15:50 -05:00
moneromooo-monero
3dffe71b72
new wipeable_string class to replace std::string passphrases 2017-11-27 22:25:57 +00:00
moneromooo-monero
7a2a574118
utils: initialize easylogging++ in on_startup
It will be reinitialized later once we know about log file
and other command line configuration
2017-11-27 22:15:40 +00:00
moneromooo-monero
549508296d
use memwipe in a few relevant places 2017-11-27 22:15:37 +00:00
moneromooo-monero
000666ff78
add a memwipe function
It's meant to avoid being optimized out

memory_cleanse lifted from bitcoin
2017-11-27 22:15:34 +00:00
Riccardo Spagni
51e7645836
Merge pull request #2839
0b08bf39 fixed common/util.cpp to link against libressl (ston1th)
2017-11-27 22:43:01 +02:00
ston1th
0b08bf3968 fixed common/util.cpp to link against libressl 2017-11-18 19:02:09 +01:00
iDunk5400
fdf0acbf97
Tools, daemonizer: fix building on Windows 2017-11-15 23:12:02 +01:00
Riccardo Spagni
edebe4e3b6
Merge pull request #2736
0d9c0db9 Do not build against epee_readline if it was not built (Howard Chu)
178014c9 split off readline code into epee_readline (moneromooo-monero)
a9e14a19 link against readline only for monerod and wallet-wallet-{rpc,cli} (moneromooo-monero)
437421ce wallet: move some scoped_message_writer calls from the libs (moneromooo-monero)
e89994e9 wallet: rejig to avoid prompting in wallet2 (moneromooo-monero)
ec5135e5 move input_line from command_line to simplewallet (moneromooo-monero)
082db75f move cryptonote command line options to cryptonote_core (moneromooo-monero)
2017-11-14 21:31:51 +02:00
moneromooo-monero
e89994e98f
wallet: rejig to avoid prompting in wallet2
wallet2 is a library, and should not prompt for stdin. Instead,
pass a function so simplewallet can prompt on stdin, and a GUI
might display a window, etc.
2017-11-14 17:06:26 +00:00
moneromooo-monero
ec5135e5b7
move input_line from command_line to simplewallet
It was only used there, and this removes one part of the common
dependency on libreadline
2017-11-14 17:06:23 +00:00
moneromooo-monero
082db75f28
move cryptonote command line options to cryptonote_core
Those have no reason to be in a generic module
2017-11-14 17:06:19 +00:00
Pavel Maryanov
a17efcb039
make this build on SunOS/Solaris 2017-11-14 17:03:48 +00:00
Riccardo Spagni
68d5952f6a
Merge pull request #2752
68c01782 updates: add a special case for "install-" build tags on windows (moneromooo-monero)
2017-11-14 15:49:53 +02:00
Riccardo Spagni
a2b427b1bf
Merge pull request #2749
f732e723 Disguise password length in prompt (Leon Klingele)
2017-11-14 15:35:47 +02:00
Riccardo Spagni
0d0ce8c21e
Merge pull request #2742
7c7d3672 Increase LMDB maxreaders if large number of threads in use (Howard Chu)
6738753b Use max_concurrency as-is (Howard Chu)
2017-11-14 15:30:03 +02:00
Riccardo Spagni
8df6b010eb
Merge pull request #2696
937e7f8a Initialize openssl on startup (moneromooo-monero)
2017-11-14 15:13:44 +02:00
Riccardo Spagni
f4fded6fcf
Merge pull request #2683
105425b7 simplewallet: reject invalid argument for boolean parameter (stoffu)
2017-11-14 15:04:15 +02:00
Riccardo Spagni
f26e7a84a6
Merge pull request #2620
6bd4dac6 util: ignore SIGPIPE (moneromooo-monero)
2017-11-14 14:54:42 +02:00
stoffu
105425b7f6
simplewallet: reject invalid argument for boolean parameter 2017-11-14 16:33:17 +09:00
moneromooo-monero
68c0178220
updates: add a special case for "install-" build tags on windows
Those will have a ".exe" file extension, not .zip.
2017-11-03 09:45:08 +00:00
Leon Klingele
f732e723b7
Disguise password length in prompt 2017-11-03 04:04:54 +01:00
Howard Chu
6738753b30
Use max_concurrency as-is
Don't try to 2nd guess user
2017-11-02 16:33:48 +00:00
moneromooo-monero
937e7f8aa6
Initialize openssl on startup 2017-10-21 10:17:18 +01:00
Riccardo Spagni
1280ba4f5b
Merge pull request #2589
8f0cea63 add a command_line function to check for defaulted options (moneromooo-monero)
2017-10-15 18:38:46 +02:00
Riccardo Spagni
c45f3ac4d9
Merge pull request #2568
7130cf0c Add tools::on_startup, and warn about glibc 2.25 bug if found (moneromooo-monero)
2017-10-15 18:32:09 +02:00
moneromooo-monero
7130cf0c61
Add tools::on_startup, and warn about glibc 2.25 bug if found
https://sourceware.org/bugzilla/show_bug.cgi?id=21778
2017-10-14 09:12:28 +01: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
moneromooo-monero
6bd4dac6e2
util: ignore SIGPIPE
In practice, this seems to cause monero-wallet-rpc to exit
when ^C quits whatever its output is piped into (such as tee),
but it saves, while it did not before.
2017-10-09 21:46:01 +01:00
moneromooo-monero
8f0cea6355
add a command_line function to check for defaulted options 2017-10-06 10:56:18 +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
Riccardo Spagni
08ada1fa8b
Merge pull request #2440
6137a0b9 blockchain: reject unsorted ins and outs from v7 (moneromooo-monero)
16afab90 core: sort ins and outs key key image and public key, respectively (moneromooo-monero)
0c36b9f9 common: add apply_permutation file and function (moneromooo-monero)
2017-09-25 16:49:01 +02:00
Riccardo Spagni
c2e46edca2
Merge pull request #2398
e0592e87 dns_utils: remove a few obsolete things (moneromooo-monero)
2017-09-25 16:44:37 +02:00
Riccardo Spagni
216395d43e
Merge pull request #2379
9c83f806 Do not create file when RPC user/pass is given and use file locking (Lee Clagett)
2017-09-25 16:40:35 +02:00
moneromooo-monero
f182acdd36
dns_utils: query DNS records in parallel 2017-09-21 09:23:08 +01:00
Riccardo Spagni
8f1f43163a
Merge pull request #2412
81fb2f53 Silence more stupid gcc warnings (Howard Chu)
2017-09-20 21:37:40 +02:00
Riccardo Spagni
1a73843cec
Merge pull request #2446
6d0ca7d1 Tweak concurrency limits (Howard Chu)
510d0d47 Use a threadpool (Howard Chu)
2017-09-18 13:19:26 +02:00
Riccardo Spagni
591e53445b
Merge pull request #2044
0299cb77 Fix various oversights/bugs in ZMQ RPC server code (Thomas Winget)
77986023 json serialization for rpc-relevant monero types (Thomas Winget)
5c1e08fe Refactor some things into more composable (smaller) functions (Thomas Winget)
9ac2ad07 DRY refactoring (Thomas Winget)
2017-09-18 13:08:16 +02:00
moneromooo-monero
6137a0b94d
blockchain: reject unsorted ins and outs from v7
This ensures no information is leaked by the ordering
2017-09-18 11:23:15 +01:00
Howard Chu
6d0ca7d11f
Tweak concurrency limits
Create capacity for 2x max, but lie about it
2017-09-15 00:28:48 +01:00
Howard Chu
510d0d4753
Use a threadpool
Instead of constantly creating and destroying threads
2017-09-14 21:42:48 +01:00
moneromooo-monero
0c36b9f931
common: add apply_permutation file and function
This algorithm is adapted from Raymond Chen's code:
https://blogs.msdn.microsoft.com/oldnewthing/20170109-00/?p=95145
2017-09-13 09:25:01 +01:00
Howard Chu
81fb2f5347
Silence more stupid gcc warnings 2017-09-08 11:36:49 +01:00
Thomas Winget
77986023c3
json serialization for rpc-relevant monero types
Structured {de-,}serialization methods for (many new) types
which are used for requests or responses in the RPC.

New types include RPC requests and responses, and structs which compose
types within those.

# Conflicts:
#	src/cryptonote_core/blockchain.cpp
2017-09-05 12:20:27 -04:00
moneromooo-monero
e0592e87d8
dns_utils: remove a few obsolete things 2017-09-04 10:04:31 +01:00
moneromooo-monero
6ac61100a1
Add a --fluffy-blocks option to relay blocks as fluffy blocks
Defaults to off, but fluffy blocks are forced enabled on testnet
2017-09-03 11:11:11 +01:00
Lee Clagett
9c83f8063d Do not create file when RPC user/pass is given and use file locking 2017-08-30 17:39:59 -04:00
moneromooo-monero
a95e460c71
move db specific options to BlockchainDB
Avoids common depending on blockchain_db, which can cause
link errors.
2017-08-29 11:43:34 +01:00
Riccardo Spagni
ff0afc196e
Merge pull request #2313
3dd34a49 Cleanup test impact of moving blockchain_db_types() (Howard Chu)
80344740 More DB support cleanup (Howard Chu)
4c7f8ac0 DB cleanup (Howard Chu)
2017-08-26 23:43:09 +02:00
Riccardo Spagni
335681896a
Merge pull request #2311
df0cffed cryptonote_protocol: warn if we see a higher top version we expect (moneromooo-monero)
317ab21a cryptonote_protocol: less strict check on top version on connect (moneromooo-monero)
cc81a371 cryptonote_protocol: update target height when syncing too (moneromooo-monero)
e2ad372b cryptonote_protocol: simplify and remove unnecessary casts (moneromooo-monero)
727e67ca cryptonote_protocol: print peer top height along with its version (moneromooo-monero)
b5345ef4 crypto: use malloc instead of alloca (moneromooo-monero)
80794b31 thread_group: set thread size to THREAD_STACK_SIZE (moneromooo-monero)
5524bc31 print peer id in 0 padded hex for consistency (moneromooo-monero)
8f8cc09b contrib: add sync_info to rlwrap command set (moneromooo-monero)
70b8c6d7 cryptonote_protocol: misc fixes to the new sync algorithm (moneromooo-monero)
2017-08-25 00:21:28 +02:00
moneromooo-monero
80794b3114
thread_group: set thread size to THREAD_STACK_SIZE 2017-08-23 13:38:00 +01:00
moneromooo-monero
64ab88446a
rpc_client: print destination host/port when failing to connect 2017-08-22 12:00:37 +01:00
Howard Chu
80344740bd
More DB support cleanup
Hide DB types from db_types.h - no reason to recompile dependencies
when DB types change.

Also remove lingering in-memory DB references, they've been
obsolete since 9e82b694da
2017-08-20 13:57:36 +01:00
moneromooo-monero
5a283078ec
cryptonote_protocol: large block sync size before v4 2017-08-17 13:11:52 +01:00
Riccardo Spagni
3ff67323b7
Merge pull request #2288
c6e200a8 core: add --db-salvage command line flag (moneromooo-monero)
2017-08-15 20:57:26 +02:00
Riccardo Spagni
e457cc7891
Merge pull request #2281
e499ff33 simplewallet: factor out message_writer (moneromooo-monero)
7ed5ab47 scoped_message_writer: pause readline to match simplewallet (moneromooo-monero)
2017-08-15 20:54:21 +02:00
Riccardo Spagni
1cf4665d2a
Merge pull request #2237
5d4ef719 core: speed up output index unique set calculation (moneromooo-monero)
19d7f568 perf_timer: allow profiling more granular than millisecond (moneromooo-monero)
bda8c598 epee: add nanosecond timer and pause/restart profiling macros (moneromooo-monero)
2017-08-15 20:45:47 +02:00
moneromooo-monero
c6e200a8ab
core: add --db-salvage command line flag
Use to load the database when the primary meta page is corrupted
2017-08-12 19:04:44 +01:00
moneromooo-monero
e499ff3322
simplewallet: factor out message_writer 2017-08-11 13:38:42 +01:00
moneromooo-monero
7ed5ab47ea
scoped_message_writer: pause readline to match simplewallet 2017-08-11 13:38:18 +01:00
moneromooo-monero
569b9b2b50
updates: add "misc_log_ex.h" for logs 2017-08-07 14:42:08 +01:00
moneromooo-monero
74628941d5
dns_utils: add <functional> for std::function 2017-08-07 14:35:41 +01:00
Riccardo Spagni
ea46a5527a
Merge pull request #2234
214fd81e some include cleanup (moneromooo-monero)
2017-08-07 15:13:07 +02:00
Riccardo Spagni
a6ea26e7fa
Merge pull request #2215
06aea2cf move get_proof_of_trust_hash from util.h to p2p_protocol_defs.h (moneromooo-monero)
2017-08-07 15:10:42 +02:00