aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h
Commit message (Collapse)AuthorAgeFilesLines
* zmq: apply restricted-mode privacy filtering to get_transaction_poolgreatjourney5892026-05-081-1/+2
| | | | | | | | | | | | | | | | Add an include_sensitive parameter to tx_memory_pool::get_pool_for_rpc (and its core passthrough), mirroring the include_sensitive_data parameter on the HTTP analog get_transactions_and_spent_keys_info. When false, receive_time and last_relayed_time are zeroed using the same masking already applied on the HTTP path. The ZMQ handler in daemon_handler.cpp passes !m_restricted, so --restricted-zmq-rpc callers now receive the same privacy-filtered view as restricted HTTP callers instead of the unfiltered timing metadata they previously got. Stem-phase txs continue to be excluded regardless (relay_category::broadcasted filter unchanged). Refs #10529.
* Fix ZMQ-PUB reporting of mempool txes that were initially in stem phaseLee Clagett2026-04-241-1/+4
|
* tx_memory_pool: speedup get_complement() for large requestsjeffro2562026-03-211-1/+1
| | | | | | | Changes complexity from M*N to (2*N+M)*log2(M). The FCMP++ stressnet recently hit mempool sizes of ~55k txs. If the requesting node's mempool is populated, this results in an average of (55000*55000)/2 (about 1.5 billion) comparisons for the responding node. Under this commit, this would be reduced to (55000+55000)*log2(55000) comparisons (about 2.6 million), a 99.83% reduction.
* blockchain sync: reduce disk writes from 2 to 1 per txjeffro2562025-03-101-3/+14
|
* Fixed mempool pruningSChernykh2024-03-081-5/+6
| | | | | - Fixed undefined behavior after a call to `remove_tx_from_transient_lists` (it used an invalid iterator) - Fixed `txCompare` (it wasn't strictly weak ordered)
* Enforce restricted # pool txs served via RPC + optimize chunked reqs ↵j-berman2023-07-091-3/+8
| | | | | | | | | | | | | | | | | | | | | | [release-v0.18] - `/getblocks.bin` respects the `RESTRICTED_TX_COUNT` (=100) when returning pool txs via a restricted RPC daemon. - A restricted RPC daemon includes a max of `RESTRICTED_TX_COUNT` txs in the `added_pool_txs` field, and returns any remaining pool hashes in the `remaining_added_pool_txids` field. The client then requests the remaining txs via `/gettransactions` in chunks. - `/gettransactions` no longer does expensive no-ops for ALL pool txs if the client requests a subset of pool txs. Instead it searches for the txs the client explicitly requests. - Reset `m_pool_info_query_time` when a user: (1) rescans the chain (so the wallet re-requests the whole pool) (2) changes the daemon their wallets points to (a new daemon would have a different view of the pool) - `/getblocks.bin` respects the `req.prune` field when returning pool txs. - Pool extension fields in response to `/getblocks.bin` are optional with default 0'd values.
* wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call ↵rbrunner72023-07-091-0/+32
| | | | [release-v0.18]
* Merge pull request #8467luigi11112022-08-091-0/+7
|\ | | | | | | fac7c43 continue pool pruning even if a tx can't be found (j-berman)
| * continue pool pruning even if a tx can't be foundj-berman2022-07-261-0/+7
| |
* | Merge pull request #8455luigi11112022-08-081-1/+5
|\ \ | | | | | | | | | 099fc1f Fixed get_block_template_backlog performance (SChernykh)
| * | Fixed get_block_template_backlog performanceSChernykh2022-07-221-1/+5
| |/ | | | | | | | | | | Before the fix, it processed all transactions in the mempool which could be very slow when mempool grows to several MBs in size. I observed `get_block_template_backlog` taking up to 15 seconds of CPU time under high mempool load. After the fix, only transactions that can potentially be mined in the next block will be processed (a bit more than the current block median weight).
* / Publish submitted txs via zmqj-berman2022-07-211-1/+3
|/
* Copyright: Update to 2022mj-xmr2022-03-041-1/+1
|
* RPC and ZeroMQ APIs to support p2poolSChernykh2021-09-111-0/+10
| | | | | | | | | | | | | | | | | | | | Adds the following: - "get_miner_data" to RPC API - "json-miner-data" to ZeroMQ subscriber contexts Both provide the necessary data to create a custom block template. They are used by p2pool. Data provided: - major fork version - current height - previous block id - RandomX seed hash - network difficulty - median block weight - coins mined by the network so far - mineable mempool transactions
* Fix timeout checks for forwarded and Dandelion++ stem txesLee Clagett2020-11-151-2/+9
|
* Merge pull request #6512Alexander Blair2020-07-191-1/+1
|\ | | | | | | 5ef0607da Update copyright year to 2020 (SomaticFanatic)
| * Update copyright year to 2020SomaticFanatic2020-05-061-1/+1
| | | | | | | | Update copyright year to 2020
* | tx_pool: mine stem txes in fake chain modemoneromooo-monero2020-07-091-1/+3
|/ | | | | | This fixes the functional tests, since txes would not be mined after being sent to the daemon (they'd be waiting for the dandelion timeout first)
* Always reject duplicate key-images from second txidLee Clagett2020-03-301-2/+4
|
* protocol: request txpool contents when syncedmoneromooo-monero2020-03-221-0/+5
| | | | | | | 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
* Adding support for hidden (anonymity) txpoolLee Clagett2019-11-021-23/+30
|
* Merge pull request #5919luigi11112019-10-221-0/+5
|\ | | | | | | 01f660f blockchain: fill in cumulative block weight for alt blocks (moneromooo-monero)
| * blockchain: fill in cumulative block weight for alt blocksmoneromooo-monero2019-10-101-0/+5
| |
* | Merge pull request #5962luigi11112019-10-161-1/+1
|\ \ | | | | | | | | | ec14abd tx_pool: make spent return-by-reference as intended (stoffu)
| * | tx_pool: make spent return-by-reference as intendedstoffu2019-10-061-1/+1
| |/
* / monerod can now sync from pruned blocksmoneromooo-monero2019-09-271-1/+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
* Update 2019 copyrightbinaryFate2019-03-051-1/+1
|
* Avoid repeated (de)serialization when syncingmoneromooo-monero2019-03-051-1/+2
|
* cryptonote: Add const-qualifier on comparison functorTom Smeding2019-02-011-1/+1
| | | | | The original code did not compile with GCC 8.2.1 in C++17 mode, since comparison functions for std::set's must be invocable as const.
* Merge pull request #4765Riccardo Spagni2018-11-161-1/+1
|\ | | | | | | 09dbd9cb tx_pool: fix comment about transaction_prefix (moneromooo-monero)
| * tx_pool: fix comment about transaction_prefixmoneromooo-monero2018-10-311-1/+1
| | | | | | | | | | It was leftover from a change that was undone before commit, but the comment change was let through
* | tx_pool: speed up take_tx for transactions from blocksmoneromooo-monero2018-11-011-0/+2
| | | | | | | | | | | | | | This happens for every historical tx when syncing, and the unnecessary parsing is actually showing up on profile. Since these are kept cached for just one block, this does not increase memory usage after syncing.
* | core: avoid unnecessary tx/blob conversionsmoneromooo-monero2018-11-011-1/+1
|/
* tx_pool: avoid parsing a whole tx if only the prefix is neededmoneromooo-monero2018-10-081-6/+7
|
* v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero2018-09-111-21/+25
|
* core: cache block template where possiblemoneromooo-monero2018-08-161-0/+9
| | | | | | | This avoids constant rechecking of the same things each time a miner asks for the block template. The tx pool maintains a cookie to allow users to detect when the pool state changed, which means the block template needs rebuilding.
* Merge pull request #4047luigi11112018-07-191-1/+7
|\ | | | | | | 41b4bf9 tx_pool: cache check_tx_inputs results (moneromooo-monero)
| * tx_pool: cache check_tx_inputs resultsmoneromooo-monero2018-06-241-1/+7
| | | | | | | | | | | | This is called a lot when creating a block template, and does not change until the blockchain changes. This also avoids tx parsing when cached.
* | replace std::list with std::vector on some hot pathsmoneromooo-monero2018-06-261-3/+3
|/ | | | also use reserve where appropriate
* tx_pool: hold off parsing a tx blob till we actually need itmoneromooo-monero2018-06-021-1/+3
|
* tx_pool: add a max pool size, settable with --max-txpool-sizemoneromooo-monero2018-02-071-2/+25
|
* Update 2018 copyrightxmr-eric2018-01-261-1/+1
|
* Merge pull request #2615Riccardo Spagni2017-11-141-6/+16
|\ | | | | | | 10013e94 Protect node privacy by proper filtering in restricted-mode RPC answers (binaryFate)
| * Protect node privacy by proper filtering in restricted-mode RPC answersbinaryFate2017-11-081-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to filter out sensitive information for queries that rely on the pool state, when running in restricted mode. This filtering is only applied to data sent back to RPC queries. Results of inline commands typed locally in the daemon are not affected. In practice, when running with `--restricted-rpc`: * get_transaction_pool will list relayed transactions with the fields "last relayed time" and "received time" set to zero. * get_transaction_pool will not list transaction that have do_not_relay set to true, and will not list key images that are used only for such transactions * get_transaction_pool_hashes.bin will not list such transaction * get_transaction_pool_stats will not count such transactions in any of the aggregated values that are computed The implementation does not make filtering the default, so developers should be mindful of this if they add new RPC functionality. Fixes #2590.
* | track double spending in the txpoolmoneromooo-monero2017-11-061-1/+9
|/ | | | | | | | | | | | | | Transactions in the txpool are marked when another transaction is seen double spending one or more of its inputs. This is then exposed wherever appropriate. Note that being marked with this "double spend seen" flag does NOT mean this transaction IS a double spend and will never be mined: it just means that the network has seen at least another transaction spending at least one of the same inputs, so care should be taken to wait for a few confirmations before acting upon that transaction (ie, mostly of use for merchants wanting to accept unconfirmed transactions).
* json serialization for rpc-relevant monero typesThomas Winget2017-09-051-0/+23
| | | | | | | | | | | Structured {de-,}serialization methods for (many new) types which are used for requests or responses in the RPC. New types include RPC requests and responses, and structs which compose types within those. # Conflicts: # src/cryptonote_core/blockchain.cpp
* rpc: add a new RPC to get current txpool backlog (sizes and fees)moneromooo-monero2017-08-261-0/+7
|
* tx_pool: remove obsolete unused m_config_folder fieldmoneromooo-monero2017-07-301-1/+0
|
* Speedup print_pool_statsHoward Chu2017-06-011-0/+7
| | | | Since we're just counting txs, there's no reason to deserialize all the blobs.
* Merge pull request #1982Riccardo Spagni2017-05-301-35/+17
|\ | | | | | | b52abd13 Move txpool to the database (moneromooo-monero)