aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-03-22cryptonote_protocol_handler: fix race conditionanon1-27/+41
2020-12-23Command max_bytes moved from dynamic map to static switchLee Clagett2-20/+0
2021-01-06Merge pull request #7267luigi11111-4/+9
c2295f5 protocol: handle receiving a block hash we've not added yet (moneromooo-monero)
2021-01-06Merge pull request #7248luigi11112-0/+20
3c7eec1 add a max levin packet size by command type (moneromooo-monero)
2021-01-03add a max levin packet size by command typemoneromooo-monero2-0/+20
2021-01-02protocol: handle receiving a block hash we've not added yetmoneromooo-monero1-4/+9
2021-01-01Merge pull request #7247Alexander Blair1-12/+52
57f7c2e53 protocol: more sanity checks in new chain block hashes (moneromooo-monero)
2021-01-01Merge pull request #7235Alexander Blair1-1/+1
00253b717 protocol: don't reset last request time on an idle timer (moneromooo-monero)
2020-12-31protocol: more sanity checks in new chain block hashesmoneromooo-monero1-12/+52
2020-12-30protocol: don't reset last request time on an idle timermoneromooo-monero1-1/+1
this prevents losing time of "idle time" for a peer, which could otherwise be reset by another timed sync command from the peer
2020-12-29Add aggressive restrictions to pre-handshake p2p buffer limitLee Clagett2-1/+2
2020-12-27protocol: fix false positives dropping peersmoneromooo-monero1-23/+21
it'd trigger on reorgs
2020-12-27Revert "Reject existing claimed blocks in sync mode"luigi11111-18/+19
2020-12-26Merge pull request #7189Alexander Blair2-4/+16
adcbcd8f8 protocol: drop nodes if they claim new data but only give stale data (moneromooo-monero)
2020-12-26Merge pull request #7155Alexander Blair1-19/+18
42ee30929 protocol: reject claimed block hashes that already are in the chain (moneromooo-monero) a436c3625 protocol: drop peers we can't download anything from in sync mode (moneromooo-monero)
2020-12-25protocol: drop nodes if they claim new data but only give stale datamoneromooo-monero2-4/+16
Some joker is spending time actually doing this
2020-12-17rpc: add a busy_syncing field to get_infomoneromooo-monero2-0/+9
true if and pretty much only if new blocks are being added
2020-12-17protocol: reject claimed block hashes that already are in the chainmoneromooo-monero1-0/+13
2020-12-16protocol: drop peers we can't download anything from in sync modemoneromooo-monero1-19/+5
instead of the (incorrect) check for whether we think we might have a user for it at some point in the near future. We can reconnect.
2020-12-12Merge pull request #7131v0.17.1.7luigi11112-0/+12
c1d6547 protocol: include first new block in chain entry response (moneromooo-monero)
2020-12-12Merge pull request #7128luigi11111-0/+35
b6b2c9b protocol: stricter checks on received chain hash list (moneromooo)
2020-12-12protocol: include first new block in chain entry responsemoneromooo-monero2-0/+12
2020-12-11protocol: stricter checks on received chain hash listmoneromooo1-0/+35
2020-12-11protocol: revert incoming chain height check against local chainmoneromooo-monero1-1/+1
We can actually request a chain that's further away from what we have as we buffer more and more
2020-12-10Merge pull request #7122Alexander Blair1-1/+1
3a3370096 protocol: one more sanity check on usable data from a peer (moneromooo-monero)
2020-12-10Merge pull request #7120Alexander Blair1-1/+1
105afa555 protocol: fix asking for pruned blocks for v10 (moneromooo-monero)
2020-12-10Merge pull request #7118Alexander Blair1-1/+1
ef1524ecc protocol: add a sanity check to the number of block hashes sent (moneromooo-monero)
2020-12-10Merge pull request #7111Alexander Blair4-19/+52
d729730d3 protocol: drop origin IP if a block fails to verify in sync mode (moneromooo-monero)
2020-12-10Merge pull request #7107Alexander Blair1-1/+8
f47f1a069 protocol: more restrictive checks on chain entry response (moneromooo-monero)
2020-12-10protocol: one more sanity check on usable data from a peermoneromooo-monero1-1/+1
2020-12-10protocol: fix asking for pruned blocks for v10moneromooo-monero1-1/+1
Old format is still alloewd there, this is a two fork update
2020-12-10protocol: drop origin IP if a block fails to verify in sync modemoneromooo-monero4-19/+52
It would otherwise be possible for a peer to send bad blocks, then disconnect and reconnect again, escaping bans
2020-12-10Merge pull request #7109luigi11111-2/+1
e83a220 protocol: fix switchting to adding blocks if noone's adding the next span (moneromooo-monero)
2020-12-10protocol: add a sanity check to the number of block hashes sentmoneromooo-monero1-1/+1
2020-12-10protocol: more restrictive checks on chain entry responsemoneromooo-monero1-1/+8
2020-12-10protocol: fix switchting to adding blocks if noone's adding the next spanmoneromooo-monero1-2/+1
2020-12-06protocol: drop peers that don't reply to queriesmoneromooo2-10/+34
2020-12-04protocol: drop peers that decrease claimed heightmoneromooo1-1/+16
2020-12-04protocol: add scoring system to drop peers that don't behavemoneromooo2-9/+50
2020-11-25cryptonote_core: dandelion - use local height or median height if syncingxiphon4-12/+59
2020-11-16Better log message for unusable anon networksHoward Chu2-13/+16
2020-11-04Merge pull request #6974luigi11111-6/+4
58cde83 Switch to Dandelion++ fluff mode if no out connections for stem mode (vtnerd)
2020-11-04Merge pull request #6972luigi11111-0/+7
8965489 protocol: reject empty incoming block messages (moneromooo-monero)
2020-11-03protocol: reject empty incoming block messagesmoneromooo-monero1-0/+7
2020-10-14Fix tx flush callback queueingLee Clagett1-23/+10
2020-10-12Dandelion++: skip desynced peers in stem phasexiphon3-21/+27
2020-10-06Switch to Dandelion++ fluff mode if no out connections for stem modeLee Clagett1-6/+4
2020-08-27Merge pull request #6753Alexander Blair1-2/+2
4ff2074c7 cryptonote_protocol: don't synced pruned blocks before v11 (cohcho)
2020-08-16Merge pull request #6614Alexander Blair1-2/+1
fb31167b1 Wallet, daemon: From 'help_advanced' back to 'help', and new 'apropos' command (rbrunner7)
2020-08-16Merge pull request #6542Alexander Blair1-1/+0
35665df20 protocol: don't drop a connection if we can't get a compatible chain (moneromooo-monero)
2020-08-10cryptonote_protocol: don't synced pruned blocks before v11cohcho1-2/+2
There are a few Borromean proofs txes in the v8 era, and these aren't supported by get_pruned_transaction_weight. Moreover, only only the most recent variant of bulletproofs is currently supported.
2020-08-09Merge pull request #6354Alexander Blair3-9/+28
67ade8005 Add randomized delay when forwarding txes from i2p/tor -> ipv4/6 (Lee Clagett)
2020-07-24Wallet, daemon: From 'help_advanced' back to 'help', and new 'apropos' commandrbrunner71-2/+1
2020-07-19Merge pull request #6512Alexander Blair12-12/+12
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-08Merge pull request #6566luigi11111-2/+2
567402c protocol: move the 'peer claims higher version' warning to debug (moneromooo-monero)
2020-05-19protocol: move the "peer claims higher version" warning to debugmoneromooo-monero1-2/+2
Because there's a neverending supply of cunts claiming a wrong version just to say "look at me" I guess
2020-05-19cryptonote_protocol: stricter limit to number of objects requestedmoneromooo-monero1-1/+2
Reported by xnbya
2020-05-19cryptonote_protocol: reject requests/notifications before handshakemoneromooo-monero1-0/+20
Reported by xnbya
2020-05-16protocol: don't drop a connection if we can't get a compatible chainmoneromooo-monero1-1/+0
This can now happen if: - we have a pruned db - we have not connected to the monero network for a while - we connect to a node - that node asks us for history - we only have a pruned version of the most recent common block In that case, it's better to not reply but keep the connection alive, so we can sync off it.
2020-05-15Add randomized delay when forwarding txes from i2p/tor -> ipv4/6Lee Clagett3-9/+28
2020-05-06Update copyright year to 2020SomaticFanatic12-12/+12
Update copyright year to 2020
2020-05-06cryptonote_protocol: do not request pruned borromean sig txesmoneromooo-monero1-1/+6
We don't have a function to calculate their weight from a pruned version (yet).
2020-04-21Merge pull request #6278luigi11112-3/+91
387fd66 Daemon: Print estimates for time until fully synced (rbrunner7)
2020-03-26Adding Dandelion++ support to public networks:Lee Clagett7-69/+216
- 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-04-04Merge pull request #6381luigi11111-0/+3
e719760 Fix receive order leakage with tx fluffing (vtnerd)
2020-04-04Merge pull request #6375luigi11111-4/+17
ebf3c10 Added logging for dropped local txes with no i2p/tor connections (vtnerd)
2020-03-31Merge pull request #6214luigi11113-0/+90
054b4c7 protocol: request txpool contents when synced (moneromooo-monero)
2020-03-27Merge pull request #6282Alexander Blair1-1/+1
66472074 Daemon: Guard against reporting "synchronized" too early (rbrunner7)
2020-03-22protocol: request txpool contents when syncedmoneromooo-monero3-0/+90
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 syncedrbrunner72-3/+91
2020-03-20p2p: remove old debug commandsAaron Hook2-9/+0
2020-03-12Merge pull request #6243Alexander Blair1-2/+8
4771a7ae p2p: remove obsolete local time in handshake (moneromooo-monero) 2fbbc4a2 p2p: avoid sending the same peer list over and over (moneromooo-monero) 3004835b epee: remove backward compatible endian specific address serialization (moneromooo-monero) 39a343d7 p2p: remove backward compatible peer list (moneromooo-monero) 60631802 p2p: simplify last_seen serialization now we have optional stores (moneromooo-monero) 9467b2e4 cryptonote_protocol: omit top 64 bits of difficulty when 0 (moneromooo-monero) b595583f serialization: do not write optional fields with default value (moneromooo-monero) 5f98b46d p2p: remove obsolete local time from TIMED_SYNC (moneromooo-monero)
2020-03-10Fix receive order leakage with tx fluffingLee Clagett1-0/+3
2020-03-07Added logging for dropped local txes with no i2p/tor connectionsLee Clagett1-4/+17
2020-02-28Merge pull request #6236Alexander Blair1-1/+1
bc6d8aa3 Corrected message typo (palomato)
2020-02-28Merge pull request #6219Alexander Blair1-2/+2
72ca7e3b Fix time comparison math (Jason Rhinelander)
2020-02-06Merge pull request #6127Alexander Blair1-1/+2
67b4a19e simplewallet: noob-friendly help menu (wowario)
2020-02-06Merge pull request #6053Alexander Blair1-4/+2
deb350b7 always print peer IDs in the same format (moneromooo-monero)
2020-01-26cryptonote_protocol: omit top 64 bits of difficulty when 0moneromooo-monero1-2/+8
2020-01-26network: log traffic and add a simple traffic analysis scriptmoneromooo-monero1-0/+16
2020-01-10Daemon: Guard against reporting "synchronized" too earlyrbrunner71-1/+1
The added condition "hshd.current_height >= target" guards against reporting "synchronized" too early in the special situation that the very first peer sending us data is synced to a lower height than ourselves.
2019-12-14Corrected message typopalomato1-1/+1
Message was "peer claims higher version that we think" Requested change "peer claims higher version than we think"
2019-12-05Fix time comparison mathJason Rhinelander1-2/+2
Dividing `dt` here by 1e6 converts it to seconds, but that is clearly wrong since `REQUEST_NEXT_SCHEDULED_SPAN_THRESHOLD_STANDBY` is measured in microseconds. As a result, this if statement was effectively never used.
2019-11-13simplewallet: noob-friendly help menuwowario1-1/+2
2019-11-04Change to Tx diffusion (Dandelion++ fluff) instead of floodingLee Clagett4-49/+161
2019-11-02Adding support for hidden (anonymity) txpoolLee Clagett6-25/+101
2019-10-29always print peer IDs in the same formatmoneromooo-monero1-4/+2
2019-10-28daemon: always use bootstrap daemon (if set) in '--no-sync' modexiphon1-0/+1
2019-10-25Merge pull request #5357luigi11112-0/+3
b3a9a4d add a quick early out to get_blocks.bin when up to date (moneromooo-monero) 2899379 daemon, wallet: new pay for RPC use system (moneromooo-monero) ffa4602 simplewallet: add public_nodes command (moneromooo-monero)
2019-10-25daemon, wallet: new pay for RPC use systemmoneromooo-monero2-0/+3
Daemons intended for public use can be set up to require payment in the form of hashes in exchange for RPC service. This enables public daemons to receive payment for their work over a large number of calls. This system behaves similarly to a pool, so payment takes the form of valid blocks every so often, yielding a large one off payment, rather than constant micropayments. This system can also be used by third parties as a "paywall" layer, where users of a service can pay for use by mining Monero to the service provider's address. An example of this for web site access is Primo, a Monero mining based website "paywall": https://github.com/selene-kovri/primo This has some advantages: - incentive to run a node providing RPC services, thereby promoting the availability of third party nodes for those who can't run their own - incentive to run your own node instead of using a third party's, thereby promoting decentralization - decentralized: payment is done between a client and server, with no third party needed - private: since the system is "pay as you go", you don't need to identify yourself to claim a long lived balance - no payment occurs on the blockchain, so there is no extra transactional load - one may mine with a beefy server, and use those credits from a phone, by reusing the client ID (at the cost of some privacy) - no barrier to entry: anyone may run a RPC node, and your expected revenue depends on how much work you do - Sybil resistant: if you run 1000 idle RPC nodes, you don't magically get more revenue - no large credit balance maintained on servers, so they have no incentive to exit scam - you can use any/many node(s), since there's little cost in switching servers - market based prices: competition between servers to lower costs - incentive for a distributed third party node system: if some public nodes are overused/slow, traffic can move to others - increases network security - helps counteract mining pools' share of the network hash rate - zero incentive for a payer to "double spend" since a reorg does not give any money back to the miner And some disadvantages: - low power clients will have difficulty mining (but one can optionally mine in advance and/or with a faster machine) - payment is "random", so a server might go a long time without a block before getting one - a public node's overall expected payment may be small Public nodes are expected to compete to find a suitable level for cost of service. The daemon can be set up this way to require payment for RPC services: monerod --rpc-payment-address 4xxxxxx \ --rpc-payment-credits 250 --rpc-payment-difficulty 1000 These values are an example only. The --rpc-payment-difficulty switch selects how hard each "share" should be, similar to a mining pool. The higher the difficulty, the fewer shares a client will find. The --rpc-payment-credits switch selects how many credits are awarded for each share a client finds. Considering both options, clients will be awarded credits/difficulty credits for every hash they calculate. For example, in the command line above, 0.25 credits per hash. A client mining at 100 H/s will therefore get an average of 25 credits per second. For reference, in the current implementation, a credit is enough to sync 20 blocks, so a 100 H/s client that's just starting to use Monero and uses this daemon will be able to sync 500 blocks per second. The wallet can be set to automatically mine if connected to a daemon which requires payment for RPC usage. It will try to keep a balance of 50000 credits, stopping mining when it's at this level, and starting again as credits are spent. With the example above, a new client will mine this much credits in about half an hour, and this target is enough to sync 500000 blocks (currently about a third of the monero blockchain). There are three new settings in the wallet: - credits-target: this is the amount of credits a wallet will try to reach before stopping mining. The default of 0 means 50000 credits. - auto-mine-for-rpc-payment-threshold: this controls the minimum credit rate which the wallet considers worth mining for. If the daemon credits less than this ratio, the wallet will consider mining to be not worth it. In the example above, the rate is 0.25 - persistent-rpc-client-id: if set, this allows the wallet to reuse a client id across runs. This means a public node can tell a wallet that's connecting is the same as one that connected previously, but allows a wallet to keep their credit balance from one run to the other. Since the wallet only mines to keep a small credit balance, this is not normally worth doing. However, someone may want to mine on a fast server, and use that credit balance on a low power device such as a phone. If left unset, a new client ID is generated at each wallet start, for privacy reasons. To mine and use a credit balance on two different devices, you can use the --rpc-client-secret-key switch. A wallet's client secret key can be found using the new rpc_payments command in the wallet. Note: anyone knowing your RPC client secret key is able to use your credit balance. The wallet has a few new commands too: - start_mining_for_rpc: start mining to acquire more credits, regardless of the auto mining settings - stop_mining_for_rpc: stop mining to acquire more credits - rpc_payments: display information about current credits with the currently selected daemon The node has an extra command: - rpc_payments: display information about clients and their balances The node will forget about any balance for clients which have been inactive for 6 months. Balances carry over on node restart.
2019-10-24Merge pull request #5998luigi11111-3/+3
0da09ed protocol: fix syncing from peers being too choosy about peers (moneromooo-monero)
2019-10-22Merge pull request #5981luigi11111-1/+1
88c9d90 protocol: initialize block_weight in block_complete_entry ctor (moneromooo-monero) fe443bb cryptonote: don't leave block_weight uninitialized (moneromooo-monero) 1ba9baf tx_pool: do not divide by 0 (moneromooo-monero)
2019-10-17protocol: fix syncing from peers being too choosy about peersmoneromooo-monero1-3/+3
2019-10-14Merge pull request #5933luigi11112-7/+14
3455efa ban peers sending bad pow outright (moneromooo-monero)
2019-10-11protocol: initialize block_weight in block_complete_entry ctormoneromooo-monero1-1/+1
CID 204479
2019-10-08Merge pull request #5915luigi11115-49/+229
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-10-08Merge pull request #5926luigi11111-1/+1
74a23e9 protocol: only print sync complete message when out of precompiled hashes (moneromooo-monero)
2019-10-08Merge pull request #5921luigi11112-7/+12
2a7d915 Fixed i2p/tor tx flooding bug (white noise disabled) (vtnerd)
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero5-49/+229
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-monero2-7/+14
PoW is expensive to verify, so be strict
2019-09-24Merge pull request #5905luigi11111-5/+0
Revert a96c1a4 and adc16d2 (moneromooo-monero)
2019-09-24protocol: only print sync complete message when out of precompiled hashesmoneromooo-monero1-1/+1
This avoids most premature triggers
2019-09-24Merge pull request #5877luigi11111-8/+8
2cd4fd8 Changed the use of boost:value_initialized for C++ list initializer (JesusRami) 4ad191f Removed unused boost/value_init header (whyamiroot) 928f4be Make null hash constants constexpr (whyamiroot)
2019-09-16Properly format multiline logsmoneromooo-monero1-2/+2
As a side effect, colouring on Windows should now work regardless of version
2019-09-11Revert "cryptonote_protocol: drop peers we can't download from when syncing"moneromooo-monero1-5/+0
This reverts commit a96c1a46d4b3854252de75cbe09458ad5d1aecb0.
2019-09-11Revert "Fix check for disconnecting peers when syncing"moneromooo-monero1-1/+1
This reverts commit adc16d2504d3e76b0115791caf10446684d45433.
2019-09-04Merge pull request #5806luigi11111-3/+3
69465e3 cryptonote_protocol: fix '--no-sync', ignore new blocks and txes (xiphon)
2019-09-02Changed the use of boost:value_initialized for C++ list initializerJesus Ramirez1-8/+8
2019-08-11cryptonote_protocol: fix '--no-sync', ignore new blocks and txesxiphon1-3/+3
2019-07-29Fixed i2p/tor tx flooding bug (white noise disabled)Lee Clagett2-7/+12
2019-07-24Merge pull request #5595luigi11112-0/+4
2aa1134 daemon: display peer address type in print_cn (moneromooo-monero)
2019-07-24Merge pull request #5591luigi11112-16/+9
f17dcde Remove unused txs member in NOTIFY_RESPONSE_GET_OBJECT (Doy-lee)
2019-07-17Added support for "noise" over I1P/Tor to mask Tx transmission.Lee Clagett3-61/+709
2019-08-16Fix check for disconnecting peers when syncingJason Rhinelander1-1/+1
The check added here (in #5732/#5733) is supposed to disconnect behind peers when the current node is syncing, but actually disconnects behind peers always. We are syncing when `target > our_height`, but the check here triggers when `target > remote_height`, which is basically always true when the preceding `m_core.have_block(hshd.top_id)` check is true.
2019-07-15Remove unused txs member in NOTIFY_RESPONSE_GET_OBJECTDoyle2-16/+9
2019-07-04cryptonote_protocol: drop peers we can't download from when syncingmoneromooo-monero1-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.
2019-06-14cryptonote_protocol: fix another potential P2P DoSmoneromooo-monero1-0/+15
When asking for txes in a fluffy transaction, one might ask for the same (large) tx many times
2019-06-14cryptonote_protocol: expand basic DoS protectionmoneromooo-monero2-4/+4
Count transactions as well
2019-06-14cryptonote_protocol_handler: prevent potential DoSanonimal2-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.
2019-05-31daemon: display peer address type in print_cnmoneromooo-monero2-0/+4
2019-05-01fix wide difficulty conversion with some versions of boostmoneromooo-monero1-2/+2
2019-04-14cryptonote_protocol: warn when the last connection goesmoneromooo-monero1-0/+2
2019-04-06Merge pull request #5360Riccardo Spagni1-2/+16
b0c552f5 cryptonote_protocol_handler: add block/tx hashes in notify logs (moneromooo-monero)
2019-04-06Merge pull request #5346Riccardo Spagni1-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)
2019-03-28cryptonote_protocol_handler: add block/tx hashes in notify logsmoneromooo-monero1-2/+16
2019-03-25cryptonote: block parsing + hash calculation speedupmoneromooo-monero1-4/+4
This saves a duplicate serialization step
2019-03-24Make difficulty 128 bit instead of 64 bitmoneromooo-monero2-1/+8
Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-19Merge pull request #5199Riccardo Spagni2-0/+44
eef164f7 cryptonote_protocol_handler: search for syncing peers in "cruise mode" (moneromooo-monero)
2019-03-19Merge pull request #5195Riccardo Spagni2-1/+11
a54e81e5 daemon: add '--no-sync' arg to optionally disable blockchain sync (xiphon)
2019-03-17Merge pull request #5190Riccardo Spagni2-0/+3
551104fb daemon: add --public-node mode, RPC port propagation over P2P (xiphon)
2019-03-05Update 2019 copyrightbinaryFate8-8/+8
2019-03-05cryptonote: avoid double parsing blocks when syncingmoneromooo-monero1-3/+18
2019-03-05core: avoid double parsing blocks after hohmoneromooo-monero1-7/+17
2019-03-04default initialize rpc structuresmoneromooo-monero1-8/+16
2019-03-04Merge pull request #5111Riccardo Spagni1-1/+1
6a3608d3 cryptonote_protocol_handler: pad tx messages when using tor/i2p (moneromooo-monero)
2019-02-26cryptonote_protocol_handler: search for syncing peers in "cruise mode"moneromooo-monero2-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
2019-02-25daemon: add '--no-sync' arg to optionally disable blockchain syncxiphon2-1/+11
2019-02-25daemon: add --public-node mode, RPC port propagation over P2Pxiphon2-0/+3
2019-02-02epee: add SSL supportmoneromooo-monero2-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.
2019-01-30cryptonote_protocol_handler: pad tx messages when using tor/i2pmoneromooo-monero1-1/+1
2019-01-29Merge pull request #4988Riccardo Spagni2-17/+44
973403bc Adding initial support for broadcasting transactions over Tor (Lee Clagett)
2019-01-28Adding initial support for broadcasting transactions over TorLee Clagett2-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).
2019-01-28block_queue: fix late sanity check off by onemoneromooo-monero1-1/+1
2019-01-22Pruningmoneromooo-monero5-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.
2019-01-16Merge pull request #5001Riccardo Spagni1-0/+1
a5ffc2d5 Remove boost::lexical_cast for uuid and unused uuid function (Lee Clagett)
2019-01-16Merge pull request #4976Riccardo Spagni2-4/+4
85665003 epee: better network buffer data structure (moneromooo-monero)
2019-01-06Merge pull request #4949Riccardo Spagni2-12/+24
5464725a protocol: change standby mode to not wait sleeping (moneromooo-monero) 85807dfb add a once_a_time_milliseconds class (moneromooo-monero)
2018-12-23epee: better network buffer data structuremoneromooo-monero2-4/+4
avoids pointless allocs and memcpy
2018-12-23Remove boost::lexical_cast for uuid and unused uuid functionLee Clagett1-0/+1
2018-12-12Merge pull request #4787Riccardo Spagni2-0/+33
3dba7f25 protocol: option to pad transaction relay to the next kB (moneromooo-monero)
2018-12-07protocol: change standby mode to not wait sleepingmoneromooo-monero2-12/+24
2018-12-04Merge pull request #4906Riccardo Spagni1-2/+2
506472e0 protocol: fix use after free when dropping a connection (moneromooo-monero)
2018-12-04Merge pull request #4877Riccardo Spagni1-1/+3
c25260f5 protocol: fix incorrect tx hash in log (moneromooo-monero)
2018-11-26protocol: fix use after free when dropping a connectionmoneromooo-monero1-2/+2
2018-11-20protocol: fix incorrect tx hash in logmoneromooo-monero1-1/+3
2018-11-15Removed a lot of unnecessary includesMartijn Otto1-22/+0
2018-11-06protocol: option to pad transaction relay to the next kBmoneromooo-monero2-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.
2018-09-04Merge pull request #4160luigi11112-13/+32
704b60c block_queue: faster check whether a block was requested (moneromooo-monero)
2018-08-22Merge pull request #4207luigi11111-7/+12
ce9457a cryptonote_protocol: don't serialize an unneeded new block message (moneromooo-monero)
2018-08-15Merge pull request #4020luigi11111-1/+14
c24a0af [monerod] Added blocks remaining count during syncronisation. (Jorropo)
2018-08-09cryptonote_protocol: don't serialize an unneeded new block messagemoneromooo-monero1-7/+12
Non fluffy block nodes should now be very rare
2018-07-25[monerod] Added blocks remaining count during syncronisation.Jorropo1-1/+14
And percent if usefull (% < 99)
2018-07-20block_queue: faster check whether a block was requestedmoneromooo-monero2-13/+32
2018-06-27Merge pull request #3716luigi11114-59/+62
a2b557f 6795bd0 209ec96 ed2c81e a830db2 57ea902 31a895e ba8331c f7f1917 41be339 f025ae9 ef2cb63 dcfd299 5d3e702 2704624 2771a18 0e4c7d0 (moneromooo-monero)
2018-06-26replace std::list with std::vector on some hot pathsmoneromooo-monero4-59/+62
also use reserve where appropriate
2018-06-09cryptonote_protocol_handler: log when dropping a peermoneromooo-monero1-0/+3
2018-06-03protocol: drop (and increase fails) if most blocks hashes are invalidmoneromooo-monero1-3/+3
2018-05-28protocol: do not switch to unsafe sync mode for just a few blocksmoneromooo-monero1-1/+2
2018-04-29Merge pull request #3719Riccardo Spagni1-8/+11
3880bf39 cryptonote_protocol_handler.inl: remove span read just now that failed to pass some basic tests (stoffu) da249fd5 cryptonote_protocol_handler.inl: fix return type mismatches (int vs bool) (stoffu)
2018-04-28cryptonote_protocol_handler.inl: remove span read just now that failed to ↵stoffu1-0/+3
pass some basic tests
2018-04-28cryptonote_protocol_handler.inl: fix return type mismatches (int vs bool)stoffu1-8/+8
2018-04-22Only log an error if fork version is higher AND is not known.Thaer Khawaja1-1/+1
2018-03-15Fix typos in various filesDimitris Apostolou1-1/+1
2018-03-05Merge pull request #3277Riccardo Spagni1-1/+1
0e7ad2e2 Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (stoffu) af773211 Stagenet (stoffu) cc9a0bee command_line: allow args to depend on more than one args (stoffu) 55f8d917 command_line::get_arg: remove 'required' for dependent args as they're always optional (stoffu) 450306a0 command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 (stoffu) 9f9e095a Use `genesis_tx` parameter in `generate_genesis_block`. #3261 (Jean Pierre Dudey)
2018-03-05Correct spelling mistakes.Edward Betts2-2/+2
2018-03-05Stagenetstoffu1-1/+1
2018-02-16Merge pull request #3229Riccardo Spagni1-0/+9
928c1825 cryptonote_protocol: guard against all threads in standby (moneromooo-monero)
2018-02-16Merge pull request #3181Riccardo Spagni2-3/+3
e3f0980a daemon: don't drop RPC with busy error when running offline (moneromooo-monero)
2018-02-02cryptonote_protocol: guard against all threads in standbymoneromooo-monero1-0/+9
2018-01-28Merge pull request #3186Riccardo Spagni1-1/+1
7ed62e63 cryptonote_protocol: fix std::move usage on different types (moneromooo-monero)
2018-01-26Readd copyright starting datexmr-eric2-2/+2
2018-01-26Update 2018 copyrightxmr-eric8-8/+8
2018-01-26cryptonote_protocol: fix std::move usage on different typesmoneromooo-monero1-1/+1
2018-01-25Merge pull request #3105Riccardo Spagni1-1/+1
b56f4645 cryptonote_protocol: fix size_t used in wire format (moneromooo-monero)
2018-01-25Merge pull request #3040Riccardo Spagni1-1/+1
69f9a075 cryptonote_protocol: fix missing space in version mismatch message (moneromooo-monero)
2018-01-25Merge pull request #3015Riccardo Spagni1-0/+2
f06603a4 cryptonote_protocol: update target height when receiving blocks (moneromooo-monero)
2018-01-25daemon: don't drop RPC with busy error when running offlinemoneromooo-monero2-3/+3
2018-01-11cryptonote_protocol: fix size_t used in wire formatmoneromooo-monero1-1/+1
This is 32 bits on 32 bit platforms, but 64 bits on 64 bit platforms.
2018-01-10Merge pull request #3004Riccardo Spagni1-0/+5
a2c845c7 cryptonote_protocol: internal error consistency size check (moneromooo-monero)
2017-12-31cryptonote_protocol: fix missing space in version mismatch messagemoneromooo-monero1-1/+1
2017-12-27cryptonote_protocol: update target height when receiving blocksmoneromooo-monero1-0/+2
2017-12-24cryptonote_protocol: internal error consistency size checkmoneromooo-monero1-0/+5
2017-12-18use const refs in for loops for non tiny typesmoneromooo-monero1-1/+1
2017-12-18add empty container sanity checks when using front() and back()moneromooo-monero2-0/+7
2017-12-18cryptonote_protocol: sanity check chain hashes from peermoneromooo-monero1-0/+6
2017-12-18cryptonote_protocol: print peer versions when unexpectedmoneromooo-monero1-6/+10
also avoid integer underflow on zero height
2017-12-17Merge pull request #2877Riccardo Spagni3-10/+4
43f5269f Wallets now do not depend on the daemon rpc lib (moneromooo-monero) bb89ae8b move connection_basic and network_throttle from src/p2p to epee (moneromooo-monero) 4abf25f3 cryptonote_core does not depend on p2p anymore (moneromooo-monero)
2017-12-16move connection_basic and network_throttle from src/p2p to epeemoneromooo-monero2-2/+2
These even had the epee namespace. This fixes some ugly circular dependencies.
2017-12-16cryptonote_core does not depend on p2p anymoremoneromooo-monero2-8/+2
As a followon side effect, this makes a lot of inline code included only in particular cpp files (and instanciated when necessary.
2017-12-16move includes around to lessen overall loadmoneromooo-monero3-37/+2