Commit graph

185 commits

Author SHA1 Message Date
moneromooo-monero 708758b737
core: do not download an update we already downloaded 2017-02-21 22:23:59 +00: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
moneromooo-monero e74b3ab5f7
core: add p2p bind port options from net_node
They're now used by core to determine the data directory to use
for the txpool directory.

This fixes an assert in the core tests, which don't use the RPC
server, which normally initializes the P2P code.
2017-02-21 09:35:23 +00:00
Riccardo Spagni 49efd3add9
Merge pull request #1727
0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
2017-02-21 11:27:15 +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 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
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
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
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Riccardo Spagni fcb299b4ae
Merge pull request #1641
ca94d0a4 Separate data per P2P port (Miguel Herranz)
2017-02-02 22:41:28 +02:00
Riccardo Spagni c3eff820be
Merge pull request #1642
3ae79a59 core: set missing verifivation_failed flag when rejecting a tx (moneromooo-monero)
ea6549e9 core_tests: decrease trace level from trace to debug (moneromooo-monero)
2017-02-02 21:25:30 +02:00
Riccardo Spagni f9e60dcd55
Merge pull request #1617
0644eed7 Remove boost/foreach.cpp includes (Miguel Herranz)
36dd3e23 Replace BOOST_REVERSE_FOREACH with ranged for (Miguel Herranz)
629e3101 Replace BOOST_FOREACH with C++11 ranged for (Miguel Herranz)
2017-02-02 18:16:39 +02:00
Miguel Herranz ca94d0a43c Separate data per P2P port
poolstate.bin and p2pstate.bin are stored in .bitmonero/ if the default
P2P port is being used.

If another port is used both files are stored in
.bitmonero/PORTNUMBER/.
2017-01-28 14:16:06 +01:00
moneromooo-monero 3ae79a59e4
core: set missing verifivation_failed flag when rejecting a tx
This fixes two core rct tests
2017-01-28 09:43:41 +00:00
NanoAkron 98357db400
Update log messages to reflect fact we no longer need to type exit to save database before quitting 2017-01-23 01:21:26 +00:00
Miguel Herranz 0644eed772 Remove boost/foreach.cpp includes 2017-01-22 23:31:34 +01:00
Miguel Herranz 629e3101ab Replace BOOST_FOREACH with C++11 ranged for 2017-01-22 21:38:10 +01:00
Riccardo Spagni 9c06a7fd04
Merge pull request #1615
f0989893 core: cache tx hashes of failing semantics txes (moneromooo-monero)
2017-01-22 11:51:53 -05:00
Riccardo Spagni a3de797e57
Merge pull request #1610
b70ab128 rpc: fix orphan_status when getting blocks (moneromooo-monero)
2017-01-22 11:48:39 -05:00
moneromooo-monero f098989396
core: cache tx hashes of failing semantics txes 2017-01-22 16:13:31 +00:00
moneromooo-monero b70ab128fc
rpc: fix orphan_status when getting blocks
It was always set to false, even for orphan blocks
2017-01-22 12:20:55 +00:00
moneromooo-monero 7c3f79cb9f
core: early out in handle_incoming_tx if already in pool or blockchain 2017-01-21 20:30:10 +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 1207d8ad0d
Merge pull request #1576
ba3968f6 rct: split rct checks between semantics and other (moneromooo-monero)
2017-01-15 14:56:39 -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
Riccardo Spagni 65e33b1bc5
Merge pull request #1506
3ff54bdd Check for correct thread before ending batch transaction (Howard Chu)
eaf8470b Must wait for previous batch to finish before starting new one (Howard Chu)
c903c554 Don't cache block height, always get from DB (Howard Chu)
eb1fb601 Tweak default db-sync-mode to fast:async:1 (Howard Chu)
0693cff9 Use batch transactions when syncing (Howard Chu)
2017-01-15 14:43:12 -05:00
Howard Chu eb1fb6011a
Tweak default db-sync-mode to fast:async:1
fsync the DB asynchronously, to allow block download/verification
to proceed while syncing. Sync after every batch. Note that
"fastest" still defaults to fastest:async:1000.
2017-01-14 22:43:06 +00:00
moneromooo-monero ba3968f6ce
rct: split rct checks between semantics and other
Semantics can be checked early
2017-01-14 21:17:32 +00: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
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
Miguel Herranz aff28178e6 Remove db-auto-remove-logs 2017-01-10 11:49:45 +01:00
Miguel Herranz 1229c68587 Remove berkeley from db_type initialization 2017-01-10 11:46:12 +01:00
moneromooo-monero 12abe86ac0
core: fix recalculation of emission/fees
It was counting things many, many times
2016-12-21 11:19:04 +00:00
Riccardo Spagni f2ea2afb77
Merge pull request #1398
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04 22:28:22 +02:00
Pierre Boyer f4772bae81 Fix a few minor typos 2016-12-04 14:13:54 +01:00
moneromooo-monero 3f7d6fb57d
Fix delayed exit when syncing 2016-12-04 12:27:45 +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
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 1e163666f3
core: notify the txpool when transactions are relayed 2016-10-23 00:32:49 +01:00
Dion Ahmetaj a6bc1103fd patched parameter type bug that was causing failure on 32 bit 2016-10-14 10:37:10 -04: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 412da63622 added print_coinbase_tx_sum option 2016-10-10 15:45:51 -04:00
Riccardo Spagni d60826c0b9
Merge pull request #1133
cec090f Revert "Fix fake 'network synchronized, begin using' messages" (moneromooo-monero)
2016-10-04 12:08:33 +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 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
NanoAkron 442bfd1600 Added messages at log level 2 to reflect deactivation procedure 2016-10-02 23:00:41 +01:00
moneromooo-monero cec090fc8a
Revert "Fix fake 'network synchronized, begin using' messages"
This reverts commit 78035d2b6c.

