summaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
Commit message (Collapse)AuthorAgeFilesLines
* protocol: fix wrong tx being looked up from fluffy blockmoneromooo-monero2017-03-131-1/+10
| | | | Found by smooth
* protocol: fix fluffy to normal block dropping txesmoneromooo-monero2017-03-121-1/+1
|
* protocol: tone down a rate limit not implemented yet warningmoneromooo-monero2017-02-251-1/+1
| | | | it scares users
* protocol: fix "sync done" message not appearingmoneromooo-monero2017-02-241-1/+3
|
* update copyright year, fix occasional lack of newline at line endRiccardo Spagni2017-02-217-7/+7
|
* Merge pull request #1736Riccardo Spagni2017-02-211-1/+5
|\ | | | | | | 424b76a4 Fix spurious synchronization status msgs (Howard Chu)
| * Fix spurious synchronization status msgsHoward Chu2017-02-151-1/+5
| | | | | | | | | | Only update target height if it's actually greater than the current target. Only display "synchronized" when current height equals target.
* | Merge pull request #1727Riccardo Spagni2017-02-211-0/+3
|\ \ | | | | | | | | | 0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
| * | blockchain_db: add "raw" blobdata getters for block and transactionmoneromooo-monero2017-02-131-0/+3
| |/ | | | | | | This speeds up operations such as serving blocks to syncing peers
* / cryptonote_protocol: tweaks to the syncing speedupmoneromooo-monero2017-02-131-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
* Merge pull request #1717Riccardo Spagni2017-02-122-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)
| * protocol: speed up sync by minimizing duplicate workmoneromooo-monero2017-02-122-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.
* | cryptonote_protocol: misc fluffy block fixesmoneromooo-monero2017-02-122-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
* extract some basic code from libcryptonote_core into libcryptonote_basickenshi842017-02-085-6/+8
|
* Merge pull request #1617Riccardo Spagni2017-02-022-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)
| * Remove boost/foreach.cpp includesMiguel Herranz2017-01-221-1/+0
| |
| * Replace BOOST_FOREACH with C++11 ranged forMiguel Herranz2017-01-221-7/+7
| |
* | Update log messages to reflect fact we no longer need to type `exit` to save ↵NanoAkron2017-01-231-5/+2
|/ | | | database before quitting
* protocol: log received messages in a separate categorymoneromooo-monero2017-01-221-8/+10
| | | | Makes it easier to log just what's going on on P2P
* fixups in logging init calls, and add missing net context in a logmoneromooo-monero2017-01-161-1/+1
|
* Change logging to easylogging++moneromooo-monero2017-01-163-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.
* fix do_not_relay not preventing relaying on a timermoneromooo-monero2017-01-141-4/+4
| | | | Also print its value when printing pool
* Improve language of 'node ahead by' messageNanoAkron2016-12-121-1/+1
|
* Update cryptonote_protocol_handler.inlGingeropolous2016-12-101-2/+2
| | | Per discussion of #1359, the wording has changed to indicate that no assessment of the blocks validity is made.
* Merge pull request #1398Riccardo Spagni2016-12-041-8/+8
|\ | | | | | | f4772bae Fix a few minor typos (Pierre Boyer)
| * Fix a few minor typosPierre Boyer2016-12-041-8/+8
| |
* | Merge pull request #1397Riccardo Spagni2016-12-042-2/+22
|\ \ | | | | | | | | | 3f7d6fb5 Fix delayed exit when syncing (moneromooo-monero)
| * | Fix delayed exit when syncingmoneromooo-monero2016-12-042-2/+22
| |/
* / p2p: possibly fix crash in relay_blocksmoneromooo-monero2016-12-011-11/+26
|/
* Merge pull request #1263Riccardo Spagni2016-11-113-5/+387
|\ | | | | | | d61bd81 add lightweight block propagation ("fluffy blocks") (Dion Ahmetaj)
| * add lightweight block propagation ("fluffy blocks")Dion Ahmetaj2016-11-093-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.
* | cryptonote_protocol: drop connection when find_blockchain_supplement failsmoneromooo-monero2016-11-091-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.
* core: notify the txpool when transactions are relayedmoneromooo-monero2016-10-231-0/+3
|
* Merge pull request #1139Riccardo Spagni2016-10-041-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)
| * Update CMakeLists.txtcodehalo2016-09-271-1/+0
| |
| * Update CMakeLists.txtcodehalo2016-09-271-1/+1
| |
| * Update CMakeLists.txtcodehalo2016-09-271-11/+6
| |
| * Cleanup. Dropped "bit" from bitmonero.Randi Joseph2016-09-261-5/+11
| |\
| | * Dropped "bit" from bitmonero.Randi Joseph2016-09-261-3/+3
| | |
| * | Cleanup. Dropped "bit" from bitmonero.Randi Joseph2016-09-261-3/+3
| | |
* | | Merge pull request #1133Riccardo Spagni2016-10-041-1/+1
|\ \ \ | | | | | | | | | | | | cec090f Revert "Fix fake 'network synchronized, begin using' messages" (moneromooo-monero)
| * | | Revert "Fix fake 'network synchronized, begin using' messages"moneromooo-monero2016-09-251-1/+1
| |/ / | | | | | | | | | | | | | | | This reverts commit 78035d2b6c9922f4cd730df0766aa74f4854ccb2. The patch doesn't work, and causes constant SYNCHRONIZED OK spam.
* | | Moved logging to target functions rather than callerNanoAkron2016-10-031-2/+0
| | |
* | | core: make the sync chunk block count overridablemoneromooo-monero2016-09-241-2/+2
|/ /
* / cmake: transitive deps and remove deprecated LINK_*redfish2016-09-181-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.
* fix remaining bitmonero and simplewallet bitsRiccardo Spagni2016-09-031-1/+1
|
* Merge pull request #1012Riccardo Spagni2016-09-011-1/+4
|\ | | | | | | c2941cb Show correct amount of days behind/ahead while syncing (tobiasw2)
| * Show correct amount of days behind/ahead while syncingtobiasw22016-08-301-1/+4
| |
* | Fix fake 'network synchronized, begin using' messagesThomas Winget2016-08-231-1/+1
|/
* Revert "Print stack trace upon exceptions"moneromooo-monero2016-03-211-1/+0
| | | | | | Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.