Commit graph

2526 commits

Author SHA1 Message Date
Riccardo Spagni
59d96eedd8
Merge pull request #1724
cca95c1c blockchain_db: do not throw on expected partial results getting keys (moneromooo-monero)
2017-02-21 11:23:03 +02:00
Riccardo Spagni
565c99f670
Merge pull request #1731
a427235e core: add a missing newline on a string to be logged (moneromooo-monero)
b6a2230e unit_tests: fix minor blockchain_db regression (moneromooo-monero)
c488eca5 hardfork: tone down some logs (moneromooo-monero)
2017-02-21 11:21:57 +02:00
Riccardo Spagni
6994c85201
Merge pull request #1733
a493c0b1 BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS was odr-used, so required a definition. (Dion Ahmetaj)
2017-02-21 11:21:14 +02:00
Riccardo Spagni
d11dbe7dc2
Merge pull request #1744
a5a0a3c8 core: updates can now be downloaded (and SHA256 hash checked) (moneromooo-monero)
216f062e util: add a SHA256 function (moneromooo-monero)
4bf78492 mlog: only silence errors for net by default, not net.* (moneromooo-monero)
d282cfcc core: test key images against validity domain (moneromooo-monero)
efb72e74 http_client: add a couple consts (moneromooo-monero)
f640512c Optionally query moneropulse DNS records to check for updates (moneromooo-monero)
e3cae4ae core: display any fork warning at startup too (moneromooo-monero)
969ad710 dns_utils: fix first checked DNS entry being ignored (moneromooo-monero)
08c3f380 util: add a vercmp function to compare version numbers (moneromooo-monero)
e8a7525c dns_utils: factor TXT record loading code from checkpoint code (moneromooo-monero)
2017-02-21 11:16:43 +02:00
Riccardo Spagni
d2059dfab2
Merge pull request #1737
69ab14d9 More robust battery status handling. (Dion Ahmetaj)
2017-02-21 11:16:08 +02:00
Riccardo Spagni
d596722dfa
Merge pull request #1749
5a3b1e98 wallet2: fix failure to send (relatedness check in wrong case) (moneromooo-monero)
2017-02-21 11:15:40 +02:00
moneromooo-monero
a5a0a3c894
core: updates can now be downloaded (and SHA256 hash checked) 2017-02-20 22:58:37 +00:00
moneromooo-monero
216f062eb8
util: add a SHA256 function 2017-02-20 22:58:33 +00:00
moneromooo-monero
d282cfcc46
core: test key images against validity domain 2017-02-20 22:58:25 +00: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
moneromooo-monero
e3cae4ae2e
core: display any fork warning at startup too
This is a good time for the operator to be around and see it
2017-02-20 22:58:12 +00:00
moneromooo-monero
969ad710ba
dns_utils: fix first checked DNS entry being ignored 2017-02-20 22:58:08 +00:00
moneromooo-monero
08c3f38031
util: add a vercmp function to compare version numbers
It is simple, supports simple x.y.z type numeric versions,
and does not attempt any kind of validation
2017-02-20 22:58:04 +00:00
moneromooo-monero
e8a7525ceb
dns_utils: factor TXT record loading code from checkpoint code 2017-02-20 22:57:57 +00:00
Riccardo Spagni
5892f653c7
Merge pull request #1729
9925edcb rpc: fix some RPC calls not returning OK status when needed (moneromooo-monero)
2017-02-21 00:52:12 +02:00
Riccardo Spagni
ba633d33a8
Merge pull request #1732
83ec209f simplewallet: validate hex input size (moneromooo-monero)
2017-02-21 00:51:46 +02:00
Riccardo Spagni
675434ffab
Merge pull request #1748
bed2d9f2 Get rid of directory lock (Howard Chu)
2e913676 Handle map resizes from other processes (Howard Chu)
bf1348b7 Can't cache num_txs or num_outputs either (Howard Chu)
dc53e9ee Add a few read txns to streamline (Howard Chu)
2017-02-21 00:51:13 +02:00
moneromooo-monero
c32830937c
tx_pool: revert template filling changes
They are not ready yet
2017-02-20 22:43:37 +00:00
moneromooo-monero
5a3b1e983c
wallet2: fix failure to send (relatedness check in wrong case)
A relatedness check was meant to be done in the case of adding
an extra output if just one was enough. This was mistakenly
added to the "preferred output" case.
2017-02-19 09:31:54 +00:00
Howard Chu
bed2d9f231
Get rid of directory lock
We don't need it any more. Fixes issue #1633
2017-02-18 22:22:24 +00:00
Howard Chu
2e9136767e
Handle map resizes from other processes 2017-02-18 22:22:24 +00:00
Howard Chu
bf1348b7e2
Can't cache num_txs or num_outputs either
Same reason as 3ff54bdd7a
2017-02-18 21:01:24 +00:00
Howard Chu
dc53e9eef2
Add a few read txns to streamline
Slight perf gain, but mainly to reduce spam at loglevel 3
2017-02-18 21:01:24 +00:00
moneromooo-monero
26bd7aac03
wallet_api: fix logging init via api 2017-02-18 20:44:23 +00: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
Dion Ahmetaj
a493c0b196 BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS was odr-used, so required a definition.
Instead of adding a declaration to cpp file, I changed it to non odr-used.
2017-02-15 11:15:12 -05:00
Howard Chu
424b76a4e5
Fix spurious synchronization status msgs
Only update target height if it's actually greater than the current target.
Only display "synchronized" when current height equals target.
2017-02-15 14:41:42 +00:00
moneromooo-monero
83ec209f42
simplewallet: validate hex input size 2017-02-14 19:45:46 +00:00
moneromooo-monero
a427235e30
core: add a missing newline on a string to be logged 2017-02-14 19:14:41 +00:00
moneromooo-monero
c488eca5e8
hardfork: tone down some logs 2017-02-14 18:56:39 +00:00
moneromooo-monero
9925edcb1e
rpc: fix some RPC calls not returning OK status when needed 2017-02-13 23:50:10 +00:00
moneromooo-monero
b560ed4ac6
daemon: silence spurious warning about uninitialized variable
Also fixes a leak
2017-02-13 22:39:25 +00:00
NanoAkron
67693415ff
Fix compiler error about nested externs in slow_hash.c by moving declarations 2017-02-13 22:35:43 +00:00
moneromooo-monero
0288310e3b
blockchain_db: add "raw" blobdata getters for block and transaction
This speeds up operations such as serving blocks to syncing peers
2017-02-13 21:11:37 +00:00
moneromooo-monero
53f040445f
cryptonote_protocol: tweaks to the syncing speedup
- only pause mining once we've got the lock (in practice, it'll
  already be paused by another thread if we can't get the lock
  at once though)