The patch doesn't work, and causes constant SYNCHRONIZED OK spam.
2016-09-25 19:08:35 +01:00
moneromooo-monero 5e3e362c85
core: make the sync chunk block count overridable 2016-09-24 17:00:19 +01:00
Riccardo Spagni 011e42f337
fix nigglies, as pointed out by moneromooo-monero 2016-09-03 22:36:09 +02:00
Riccardo Spagni df63e0704a
fix remaining bitmonero and simplewallet bits 2016-09-03 22:03:44 +02:00
Howard Chu b8c03a5f10
Remove blocks_per_sync limits
The code used to cap at 5000 blocks per sync. It also treated 0 as 1.
Remove these checks; if specified as 0 do no periodic syncs at all.
Then the user is responsible for syncing in some external process.
2016-08-31 00:00:19 +01:00
Riccardo Spagni f5b802e684
Merge pull request #999
dc411ea Change default db-sync-mode to fast, not fastest (Howard Chu)
2016-08-28 22:50:18 +02:00
moneromooo-monero cf33e1a52a
rct: do not serialize public keys in outPk
They can be reconstructed from vout
2016-08-28 21:29:43 +01:00
moneromooo-monero f5465d8246
Condition v2 txes on v3 hard fork 2016-08-28 21:29:04 +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
Howard Chu dc411ea3b7 Change default db-sync-mode to fast, not fastest 2016-08-28 16:20:22 +01:00
Thomas Winget 78035d2b6c
Fix fake 'network synchronized, begin using' messages 2016-08-23 22:52:25 -04:00
moneromooo-monero 11dc091464
Fake outs set is now decided by the wallet
This plugs a privacy leak from the wallet to the daemon,
as the daemon could previously see what input is included
as a transaction input, which the daemon hadn't previously
supplied. Now, the wallet requests a particular set of
outputs, including the real one.

This can result in transactions that can't be accepted if
the wallet happens to select too many outputs with non standard
unlock times. The daemon could know this and select another
output, but the wallet is blind to it. It's currently very
unlikely since I don't think anything uses non default
unlock times. The wallet requests more outputs than necessary
so it can use spares if any of the returns outputs are still
locked. If there are not enough spares to reach the desired
mixin, the transaction will fail.
2016-08-11 14:35:27 +01:00
moneromooo-monero 24b3e9007a
Convey tx verification failure reasons to the RPC client
This allows appropriate action to be taken, like displaying
the reason to the user.

Do just that in simplewallet, which should help a lot in
determining why users fail to send.

