Commit Graph

259 Commits

Author SHA1 Message Date
Gentian
4b932ff314 changed crypto to cncrypto so it generated libcncrypto
fix a cmakelist
2017-05-23 07:45:40 -04:00
xmr-eric
89e20bb9af Fix typo 2017-05-19 00:40:51 -04:00
Riccardo Spagni
9ed496bbc5
Merge pull request #1956
eb20f720 daemon: print average fee per byte in print_pool_stats (moneromooo-monero)
37be70bb daemon: add fee/byte when print pool transaction info (moneromooo-monero)
893f5a30 tx_pool: add blob size and fee/byte when logging a new tx (moneromooo-monero)
2017-04-11 00:34:46 +02:00
moneromooo-monero
eb20f7209e
daemon: print average fee per byte in print_pool_stats 2017-04-04 19:00:57 +01:00
moneromooo-monero
37be70bbd7
daemon: add fee/byte when print pool transaction info 2017-04-04 09:04:39 +01:00
moneromooo-monero
548075b1f5
daemon: new relay_tx command and RPC 2017-04-02 12:17:35 +01:00
moneromooo-monero
c94f8facf5
daemon: better error reporting in commands 2017-03-21 19:21:00 +00:00
Riccardo Spagni
4b34531307
Merge pull request #1897
44a5b038 create a foreground non-interactive mode (Noah Watkins)
2017-03-21 14:10:36 +02:00
moneromooo-monero
d5fbfd677c
daemon: fix missing close parenthesis in alt_chain_info output
Reported by assylias_ on IRC
2017-03-18 19:19:32 +00:00
moneromooo-monero
63d7cd8882
daemon: alt_chain_info now prints fork depth 2017-03-18 16:59:57 +00:00
kenshi84
7d07c64fe5
fix dependency: put HardFork back to cryptonote_basic, made some BlockchainDB functions virtual again to avoid missing symbols error 2017-03-10 11:22:39 +09:00
Howard Chu
3964b30f2d
Add dependency for blocksdat.o
To make sure it gets regenerated whenever checkpoints.dat changes
Likewise for blocks.o and testnet_blocks.o
2017-03-04 22:02:10 +00:00
Riccardo Spagni
9e10fac223
Merge pull request #1814
11a00df6 daemon: fix bc_dyn_stats via rpc (moneromooo-monero)
2017-03-03 14:14:51 +02:00
Riccardo Spagni
1965c819f6
Merge pull request #1811
378d2bb1 Revert attempt to write to console on daemon shutdown (Nano Akron)
2017-03-03 14:13:52 +02:00
Riccardo Spagni
3787ffca80
Merge pull request #1804
12adb4a3 core: move hardfork back to cryptonote_core (moneromooo-monero)
2017-03-03 14:11:09 +02:00
moneromooo-monero
11a00df699
daemon: fix bc_dyn_stats via rpc 2017-02-26 23:12:55 +00:00
Nano Akron
378d2bb1ff
Revert attempt to write to console on daemon shutdown 2017-02-26 21:49:50 +00:00
moneromooo-monero
12adb4a3f3
core: move hardfork back to cryptonote_core
should fix a cross dependency betewen cryptonote_basic and
blockchain_db
2017-02-25 16:41:35 +00:00
moneromooo-monero
ea873ceb2c
daemon/rpc: updates command and RPC
subcommands "check", "download", and "update".
update is not yet implemented.
2017-02-24 23:18:27 +00:00
moneromooo-monero
2b188151d4
daemon: avoid pre-log-init spew on creating directories 2017-02-24 19:08:20 +00:00
Miguel Herranz
3bdda60f3e Add print_pl_stats daemon command 2017-02-23 18:20:17 +01:00
Noah Watkins
44a5b03841 create a foreground non-interactive mode
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-02-21 16:44:22 -08: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
417b126fc4
Fix core_tests breaking on startup
You're wondering how this fixes core tests, aren't you...

