aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
Commit message (Collapse)AuthorAgeFilesLines
...
* | core: add p2p bind port options from net_nodemoneromooo-monero2017-02-211-2/+2
|/ | | | | | | | They're now used by core to determine the data directory to use for the txpool directory. This fixes an assert in the core tests, which don't use the RPC server, which normally initializes the P2P code.
* Merge pull request #1641Riccardo Spagni2017-02-021-0/+5
|\ | | | | | | ca94d0a4 Separate data per P2P port (Miguel Herranz)
| * Separate data per P2P portMiguel Herranz2017-01-281-0/+5
| | | | | | | | | | | | | | | | poolstate.bin and p2pstate.bin are stored in .bitmonero/ if the default P2P port is being used. If another port is used both files are stored in .bitmonero/PORTNUMBER/.
* | Replace BOOST_FOREACH with C++11 ranged forMiguel Herranz2017-01-221-2/+2
|/
* Merge pull request #1609Riccardo Spagni2017-01-221-1/+10
|\ | | | | | | 4cdf0a35 p2p: always recreate a new peer id on startup (moneromooo-monero)
| * p2p: always recreate a new peer id on startupmoneromooo-monero2017-01-221-1/+10
| | | | | | | | | | This prevents easy fingerprinting when you change IPs, and will be a must when kovri gets used.
* | Merge pull request #1606Riccardo Spagni2017-01-221-3/+3
|\ \ | | | | | | | | | f8b97aef p2p: show ban/unban logs by default again (moneromooo-monero)
| * | p2p: show ban/unban logs by default againmoneromooo-monero2017-01-211-3/+3
| |/
* | Rename method to get_random_gray_peerMiguel Herranz2017-01-211-1/+1
| |
* | Fix logging that broke after rebasingMiguel Herranz2017-01-211-1/+1
| |
* | Use set_peer_just_seen to keep last_seen updatedMiguel Herranz2017-01-211-1/+1
| |
* | Add gray peer list housekeeping systemMiguel Herranz2017-01-211-0/+71
| | | | | | | | | | | | | | | | | | | | | | A random peer from the gray peer list is selected and a connection is made to check if the peer is alive. If the connection and handshake are successful the peer is promoted to the white peer list, in case of failure the peer is evicted from the gray peer list. The connection is closed after the check in either case.
* | Merge pull request #1572Riccardo Spagni2017-01-201-0/+30
|\ \ | |/ |/| | | | | 0e0e6c5f Reduce to one connection per IP (Miguel Herranz) 3f269e98 Limit incoming connections from the same IP (Miguel Herranz)
| * Reduce to one connection per IPMiguel Herranz2017-01-161-1/+1
| |
| * Limit incoming connections from the same IPMiguel Herranz2017-01-151-0/+30
| |
* | Change logging to easylogging++moneromooo-monero2017-01-161-83/+80
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* also use portable serializer for boost_serialization_helper.h and ↵kenshi842016-12-201-6/+26
| | | | 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-011-6/+11
|/
* Fix DNS failures in offline mode preventing daemon startupmoneromooo-monero2016-11-231-1/+1
|
* add lightweight block propagation ("fluffy blocks")Dion Ahmetaj2016-11-091-3/+49
| | | | | | | | | | | | | | | | | | | | 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.
* p2p: drop any existing connection to a banned IPmoneromooo-monero2016-10-021-0/+12
|
* remove dead backup seed nodes, add new onesRiccardo Spagni2016-09-181-24/+6
|
* allow peers without portmoneromooo-monero2016-07-031-0/+5
| | | | The default port is then used
* 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.
* Use boost::thread instead of std::threadHoward Chu2016-03-111-1/+1
| | | | and all other associated IPC
* Use boost::thread instead of std::threadHoward Chu2016-02-181-1/+1
| | | | 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-311-1/+1
|
* 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-151-200/+200
|/ | | | 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-081-0/+10
|\ \ | | | | | | | | | 2c83055 net_node: add a --offline argument (moneromooo-monero)
| * | net_node: add a --offline argumentmoneromooo-monero2015-12-071-0/+10
| |/ | | | | | | 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-261-1/+13
|
* net_node: allow bans for custom amounts of timemoneromooo-monero2015-11-251-3/+3
| | | | | | 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-231-0/+68
| | | | 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.