Commit graph

145 commits

Author SHA1 Message Date
Riccardo Spagni ab69d5b367
Merge pull request #1569
16b8b66a specify restore height by YYYY-MM-DD format (kenshi84)
2017-01-15 20:32:57 -05:00
kenshi84 16b8b66adc specify restore height by YYYY-MM-DD format 2017-01-16 10:00:28 +09: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
kenshi84 ce866d1cc6 macro to define core RPC version for avoiding future mistake 2017-01-16 07:55:43 +09:00
Riccardo Spagni 10c6afd316
Merge pull request #1571
81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
2017-01-15 14:50:10 -05:00
moneromooo-monero 81c384e408
fix do_not_relay not preventing relaying on a timer
Also print its value when printing pool
2017-01-14 13:07:05 +00:00
moneromooo-monero 5b5017e267
rpc: add a command to get info about the current blockchain
About the tip of the main chain, and the last N blocks
2017-01-13 23:21:38 +00:00
Riccardo Spagni 0b6031adbf
Merge pull request #1543
19be7225 Add start_time to get_info methods and show uptime (Miguel Herranz)
2017-01-13 14:35:21 -05:00
Miguel Herranz 19be7225cc Add start_time to get_info methods and show uptime 2017-01-12 00:15:21 +01:00
kenshi84 f1dde1a429 wallet cli: print originating block heights of mixin keys when making transfer 2017-01-09 15:10:34 +09:00
Riccardo Spagni 15dcc5afd3
Merge pull request #1534
1607cb7e tx_pool: better block template filling algorithm (moneromooo-monero)
9731b4e5 rpc: add block size to GET_BLOCK_HEADER RPC (moneromooo-monero)
9188b346 rpc: add current block size to the getinfo call (moneromooo-monero)
2017-01-08 16:43:54 -08:00
moneromooo-monero 9731b4e54f
rpc: add block size to GET_BLOCK_HEADER RPC
and print it in print_bc
2017-01-06 19:38:27 +00:00
moneromooo-monero 9188b3468c
rpc: add current block size to the getinfo call 2017-01-06 19:30:10 +00:00
moneromooo-monero 94b6feef24
rpc: fix mixup in tx_info serialization 2016-12-24 18:08:48 +00:00
moneromooo-monero 55fa0479a0
rpc: new function and RPC to get alternative chain info 2016-12-17 11:28:49 +00:00
Lee Clagett bdc3d7496f Adding HTTP Digest Auth (but not yet enabled) 2016-12-13 00:19:54 -05:00
moneromooo-monero d6086f5b4e
Improve daemon RPC version handling
Daemon RPC version is now composed of a major and minor number,
so that incompatible changes bump the major version, while
compatible changes can still bump the minor version without
causing clients to unnecessarily complain.
2016-11-26 12:56:44 +00:00
moneromooo-monero 1d9e223944
rpc: do not include output indices for pool txes
Those aren't yet in the blockchain, so will not be found
(and aren't yet known, since it depends on where exactly the
tx will be mined in the next block or blocks)
2016-11-23 18:56:54 +00:00
moneromooo-monero e227d6e7ac
rpc: bump version after RPC changes 2016-11-22 20:01:20 +00:00
moneromooo-monero 2c0173c722
Add a get_outs (fully text based) version of get_outs.bin 2016-11-22 20:00:40 +00:00
moneromooo-monero e05907b3e7
rpc: add output indices to gettransactions
Someone apparently needs that to make a wallet but never asked.
If you read that and that's not what you wanted, the bugtracker
is at https://github.com/monero-project/monero/issues
2016-11-22 20:00:23 +00:00
moneromooo-monero 0e418d2a58
rpc: bump RPC version
I forgot to bump it previously when changing RPC, most notably
for the addition of the unlocked field in the histogram RPC.
This causes new wallets to not realize when they're talking to
an older daemon, and get confused trying to get outputs to use
as fake outs. This otherwise gratuitous bump ensures than old
daemons will be detected by wallets using this code.
2016-11-10 23:00:24 +00:00
moneromooo-monero e6deb8abda
rpc: add a dynamic fee estimation RPC call 2016-10-31 08:38:00 +00:00
Riccardo Spagni 854abeb3bb
Merge pull request #1247
10a79ea daemon: report transaction relay status in print_pool* commands (moneromooo-monero)
1e16366 core: notify the txpool when transactions are relayed (moneromooo-monero)
f3c374f tx_pool: set relayed flag on relay (moneromooo-monero)
2016-10-23 19:16:30 +02:00
moneromooo-monero 10a79eae24
daemon: report transaction relay status in print_pool* commands 2016-10-23 00:32:55 +01:00
Riccardo Spagni b9f31bbc10
Merge pull request #1222
5e10fb0 rpc: add blockchain cumulative difficulty to getinfo call (moneromooo-monero)
2016-10-22 22:14:35 +02:00
Riccardo Spagni 7426b5374f
Merge pull request #1221
094f4c8 rpc: add missing top block hash to json getinfo call (moneromooo-monero)
2016-10-22 22:13:24 +02:00
moneromooo-monero 88faec75fe
wallet: select part of the fake outs from recent outputs
25% of the outputs are selected from the last 5 days (if possible),
in order to avoid the common case of sending recently received
outputs again. 25% and 5 days are subject to review later, since
it's just a wallet level change.
2016-10-15 18:17:16 +01:00
moneromooo-monero 5e10fb042d
rpc: add blockchain cumulative difficulty to getinfo call 2016-10-15 15:00:21 +01:00
moneromooo-monero 094f4c8cc6
rpc: add missing top block hash to json getinfo call 2016-10-15 14:35:29 +01:00
Dion Ahmetaj 7db29d6903 print_coinbase_tx_sum now breaks output into fee and emission components 2016-10-10 19:55:18 -04:00
Dion Ahmetaj dd6c44327b changed params from start/end index to height/count 2016-10-10 17:19:36 -04:00
Dion Ahmetaj e95d3f359b attempted to remove whitespace spam 2016-10-10 16:41:24 -04:00
Dion Ahmetaj 412da63622 added print_coinbase_tx_sum option 2016-10-10 15:45:51 -04:00
Jacob Brydolf 79bb5a670a
Fix build after spelling corrections in core_rpc_server 2016-10-04 13:55:55 +02:00
Riccardo Spagni ab60c0503c
Merge pull request #1164
179b1f4 daemon: implement missing print_bc and matching RPC (moneromooo-monero)
2016-10-04 12:14:12 +02:00
Riccardo Spagni 4cb1348548
Merge pull request #1139
01ec195 Update CMakeLists.txt (codehalo)
446ebbc Update CMakeLists.txt (codehalo)
bd773e7 Update CMakeLists.txt (codehalo)
3627cea Cleanup. Dropped "bit" from bitmonero. (Randi Joseph)
2a51396 Dropped "bit" from bitmonero. (Randi Joseph)
78b13d6 Cleanup. Dropped "bit" from bitmonero. (Randi Joseph)
1e6aedb Cleanup. Dropped "bit" from bitmonero. (Randi Joseph)
9e54616 Dropped "bit" from bitmonero. (Randi Joseph)
2016-10-04 12:11:03 +02:00
Riccardo Spagni e34ef4de6c
Merge pull request #1171
6390673 Removed all code related to fast_exit (NanoAkron)
2016-10-04 11:41:41 +02:00
NanoAkron 6390673137 Removed all code related to fast_exit 2016-10-03 02:06:55 +01:00
moneromooo-monero 179b1f43af
daemon: implement missing print_bc and matching RPC 2016-10-02 10:21:21 +01:00
NanoAkron 25be1d3ed4 Noticed two spellings of the word 'response' in the codebase, one 'responce' and the other 'response'.
Fixed to the standard spelling 'response'. This may fix some functionality - some calls had mixed spellings.
2016-09-29 14:38:12 +01:00
Randi Joseph 9e54616924 Dropped "bit" from bitmonero. 2016-09-26 17:22:30 -04:00
moneromooo-monero eeb2bbc0fc
epee: optionally restrict HTTP service to a configurable user agent
This is intended to catch traffic coming from a web browser,
so we avoid issues with a web page sending a transfer RPC to
the wallet. Requiring a particular user agent can act as a
simple password scheme, while we wait for 0MQ and proper
authentication to be merged.
2016-09-18 20:32:02 +01: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 b951bc8780
wallet: transfer_selected_rct now also selects fake outs 2016-08-28 21:30:34 +01:00
moneromooo-monero 3cb2edec66
rpc: send global indices along with blocks/transacions on refresh
This plugs a privacy leak, where the wallet tells the daemon
which transactions contain outputs for the wallet by asking
for additional information for that particular transaction.

As a nice bonus, this actually makes refresh slightly faster.
2016-08-28 21:29:38 +01:00
moneromooo-monero c2ec6d35b9
mixable transactions must be rct for v3 2016-08-28 21:29:07 +01:00
moneromooo-monero dc4aad7eb5
add rct to the protocol
It is not yet constrained to a fork, so don't use on the real network
or you'll be orphaned or rejected.
2016-08-28 21:28:37 +01:00
moneromooo-monero 4258dab4d6
core: new /getrandom_rctouts.bin binary RPC call
to get random ringct outputs to mix with
2016-08-28 21:28:16 +01:00
moneromooo-monero 9e82b694da
remove original Cryptonote blockchain_storage blockchain format 2016-08-28 21:27:32 +01:00