Also make it so a tx which is accepted but not relayed is
seen as a success rather than a failure.
2016-03-27 12:37:18 +01:00
Riccardo Spagni 0d30b65785 Merge pull request #749
bfd4a28 Update BlockchainDB documentation (Thomas Winget)
797357e Change Doxyfile, Blockchain not blockchain_storage (Thomas Winget)
c835215 remove defunct code from cryptonote::core (Thomas Winget)
50dba6d cryptonote::core doxygen documentation (Thomas Winget)
8ac329d doxygen documentation for difficulty functions (Thomas Winget)
540a76c Move checkpoint functions into checkpoints class (Thomas Winget)
1b0c98e doxygen documentation for checkpoints.{h,cpp} (Thomas Winget)
89c24ac Remove unnecessary or defunct code (Thomas Winget)
ab0ed14 doxygen include private and static members (Thomas Winget)
3a48449 Updated documentation for blockchain.* (Thomas Winget)
2016-03-25 09:12:25 +02:00
Riccardo Spagni 01e0a69c17 Revert "Merge pull request #749"
This reverts commit 7fa63a82a1, reversing
changes made to cb6be986c3.
2016-03-25 08:42:42 +02:00
Thomas Winget c835215ea9
remove defunct code from cryptonote::core 2016-03-24 03:39:58 -04:00
Thomas Winget 50dba6d301
cryptonote::core doxygen documentation 2016-03-24 03:39:55 -04:00
Thomas Winget 540a76c5c2
Move checkpoint functions into checkpoints class
The functions in src/cryptonote_core/checkpoints_create.{h,cpp} should
be member functions of the checkpoints class, if nothing else for the
sake of keeping their documentation together.

This commit covers moving those functions to be member functions of the
checkpoints class as well as documenting those functions.
2016-03-24 03:39:41 -04:00
moneromooo-monero f7301c3563
Revert "Print stack trace upon exceptions"
Ain't nobody got time for link/cmake skullduggery.

This reverts commit fff238ec94.
2016-03-21 10:12:23 +00:00
moneromooo-monero fff238ec94
Print stack trace upon exceptions
Useful for debugging users' logs
2016-03-19 21:48:36 +00:00
moneromooo-monero 889217381f
core: print "update needed" hard fork notifications in red 2016-02-17 22:57:14 +00:00
moneromooo-monero a333c42cde
core_tests: add tests for hard fork behaviors (MRL-0004)
We also replace the --fakechain option with an optional structure
containing details about configuration for the core/blockchain,
for test purposes. This seems more future friendly.
2016-02-08 18:52:00 +00:00
moneromooo-monero 05bfb51d3e
core: move the db lock to the data directory
Locking just one db turns out to not have been a good idea, since
the pool and p2p state fdles have to be used anyway.

Also ensure the directory exists before tring to lock.
2016-02-04 18:09:45 +00:00
moneromooo-monero 8b3539bc11
core: prevent the database from being used by multiple daemons
A boost lock is used to determine whether more than one process
wants to access the database. The boost file_lock doesn't seem
to like locking directories, so we use an arbitrary file in it.
This allows to still run two daemons if they have different
database directories (ie, LMDB/BDB, different data directories).
2016-01-31 12:58:08 +00:00
moneromooo-monero 3b1d7e03fc
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
2016-01-29 17:21:11 +00:00
Riccardo Spagni b98d88c17e
Merge pull request #587
1e07110 Nicer looking exit when blockchain.bin is found (moneromooo-monero)
2015-12-31 22:34:57 +02:00
moneromooo-monero 1e07110a7a
Nicer looking exit when blockchain.bin is found
Do not print the exception message, and write the important bit
in red, since people will only read the last line otherwise.
2015-12-31 17:09:00 +00:00
moneromooo-monero 40f97ce83d
core: do not use the persistent pool state for tests
Fixes intermittent test failures when the pool contains
unexpected transactions that were brought in from the
live pool.
2015-12-31 14:24:06 +00:00
Riccardo Spagni de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
moneromooo-monero 09533557b5
blockchain_db: inform user about new format if blockchain.bin is found 2015-12-28 23:03:46 +00:00
warptangent 725acc7f17
Replace tabs with two spaces for consistency with rest of codebase
Remove trailing whitespace in same files.
2015-12-15 06:22:06 -08:00
moneromooo-monero 10da0a0b7c
add a --fakechain argument for tests
The core tests use the blockchain, and reset it to be able
to add test data to it. This does not play nice with the
databases, since those will save that data without an explicit
save call.
We add a fakechain flag that the tests will set, which tells
the core and blockchain code to use a separate database, as
well as skip a few things like checkpoints and fixup, which
only make sense for real data.
2015-12-13 11:38:37 +00:00
moneromooo-monero 336b37580f
Register daemon command line arguments to core if they're used in core
This fixes coretests, which does not register daemon specific arguments,
but uses core, which uses those arguments. Also gets rid of an unwanted
dependency on daemon code from core.
2015-12-08 23:06:29 +00:00
moneromooo-monero 932994c0cb
Relay transactions when they linger too long in the pool
The last relayed time of a transaction is maintained, and
transactions will be relayed again if they are still in the
pool after a certain amount of time, which increases with
the transaction's age. All such transactions are resent,
whether or not they originated on the local node.
2015-11-21 00:56:21 +00:00
moneromooo-monero a7177610b3
core: add consts where appropriate 2015-09-19 16:47:35 +01:00
moneromooo-monero 8ffc508cef
core: moan when we think an update is needed to get latest hard fork info 2015-09-13 18:09:57 +01:00
moneromooo-monero 83bbea4c7f
Add a is_key_image_spent daemon command and RPC call 2015-08-11 10:52:41 +01:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 94ea3e8ed2 Removed on_idle() calls to Blockchain::store_blockchain() for lmdb.
Added option to cache tx-input verification results.
2015-07-15 23:20:25 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo e5d2680094 ** CHANGES ARE EXPERIMENTAL (FOR TESTING ONLY)
Bockchain:
1. Optim: Multi-thread long-hash computation when encountering groups of blocks.
2. Optim: Cache verified txs and return result from cache instead of re-checking whenever possible.
3. Optim: Preload output-keys when encoutering groups of blocks. Sort by amount and global-index before bulk querying database and multi-thread when possible.
4. Optim: Disable double spend check on block verification, double spend is already detected when trying to add blocks.
5. Optim: Multi-thread signature computation whenever possible.
6. Patch: Disable locking (recursive mutex) on called functions from check_tx_inputs which causes slowdowns (only seems to happen on ubuntu/VMs??? Reason: TBD)
7. Optim: Removed looped full-tx hash computation when retrieving transactions from pool (???).
8. Optim: Cache difficulty/timestamps (735 blocks) for next-difficulty calculations so that only 2 db reads per new block is needed when a new block arrives (instead of 1470 reads).

