aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-05-06Merge pull request #6478luigi11111-1/+1
ee58362 Used legacy category to match insert_key_images behavior (vtnerd)
2020-04-29txpool.cpp: rename var to fix for old g++ version (xenial default)Sumo Gr1-2/+2
2020-04-24Used legacy category to match insert_key_images behaviorLee Clagett1-1/+1
2020-03-30Always reject duplicate key-images from second txidLee Clagett1-10/+12
2020-03-26Adding Dandelion++ support to public networks:Lee Clagett1-30/+85
- 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-10Merge pull request #6403luigi11111-16/+7
5de2295 Correct key image check in tx_pool (vtnerd)
2020-03-31Merge pull request #6336luigi11111-1/+5
760ecf2 console_handler: do not let exception past the dor (moneromooo-monero) 09c8111 threadpool: lock mutex in create (moneromooo-monero) e377977 tx_pool: catch theoretical error in get_block_reward (moneromooo-monero)
2020-03-31Merge pull request #6214luigi11111-0/+33
054b4c7 protocol: request txpool contents when synced (moneromooo-monero)
2020-03-22protocol: request txpool contents when syncedmoneromooo-monero1-0/+33
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-14Correct key image check in tx_poolLee Clagett1-16/+7
2020-03-12core: move the LockedTXN class out of txpool so it may be reusedmoneromooo-monero1-30/+12
for example, in the RPC server
2020-02-12tx_pool: catch theoretical error in get_block_rewardmoneromooo-monero1-1/+5
Coverity 196626
2019-12-12Merge pull request #6052luigi11111-2/+2
c96b7ee tx_pool: fix error message assuming incorrectly (moneromooo-monero)
2019-11-02Adding support for hidden (anonymity) txpoolLee Clagett1-89/+120
2019-10-29tx_pool: fix error message assuming incorrectlymoneromooo-monero1-2/+2
2019-10-25tx_pool: fix divide by 0 in logmoneromooo-monero1-1/+1
Coverity 205394
2019-10-22Merge pull request #5981luigi11111-2/+2
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-22Merge pull request #5919luigi11111-0/+53
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-11tx_pool: do not divide by 0moneromooo-monero1-2/+2
In case of a 0 tx weight, we use a placeholder value to insert in the fee-per-byte set. This is used for pruning and mining, and those txes are pruned, so will not be too large, nor added to the block template if mining, so this is safe. CID 204465
2019-10-10blockchain: fill in cumulative block weight for alt blocksmoneromooo-monero1-0/+53
2019-10-08Merge pull request #5915luigi11111-8/+17
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-10-06tx_pool: make spent return-by-reference as intendedstoffu1-1/+1
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero1-8/+17
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-08-28Fix bug in mempool get_transaction_stats histogram calculationTom Smeding1-3/+10
The 98th percentile position in the agebytes map was incorrectly calculated: it assumed the transactions in the mempool all have unique timestamps at second-granularity. This commit fixes this by correctly finding the right cumulative number of transactions in the map suffix. This bug could lead to an out-of-bounds write in the rare case that all transactions in the mempool were received (and added to the mempool) at a rate of at least 50 transactions per second. (More specifically, the number of *unique* receive_time values, which have second- granularity, must be at most 2% of the number of transactions in the mempool for this crash to trigger.) If this condition is satisfied, 'it' points to *before* the agebytes map, 'delta' gets a nonsense value, and the value of 'i' in the first stats.histo-filling loop will be out of bounds of stats.histo.
2019-05-25core: do not commit half constructed batch db txnmoneromooo-monero1-2/+16
2019-03-05Update 2019 copyrightbinaryFate1-1/+1
2019-03-05Avoid repeated (de)serialization when syncingmoneromooo-monero1-2/+2
2018-12-31Merge pull request #4946luigi11111-8/+15
6644b9b blockchain_db: remove a couple unused functions (moneromooo-monero) ce594f5 blockchain_db: allocate known size vector only once (moneromooo-monero) 8332698 db_lmdb: inline check_open, it's trivial and called everywhere (moneromooo-monero) 5511563 db_lmdb: avoid pointless division (moneromooo-monero) d1efe3d cryptonote: set tx hash on newly parsed txes when known (moneromooo-monero) 9cc68a2 tx_pool: add a few std::move where it can make a difference (moneromooo-monero)
2018-12-05tx_pool: add a few std::move where it can make a differencemoneromooo-monero1-3/+4
2018-12-05cryptonote: set tx hash on newly parsed txes when knownmoneromooo-monero1-5/+11
2018-12-04move int-util.h to epeemoneromooo-monero1-1/+1
2018-11-16Merge pull request #4768Riccardo Spagni1-3/+2
cf552c75 tx_pool: allow take_tx to work without m_txs_by_fee_and_receive_time (moneromooo-monero)
2018-11-14Merge pull request #4769Riccardo Spagni1-9/+21
5808530f blockchain: remove unused output_scan_worker parameter (moneromooo-monero) 1426209a blockchain: don't run threads if we have just one function to run (moneromooo-monero) 6f7a5fd4 db_lmdb: slight speedup getting array data from the blockchain (moneromooo-monero) 99fbe100 db_lmdb: save some string copies for readonly db keys/values (moneromooo-monero) bf31447e tx_pool: speed up take_tx for transactions from blocks (moneromooo-monero) 4f005a77 tx_pool: remove unnecessary get_transaction_hash (moneromooo-monero) 593ef598 perf_timer: call reserve on new timer array (moneromooo-monero) 6ecc99ad core: avoid unnecessary tx/blob conversions (moneromooo-monero) 00cc1a16 unit_tests: notify test special case for the usual weirdo (moneromooo-monero)
2018-11-04Merge pull request #4688Riccardo Spagni1-3/+3
5a2e54a1 Fix prune using receive time as tx_weight (doy-lee)
2018-11-01tx_pool: speed up take_tx for transactions from blocksmoneromooo-monero1-1/+12
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-01tx_pool: remove unnecessary get_transaction_hashmoneromooo-monero1-4/+3
2018-11-01core: avoid unnecessary tx/blob conversionsmoneromooo-monero1-5/+7
2018-10-31tx_pool: allow take_tx to work without m_txs_by_fee_and_receive_timemoneromooo-monero1-3/+2
This should make it possible to have two daemons running on the same database again.
2018-10-23Fix prune using receive time as tx_weightdoy-lee1-3/+3
2018-10-18tx_pool: revert #4592 and move bin2hex conversion to on_get_transaction_poolstoffu1-1/+1
2018-10-15Merge pull request #4389Riccardo Spagni1-26/+25
6844ae1b tx_pool: avoid parsing a whole tx if only the prefix is needed (moneromooo-monero)
2018-10-15tx_pool: store hex string instead of raw binary to tx_blob of ↵stoffu1-1/+1
get_transaction_pool RPC Inspired by https://github.com/masari-project/masari/issues/93
2018-10-08tx_pool: avoid parsing a whole tx if only the prefix is neededmoneromooo-monero1-26/+25
2018-09-25tx_pool: fix tx removal at startup keeping referencesmoneromooo-monero1-0/+1
2018-09-13tx_pool: make the max tx size a consensus rule from v8moneromooo-monero1-1/+1
2018-09-11v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero1-78/+85
2018-09-04Merge pull request #4276luigi11111-7/+1
48a7bc4 tx_pool: fix infinite loop when failing to find a meta record (moneromooo-monero)
2018-08-19tx_pool: fix infinite loop when failing to find a meta recordmoneromooo-monero1-7/+1
2018-08-16core: cache block template where possiblemoneromooo-monero1-1/+21
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-5/+28
41b4bf9 tx_pool: cache check_tx_inputs results (moneromooo-monero)
2018-06-27Merge pull request #3716luigi11111-3/+11
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-monero1-3/+11
also use reserve where appropriate
2018-06-25Merge pull request #3936luigi11111-0/+2
d81e042 tx_pool: initialize bitflags padding since it gets written to storage (moneromooo-monero)
2018-06-24tx_pool: cache check_tx_inputs resultsmoneromooo-monero1-5/+28
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-05tx_pool: initialize bitflags padding since it gets written to storagemoneromooo-monero1-0/+2
Avoids valgrind reporting uninitialized data usage
2018-06-02tx_pool: hold off parsing a tx blob till we actually need itmoneromooo-monero1-11/+32
2018-05-28tx_pool: remove old comment from fill_block_template()stoffu1-4/+0
2018-04-11tx_pool: fix loading with colliding key imagesmoneromooo-monero1-17/+26
A key image may be present more than once if all but one of the txes spending that key image are coming from blocks. When loading a txpool from storage, we must load the one that's not from a block first to avoid rejection
2018-03-15Fix typos in various filesDimitris Apostolou1-2/+2
2018-02-16txpool: Don't bail out when blob_size == tx_size_limitLeon Klingele1-2/+2
Previously, when blob_size == tx_size_limit, the "m_too_big" property was set and the transaction was rejected. This should not have been the case.
2018-02-16Merge pull request #3210Riccardo Spagni1-1/+8
39992134 txpool: Properly bail out when outputs_amount == inputs_amount (Leon Klingele)
2018-02-07tx_pool: add a max pool size, settable with --max-txpool-sizemoneromooo-monero1-2/+80
2018-02-01txpool: Properly bail out when outputs_amount == inputs_amountLeon Klingele1-1/+8
Previously, when outputs_amount == inputs_amount, the "m_overspend" property was set, whereas "m_fee_too_low" would have been the correct property to set. This is unlikely to ever occur and just something I've noticed while reading through the code.
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2017-12-20Fix exceptions not finding txpool txes when relayingmoneromooo-monero1-8/+31
2017-11-14remove "using namespace std" from headersmoneromooo-monero1-0/+2
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
2017-11-14Merge pull request #2615Riccardo Spagni1-21/+41
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-21/+41
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/+47
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-25Merge pull request #2452Riccardo Spagni1-0/+1
0aaaca29 tx_pool: set the "invalid input" bit when check_tx_inputs fails (moneromooo-monero) 9236823b simplewallet: print tx rejection reason where it was missing (moneromooo-monero) 3dee3301 core_rpc_server: print tx rejection reason at L0 too (moneromooo-monero)
2017-09-25tx_pool: pre-init tvc.m_verifivation_failed before processingmoneromooo-monero1-3/+3
CID 175316
2017-09-25tx_pool: guard against failure getting tx hashmoneromooo-monero1-1/+2
Should be impossible in practice, but easy change CID 175282
2017-09-20tx_pool: drop invalid txes from the pool on startupmoneromooo-monero1-3/+23
instead of just failing This is a workaround for bad tx blobs being inserted in the pool for unknown reasons
2017-09-18Merge pull request #2023Riccardo Spagni1-1/+1
f761dbae Remove 1.25x multiplier from tx_pool (Nano Akron)
2017-09-18Merge pull request #2044Riccardo Spagni1-0/+59
0299cb77 Fix various oversights/bugs in ZMQ RPC server code (Thomas Winget) 77986023 json serialization for rpc-relevant monero types (Thomas Winget) 5c1e08fe Refactor some things into more composable (smaller) functions (Thomas Winget) 9ac2ad07 DRY refactoring (Thomas Winget)
2017-09-16tx_pool: set the "invalid input" bit when check_tx_inputs failsmoneromooo-monero1-0/+1
2017-09-14Remove 1.25x multiplier from tx_poolNano Akron1-1/+1
2017-09-05json serialization for rpc-relevant monero typesThomas Winget1-0/+59
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-09-04tx_pool: catch exceptions in LockedTXN dtormoneromooo-monero1-1/+1
This might prevent some calls to terminate when the LockedTXN dtor is called as part of stack unwinding caused by another exception in the first place.
2017-08-29tx_pool: wrap tx meta updates in a LockedTXNmoneromooo-monero1-0/+3
2017-08-27Merge pull request #2349Riccardo Spagni1-2/+20
1914c999 txpool: update db tx metadata when it changes (moneromooo) 4dbf29bd txpool: add tx size median to the pool stats (moneromooo)
2017-08-26rpc: add a new RPC to get current txpool backlog (sizes and fees)moneromooo-monero1-0/+11
2017-08-25txpool: update db tx metadata when it changesmoneromooo1-1/+15
2017-08-25txpool: add tx size median to the pool statsmoneromooo1-1/+5
2017-08-23tx_pool: fix crash in statsHoward Chu1-1/+1
if tx receive_time == now. supersedes #2322
2017-07-02tx_pool: initialize padding in txpool meta structuremoneromooo-monero1-0/+2
2017-06-18Merge pull request #2082Riccardo Spagni1-2/+1
235df7f4 blockchain_db: add a txpool tx getter which returns existence (moneromooo-monero)
2017-06-11blockchain_db: add a txpool tx getter which returns existencemoneromooo-monero1-2/+1
Avoids exception spam for the "nope, not found" case
2017-06-04Add histogram to poolstatsHoward Chu1-1/+47
2017-06-01Merge pull request #2062Riccardo Spagni1-0/+5
31417d57 tx_pool: add missing blockchain lock in add_tx (moneromooo-monero)
2017-06-01Speedup print_pool_statsHoward Chu1-0/+25
Since we're just counting txs, there's no reason to deserialize all the blobs.
2017-05-31tx_pool: add missing blockchain lock in add_txmoneromooo-monero1-0/+5
2017-05-30Merge pull request #1982Riccardo Spagni1-219/+349
b52abd13 Move txpool to the database (moneromooo-monero)
2017-05-25Move txpool to the databasemoneromooo-monero1-219/+349
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-04-04tx_pool: add blob size and fee/byte when logging a new txmoneromooo-monero1-1/+1
2017-03-23Merge pull request #1911Riccardo Spagni1-3/+19
91d41090 tx_pool: ensure txes loaded from poolstate.bin have their txid cached (moneromooo-monero) aaeb164c tx_pool: remove transactions if they're in the blockchain (moneromooo-monero) 558cfc31 core, wallet: faster tx pool scanning (moneromooo-monero) f065234b core: cache tx and block hashes in the respective classes (moneromooo-monero)
2017-03-23tx_pool: ensure txes loaded from poolstate.bin have their txid cachedmoneromooo-monero1-5/+6
The txid is not saved, and we want to make sure the transactions have their txid cached while in the pool, since get_transactions copies the transaction object, so any txid calculation on those copies would not benefit any later caller, since the original tx would be left without a cached txid.
2017-03-23tx_pool: remove transactions if they're in the blockchainmoneromooo-monero1-1/+9
When starting up, if the pool state was not saved, the pool might contain transactions which made it into the blockchain, so these need removing
2017-03-23core, wallet: faster tx pool scanningmoneromooo-monero1-0/+7
Includes a new RPC to get tx pool hashes fast.
2017-03-21tx_pool: silence use of uninitialized warningmoneromooo-monero1-1/+1
The result is not actually used when uninitialized
2017-03-20tx_pool: use new filling algorithm from v5 onlymoneromooo-monero1-20/+30
2017-03-15Add intervening v5 fork for increased min block sizemoneromooo-monero1-14/+7
Minimum mixin 4 and enforced ringct is moved from v5 to v6. v5 is now used for an increased minimum block size (from 60000 to 300000) to cater for larger typical/minimum transaction size. The fee algorithm is also changed to decrease the base per kB fee, and add a cheap tier for those transactions which we do not care if they get delayed (or even included in a block).
2017-03-03tx_pool: log separately "not ready" and "double spend" casesmoneromooo-monero1-2/+8
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-20tx_pool: revert template filling changesmoneromooo-monero1-0/+16
They are not ready yet
2017-02-12tx_pool: add a debug message when adding a tx to the poolmoneromooo-monero1-0/+1
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-2/+2
2017-02-02Merge pull request #1631Riccardo Spagni1-4/+8
58e82506 Blockfill - Sort tx pool correctly (Alexis Enston) 5f7a8741 Blockfill - Take TX fees into account properly (Alexis Enston) 4ecab0d8 Consider empty block when filling with TXs (Alexis Enston)
2017-01-25Blockfill - Sort tx pool correctlyAlexis Enston1-2/+2
2017-01-25Blockfill - Take TX fees into account properlyAlexis Enston1-1/+1
2017-01-25Consider empty block when filling with TXsAlexis Enston1-1/+5
2017-01-22Replace BOOST_FOREACH with C++11 ranged forMiguel Herranz1-4/+4
2017-01-16Change logging to easylogging++moneromooo-monero1-0/+3
This replaces the epee and data_loggers logging systems with a single one, and also adds filename:line and explicit severity levels. Categories may be defined, and logging severity set by category (or set of categories). epee style 0-4 log level maps to a sensible severity configuration. Log files now also rotate when reaching 100 MB. To select which logs to output, use the MONERO_LOGS environment variable, with a comma separated list of categories (globs are supported), with their requested severity level after a colon. If a log matches more than one such setting, the last one in the configuration string applies. A few examples: This one is (mostly) silent, only outputting fatal errors: MONERO_LOGS=*:FATAL This one is very verbose: MONERO_LOGS=*:TRACE This one is totally silent (logwise): MONERO_LOGS="" This one outputs all errors and warnings, except for the "verify" category, which prints just fatal errors (the verify category is used for logs about incoming transactions and blocks, and it is expected that some/many will fail to verify, hence we don't want the spam): MONERO_LOGS=*:WARNING,verify:FATAL Log levels are, in decreasing order of priority: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE Subcategories may be added using prefixes and globs. This example will output net.p2p logs at the TRACE level, but all other net* logs only at INFO: MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE Logs which are intended for the user (which Monero was using a lot through epee, but really isn't a nice way to go things) should use the "global" category. There are a few helper macros for using this category, eg: MGINFO("this shows up by default") or MGINFO_RED("this is red"), to try to keep a similar look and feel for now. Existing epee log macros still exist, and map to the new log levels, but since they're used as a "user facing" UI element as much as a logging system, they often don't map well to log severities (ie, a log level 0 log may be an error, or may be something we want the user to see, such as an important info). In those cases, I tried to use the new macros. In other cases, I left the existing macros in. When modifying logs, it is probably best to switch to the new macros with explicit levels. The --log-level options and set_log commands now also accept category settings, in addition to the epee style log levels.
2017-01-15Merge pull request #1571Riccardo Spagni1-6/+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-6/+10
Also print its value when printing pool
2017-01-13Prioritize older transactions in the mempoolMiguel Herranz1-15/+17
The transactions are first prioritized by fee and in case the fees are equal by receive_time.
2017-01-08Merge pull request #1534Riccardo Spagni1-15/+30
1607cb7e tx_pool: better block template filling algorithm (moneromooo-monero) 9731b4e5 rpc: add block size to GET_BLOCK_HEADER RPC (moneromooo-monero) 9188b346 rpc: add current block size to the getinfo call (moneromooo-monero)
2017-01-07tx_pool: better block template filling algorithmmoneromooo-monero1-15/+30
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-12-24tx_pool: fix uninitialized "last failed" fieldsmoneromooo-monero1-0/+2
2016-12-04Fix a few minor typosPierre Boyer1-1/+1
2016-10-31core: dynamic fee algorithm from ArticMinemoneromooo-monero1-5/+1
The fee will vary based on the base reward and the current block size limit: fee = (R/R0) * (M0/M) * F0 R: base reward R0: reference base reward (10 monero) M: block size limit M0: minimum block size limit (60000) F0: 0.002 monero Starts applying at v4
2016-10-23daemon: report transaction relay status in print_pool* commandsmoneromooo-monero1-0/+2
2016-10-22tx_pool: set relayed flag on relaymoneromooo-monero1-0/+3
2016-10-10Add performance timers for ringct tx verificationmoneromooo-monero1-0/+2
2016-10-04Brackets to prevent premature returnNanoAkron1-0/+2
2016-10-03Moved logging to target functions rather than callerNanoAkron1-4/+13
2016-08-28core: allow v1 txes after HF 5 when sweeping unmixable outputsmoneromooo-monero1-15/+0
2016-08-28rct: rework the verification preparation processmoneromooo-monero1-5/+5
The whole rct data apart from the MLSAGs is now included in the signed message, to avoid malleability issues. Instead of passing the data that's not serialized as extra parameters to the verification API, the transaction is modified to fill all that information. This means the transaction can not be const anymore, but it cleaner in other ways.
2016-08-28core: add some locking around pool usemoneromooo-monero1-0/+1
2016-08-28tx_pool: log why a transaction was rejected for version checksmoneromooo-monero1-0/+3
2016-08-28change fork settings to allow pre-rct txes for one more fork cyclemoneromooo-monero1-2/+7
2016-08-28Condition v2 txes on v3 hard forkmoneromooo-monero1-1/+3
2016-08-28add rct to the protocolmoneromooo-monero1-16/+38
It is not yet constrained to a fork, so don't use on the real network or you'll be orphaned or rejected.
2016-08-28remove original Cryptonote blockchain_storage blockchain formatmoneromooo-monero1-19/+0
2016-04-05tx_pool: ensure no txes that fail check_inputs get in the block templatemoneromooo-monero1-1/+1
2016-04-02Merge pull request #767Riccardo Spagni1-3/+15
24b3e90 Convey tx verification failure reasons to the RPC client (moneromooo-monero)
2016-03-30minor corrections/clarificationsThomas Winget1-3/+5
2016-03-27Convey tx verification failure reasons to the RPC clientmoneromooo-monero1-3/+15
This allows appropriate action to be taken, like displaying the reason to the user. Do just that in simplewallet, which should help a lot in determining why users fail to send. Also make it so a tx which is accepted but not relayed is seen as a success rather than a failure.
2016-03-24Transaction pool documentation (and some cleanup)Thomas Winget1-7/+23
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-29tx_pool: do not accept txes not in a block if they timed out beforemoneromooo-monero1-1/+10
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-29tx_pool: fix use of invalidated iteratormoneromooo-monero1-1/+2
2016-01-29Fix V1/V2 use of hard fork related parametersmoneromooo-monero1-15/+35
Some of it uses hardcoded height, which will need some thinking for next (voted upon) fork.
2015-12-31core: do not use the persistent pool state for testsmoneromooo-monero1-0/+6
Fixes intermittent test failures when the pool contains unexpected transactions that were brought in from the live pool.
2015-12-31updated copyright yearRiccardo Spagni1-1/+1
2015-12-15Replace tabs with two spaces for consistency with rest of codebasewarptangent1-12/+12
Remove trailing whitespace in same files.
2015-12-13tx_pool: fix "minumim" typo in messagemoneromooo-monero1-1/+1
2015-11-21Relay transactions when they linger too long in the poolmoneromooo-monero1-4/+55
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-10-11from hard fork 2, all outputs must be decomposedmoneromooo-monero1-0/+6
The wallet decomposes fully as of now too.
2015-07-15Removed on_idle() calls to Blockchain::store_blockchain() for lmdb.NoodleDoodleNoodleDoodleNoodleDoodleNoo1-6/+6
Added option to cache tx-input verification results.
2015-07-15Fixed binary size issue due to embedded checkpoint data.NoodleDoodleNoodleDoodleNoodleDoodleNoo1-6/+6
Fixed OSX compilation issues due to random lmdb resize points. Fixed infinite loop bug when calling core::get_block_template(..).
2015-07-15** CHANGES ARE EXPERIMENTAL (FOR TESTING ONLY)NoodleDoodleNoodleDoodleNoodleDoodleNoo1-3/+10
Bockchain: 1. Optim: Multi-thread long-hash computation when encountering groups of blocks. 2. Optim: Cache verified txs and return result from cache instead of re-checking whenever possible. 3. Optim: Preload output-keys when encoutering groups of blocks. Sort by amount and global-index before bulk querying database and multi-thread when possible. 4. Optim: Disable double spend check on block verification, double spend is already detected when trying to add blocks. 5. Optim: Multi-thread signature computation whenever possible. 6. Patch: Disable locking (recursive mutex) on called functions from check_tx_inputs which causes slowdowns (only seems to happen on ubuntu/VMs??? Reason: TBD) 7. Optim: Removed looped full-tx hash computation when retrieving transactions from pool (???). 8. Optim: Cache difficulty/timestamps (735 blocks) for next-difficulty calculations so that only 2 db reads per new block is needed when a new block arrives (instead of 1470 reads). Berkeley-DB: 1. Fix: 32-bit data errors causing wrong output global indices and failure to send blocks to peers (etc). 2. Fix: Unable to pop blocks on reorganize due to transaction errors. 3. Patch: Large number of transaction aborts when running multi-threaded bulk queries. 4. Patch: Insufficient locks error when running full sync. 5. Patch: Incorrect db stats when returning from an immediate exit from "pop block" operation. 6. Optim: Add bulk queries to get output global indices. 7. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3) 8. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key 9. Optim: Added thread-safe buffers used when multi-threading bulk queries. 10. Optim: Added support for nosync/write_nosync options for improved performance (*see --db-sync-mode option for details) 11. Mod: Added checkpoint thread and auto-remove-logs option. 12. *Now usable on 32-bit systems like RPI2. LMDB: 1. Optim: Added custom comparison for 256-bit key tables (minor speed-up, TBD: get actual effect) 2. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3) 3. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key 4. Optim: Added support for sync/writemap options for improved performance (*see --db-sync-mode option for details) 5. Mod: Auto resize to +1GB instead of multiplier x1.5 ETC: 1. Minor optimizations for slow-hash for ARM (RPI2). Incomplete. 2. Fix: 32-bit saturation bug when computing next difficulty on large blocks. [PENDING ISSUES] 1. Berkely db has a very slow "pop-block" operation. This is very noticeable on the RPI2 as it sometimes takes > 10 MINUTES to pop a block during reorganization. This does not happen very often however, most reorgs seem to take a few seconds but it possibly depends on the number of outputs present. TBD. 2. Berkeley db, possible bug "unable to allocate memory". TBD. [NEW OPTIONS] (*Currently all enabled for testing purposes) 1. --fast-block-sync arg=[0:1] (default: 1) a. 0 = Compute long hash per block (may take a while depending on CPU) b. 1 = Skip long-hash and verify blocks based on embedded known good block hashes (faster, minimal CPU dependence) 2. --db-sync-mode arg=[[safe|fast|fastest]:[sync|async]:[nblocks_per_sync]] (default: fastest:async:1000) a. safe = fdatasync/fsync (or equivalent) per stored block. Very slow, but safest option to protect against power-out/crash conditions. b. fast/fastest = Enables asynchronous fdatasync/fsync (or equivalent). Useful for battery operated devices or STABLE systems with UPS and/or systems with battery backed write cache/solid state cache. Fast - Write meta-data but defer data flush. Fastest - Defer meta-data and data flush. Sync - Flush data after nblocks_per_sync and wait. Async - Flush data after nblocks_per_sync but do not wait for the operation to finish. 3. --prep-blocks-threads arg=[n] (default: 4 or system max threads, whichever is lower) Max number of threads to use when computing long-hash in groups. 4. --show-time-stats arg=[0:1] (default: 1) Show benchmark related time stats. 5. --db-auto-remove-logs arg=[0:1] (default: 1) For berkeley-db only. Auto remove logs if enabled. **Note: lmdb and berkeley-db have changes to the tables and are not compatible with official git head version. At the moment, you need a full resync to use this optimized version. [PERFORMANCE COMPARISON] **Some figures are approximations only. Using a baseline machine of an i7-2600K+SSD+(with full pow computation): 1. The optimized lmdb/blockhain core can process blocks up to 585K for ~1.25 hours + download time, so it usually takes 2.5 hours to sync the full chain. 2. The current head with memory can process blocks up to 585K for ~4.2 hours + download time, so it usually takes 5.5 hours to sync the full chain. 3. The current head with lmdb can process blocks up to 585K for ~32 hours + download time and usually takes 36 hours to sync the full chain. Averate procesing times (with full pow computation): lmdb-optimized: 1. tx_ave = 2.5 ms / tx 2. block_ave = 5.87 ms / block memory-official-repo: 1. tx_ave = 8.85 ms / tx 2. block_ave = 19.68 ms / block lmdb-official-repo (0f4a036437fd41a5498ee5e74e2422ea6177aa3e) 1. tx_ave = 47.8 ms / tx 2. block_ave = 64.2 ms / block **Note: The following data denotes processing times only (does not include p2p download time) lmdb-optimized processing times (with full pow computation): 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 1.25 hours processing time (--db-sync-mode=fastest:async:1000). 2. Laptop, Dual-core / 4-threads U4200 (3Mb) - 4.90 hours processing time (--db-sync-mode=fastest:async:1000). 3. Embedded, Quad-core / 4-threads Z3735F (2x1Mb) - 12.0 hours processing time (--db-sync-mode=fastest:async:1000). lmdb-optimized processing times (with per-block-checkpoint) 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 10 minutes processing time (--db-sync-mode=fastest:async:1000). berkeley-db optimized processing times (with full pow computation) 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 1.8 hours processing time (--db-sync-mode=fastest:async:1000). 2. RPI2. Improved from estimated 3 months(???) into 2.5 days (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000). berkeley-db optimized processing times (with per-block-checkpoint) 1. RPI2. 12-15 hours (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).
2015-07-10Fix loop bug when calling core::get_block_template, causing calling thread ↵NoodleDoodleNoodleDoodleNoodleDoodleNoo1-0/+9
to lock up.
2015-05-13Fixes changes to sort tx by fee per kbThomas Winget1-11/+27
2015-05-13resolved merge conflict in tx_pool.cppRiccardo Spagni1-12/+33
2015-04-30Sort txs by per-kb-fee for minersThomas Winget1-7/+28
2015-04-30When removing 'stuck' transactions, don't ignore the first tx in the poolThomas Winget1-5/+5
2015-04-23Keep memory pool consistent when stuck tx removedwarptangent1-0/+1
When a stuck tx is removed from memory pool, first remove the associated spent key images.
2015-04-23Add mempool output to daemon via command and RPCwarptangent1-0/+34
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/+12
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-2/+2
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-11-11Disable legacy fees for nowiamsmooth1-1/+1
2014-11-09Remove DEFAULT_FEE, add temporary acceptance of too-small per-kb fee >= 0.1, ↵iamsmooth1-1/+1
denominations based on DEFAULT_DUST_THRESHOLD, document fee arg to create_transactions as unused, se DEFAULT_DUST_THRESHOLD for wallet dust collection instead of calcualted tx fee
2014-11-06per kb feesThomas Winget1-2/+5
2014-09-25Revert "low risk, potentially varint overflow bug patched thanks to BBR"Riccardo Spagni1-4/+5
This reverts commit 4e2b2b942daa4206ec44c66e59863670dfe3fde4.
2014-09-24low risk, potentially varint overflow bug patched thanks to BBRRiccardo Spagni1-5/+4
2014-09-09a few more error messages moved to log level 1fluffypony1-4/+4
2014-09-09moved non-critical warnings and errors to log level 1fluffypony1-6/+6
2014-08-01Merge pull request #64 from mikezackles/bytecoin_tx_pool_tmpRiccardo Spagni1-79/+65
tx pool fixes, courtesy of Bytecoin
2014-07-23License updated to BSD 3-clausefluffypony1-3/+29
2014-07-17Remove dead codeZachary Michaels1-17/+0
2014-07-17Remove second tx size checkZachary Michaels1-7/+0
2014-07-17Don't check max tx size when adding to blockZachary Michaels1-8/+0
This is now done when adding transactions to the pool.
2014-07-17Don't check for min fee when adding tx to blockZachary Michaels1-5/+0
This is now done when transactions enter the pool.
2014-07-17Decrease max block size from 200% median to 130%Zachary Michaels1-1/+3
2014-07-17Use print_money in logZachary Michaels1-1/+1
2014-07-17Minimum tx fee for entering poolZachary Michaels1-0/+8
2014-07-17Start fresh if tx_pool deserialize failsZachary Michaels1-2/+6
2014-07-17Add transaction size limitZachary Michaels1-0/+24
Transactions larger than the limit will not enter the pool
2014-07-17Use const where appropriate in tx_poolZachary Michaels1-38/+23
2014-06-26set max block size for gbtmydesktop1-0/+8
2014-06-24fix function typomonero-project1-1/+1
2014-06-24Fix copy/paste bug, thx Boolberrymonero-project1-3/+3
2014-06-15proper tx_pool handling from CryptoZoidberg / BBRfluffypony1-0/+26
2014-05-28typo in tx_pool.cppmonero-project1-1/+1
2014-05-27fix typing mismatchmydesktop1-2/+9
2014-05-26dynamic tx size scaling for tx mempoolmydesktop1-0/+11
2014-05-26maximum block size 130% of medianmydesktop1-3/+14
2014-05-25temporary fix for block reward dosmydesktop1-1/+23
2014-04-20mining bug fixedthankful_for_today1-45/+12
2014-04-02json rpc for wallet and bugfixAntonio Juarez1-15/+47
2014-03-03moved all stuff to githubAntonio Juarez1-0/+410