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
moneromooo-monero
235df7f484
blockchain_db: add a txpool tx getter which returns existence
...
Avoids exception spam for the "nope, not found" case
2017-06-11 15:36:48 +01:00
Howard Chu
3fc22e7b78
Add histogram to poolstats
2017-06-04 22:48:14 +01:00
Riccardo Spagni
3d397325bf
Merge pull request #2063
...
d17c0fc2
Don't copy blockchain for coinbase_tx_sum (Howard Chu)
2017-06-01 19:33:43 +02:00
Riccardo Spagni
4a60e9e66e
Merge pull request #2062
...
31417d57
tx_pool: add missing blockchain lock in add_tx (moneromooo-monero)
2017-06-01 19:33:17 +02:00
Howard Chu
5414970dcd
Speedup print_pool_stats
...
Since we're just counting txs, there's no reason to deserialize all the blobs.
2017-06-01 17:34:03 +01:00
Howard Chu
d17c0fc2d0
Don't copy blockchain for coinbase_tx_sum
...
Changed Blockchain::for_all_blocks() to for_blocks_range()
Operate on blockchain in-place instead of building a copy first.
2017-06-01 14:14:24 +01:00
moneromooo-monero
31417d57da
tx_pool: add missing blockchain lock in add_tx
2017-05-31 22:55:13 +01:00
Riccardo Spagni
a4c13ea092
Merge pull request #2039
...
4b932ff3
changed crypto to cncrypto so it generated libcncrypto (Gentian)
2017-05-30 21:24:11 +02:00
Riccardo Spagni
907ce14b18
Merge pull request #2026
...
a5739201
Update sync time copy (xmr-eric)
2017-05-30 21:20:39 +02:00
Riccardo Spagni
545e2b003c
Merge pull request #1982
...
b52abd13
Move txpool to the database (moneromooo-monero)
2017-05-30 21:12:44 +02:00
moneromooo-monero
b52abd1370
Move txpool to the database
...
Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).
poolstate.bin is now obsolete.
2017-05-25 22:23:37 +01:00
Gentian
4b932ff314
changed crypto to cncrypto so it generated libcncrypto
...
fix a cmakelist
2017-05-23 07:45:40 -04:00
xmr-eric
a57392016b
Update sync time copy
2017-05-10 14:34:18 -04:00
Riccardo Spagni
865bb03ecf
Merge pull request #1968
...
5e5b8512
Fix obsolete OpenSSL API usage (hyc)
6c72d6a0
Fix Android recognition (hyc)
e65d66fe
Fix ARM64 identification (hyc)
a4673218
Clean up ARMv8-a aes_expand_key() (hyc)
a3d77901
Fix block_longhash_worker thread (hyc)
2017-04-24 10:46:23 +02:00
assylias
bff90264b8
Add expected total reward to RPC "getblocktemplate".
...
Only works from V5 fork onward - returns 0 before that block.
2017-04-19 18:28:16 +01:00
hyc
a3d779013d
Fix block_longhash_worker thread
...
Wasn't getting its stack size initialized; crashes on Android
with a default stack size of 1MB.
2017-04-12 23:51:18 +01:00
moneromooo-monero
893f5a301e
tx_pool: add blob size and fee/byte when logging a new tx
2017-04-04 09:04:11 +01:00
Riccardo Spagni
e3d2b135e7
Merge pull request #1924
...
6d315459
core: avoid possible reordering bugs wth tx/bloch hash cache (moneromooo-monero)
2017-03-25 13:29:36 +02:00
moneromooo-monero
6d315459b6
core: avoid possible reordering bugs wth tx/bloch hash cache
2017-03-25 09:18:53 +00:00
Derek Zhang
2bee92dbd0
Fixed typo in v5 hard fork finalized date
2017-03-24 18:06:55 -07:00
moneromooo-monero
5a7983585e
blockchain: offset v5 addition date on testnet
...
to silence the update warning, since v5 was done very early
on testnet
2017-03-24 10:01:15 +00:00
Riccardo Spagni
a73a886cb1
Merge pull request #1911
...
91d41090
tx_pool: ensure txes loaded from poolstate.bin have their txid cached (moneromooo-monero)
aaeb164c
tx_pool: remove transactions if they're in the blockchain (moneromooo-monero)
558cfc31
core, wallet: faster tx pool scanning (moneromooo-monero)
f065234b
core: cache tx and block hashes in the respective classes (moneromooo-monero)
2017-03-23 11:46:57 +02:00
moneromooo-monero
91d4109023
tx_pool: ensure txes loaded from poolstate.bin have their txid cached
...
The txid is not saved, and we want to make sure the transactions
have their txid cached while in the pool, since get_transactions
copies the transaction object, so any txid calculation on those
copies would not benefit any later caller, since the original tx
would be left without a cached txid.
2017-03-23 09:25:33 +00:00
moneromooo-monero
aaeb164cf6
tx_pool: remove transactions if they're in the blockchain
...
When starting up, if the pool state was not saved, the pool
might contain transactions which made it into the blockchain,
so these need removing
2017-03-23 09:25:29 +00:00
moneromooo-monero
558cfc31ca
core, wallet: faster tx pool scanning
...
Includes a new RPC to get tx pool hashes fast.
2017-03-23 09:25:22 +00:00
moneromooo-monero
f065234b71
core: cache tx and block hashes in the respective classes
...
An idea from smooth
2017-03-23 09:25:17 +00:00
moneromooo-monero
2242d8ebd6
tx_pool: silence use of uninitialized warning
...
The result is not actually used when uninitialized
2017-03-21 12:21:19 +00:00
moneromooo-monero
7c03349869
blockchain: lower the relay fee by 2%
...
This ensures we accept txes with a fee that's slightly too small,
to accomodate blockchain median jitter
2017-03-20 19:14:12 +00:00
moneromooo-monero
266492e919
tx_pool: use new filling algorithm from v5 only
2017-03-20 18:46:57 +00:00
Riccardo Spagni
73e8510717
Merge pull request #1896
...
a6f1d8fc
core: call {prepare|cleanup}_handle_incoming_blocks when adding a mined block (moneromooo-monero)
2017-03-19 23:03:18 +02:00
moneromooo-monero
a6f1d8fc4c
core: call {prepare|cleanup}_handle_incoming_blocks when adding a mined block
...
This ensures that a batch can't also be started/stopped out of
sync by another thread and us getting in the middle
2017-03-19 12:40:26 +00:00
Lee Clagett
50cd179a60
Removed boost/asio.hpp include from epee/string_tools.h
2017-03-18 22:05:14 -04:00
Riccardo Spagni
c642d3224c
Merge pull request #1869
...
3396a9f2
Add intervening v5 fork for increased min block size (moneromooo-monero)
2017-03-15 18:23:51 +01:00
moneromooo-monero
3396a9f2af
Add intervening v5 fork for increased min block size
...
Minimum mixin 4 and enforced ringct is moved from v5 to v6.
v5 is now used for an increased minimum block size (from 60000
to 300000) to cater for larger typical/minimum transaction size.
The fee algorithm is also changed to decrease the base per kB
fee, and add a cheap tier for those transactions which we do
not care if they get delayed (or even included in a block).
2017-03-15 08:32:51 +00:00
moneromooo-monero
74b216a17f
core: don't try to re-relay an empty set of pool transactions
2017-03-12 14:57:58 +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
Riccardo Spagni
ba0767477d
Merge pull request #1841
...
b553c282
rpc: fix BUILD_TAG mispelling (BUILDTAG) (moneromooo-monero)
02097c87
core: print the "new update found" message in cyan, for visibility (moneromooo-monero)
749ebace
download: check available disk space before downloading (moneromooo-monero)
f36c5f1e
download: give download threads distinct names (moneromooo-monero)
f6211322
core: make update download cancellable (moneromooo-monero)
63f0e074
download: async API (moneromooo-monero)
9bf017ed
http_client: allow cancelling a download (moneromooo-monero)
0d90123c
http_client: allow derived class to get headers at start (moneromooo-monero)
2017-03-06 15:17:08 +00:00
moneromooo-monero
cfa2564a40
blockchain: don't try to load an empty block hash set
...
If the blocks aren't being linked against a binary (such as
one of the blockchain utilities), the symbol will not be
NULL, but the size will be 0. This avoids a apurious warning
about the data hash.
2017-03-05 19:46:55 +00:00