aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-03-08Fixed mempool pruningSChernykh1-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)
2023-10-16gcc: fix uninitialized constructor warningsjeff1-1/+1
2023-07-01blockchain_and_pool: move to crytonote_core and enforce its usagejeffro2561-8/+9
2023-04-25Merge pull request #8698luigi11111-1/+1
5b4fea7 Copyright: Update to 2023 (mj-xmr)
2023-03-07Enforce restricted # pool txs served via RPC + optimize chunked reqsj-berman1-3/+8
- `/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.
2023-01-16Copyright: Update to 2023mj-xmr1-1/+1
Co-authored-by: plowsof <plowsof@protonmail.com> extra files
2022-12-30wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 callrbrunner71-0/+32
2022-08-22Merge pull request #8427luigi11111-1/+3
1fc60ca Publish submitted txs via zmq (j-berman)
2022-08-22Merge pull request #8415luigi11111-0/+7
628fdcd continue pool pruning even if a tx can't be found (j-berman)
2022-07-26Fixed get_block_template_backlog performanceSChernykh1-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).
2022-07-21Publish submitted txs via zmqj-berman1-1/+3
2022-07-01continue pool pruning even if a tx can't be foundj-berman1-0/+7
2022-03-04Copyright: Update to 2022mj-xmr1-1/+1
2021-09-11RPC and ZeroMQ APIs to support p2poolSChernykh1-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
2020-11-15Fix timeout checks for forwarded and Dandelion++ stem txesLee Clagett1-2/+9
2020-07-19Merge pull request #6512Alexander Blair1-1/+1
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-09tx_pool: mine stem txes in fake chain modemoneromooo-monero1-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)
2020-05-06Update copyright year to 2020SomaticFanatic1-1/+1
Update copyright year to 2020
2020-03-30Always reject duplicate key-images from second txidLee Clagett1-2/+4
2020-03-22protocol: request txpool contents when syncedmoneromooo-monero1-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
2019-11-02Adding support for hidden (anonymity) txpoolLee Clagett1-23/+30
2019-10-22Merge pull request #5919luigi11111-0/+5
01f660f blockchain: fill in cumulative block weight for alt blocks (moneromooo-monero)
2019-10-16Merge pull request #5962luigi11111-1/+1
ec14abd tx_pool: make spent return-by-reference as intended (stoffu)
2019-10-10blockchain: fill in cumulative block weight for alt blocksmoneromooo-monero1-0/+5
2019-10-06tx_pool: make spent return-by-reference as intendedstoffu1-1/+1
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero1-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
2019-03-05Update 2019 copyrightbinaryFate1-1/+1
2019-03-05Avoid repeated (de)serialization when syncingmoneromooo-monero1-1/+2
2019-02-01cryptonote: Add const-qualifier on comparison functorTom Smeding1-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.
2018-11-16Merge pull request #4765Riccardo Spagni1-1/+1
09dbd9cb tx_pool: fix comment about transaction_prefix (moneromooo-monero)
2018-11-01tx_pool: speed up take_tx for transactions from blocksmoneromooo-monero1-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.
2018-11-01core: avoid unnecessary tx/blob conversionsmoneromooo-monero1-1/+1
2018-10-31tx_pool: fix comment about transaction_prefixmoneromooo-monero1-1/+1
It was leftover from a change that was undone before commit, but the comment change was let through
2018-10-08tx_pool: avoid parsing a whole tx if only the prefix is neededmoneromooo-monero1-6/+7
2018-09-11v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero1-21/+25
2018-08-16core: cache block template where possiblemoneromooo-monero1-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.
2018-07-19Merge pull request #4047luigi11111-1/+7
41b4bf9 tx_pool: cache check_tx_inputs results (moneromooo-monero)
2018-06-26replace std::list with std::vector on some hot pathsmoneromooo-monero1-3/+3
also use reserve where appropriate
2018-06-24tx_pool: cache check_tx_inputs resultsmoneromooo-monero1-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.
2018-06-02tx_pool: hold off parsing a tx blob till we actually need itmoneromooo-monero1-1/+3
2018-02-07tx_pool: add a max pool size, settable with --max-txpool-sizemoneromooo-monero1-2/+25
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2017-11-14Merge pull request #2615Riccardo Spagni1-6/+16
10013e94 Protect node privacy by proper filtering in restricted-mode RPC answers (binaryFate)
2017-11-08Protect node privacy by proper filtering in restricted-mode RPC answersbinaryFate1-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.
2017-11-06track double spending in the txpoolmoneromooo-monero1-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).
2017-09-05json serialization for rpc-relevant monero typesThomas Winget1-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
2017-08-26rpc: add a new RPC to get current txpool backlog (sizes and fees)moneromooo-monero1-0/+7
2017-07-30tx_pool: remove obsolete unused m_config_folder fieldmoneromooo-monero1-1/+0
2017-06-01Speedup print_pool_statsHoward Chu1-0/+7
Since we're just counting txs, there's no reason to deserialize all the blobs.
2017-05-30Merge pull request #1982Riccardo Spagni1-35/+17
b52abd13 Move txpool to the database (moneromooo-monero)
2017-05-25Move txpool to the databasemoneromooo-monero1-35/+17
Integration could go further (ie, return_tx_to_pool calls should not be needed anymore, possibly other things). poolstate.bin is now obsolete.
2017-04-19Add expected total reward to RPC "getblocktemplate".assylias1-1/+2
Only works from V5 fork onward - returns 0 before that block.
2017-03-23core, wallet: faster tx pool scanningmoneromooo-monero1-0/+7
Includes a new RPC to get tx pool hashes fast.
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-2/+2
2017-01-15Merge pull request #1571Riccardo Spagni1-4/+10
81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
2017-01-14fix do_not_relay not preventing relaying on a timermoneromooo-monero1-4/+10
Also print its value when printing pool
2017-01-13Prioritize older transactions in the mempoolMiguel Herranz1-6/+9
The transactions are first prioritized by fee and in case the fees are equal by receive_time.
2017-01-07tx_pool: better block template filling algorithmmoneromooo-monero1-1/+2
Continue filling until we reach the block size limit, or the resulting coinbase decreases. Also remove old sanity check on block size, which is now not wanted anymore.
2016-09-15compile errors fixed when DEBUG_CREATE_BLOCK_TEMPLATE definedrckngOpossum1-0/+6
2016-08-28remove original Cryptonote blockchain_storage blockchain formatmoneromooo-monero1-19/+0
2016-04-06tx_pool: fix (hopefully) save/load of kept_by_blockmoneromooo-monero1-0/+2
2016-03-30minor corrections/clarificationsThomas Winget1-1/+1
2016-03-24Transaction pool documentation (and some cleanup)Thomas Winget1-67/+349
tx_pool.h doxygen documentation completed. Many notes made on areas for improvement, be that functionality or code clarity. Commented code and unused code removed.
2016-01-31Merge pull request #631Riccardo Spagni1-2/+0
bcac101 daemon: fix a few issues reported by valgrind (moneromooo-monero) a7e8174 tx_pool: fix serialization of new relayed data (moneromooo-monero) 601ad76 hardfork: fix mixup in indexing variable in get_voting_info (moneromooo-monero) 444e22f blockchain: remove unused timer (moneromooo-monero) 7edfdd8 blockchain: fix m_sync_counter uninitialized variable use (moneromooo-monero) d97582c epee: use generate_random_bytes for new random uuids (moneromooo-monero) 17c7c9c epee: remove dodgy random code that nobody uses (moneromooo-monero)
2016-01-30tx_pool: fix serialization of new relayed datamoneromooo-monero1-2/+0
2016-01-29tx_pool: serialize missing kept_by_block flagmoneromooo-monero1-1/+4
2016-01-29tx_pool: do not accept txes not in a block if they timed out beforemoneromooo-monero1-1/+4
This is intended to avoid cases where a timed out tx will be re-relayed by another peer for which it has not timed out yet, which would cause the tx to stay in the network's pool for a long time (until all peers time it out before another one tries to relay it again).
2016-01-29Fix V1/V2 use of hard fork related parametersmoneromooo-monero1-2/+3
Some of it uses hardcoded height, which will need some thinking for next (voted upon) fork.
2015-12-31updated copyright yearRiccardo Spagni1-1/+1
2015-12-15Replace tabs with two spaces for consistency with rest of codebasewarptangent1-8/+8
Remove trailing whitespace in same files.
2015-11-21Relay transactions when they linger too long in the poolmoneromooo-monero1-5/+13
The last relayed time of a transaction is maintained, and transactions will be relayed again if they are still in the pool after a certain amount of time, which increases with the transaction's age. All such transactions are resent, whether or not they originated on the local node.
2015-05-13Fixes changes to sort tx by fee per kbThomas Winget1-3/+19
2015-05-13resolved merge conflict in tx_pool.cppRiccardo Spagni1-0/+7
2015-04-30Sort txs by per-kb-fee for minersThomas Winget1-0/+7
2015-04-23Add mempool output to daemon via command and RPCwarptangent1-0/+2
This is for the "print_pool" command and "get_transaction_pool" RPC method. Add mempool's spent key images to the results.
2015-02-02Add compile-time support for both db implementations: in-memory and LMDBwarptangent1-1/+18
Usage: default is lmdb for blockchain branch: $ make release same as: $ DATABASE=lmdb make release for original in-memory implementation: $ DATABASE=memory make release
2015-01-04Integrate BlockchainDB into cryptonote_coreThomas Winget1-6/+3
Probably needs more looking at -- lot of things were done...in a rushed sort of way. That said, it all builds and *should* be at least testable. update for rebase (warptangent 2015-01-04) fix conflicts with upstream CMakeLists.txt files src/CMakeLists.txt (remove edits from original commit) tests/CMakeLists.txt (remove edits from original commit) src/cryptonote_core/CMakeLists.txt (edit) - use blockchain db .cpp and .h files - add LMDB_LIBRARIES
2015-01-02year updated in licenseRiccardo Spagni1-1/+1
2014-09-25Revert "low risk, potentially varint overflow bug patched thanks to BBR"Riccardo Spagni1-2/+2
This reverts commit 4e2b2b942daa4206ec44c66e59863670dfe3fde4.
2014-09-24low risk, potentially varint overflow bug patched thanks to BBRRiccardo Spagni1-2/+2
2014-08-01Merge pull request #64 from mikezackles/bytecoin_tx_pool_tmpRiccardo Spagni1-15/+15
tx pool fixes, courtesy of Bytecoin
2014-07-23License updated to BSD 3-clausefluffypony1-3/+29
2014-07-17Use const where appropriate in tx_poolZachary Michaels1-11/+11
2014-07-17Make some tx_pool methods staticZachary Michaels1-2/+2
2014-07-17Make some tx_pool methods privateZachary Michaels1-6/+6
2014-06-15proper tx_pool handling from CryptoZoidberg / BBRfluffypony1-1/+7
2014-05-250.8.8updatemydesktop1-2/+0
2014-05-03initial [broken] updatemydesktop1-0/+3
2014-04-02json rpc for wallet and bugfixAntonio Juarez1-1/+1
2014-03-03moved all stuff to githubAntonio Juarez1-0/+168