It prevents the miner (initialized by cryptonote::core) from
breaking trying to access arguments that were not added.
Since the tests don't use the miner directly, it makes more
sense to have cryptonote_core add those, since it also uses
the miner.
2017-02-21 15:06:07 +00:00
Riccardo Spagni
826f49485e
Merge pull request #1716
b560ed4a daemon: silence spurious warning about uninitialized variable (moneromooo-monero)
2017-02-21 11:23:38 +02:00
Dion Ahmetaj
69ab14d91e More robust battery status handling.
Added an extra path to check for linux power supply status.
Added ignore battery option. If set to true, then when we can't figure out
the power status, we'll assume the system is plugged in.
2017-02-16 14:35:01 -05:00
moneromooo-monero
b560ed4ac6
daemon: silence spurious warning about uninitialized variable
Also fixes a leak
2017-02-13 22:39:25 +00:00
Riccardo Spagni
b1df7f114d
Merge pull request #1711
cf2e75eb daemon: fix crash on exit when mining (moneromooo-monero)
2017-02-12 23:24:49 +02:00
moneromooo-monero
cf2e75ebb3
daemon: fix crash on exit when mining
When exiting while the miner is running, finding a block after
the p2p layer has been shutdown will cause a crash as the now
uninitialized p2p layer is asked to relay the found block to
any peers.
2017-02-12 11:09:21 +00:00
Dion Ahmetaj
ad95e65028 Added a note about smart mining to status command. Fixed up a bug where I was resetting bg mining enabled instead of started. Upped the miner threshold. Also moved setting of enabled on start above miner thread creation since starting with true, then stopping, then starting with false resulted in race condition. 2017-02-10 18:07:43 -05:00
Dion Ahmetaj
345ed4823c Background/smart mining. If a users' computer is plugged into a power
source, and CPU has been idle for some time, then begin mining to some
threshold (don't destroy the users' CPU).

This patch only supports windows and linux (I've only tested on Win64 and
Ubuntu).

The variables currently default to pretty conservative values (i.e. 20%
CPU mining threshold).
2017-02-10 18:07:39 -05:00
Riccardo Spagni
eacf2124b6 Merge pull request #1689
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-11 00:35:25 +02:00
Riccardo Spagni
4feaa790e2
Merge pull request #1680
db0a5392 Clarify in/out connections for users (NanoAkron)
2017-02-11 00:21:12 +02:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Lee Clagett
ce7fcbb4ae Add server auth to monerod, and client auth to wallet-cli and wallet-rpc 2017-02-06 01:15:41 -05:00
NanoAkron
db0a5392a5
Clarify in/out connections for users 2017-02-05 11:15:51 +00:00
Miguel Herranz
03ff363982 Fix missing parentheses 2017-02-02 22:05:31 +01:00
Riccardo Spagni
b01990124e
Merge pull request #1663
bbcc3a12 Add missing include (Miguel Herranz)
2017-02-02 22:41:58 +02:00
Riccardo Spagni
f4fe39ca92
Merge pull request #1654
084aef70 Added days uptime to the status message (NanoAkron)
2017-02-02 21:38:15 +02:00
Miguel Herranz
bbcc3a125f Add missing include
Fails to build without it.
2017-02-02 19:54:17 +01:00
Riccardo Spagni
10bf54bfc9
Merge pull request #1628
66665003 Clear feedback to user when daemon has stopped successfully (NanoAkron)
2017-02-02 18:44:41 +02:00
NanoAkron
084aef700b
Added days uptime to the status message
Also broke down the time calculations for legibility
2017-01-31 09:49:32 +00:00
NanoAkron
66665003bd
Clear feedback to user when daemon has stopped successfully 2017-01-25 00:37:23 +00:00
moneromooo-monero
a39cd745c9
rpc: fix bc_dyn_stats not setting grace blocks
This caused a random value to be used, and the resulting
incorrect fee when it wasn't 0.
2017-01-23 19:28:00 +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
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
Chris Vickio
3b6d5f255d make struct/class declarations consistent (mismatched-tags warning) 2017-01-14 15:06:07 +03: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
Miguel Herranz
19be7225cc Add start_time to get_info methods and show uptime 2017-01-12 00:15:21 +01: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
kenshi84
99580adf66 make openalias also available for solo miner; introduce namespace tools::dns_utils; support integrated address with dns lookup 2016-12-21 23:12:15 +09:00
moneromooo-monero
55fa0479a0
rpc: new function and RPC to get alternative chain info 2016-12-17 11:28:49 +00:00
Dion Ahmetaj
d61bd8187e add lightweight block propagation ("fluffy blocks")
Added a new command to the P2P protocol definitions to allow querying for support flags.

