aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/cryptonote_protocol_handler.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-07-19Merge pull request #6512Alexander Blair1-1/+1
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-05-19cryptonote_protocol: stricter limit to number of objects requestedmoneromooo-monero1-1/+2
Reported by xnbya
2020-05-06Update copyright year to 2020SomaticFanatic1-1/+1
Update copyright year to 2020
2020-04-21Merge pull request #6278luigi11111-0/+8
387fd66 Daemon: Print estimates for time until fully synced (rbrunner7)
2020-03-26Adding Dandelion++ support to public networks:Lee Clagett1-1/+1
- New flag in NOTIFY_NEW_TRANSACTION to indicate stem mode - Stem loops detected in tx_pool.cpp - Embargo timeout for a blackhole attack during stem phase
2020-03-31Merge pull request #6214luigi11111-0/+4
054b4c7 protocol: request txpool contents when synced (moneromooo-monero)
2020-03-22protocol: request txpool contents when syncedmoneromooo-monero1-0/+4
A newly synced Alice sends a (typically quite small) list of txids in the local tpxool to a random peer Bob, who then uses the existing tx relay system to send Alice any tx in his txpool which is not in the list Alice sent
2020-03-21Daemon: Print estimates for time until fully syncedrbrunner71-0/+8
2020-03-20p2p: remove old debug commandsAaron Hook1-3/+0
2019-11-02Adding support for hidden (anonymity) txpoolLee Clagett1-1/+1
2019-10-28daemon: always use bootstrap daemon (if set) in '--no-sync' modexiphon1-0/+1
2019-10-14Merge pull request #5933luigi11111-0/+1
3455efa ban peers sending bad pow outright (moneromooo-monero)
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero1-0/+2
If the peer (whether pruned or not itself) supports sending pruned blocks to syncing nodes, the pruned version will be sent along with the hash of the pruned data and the block weight. The original tx hashes can be reconstructed from the pruned txes and theur prunable data hash. Those hashes and the block weights are hashes and checked against the set of precompiled hashes, ensuring the data we received is the original data. It is currently not possible to use this system when not using the set of precompiled hashes, since block weights can not otherwise be checked for validity. This is off by default for now, and is enabled by --sync-pruned-blocks
2019-09-25ban peers sending bad pow outrightmoneromooo-monero1-0/+1
PoW is expensive to verify, so be strict
2019-06-14cryptonote_protocol: expand basic DoS protectionmoneromooo-monero1-1/+1
Count transactions as well
2019-06-14cryptonote_protocol_handler: prevent potential DoSanonimal1-0/+1
Essentially, one can send such a large amount of IDs that core exhausts all free memory. This issue can theoretically be exploited using very large CN blockchains, such as Monero. This is a partial fix. Thanks and credit given to CryptoNote author 'cryptozoidberg' for collaboration and the fix. Also thanks to 'moneromooo'. Referencing HackerOne report #506595.
2019-03-19Merge pull request #5199Riccardo Spagni1-0/+2
eef164f7 cryptonote_protocol_handler: search for syncing peers in "cruise mode" (moneromooo-monero)
2019-03-19Merge pull request #5195Riccardo Spagni1-0/+2
a54e81e5 daemon: add '--no-sync' arg to optionally disable blockchain sync (xiphon)
2019-03-05Update 2019 copyrightbinaryFate1-1/+1
2019-02-26cryptonote_protocol_handler: search for syncing peers in "cruise mode"moneromooo-monero1-0/+2
When all our outgoing peer slots are filled, we cycle one peer at a time looking for syncing peers until we have at least two such peers. This brings two advantages: - Peers without incoming connections will find more syncing peers that before, thereby strengthening network decentralization - Peers will have more resistance to isolation attacks, as they are more likely to find a "good" peer than they were before
2019-02-25daemon: add '--no-sync' arg to optionally disable blockchain syncxiphon1-0/+2
2019-01-28Adding initial support for broadcasting transactions over TorLee Clagett1-9/+0
- Support for ".onion" in --add-exclusive-node and --add-peer - Add --anonymizing-proxy for outbound Tor connections - Add --anonymous-inbounds for inbound Tor connections - Support for sharing ".onion" addresses over Tor connections - Support for broadcasting transactions received over RPC exclusively over Tor (else broadcast over public IP when Tor not enabled).
2019-01-22Pruningmoneromooo-monero1-1/+15
The blockchain prunes seven eighths of prunable tx data. This saves about two thirds of the blockchain size, while keeping the node useful as a sync source for an eighth of the blockchain. No other data is currently pruned. There are three ways to prune a blockchain: - run monerod with --prune-blockchain - run "prune_blockchain" in the monerod console - run the monero-blockchain-prune utility The first two will prune in place. Due to how LMDB works, this will not reduce the blockchain size on disk. Instead, it will mark parts of the file as free, so that future data will use that free space, causing the file to not grow until free space grows scarce. The third way will create a second database, a pruned copy of the original one. Since this is a new file, this one will be smaller than the original one. Once the database is pruned, it will stay pruned as it syncs. That is, there is no need to use --prune-blockchain again, etc.
2019-01-16Merge pull request #4976Riccardo Spagni1-2/+2
85665003 epee: better network buffer data structure (moneromooo-monero)
2018-12-23epee: better network buffer data structuremoneromooo-monero1-2/+2
avoids pointless allocs and memcpy
2018-12-07protocol: change standby mode to not wait sleepingmoneromooo-monero1-0/+2
2018-03-05Correct spelling mistakes.Edward Betts1-1/+1
2018-02-16Merge pull request #3181Riccardo Spagni1-1/+1
e3f0980a daemon: don't drop RPC with busy error when running offline (moneromooo-monero)
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2018-01-25daemon: don't drop RPC with busy error when running offlinemoneromooo-monero1-1/+1
2017-12-16cryptonote_core does not depend on p2p anymoremoneromooo-monero1-6/+0
As a followon side effect, this makes a lot of inline code included only in particular cpp files (and instanciated when necessary.
2017-08-21cryptonote_protocol: misc fixes to the new sync algorithmmoneromooo-monero1-0/+2
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
2017-08-16cryptonote_protocol: kick idle synchronizing peersmoneromooo-monero1-0/+3
In case they dropped off downloading for any reason, they'll get sent to download again.
2017-08-09cryptonote_protocol: keep target in sync with dropped connectionsmoneromooo-monero1-0/+2
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.
2017-08-07cryptonote_protocol_handler: sync speedupmoneromooo-monero1-3/+6
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.
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-12protocol: speed up sync by minimizing duplicate workmoneromooo-monero1-0/+1
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.
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-3/+3
2017-01-16Change logging to easylogging++moneromooo-monero1-5/+0
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.
2016-12-04Merge pull request #1398Riccardo Spagni1-8/+8
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04Fix a few minor typosPierre Boyer1-8/+8
2016-12-04Fix delayed exit when syncingmoneromooo-monero1-0/+2
2016-11-09add lightweight block propagation ("fluffy blocks")Dion Ahmetaj1-2/+5
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.
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero1-1/+0
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-19Print stack trace upon exceptionsmoneromooo-monero1-0/+1
Useful for debugging users' logs
2016-03-11Use boost::thread instead of std::threadHoward Chu1-1/+1
and all other associated IPC
2015-12-31updated copyright yearRiccardo Spagni1-1/+1
2015-02-202014 network limit 1.2 +utils +toc -doc -drmonerorfree2monero1-0/+3
new update of the pr with network limits more debug options: discarding downloaded blocks all or after given height. trying to trigger the locking errors. debug levels polished/tuned to sane values. debug/logging improved. warning: this pr should be correct code, but it could make an existing (in master version) locking error appear more often. it's a race on the list (map) of peers, e.g. between closing/deleting them versus working on them in net-limit sleep in sending chunk. the bug is not in this code/this pr, but in the master version. the locking problem of master will be fixed in other pr. problem is ub, and in practice is seems to usually cause program abort (tested on debian stable with updated gcc). see --help for option to add sleep to trigger the error faster.
2015-02-20removed not needed <netinet/in.h>rfree2monero1-1/+0
2015-02-202014 network limit 1.1 +utils +toc -doc -drmonerorfree2monero1-4/+6
Update of the PR with network limits works very well for all speeds (but remember that low download speed can stop upload because we then slow down downloading of blockchain requests too) more debug options fixed pedantic warnings in our code should work again on Mac OS X and FreeBSD fixed warning about size_t tested on Debian, Ubuntu, Windows(testing now) TCP options and ToS (QoS) flag FIXED peer number limit FIXED some spikes in ingress/download FIXED problems when other up and down limit
2015-02-202014 network limit 1.0a +utils +toc -doc -drmonerorfree2monero1-2/+33
commands and options for network limiting works very well e.g. for 50 KiB/sec up and down ToS (QoS) flag peer number limit TODO some spikes in ingress/download TODO problems when other up and down limit added "otshell utils" - simple logging (with colors, text files channels)
2015-01-02year updated in licenseRiccardo Spagni1-1/+1
2014-07-23License updated to BSD 3-clausefluffypony1-3/+29
2014-07-18Added get_connections RPC call to daemonThomas Winget1-0/+3
2014-05-250.8.8updatemydesktop1-2/+2
2014-03-20some fixesAntonio Juarez1-7/+4
2014-03-03moved all stuff to githubAntonio Juarez1-0/+107