aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
Commit message (Collapse)AuthorAgeFilesLines
...
* also use portable serializer for boost_serialization_helper.h and ↵kenshi842016-12-202-7/+28
| | | | net_node.inl, completely adandon boost/archive/binary_oarchive.hpp
* Merge pull request #1398Riccardo Spagni2016-12-041-4/+4
|\ | | | | | | f4772bae Fix a few minor typos (Pierre Boyer)
| * Fix a few minor typosPierre Boyer2016-12-041-4/+4
| |
* | Merge pull request #1397Riccardo Spagni2016-12-041-0/+1
|\ \ | | | | | | | | | 3f7d6fb5 Fix delayed exit when syncing (moneromooo-monero)
| * | Fix delayed exit when syncingmoneromooo-monero2016-12-041-0/+1
| |/
* | Merge pull request #1396Riccardo Spagni2016-12-041-4/+6
|\ \ | | | | | | | | | 7c0dd5e4 net_node: drop connections from banned IPs after looping through connections (moneromooo-monero)
| * | net_node: drop connections from banned IPs after looping through connectionsmoneromooo-monero2016-12-031-4/+6
| |/ | | | | | | | | | | | | This keeps the connections lock just for the time of looping and adding connectoins to a list, and the dropping happens after it. This should avoid lengthy delays waiting for the connections lock.
* / p2p: possibly fix crash in relay_blocksmoneromooo-monero2016-12-013-6/+17
|/
* Fix DNS failures in offline mode preventing daemon startupmoneromooo-monero2016-11-231-1/+1
|
* add lightweight block propagation ("fluffy blocks")Dion Ahmetaj2016-11-094-6/+81
| | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #1165Riccardo Spagni2016-10-041-0/+12
|\ | | | | | | e57379a p2p: drop any existing connection to a banned IP (moneromooo-monero)
| * p2p: drop any existing connection to a banned IPmoneromooo-monero2016-10-021-0/+12
| |
* | Cleanup. Dropped "bit" from bitmonero.Randi Joseph2016-09-261-2/+2
| |
* | Cleanup. Dropped "bit" from bitmonero.Randi Joseph2016-09-261-1/+1
|/
* remove dead backup seed nodes, add new onesRiccardo Spagni2016-09-181-24/+6
|
* cmake: transitive deps and remove deprecated LINK_*redfish2016-09-181-7/+10
| | | | | | | | | | | | | | 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.
* allow peers without portmoneromooo-monero2016-07-031-0/+5
| | | | The default port is then used
* Merge pull request #846Riccardo Spagni2016-06-194-4/+4
|\ | | | | | | | | | | | | | | | | | | de030d9 fix: error: -Werror=misleading-indentation (moneroexample) c2d7300 contrib: epee: add exception spec to throwing destructors (redfish) 6898741 src: p2p: add exception spec to throwing destructors (redfish) 21dbc95 crypto: slow-hash: fix misleading indent (redfish) 70f3634 crypto: slow-hash: remove unused hash list for ARM (redfish) 1a7772f crypto: oaes_lib: remove unused _NR array (redfish) 6462a3a crypto: fix compile error: use named type in sizeof (redfish)
| * src: p2p: add exception spec to throwing destructorsredfish2016-05-184-4/+4
| | | | | | | | | | | | | | The destructors get a noexcept(true) spec by default, but these destructors in fact throw exceptions. An alternative fix might be to not throw (most if not all of these throws are non-essential error-reporting/logging).
* | Merge pull request #775Riccardo Spagni2016-06-191-2/+2
|\ \ | |/ |/| | | | | e409e59 Print stack trace on exceptions (moneromooo-monero) ef4ff42 connection_basic: avoid gratuitous exception (moneromooo-monero)
| * connection_basic: avoid gratuitous exceptionmoneromooo-monero2016-03-281-2/+2
| | | | | | | | | | The remote endpoint is usually invalid, so use a version of the call that returns an error code instead.
* | net_node: fix connection leak when ping fails with bad responsemoneromooo-monero2016-04-171-0/+1
|/ | | | | If there is no comms error, but the response is not as expected, close would not be called.
* Revert "Print stack trace upon exceptions"moneromooo-monero2016-03-211-4/+3
| | | | | | Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
* Print stack trace upon exceptionsmoneromooo-monero2016-03-191-3/+4
| | | | Useful for debugging users' logs
* p2p: lock access to the blocked ips mapmoneromooo-monero2016-03-122-3/+3
|
* Use boost::thread instead of std::threadHoward Chu2016-03-116-30/+31
| | | | and all other associated IPC
* Use boost::thread instead of std::threadHoward Chu2016-02-183-3/+4
| | | | std::thread crashes on (at least) ARMv6 g++ 4.8/4.9
* 'max limit of...' is redundant wording, rephrasebinaryFate2016-01-141-1/+1
|
* updated copyright yearRiccardo Spagni2015-12-3116-16/+16
|
* net_peerlist: move a couple functions from public to privatemoneromooo-monero2015-12-301-2/+2
| | | | | They do not take the object lock, and are meant to be used only internally, called from a function which does take the lock.
* net_node: fix a hang on exitmoneromooo-monero2015-12-221-1/+1
| | | | | One loop was not paying attention to the stop signal, and could end up looping forever
* Add missing semicolons after log statementsmoneromooo-monero2015-12-191-1/+1
|
* Merge pull request #543Riccardo Spagni2015-12-181-1/+1
|\ | | | | | | | | 63cb1a5 move another non user useful log to L1 (moneromooo-monero) 02827d5 p2p: minor log formatting fix (moneromooo-monero)
| * p2p: minor log formatting fixmoneromooo-monero2015-12-171-1/+1
| |
* | Replace tabs with two spaces for consistency with rest of codebasewarptangent2015-12-152-233/+233
|/ | | | Remove trailing whitespace in same files.
* Merge pull request #527Riccardo Spagni2015-12-091-2/+1
|\ | | | | | | 336b375 Register daemon command line arguments to core if they're used in core (moneromooo-monero)
| * Register daemon command line arguments to core if they're used in coremoneromooo-monero2015-12-081-2/+1
| | | | | | | | | | | | 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.
* | Merge pull request #526Riccardo Spagni2015-12-082-0/+12
|\ \ | | | | | | | | | 2c83055 net_node: add a --offline argument (moneromooo-monero)
| * | net_node: add a --offline argumentmoneromooo-monero2015-12-072-0/+12
| |/ | | | | | | It will not try to connect to the monero network, nor listen
* / p2p: failure to load p2pstate.bin is not fatal anymoremoneromooo-monero2015-12-071-2/+11
|/ | | | Clear any partially loaded data, and start with a default config
* add RPC calls and commands to get/set bansmoneromooo-monero2015-11-263-4/+28
|
* net_node: allow bans for custom amounts of timemoneromooo-monero2015-11-252-4/+4
| | | | | | m_blocked_ips now stores the unblocking time, rather than the blocking time. Also change > to >=, since banning for 0 seconds should not ban
* Add IP blocking for misbehaving nodes (adapted from Boolberry)Javier Smooth2015-11-234-2/+98
| | | | With minor cleanup and fixes (spelling, indent) by moneromooo
* quiet down p2p logging a bitJavier Smooth2015-11-231-1/+1
|
* Update to compile with latest miniupnpcwarptangent2015-10-051-0/+6
| | | | | upnpDiscover() takes a new argument for TTL. Use the suggested default of 2.
* net_node: Use DNS resolver singletonwarptangent2015-08-141-1/+1
| | | | Each thread can use the same resolver.
* net_node: skimplify rate limit code, and log as appropriatemoneromooo-monero2015-08-111-8/+5
|
* ** CHANGES ARE EXPERIMENTAL (FOR TESTING ONLY)NoodleDoodleNoodleDoodleNoodleDoodleNoo2015-07-152-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* properly decrement p2p socket countThomas Winget2015-06-061-0/+1
|
* cleaning up, removing redundant files, renaming, fixing incorrect licensesRiccardo Spagni2015-05-319-11/+64
|