aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #5256Riccardo Spagni2019-03-212-0/+70
|\ | | | | | | 4b21d38d blockchain: speed up getting N blocks weights/long term weights (moneromooo-monero)
| * blockchain: speed up getting N blocks weights/long term weightsmoneromooo-monero2019-03-082-0/+70
| |
* | Update 2019 copyrightbinaryFate2019-03-052-2/+2
|/
* Merge pull request #5119Riccardo Spagni2019-03-051-5/+5
|\ | | | | | | f024a10b db_lmdb: make mdb_block_info format conversion more future proof (moneromooo-monero)
| * db_lmdb: make mdb_block_info format conversion more future proofmoneromooo-monero2019-03-051-5/+5
| | | | | | | | | | If mdb_block_info changes again, the v2 to v3 conversion would convert to an incorrect format.
* | save some database calls when getting top block hash and heightmoneromooo-monero2019-03-052-2/+4
| |
* | Avoid repeated (de)serialization when syncingmoneromooo-monero2019-03-052-9/+10
| |
* | db: speedup block additionmoneromooo-monero2019-03-051-11/+16
|/ | | | by avoiding repeated (de)serialization
* Merge pull request #5081Riccardo Spagni2019-03-041-3/+3
|\ | | | | | | d78addcb db_lmdb: don't unnecessarily cast to double on the way to uint64_t (moneromooo-monero)
| * db_lmdb: don't unnecessarily cast to double on the way to uint64_tmoneromooo-monero2019-01-191-3/+3
| |
* | Merge pull request #5175Riccardo Spagni2019-03-041-0/+1
|\ \ | | | | | | | | | 85088d9f db_lmdb: fix missing mdb_dbi_close in migration (moneromooo-monero)
| * | db_lmdb: fix missing mdb_dbi_close in migrationmoneromooo-monero2019-02-211-0/+1
| | | | | | | | | | | | Fixed by hyc
* | | ArticMine's new block weight algorithmmoneromooo-monero2019-03-042-6/+214
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This curbs runaway growth while still allowing substantial spikes in block weight Original specification from ArticMine: here is the scaling proposal Define: LongTermBlockWeight Before fork: LongTermBlockWeight = BlockWeight At or after fork: LongTermBlockWeight = min(BlockWeight, 1.4*LongTermEffectiveMedianBlockWeight) Note: To avoid possible consensus issues over rounding the LongTermBlockWeight for a given block should be calculated to the nearest byte, and stored as a integer in the block itself. The stored LongTermBlockWeight is then used for future calculations of the LongTermEffectiveMedianBlockWeight and not recalculated each time. Define: LongTermEffectiveMedianBlockWeight LongTermEffectiveMedianBlockWeight = max(300000, MedianOverPrevious100000Blocks(LongTermBlockWeight)) Change Definition of EffectiveMedianBlockWeight From (current definition) EffectiveMedianBlockWeight = max(300000, MedianOverPrevious100Blocks(BlockWeight)) To (proposed definition) EffectiveMedianBlockWeight = min(max(300000, MedianOverPrevious100Blocks(BlockWeight)), 50*LongTermEffectiveMedianBlockWeight) Notes: 1) There are no other changes to the existing penalty formula, median calculation, fees etc. 2) There is the requirement to store the LongTermBlockWeight of a block unencrypted in the block itself. This is to avoid possible consensus issues over rounding and also to prevent the calculations from becoming unwieldy as we move away from the fork. 3) When the EffectiveMedianBlockWeight cap is reached it is still possible to mine blocks up to 2x the EffectiveMedianBlockWeight by paying the corresponding penalty. Note: the long term block weight is stored in the database, but not in the actual block itself, since it requires recalculating anyway for verification.
* / Pruningmoneromooo-monero2019-01-222-23/+405
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* blockchain_db: allow getting output keys without commitmentmoneromooo-monero2019-01-162-3/+4
| | | | | Since the commitment has to be calculated for non rct outputs, it slows down a lot unnecessarily if we don't need it
* Merge pull request #4984Riccardo Spagni2019-01-162-22/+28
|\ | | | | | | 008647d7 blockchain_db: speedup tx output gathering (moneromooo-monero)
| * blockchain_db: speedup tx output gatheringmoneromooo-monero2018-12-182-22/+28
| | | | | | | | We know all the data we'll want for getblocks.bin is contiguous
* | Make get_output_key method constmoneroexamples2019-01-072-4/+4
| | | | | | | | | | | | get_output_key method is commonly used when working with txs and their key images. Because the method is not const, passing blockchain object though const& or pointers to const is not possible in this context. This is especially problematic in external projects (e.g., projects in moneroexamples) that use monero C++ api to operate on the blockchain and txs. Thus, having get_output_key method will simplify moving blockchain object around through const references and pointers to const objects.
* | Merge pull request #4946luigi11112018-12-312-50/+8
|\ \ | |/ |/| | | | | | | | | | | | | 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)
| * db_lmdb: avoid pointless divisionmoneromooo-monero2018-12-051-1/+1
| |
| * db_lmdb: inline check_open, it's trivial and called everywheremoneromooo-monero2018-12-052-8/+7
| |
| * blockchain_db: remove a couple unused functionsmoneromooo-monero2018-12-052-41/+0
| |
* | Merge pull request #4901Riccardo Spagni2018-12-122-4/+68
|\ \ | |/ |/| | | | | a48f2dab blockchain_prune_known_spent_data: blackball file is now optional (moneromooo-monero) 17b45725 Outputs where all amounts are known spent can now be pruned (moneromooo-monero)
| * Outputs where all amounts are known spent can now be prunedmoneromooo-monero2018-11-272-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Only for pre rct for obvious reasons. Note: DO NOT use a known spent list which includes outputs which are not known spent. If the list includes any output that's just strongly thought to be spent, but not provably so, you risk finding yourself unable to sync past the point where that output is spent. I estimate only 200 MB saved on current mainnet though, unless the new blackballing rule unearths a good amount of large-amount-set extra spent outs.
* | Merge pull request #4872Riccardo Spagni2018-12-041-10/+6
|\ \ | | | | | | | | | fc99f177 lmdb: fix gcc 7.3.0 'implicit-fallthrough' warning (xiphon)
| * | lmdb: fix gcc 7.3.0 'implicit-fallthrough' warningxiphon2018-11-191-10/+6
| | |
* | | Merge pull request #4854Riccardo Spagni2018-12-041-2/+0
|\ \ \ | |_|/ |/| | | | | bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
| * | Removed a lot of unnecessary includesMartijn Otto2018-11-151-2/+0
| | |
* | | Merge pull request #4821Riccardo Spagni2018-11-262-6/+10
|\ \ \ | | | | | | | | | | | | fc98f7a0 rpc: speedup get_outs.bin (moneromooo-monero)
| * | | rpc: speedup get_outs.binmoneromooo-monero2018-11-262-6/+10
| | |/ | |/|
* | | Merge pull request #4830Riccardo Spagni2018-11-261-0/+9
|\ \ \ | |/ / |/| | | | | dffec258 db_lmdb: error out if the db needs migration in read only mode (moneromooo-monero)
| * | db_lmdb: error out if the db needs migration in read only modemoneromooo-monero2018-11-091-0/+9
| |/
* | Merge pull request #4769Riccardo Spagni2018-11-142-21/+26
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 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)
| * db_lmdb: slight speedup getting array data from the blockchainmoneromooo-monero2018-11-041-6/+8
| |
| * db_lmdb: save some string copies for readonly db keys/valuesmoneromooo-monero2018-11-011-11/+16
| |
| * core: avoid unnecessary tx/blob conversionsmoneromooo-monero2018-11-012-5/+3
| |
* | db_lmdb: log which output was not found in get_output_keymoneromooo-monero2018-11-021-1/+2
| |
* | Merge pull request #4664Riccardo Spagni2018-11-011-9/+23
|\ \ | | | | | | | | | 61304151 db_lmdb: use MDB_MULTIPLE_NEXT where possible for some speedup (moneromooo-monero)
| * | db_lmdb: use MDB_MULTIPLE_NEXT where possible for some speedupmoneromooo-monero2018-10-191-9/+23
| |/
* / Update db_lmdb.cppCactii12018-10-171-1/+1
|/
* Fix rtxn usage in BlockchainLMDB::get_estimated_batch_sizeHoward Chu2018-10-021-2/+2
| | | | | Should only stop the rtxn if we actually started it Fixes Coverity 184960
* Merge pull request #4459Riccardo Spagni2018-09-291-5/+16
| | | | | | | | | | | | | | | | | | | | | | | bcf3f6af fuzz_tests: catch unhandled exceptions (moneromooo-monero) 3ebd05d4 miner: restore stream flags after changing them (moneromooo-monero) a093092e levin_protocol_handler_async: do not propagate exception through dtor (moneromooo-monero) 1eebb82b net_helper: do not propagate exceptions through dtor (moneromooo-monero) fb6a3630 miner: do not propagate exceptions through dtor (moneromooo-monero) 2e2139ff epee: do not propagate exception through dtor (moneromooo-monero) 0749a8bd db_lmdb: do not propagate exceptions in dtor (moneromooo-monero) 1b0afeeb wallet_rpc_server: exit cleanly on unhandled exceptions (moneromooo-monero) 418a9936 unit_tests: catch unhandled exceptions (moneromooo-monero) ea7f9543 threadpool: do not propagate exceptions through the dtor (moneromooo-monero) 6e855422 gen_multisig: nice exit on unhandled exception (moneromooo-monero) 53df2deb db_lmdb: catch error in mdb_stat calls during migration (moneromooo-monero) e67016dd blockchain_blackball: catch failure to commit db transaction (moneromooo-monero) 661439f4 mlog: don't remove old logs if we failed to rename the current file (moneromooo-monero) 5fdcda50 easylogging++: test for NULL before dereference (moneromooo-monero) 7ece1550 performance_test: fix bad last argument calling add_arg (moneromooo-monero) a085da32 unit_tests: add check for page size > 0 before dividing (moneromooo-monero) d8b1ec8b unit_tests: use std::shared_ptr to shut coverity up about leaks (moneromooo-monero) 02563bf4 simplewallet: top level exception catcher to print nicer messages (moneromooo-monero) c57a65b2 blockchain_blackball: fix shift range for 32 bit archs (moneromooo-monero)
* Merge pull request #4445Riccardo Spagni2018-09-291-2/+12
| | | | fe125647 Fixup RENAME_DB() macro (Howard Chu)
* db_lmdb: do not use base for cumulative distributionmoneromooo-monero2018-09-121-0/+2
| | | | it's confusing and needlessly complicated
* v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero2018-09-112-17/+22
|
* Merge pull request #4293luigi11112018-09-101-2/+6
|\ | | | | | | 9d65399 is_hdd update (p8p)
| * is_hdd updatep8p2018-08-251-2/+6
| |
* | Merge pull request #4256luigi11112018-09-102-7/+3
|\ \ | | | | | | | | | d6fc870 db_lmdb: resize blockchain database when 90% filled (moneromooo-monero)
| * | db_lmdb: resize blockchain database when 90% filledmoneromooo-monero2018-08-142-7/+3
| | | | | | | | | | | | instead of a random ratio from 60% to 90%.
* | | Merge pull request #4270luigi11112018-09-041-2/+13
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | 29dea03 epee: resize vectors where possible in serialization (moneromooo-monero) 76affd9 epee: some speedup in parsing (moneromooo-monero) dc6c069 db_lmdb: speedup the get_output_distribution common case (moneromooo-monero) 76ac5a8 wallet2: ask for a binary output distribution, for speed (moneromooo-monero)