aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
Commit message (Collapse)AuthorAgeFilesLines
...
* | protocol: pass blockchain cumulative difficulty when syncingmoneromooo-monero2017-08-152-0/+5
|/ | | | Not used yet.
* Merge pull request #2276Riccardo Spagni2017-08-151-2/+2
|\ | | | | | | a1891ebe tests: fix tests build (moneromooo-monero)
| * tests: fix tests buildmoneromooo-monero2017-08-101-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.
* | Merge pull request #2275Riccardo Spagni2017-08-151-1/+1
|\ \ | | | | | | | | | 88e83f94 cryptonote_protocol_handler: log versions as unsigned ints (moneromooo-monero)
| * | cryptonote_protocol_handler: log versions as unsigned intsmoneromooo-monero2017-08-121-1/+1
| |/ | | | | | | They're interpreted as characters otherwise
* | Merge pull request #2273Riccardo Spagni2017-08-151-2/+2
|\ \ | | | | | | | | | 0e8d60c0 cryptonote_protocol: fix recv/send idle time before handshake (moneromooo-monero)
| * | cryptonote_protocol: fix recv/send idle time before handshakemoneromooo-monero2017-08-091-2/+2
| |/
* | Merge pull request #2272Riccardo Spagni2017-08-152-67/+56
|\ \ | | | | | | | | | f90bbe2a cryptonote_protocol: keep target in sync with dropped connections (moneromooo-monero)
| * | cryptonote_protocol: keep target in sync with dropped connectionsmoneromooo-monero2017-08-092-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.
* | cryptonote_protocol: fix "holes" in block download schedulemoneromooo-monero2017-08-151-1/+2
| |
* | cryptonote_protocol: fix out of order additionmoneromooo-monero2017-08-151-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.
* | block_queue: do not add empty spansmoneromooo-monero2017-08-151-0/+2
| |
* | daemon: print peers' top height in sync_infomoneromooo-monero2017-08-122-1/+7
| |
* | protocol: fix reorgs while syncingmoneromooo-monero2017-08-123-100/+45
|/
* protocol: add checks for top block hard fork versionmoneromooo-monero2017-08-092-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.
* Merge pull request #2149Riccardo Spagni2017-08-076-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)
| * core: thread most of handle_incoming_txmoneromooo-monero2017-08-071-6/+9
| |
| * cryptonote_protocol: retry stale spans earlymoneromooo-monero2017-08-073-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).
| * cryptonote_protocol: light cleanupmoneromooo-monero2017-08-072-26/+9
| |
| * cryptonote_protocol: avoid spurious SYNCHRONIZED OK messagesmoneromooo-monero2017-08-071-2/+12
| |
| * cryptonote_protocol_handler: sync speedupmoneromooo-monero2017-08-075-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.
* | Merge pull request #2242Riccardo Spagni2017-08-071-1/+1
|\ \ | | | | | | | | | 1c9196b0 cryptonote_protocol: fix days behind calc on testnet (moneromooo-monero)
| * | cryptonote_protocol: fix days behind calc on testnetmoneromooo-monero2017-08-021-1/+1
| |/
* | Merge pull request #2234Riccardo Spagni2017-08-072-6/+6
|\ \ | | | | | | | | | 214fd81e some include cleanup (moneromooo-monero)
| * | some include cleanupmoneromooo-monero2017-07-312-6/+6
| |/
* / cryptonote_protocol: Set send_idle_time in connection_info correctlyrbrunner72017-07-241-1/+1
|/
* Remove typeid use in network_addressmoneromooo-monero2017-06-281-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.
* Merge pull request #2064Riccardo Spagni2017-06-181-3/+1
|\ | | | | | | 6fc2dc39 cryptonote_protocol_handler: fix crash in debug log (moneromooo-monero)
| * cryptonote_protocol_handler: fix crash in debug logmoneromooo-monero2017-06-011-3/+1
| |
* | Merge pull request #2052Riccardo Spagni2017-06-182-33/+22
|\ \ | |/ |/| | | 072102cf abstracted nework addresses (moneromooo-monero)
| * abstracted nework addressesmoneromooo-monero2017-05-272-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.
* | Move txpool to the databasemoneromooo-monero2017-05-251-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.
* 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