- do not call prepare_handle_incoming_blocks when we dismissed
  all the blocks, it only causes cleanup_handle_incoming_blocks
  to complain afterwards
2017-02-13 19:36:31 +00:00
moneromooo-monero
cca95c1c7a
blockchain_db: do not throw on expected partial results getting keys
When scanning for outputs used in a set of incoming blocks,
we expect that some of the inputs in their transactions will
not be found in the blockchain, as they could be in previous
blocks in that set. Those outputs will be scanned there at
a later point. In this case, we add a flag to control wehther
an output not being found is expected or not.
2017-02-13 19:05:30 +00:00
moneromooo-monero
d43fde8a9b
network_throttle: demote spammy logs to TRACE 2017-02-13 16:54:45 +00:00
Riccardo Spagni
6e78915061
Merge pull request #1718
882db8e9 tools: log to the correct file (moneromooo-monero)
142e5e1e tools: set requested log level (moneromooo-monero)
2017-02-12 23:28:56 +02:00
Riccardo Spagni
e246dd1443
Merge pull request #1717
8bdc86be protocol: speed up sync by minimizing duplicate work (moneromooo-monero)
61dfa310 epee: fix some log macros not printing context nicely (moneromooo-monero)
2017-02-12 23:28:38 +02:00
Riccardo Spagni
f4e2539a32
Merge pull request #1715
8ec2a8d2 net_node: fix spurious warning about using uninitialized data (moneromooo-monero)
2017-02-12 23:27:08 +02:00
Riccardo Spagni
92fe31fd44
Merge pull request #1714
5adcb5a4 tx_pool: add a debug message when adding a tx to the pool (moneromooo-monero)
9faef1f8 cryptonote_protocol: misc fluffy block fixes (moneromooo-monero)
2017-02-12 23:26:02 +02:00
Riccardo Spagni
4e7bcad58f
Merge pull request #1713
422ecc98 Fixup choice of easylogging++ vs libunwind stack trace code (moneromooo-monero)
2017-02-12 23:25:42 +02:00
Riccardo Spagni
b0e992237e
Merge pull request #1712
3b6839cc mlog: move log level changes to global level (moneromooo-monero)
38a1b9c9 rpc: fix daemon mixed style set_log 2,category:level (moneromooo-monero)
28d0b11f mlog: s/Mew/New/ in log (moneromooo-monero)
2017-02-12 23:25:07 +02: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
Riccardo Spagni
47687399fb
Merge pull request #1709
b2ac939e Fix GUI building after libcryptonote_core was split (#1626) (iDunk5400)
2017-02-12 23:24:19 +02:00
Riccardo Spagni
6a261fa1bc
Merge pull request #1708
f2986ccf db_lmdb: fix bad height saved in tx data (moneromooo-monero)
2017-02-12 23:23:46 +02:00
moneromooo-monero
882db8e9d9
tools: log to the correct file 2017-02-12 19:39:59 +00:00
moneromooo-monero
142e5e1eb4
tools: set requested log level
also move a couple logs from INFO to DEBUG
2017-02-12 18:48:39 +00:00
moneromooo-monero
8bdc86beb4
protocol: speed up sync by minimizing duplicate work
In particular, the prepare_handle_incoming_blocks call
is pretty lengthy, and entirely pointless in the common
case where several different connections will prepare
the exact same blocks.
2017-02-12 17:17:30 +00:00
moneromooo-monero
8ec2a8d2b0
net_node: fix spurious warning about using uninitialized data
This is only used to load, not save
2017-02-12 14:06:36 +00:00
moneromooo-monero
422ecc98e4
Fixup choice of easylogging++ vs libunwind stack trace code 2017-02-12 13:59:21 +00:00
moneromooo-monero
5adcb5a48c
tx_pool: add a debug message when adding a tx to the pool 2017-02-12 12:33:48 +00:00
moneromooo-monero
9faef1f83a
cryptonote_protocol: misc fluffy block fixes
- fix wrong block being used when a new block is received between
  a node elaying a fluffy block and sending a new fluffy block
  with txes a peer did not have
- misc a neverending ping pong requesting the same missing txids
  when a new block is received in the meantime, causing the top
  block to not be the one we need
- send the original fluffy block message block height when sending
  a new fluffy block, not the current top height, which might
  have been updated since
- avoid sending back the whole block blob when asking for txes,
  send only the hash instead
- plus misc cleanup and additional debugging logs
2017-02-12 12:33:45 +00:00
moneromooo-monero
38a1b9c956
rpc: fix daemon mixed style set_log 2,category:level 2017-02-12 11:37:09 +00: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
iDunk5400
b2ac939eb3
Fix GUI building after libcryptonote_core was split (#1626) 2017-02-11 17:00:55 +01:00
moneromooo-monero
f2986ccfc1
db_lmdb: fix bad height saved in tx data
The recent change to not keep separate track of the blockchain
height caused the reported height to jump early in the lmdb
transaction (when the block data is added to the blocks table),
rather than at the end, after everything succeeded. Since the
block data is added before the transaction data, this caused
the transaction data to be saved with a height one more than
its expected value.

Fix this by saving the block data last. This should have no
side effects.
2017-02-11 10:16:18 +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
e4dfd2fb63 Changed ac_line_status to on_battery_power. 2017-02-10 18:07:42 -05:00
Dion Ahmetaj
23c73269ca Use defined directive to silence pre-proc warnings. 2017-02-10 18:07:41 -05:00
Dion Ahmetaj
d2c7d0f6b0 Cleaned up some logging. Thanks to moneromooo for help. 2017-02-10 18:07:41 -05:00
Dion Ahmetaj
68652cd94d Added some //TODO comments pertaining to returning enums instead of bools in order to be better able to handle failure states. 2017-02-10 18:07:41 -05:00
Dion Ahmetaj
0b1045ed7d Moved around checking of AC power in order to bail quicker to sleep if not plugged in. 2017-02-10 18:07:40 -05:00
Dion Ahmetaj
2937fdbbbf Moved setting of previous process times to block where background mining is started, and added an explicit sleep in that block to wait for some mining to occur. 2017-02-10 18:07:40 -05:00
Dion Ahmetaj
21a1e0252f Set background mining started bool to false on bg thread start. If mining::stop then mining::start, idle logic is re-run instead of starting immediately (if it was running before stop). 2017-02-10 18:07:39 -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
cb54eeaa31
Merge pull request #1698
9459f331 simplewallet: print error when address is wrong (kenshi84)
2017-02-11 00:54:30 +02: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
9296960081
Merge pull request #1686
bceaf4b7 wallet2: fix transactions not considering rct inputs (moneromooo-monero)
2017-02-11 00:22:17 +02:00
Riccardo Spagni
9781ecaa70
Merge pull request #1685
7549116e Wallet API: Easylogger wrapper for gui (Jaquee)
2017-02-11 00:21:51 +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
9459f33178 simplewallet: print error when address is wrong 2017-02-08 23:04:48 +09:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Riccardo Spagni
99ee3fd17e
Merge pull request #1679
4efc926d Wallet API: Catch error from tools::is_local_address (Jaquee)
2017-02-08 12:53:57 +02:00
Riccardo Spagni
d30b64f457
Merge pull request #1674
92978b2c common: fix link error on at least one platform (no clue which one) (moneromooo-monero)
2017-02-08 12:51:11 +02:00
moneromooo-monero
bceaf4b788
wallet2: fix transactions not considering rct inputs
I broke this very recently in 2bf029be17
and didn't notice in time
2017-02-06 20:20:22 +00: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
Jaquee
7549116ec3
Wallet API: Easylogger wrapper for gui 2017-02-05 20:12:01 +01:00
kenshi84
bab1e9a397 bugfix: infinite recursion in get_account_address_from_str_or_url 2017-02-05 23:20:16 +09:00
NanoAkron
db0a5392a5
Clarify in/out connections for users 2017-02-05 11:15:51 +00:00
moneromooo-monero
92978b2c0f
common: fix link error on at least one platform (no clue which one)
Bug and fix reported by tdprime
2017-02-05 10:55:55 +00:00
Jaquee
4efc926d28
Wallet API: Catch error from tools::is_local_address 2017-02-05 11:08:05 +01:00
Jaquee
0cc50bdd11 GUI: Improved refresh performance 2017-02-04 23:25:05 +01:00
Jaquee
805625b541 wallet api: Remove initAsync() and don't start refresh automatically on init 2017-02-04 23:25:03 +01:00
Jaquee
031b060af0 wallet2::init() - disconnect before init if connected
Makes it possible for GUI to reinit with new daemon without closing and reopening wallet.
2017-02-04 23:10:20 +01:00
Riccardo Spagni
e56bf442c3
Merge pull request #1669
4f5b130d wallet_rpc_server: add address book RPC calls (moneromooo-monero)
2017-02-04 17:28:53 +02:00
Riccardo Spagni
5da4650cba
Merge pull request #1671
cd34fc65 Use easylogging++'s stack trace facility where possible (moneromooo-monero)
2017-02-04 17:27:54 +02:00
Riccardo Spagni
c3c281e699
Merge pull request #1666
03ff3639 Fix missing parentheses (Miguel Herranz)
2017-02-04 17:26:19 +02:00
Riccardo Spagni
bcb7b0a9af
Merge pull request #1665
34719071 simplewallet: cleanup (moneromooo-monero)
a9a9b64b simplewallet: fix build (unqualified type not in current scope) (moneromooo-monero)
2017-02-04 17:21:11 +02:00
Riccardo Spagni
eb21389953
Merge pull request #1664
b5cb8861 core: fix integrated addresses breaking with auto zero change (moneromooo-monero)
2017-02-04 17:20:02 +02:00
Riccardo Spagni
31cf4e7362
Merge pull request #1640
f97526e6 simplewallet: option to always ask password for any crytical operations (kenshi84)
2017-02-04 17:18:38 +02: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
4f5b130de9
wallet_rpc_server: add address book RPC calls 2017-02-04 11:40:49 +00:00
kenshi84
f97526e641 simplewallet: option to always ask password for any crytical operations 2017-02-03 09:38:12 +09:00
Miguel Herranz
03ff363982 Fix missing parentheses 2017-02-02 22:05:31 +01:00
moneromooo-monero
3471907160
simplewallet: cleanup
Remove empty static function which was refactored, as well as
leftover exception testing code.
2017-02-02 20:56:53 +00:00
moneromooo-monero
a9a9b64b13
simplewallet: fix build (unqualified type not in current scope) 2017-02-02 20:56:31 +00:00
moneromooo-monero
b5cb8861c7
core: fix integrated addresses breaking with auto zero change
Zero change is sent to a random address, which confuses the code
which determines which key to use to encrypt the payment id.
Ignore zero amounts for this purpose, so the payment id gets
encrypted with the real destination's key.
2017-02-02 20:53:12 +00:00
Riccardo Spagni
b01990124e
Merge pull request #1663
bbcc3a12 Add missing include (Miguel Herranz)
2017-02-02 22:41:58 +02:00
Riccardo Spagni
fcb299b4ae
Merge pull request #1641
ca94d0a4 Separate data per P2P port (Miguel Herranz)
2017-02-02 22:41:28 +02:00