Commit Graph

224 Commits

Author SHA1 Message Date
Thomas Winget 0299cb77ca
Fix various oversights/bugs in ZMQ RPC server code
- Add some RPC commands (and touch up a couple others)
- some bounds checking
- some better pointer management
- const correctness and error handling

-- Thanks @vtnerd for type help with serialization and CMake changes
2017-09-05 12:20:40 -04: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
Jaquee f233c01c8f CMakeLists.txt - ios/xcode fix 2017-08-05 19:21:10 +02:00
Roberto Oliveira 44bfe6048b enable monero build on ppc64le architecture
Fix wrong flags for ppc64le:
-maes - not avaiable
-march - changed by -mcpu that does the same for powerpc
2017-06-27 17:06:19 +00:00
jethro e1f3dfccc8 Add readline support to cli
This PR adds readline support to the daemon and monero-wallet-cli. Only
GNU readline is supported (e.g. not libedit) and there are cmake checks
to ensure this.

There is a cmake variable, Readline_ROOT_DIR that can specify a
directory to find readline, otherwise some default paths are searched.

There is also a cmake option, USE_READLINE, that defaults to ON. If set
to ON, if readline is not found, the build continues but without
readline support.

One negative side effect of using readline is that the color prompt in
the wallet-cli now has no color and just uses terminal default. I know
how to fix this but it's quite a big change so will tackle another time.
2017-06-18 10:08:37 -04:00
stoffu dd8e3266b2
shared libs build (i.e. make debug) 2017-05-17 10:17:08 +09:00
hyc e65d66fe04 Fix ARM64 identification
The actual arch flag the compiler recognizes is "armv8-a".
This is true for both gcc and clang.
2017-04-12 23:54:33 +01:00
Riccardo Spagni e9ca165b1a
Merge pull request #1950
f5bd3465 IOS CMAKE build settings (Jaquee)
d8a88d05 add IOS CMAKE toolchain (Jaquee)
2017-04-11 00:26:15 +02:00
moneromooo-monero a8ac4f0a70
update easylogging++ to latest upstream 2017-04-10 21:05:02 +01:00
Jaquee f5bd346573
IOS CMAKE build settings 2017-04-03 18:38:50 +02:00
Christoph Schnerch 33f3cfdec0 set USE_LTO_DEFAULT to false 2017-03-20 13:24:30 +01:00
Gareth 088930facc Problem: misleading information about LMDB storage
Solution: updated the comments to reflect the current situation in terms of LMDB implementation and no longer recommend 'memory' for blockchain storage in production use.
2017-03-08 21:29:08 +08:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Riccardo Spagni 058eed369b
cmakify openssl 2017-02-21 17:11:12 +02:00
moneromooo-monero f640512c53
Optionally query moneropulse DNS records to check for updates
It just checks and prints a message if there is a new version
for now.
2017-02-20 22:58:16 +00:00
Riccardo Spagni c64e10c2d7
Merge pull request #1700
73785263 backtrace_symbols() requires -lexecinfo on dragonflybsd (Dan Miller)
2017-02-12 23:20:27 +02:00
Dan Miller 7378526393 backtrace_symbols() requires -lexecinfo on dragonflybsd
freebsd also needs -lexecinfo for backtrace()
2017-02-09 11:22:12 -08:00
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
MoroccanMalinois c833a39a4d cmake set atomic for android 2017-02-05 04:33:33 +01:00
moneromooo-monero cd34fc655d
Use easylogging++'s stack trace facility where possible
This avoids using libunwind, which often causes trouble.
2017-02-04 12:33:03 +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
Chris Vickio d561f4ad92 enable clang checks that were disabled 2017-01-15 19:23:33 +03:00
NanoAkron e68ea86cc4
Change logic of testing for libunwind on OSX and ARM 2017-01-09 16:39:44 +00:00
Riccardo Spagni 2a996f492f
Merge pull request #1510
80abc3bc Build wallet with Android NDK (MoroccanMalinois)
2017-01-08 16:40:02 -08:00
MoroccanMalinois 80abc3bc4a Build wallet with Android NDK 2017-01-05 01:11:05 +00:00
Randi Joseph 52db01ea6d Silence CMake policy warning on macos.
See: https://cmake.org/cmake/help/v3.0/policy/CMP0042.html
2016-12-23 02:54:34 -05:00
Antonio Huete Jimenez b00da61eab Preliminary support for DragonFly BSD
- It builds but no further testing has been done.
2016-12-15 02:27:53 -08:00
NanoAkron b9c5f29d1d
Revert forcing -fPIC for all ARMv8 builds 2016-12-09 12:01:16 +00:00
NanoAkron 65528aef4e
Always compile Position Independent Code on 64-bit ARMv8 systems 2016-11-12 00:26:49 +00:00
NanoAkron a269f03e5d
Report Boost library version during compilation 2016-10-27 21:38:29 +01:00
Riccardo Spagni 2025e8241c
Merge pull request #1105
344e96c remove check for certain clang versions (Dan Miller)
b73bed2 Don't define stdc++ on FreeBSD (Dan Miller)
2016-09-26 17:32:14 +02:00
Dan Miller 344e96cc08 remove check for certain clang versions 2016-09-21 06:42:21 -07:00
Dan Miller b73bed2992 Don't define stdc++ on FreeBSD 2016-09-19 16:19:54 -07:00
NanoAkron b8fb9d1919 Fix test for 'ARM_ID' as caught by @radfish in #1088 2016-09-18 22:56:38 +01:00
Riccardo Spagni da6f7d99f8
fix conflict 2016-09-18 20:22:43 +02:00
Riccardo Spagni 4a03a8a1da
Merge pull request #1094
06bb692 cmake: support BUILD_SHARED_LIBS built-in option (redfish)
e1c7af3 cmake: transitive deps and remove deprecated LINK_* (redfish)
54010b9 crypto: armv7: slow-hash: remove redundant source include (redfish)
2016-09-18 11:44:08 +02:00
redfish 06bb6923c3 cmake: support BUILD_SHARED_LIBS built-in option
Support building internal libraries as shared. This reduces
development time by eliminating the need to re-link all
binaries every time non-interface code in the library changes.
Instead, can hack on libxyz, then `make libxyz`, and re-run
monerod.

