aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #6157Alexander Blair2020-01-241-1/+9
|\ \ | | | | | | | | | 402dd207 db_lmdb: guard against non NUL terminated keys (moneromooo-monero)
| * | db_lmdb: guard against non NUL terminated keysmoneromooo-monero2019-11-191-1/+9
| |/
* | Change to Tx diffusion (Dandelion++ fluff) instead of floodingLee Clagett2019-11-042-4/+4
| |
* | Adding support for hidden (anonymity) txpoolLee Clagett2019-11-025-30/+171
|/
* db_lmdb: an empty prunable data record means the tx is not prunedmoneromooo-monero2019-10-171-2/+0
| | | | as opposed to an absent record
* Merge pull request #5915luigi11112019-10-082-3/+6
|\ | | | | | | 8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
| * monerod can now sync from pruned blocksmoneromooo-monero2019-09-272-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #5878luigi11112019-09-246-2852/+3
|\ \ | |/ |/| | | f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
| * Removed Berkeley DB and db switching logicJesus Ramirez2019-09-166-2852/+3
| |
* | db_lmdb: print percentages as percentages, not ratiosmoneromooo-monero2019-09-041-1/+1
|/
* Increase max_dbs from 20 to 32Howard Chu2019-08-181-1/+1
| | | | | We've added a lot of new indices recently, and 20 isn't enough for them plus new DBs opened during format migrations.
* Merge pull request #5524luigi11112019-07-244-1/+239
|\ | | | | | | 06b8f29 blockchain: keep alternative blocks in LMDB (moneromooo-monero)
| * blockchain: keep alternative blocks in LMDBmoneromooo-monero2019-05-084-1/+239
| | | | | | | | | | Alternative blocks are cleared on startup unless --keep-alt-blocks is passed on the command line
* | Merge pull request #5502luigi11112019-07-241-1/+1
|\ \ | | | | | | | | | | | | 25a7cfd add a few checks where it seems appropriate (moneromooo-monero) 1a66a86 remove unused code (moneromooo-monero)
| * | add a few checks where it seems appropriatemoneromooo-monero2019-04-291-1/+1
| |/
* | db_lmdb: commit pruning txn at checkpointsmoneromooo-monero2019-06-151-1/+50
| | | | | | | | to avoid errors when the txn is too large
* | ensure no NULL is passed to memcpymoneromooo-monero2019-06-141-2/+2
| | | | | | | | | | NULL is valid when size is 0, but memcpy uses nonnull attributes, so let's not poke the bear
* | core: do not commit half constructed batch db txnmoneromooo-monero2019-05-252-0/+16
| |
* | fix wide difficulty conversion with some versions of boostmoneromooo-monero2019-05-011-2/+2
|/
* testdb: add override keyword where missingstoffu2019-04-173-132/+100
| | | | and delete obsolete BlockchainBDB::get_tx_output_indices along the way
* blockchain_db: fix db txn ending too earlymoneromooo-monero2019-04-145-58/+98
| | | | | | | | | | The db txn in add_block ending caused the entire overarching batch txn to stop. Also add a new guard class so a db txn can be stopped in the face of exceptions. Also use a read only db txn in init when the db itself is read only, and do not save the max tx size in that case.
* cryptonote: rework block blob size sanity checkmoneromooo-monero2019-04-054-0/+72
| | | | | Use the actual block weight limit, assuming that weight is always greater or equal to size
* Make difficulty 128 bit instead of 64 bitmoneromooo-monero2019-03-242-7/+155
| | | | | | Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
* Merge pull request #5256Riccardo Spagni2019-03-214-0/+94
|\ | | | | | | 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-084-0/+94
| |
* | Update 2019 copyrightbinaryFate2019-03-059-9/+9
|/
* 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-054-4/+8
| |
* | Avoid repeated (de)serialization when syncingmoneromooo-monero2019-03-055-22/+27
| |
* | 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-045-8/+384
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-224-25/+491
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-163-4/+5
| | | | | 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-163-23/+30
|\ | | | | | | 008647d7 blockchain_db: speedup tx output gathering (moneromooo-monero)
| * blockchain_db: speedup tx output gatheringmoneromooo-monero2018-12-183-23/+30
| | | | | | | | We know all the data we'll want for getblocks.bin is contiguous
* | Make get_output_key method constmoneroexamples2019-01-074-8/+8
| | | | | | | | | | | | 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-315-96/+13
|\ \ | |/ |/| | | | | | | | | | | | | 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: allocate known size vector only oncemoneromooo-monero2018-12-051-5/+5
| |
| * blockchain_db: remove a couple unused functionsmoneromooo-monero2018-12-054-82/+0
| |
* | Merge pull request #4901Riccardo Spagni2018-12-123-4/+75
|\ \ | |/ |/| | | | | 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-273-4/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | |