aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-10-18Allow setting start block on exportHoward Chu4-34/+69
And make import honor the starting block# recorded in a bootstrap file
2020-08-17replace most boost serialization with existing monero serializationmoneromooo-monero1-2/+0
This reduces the attack surface for data that can come from malicious sources (exported output and key images, multisig transactions...) since the monero serialization is already exposed to the outside, and the boost lib we were using had a few known crashers. For interoperability, a new load-deprecated-formats wallet setting is added (off by default). This allows loading boost format data if there is no alternative. It will likely go at some point, along with the ability to load those. Notably, the peer lists file still uses the boost serialization code, as the data it stores is define in epee, while the new serialization code is in monero, and migrating it was fairly hairy. Since this file is local and not obtained from anyone else, the marginal risk is minimal, but it could be migrated later if needed. Some tests and tools also do, this will stay as is for now.
2020-08-03Tweak format, add option for difficultyHoward Chu1-11/+36
Set input, output, ringsize averages to 2 decimal places precision Add option to show min/max/av per-block difficulty
2020-08-01Add options to print daily coin emission and feesHoward Chu1-0/+32
Closes #6735
2020-08-01Don't forget size of prunable txn partHoward Chu1-0/+2
Fixes #6732
2020-07-19Merge pull request #6512Alexander Blair16-16/+16
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-05-31Fix boost <1.60 compilation and fix boost 1.73+ warningsLee Clagett2-2/+0
2020-05-06Update copyright year to 2020SomaticFanatic16-16/+16
Update copyright year to 2020
2020-02-06Merge pull request #6094Alexander Blair1-2/+2
236d2a88 blockchain_stats: make it work on pruned blockchains (moneromooo-monero)
2019-11-04blockchain_stats: make it work on pruned blockchainsmoneromooo-monero1-2/+2
It reports the actual size as pruned, however
2019-11-02Adding support for hidden (anonymity) txpoolLee Clagett1-1/+1
2019-10-17utils: Increase max block size for import/exportNathan Dorfman1-1/+1
2019-10-08Merge pull request #5915luigi11113-11/+23
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero3-11/+23
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-09-24Merge pull request #5878luigi11119-236/+26
f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
2019-09-24Merge pull request #5877luigi11111-1/+1
2cd4fd8 Changed the use of boost:value_initialized for C++ list initializer (JesusRami) 4ad191f Removed unused boost/value_init header (whyamiroot) 928f4be Make null hash constants constexpr (whyamiroot)
2019-09-16Removed Berkeley DB and db switching logicJesus Ramirez9-236/+26
2019-09-02Changed the use of boost:value_initialized for C++ list initializerJesus Ramirez1-1/+1
2019-08-22blockchain_blackball: use is_output_spent instead of ringdb.blackballed for ↵stoffu1-1/+11
spentness test
2019-08-22blockchain_blackball: add --historical-stat which prints historical stats of ↵stoffu1-2/+165
spent ratio
2019-07-24Merge pull request #5574luigi11111-1/+1
162c3e1 blockchain_export: allow exporting blocks.dat format from pruned (moneromooo-monero)
2019-07-24Merge pull request #5502luigi11111-0/+1
25a7cfd add a few checks where it seems appropriate (moneromooo-monero) 1a66a86 remove unused code (moneromooo-monero)
2019-05-24blockchain_export: allow exporting blocks.dat format from prunedmoneromooo-monero1-1/+1
We don't need any of the pruned data for this
2019-05-12Made code block usage consistent across all .md filesRohaq1-1/+1
2019-04-29add a few checks where it seems appropriatemoneromooo-monero1-0/+1
2019-04-16Merge pull request #5406Riccardo Spagni1-1/+5
bea1918a blockchain_import: error out if preparing to handle blocks fails (moneromooo-monero)
2019-04-11Merge pull request #5380Riccardo Spagni1-1/+1
113e4877 blockchain_stats: fix sign in formatting function (moneromooo-monero) adaea3ea various: remove unused variables (moneromooo-monero) 631ef00e blockchain: some debug info when adding txes-from-block fails (moneromooo-monero)
2019-04-11Merge pull request #5378Riccardo Spagni1-18/+0
eda2661a Allow pruning before v10 (moneromooo-monero)
2019-04-07blockchain_import: error out if preparing to handle blocks failsmoneromooo-monero1-1/+5
Coverity 197562
2019-04-01blockchain_stats: fix sign in formatting functionmoneromooo-monero1-1/+1
2019-04-01Allow pruning before v10moneromooo-monero1-18/+0
This check is now not needed anymore, and would prevent people from using --prune-blockchain when starting a new sync
2019-03-24Make difficulty 128 bit instead of 64 bitmoneromooo-monero4-9/+46
Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-05Update 2019 copyrightbinaryFate16-16/+16
2019-03-05core: avoid double parsing blocks after hohmoneromooo-monero1-2/+10
2019-03-05Avoid repeated (de)serialization when syncingmoneromooo-monero1-3/+3
2019-03-04Merge pull request #5108Riccardo Spagni1-0/+18
1c9d5285 blockchain_prune: don't prune before v10 (moneromooo-monero)
2019-03-04ArticMine's new block weight algorithmmoneromooo-monero1-1/+2
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.
2019-01-30blockchain_prune: don't prune before v10moneromooo-monero1-0/+18
This uses system time since it doesn't see the p2p network, so is not 100% accurate
2019-01-22Pruningmoneromooo-monero3-0/+702
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.
2019-01-16blockchain_ancestry: allow getting ancestry of a single outputmoneromooo-monero1-229/+209
This involved a reorg of the code, to factor and speedup some bits, as well as using the cache for all modes, and making both modes usable in the same run.
2018-12-22blockchain_blackball: make log file name consistent with executablestoffu1-1/+1
2018-12-12Merge pull request #4901Riccardo Spagni2-0/+338
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)
2018-12-12Merge pull request #4899Riccardo Spagni1-1/+95
2be31b4c blockchain_blackball: spot when all outputs of an amount are spent (moneromooo-monero)
2018-12-04Merge pull request #4894Riccardo Spagni1-1/+1
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero) 1a0733e5 windows_service: fix memory leak (moneromooo-monero) 0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero) 5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero) d4f50cb1 remove some unused code (moneromooo-monero) 61163971 a few minor (but easy) performance tweaks (moneromooo-monero) 30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
2018-11-27blockchain_prune_known_spent_data: blackball file is now optionalmoneromooo-monero1-7/+44
If not present, the tool will scan the blockchain, since scanning for this is fairly fast.
2018-11-27Outputs where all amounts are known spent can now be prunedmoneromooo-monero2-0/+301
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.
2018-11-24blockchain_blackball: spot when all outputs of an amount are spentmoneromooo-monero1-1/+95
2018-11-23remove some unused codemoneromooo-monero1-1/+1
Found by codacy.com
2018-11-21blockchain_stats: don't use gmtime_r on Windowsmoneromooo-monero1-1/+1
In some cases, it doesn't like it (I don't know the details). Factor into a new epee function
2018-11-06Merge pull request #4742Riccardo Spagni2-4/+4
0a95cdaa blockchain_utilities: fix logs and cout output colliding (moneromooo-monero)
2018-11-04Merge pull request #4694Riccardo Spagni2-0/+365
a43daebf Add stats utility (Howard Chu)
2018-11-04Merge pull request #4692Riccardo Spagni2-10/+5
cb4aafd2 blockchain_utilities: simplify getting block blob from height (moneromooo-monero)
2018-10-27blockchain_utilities: fix logs and cout output collidingmoneromooo-monero2-4/+4
2018-10-26Merge pull request #4536Riccardo Spagni2-18/+10
fd62b6e7 blocks: use auto-generated .c files instead of 'LD -r -b binary' (xiphon)
2018-10-23Add stats utilityHoward Chu2-0/+365
Report statistics from a blockchain DB
2018-10-22blockchain_utilities: simplify getting block blob from heightmoneromooo-monero2-10/+5
2018-10-22blocks: use auto-generated .c files instead of 'LD -r -b binary'xiphon2-18/+10
2018-10-18Rename "blackball" for claritymoneromooo-monero2-13/+13
Apparently some people seem to think it's a censorship list...
2018-10-08Merge pull request #4530Riccardo Spagni1-1/+1
77471e23 blockchain_blackball: fix stray ! (moneromooo-monero)
2018-10-08Revert "Merge pull request #4472"Riccardo Spagni2-10/+18
This reverts commit 79d46c4d551a9b1261801960095bf4d24967211a, reversing changes made to c9fc61dbb56cca442c775faa2554a7460879b637.
2018-10-08blockchain_blackball: fix stray !moneromooo-monero1-1/+1
2018-10-08blockchain_blackball: fix stats double countingmoneromooo-monero1-15/+18
2018-10-04blocks: use auto-generated .c files instead of 'LD -r -b binary'xiphon2-18/+10
2018-10-02Merge pull request #4470Riccardo Spagni1-0/+2
2fbf38ee Fix 32bit depends builds (TheCharlatan) 17142ec9 malloc scratchpad for all supported android archs (m2049r) 6a781408 Make depends use self built clang for darwin (TheCharlatan) 69da14e1 fixes make debug compilation on OSX (Dusan Klinec) fe125647 Fixup RENAME_DB() macro (Howard Chu) b2972927 osx compilation fix: missing boost libs added (Dusan Klinec) 174f31bf simplewallet: don't complain about payment id on pool mined blocks (moneromooo-monero) 89288863 README: mention ASAN usage alongside valgrind (moneromooo-monero) 83debef9 wallet_rpc_server: remove verbose field in incoming_transfers query (moneromooo-monero) a69271fa Fixed a typo (Piotr Kąkol) 92d1da28 unit_tests: fix build with GCC 5.4.0 on ubuntu (moneromooo-monero) a21da905 Wallet: use unique_ptr for WalletImpl members (oneiric) 7a056f44 WalletAPI: multisigSignData bug fixed (naughtyfox) 43a06350 ringdb: use cursors to be a bit faster (moneromooo-monero) 7964d4f8 wallet2: handle corner case in picking fake outputs (moneromooo-monero) 6f5360b3 bump version to 0.13.0.1 (Riccardo Spagni) cf470bf3 switch from master to rc (Riccardo Spagni)
2018-09-29Merge pull request #4459Riccardo Spagni1-3/+5
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)
2018-09-29Fix 32bit depends buildsTheCharlatan1-0/+2
Add architecture flags when cmake invokes gcc manually. Add 32bit to Travis.
2018-09-18Merge pull request #3430Riccardo Spagni1-1/+3
42397359 Fixup 32bit arm build (TheCharlatan) a06d2581 Fix Windows build (TheCharlatan) ecaf5b3f Add libsodium to the packages, the arm build was complaining about it. (TheCharlatan) cbbf4d24 Adapt translations to upstream changes (TheCharlatan) db571546 Updated pcsc url (TheCharlatan) f0ba19fd Add lrelease to the depends (TheCharlatan) cfb30462 Add Miniupnp submodule (TheCharlatan) 5f7da005 Unbound is now a submodule. Adapt depends for this. (TheCharlatan) d6b9bdd3 Update readmes to reflect the usage of depends (TheCharlatan) 56b6e41e Add support for apple and arm building (TheCharlatan) 29311fd1 Disable stack unwinding for mingw32 depends build. (TheCharlatan) 8db3d573 Modify depends for monero's dependencies (TheCharlatan) 0806a23a Initial depends addition (TheCharlatan)
2018-09-14blockchain_blackball: s/return false;/return 0;/moneromooo-monero1-1/+1
2018-09-14blockchain_blackball: use %zu for size_tmoneromooo-monero1-2/+2
2018-09-14blockchain_blackball: use mdb_size_t where appropriatemoneromooo-monero1-1/+1
2018-09-14blockchain_blackball: error out on fgets errormoneromooo-monero1-1/+5
2018-09-14Merge pull request #4260Riccardo Spagni1-209/+1103
a54dbaee blockchain_blackball: add --force-chain-reaction-pass flag (moneromooo-monero) 44439c32 record blackballs as amount/offset, and add export ability (moneromooo-monero) 4bce935b blockchain_blackball: more optimizations (moneromooo-monero) b66ba783 blockchain_blackball: do not process duplicate blockchains parts (moneromooo-monero) 639a3c01 blockchain_blackball: make it clear secondary passes are not incremental (moneromooo-monero) eb8a51be blockchain_blackball: detect spent outputs by partial ring reuse (moneromooo-monero) d6d276c6 blockchain_blackball: fix chain reaction phase in incremental mode (moneromooo-monero) 2b2a681b blockchain_blackball: avoid false positives for different amounts (moneromooo-monero) 80e4fef3 blockchain_blackball: set transaction looping txn to read only (moneromooo-monero) 4801d6b5 blockchain_blackball: add stats (moneromooo-monero) 846190fd blockchain_blackball: support pre-v2 databases (moneromooo-monero) daa6cc7d blockchain_blackball: use LMDB for the cache (moneromooo-monero) 50cb370d ringdb: allow blackballing many outputs at once (moneromooo-monero)
2018-09-14Merge pull request #4147Riccardo Spagni3-0/+1187
a4d2d842 blockchain_depth: add average min depth (moneromooo-monero) 289880d8 blockchain_depth: get the average min depth of a set of txes (moneromooo-monero) 628428a0 blockchain_ancestry: faster and uses less memory (moneromooo-monero) 2382484d blockchain_ancestry: add an incremental mode (moneromooo-monero) 888324fa blockchain_ancestry: finds all ancestors of a tx, block, or chain (moneromooo-monero)
2018-09-11v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero3-7/+7
2018-09-10Add support for apple and arm buildingTheCharlatan1-1/+3
Add pcsc-lite to linux builds Fixup windows icu4c linking with depends, the static libraries have an 's' appended to them Compiling depends arm-linux-gnueabihf will allow you to compile armv6zk monero binaries
2018-09-10blockchain_blackball: add --force-chain-reaction-pass flagmoneromooo-monero1-1/+4
2018-09-10record blackballs as amount/offset, and add export abilitymoneromooo-monero1-42/+199
2018-09-09blockchain_blackball: more optimizationsmoneromooo-monero1-45/+86
2018-09-09blockchain_blackball: do not process duplicate blockchains partsmoneromooo-monero1-0/+76
2018-09-09blockchain_blackball: make it clear secondary passes are not incrementalmoneromooo-monero1-1/+12
yet
2018-09-09blockchain_blackball: detect spent outputs by partial ring reusemoneromooo-monero1-0/+35
2018-09-09blockchain_blackball: fix chain reaction phase in incremental modemoneromooo-monero1-41/+35
It makes it a lot slower, unfortunately
2018-09-09blockchain_blackball: avoid false positives for different amountsmoneromooo-monero1-8/+12
Identical offset based rings may not actually be identical rings since they represent different outputs
2018-09-09blockchain_blackball: set transaction looping txn to read onlymoneromooo-monero1-1/+1
2018-09-09blockchain_blackball: add statsmoneromooo-monero1-2/+94
2018-09-09blockchain_blackball: support pre-v2 databasesmoneromooo-monero1-79/+123
2018-09-09blockchain_blackball: use LMDB for the cachemoneromooo-monero1-137/+561
This uses less memory and makes it faster to load/save, though makes it slower to run (which is actually faster since it would previously start swapping anyway).
2018-09-09ringdb: allow blackballing many outputs at oncemoneromooo-monero1-4/+17
It cuts down on txn commits, and speeds up blackballing substantially
2018-08-15Merge pull request #4196luigi11111-4/+3
361513a blockchain_blackball: use a bit less memory (moneromooo-monero)
2018-08-09blockchain_blackball: use a bit less memorymoneromooo-monero1-4/+3
2018-08-07blockchain_depth: add average min depthmoneromooo-monero1-3/+7
2018-08-07blockchain_depth: get the average min depth of a set of txesmoneromooo-monero2-0/+379
2018-07-30blockchain_ancestry: faster and uses less memorymoneromooo-monero1-50/+114
2018-07-30blockchain_ancestry: add an incremental modemoneromooo-monero1-25/+99
2018-07-30blockchain_ancestry: finds all ancestors of a tx, block, or chainmoneromooo-monero2-0/+666
2018-07-30blockchain_blackball: allow resumable interrupt with ^Cmoneromooo-monero1-0/+13
2018-07-19Merge pull request #4064luigi11111-3/+3
80d7c6c blockchain_utilities: report file offset where a read error occurs (moneromooo-monero)
2018-07-10Merge pull request #4060Riccardo Spagni1-0/+1
22411149 blockchain_import: make sleep compile on Windows (iDunk5400)
2018-07-03blockchain_import: make sleep compile on WindowsiDunk54001-0/+1
2018-06-27Merge pull request #3716luigi11111-4/+4
a2b557f 6795bd0 209ec96 ed2c81e a830db2 57ea902 31a895e ba8331c f7f1917 41be339 f025ae9 ef2cb63 dcfd299 5d3e702 2704624 2771a18 0e4c7d0 (moneromooo-monero)
2018-06-27blockchain_utilities: report file offset where a read error occursmoneromooo-monero1-3/+3
2018-06-26replace std::list with std::vector on some hot pathsmoneromooo-monero1-4/+4
also use reserve where appropriate
2018-06-25Merge pull request #3948luigi11111-4/+16
c367609 blockchain_import: warn+delay about using --dangerous-unverified-import (moneromooo-monero)
2018-06-20Merge pull request #3924luigi11111-1/+1
afed978 Fixes #3645: error on freebsd lambda return values forced to std::string (rockhouse)
2018-06-08Merge pull request #3428luigi11112-26/+148
b26cd26 blockchain_utilities: do not link against unneeded p2p lib (moneromooo-monero) 66f4700 blockchain_blackball: add incremental mode (moneromooo-monero) e09710f blockchain_blackball: also blackball N N-sized duplicate rings (moneromooo-monero)
2018-06-07blockchain_import: warn+delay about using --dangerous-unverified-importmoneromooo-monero1-4/+16
This is the new name for --guard-against-pwnage 0
2018-06-04Fixes #3645: error on freebsd lambda return values forced to std::stringS1-1/+1
2018-05-31Merge pull request #3543luigi11111-3/+10
6fc97c9 blockchain_usage: don't divide by 0 when there is nothing to process (moneromooo-monero)
2018-05-30blockchain_blackball: also blackball N N-sized duplicate ringsmoneromooo-monero1-5/+48
These are unlikely to happen at random, but Wijaya et al made a paper about it, so people might try it on purpose now (and it turns out it's easy to add anyway)
2018-05-30blockchain_blackball: add incremental modemoneromooo-monero1-19/+102
2018-05-30blockchain_utilities: do not link against unneeded p2p libmoneromooo-monero1-4/+0
2018-05-23db_lmdb: save pruned and prunable tx data separatelymoneromooo-monero1-1/+1
This bumps DB version to 2, migration code will run for v1 DBs
2018-04-12blockchain_blackball: fix build with CLANG 5moneromooo-monero1-1/+2
It doesn't like the explicit NULL dereference (which is fine, honest)
2018-04-03blockchain_usage: don't divide by 0 when there is nothing to processmoneromooo-monero1-3/+10
Coverity 184942
2018-03-16ringdb: use the genesis block as a db namemoneromooo-monero1-1/+3
This will avoid careless forkers polluting the shared database even if they make their own chain. They'll then automatically start using another subdb, and any key-reusing fork of those forks will reuse their subdbs.
2018-03-16new blockchain_usage tool, reports on output usagemoneromooo-monero2-0/+289
2018-03-16wallet: make ringdb an object with database statemoneromooo-monero1-4/+6
2018-03-16blockchain_utilities: new blockchain_blackball toolmoneromooo-monero2-0/+460
It scans for known spent outputs and stores their public keys in a database which can then be read by the wallet, which can then avoid using those as fake outs in new transactions. Usage: monero-blockchain-blackball db1 db2... This uses the shared database in ~/.shared-ringdb
2018-03-05Stagenetstoffu2-5/+16
2018-02-16options: remove testnet-* optionswhythat2-7/+3
2018-02-02blockchain_export: fix buffer overflow in exportermoneromooo-monero1-1/+1
Coverity 182550
2018-01-26Update 2018 copyrightxmr-eric10-10/+10
2018-01-10Merge pull request #2997Riccardo Spagni1-2/+2
7c4f01a7 blockchain_import: more informative verification switch (moneromooo-monero)
2017-12-31Add misc hardening flags to the cmake machinerymoneromooo-monero1-2/+2
See https://wiki.debian.org/Hardening#User_Space
2017-12-23blockchain_import: more informative verification switchmoneromooo-monero1-2/+2
2017-12-18use const refs in for loops for non tiny typesmoneromooo-monero1-1/+1
2017-12-16move includes around to lessen overall loadmoneromooo-monero3-2/+5
2017-11-15Merge pull request #2778Riccardo Spagni1-9/+8
c957795b fix output_stream_header memory leak (MaxXor)
2017-11-14Merge pull request #2736Riccardo Spagni2-17/+8
0d9c0db9 Do not build against epee_readline if it was not built (Howard Chu) 178014c9 split off readline code into epee_readline (moneromooo-monero) a9e14a19 link against readline only for monerod and wallet-wallet-{rpc,cli} (moneromooo-monero) 437421ce wallet: move some scoped_message_writer calls from the libs (moneromooo-monero) e89994e9 wallet: rejig to avoid prompting in wallet2 (moneromooo-monero) ec5135e5 move input_line from command_line to simplewallet (moneromooo-monero) 082db75f move cryptonote command line options to cryptonote_core (moneromooo-monero)
2017-11-14move cryptonote command line options to cryptonote_coremoneromooo-monero2-17/+8
Those have no reason to be in a generic module
2017-11-14remove "using namespace std" from headersmoneromooo-monero3-5/+5
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
2017-11-08fix output_stream_header memory leakMaxXor1-9/+8
2017-10-15blockchain_utilities: Add monero-blockchain-{ex,im}port binaries todev/beber/installBertrand Jacquin1-0/+2
default install targets Binaries available to download on https://getmonero.org/downloads/ as embedding monerod, monero-wallet-{cli,rpc} and monero-blockchain-{ex,im}port. This change synchronise download results with a manual build from source
2017-10-15Fix compiler warnings with Clang 6.0.0.Vasil Dimov1-2/+2
monero/src/cryptonote_protocol/block_queue.cpp:208:44: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] static const boost::uuids::uuid uuid0 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { } monero/src/wallet/wallet_rpc_server.cpp:1895:43: error: lambda capture 'wal' is not used [-Werror,-Wunused-lambda-capture] tools::signal_handler::install([&wrpc, &wal](int) { ^ monero/src/cryptonote_protocol/cryptonote_protocol_handler.inl:1616:40: error: lambda capture 'arg' is not used [-Werror,-Wunused-lambda-capture] m_p2p->for_each_connection([this, &arg, &fluffy_arg, &exclude_context, &fullConnections... ^ monero/src/cryptonote_protocol/cryptonote_protocol_handler.inl:1616:46: error: lambda capture 'fluffy_arg' is not used [-Werror,-Wunused-lambda-capture] m_p2p->for_each_connection([this, &arg, &fluffy_arg, &exclude_context, &fullConnections... ^ monero/src/blockchain_utilities/blockchain_export.cpp:181:3: error: bool literal returned from 'main' [-Werror,-Wmain] CHECK_AND_ASSERT_MES(r, false, "Failed to initialize source blockchain storage"); ^ ~~~~~ monero/contrib/epee/include/misc_log_ex.h:180:97: note: expanded from macro 'CHECK_AND_ASSERT_MES' ...fail_ret_val, message) do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0) ^ ~~~~~~~~~~~~ monero/src/blockchain_utilities/blockchain_export.cpp:195:3: error: bool literal returned from 'main' [-Werror,-Wmain] CHECK_AND_ASSERT_MES(r, false, "Failed to export blockchain raw data"); ^ ~~~~~ monero/contrib/epee/include/misc_log_ex.h:180:97: note: expanded from macro 'CHECK_AND_ASSERT_MES' ...fail_ret_val, message) do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0) ^ ~~~~~~~~~~~~
2017-10-15Merge pull request #2589Riccardo Spagni2-6/+6
8f0cea63 add a command_line function to check for defaulted options (moneromooo-monero)
2017-10-15Merge pull request #2568Riccardo Spagni2-2/+2
7130cf0c Add tools::on_startup, and warn about glibc 2.25 bug if found (moneromooo-monero)
2017-10-15Merge pull request #2567Riccardo Spagni1-3/+0
54940d8c blockchain_import: remove a few commented out obsolete lines (moneromooo-monero)
2017-10-15Merge pull request #2469Riccardo Spagni3-3/+32
7adceee6 precomputed block hashes are now in blocks of N (currently 256) (moneromooo-monero)
2017-10-14Add tools::on_startup, and warn about glibc 2.25 bug if foundmoneromooo-monero2-2/+2
https://sourceware.org/bugzilla/show_bug.cgi?id=21778
2017-10-06add a command_line function to check for defaulted optionsmoneromooo-monero2-6/+6
2017-10-03blockchain_import: remove a few commented out obsolete linesmoneromooo-monero1-3/+0
2017-09-25Merge pull request #2457Riccardo Spagni3-56/+109
d2d8a41c Use actual batch size for resize estimates (Howard Chu)
2017-09-21build: auto update version info without manually deleting version.hstoffu1-4/+2
2017-09-18precomputed block hashes are now in blocks of N (currently 256)moneromooo-monero3-3/+32
This shaves a lot of space off binaries
2017-09-17Use actual batch size for resize estimatesHoward Chu3-56/+109
And optimize import startup: Remember start_height position during initial count_blocks pass to avoid having to reread entire file again to arrive at start_height
2017-09-02Merge pull request #2384Riccardo Spagni3-26/+27
4e0e4e99 blockchain_import: warn for chunks over 500000, not 100000 (moneromooo-monero) 5b29e87f blockchain_import: properly cleanup core/db on exit (moneromooo-monero) e167c4d9 blockchain_import: do not error out on truncated files (moneromooo-monero)
2017-09-01blockchain_import: warn for chunks over 500000, not 100000moneromooo-monero3-4/+5
We have a lot of 350000 byte blocks now.
2017-09-01blockchain_import: properly cleanup core/db on exitmoneromooo-monero1-19/+9
2017-09-01blockchain_import: do not error out on truncated filesmoneromooo-monero1-3/+13
This will happen often when downloading from a live file
2017-08-29Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocksmoneromooo-monero1-1/+5
2017-08-20More DB support cleanupHoward Chu2-60/+4
Hide DB types from db_types.h - no reason to recompile dependencies when DB types change. Also remove lingering in-memory DB references, they've been obsolete since 9e82b694da120708652871b55f639d1ef306a7ec
2017-08-19DB cleanupHoward Chu3-95/+8
Hide LMDB-specific stuff behind blockchain_db.h. Nobody besides blockchain_db.cpp should ever be including DB-specific headers any more.
2017-08-15Merge pull request #2248Riccardo Spagni2-215/+0
71e28760 debug_utilities: only build for debug builds (moneromooo-monero) 55e150ff debug_utilities: new object-sizes debug tool (moneromooo-monero) fbaf5375 cn_deserialize: move to new debug_utilities subdirectory (moneromooo-monero)
2017-08-07blockchain_import: much faster when verifying with cryptonote::coremoneromooo-monero3-287/+152
Quick test with the first 56569 blocks from mainnet version verify batch time old 0 200 1:16 new 0 200 0:57 old 0 5000 0:53 new 0 5000 0:51 old 1 200 est > 1h new 1 200 10:21 old 1 5000 est > 1h new 1 5000 8:27
2017-08-03cn_deserialize: move to new debug_utilities subdirectorymoneromooo-monero2-215/+0
2017-05-25Move txpool to the databasemoneromooo-monero2-3/+3
Integration could go further (ie, return_tx_to_pool calls should not be needed anymore, possibly other things). poolstate.bin is now obsolete.
2017-03-05blockchain_import: make --log-level understand categoriesmoneromooo-monero1-3/+6
2017-03-05blockchain_export: make --log-level understand categoriesmoneromooo-monero1-4/+6
2017-03-05blockchain_import: error out nicely on exceptionsmoneromooo-monero1-0/+4
2017-03-05blockchain_export: error out nicely on exceptionsmoneromooo-monero1-0/+5
2017-03-03Fix double-importHoward Chu1-8/+10
Incomplete ifdef cleanup in 9e82b694da120708652871b55f639d1ef306a7ec
2017-02-24blockchain_utilities: link against blockchain_dbmoneromooo-monero1-0/+1
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni12-12/+12
2017-02-12tools: log to the correct filemoneromooo-monero2-2/+6
2017-02-12tools: set requested log levelmoneromooo-monero3-2/+4
also move a couple logs from INFO to DEBUG
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi845-8/+8
2017-01-16fixups in logging init calls, and add missing net context in a logmoneromooo-monero2-2/+2
2017-01-16Change logging to easylogging++moneromooo-monero6-104/+115
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-15blockchain_import: fix build after tx_pool::add_tx changesmoneromooo-monero1-1/+1
2017-01-14Use batch transactions when syncingHoward Chu1-2/+2
Faster throughput while avoiding corruption. I.e., makes running with --db-sync-mode safe more tolerable.
2016-12-13rename cn_deserializeRiccardo Spagni1-1/+1
2016-10-30Revert "remove cn_deserialize"moneromooo-monero2-0/+212
This is useful (to me). This reverts commit f968ccb9d3d34d163dc5638006e6b87c78ddfdb3.
2016-09-26Dropped "bit" from bitmonero.Randi Joseph1-4/+4
2016-09-18cmake: transitive deps and remove deprecated LINK_*redfish1-8/+16
Keep the immediate direct deps at the library that depends on them, declare deps as PUBLIC so that targets that link against that library get the library's deps as transitive deps. Break dep cycle between blockchain_db <-> crytonote_core. No code refactoring, just hide cycle from cmake so that it doesn't complain (cycles are allowed only between static libs, not shared libs). This is in preparation for supproting BUILD_SHARED_LIBS cmake built-in option for building internal libs as shared.
2016-09-03fix nigglies, as pointed out by moneromooo-moneroRiccardo Spagni1-8/+3
2016-09-03fix blockchain utilities readmeRiccardo Spagni1-42/+15
2016-09-03remove blockchain_dumpRiccardo Spagni2-444/+0
2016-09-03rename blockchain utilsRiccardo Spagni1-3/+3
2016-09-03remove cn_deserializeRiccardo Spagni2-217/+0
2016-08-28remove original Cryptonote blockchain_storage blockchain formatmoneromooo-monero12-549/+7
2016-07-13remove hf_starting_height dbmoneromooo-monero1-4/+0
It's not really needed, it used to be an optimization for when that code was not using the db and needed to recalculate things fast on startup.
2016-06-06cn_deserialize: add minergate datamoneromooo-monero1-0/+1
2016-06-06cn_deserialize: print extra nonce as hex datamoneromooo-monero1-1/+1
2016-05-01cn_deserialize: deserialize tx_extra toomoneromooo-monero1-0/+21
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero4-28/+28
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-19Print stack trace upon exceptionsmoneromooo-monero4-28/+28
Useful for debugging users' logs
2016-03-12switch default utilities DB to lmdb, update checkpoints.datRiccardo Spagni1-3/+6
2016-03-05Merge pull request #705Riccardo Spagni1-4/+54
f7ed167 blockchain_utilities: Update documentation (warptangent)
2016-03-05blockchain_utilities: Update documentationwarptangent1-4/+54
2016-03-05blockchain_export: Support BerkeleyDBwarptangent1-4/+65
TEST: blockchain_export -h This should show "berkeley" as an available option to --database. With an existing BerkeleyDB database, run: blockchain_export --database berkeley
2016-03-05blockchain_export: Move DB implementation includeswarptangent2-2/+2
2016-02-22move g_test_dbg_lock_sleep from a global to a function level staticmoneromooo-monero5-10/+0
This avoids the need to define that variable in every program which uses epee.
2016-02-18blockchain_import: Pass ARCH_WIDTH macro if 32-bit or not.warptangent1-4/+4
This also avoids warnings.
2016-02-18Merge pull request #674Riccardo Spagni3-4/+14
05e7ac0 blockchain_import: Check bit width for more than just WIN32 (warptangent)
2016-02-17Fix cffc411c9025e1d28a8b6e32c53c83ba113d9204Howard Chu1-0/+2
Don't include bdb header unless defined(BERKELEY_DB)
2016-02-17blockchain_import: Check bit width for more than just WIN32warptangent3-4/+14
Pass the CMake bit width setting to compile flags for blockchain_import and blockchain_converter. For LMDB on 32-bit, hyc has found that batch size of 100 appears to be a good default.
2016-02-14blockchain_import: Build string for db type listwarptangent1-2/+15
2016-02-14blockchain_import: Add mode argument representing multiple DB flagswarptangent1-31/+82
These modes match those optionally provided as part of the daemon's --db-type argument. Argument after the # is interpreted as a composite mode if there's only one (no comma separated arguments). Sample usage: blockchain_import --database lmdb#fastest blockchain_import --database berkeley#fastest Multiple specific DB flags are still supported, e.g. blockchain_import --database lmdb#nosync,nordahead blockchain_import --database berkeley#txn_nosync
2016-02-14blockchain_import: Support BerkeleyDBwarptangent2-21/+67
2016-02-14blockchain_import: Add database type argumentwarptangent2-4/+4
Default to LMDB.