Commit graph

959 commits

Author SHA1 Message Date
xmr-eric
2b0a32f8af Small cleanup of daemon synchronization output
Add period to second sentence
2017-11-27 16:37:20 -05:00
Cifrado
287dde63d8 Added command descriptions 2017-11-26 10:37:37 +01:00
Riccardo Spagni
ed2fc4a1ff
Merge pull request #2794
43f27c7d core: warn when free disk space is low (moneromooo-monero)
2017-11-25 19:48:33 +02:00
moneromooo-monero
01dc829784
wallet: transfer RPC can now return tx metadata (pending_tx) 2017-11-24 14:03:52 +00:00
Riccardo Spagni
10a237783a
Merge pull request #2692
0f2c2d4c rpc: remove obsolete busy core checks (moneromooo-monero)
2017-11-14 21:32:33 +02:00
Riccardo Spagni
edebe4e3b6
Merge pull request #2736
0d9c0db9 Do not build against epee_readline if it was not built (Howard Chu)
178014c9 split off readline code into epee_readline (moneromooo-monero)
a9e14a19 link against readline only for monerod and wallet-wallet-{rpc,cli} (moneromooo-monero)
437421ce wallet: move some scoped_message_writer calls from the libs (moneromooo-monero)
e89994e9 wallet: rejig to avoid prompting in wallet2 (moneromooo-monero)
ec5135e5 move input_line from command_line to simplewallet (moneromooo-monero)
082db75f move cryptonote command line options to cryptonote_core (moneromooo-monero)
2017-11-14 21:31:51 +02:00
moneromooo-monero
0f2c2d4c34
rpc: remove obsolete busy core checks 2017-11-14 17:15:19 +00:00
moneromooo-monero
082db75f28
move cryptonote command line options to cryptonote_core
Those have no reason to be in a generic module
2017-11-14 17:06:19 +00:00
moneromooo-monero
383ff4f689
remove "using namespace std" from headers
It's nasty, and actually breaks on Solaris, where if.h fails to
build due to:

  struct map *if_memmap;
2017-11-14 16:56:10 +00:00
Riccardo Spagni
48ff10f77f
Merge pull request #2681
ec48e8d8 core: do not forbid txes without destination (moneromooo-monero)
523084bc core: don't add empty additional pub keys field to extra (moneromooo-monero)
2017-11-14 15:02:55 +02:00
Riccardo Spagni
256a1d9ead
Merge pull request #2675
00cc1fdd subaddress: remove unneeded scalarmultBase (kenshi84)
2017-11-14 15:02:14 +02:00
Riccardo Spagni
fd0740e5e7
Merge pull request #2615
10013e94 Protect node privacy by proper filtering in restricted-mode RPC answers (binaryFate)
2017-11-14 14:53:10 +02:00
moneromooo-monero
43f27c7d43
core: warn when free disk space is low 2017-11-14 10:21:34 +00:00
binaryFate
10013e9434 Protect node privacy by proper filtering in restricted-mode RPC answers
This patch allows to filter out sensitive information for queries that rely on the pool state, when running in restricted mode.
This filtering is only applied to data sent back to RPC queries. Results of inline commands typed locally in the daemon are not affected.
In practice, when running with `--restricted-rpc`:
* get_transaction_pool will list relayed transactions with the fields "last relayed time" and "received time" set to zero.
* get_transaction_pool will not list transaction that have do_not_relay set to true, and will not list key images that are used only for such transactions
* get_transaction_pool_hashes.bin will not list such transaction
* get_transaction_pool_stats will not count such transactions in any of the aggregated values that are computed

The implementation does not make filtering the default, so developers should be mindful of this if they add new RPC functionality.
Fixes #2590.
2017-11-08 13:07:07 +01:00
moneromooo-monero
ccf53a566c
track double spending in the txpool
Transactions in the txpool are marked when another transaction
is seen double spending one or more of its inputs.
This is then exposed wherever appropriate.

