Commit Graph

93 Commits

Author SHA1 Message Date
Doyle cc0d51078c Merge dev into upstream 2019-05-01 16:01:17 +10:00
Doyle 892469ded1 Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
Doyle 8d7d90c374 Merge commit 'ed6aa76cca69e4f6d0b84eb55ef7061dc4b6fc77' into LokiMergeUpstream 2019-04-11 15:08:26 +10: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
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 6cc35100f9 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.
2019-02-20 18:57:58 +11:00
doy-lee 40506127a4 Merge commit '7e957c1' into LokiMergeUpstream 2018-12-11 13:46:35 +11:00
moneromooo-monero d4f50cb109
remove some unused code
Found by codacy.com
2018-11-23 15:37:36 +00:00
doy-lee 8f03bb3fd7 Merge commit '8534f71' into LokiMergeUpstream 2018-11-12 14:55:42 +11:00
doy-lee 997c0a9991 Merge commit '8f9c381' into LokiMergeUpstream 2018-10-31 17:26:00 +11:00
moneromooo-monero 0a95cdaa80
blockchain_utilities: fix logs and cout output colliding 2018-10-27 17:40:01 +00:00
xiphon fd62b6e79f blocks: use auto-generated .c files instead of 'LD -r -b binary' 2018-10-22 01:12:00 +03:00
doy-lee c1da4f690d Merge commit '5ffb2ff' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-09 12:31:08 +11: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
xiphon 02d3ef7bda blocks: use auto-generated .c files instead of 'LD -r -b binary' 2018-10-04 00:01:09 +00:00
doy-lee e3da57f7af Merge commit '7d2d805' into LokiMergeUpstream20180821 2018-09-19 13:48:26 +10:00
doy-lee ca464be3bd Merge commit 'ed2c81e' into LokiMergeUpstream20180821 2018-09-13 18:42:49 +10:00
moneromooo-monero 5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
Doyle T ce980e31f0 Merge commit '8fad35f' into LokiMergeUpstream 2018-08-21 14:53:19 +10:00
Riccardo Spagni 2790ebc9f0
Merge pull request #4060
22411149 blockchain_import: make sleep compile on Windows (iDunk5400)
2018-07-10 09:34:41 +02:00
iDunk5400 2241114965
blockchain_import: make sleep compile on Windows 2018-07-03 20:33:18 +02:00
luigi1111 a844844cda
Merge pull request #3716
a2b557f 6795bd0 209ec96 ed2c81e a830db2 57ea902 31a895e ba8331c f7f1917 41be339 f025ae9 ef2cb63 dcfd299 5d3e702 2704624 2771a18 0e4c7d0 (moneromooo-monero)
2018-06-27 15:33:01 -05:00
moneromooo-monero ed2c81ed95
replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-06-26 22:14:21 +01:00
moneromooo-monero c367609447
blockchain_import: warn+delay about using --dangerous-unverified-import
This is the new name for --guard-against-pwnage 0
2018-06-07 06:47:00 +01:00
Doyle T 161eda3fd1 First pass Monero to Loki refs 2018-04-10 14:49:20 +10:00
stoffu af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
whythat 05a12ccc2d options: remove testnet-* options 2018-02-16 22:32:01 +02:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
Riccardo Spagni 229e1ce7d1
Merge pull request #2997
7c4f01a7 blockchain_import: more informative verification switch (moneromooo-monero)
2018-01-10 11:53:57 +01:00
moneromooo-monero 7c4f01a792
blockchain_import: more informative verification switch 2017-12-23 18:47:05 +00:00
moneromooo-monero b51dc56687
use const refs in for loops for non tiny types 2017-12-18 15:15:54 +00:00
moneromooo-monero 09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
Riccardo Spagni edebe4e3b6
Merge pull request #2736
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-14 21:31:51 +02:00
moneromooo-monero 082db75f28
move cryptonote command line options to cryptonote_core
Those have no reason to be in a generic module
2017-11-14 17:06:19 +00:00
moneromooo-monero 383ff4f689
remove "using namespace std" from headers
It's nasty, and actually breaks on Solaris, where if.h fails to
build due to:

  struct map *if_memmap;
2017-11-14 16:56:10 +00:00
Riccardo Spagni 1280ba4f5b
Merge pull request #2589
8f0cea63 add a command_line function to check for defaulted options (moneromooo-monero)
2017-10-15 18:38:46 +02:00
Riccardo Spagni c45f3ac4d9
Merge pull request #2568
7130cf0c Add tools::on_startup, and warn about glibc 2.25 bug if found (moneromooo-monero)
2017-10-15 18:32:09 +02:00
Riccardo Spagni 2babd2e0a3
Merge pull request #2567
54940d8c blockchain_import: remove a few commented out obsolete lines (moneromooo-monero)
2017-10-15 18:29:18 +02:00
Riccardo Spagni 5ea20d6944
Merge pull request #2469
7adceee6 precomputed block hashes are now in blocks of N (currently 256) (moneromooo-monero)
2017-10-15 17:23:50 +02:00
moneromooo-monero 7130cf0c61
Add tools::on_startup, and warn about glibc 2.25 bug if found
https://sourceware.org/bugzilla/show_bug.cgi?id=21778
2017-10-14 09:12:28 +01:00
moneromooo-monero 8f0cea6355
add a command_line function to check for defaulted options 2017-10-06 10:56:18 +01:00
moneromooo-monero 54940d8ca4
blockchain_import: remove a few commented out obsolete lines 2017-10-03 09:15:57 +01:00
moneromooo-monero 7adceee634
precomputed block hashes are now in blocks of N (currently 256)
This shaves a lot of space off binaries
2017-09-18 16:29:00 +01:00
Howard Chu d2d8a41c47
Use actual batch size for resize estimates
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-17 22:08:40 +01:00
Riccardo Spagni 02e5dcd2fa
Merge pull request #2384
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-02 11:32:46 +02:00
moneromooo-monero 4e0e4e9942
blockchain_import: warn for chunks over 500000, not 100000
We have a lot of 350000 byte blocks now.
2017-09-01 22:48:33 +01:00
moneromooo-monero 5b29e87f85
blockchain_import: properly cleanup core/db on exit 2017-09-01 11:59:24 +01:00
moneromooo-monero e167c4d9a1
blockchain_import: do not error out on truncated files
This will happen often when downloading from a live file
2017-09-01 11:58:51 +01:00
moneromooo-monero ce901fcb31
Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocks 2017-08-29 15:43:32 +01:00