Commit graph

233 commits

Author SHA1 Message Date
moneromooo-monero
236d2a88e2
blockchain_stats: make it work on pruned blockchains
It reports the actual size as pruned, however
2019-11-04 15:10:01 +00:00
Nathan Dorfman
fbf81689d4 utils: Increase max block size for import/export 2019-10-17 19:14:41 -06:00
luigi1111
bf525793c7
Merge pull request #5915
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-10-08 15:55:03 -05:00
moneromooo-monero
8330e772f1
monerod can now sync from pruned blocks
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-27 00:10:37 +00:00
luigi1111
06bee964a8
Merge pull request #5878
f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
2019-09-24 10:10:28 -05:00
luigi1111
ee6e849627
Merge pull request #5877
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-24 10:08:44 -05:00
Jesus Ramirez
f9b3f6ef3b Removed Berkeley DB and db switching logic 2019-09-16 16:18:05 +02:00
Jesus Ramirez
2cd4fd8972 Changed the use of boost:value_initialized for C++ list initializer 2019-09-02 14:16:29 +02:00
stoffu
2425f27acd
blockchain_blackball: use is_output_spent instead of ringdb.blackballed for spentness test 2019-08-22 21:34:47 +09:00
stoffu
9f68669503
blockchain_blackball: add --historical-stat which prints historical stats of spent ratio 2019-08-22 21:34:40 +09:00
luigi1111
f1427568dc
Merge pull request #5574
162c3e1 blockchain_export: allow exporting blocks.dat format from pruned (moneromooo-monero)
2019-07-24 14:14:35 -05:00
luigi1111
e3de4aa68b
Merge pull request #5502
25a7cfd add a few checks where it seems appropriate (moneromooo-monero)
1a66a86 remove unused code (moneromooo-monero)
2019-07-24 13:57:06 -05:00
moneromooo-monero
162c3e18ec
blockchain_export: allow exporting blocks.dat format from pruned
We don't need any of the pruned data for this
2019-05-24 14:12:45 +00:00
Rohaq
1873af35bf Made code block usage consistent across all .md files 2019-05-12 05:16:26 +01:00
moneromooo-monero
25a7cfdb4a
add a few checks where it seems appropriate 2019-04-29 20:52:40 +00:00
Riccardo Spagni
313a56a2da
Merge pull request #5406
bea1918a blockchain_import: error out if preparing to handle blocks fails (moneromooo-monero)
2019-04-16 22:32:27 +02:00
Riccardo Spagni
915d9e5a1f
Merge pull request #5380
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-11 13:02:59 +02:00
Riccardo Spagni
bd429033df
Merge pull request #5378
eda2661a Allow pruning before v10 (moneromooo-monero)
2019-04-11 13:02:35 +02:00
moneromooo-monero
bea1918a05
blockchain_import: error out if preparing to handle blocks fails
Coverity 197562
2019-04-07 13:48:19 +00:00
moneromooo-monero
113e487739
blockchain_stats: fix sign in formatting function 2019-04-01 19:24:47 +00:00
moneromooo-monero
eda2661aa2
Allow pruning before v10
This check is now not needed anymore, and would prevent people
from using --prune-blockchain when starting a new sync
2019-04-01 14:06:49 +00:00
moneromooo-monero
91f4c7f45f
Make difficulty 128 bit instead of 64 bit
Based on Boolberry work by:
  jahrsg <jahr@jahr.me>
  cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-24 21:03:19 +00:00
