Commit graph

98 commits

Author SHA1 Message Date
kenshi84
53ad5a0f42
Subaddresses 2017-10-07 13:06:21 +09:00
Howard Chu
510d0d4753
Use a threadpool
Instead of constantly creating and destroying threads
2017-09-14 21:42:48 +01:00
Gentian
4b932ff314 changed crypto to cncrypto so it generated libcncrypto
fix a cmakelist
2017-05-23 07:45:40 -04:00
Lee Clagett
93e10f1cc4 Simplified the implementation and features of span 2017-04-11 16:35:14 -04:00
Lee Clagett
4a8f96f95d Improvements for epee binary to hex functions:
- Performance improvements
  - Added `span` for zero-copy pointer+length arguments
  - Added `std::ostream` overload for direct writing to output buffers
  - Removal of unused `string_tools::buff_to_hex`
2017-04-11 16:35:00 -04:00
moneromooo-monero
00cbf72064
ringct: move ge_frombytes_vartime failure error to warning
Avoids scaring people when seeing some invalid txes
2017-03-22 21:26:38 +00:00
moneromooo-monero
da18898f0e
ringct: do not require range proof in decodeRct/decodeRctSimple
These fields aren't used, and they'll actually be pruned in
some cases
2017-02-27 22:28:45 +00:00
Riccardo Spagni
c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
moneromooo-monero
d282cfcc46
core: test key images against validity domain 2017-02-20 22:58:25 +00:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Timothy D. Prime
6b145763f7 Fix clang build failure, caused by mixing C and C++
Easily fixed by moving a C++ header out of 'extern "C" {...}'.

When building with CC=clang CXX=clang++ make,
[ 21%] Building CXX object src/ringct/CMakeFiles/obj_ringct.dir/rctTypes.cpp.o
In file included from /home/tdprime/bitmonero/src/ringct/rctTypes.cpp:31:
In file included from /home/tdprime/bitmonero/src/ringct/rctTypes.h:43:
In file included from /home/tdprime/bitmonero/src/crypto/generic-ops.h:34:
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/cstring💯3: error: conflicting types for 'memchr'
  memchr(void* __s, int __c, size_t __n)
    ^
	/usr/include/string.h:92:14: note: previous declaration is here
	extern void *memchr (const void *__s, int __c, size_t __n)
	             ^
... and 4 more similar errors
2017-01-26 17:30:00 -08:00
moneromooo-monero
6cc7d26140
ringct: reorder a bit to check quicker tests first 2017-01-21 20:29:22 +00:00
moneromooo-monero
5833d66f65
Change logging to easylogging++
This replaces the epee and data_loggers logging systems with
a single one, and also adds filename:line and explicit severity
levels. Categories may be defined, and logging severity set
by category (or set of categories). epee style 0-4 log level
maps to a sensible severity configuration. Log files now also
rotate when reaching 100 MB.

To select which logs to output, use the MONERO_LOGS environment
variable, with a comma separated list of categories (globs are
supported), with their requested severity level after a colon.
If a log matches more than one such setting, the last one in
the configuration string applies. A few examples:

This one is (mostly) silent, only outputting fatal errors:

MONERO_LOGS=*:FATAL

This one is very verbose:

MONERO_LOGS=*:TRACE

This one is totally silent (logwise):

MONERO_LOGS=""

