aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'performance' into masterHoward Chu2016-04-052-714/+558
|\
| * CleanupHoward Chu2016-04-052-21/+65
| | | | | | | | | | drop obsolete remove_output() fix get_output_key(global), fix crash in blockchain_dump
| * Cleanup and clarifyHoward Chu2016-04-052-115/+92
| | | | | | | | Try to rationalize the variable names, document usage.
| * Use cursors in some remove functionsHoward Chu2016-04-051-7/+33
| | | | | | | | Helps when they're called repeatedly in one txn
| * Use DUPFIXED for block_info and output_txsHoward Chu2016-04-052-56/+46
| | | | | | | | Saves another ~150MB or so on the full blockchain
| * More outputs consolidationHoward Chu2016-04-052-489/+261
| | | | | | | | | | | | | | | | Also bumped DB VERSION to 1 Another significant speedup and space savings: Get rid of global_output_indices, remove indirection from output to keys This is the change warptangent described on irc but never got to finish.
| * Use DUPFIXED for output_keysHoward Chu2016-04-051-23/+37
| | | | | | | | | | | | Saves another 90MB on 200000 block import. Had to bring back compare_uint64 for this, but it's safe since this table is always 64-bit aligned.
| * Use DUPFIXED for tx_indicesHoward Chu2016-04-051-50/+60
| | | | | | | | Small space savings, no measurable speedup
| * Use DUPFIXED for block_heightsHoward Chu2016-04-051-22/+29
| | | | | | | | Only a small savings...
| * Use DUPFIXED for spent_keysHoward Chu2016-04-051-23/+18
| |
| * Add back changes from revert.warptangent2016-04-051-19/+2
| | | | | | | | m_tx_outputs doesn't need to be changed, as it's no longer dup list.
| * Use MDB_APPEND mode with two tx subdbswarptangent2016-04-051-2/+2
| | | | | | | | This is possible on those using a tx index as a key.
| * Schema update: tx_indices - consolidate the tx subdbs from 5 to 3warptangent2016-04-052-75/+47
| |
| * Schema update: tx_indices - yet less indirectionwarptangent2016-04-052-16/+11
| |
| * Schema update: tx_indices - improve further with less indirectionwarptangent2016-04-052-17/+50
| |
| * Add batch warning for further reviewwarptangent2016-04-051-0/+4
| |
| * Schema update: tx_indiceswarptangent2016-04-052-32/+109
| |
| * Consolidated block infoHoward Chu2016-04-052-94/+62
| |
| * Update schema for "tx_outputs" to use array containing amount output indiceswarptangent2016-04-052-114/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This speeds up wallet refresh by directly retrieving a tx's amount output indices. It removes the indirection and walking the amount output duplicate list for every amount in each requested tx. "tx_outputs" is used by: Amount output indices are needed for wallet refresh. Global output indices are needed for removing a tx. Both amount output indices and global output indices are now stored in an array of 64-bit unsigned ints: tx_outputs[<tx_hash>] -> [ <a1_oi, a1_gi, a2_oi, a2_gi, ...> ] Previously it was: tx_outputs[<tx_hash>] -> duplicate list of <a1_gi, a2_gi, a3_gi, ...> The amount output list had to be walked for every amount in order to find each amount's output index, by comparing the amount's global output index with each one in the duplicate list until a match was found. See also d045dfa7ce0bf131681193c97560da26f9f37900
* | Detect map resize failuresHoward Chu2016-03-301-1/+3
| |
* | New RPC and daemon command to get output histogrammoneromooo-monero2016-03-262-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a list of existing output amounts along with the number of outputs of that amount in the blockchain. The daemon command takes: - no parameters: all outputs with at least 3 instances - one parameter: all outputs with at least that many instances - two parameters: all outputs within that many instances The default starts at 3 to avoid massive spamming of all dust outputs in the blockchain, and is the current minimum mixin requirement. An optional vector of amounts may be passed, to request histogram only for those outputs.
* | db_lmdb: include the error codes from lmdb api in error logsmoneromooo-monero2016-03-201-40/+47
| |
* | Reduce log noiseHoward Chu2016-03-191-2/+3
| |
* | Add destructor for readtxnsHoward Chu2016-03-162-10/+21
| | | | | | | | Only if we created the readtxn. Was missing cleanups from exceptions before.
* | Small cleanupsHoward Chu2016-03-151-24/+28
| | | | | | | | | | Only one return and TXN_POSTFIX_RDONLY() per function Only log rtxn_start if the rtxn wasn't already active
* | More for 92dd4ec6d6251b15954002e72a7c7faa5059a3abHoward Chu2016-03-151-22/+22
| | | | | | | | Make sure we stop the right txn too
* | Merge pull request #723Riccardo Spagni2016-03-142-21/+21
|\ \ | | | | | | | | | 2abdb2c avoid some val copies (Howard Chu)
| * | avoid some val copiesHoward Chu2016-03-142-21/+21
| | |
* | | Hack for read/write txn mixupHoward Chu2016-03-142-42/+31
|/ / | | | | | | | | save the thread ID of the writer thread so we don't try to use the writetxn from reader threads
* / More for bdec7cbHoward Chu2016-03-091-14/+14
|/ | | | More uses of db error helper
* Merge pull request #700Riccardo Spagni2016-03-051-33/+34
|\ | | | | | | | | | | bdec7cb BlockchainLMDB: Use DB error helper consistently (warptangent) c5932eb BlockchainLMDB: Add DB error to exception (warptangent) a49c355 Blockchain: Omit verbose time stats messages by default (warptangent)
| * BlockchainLMDB: Use DB error helper consistentlywarptangent2016-03-031-28/+27
| |
| * BlockchainLMDB: Add DB error to exceptionwarptangent2016-03-031-5/+7
| |
* | Merge pull request #698Riccardo Spagni2016-03-051-57/+14
|\ \ | | | | | | | | | ee7a8b8 Get rid of lmdb_cur (Howard Chu)
| * | Get rid of lmdb_curHoward Chu2016-03-031-57/+14
| |/ | | | | | | We don't need it now with per-txn cursors.
* / More for df239428c0f43e2664f2be273996a734ca12c686Howard Chu2016-03-031-0/+6
|/ | | | Let ARMv7 work again
* Make partial revert consistentwarptangent2016-03-011-1/+1
| | | | | | | If user-defined comparator is used, subdb shouldn't be opened with MDB_INTEGERKEY. TODO: Again, this will be added back with future schema updates.
* Revert part of 7db89ed2eee2ce31f039783323d665fe7c24d441warptangent2016-02-291-2/+14
| | | | | | For now, so existing databases work. TODO: add these back with future schema updates.
* BlockchainLMDB: Add height and db error to exceptionwarptangent2016-02-291-1/+1
|
* ARMv7: fix unaligned accessesHoward Chu2016-02-251-20/+15
| | | | And cleanup some key comparators
* read txn/cursor stuffHoward Chu2016-02-232-156/+317
| | | | Could wrap more later.
* Use MDB_PREV_MULTIPLEHoward Chu2016-02-171-11/+40
| | | | in get_global_output_indices
* Fixup after lmdb master resyncHoward Chu2016-02-171-6/+6
|
* Shutup about VERSION 0Howard Chu2016-02-171-1/+3
|
* Use cursor in get_output_keyHoward Chu2016-02-171-1/+2
|
* Use MDB_APPEND mode where possibleHoward Chu2016-02-171-5/+9
| | | | | | | | | When keys are contiguous and monotonically increasing, this gets denser page utilization (doesn't leave padding in page splits). Can't be used for keys that are inserted in random order (e.g. hashes) In total this only saves around 1.5% of space compared to original DB code. The previous patch accounted for 0.8% savings on its own; the blocks tables just aren't that big.
* Use cursors in write txnsHoward Chu2016-02-172-22/+100
| | | | | Saves a bit of seek overhead. LMDB frees them automatically in txn_(commit|abort) so they need no cleanup.
* Keep a running blocksize countHoward Chu2016-02-172-0/+15
| | | | | Used in batch size estimation, avoids rereading already processed blocks during import
* Win32 import batchsize tweaksHoward Chu2016-02-171-3/+6
| | | | | Reduce frequency of resizes: bump minimum increase from 128MB to 512MB Use a bigger safety margin at small batch sizes
* BlockchainLMDB: Deal with DB exceptions at block level with particularitywarptangent2016-02-131-2/+13
| | | | | | | | Add another DB error exception type to distinguish failed txn setup from general use of txn. This keeps the error handling flow the same as before the block-level txn setup changes that moved control up a layer to BlockchainDB.