Commit graph

211 commits

Author SHA1 Message Date
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
moneromooo-monero
77471e23bd
blockchain_blackball: fix stray ! 2018-10-08 17:37:31 +00:00
moneromooo-monero
85e58cb24a
blockchain_blackball: fix stats double counting 2018-10-08 08:55:56 +00:00
xiphon
02d3ef7bda blocks: use auto-generated .c files instead of 'LD -r -b binary' 2018-10-04 00:01:09 +00:00
Riccardo Spagni
3a4fbdd9ec
Merge pull request #4470
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-10-02 22:37:18 +02:00
Riccardo Spagni
effcbf2060
Merge pull request #4459
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-29 22:20:38 +02:00
TheCharlatan
2fbf38ee91 Fix 32bit depends builds
Add architecture flags when cmake invokes gcc manually.
Add 32bit to Travis.
2018-09-29 22:16:42 +02:00
Riccardo Spagni
9c40bc62fc
Merge pull request #3430
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-18 16:33:21 +02:00
moneromooo-monero
4cb1d879f6
blockchain_blackball: s/return false;/return 0;/ 2018-09-14 20:08:52 +00:00
moneromooo-monero
9bdc9109fb
blockchain_blackball: use %zu for size_t 2018-09-14 17:16:08 +00:00
moneromooo-monero
db3db0930e
blockchain_blackball: use mdb_size_t where appropriate 2018-09-14 17:11:11 +00:00
moneromooo-monero
b1f05f589e
blockchain_blackball: error out on fgets error 2018-09-14 16:31:24 +00:00
Riccardo Spagni
c74d9057f8
Merge pull request #4260
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-14 12:45:18 +02:00
Riccardo Spagni
249feda4e1
Merge pull request #4147
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-14 12:19:44 +02:00
moneromooo-monero
5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
TheCharlatan
56b6e41ea7 Add support for apple and arm building
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-10 22:05:36 +02:00
moneromooo-monero
a54dbaee08
blockchain_blackball: add --force-chain-reaction-pass flag 2018-09-10 09:04:21 +00:00
moneromooo-monero
44439c3208
record blackballs as amount/offset, and add export ability 2018-09-10 09:04:18 +00:00
moneromooo-monero
4bce935b40
blockchain_blackball: more optimizations 2018-09-09 12:03:02 +00:00
moneromooo-monero
b66ba78306
blockchain_blackball: do not process duplicate blockchains parts 2018-09-09 12:02:48 +00:00
moneromooo-monero
639a3c019c
blockchain_blackball: make it clear secondary passes are not incremental
yet
2018-09-09 12:02:42 +00:00
moneromooo-monero
eb8a51be68
blockchain_blackball: detect spent outputs by partial ring reuse 2018-09-09 12:02:39 +00:00
moneromooo-monero
d6d276c604
blockchain_blackball: fix chain reaction phase in incremental mode
It makes it a lot slower, unfortunately
2018-09-09 12:02:36 +00:00