Berkeley-DB:
1. Fix: 32-bit data errors causing wrong output global indices and failure to send blocks to peers (etc).
2. Fix: Unable to pop blocks on reorganize due to transaction errors.
3. Patch: Large number of transaction aborts when running multi-threaded bulk queries.
4. Patch: Insufficient locks error when running full sync.
5. Patch: Incorrect db stats when returning from an immediate exit from "pop block" operation.
6. Optim: Add bulk queries to get output global indices.
7. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3)
8. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key
9. Optim: Added thread-safe buffers used when multi-threading bulk queries.
10. Optim: Added support for nosync/write_nosync options for improved performance (*see --db-sync-mode option for details)
11. Mod: Added checkpoint thread and auto-remove-logs option.
12. *Now usable on 32-bit systems like RPI2.

LMDB:
1. Optim: Added custom comparison for 256-bit key tables (minor speed-up, TBD: get actual effect)
2. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3)
3. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key
4. Optim: Added support for sync/writemap options for improved performance (*see --db-sync-mode option for details)
5. Mod: Auto resize to +1GB instead of multiplier x1.5

ETC:
1. Minor optimizations for slow-hash for ARM (RPI2). Incomplete.
2. Fix: 32-bit saturation bug when computing next difficulty on large blocks.

[PENDING ISSUES]
1. Berkely db has a very slow "pop-block" operation. This is very noticeable on the RPI2 as it sometimes takes > 10 MINUTES to pop a block during reorganization.
   This does not happen very often however, most reorgs seem to take a few seconds but it possibly depends on the number of outputs present. TBD.
2. Berkeley db, possible bug "unable to allocate memory". TBD.

[NEW OPTIONS] (*Currently all enabled for testing purposes)
1. --fast-block-sync arg=[0:1] (default: 1)
	a. 0 = Compute long hash per block (may take a while depending on CPU)
	b. 1 = Skip long-hash and verify blocks based on embedded known good block hashes (faster, minimal CPU dependence)
2. --db-sync-mode arg=[[safe|fast|fastest]:[sync|async]:[nblocks_per_sync]] (default: fastest:async:1000)
	a. safe = fdatasync/fsync (or equivalent) per stored block. Very slow, but safest option to protect against power-out/crash conditions.
	b. fast/fastest = Enables asynchronous fdatasync/fsync (or equivalent). Useful for battery operated devices or STABLE systems with UPS and/or systems with battery backed write cache/solid state cache.
	Fast    - Write meta-data but defer data flush.
	Fastest - Defer meta-data and data flush.
	Sync    - Flush data after nblocks_per_sync and wait.
	Async   - Flush data after nblocks_per_sync but do not wait for the operation to finish.
