aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.h
Commit message (Collapse)AuthorAgeFilesLines
* persist asset outputs and spent key imagescenobite pinhead7 hours1-0/+11
|
* persist experimental asset registry in LMDBcenobite pinhead8 hours1-0/+10
|
* Revert "db_lmdb: test for mmap support at init time"Howard Chu2022-06-031-1/+0
| | | | | | This reverts commit bd96536637724413173271e8d5df1777f7879c29. The check interferes with raw device/partition support.
* Copyright: Update to 2022mj-xmr2022-03-041-1/+1
|
* LMDB: fix deadlock in resized detectionHoward Chu2021-09-221-0/+1
|
* rpc: limit the number of txes for get_blocks.binmoneromooo-monero2020-12-291-1/+1
|
* Avoid some temporary strings when reading off the databasemoneromooo-monero2020-08-171-5/+5
|
* Merge pull request #6536Alexander Blair2020-07-191-0/+1
|\ | | | | | | bd9653663 db_lmdb: test for mmap support at init time (moneromooo-monero)
| * db_lmdb: test for mmap support at init timemoneromooo-monero2020-05-161-0/+1
| | | | | | | | | | It'll make it clearer when a DB init failure is due to being on a filesystem which does not support mmap
* | Merge pull request #6534Alexander Blair2020-07-191-0/+2
|\ \ | | | | | | | | | 7bd66b01b daemon: guard against rare 'difficulty drift' bug with checkpoints and recalculation (stoffu)
| * | daemon: guard against rare 'difficulty drift' bug with checkpoints and ↵stoffu2020-06-091-0/+2
| |/ | | | | | | | | | | recalculation On startup, it checks against the difficulty checkpoints, and if any mismatch is found, recalculates all the blocks with wrong difficulties. Additionally, once a week it recalculates difficulties of blocks after the last difficulty checkpoint.
* / Update copyright year to 2020SomaticFanatic2020-05-061-1/+1
|/ | | | Update copyright year to 2020
* blockchain_db: faster fetching of consecutive txesmoneromooo-monero2020-02-271-0/+1
| | | | Useful for wallet refresh or node sync
* Merge pull request #6140Alexander Blair2020-01-251-0/+1
|\ | | | | | | 08635a08 blockchain: speedup fetching pruned contiguous tx blobs (moneromooo-monero)
| * blockchain: speedup fetching pruned contiguous tx blobsmoneromooo-monero2019-11-151-0/+1
| | | | | | | | About twice as fast, very roughly
* | Adding support for hidden (anonymity) txpoolLee Clagett2019-11-021-5/+5
|/
* blockchain: keep alternative blocks in LMDBmoneromooo-monero2019-05-081-0/+13
| | | | | Alternative blocks are cleared on startup unless --keep-alt-blocks is passed on the command line
* blockchain_db: fix db txn ending too earlymoneromooo-monero2019-04-141-4/+7
| | | | | | | | | | 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-051-0/+3
| | | | | 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-241-0/+3
| | | | | | Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
* Merge pull request #5256Riccardo Spagni2019-03-211-0/+6
|\ | | | | | | 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-081-0/+6
| |
* | Update 2019 copyrightbinaryFate2019-03-051-1/+1
|/
* save some database calls when getting top block hash and heightmoneromooo-monero2019-03-051-1/+1
|
* Avoid repeated (de)serialization when syncingmoneromooo-monero2019-03-051-3/+3
|
* ArticMine's new block weight algorithmmoneromooo-monero2019-03-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-221-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-161-1/+1
| | | | | 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-161-1/+1
|\ | | | | | | 008647d7 blockchain_db: speedup tx output gathering (moneromooo-monero)
| * blockchain_db: speedup tx output gatheringmoneromooo-monero2018-12-181-1/+1
| | | | | | | | We know all the data we'll want for getblocks.bin is contiguous
* | Make get_output_key method constmoneroexamples2019-01-071-2/+2
| | | | | | | | | | | | 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-311-19/+1
|\ \ | |/ |/| | | | | | | | | | | | | 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: inline check_open, it's trivial and called everywheremoneromooo-monero2018-12-051-1/+1
| |
| * blockchain_db: remove a couple unused functionsmoneromooo-monero2018-12-051-18/+0
| |
* | Outputs where all amounts are known spent can now be prunedmoneromooo-monero2018-11-271-0/+2
|/ | | | | | | | | | | | | | 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.
* rpc: speedup get_outs.binmoneromooo-monero2018-11-261-1/+1
|
* core: avoid unnecessary tx/blob conversionsmoneromooo-monero2018-11-011-1/+1
|
* v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero2018-09-111-3/+3
|
* Merge pull request #4256luigi11112018-09-101-1/+1
|\ | | | | | | d6fc870 db_lmdb: resize blockchain database when 90% filled (moneromooo-monero)
| * db_lmdb: resize blockchain database when 90% filledmoneromooo-monero2018-08-141-1/+1
| | | | | | | | instead of a random ratio from 60% to 90%.
* | blockchain_db: remove unused get_output_key variantmoneromooo-monero2018-07-301-1/+0
|/ | | | It was actually incorrect, as it would not return commitment
* Merge pull request #4013luigi11112018-07-191-0/+2
|\ | | | | | | e5592c4 rpc: add blockchain disk size to getinfo (moneromooo-monero)
| * rpc: add blockchain disk size to getinfomoneromooo-monero2018-06-201-0/+2
| | | | | | | | | | This should help new nodes predict how much disk space will be needed for a full sync
* | Merge pull request #3981luigi11112018-07-191-0/+6
|\ \ | | | | | | | | | 45e419b db: store cumulative rct output distribution in the db for speed (moneromooo-monero)
| * | db: store cumulative rct output distribution in the db for speedmoneromooo-monero2018-07-131-0/+6
| |/ | | | | | | | | | | | | | | | | This gets rid of the temporary precalc cache. Also make the RPC able to send data back in binary or JSON, since there can be a lot of data This bumps the LMDB database format to v3, with migration.
* | add --regtest and --fixed-difficulty for regression testingvictorsintnicolaas2018-06-291-0/+2
| | | | | | | | | | | | | | on_generateblocks RPC call combines functionality from the on_getblocktemplate and on_submitblock RPC calls to allow rapid block creation. Difficulty is set permanently to 1 for regtest. Makes use of FAKECHAIN network type, but takes hard fork heights from mainchain Default reserve_size in generate_blocks RPC call is now 1. If it is 0, the following error occurs 'Failed to calculate offset for'. Queries hard fork heights info of other network types
* | db_lmdb: enable batch transactions by defaultstoffu2018-06-141-1/+1
|/
* db_lmdb: save pruned and prunable tx data separatelymoneromooo-monero2018-05-231-2/+19
| | | | This bumps DB version to 2, migration code will run for v1 DBs
* speed up get_output_distribution (and precalc common case)moneromooo-monero2018-05-211-0/+2
|
* speedup get_output_histogram for all amounts when min_count > 0moneromooo-monero2018-04-231-1/+2
| | | | | | This skips the vast majority of "dust" output amounts with just one instance on the chain. Clocks in at 0.15% of the original time on testnet.