By default BUILD_SHARED_LIBS is OFF in release build type,
and ON in debug build type, but can be overriden with -D.
2016-09-18 02:56:26 -04:00
NanoAkron 7f00a4abf4 +crypto for ARMv8 now tests and modifies ${ARCH$ 2016-09-18 03:26:18 +01:00
NanoAkron fd82635396 Updated +crypto option for ARMv8 to modify ${ARCH} instead 2016-09-18 03:23:15 +01:00
NanoAkron d76aec6121 Add +crypto flag for ARMv8-a 2016-09-17 22:13:39 +01:00
redfish c79104086c cmake: quotes around ARCH_ID string
It's only blank only if somebody running cmake in MSYS/MinGW (Windows)
manually forgets to add -D ARCH, but when it is blank, without quotes
those lines are invalid cmake syntax.
2016-09-17 15:36:15 -04:00
redfish aa9a64556d cmake: remove redundant checks around CMAKE_{AR,RANLIB}
Those are always set, no point in checking. #1065
2016-09-17 00:04:08 -04:00
iDunk5400 1855213c8f Attempt to fix broken compilation on some systems caused by #1074 2016-09-10 22:56:40 +02:00
Riccardo Spagni 1d0578f8d3
Merge pull request #1047
0f94f61 cmake: handle dists which prefix gcc binaries wth arch triplet (redfish)
2016-09-10 15:11:16 +02:00
Riccardo Spagni 7bebbbe5fe
Merge pull request #1040
77fa663 cmake: split BUILD_GUI_DEPS option into two (redfish)
2016-09-10 15:10:08 +02:00
Riccardo Spagni 011c94c622
change CMake project name 2016-09-03 21:38:20 +02:00
redfish 77fa663e94 cmake: split BUILD_GUI_DEPS option into two
The split is to make this software more packageable. 'make install'
is used by the package building scripts, and should not be installing
vendored dependencies onto the system.
2016-09-03 12:55:20 -04:00
Ilya Kitaev 43677f9d68 gui/libwallet_merged: libunbound is one more dependency 2016-09-03 13:32:06 +03:00
redfish e374ae7eeb cmake: option+target for profiling for coverage 2016-09-01 10:47:43 -04:00