Note that being marked with this "double spend seen" flag does
NOT mean this transaction IS a double spend and will never be
mined: it just means that the network has seen at least another
transaction spending at least one of the same inputs, so care
should be taken to wait for a few confirmations before acting
upon that transaction (ie, mostly of use for merchants wanting
to accept unconfirmed transactions).
2017-11-06 00:05:44 +00:00
Riccardo Spagni
13a84caa22
Merge pull request #2662
88ebfd64 core_tests: fix for subaddress patch (kenshi84)
e373a203 performance_tests: add master spend pubkey to subaddress hashtable (kenshi84)
2017-11-03 11:58:06 +02:00
moneromooo-monero
935f746249
blockchain: do not lock the blockchain lock for simple DB getters
It is safe in those cases, though might return slightly out of date
information if another thread is busy modifying the blockchain,
but it avoids potentially lengthy delays just to get things like
the current blockchain height.
2017-10-30 08:23:40 +00:00
moneromooo-monero
ec48e8d81d
core: do not forbid txes without destination
This was spuriously forbidden in the recent subaddress patch,
which isn't inherently incompatible with these.
2017-10-19 09:11:12 +01:00
moneromooo-monero
523084bc79
core: don't add empty additional pub keys field to extra
Saves a couple bytes per tx
2017-10-19 09:11:10 +01:00
kenshi84
00cc1fdd22
subaddress: remove unneeded scalarmultBase 2017-10-18 08:46:00 +09:00
kenshi84
88ebfd646a
core_tests: fix for subaddress patch 2017-10-17 22:29:01 +09:00
Riccardo Spagni
97c11caf07 Merge pull request #2656
3492de01 fix lightwallet and subaddresses conflict (Jaquee)
329f149e remove reference to cryptonote::null_hash (Jaquee)
2017-10-15 19:32:18 +02:00
Jaquee
329f149e95 remove reference to cryptonote::null_hash 2017-10-15 19:19:40 +02:00
Riccardo Spagni
b293ad9a1a
Merge pull request #2640
22b51e06 db_lmdb: include chain height when failing to find an output key (moneromooo-monero)
5db433b3 blockchain: avoid exceptions in output verification (moneromooo-monero)
2017-10-15 18:59:45 +02:00
Riccardo Spagni
344c01c712
Merge pull request #2638
529a6a4a core: guard against a mined block not finding all txes in the pool (moneromooo-monero)
2017-10-15 18:58:57 +02:00
Riccardo Spagni
d8bc28cc36
Merge pull request #2552
69ce33f2 core: fix failure to sync when a tx is already in the pool (moneromooo-monero)
2017-10-15 17:31:37 +02:00
Riccardo Spagni
5ea20d6944
Merge pull request #2469
7adceee6 precomputed block hashes are now in blocks of N (currently 256) (moneromooo-monero)
2017-10-15 17:23:50 +02:00
moneromooo-monero
5db433b3f7
blockchain: avoid exceptions in output verification
This can happen if we get a bad tx, so let's not spam the log.
2017-10-12 13:27:20 +01:00
moneromooo-monero
529a6a4af8
core: guard against a mined block not finding all txes in the pool
This can happen for several reasons, but mainly if another block
was received, which took that tx off the pool.
2017-10-11 13:00:49 +01:00
kenshi84
53ad5a0f42
Subaddresses 2017-10-07 13:06:21 +09:00
Riccardo Spagni
2ff832c576
Merge pull request #2540
71c7f8d0 core: fix logging the one time public key on error (moneromooo-monero)
2017-10-06 22:58:20 +04:00
Riccardo Spagni
4a20a5b5ea
Merge pull request #2537
269a2a01 blockchain: fix off by one getting blocks (moneromooo-monero)
2017-10-06 22:56:17 +04:00
Riccardo Spagni
478b14b565
Merge pull request #2534
4e115a3a core: remove out sorting from v7 rules (moneromooo-monero)
2017-10-06 22:55:00 +04:00
stoffu
cbc5508b15
construct_tx_and_get_tx_key: return sorted sources for print_ring_memebrs to work properly 2017-10-03 08:12:28 +09:00
Riccardo Spagni
87d0516f7d
Merge pull request #2513
309290d1 Source updates are in a source subdirectory (moneromooo-monero)
2017-10-02 23:29:25 +04:00
moneromooo-monero
69ce33f217
core: fix failure to sync when a tx is already in the pool 2017-09-29 21:34:10 +01:00
moneromooo-monero
4e115a3a4c
core: remove out sorting from v7 rules
and restore random shuffle of outputs

This turned out to have a flaw (sort order depends on output
index), and this doesn't really bring much anyway
2017-09-27 12:42:08 +01:00
moneromooo-monero
71c7f8d0dc
core: fix logging the one time public key on error 2017-09-27 11:40:05 +01:00
moneromooo-monero
269a2a01ef
blockchain: fix off by one getting blocks 2017-09-27 00:31:49 +01:00
Riccardo Spagni
5f7cddeb53
Merge pull request #2533
97cdd4c9 core: undo output sorting (moneromooo-monero)
2017-09-26 15:59:32 +02:00
moneromooo-monero
97cdd4c92f
core: undo output sorting
It looks like it may be buggy
2017-09-26 13:23:31 +01:00
Riccardo Spagni
21c2c08041
Merge pull request #2527
ba6907f6 core: fix creation of v1 txes (moneromooo-monero)
2017-09-25 23:29:32 +02:00
moneromooo-monero
ba6907f661
core: fix creation of v1 txes 2017-09-25 22:27:30 +01:00
moneromooo-monero
cdbbe99c82
checkpoints: add a token checkpoint on testnet (the genesis block) 2017-09-25 21:16:35 +01:00
moneromooo-monero
fa54b20584
fix typo in basic and core CMakeLists.txt 2017-09-25 21:16:29 +01:00
moneromooo-monero
5d65a75b69
move checkpoints in a separate library 2017-09-25 21:16:26 +01:00
Riccardo Spagni
13be8115e4
Merge pull request #2458
7f2f6ee1 protocol: remove hop count on block propagation (moneromooo-monero)
2017-09-25 17:00:47 +02:00
Riccardo Spagni
e5a2cdbfad
Merge pull request #2457
d2d8a41c Use actual batch size for resize estimates (Howard Chu)
2017-09-25 16:57:07 +02:00
Riccardo Spagni
0e74777071
Merge pull request #2452
0aaaca29 tx_pool: set the "invalid input" bit when check_tx_inputs fails (moneromooo-monero)
9236823b simplewallet: print tx rejection reason where it was missing (moneromooo-monero)
3dee3301 core_rpc_server: print tx rejection reason at L0 too (moneromooo-monero)
2017-09-25 16:53:07 +02:00
Riccardo Spagni
c2346c6c59
Merge pull request #2424
28b72b6e tx_pool: pre-init tvc.m_verifivation_failed before processing (moneromooo-monero)
50a629b2 core_tests: catch (impossible in practice) tx extra api failure (moneromooo-monero)
fee15ef1 wallet2: catch failure to parse address (moneromooo-monero)
1399e26d net_peerlist: remove dead code (moneromooo-monero)
50e09698 tx_pool: guard against failure getting tx hash (moneromooo-monero)
54cc209a wallet_rpc_server: catch failure to create directory (moneromooo-monero)
3e55099c wallet_rpc_server: init m_vm to NULL in ctor (moneromooo-monero)
7d0dde5e wallet_args: remove redundant default value for --log-file (moneromooo-monero)
ed4a3350 wallet2: catch failure to save keys file (moneromooo-monero)
44434c8a wallet2_api: check whether dynamic_cast returns NULL (moneromooo-monero)
92f2f687 core: check return value from parse_hexstr_to_binbuff (moneromooo-monero)
5475692e wallet2_api: remove an unused, uninitialized, field (moneromooo-monero)
a7ba3de1 libwallet_api_tests: initialize newblock_triggered on reset (moneromooo-monero)
b2763ace wallet2_api: init error code to "no error" in the ctor (moneromooo-monero)
b5faac53 get_blockchain_top now returns void (moneromooo-monero)
2e44d8f2 wallet_rpc_server: guard against exceptions (moneromooo-monero)
4230876b simplewallet: guard against I/O exceptions (moneromooo-monero)
06c1e057 daemon: initialize decode_as_json in RPC request (moneromooo-monero)
11f71af5 http_base: init size_t in http_request_info ctor (moneromooo-monero)
2017-09-25 16:52:27 +02:00
Riccardo Spagni
b911130a46
Merge pull request #2442
e29282d2 build: auto update version info without manually deleting version.h (stoffu)
2017-09-25 16:50:35 +02:00
Riccardo Spagni
08ada1fa8b
Merge pull request #2440
6137a0b9 blockchain: reject unsorted ins and outs from v7 (moneromooo-monero)
16afab90 core: sort ins and outs key key image and public key, respectively (moneromooo-monero)
0c36b9f9 common: add apply_permutation file and function (moneromooo-monero)
2017-09-25 16:49:01 +02:00
moneromooo-monero
28b72b6ecc
tx_pool: pre-init tvc.m_verifivation_failed before processing
CID 175316
2017-09-25 15:48:59 +01:00
moneromooo-monero
50e096987b
tx_pool: guard against failure getting tx hash
Should be impossible in practice, but easy change

CID 175282
2017-09-25 15:48:42 +01:00
moneromooo-monero
92f2f687b9
core: check return value from parse_hexstr_to_binbuff 2017-09-25 15:48:24 +01:00
moneromooo-monero
b5faac5304
get_blockchain_top now returns void
It was always returning true, and could not be foreseen to
usefully return errors in the future. This silences CID 162652
as well as saves some checking code in a few places.
2017-09-25 15:48:13 +01:00
moneromooo-monero
309290d1c7
Source updates are in a source subdirectory
rather than in the same directory as the prebuilt versions
2017-09-22 21:48:19 +01:00
Riccardo Spagni
1f9058187c
Merge pull request #2496
3b8b4be5 tx_pool: drop invalid txes from the pool on startup (moneromooo-monero)
2017-09-21 12:07:35 +02:00
stoffu
e29282d208
build: auto update version info without manually deleting version.h 2017-09-21 07:47:37 +09:00
moneromooo-monero
3b8b4be5cb
tx_pool: drop invalid txes from the pool on startup
instead of just failing

This is a workaround for bad tx blobs being inserted in the
pool for unknown reasons
2017-09-20 18:55:16 +01:00
moneromooo-monero
e457aa51f4
blockchain: fix crash checking pre-validated txids 2017-09-20 10:46:13 +01:00
moneromooo-monero
7adceee634
precomputed block hashes are now in blocks of N (currently 256)
This shaves a lot of space off binaries
2017-09-18 16:29:00 +01:00
Riccardo Spagni
1a73843cec
Merge pull request #2446
6d0ca7d1 Tweak concurrency limits (Howard Chu)
510d0d47 Use a threadpool (Howard Chu)
2017-09-18 13:19:26 +02:00
Riccardo Spagni
69e039aa19
Merge pull request #2023
f761dbae Remove 1.25x multiplier from tx_pool (Nano Akron)
2017-09-18 13:11:57 +02:00
Riccardo Spagni
591e53445b
Merge pull request #2044
0299cb77 Fix various oversights/bugs in ZMQ RPC server code (Thomas Winget)
77986023 json serialization for rpc-relevant monero types (Thomas Winget)
5c1e08fe Refactor some things into more composable (smaller) functions (Thomas Winget)
9ac2ad07 DRY refactoring (Thomas Winget)
2017-09-18 13:08:16 +02:00
moneromooo-monero
6137a0b94d
blockchain: reject unsorted ins and outs from v7
This ensures no information is leaked by the ordering
2017-09-18 11:23:15 +01:00
Howard Chu
d2d8a41c47
Use actual batch size for resize estimates
And optimize import startup:

Remember start_height position during initial count_blocks pass
to avoid having to reread entire file again to arrive at start_height
2017-09-17 22:08:40 +01:00
moneromooo-monero
7f2f6ee1c9
protocol: remove hop count on block propagation
It is unused, as it was apparently a future optimization,
and it leaks some information (though since pools publish
thei blocks they find, that amount seems small).
2017-09-17 10:26:12 +01:00
moneromooo-monero
0aaaca29a2
tx_pool: set the "invalid input" bit when check_tx_inputs fails 2017-09-16 11:27:52 +01:00
Howard Chu
510d0d4753
Use a threadpool
Instead of constantly creating and destroying threads
2017-09-14 21:42:48 +01:00
Nano Akron
f761dbaeaf Remove 1.25x multiplier from tx_pool 2017-09-14 21:26:19 +01:00
Riccardo Spagni
7abdba0a5c
Merge pull request #2438
9443eec1 core: guard against exceptions in tx verification worker threads (moneromooo-monero)
2017-09-14 18:31:46 +02:00
Riccardo Spagni
3399c2a257
Merge pull request #2404
e5238adf update checkpoint hashes (Riccardo Spagni)
d4f56bdf update hardcoded checkpoints (Riccardo Spagni)
ed730511 update checkpoints.dat (Riccardo Spagni)
2017-09-14 18:25:43 +02:00
Riccardo Spagni
718820cd96
Merge pull request #2396
dbfef643 tx_pool: catch exceptions in LockedTXN dtor (moneromooo-monero)
2017-09-14 18:25:28 +02:00
moneromooo-monero
16afab900d
core: sort ins and outs key key image and public key, respectively
This avoids leaking some small amount of information
2017-09-13 09:25:05 +01:00
moneromooo-monero
9443eec10f
core: guard against exceptions in tx verification worker threads 2017-09-12 12:07:10 +01:00
Riccardo Spagni
e5238adfb3
update checkpoint hashes 2017-09-06 17:32:48 +02: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
Thomas Winget
5c1e08fe80
Refactor some things into more composable (smaller) functions
This commit refactors some of the rpc-related functions in the
Blockchain class to be more composable.  This change was made
in order to make implementing the new zmq rpc easier without
trampling on the old rpc.

New functions:
  Blockchain::get_num_mature_outputs
  Blockchain::get_random_outputs
  Blockchain::get_output_key
  Blockchain::get_output_key_mask_unlocked

  Blockchain::find_blockchain_supplement (overload)

functions which previously had this functionality inline now call these
functions as necessary.
2017-09-05 12:17:32 -04:00
moneromooo-monero
dbfef643ed
tx_pool: catch exceptions in LockedTXN dtor
This might prevent some calls to terminate when the LockedTXN
dtor is called as part of stack unwinding caused by another
exception in the first place.
2017-09-04 10:18:38 +01:00
moneromooo-monero
6ac61100a1
Add a --fluffy-blocks option to relay blocks as fluffy blocks
Defaults to off, but fluffy blocks are forced enabled on testnet
2017-09-03 11:11:11 +01:00
Riccardo Spagni
c919ca4f1d
Merge pull request #2374
e72e625e tx_pool: wrap tx meta updates in a LockedTXN (moneromooo-monero)
2017-09-02 11:31:19 +02:00
Riccardo Spagni
1e57e48342
Merge pull request #2372
c867357a cryptonote_protocol: error handling on cleanup_handle_incoming_blocks (moneromooo-monero)
ce901fcb Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocks (moneromooo-monero)
84fa015e core: guard against exceptions in handle_incoming_{block,tx} (moneromooo-monero)
2017-09-02 11:30:57 +02:00
Thomas Winget
9ac2ad0744
DRY refactoring 2017-08-31 07:48:27 -04:00
moneromooo-monero
e72e625eb1
tx_pool: wrap tx meta updates in a LockedTXN 2017-08-29 16:35:19 +01:00
moneromooo-monero
ce901fcb31
Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocks 2017-08-29 15:43:32 +01:00
moneromooo-monero
84fa015e77
core: guard against exceptions in handle_incoming_{block,tx}
When one happens, cleanup must be called or the incoming tx
lock will stay locked
2017-08-29 13:01:45 +01:00
moneromooo-monero
a95e460c71
move db specific options to BlockchainDB
Avoids common depending on blockchain_db, which can cause
link errors.
2017-08-29 11:43:34 +01:00
Riccardo Spagni
72b5f37f58
Merge pull request #2349
1914c999 txpool: update db tx metadata when it changes (moneromooo)
4dbf29bd txpool: add tx size median to the pool stats (moneromooo)
2017-08-27 18:15:13 +02:00
Riccardo Spagni
e00238a355
Merge pull request #2347
5807529e blockchain: cap memory size of retrieved blocks (moneromooo-monero)
c1b10381 rpc: decrease memory usage a bit in getblocks.bin (moneromooo-monero)
2017-08-27 18:13:50 +02:00
Riccardo Spagni
36b978f50e
Merge pull request #2314
c22d22e2 Cleanup test impact of adding safesyncmode() method (Howard Chu)
9a859844 Toggle SAFE syncmode on and off automatically (Howard Chu)
2017-08-26 23:43:22 +02:00
Riccardo Spagni
ff0afc196e
Merge pull request #2313
3dd34a49 Cleanup test impact of moving blockchain_db_types() (Howard Chu)
80344740 More DB support cleanup (Howard Chu)
4c7f8ac0 DB cleanup (Howard Chu)
2017-08-26 23:43:09 +02:00
moneromooo-monero
5807529e69
blockchain: cap memory size of retrieved blocks
It helps keep memory usage down when a wallet refreshes through
a string of large blocks
2017-08-26 20:53:58 +01:00
moneromooo-monero
55bec1f03d
rpc: add a new RPC to get current txpool backlog (sizes and fees) 2017-08-26 16:23:31 +01:00
moneromooo
1914c999c7
txpool: update db tx metadata when it changes 2017-08-25 22:21:51 +01:00
moneromooo
4dbf29bd32
txpool: add tx size median to the pool stats 2017-08-25 22:21:38 +01:00
Riccardo Spagni
944bbdb51e
Merge pull request #2330
ea15e72d tx_pool: fix crash in stats (Howard Chu)
2017-08-25 00:18:42 +02:00
Howard Chu
ea15e72d73
tx_pool: fix crash in stats
if tx receive_time == now. supersedes #2322
2017-08-23 14:22:25 +01:00
Howard Chu
c22d22e2db
Cleanup test impact of adding safesyncmode() method 2017-08-22 15:11:09 +01:00
Howard Chu
9a859844f4
Toggle SAFE syncmode on and off automatically
If monerod is started with default sync mode, set it to SAFE after
synchronization completes. Set it back to FAST if synchronization
restarts (e.g. because another peer has a longer blockchain).

If monerod is started with an explicit sync mode, none of this
automation takes effect.
2017-08-20 16:30:28 +01:00
Howard Chu
4c7f8ac04f
DB cleanup
Hide LMDB-specific stuff behind blockchain_db.h. Nobody besides blockchain_db.cpp
should ever be including DB-specific headers any more.
2017-08-19 18:11:38 +01:00
moneromooo-monero
5d989b661a
core: add mainnet v6 fork height at 1400000 2017-08-18 10:03:49 +01:00
Riccardo Spagni
4466b6d1b0
Merge pull request #2303
5a283078 cryptonote_protocol: large block sync size before v4 (moneromooo-monero)
7b747607 cryptonote_protocol: kick idle synchronizing peers (moneromooo-monero)
2017-08-17 21:39:44 +02:00
Riccardo Spagni
4b2cc123ff
Merge pull request #2287
827afcb7 protocol: pass blockchain cumulative difficulty when syncing (moneromooo-monero)
2017-08-17 21:35:02 +02:00
moneromooo-monero
5a283078ec
cryptonote_protocol: large block sync size before v4 2017-08-17 13:11:52 +01:00
moneromooo-monero
827afcb7ea
protocol: pass blockchain cumulative difficulty when syncing
Not used yet.
2017-08-15 21:03:37 +01:00
Riccardo Spagni
3ff67323b7
Merge pull request #2288
c6e200a8 core: add --db-salvage command line flag (moneromooo-monero)
2017-08-15 20:57:26 +02:00
Riccardo Spagni
53dde37ceb
Merge pull request #2276
a1891ebe tests: fix tests build (moneromooo-monero)
2017-08-15 20:53:41 +02:00
Riccardo Spagni
79479a3614
Merge pull request #2250
f4f7eeba blockchain: log more info when we reject an orphan (moneromooo-monero)
2017-08-15 20:48:08 +02:00
Riccardo Spagni
12c70fedc0
Merge pull request #2246
d732c73e blockchain: remove a few unused variables (moneromooo-monero)
2017-08-15 20:47:32 +02:00
Riccardo Spagni
1cf4665d2a
Merge pull request #2237
5d4ef719 core: speed up output index unique set calculation (moneromooo-monero)
19d7f568 perf_timer: allow profiling more granular than millisecond (moneromooo-monero)
bda8c598 epee: add nanosecond timer and pause/restart profiling macros (moneromooo-monero)
2017-08-15 20:45:47 +02:00
moneromooo-monero
c6e200a8ab
core: add --db-salvage command line flag
Use to load the database when the primary meta page is corrupted
2017-08-12 19:04:44 +01:00
moneromooo-monero
a1891ebea9
tests: fix tests build
Add get_fork_version and add_ideal_fork_version to core so
cryptonote_protocol does not have to need the Blockchain
class directly, as it's not in its dependencies, and add
those to the fake core classes in tests too.
2017-08-10 11:12:56 +01:00
moneromooo-monero
635929eaca
protocol: add checks for top block hard fork version
We won't even talk to a peer which claims a wrong version
for its top block. This will avoid syncing to known bad
peers in the first place.
Also add IP fails when failing to verify a block.
2017-08-09 10:28:41 +01:00
Riccardo Spagni
bff9fb9c8b
Merge pull request #2231
61770ec2 change mixin to ring size in user visible places (moneromooo-monero)
2017-08-07 22:53:15 +02:00
moneromooo-monero
61770ec2da
change mixin to ring size in user visible places 2017-08-07 21:12:27 +01:00
Riccardo Spagni
14f479bb9c
Merge pull request #2262
7f7d42f8 core: fix invalid memory access creating tx (moneromooo-monero)
2017-08-07 22:11:45 +02:00
Riccardo Spagni
62610a3a53
Merge pull request #2225
5d91b26c blockchain: skip checking tx semantics in embedded block hash range (moneromooo-monero)
2017-08-07 22:10:09 +02:00
moneromooo-monero
7f7d42f890
core: fix invalid memory access creating tx 2017-08-07 21:09:19 +01:00
moneromooo-monero
38756d00ff
core: new API to disable DNS checkpoint lookups 2017-08-07 14:31:06 +01:00
Riccardo Spagni
6db8a60a18
Merge pull request #2149
158c3ecf core: thread most of handle_incoming_tx (moneromooo-monero)
f57ee382 cryptonote_protocol: retry stale spans early (moneromooo-monero)
90df52e1 cryptonote_protocol: light cleanup (moneromooo-monero)
84e23156 cryptonote_protocol: avoid spurious SYNCHRONIZED OK messages (moneromooo-monero)
5be43fcd cryptonote_protocol_handler: sync speedup (moneromooo-monero)
2017-08-07 15:24:58 +02:00
Riccardo Spagni
dc2747439c
Merge pull request #2243
4d873046 blockchain: add testnet v6 fork height at 971400 (moneromooo-monero)
2017-08-07 15:13:59 +02:00
Riccardo Spagni
ea46a5527a
Merge pull request #2234
214fd81e some include cleanup (moneromooo-monero)
2017-08-07 15:13:07 +02:00
Riccardo Spagni
9b3b7f050b
Merge pull request #2230
5dd722be core: add a message when loading checkpoints at init time (moneromooo-monero)
2017-08-07 15:12:42 +02:00
Riccardo Spagni
5cc53c7e49
Merge pull request #2226
14ec6ed8 tx_pool: remove obsolete unused m_config_folder field (moneromooo-monero)
2017-08-07 15:12:29 +02:00
Riccardo Spagni
a2dd125b1e
Merge pull request #2222
878205f1 core: fix lock ordering bug at init time (moneromooo-monero)
2017-08-07 15:11:51 +02:00
Riccardo Spagni
8048de268a
Merge pull request #2216
d8becf2e blockchain: fix cryptonight buffer leak on exit (moneromooo-monero)
91aa90fc blockchain: ensure all blocks get their longhash precalculated (moneromooo-monero)
ff4bcaed blockchain: pass correct height to get_block_longhash (moneromooo-monero)
2017-08-07 15:11:04 +02:00
Riccardo Spagni
61ac6983f2
Merge pull request #2206
340feede core: randomly shuffle outputs (moneromooo-monero)
2017-08-07 15:09:31 +02:00
Riccardo Spagni
0f36efbded
Merge pull request #2198
53af9768 blockchain: one off warning when seeing a block with unknown version (moneromooo-monero)
2017-08-07 15:08:31 +02:00
moneromooo-monero
4d87304683
blockchain: add testnet v6 fork height at 971400 2017-08-07 11:34:59 +01:00
moneromooo-monero
158c3ecff3
core: thread most of handle_incoming_tx 2017-08-07 09:33:20 +01:00
moneromooo-monero
f4f7eeba80
blockchain: log more info when we reject an orphan
We want to know what happened when a block is wrongly rejected
2017-08-04 23:26:55 +01:00
moneromooo-monero
d732c73e71
blockchain: remove a few unused variables 2017-08-03 11:26:55 +01:00
moneromooo-monero
5d4ef719b9
core: speed up output index unique set calculation
A sort+uniq step was done for every tx in a 200 block chunk,
causing a lot of repeated scanning as the size of the offset
map got larger with every added tx. We now do the step only
once at the end of the loop.
Doing it this way potentially uses more memory, but testing
shows that it's currently only about 2% more.
2017-08-01 14:06:12 +01:00
moneromooo-monero
214fd81e93
some include cleanup 2017-07-31 16:36:52 +01:00
moneromooo-monero
5dd722beaa
core: add a message when loading checkpoints at init time
This uses DNS, which can take a while, so it's useful to know
this is the culprit when loading pauses
2017-07-31 06:43:13 +01:00
moneromooo-monero
14ec6ed80d
tx_pool: remove obsolete unused m_config_folder field 2017-07-30 12:03:43 +01:00
moneromooo-monero
5d91b26c0f
blockchain: skip checking tx semantics in embedded block hash range
If the txes are bad, this'll be picked up by the block hash mismatch
since the tx merkle root is part of the block hash.
2017-07-30 09:48:00 +01:00
moneromooo-monero
878205f143
core: fix lock ordering bug at init time 2017-07-29 12:54:02 +01:00
moneromooo-monero
d8becf2ee1
blockchain: fix cryptonight buffer leak on exit 2017-07-28 10:19:17 +01:00
moneromooo-monero
91aa90fc79
blockchain: ensure all blocks get their longhash precalculated
If the number of blocks to check was not a multiple of the
number of preparation threads, the last few blocks would
not be included in the threaded long hash calculation.
Those would still get calculated when the block gets added
to the chain, however, so this was only a tiny performance
hit, rather than a security bug.
2017-07-27 18:18:49 +01:00
moneromooo-monero
ff4bcaed81
blockchain: pass correct height to get_block_longhash 2017-07-27 18:18:20 +01:00
moneromooo-monero
340feedee2
core: randomly shuffle outputs
They used to be sorted by amount, which was fine before rct,
but is now suboptimal, since amounts are not known anymore.
In particular, it would give a recipient knowledge of whether
change was higher or lower than the amount received.
2017-07-25 18:57:57 +01:00
moneromooo-monero
53af9768ce
blockchain: one off warning when seeing a block with unknown version 2017-07-24 15:25:46 +01:00
moneromooo-monero
a5031a7d02
core: forbid duplicate ring members from v6
This avoids someone adding what amounts to mixin 0 rings in
practice, as there is no other good reason to allow this.
2017-07-22 12:33:12 +01:00
Riccardo Spagni
42fc89b672
Merge pull request #2142
02d66db4 tx_pool: initialize padding in txpool meta structure (moneromooo-monero)
0722aea3 cryptonote_core: initialize checkpoint flag (moneromooo-monero)
2017-07-19 11:49:42 +02:00
moneromooo-monero
02d66db4b4
tx_pool: initialize padding in txpool meta structure 2017-07-02 18:45:29 +01:00
moneromooo-monero
0722aea3df
cryptonote_core: initialize checkpoint flag 2017-07-02 18:45:25 +01:00
Julien Klepatch
bdab3436d3 Fix mismatch of parameter name between header file and implementation for set_user_options() 2017-06-23 05:16:11 +08:00
Riccardo Spagni
78f965a9e2
Merge pull request #2082
235df7f4 blockchain_db: add a txpool tx getter which returns existence (moneromooo-monero)
2017-06-18 17:36:12 +02:00