Implemented handling of new support flags command in net_node. Changed for_each callback template to include support flags. Updated print_connections command to show peer support flags.

Added p2p constant for signaling fluffy block support.

Added get_pool_transaction function to cryptnote_core.

Added new commands to cryptonote protocol for relaying fluffy blocks.

Implemented handling of fluffy block command in cryptonote protocol.

Enabled fluffy block support in node initial configuration.

Implemented get_testnet function in cryptonote_core.

Made it so that fluffy blocks only run on testnet.
2016-11-09 14:24:27 -05:00
moneromooo-monero
eb4ecd442d
daemon: fix min/max tracking using the wrong size
Reported by iDunk
2016-10-23 23:18:34 +01:00
moneromooo-monero
30946700a3
daemon: even when switching branches, compile the damn thing ffs 2016-10-23 20:21:00 +01:00
moneromooo-monero
2f4f6c7c26
daemon: do not divide by 0 when the pool is empty 2016-10-23 20:05:13 +01:00
Riccardo Spagni
a0975e59ed
Merge pull request #1250
839280d daemon: add a print_pool_stats daemon command (moneromooo-monero)
2016-10-23 19:25:33 +02:00
moneromooo-monero
839280d5fc
daemon: add a print_pool_stats daemon command
Helps see what's going on now that Monero is getting used
2016-10-23 16:11:20 +01:00
moneromooo-monero
10a79eae24
daemon: report transaction relay status in print_pool* commands 2016-10-23 00:32:55 +01: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
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
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
Riccardo Spagni
fa1d5efb5a
Merge pull request #1168
10be903 Brackets to prevent premature return (NanoAkron)
fb1785a Brackets to ensure doesn't function prematurely return (NanoAkron)
8ed0d72 Moved logging to target functions rather than caller (NanoAkron)
442bfd1 Added messages at log level 2 to reflect deactivation procedure (NanoAkron)
2016-10-04 11:41:13 +02:00
Riccardo Spagni
298a0723e8
Merge pull request #1149
25be1d3 Noticed two spellings of the word 'response' in the codebase, one 'responce' and the other 'response'. (NanoAkron)
2016-10-04 11:34:53 +02:00
Riccardo Spagni
8a67e3c95e
Merge pull request #1145
8438fb4 Improving daemon startup log message (NanoAkron)
2016-10-04 11:29:46 +02:00
NanoAkron
8ed0d72b12
Moved logging to target functions rather than caller 2016-10-03 22:11:00 +01: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
NanoAkron
8438fb4ae3 Improving daemon startup log message 2016-09-28 01:47:45 +01:00
Randi Joseph
9e54616924 Dropped "bit" from bitmonero. 2016-09-26 17:22:30 -04:00
moneromooo-monero
8b4e7c6c9c
daemon: report status at 99.9% rather than 100% when not quite synced
Less confusing for users.
2016-09-24 11:45:19 +01: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
423776f9b1
daemon: log version when starting
Helps with investigating bug reports
2016-09-16 20:47:52 +01:00
Riccardo Spagni
d4a533a800
Merge pull request #1068
a5af33d Add libminiupnpc and libunwind to snap. (Casey Marshall)
823843e Fix portability issues discovered with fresh snap install. (Casey Marshall)
0a56d83 Add snap packaging. (Casey Marshall)
2016-09-15 15:20:38 +02:00
Casey Marshall
0a56d83d3d Add snap packaging.
This adds [snap](https://snapcraft.io) packaging to the project. See the
link for more information on snaps. Snap packages install on all Linux
distributions. On Ubuntu, snap confinement with apparmor and seccomp
provide an additional layer of security.

This snap sets up monerod as a systemd service, which should start
immediately on install. To access the wallet CLI, simply run `monero`
(/snap/bin/monero). I think it's a really quick & easy way to get
started with monero.

I've made some opinionated decisions in the packaging just to kick this
off, but I'm happy to iterate on this stuff.
2016-09-11 11:17:12 -05:00
iDunk5400
f1381388ec Daemon: fix hashrate display in diff command output 2016-09-10 23:16:25 +02:00
Riccardo Spagni
df63e0704a
fix remaining bitmonero and simplewallet bits 2016-09-03 22:03:44 +02:00
Riccardo Spagni
2e984bc23c
rename Monero daemon 2016-09-03 13:46:41 +02:00
Quanah Gibson-Mount
1d5ba65f3d Fix incorrect help usage for the threads option to start_mining 2016-08-30 14:59:28 -07:00
moneromooo-monero
7e4e0021f4
daemon: print time to next fork 2016-08-12 20:32:23 +01:00
redfish
0f990d0183 cmake,common: flag for stack trace
By default the flag is enabled whenever libunwind is found on the
system, with the exception of static build on OSX (for which we can't
install the throw hook #932 due to lack of support for --wrap in OSX
ld64 linker).
2016-07-27 01:52:33 -04:00
moneromooo-monero
78cc10f3fa
daemon: fix ban seconds being misinterpreted as absolute
Absolute to relative conversion is already done by the callee.
2016-07-10 15:13:53 +01:00
moneromooo-monero
459ec6040e
daemon: print exception errors when failing to parse config file
When an exception happens while reading the config file, we need
to print the error, as the logging system isn't initialized yet,
so the generic catch will not print anything.
2016-06-30 22:15:40 +01:00
Riccardo Spagni
e97d96ccfb
Merge pull request #775
e409e59 Print stack trace on exceptions (moneromooo-monero)
ef4ff42 connection_basic: avoid gratuitous exception (moneromooo-monero)
2016-06-19 21:14:11 +02:00
moneromooo-monero
e409e59d29
Print stack trace on exceptions
if libunwind is found.

Useful for debugging logs.
2016-04-28 23:34:51 +01:00
moneromooo-monero
513a658c87
add a --max-concurrency flag
It sets the max number of threads to use for a parallel job.
This is different that the number of total threads, since monero
binaries typically start a lot of them.
2016-04-28 20:33:59 +01:00
Riccardo Spagni
c2e9866fc6
Merge pull request #797
d662ab5 rpc: print human readable time since received when printing pool (moneromooo-monero)
5c9dd23 rpc: add a do_not_relay boolean to tx submission (moneromooo-monero)
2016-04-14 16:20:41 +09:00
moneromooo-monero
f17b2f42b2
rpc: add pool/blockchain and block height results to gettransactions 2016-04-09 12:40:32 +01:00
moneromooo-monero
d662ab5cec
rpc: print human readable time since received when printing pool 2016-04-05 20:16:05 +01:00
moneromooo-monero
600a3cf0c0
New RPC and daemon command to get output histogram
This is a list of existing output amounts along with the number
of outputs of that amount in the blockchain.

The daemon command takes:
- no parameters: all outputs with at least 3 instances
- one parameter: all outputs with at least that many instances
- two parameters: all outputs within that many instances

The default starts at 3 to avoid massive spamming of all dust
outputs in the blockchain, and is the current minimum mixin
requirement.

An optional vector of amounts may be passed, to request
histogram only for those outputs.
2016-03-26 21:10:43 +00:00