summaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
Commit message (Collapse)AuthorAgeFilesLines
* Add a --fluffy-blocks option to relay blocks as fluffy blocksmoneromooo-monero2017-09-031-1/+1
| | | | Defaults to off, but fluffy blocks are forced enabled on testnet
* Merge pull request #2373Riccardo Spagni2017-09-021-6/+34
|\ | | | | | | | | | | a3662bae cryptonote_protocol: error handling on cleanup_handle_incoming_blocks (moneromooo-monero) cf4aa653 Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocks (moneromooo-monero) 0ffad5a3 core: guard against exceptions in handle_incoming_{block,tx} (moneromooo-monero)
| * cryptonote_protocol: error handling on cleanup_handle_incoming_blocksmoneromooo-monero2017-08-291-6/+34
| |
* | cryptonote_protocol: remove old spans when received as old blocksmoneromooo-monero2017-08-281-0/+1
|/ | | | fixes getting those in a loop
* Merge pull request #2319Riccardo Spagni2017-08-261-0/+2
|\ | | | | | | | | c22d22e2 Cleanup test impact of adding safesyncmode() method (Howard Chu) 9a859844 Toggle SAFE syncmode on and off automatically (Howard Chu)
| * Cleanup test impact of adding safesyncmode() methodHoward Chu2017-08-221-2/+2
| |
| * Toggle SAFE syncmode on and off automaticallyHoward Chu2017-08-201-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.
* | cryptonote_protocol: warn if we see a higher top version we expectmoneromooo-monero2017-08-231-0/+2
| |
* | cryptonote_protocol: less strict check on top version on connectmoneromooo-monero2017-08-231-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.
* | cryptonote_protocol: update target height when syncing toomoneromooo-monero2017-08-231-0/+4
| |
* | cryptonote_protocol: simplify and remove unnecessary castsmoneromooo-monero2017-08-231-5/+6
| |
* | cryptonote_protocol: print peer top height along with its versionmoneromooo-monero2017-08-231-1/+1
| |
* | cryptonote_protocol: misc fixes to the new sync algorithmmoneromooo-monero2017-08-214-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
* Merge pull request #2303Riccardo Spagni2017-08-174-1/+42
|\ | | | | | | | | 5a283078 cryptonote_protocol: large block sync size before v4 (moneromooo-monero) 7b747607 cryptonote_protocol: kick idle synchronizing peers (moneromooo-monero)
| * cryptonote_protocol: large block sync size before v4moneromooo-monero2017-08-171-1/+1
| |
| * cryptonote_protocol: kick idle synchronizing peersmoneromooo-monero2017-08-164-0/+41
| | | | | | | | | | In case they dropped off downloading for any reason, they'll get sent to download again.
* | Merge pull request #2300Riccardo Spagni2017-08-171-1/+1
|\ \ | | | | | | | | | 42b34b35 Consistently print peer id in hex and on 16 chars (moneromooo-monero)
| * | Consistently print peer id in hex and on 16 charsmoneromooo-monero2017-08-161-1/+1
| |/
* | Merge pull request #2291Riccardo Spagni2017-08-171-1/+1
|\ \ | | | | | | | | | b59cd074 befor -> before (Nano Akron)
| * | befor -> beforeNano Akron2017-08-151-1/+1
| |/ | | | | | | Really unique yet consistent spelling mistake
* / 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)