3. --prep-blocks-threads arg=[n] (default: 4 or system max threads, whichever is lower)
        Max number of threads to use when computing long-hash in groups.
4. --show-time-stats arg=[0:1] (default: 1)
	Show benchmark related time stats.
5. --db-auto-remove-logs arg=[0:1] (default: 1)
	For berkeley-db only. Auto remove logs if enabled.

**Note: lmdb and berkeley-db have changes to the tables and are not compatible with official git head version.
	At the moment, you need a full resync to use this optimized version.

[PERFORMANCE COMPARISON]
**Some figures are approximations only.
Using a baseline machine of an i7-2600K+SSD+(with full pow computation):
1. The optimized lmdb/blockhain core can process blocks up to 585K for ~1.25 hours + download time, so it usually takes 2.5 hours to sync the full chain.
2. The current head with memory can process blocks up to 585K for ~4.2 hours + download time, so it usually takes 5.5 hours to sync the full chain.
3. The current head with lmdb can process blocks up to 585K for ~32 hours + download time and usually takes 36 hours to sync the full chain.

Averate procesing times (with full pow computation):
lmdb-optimized:
1. tx_ave = 2.5 ms / tx
2. block_ave = 5.87 ms / block
memory-official-repo:
1. tx_ave = 8.85 ms / tx
2. block_ave = 19.68 ms / block
lmdb-official-repo (0f4a036437)
1. tx_ave = 47.8 ms / tx
2. block_ave = 64.2 ms / block

**Note: The following data denotes processing times only (does not include p2p download time)
lmdb-optimized processing times (with full pow computation):
1. Desktop,  Quad-core / 8-threads 2600k  (8Mb) - 1.25 hours processing time (--db-sync-mode=fastest:async:1000).
2. Laptop,   Dual-core / 4-threads U4200  (3Mb) - 4.90 hours processing time (--db-sync-mode=fastest:async:1000).
3. Embedded, Quad-core / 4-threads Z3735F (2x1Mb) - 12.0 hours processing time (--db-sync-mode=fastest:async:1000).

lmdb-optimized processing times (with per-block-checkpoint)
1. Desktop,  Quad-core / 8-threads 2600k  (8Mb) - 10 minutes processing time (--db-sync-mode=fastest:async:1000).

berkeley-db optimized processing times (with full pow computation)
1. Desktop, Quad-core / 8-threads 2600k  (8Mb) - 1.8 hours processing time (--db-sync-mode=fastest:async:1000).
2. RPI2. Improved from estimated 3 months(???) into 2.5 days (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).

berkeley-db optimized processing times (with per-block-checkpoint)
1. RPI2. 12-15 hours (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).
2015-07-15 23:20:16 -07:00
warptangent 71af04669c
Update log statements
Use filesystem path conversion to string() instead of c_str().
Windows may otherwise output an address.
2015-05-08 14:12:06 -07:00
Riccardo Spagni 8005a0c7a1
Merge pull request #269
641d824 Keep memory pool consistent when stuck tx removed (warptangent)
b76857f Add mempool output to daemon via command and RPC (warptangent)
2015-05-06 08:09:31 +02:00
warptangent b76857f9d9
Add mempool output to daemon via command and RPC
This is for the "print_pool" command and "get_transaction_pool" RPC
method.

Add mempool's spent key images to the results.
2015-04-23 07:04:36 -07:00
Thomas Winget 2717883dba
DNS Checkpoint updating-related fixes/changes
Only one thread will be doing the updating.

Two valid responses must match, and the first two that match will be
used.
2015-04-22 04:36:39 -04:00
Thomas Winget ae08be5394
Disable DNS checkpoint updating on testnet 2015-04-08 18:07:46 -04:00
Thomas Winget a8bc7182ea
Merge BlockchainDB into upstream 2015-04-07 17:56:18 -04:00
Thomas Winget 9519526224
Only compile BerkeleyDB as an option in non-static 2015-04-07 15:02:20 -04:00
rfree2monero c511abf005 remerged; commands JSON. logging upgrade. doxygen 2015-04-01 19:00:45 +02:00