This one outputs all errors and warnings, except for the
"verify" category, which prints just fatal errors (the verify
category is used for logs about incoming transactions and
blocks, and it is expected that some/many will fail to verify,
hence we don't want the spam):

MONERO_LOGS=*:WARNING,verify:FATAL

Log levels are, in decreasing order of priority:
FATAL, ERROR, WARNING, INFO, DEBUG, TRACE

Subcategories may be added using prefixes and globs. This
example will output net.p2p logs at the TRACE level, but all
other net* logs only at INFO:

MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE

Logs which are intended for the user (which Monero was using
a lot through epee, but really isn't a nice way to go things)
should use the "global" category. There are a few helper macros
for using this category, eg: MGINFO("this shows up by default")
or MGINFO_RED("this is red"), to try to keep a similar look
and feel for now.

Existing epee log macros still exist, and map to the new log
levels, but since they're used as a "user facing" UI element
as much as a logging system, they often don't map well to log
severities (ie, a log level 0 log may be an error, or may be
something we want the user to see, such as an important info).
In those cases, I tried to use the new macros. In other cases,
I left the existing macros in. When modifying logs, it is
probably best to switch to the new macros with explicit levels.

The --log-level options and set_log commands now also accept
category settings, in addition to the epee style log levels.
2017-01-16 00:25:46 +00:00
Riccardo Spagni
ec323d8c3f
Merge pull request #1561
d561f4ad enable clang checks that were disabled (Chris Vickio)
0aefb2f6 remove std::move from return statements (pessimizing-move warning) (Chris Vickio)
629d5b76 change counter from bool to int (deprecated-increment-bool warning) (Chris Vickio)
fb76d439 add extra braces around subobjects (missing-braces warning) (Chris Vickio)
3b6d5f25 make struct/class declarations consistent (mismatched-tags warning) (Chris Vickio)
fcf66925 remove unused fields from network_throttle (unused-private-field warning) (Chris Vickio)
296f8c16 inline unused function (for unused-function warning) (Chris Vickio)
2017-01-15 19:01:08 -05:00
moneromooo-monero
ba3968f6ce
rct: split rct checks between semantics and other
Semantics can be checked early
2017-01-14 21:17:32 +00:00
Chris Vickio
fb76d43980 add extra braces around subobjects (missing-braces warning) 2017-01-14 15:06:07 +03:00
Lee Clagett
e3639f5cc3 Removed unused functions 2016-12-19 14:47:26 -05:00
moneroexamples
374b58d131 fix MGs json 2016-12-14 09:27:37 +08:00
luigi1111
9d906159c3
Tx verification failing is not an error
And rangeProofs are on outputs...
2016-12-12 17:01:20 -06:00
Riccardo Spagni
e6b05ed95a
Merge pull request #1414
3b005275 ringct: add sc_check calls in MLSAG_Ver for ss and cc (moneromooo-monero)
2f1732a7 ringct: guard against bad data exceptions in worker threads (moneromooo-monero)
2016-12-08 23:44:09 +02:00
moneromooo-monero
3b00527500
ringct: add sc_check calls in MLSAG_Ver for ss and cc
luigi1111's recommendation
2016-12-07 22:41:21 +00:00
moneromooo-monero
2f1732a7e5
ringct: guard against bad data exceptions in worker threads
If purported pubkeys aren't actually valid pubkeys, exceptions
will fly. These will terminate if thrown in a worker thread.
Guard against this.
2016-12-07 22:09:43 +00:00
luigi1111
46a0dcc1d2
ringct: luigi1111's changes to fix and speedup Borromean sigs 2016-12-04 21:54:16 +00:00
Shen Noether
76958fc75a
ringct: switch to Borromean signatures 2016-12-04 21:54:11 +00:00
moneromooo-monero
59443bf9df
ringct: fix MGs serialization to JSON 2016-12-02 13:16:19 +00:00
Lee Clagett
f025198f19 Added task_region - a fork/join task implementation 2016-11-23 14:41:25 -05:00
Lee Clagett
64094e5f4e adding thread_group for managing async tasks 2016-11-02 19:21:55 -04:00
Riccardo Spagni
d51f1af75f
Merge pull request #1272
48b57d8 monero.supp: valgrind suppressions file (moneromooo-monero)
ffd8c41 ringct: check the size of amount_keys is the same as destinations (moneromooo-monero)
836669d ringct: always shutdown the boost io service (moneromooo-monero)
2016-11-01 21:49:30 +02:00
moneromooo-monero
ffd8c41f36
ringct: check the size of amount_keys is the same as destinations 2016-10-29 13:33:48 +01:00
moneromooo-monero
836669d276
ringct: always shutdown the boost io service
Even if no worker threads were started, it needs shutting down
or it will cause an invalid access in the io service thread
2016-10-29 13:31:53 +01:00
moneromooo-monero
59f0d4b574
ringct: some more small optimizations 2016-10-23 16:10:17 +01:00
moneromooo-monero
3429bfb71d
ringct: thread verRct and verRctSimple 2016-10-15 13:32:13 +01:00
moneromooo-monero
e06a4daf33
ringct: remove unneeded type conversions 2016-10-15 11:58:39 +01:00
moneromooo-monero
afc70df7ea
ringct: reserve space in vectors to avoid excessive reallocation 2016-10-15 11:58:34 +01:00
moneromooo-monero
9ebf7b6dcf
ringct: avoid unnecessary memcpy 2016-10-15 11:58:29 +01:00
moneromooo-monero
1fe75c1ea7
ringct: add a few consts where possible 2016-10-15 11:58:24 +01:00
moneromooo-monero
ab002a1d97
ringct: pass vectors by const ref where possible 2016-10-15 11:58:18 +01:00
moneromooo-monero
4038e86527
Add performance timers for ringct tx verification 2016-10-10 21:24:21 +01:00
moneromooo-monero
3126ba7425
ringct: use const refs as parameters where appropriate 2016-10-08 22:16:23 +01:00
Randi Joseph
9e54616924 Dropped "bit" from bitmonero. 2016-09-26 17:22:30 -04:00
redfish
e1c7af35d4 cmake: transitive deps and remove deprecated LINK_*
Keep the immediate direct deps at the library that depends on them,
declare deps as PUBLIC so that targets that link against that library
get the library's deps as transitive deps.

Break dep cycle between blockchain_db <-> crytonote_core.
No code refactoring, just hide cycle from cmake so that
it doesn't complain (cycles are allowed only between
static libs, not shared libs).

This is in preparation for supproting BUILD_SHARED_LIBS cmake
built-in option for building internal libs as shared.
2016-09-18 02:56:26 -04:00
moneromooo-monero
7d413f635f
rct: rework serialization to avoid storing vector sizes 2016-09-14 20:23:06 +01:00
moneromooo-monero
f24ab58d18
ringct: remove unused code 2016-08-28 21:30:53 +01:00
moneromooo-monero
b38452bd55
ringct: pass structure by const ref, not value 2016-08-28 21:30:51 +01:00
moneromooo-monero
fd11271eea
ringct: use memcpy/memset instead of handwritten loop where appropriate 2016-08-28 21:30:49 +01:00
moneromooo-monero
5d38206fcc
ringct: remove spurious copies 2016-08-28 21:30:47 +01:00
moneromooo-monero
16732a85d7
rct: faster Cryptonote/rct conversions 2016-08-28 21:30:45 +01:00
moneromooo-monero
94fd881f74
rct: early out on failure on verRange 2016-08-28 21:30:38 +01:00
moneromooo-monero
074e602609
ringct: use Cryptonote serialization to hash non prunable data 2016-08-28 21:30:28 +01:00
moneromooo-monero
c3b3260ae5
New "Halfway RingCT" outputs for coinbase transactions
When RingCT is enabled, outputs from coinbase transactions
are created as a single output, and stored as RingCT output,
with a fake mask. Their amount is not hidden on the blockchain
itself, but they are then able to be used as fake inputs in
a RingCT ring. Since the output amounts are hidden, their
"dustiness" is not an obstacle anymore to mixing, and this
makes the coinbase transactions a lot smaller, as well as
helping the TXO set to grow more slowly.

Also add a new "Null" type of rct signature, which decreases
the size required when no signatures are to be stored, as
in a coinbase tx.
2016-08-28 21:30:26 +01:00