aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-10Merge pull request #3004Riccardo Spagni1-0/+5
a2c845c7 cryptonote_protocol: internal error consistency size check (moneromooo-monero)
2017-12-24cryptonote_protocol: internal error consistency size checkmoneromooo-monero1-0/+5
2017-12-18use const refs in for loops for non tiny typesmoneromooo-monero1-1/+1
2017-12-18add empty container sanity checks when using front() and back()moneromooo-monero2-0/+7
2017-12-18cryptonote_protocol: sanity check chain hashes from peermoneromooo-monero1-0/+6
2017-12-18cryptonote_protocol: print peer versions when unexpectedmoneromooo-monero1-6/+10
also avoid integer underflow on zero height
2017-12-17Merge pull request #2877Riccardo Spagni3-10/+4
43f5269f Wallets now do not depend on the daemon rpc lib (moneromooo-monero) bb89ae8b move connection_basic and network_throttle from src/p2p to epee (moneromooo-monero) 4abf25f3 cryptonote_core does not depend on p2p anymore (moneromooo-monero)
2017-12-16move connection_basic and network_throttle from src/p2p to epeemoneromooo-monero2-2/+2
These even had the epee namespace. This fixes some ugly circular dependencies.
2017-12-16cryptonote_core does not depend on p2p anymoremoneromooo-monero2-8/+2
As a followon side effect, this makes a lot of inline code included only in particular cpp files (and instanciated when necessary.
2017-12-16move includes around to lessen overall loadmoneromooo-monero3-37/+2
2017-12-16Merge pull request #2866Riccardo Spagni1-1/+1
cf5f6236 Corrections in rate limiting / trottle code, especially in 'out' direction (rbrunner7)
2017-12-03cryptonote_protocol: fix corner case looping asking for same block hashesmoneromooo-monero1-0/+4
2017-11-28Corrections in rate limiting / trottle code, especially in 'out' directionrbrunner71-1/+1
Deleted 3 out of 4 calls to method connection_basic::sleep_before_packet that were erroneous / superfluous, which enabled the elimination of a "fudge" factor of 2.1 in connection_basic::set_rate_up_limit; also ended the multiplying of limit values and numbers of bytes transferred by 1024 before handing them over to the global throttle objects
2017-11-18make connection_id a string in RPCmoneromooo-monero2-3/+3
It's sent as JSON, so raw binary is not appropriate
2017-11-14remove "using namespace std" from headersmoneromooo-monero1-2/+2
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
2017-10-22protocol: drop connections which don't handshake after some timemoneromooo-monero1-3/+6
2017-10-15Fix compiler warnings with Clang 6.0.0.Vasil Dimov1-1/+1
monero/src/cryptonote_protocol/block_queue.cpp:208:44: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] static const boost::uuids::uuid uuid0 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { } monero/src/wallet/wallet_rpc_server.cpp:1895:43: error: lambda capture 'wal' is not used [-Werror,-Wunused-lambda-capture] tools::signal_handler::install([&wrpc, &wal](int) { ^ monero/src/cryptonote_protocol/cryptonote_protocol_handler.inl:1616:40: error: lambda capture 'arg' is not used [-Werror,-Wunused-lambda-capture] m_p2p->for_each_connection([this, &arg, &fluffy_arg, &exclude_context, &fullConnections... ^ monero/src/cryptonote_protocol/cryptonote_protocol_handler.inl:1616:46: error: lambda capture 'fluffy_arg' is not used [-Werror,-Wunused-lambda-capture] m_p2p->for_each_connection([this, &arg, &fluffy_arg, &exclude_context, &fullConnections... ^ monero/src/blockchain_utilities/blockchain_export.cpp:181:3: error: bool literal returned from 'main' [-Werror,-Wmain] CHECK_AND_ASSERT_MES(r, false, "Failed to initialize source blockchain storage"); ^ ~~~~~ monero/contrib/epee/include/misc_log_ex.h:180:97: note: expanded from macro 'CHECK_AND_ASSERT_MES' ...fail_ret_val, message) do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0) ^ ~~~~~~~~~~~~ monero/src/blockchain_utilities/blockchain_export.cpp:195:3: error: bool literal returned from 'main' [-Werror,-Wmain] CHECK_AND_ASSERT_MES(r, false, "Failed to export blockchain raw data"); ^ ~~~~~ monero/contrib/epee/include/misc_log_ex.h:180:97: note: expanded from macro 'CHECK_AND_ASSERT_MES' ...fail_ret_val, message) do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0) ^ ~~~~~~~~~~~~
2017-10-15Merge pull request #2604Riccardo Spagni1-3/+10
0a872798 protocol: kick idle peers by dropping them (moneromooo-monero)
2017-10-15Merge pull request #2571Riccardo Spagni1-2/+1
8028dde7 block_queue: use boost::uuids::nil_uuid where appropriate (moneromooo-monero)
2017-10-15Merge pull request #2469Riccardo Spagni1-0/+12
7adceee6 precomputed block hashes are now in blocks of N (currently 256) (moneromooo-monero)
2017-10-07protocol: kick idle peers by dropping themmoneromooo-monero1-3/+10
This is safer, as we don't risk break expectations (eg, requesting block hashes and then receiving a late set of blocks). Dropping a connection means another will be attempted in a fresh state. Also bump the kick timeout to 5 minutes, to ensure we only kick really idle peers.
2017-10-03block_queue: use boost::uuids::nil_uuid where appropriatemoneromooo-monero1-2/+1
2017-09-25move checkpoints in a separate librarymoneromooo-monero2-2/+2
2017-09-25Merge pull request #2460Riccardo Spagni1-2/+3
3487d810 cryptonote_protocol: fix needless chain hashes downloads (moneromooo-monero)
2017-09-25Merge pull request #2458Riccardo Spagni2-14/+2
7f2f6ee1 protocol: remove hop count on block propagation (moneromooo-monero)
2017-09-21build: auto update version info without manually deleting version.hstoffu1-2/+0
2017-09-18precomputed block hashes are now in blocks of N (currently 256)moneromooo-monero1-0/+12
This shaves a lot of space off binaries
2017-09-17cryptonote_protocol: fix needless chain hashes downloadsmoneromooo-monero1-2/+3
The last known hash was calculated incorrectly, causing further chain hash downloads to restart from the current chain. When the block queue has close to 10k blocks waiting, this causes frequent downloads of 10k more hashes, but with only the last few hashes actually being useful.
2017-09-17protocol: remove hop count on block propagationmoneromooo-monero2-14/+2
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-03Add a --fluffy-blocks option to relay blocks as fluffy blocksmoneromooo-monero1-1/+1
Defaults to off, but fluffy blocks are forced enabled on testnet
2017-09-02Merge pull request #2372Riccardo Spagni1-6/+34
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-08-29cryptonote_protocol: error handling on cleanup_handle_incoming_blocksmoneromooo-monero1-6/+34
2017-08-28cryptonote_protocol: remove old spans when received as old blocksmoneromooo-monero1-0/+1
fixes getting those in a loop
2017-08-26Merge pull request #2314Riccardo Spagni1-0/+2
c22d22e2 Cleanup test impact of adding safesyncmode() method (Howard Chu) 9a859844 Toggle SAFE syncmode on and off automatically (Howard Chu)
2017-08-23cryptonote_protocol: warn if we see a higher top version we expectmoneromooo-monero1-0/+2
2017-08-23cryptonote_protocol: less strict check on top version on connectmoneromooo-monero1-1/+1
This allows peers who synced past a fork on the wrong height to reorg to the right chain after they updated their software to include the new version.
2017-08-23cryptonote_protocol: update target height when syncing toomoneromooo-monero1-0/+4
2017-08-23cryptonote_protocol: simplify and remove unnecessary castsmoneromooo-monero1-5/+6
2017-08-23cryptonote_protocol: print peer top height along with its versionmoneromooo-monero1-1/+1
2017-08-22Cleanup test impact of adding safesyncmode() methodHoward Chu1-2/+2
2017-08-21cryptonote_protocol: misc fixes to the new sync algorithmmoneromooo-monero4-38/+107
Fix sync wedge corner case: It could happen if a connection went into standby mode, while it was the one which had requested the next span, and that span was still waiting for the data, and that peer is not on the main chain. Other peers can then start asking for that data again and again, but never get it as only that forked peer does. And various other fixes
2017-08-20Toggle SAFE syncmode on and off automaticallyHoward Chu1-0/+2
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-17Merge pull request #2303Riccardo Spagni4-1/+42
5a283078 cryptonote_protocol: large block sync size before v4 (moneromooo-monero) 7b747607 cryptonote_protocol: kick idle synchronizing peers (moneromooo-monero)
2017-08-17Merge pull request #2300Riccardo Spagni1-1/+1
42b34b35 Consistently print peer id in hex and on 16 chars (moneromooo-monero)
2017-08-17Merge pull request #2291Riccardo Spagni1-1/+1
b59cd074 befor -> before (Nano Akron)
2017-08-17cryptonote_protocol: large block sync size before v4moneromooo-monero1-1/+1
2017-08-16cryptonote_protocol: kick idle synchronizing peersmoneromooo-monero4-0/+41
In case they dropped off downloading for any reason, they'll get sent to download again.
2017-08-16Consistently print peer id in hex and on 16 charsmoneromooo-monero1-1/+1
2017-08-15befor -> beforeNano Akron1-1/+1
Really unique yet consistent spelling mistake
2017-08-15protocol: pass blockchain cumulative difficulty when syncingmoneromooo-monero2-0/+5
Not used yet.
2017-08-15Merge pull request #2276Riccardo Spagni1-2/+2
a1891ebe tests: fix tests build (moneromooo-monero)
2017-08-15Merge pull request #2275Riccardo Spagni1-1/+1
88e83f94 cryptonote_protocol_handler: log versions as unsigned ints (moneromooo-monero)
2017-08-15Merge pull request #2273Riccardo Spagni1-2/+2
0e8d60c0 cryptonote_protocol: fix recv/send idle time before handshake (moneromooo-monero)
2017-08-15Merge pull request #2272Riccardo Spagni2-67/+56
f90bbe2a cryptonote_protocol: keep target in sync with dropped connections (moneromooo-monero)
2017-08-15cryptonote_protocol: fix "holes" in block download schedulemoneromooo-monero1-1/+2
2017-08-15cryptonote_protocol: fix out of order additionmoneromooo-monero1-0/+37
This was broken by the reorg fix, since we now have to add blocks regardless of their starting height. We now check whether we know the parent for the first block in the next span, or whether it was requested. If neither, it's an orphan. If it is not known, but was requested, we wait to get that block.
2017-08-15block_queue: do not add empty spansmoneromooo-monero1-0/+2
2017-08-12daemon: print peers' top height in sync_infomoneromooo-monero2-1/+7
2017-08-12cryptonote_protocol_handler: log versions as unsigned intsmoneromooo-monero1-1/+1
They're interpreted as characters otherwise
2017-08-12protocol: fix reorgs while syncingmoneromooo-monero3-100/+45
2017-08-10tests: fix tests buildmoneromooo-monero1-2/+2
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-09cryptonote_protocol: fix recv/send idle time before handshakemoneromooo-monero1-2/+2
2017-08-09cryptonote_protocol: keep target in sync with dropped connectionsmoneromooo-monero2-67/+56
When a node is dropped, we stop considering its claimed blockchain height as a factor in the target height calculation. This prevents a runaway chain from being still thought to be the target even if the nodes carrying it are dropped.
2017-08-09protocol: add checks for top block hard fork versionmoneromooo-monero2-0/+13
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-07Merge pull request #2149Riccardo Spagni6-159/+1012
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-07Merge pull request #2242Riccardo Spagni1-1/+1
1c9196b0 cryptonote_protocol: fix days behind calc on testnet (moneromooo-monero)
2017-08-07Merge pull request #2234Riccardo Spagni2-6/+6
214fd81e some include cleanup (moneromooo-monero)
2017-08-07core: thread most of handle_incoming_txmoneromooo-monero1-6/+9
2017-08-07cryptonote_protocol: retry stale spans earlymoneromooo-monero3-0/+25
Connections can be dropped by the net_node layer, unbeknownst to cryptonote_protocol, which would then not flush any spans scheduled to that connection, which would cause it to be only downloaded again once it becomes the next span (possibly after a small delay if it had been requested less than 5 seconds ago).
2017-08-07cryptonote_protocol: light cleanupmoneromooo-monero2-26/+9
2017-08-07cryptonote_protocol: avoid spurious SYNCHRONIZED OK messagesmoneromooo-monero1-2/+12
2017-08-07cryptonote_protocol_handler: sync speedupmoneromooo-monero5-131/+963
A block queue is now placed between block download and block processing. Blocks are now requested only from one peer (unless starved). Includes a new sync_info coommand.
2017-08-02cryptonote_protocol: fix days behind calc on testnetmoneromooo-monero1-1/+1
2017-07-31some include cleanupmoneromooo-monero2-6/+6
2017-07-24cryptonote_protocol: Set send_idle_time in connection_info correctlyrbrunner71-1/+1
2017-06-28Remove typeid use in network_addressmoneromooo-monero1-1/+1
Since I had to add an ID to the derived classes anyway, this can be used instead. This removes an apparently pointless warning from CLANG too.
2017-06-18Merge pull request #2064Riccardo Spagni1-3/+1
6fc2dc39 cryptonote_protocol_handler: fix crash in debug log (moneromooo-monero)
2017-06-18Merge pull request #2052Riccardo Spagni2-33/+22
072102cf abstracted nework addresses (moneromooo-monero)
2017-06-01cryptonote_protocol_handler: fix crash in debug logmoneromooo-monero1-3/+1
2017-05-27abstracted nework addressesmoneromooo-monero2-33/+22
All code which was using ip and port now uses a new IPv4 object, subclass of a new network_address class. This will allow easy addition of I2P addresses later (and also IPv6, etc). Both old style and new style peer lists are now sent in the P2P protocol, which is inefficient but allows peers using both codebases to talk to each other. This will be removed in the future. No other subclasses than IPv4 exist yet.
2017-05-25Move txpool to the databasemoneromooo-monero1-3/+13
Integration could go further (ie, return_tx_to_pool calls should not be needed anymore, possibly other things). poolstate.bin is now obsolete.
2017-03-13protocol: fix wrong tx being looked up from fluffy blockmoneromooo-monero1-1/+10
Found by smooth
2017-03-12protocol: fix fluffy to normal block dropping txesmoneromooo-monero1-1/+1
2017-02-25protocol: tone down a rate limit not implemented yet warningmoneromooo-monero1-1/+1
it scares users
2017-02-24protocol: fix "sync done" message not appearingmoneromooo-monero1-1/+3
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni7-7/+7
2017-02-21Merge pull request #1736Riccardo Spagni1-1/+5
424b76a4 Fix spurious synchronization status msgs (Howard Chu)
2017-02-21Merge pull request #1727Riccardo Spagni1-0/+3
0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
2017-02-15Fix spurious synchronization status msgsHoward Chu1-1/+5
Only update target height if it's actually greater than the current target. Only display "synchronized" when current height equals target.
2017-02-13blockchain_db: add "raw" blobdata getters for block and transactionmoneromooo-monero1-0/+3
This speeds up operations such as serving blocks to syncing peers
2017-02-13cryptonote_protocol: tweaks to the syncing speedupmoneromooo-monero1-6/+10
- 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-12Merge pull request #1717Riccardo Spagni2-2/+31
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-12protocol: speed up sync by minimizing duplicate workmoneromooo-monero2-2/+31
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-12cryptonote_protocol: misc fluffy block fixesmoneromooo-monero2-42/+78
- 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-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi845-6/+8
2017-02-02Merge pull request #1617Riccardo Spagni2-8/+7
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-01-23Update log messages to reflect fact we no longer need to type `exit` to save ↵NanoAkron1-5/+2
database before quitting
2017-01-22Remove boost/foreach.cpp includesMiguel Herranz1-1/+0
2017-01-22Replace BOOST_FOREACH with C++11 ranged forMiguel Herranz1-7/+7
2017-01-22protocol: log received messages in a separate categorymoneromooo-monero1-8/+10
Makes it easier to log just what's going on on P2P
2017-01-16fixups in logging init calls, and add missing net context in a logmoneromooo-monero1-1/+1
2017-01-16Change logging to easylogging++moneromooo-monero3-53/+26
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-14fix do_not_relay not preventing relaying on a timermoneromooo-monero1-4/+4
Also print its value when printing pool
2016-12-12Improve language of 'node ahead by' messageNanoAkron1-1/+1
2016-12-10Update cryptonote_protocol_handler.inlGingeropolous1-2/+2
Per discussion of #1359, the wording has changed to indicate that no assessment of the blocks validity is made.
2016-12-04Merge pull request #1398Riccardo Spagni1-8/+8
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04Merge pull request #1397Riccardo Spagni2-2/+22
3f7d6fb5 Fix delayed exit when syncing (moneromooo-monero)
2016-12-04Fix a few minor typosPierre Boyer1-8/+8
2016-12-04Fix delayed exit when syncingmoneromooo-monero2-2/+22
2016-12-01p2p: possibly fix crash in relay_blocksmoneromooo-monero1-11/+26
2016-11-11Merge pull request #1263Riccardo Spagni3-5/+387
d61bd81 add lightweight block propagation ("fluffy blocks") (Dion Ahmetaj)
2016-11-09add lightweight block propagation ("fluffy blocks")Dion Ahmetaj3-5/+387
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-09cryptonote_protocol: drop connection when find_blockchain_supplement failsmoneromooo-monero1-0/+1
This will be when we can't find common ground between the peer's short chain history and our blockchain. This fixes bad peers claiming a higher blockchain height from never dropped, and keeping the node in synchronizing state forever, since we will never get blocks from that peer.
2016-10-23core: notify the txpool when transactions are relayedmoneromooo-monero1-0/+3
2016-10-04Merge pull request #1139Riccardo Spagni1-3/+3
01ec195 Update CMakeLists.txt (codehalo) 446ebbc Update CMakeLists.txt (codehalo) bd773e7 Update CMakeLists.txt (codehalo) 3627cea Cleanup. Dropped "bit" from bitmonero. (Randi Joseph) 2a51396 Dropped "bit" from bitmonero. (Randi Joseph) 78b13d6 Cleanup. Dropped "bit" from bitmonero. (Randi Joseph) 1e6aedb Cleanup. Dropped "bit" from bitmonero. (Randi Joseph) 9e54616 Dropped "bit" from bitmonero. (Randi Joseph)
2016-10-04Merge pull request #1133Riccardo Spagni1-1/+1
cec090f Revert "Fix fake 'network synchronized, begin using' messages" (moneromooo-monero)
2016-10-03Moved logging to target functions rather than callerNanoAkron1-2/+0
2016-09-27Update CMakeLists.txtcodehalo1-1/+0
2016-09-27Update CMakeLists.txtcodehalo1-1/+1
2016-09-27Update CMakeLists.txtcodehalo1-11/+6
2016-09-26Cleanup. Dropped "bit" from bitmonero.Randi Joseph1-5/+11
2016-09-26Cleanup. Dropped "bit" from bitmonero.Randi Joseph1-3/+3
2016-09-26Dropped "bit" from bitmonero.Randi Joseph1-3/+3
2016-09-25Revert "Fix fake 'network synchronized, begin using' messages"moneromooo-monero1-1/+1
This reverts commit 78035d2b6c9922f4cd730df0766aa74f4854ccb2. The patch doesn't work, and causes constant SYNCHRONIZED OK spam.
2016-09-24core: make the sync chunk block count overridablemoneromooo-monero1-2/+2
2016-09-18cmake: transitive deps and remove deprecated LINK_*redfish1-10/+4
Keep the immediate direct deps at the library that depends on them, declare deps as PUBLIC so that targets that link against that library get the library's deps as transitive deps. Break dep cycle between blockchain_db <-> crytonote_core. No code refactoring, just hide cycle from cmake so that it doesn't complain (cycles are allowed only between static libs, not shared libs). This is in preparation for supproting BUILD_SHARED_LIBS cmake built-in option for building internal libs as shared.
2016-09-03fix remaining bitmonero and simplewallet bitsRiccardo Spagni1-1/+1
2016-09-01Merge pull request #1012Riccardo Spagni1-1/+4
c2941cb Show correct amount of days behind/ahead while syncing (tobiasw2)
2016-08-30Show correct amount of days behind/ahead while syncingtobiasw21-1/+4
2016-08-23Fix fake 'network synchronized, begin using' messagesThomas Winget1-1/+1
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero1-1/+0
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-20Merge pull request #737Riccardo Spagni1-1/+1
1c3ed4c cryptonote_protocol: clarify height wording (moneromooo-monero)
2016-03-20cryptonote_protocol: clarify height wordingmoneromooo-monero1-1/+1
It's logging the blockchain height, not the top block height
2016-03-19Print stack trace upon exceptionsmoneromooo-monero1-0/+1
Useful for debugging users' logs
2016-03-11Use boost::thread instead of std::threadHoward Chu1-1/+1
and all other associated IPC
2016-01-29Fix V1/V2 use of hard fork related parametersmoneromooo-monero1-1/+1
Some of it uses hardcoded height, which will need some thinking for next (voted upon) fork.
2015-12-31updated copyright yearRiccardo Spagni7-7/+7
2015-12-18Merge pull request #543Riccardo Spagni1-1/+1
63cb1a5 move another non user useful log to L1 (moneromooo-monero) 02827d5 p2p: minor log formatting fix (moneromooo-monero)
2015-12-17move another non user useful log to L1moneromooo-monero1-1/+1
2015-12-15Replace tabs with two spaces for consistency with rest of codebasewarptangent1-278/+277
Remove trailing whitespace in same files.
2015-12-14Tone down L0 logs during daemon sync some moremoneromooo-monero2-3/+3
2015-12-14Tone down a bit L0 logs during daemon syncmoneromooo-monero1-2/+10
2015-11-23Add IP blocking for misbehaving nodes (adapted from Boolberry)Javier Smooth1-0/+4
With minor cleanup and fixes (spelling, indent) by moneromooo
2015-11-21Relay transactions when they linger too long in the poolmoneromooo-monero1-3/+3
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-07-15Pause miner before preparing for incoming blocksNoodleDoodleNoodleDoodleNoodleDoodleNoo1-6/+5
2015-07-15** CHANGES ARE EXPERIMENTAL (FOR TESTING ONLY)NoodleDoodleNoodleDoodleNoodleDoodleNoo1-2/+10
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 (0f4a036437fd41a5498ee5e74e2422ea6177aa3e) 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-05-31cleaning up, removing redundant files, renaming, fixing incorrect licensesRiccardo Spagni2-3/+4
2015-04-01remerged; commands JSON. logging upgrade. doxygenrfree2monero2-0/+51
2015-02-202014 network limit 1.2 +utils +toc -doc -drmonerorfree2monero3-61/+62
new update of the pr with network limits more debug options: discarding downloaded blocks all or after given height. trying to trigger the locking errors. debug levels polished/tuned to sane values. debug/logging improved. warning: this pr should be correct code, but it could make an existing (in master version) locking error appear more often. it's a race on the list (map) of peers, e.g. between closing/deleting them versus working on them in net-limit sleep in sending chunk. the bug is not in this code/this pr, but in the master version. the locking problem of master will be fixed in other pr. problem is ub, and in practice is seems to usually cause program abort (tested on debian stable with updated gcc). see --help for option to add sleep to trigger the error faster.
2015-02-20removed not needed <netinet/in.h>rfree2monero1-1/+0
2015-02-202014 network limit 1.1 +utils +toc -doc -drmonerorfree2monero3-113/+139
Update of the PR with network limits works very well for all speeds (but remember that low download speed can stop upload because we then slow down downloading of blockchain requests too) more debug options fixed pedantic warnings in our code should work again on Mac OS X and FreeBSD fixed warning about size_t tested on Debian, Ubuntu, Windows(testing now) TCP options and ToS (QoS) flag FIXED peer number limit FIXED some spikes in ingress/download FIXED problems when other up and down limit
2015-02-202014 network limit 1.0a +utils +toc -doc -drmonerorfree2monero4-12/+408
commands and options for network limiting works very well e.g. for 50 KiB/sec up and down ToS (QoS) flag peer number limit TODO some spikes in ingress/download TODO problems when other up and down limit added "otshell utils" - simple logging (with colors, text files channels)
2015-01-02year updated in licenseRiccardo Spagni5-5/+5
2014-09-09moved non-critical warnings and errors to log level 1fluffypony1-5/+5
2014-07-23License updated to BSD 3-clausefluffypony5-15/+145
2014-07-23Changed time_t to uint64_t for serializationThomas Winget1-3/+3
time_t is implementation-, architecture-, and apparently compiler-dependent. As an example, on my machine if I build a 64-bit binary, sizeof(time_t) is 8, but for a 32-bit binary it's 4. uint64_t is therefore much more consistent for serialization, given that RPC calls are potentially made between different machines.
2014-07-18Added get_connections RPC call to daemonThomas Winget3-0/+79
2014-06-04Added static_cast to hshd.current_heightNeozaru1-1/+1
2014-06-04'getinfo' daemon HTTP-RPC returns 'target_height' for progress estimationsNeozaru1-0/+5
2014-05-250.8.8updatemydesktop2-13/+16
2014-05-03fix genesis block hash, checkpoint, days behindmydesktop1-1/+1
2014-04-02json rpc for wallet and bugfixAntonio Juarez1-1/+3
2014-03-20some fixesAntonio Juarez2-23/+47
2014-03-03moved all stuff to githubAntonio Juarez5-0/+780