summaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
Commit message (Collapse)AuthorAgeFilesLines
* cryptonote_protocol: drop peers we can't download from when syncingmoneromooo-monero2019-07-041-0/+5
| | | | | | | Any peer that's behind us while syncing is useless to us (though not to them). This ensures that we don't get our peer slots filled with peers that we can't use. Once we've synced, we can connect to them and they can then sync off us if they want.
* cryptonote_protocol: fix another potential P2P DoSmoneromooo-monero2019-06-141-0/+15
| | | | | When asking for txes in a fluffy transaction, one might ask for the same (large) tx many times
* cryptonote_protocol: expand basic DoS protectionmoneromooo-monero2019-06-142-4/+4
| | | | Count transactions as well
* cryptonote_protocol_handler: prevent potential DoSanonimal2019-06-142-0/+12
| | | | | | | | | | 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.
* fix wide difficulty conversion with some versions of boostmoneromooo-monero2019-05-011-2/+2
|
* cryptonote_protocol: warn when the last connection goesmoneromooo-monero2019-04-141-0/+2
|
* Merge pull request #5360Riccardo Spagni2019-04-061-2/+16
|\ | | | | | | b0c552f5 cryptonote_protocol_handler: add block/tx hashes in notify logs (moneromooo-monero)
| * cryptonote_protocol_handler: add block/tx hashes in notify logsmoneromooo-monero2019-03-281-2/+16
| |
* | Merge pull request #5346Riccardo Spagni2019-04-061-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | c84ea299 cryptonote_basic: some more minor speedups (moneromooo-monero) e40eb2ad cryptonote_basic: speedup calculate_block_hash (moneromooo-monero) 547a9708 cryptonote: block parsing + hash calculation speedup (moneromooo-monero) 11604b6d blockchain: avoid unneeded block copy (moneromooo-monero) 8461df04 save some database calls when getting top block hash and height (moneromooo-monero) 3bbc3661 Avoid repeated (de)serialization when syncing (moneromooo-monero)
| * | cryptonote: block parsing + hash calculation speedupmoneromooo-monero2019-03-251-4/+4
| |/ | | | | | | This saves a duplicate serialization step
* / Make difficulty 128 bit instead of 64 bitmoneromooo-monero2019-03-242-1/+8
|/ | | | | | Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
* Merge pull request #5199Riccardo Spagni2019-03-192-0/+44
|\ | | | | | | eef164f7 cryptonote_protocol_handler: search for syncing peers in "cruise mode" (moneromooo-monero)
| * cryptonote_protocol_handler: search for syncing peers in "cruise mode"moneromooo-monero2019-02-262-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #5195Riccardo Spagni2019-03-192-1/+11
|\ \ | | | | | | | | | a54e81e5 daemon: add '--no-sync' arg to optionally disable blockchain sync (xiphon)
| * | daemon: add '--no-sync' arg to optionally disable blockchain syncxiphon2019-02-252-1/+11
| |/
* | Merge pull request #5190Riccardo Spagni2019-03-172-0/+3
|\ \ | | | | | | | | | 551104fb daemon: add --public-node mode, RPC port propagation over P2P (xiphon)
| * | daemon: add --public-node mode, RPC port propagation over P2Pxiphon2019-02-252-0/+3
| |/
* | Update 2019 copyrightbinaryFate2019-03-058-8/+8
| |
* | cryptonote: avoid double parsing blocks when syncingmoneromooo-monero2019-03-051-3/+18
| |
* | core: avoid double parsing blocks after hohmoneromooo-monero2019-03-051-7/+17
| |
* | default initialize rpc structuresmoneromooo-monero2019-03-041-8/+16
| |
* | Merge pull request #5111Riccardo Spagni2019-03-041-1/+1
|\ \ | | | | | | | | | 6a3608d3 cryptonote_protocol_handler: pad tx messages when using tor/i2p (moneromooo-monero)
| * | cryptonote_protocol_handler: pad tx messages when using tor/i2pmoneromooo-monero2019-01-301-1/+1
| |/
* / epee: add SSL supportmoneromooo-monero2019-02-022-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPC connections now have optional tranparent SSL. An optional private key and certificate file can be passed, using the --{rpc,daemon}-ssl-private-key and --{rpc,daemon}-ssl-certificate options. Those have as argument a path to a PEM format private private key and certificate, respectively. If not given, a temporary self signed certificate will be used. SSL can be enabled or disabled using --{rpc}-ssl, which accepts autodetect (default), disabled or enabled. Access can be restricted to particular certificates using the --rpc-ssl-allowed-certificates, which takes a list of paths to PEM encoded certificates. This can allow a wallet to connect to only the daemon they think they're connected to, by forcing SSL and listing the paths to the known good certificates. To generate long term certificates: openssl genrsa -out /tmp/KEY 4096 openssl req -new -key /tmp/KEY -out /tmp/REQ openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT /tmp/KEY is the private key, and /tmp/CERT is the certificate, both in PEM format. /tmp/REQ can be removed. Adjust the last command to set expiration date, etc, as needed. It doesn't make a whole lot of sense for monero anyway, since most servers will run with one time temporary self signed certificates anyway. SSL support is transparent, so all communication is done on the existing ports, with SSL autodetection. This means you can start using an SSL daemon now, but you should not enforce SSL yet or nothing will talk to you.
* Merge pull request #4988Riccardo Spagni2019-01-292-17/+44
|\ | | | | | | 973403bc Adding initial support for broadcasting transactions over Tor (Lee Clagett)
| * Adding initial support for broadcasting transactions over TorLee Clagett2019-01-282-17/+44
| | | | | | | | | | | | | | | | | | - 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).
* | block_queue: fix late sanity check off by onemoneromooo-monero2019-01-281-1/+1
|/
* Pruningmoneromooo-monero2019-01-225-229/+790
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #5001Riccardo Spagni2019-01-161-0/+1
|\ | | | | | | a5ffc2d5 Remove boost::lexical_cast for uuid and unused uuid function (Lee Clagett)
| * Remove boost::lexical_cast for uuid and unused uuid functionLee Clagett2018-12-231-0/+1
| |
* | Merge pull request #4976Riccardo Spagni2019-01-162-4/+4
|\ \ | | | | | | | | | 85665003 epee: better network buffer data structure (moneromooo-monero)
| * | epee: better network buffer data structuremoneromooo-monero2018-12-232-4/+4
| |/ | | | | | | avoids pointless allocs and memcpy
* | Merge pull request #4949Riccardo Spagni2019-01-062-12/+24
|\ \ | |/ |/| | | | | 5464725a protocol: change standby mode to not wait sleeping (moneromooo-monero) 85807dfb add a once_a_time_milliseconds class (moneromooo-monero)
| * protocol: change standby mode to not wait sleepingmoneromooo-monero2018-12-072-12/+24
| |
* | Merge pull request #4787Riccardo Spagni2018-12-122-0/+33
|\ \ | | | | | | | | | 3dba7f25 protocol: option to pad transaction relay to the next kB (moneromooo-monero)
| * | protocol: option to pad transaction relay to the next kBmoneromooo-monero2018-11-062-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | To help protect one's privacy from traffic volume analysis for people using Tor or I2P. This will really fly once we relay txes on a timer rather than on demand, though. Off by default for now since it's wasteful and doesn't bring anything until I2P's in.
* | | Merge pull request #4906Riccardo Spagni2018-12-041-2/+2
|\ \ \ | |_|/ |/| | | | | 506472e0 protocol: fix use after free when dropping a connection (moneromooo-monero)
| * | protocol: fix use after free when dropping a connectionmoneromooo-monero2018-11-261-2/+2
| |/
* | Merge pull request #4877Riccardo Spagni2018-12-041-1/+3
|\ \ | | | | | | | | | c25260f5 protocol: fix incorrect tx hash in log (moneromooo-monero)
| * | protocol: fix incorrect tx hash in logmoneromooo-monero2018-11-201-1/+3
| |/
* / Removed a lot of unnecessary includesMartijn Otto2018-11-151-22/+0
|/
* Merge pull request #4160luigi11112018-09-042-13/+32
|\ | | | | | | 704b60c block_queue: faster check whether a block was requested (moneromooo-monero)
| * block_queue: faster check whether a block was requestedmoneromooo-monero2018-07-202-13/+32
| |
* | Merge pull request #4207luigi11112018-08-221-7/+12
|\ \ | | | | | | | | | ce9457a cryptonote_protocol: don't serialize an unneeded new block message (moneromooo-monero)
| * | cryptonote_protocol: don't serialize an unneeded new block messagemoneromooo-monero2018-08-091-7/+12
| |/ | | | | | | Non fluffy block nodes should now be very rare
* | Merge pull request #4020luigi11112018-08-151-1/+14
|\ \ | |/ |/| | | c24a0af [monerod] Added blocks remaining count during syncronisation. (Jorropo)
| * [monerod] Added blocks remaining count during syncronisation.Jorropo2018-07-251-1/+14
| | | | | | | | And percent if usefull (% < 99)
* | Merge pull request #3716luigi11112018-06-274-59/+62
|\ \ | | | | | | | | | a2b557f 6795bd0 209ec96 ed2c81e a830db2 57ea902 31a895e ba8331c f7f1917 41be339 f025ae9 ef2cb63 dcfd299 5d3e702 2704624 2771a18 0e4c7d0 (moneromooo-monero)
| * | replace std::list with std::vector on some hot pathsmoneromooo-monero2018-06-264-59/+62
| |/ | | | | | | also use reserve where appropriate
* / cryptonote_protocol_handler: log when dropping a peermoneromooo-monero2018-06-091-0/+3
|/