summaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
Commit message (Collapse)AuthorAgeFilesLines
* Move update_checkpoints() to a later stageSChernykh2022-09-221-0/+8
| | | | update_checkpoints() makes a few DNS requests and can take up to 20-30 seconds to complete (3-6 seconds on average). It is currently called from core::handle_incoming_block() which holds m_incoming_tx_lock, so it blocks all incoming transactions and blocks processing while update_checkpoints() is running. This PR moves it to until after a new block has been processed and relayed, to avoid full monerod locking.
* Don't exclusively drop tor/i2p outgoing cxns in idle loopj-berman2022-05-182-24/+56
|
* Trimming FatJeffrey2022-04-181-1/+0
| | | | Remove unused include statements or unused definitions.
* Merge pull request #8223luigi11112022-04-061-1/+0
|\ | | | | | | 17772ef Eliminate dependence on boost::interprocess #8223 (Jeffrey)
| * Eliminate dependence on boost::interprocess #8223Jeffrey2022-03-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | In this repo, `boost::interprocess` was being used soley to make `uint32_t` operations atomic. So I replaced each instance of `boost::interprocess::ipcdetail::atomic(...)32` with `std::atomic` methods. I replaced member declarations as applicable. For example, when I needed to change a `volatile uint32_t` into a `std::atomic<uint32_t>`. Sometimes, a member was being used a boolean flag, so I replaced it with `std::atomic<bool>`. You may notice that I didn't touch `levin_client_async.h`. That is because this file is entirely unused and will be deleted in PR monero-project#8211. Additional changes from review: * Make some local variables const * Change postfix operators to prefix operators where value was not need
* | Copyright: Update to 2022mj-xmr2022-03-0412-12/+12
|/
* protocol: fix spurious rejection of downloaded blocksmoneromooo-monero2021-10-211-0/+1
| | | | | | when kicking a peer for inactivity, clear the set of requested blocks, or next time we requests blocks from it, we'll probably reject the incoming blocks due to missing the previous requested blocks
* node_server: fix race conditionanon2021-09-202-11/+46
|
* protocol: fix delayed "you are now synchronized..." messagemoneromooo-monero2021-06-211-3/+4
|
* Merge pull request #7691luigi11112021-05-121-1/+1
|\ | | | | | | cbd54ea cmake: set 3.5 as minimum version (selsta)
| * cmake: set 3.5 as minimum versionselsta2021-04-271-1/+1
| |
| * Remove payload copy in all outgoing p2p messagesLee Clagett2021-01-194-26/+20
| |
| * Revert "Merge pull request #7136"luigi11112021-04-164-20/+26
| | | | | | | | | | This reverts commit 63c7ca07fba2f063c760f786a986fb3e02fb040e, reversing changes made to 2218e23e84a89e9a1e4c0be5d50f891ab836754f.
* | protocol: remove unreachable codemoneromooo-monero2021-04-171-1/+1
|/
* Merge pull request #7136luigi11112021-04-164-26/+20
|\ | | | | | | 23aae55 Remove payload copy in all outgoing p2p messages (Lee Clagett)
| * Remove payload copy in all outgoing p2p messagesLee Clagett2021-01-164-26/+20
| |
* | Merge pull request #7620luigi11112021-03-291-27/+41
|\ \ | | | | | | | | | | | | fe63256 cryptonote_protocol_handler: fix race condition (anon) ded2f3a cryptonote_protocol_handler: add race condition demo (anon)
| * | cryptonote_protocol_handler: fix race conditionanon2021-03-221-27/+41
| |/
* | Merge pull request #7310luigi11112021-03-291-6/+3
|\ \ | |/ |/| | | 76fe73b Revert 'fix accessing an network address in a deleted context' (selsta)
| * Revert "fix accessing an network address in a deleted context"selsta2021-01-121-6/+3
| | | | | | | | This reverts commit 4e74385a1ae9eae4ae9e8d155dfd96978eb10e7a.
* | Merge pull request #7346luigi11112021-02-181-3/+0
|\ \ | | | | | | | | | 85db173 Remove unused variables in monero codebase (Kevin Barbour)
| * | Remove unused variables in monero codebaseKevin Barbour2021-02-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are quite a few variables in the code that are no longer (or perhaps never were) in use. These were discovered by enabling compiler warnings for unused variables and cleaning them up. In most cases where the unused variables were the result of a function call the call was left but the variable assignment removed, unless it was obvious that it was a simple getter with no side effects.
* | | Merge pull request #7294luigi11112021-02-151-4/+0
|\ \ \ | |/ / |/| | | | | f10c9a1 remove obsolete pruning debug code (moneromooo-monero)
| * | remove obsolete pruning debug codemoneromooo-monero2021-01-081-4/+0
| | |
* | | Merge pull request #7236luigi11112021-01-151-9/+1
|\ \ \ | | | | | | | | | | | | ab5e185 protocol: fix wrong command in logs (moneromooo-monero)
| * | | protocol: fix wrong command in logsmoneromooo-monero2020-12-301-9/+1
| | | | | | | | | | | | | | | | this is not a levin packet, this is just its payload
* | | | Merge pull request #7119luigi11112021-01-151-0/+7
|\ \ \ \ | |_|_|/ |/| | | | | | | dd5e689 protocol: add calls to reserve where appropriate (moneromooo-monero)
| * | | protocol: add calls to reserve where appropriatemoneromooo-monero2020-12-101-0/+7
| | | |
* | | | Merge pull request #7285Alexander Blair2021-01-072-20/+0
|\ \ \ \ | |_|_|/ |/| | | | | | | 927141bcc Command max_bytes moved from dynamic map to static switch (Lee Clagett)
| * | | Command max_bytes moved from dynamic map to static switchLee Clagett2020-12-222-20/+0
| | | |
* | | | Merge pull request #7266luigi11112021-01-061-4/+9
|\ \ \ \ | |/ / / |/| | | | | | | 38a6e6e protocol: handle receiving a block hash we've not added yet (moneromooo-monero)
| * | | protocol: handle receiving a block hash we've not added yetmoneromooo-monero2021-01-021-4/+9
| | | |
* | | | Merge pull request #7271Alexander Blair2021-01-031-3/+6
|\ \ \ \ | | | | | | | | | | | | | | | 4e74385a1 fix accessing an network address in a deleted context (moneromooo-monero)
| * | | | fix accessing an network address in a deleted contextmoneromooo-monero2021-01-031-3/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both drop_connection and add_host_fail can drop the connection, which invalidates the context, and thus the address it contains. Thanks to wfaressuissia[m] for lots of help and prodding when debugging this
* / / / add a max levin packet size by command typemoneromooo-monero2021-01-032-0/+20
|/ / /
* | | Merge pull request #7250Alexander Blair2021-01-012-1/+2
|\ \ \ | | | | | | | | | | | | 61b6e4cc6 Add aggressive restrictions to pre-handshake p2p buffer limit (Lee Clagett)
| * | | Add aggressive restrictions to pre-handshake p2p buffer limitLee Clagett2020-12-172-1/+2
| | |/ | |/|
* | | Merge pull request #7246Alexander Blair2021-01-011-12/+52
|\ \ \ | | | | | | | | | | | | 0aa541b36 protocol: more sanity checks in new chain block hashes (moneromooo-monero)
| * | | protocol: more sanity checks in new chain block hashesmoneromooo-monero2020-12-311-12/+52
| |/ /
* / / protocol: don't reset last request time on an idle timermoneromooo-monero2020-12-301-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
* | protocol: fix false positives dropping peersmoneromooo-monero2020-12-271-23/+21
| | | | | | | | it'd trigger on reorgs
* | Revert "Reject existing claimed blocks in sync mode"luigi11112020-12-271-18/+19
| |
* | Merge pull request #7188Alexander Blair2020-12-262-4/+16
|\ \ | | | | | | | | | efe83982d protocol: drop nodes if they claim new data but only give stale data (moneromooo-monero)
| * | protocol: drop nodes if they claim new data but only give stale datamoneromooo-monero2020-12-252-4/+16
| | | | | | | | | | | | Some joker is spending time actually doing this
* | | Merge pull request #7154Alexander Blair2020-12-261-19/+18
|\ \ \ | |/ / |/| | | | | | | | cf7e1571d protocol: reject claimed block hashes that already are in the chain (moneromooo-monero) af0a25544 protocol: drop peers we can't download anything from in sync mode (moneromooo-monero)
| * | protocol: reject claimed block hashes that already are in the chainmoneromooo-monero2020-12-171-0/+13
| | |
| * | protocol: drop peers we can't download anything from in sync modemoneromooo-monero2020-12-161-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.
* | | Merge pull request #7075luigi11112020-12-191-2/+0
|\ \ \ | | | | | | | | | | | | | | | | f3c0d4f protocol: remove unused (and cunningly uninitialized) field (moneromooo-monero) 8e62362 p2p: ifx getting seed nodes for uncommon cases (moneromooo-monero)
| * | | protocol: remove unused (and cunningly uninitialized) fieldmoneromooo-monero2020-12-151-2/+0
| | | |
* | | | rpc: add a busy_syncing field to get_infomoneromooo-monero2020-12-172-0/+9
| |/ / |/| | | | | | | | true if and pretty much only if new blocks are being added