binaryFate
1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero
238401d4e9
core: avoid double parsing blocks after hoh 2019-03-05 11:58:13 +00:00
moneromooo-monero
b044d03a51
Avoid repeated (de)serialization when syncing 2019-03-05 11:57:55 +00:00
Riccardo Spagni
196022530b
Merge pull request #5108
1c9d5285 blockchain_prune: don't prune before v10 (moneromooo-monero)
2019-03-04 21:24:09 +02:00
moneromooo-monero
b8787f4302
ArticMine's new block weight algorithm
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-03-04 09:33:58 +00:00
moneromooo-monero
1c9d5285d1
blockchain_prune: don't prune before v10
This uses system time since it doesn't see the p2p network,
so is not 100% accurate
2019-01-30 16:32:14 +00:00
moneromooo-monero
b750fb27b0
Pruning
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-22 20:30:51 +00:00
moneromooo-monero
464097e592
blockchain_ancestry: allow getting ancestry of a single output
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.
2019-01-16 20:13:12 +00:00
stoffu
7c58421c79
blockchain_blackball: make log file name consistent with executable 2018-12-22 14:46:35 +09:00
Riccardo Spagni
d855f9bb92
Merge pull request #4901
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-12 11:57:31 +02:00
Riccardo Spagni
85262ca8cd
Merge pull request #4899
2be31b4c blockchain_blackball: spot when all outputs of an amount are spent (moneromooo-monero)
2018-12-12 11:56:21 +02:00
Riccardo Spagni
81418cb281
Merge pull request #4894
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-12-04 17:33:19 +02:00
moneromooo-monero
a48f2dab00
blockchain_prune_known_spent_data: blackball file is now optional
If not present, the tool will scan the blockchain, since scanning
for this is fairly fast.
2018-11-27 15:45:47 +00:00
moneromooo-monero
17b45725af
Outputs where all amounts are known spent can now be pruned
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-27 15:45:42 +00:00
moneromooo-monero
2be31b4c9c
blockchain_blackball: spot when all outputs of an amount are spent 2018-11-24 11:07:15 +00:00
moneromooo-monero
d4f50cb109
remove some unused code
Found by codacy.com
2018-11-23 15:37:36 +00:00
moneromooo-monero
96e6b43970
blockchain_stats: don't use gmtime_r on Windows
In some cases, it doesn't like it (I don't know the details).

Factor into a new epee function
2018-11-21 00:50:53 +00:00
Riccardo Spagni
da26bc92e9
Merge pull request #4742
0a95cdaa blockchain_utilities: fix logs and cout output colliding (moneromooo-monero)
2018-11-06 21:32:54 +02:00
Riccardo Spagni
68e2efa8f2
Merge pull request #4694
a43daebf Add stats utility (Howard Chu)
2018-11-04 20:47:06 +02:00
Riccardo Spagni
5141f6e8e8
Merge pull request #4692
cb4aafd2 blockchain_utilities: simplify getting block blob from height (moneromooo-monero)
2018-11-04 20:46:21 +02:00
moneromooo-monero
0a95cdaa80
blockchain_utilities: fix logs and cout output colliding 2018-10-27 17:40:01 +00:00
Riccardo Spagni
056a58d13f
Merge pull request #4536
fd62b6e7 blocks: use auto-generated .c files instead of 'LD -r -b binary' (xiphon)
2018-10-26 22:20:39 +02:00
Howard Chu
a43daebf57
Add stats utility
Report statistics from a blockchain DB
2018-10-23 19:43:31 +01:00
moneromooo-monero
cb4aafd27e
blockchain_utilities: simplify getting block blob from height 2018-10-22 16:04:28 +00:00
xiphon
fd62b6e79f blocks: use auto-generated .c files instead of 'LD -r -b binary' 2018-10-22 01:12:00 +03:00
moneromooo-monero
99cd6f961a
Rename "blackball" for clarity
Apparently some people seem to think it's a censorship list...
2018-10-18 18:45:45 +00:00
Riccardo Spagni
d6dbb6601b
Merge pull request #4530
77471e23 blockchain_blackball: fix stray ! (moneromooo-monero)
2018-10-08 22:05:29 +02:00
Riccardo Spagni
ac5674524a
Revert "Merge pull request #4472"
This reverts commit 79d46c4d55, reversing
changes made to c9fc61dbb5.
2018-10-08 21:39:54 +02:00