monero/src/daemon
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
..
CMakeLists.txt blocks: use auto-generated .c files instead of 'LD -r -b binary' 2018-10-22 01:12:00 +03:00
command_line_args.h mlog: --max-log-files to set the max number of rotated log files 2018-06-13 12:44:27 +09:00
command_parser_executor.cpp Merge pull request #5080 2019-01-28 21:34:17 +02:00
command_parser_executor.h Pruning 2019-01-22 20:30:51 +00:00
command_server.cpp Merge pull request #5080 2019-01-28 21:34:17 +02:00
command_server.h Update 2018 copyright 2018-01-26 10:03:20 -05:00
core.h remove some unused code 2018-11-23 15:37:36 +00:00
daemon.cpp Merge pull request #4923 2018-12-12 12:00:37 +02:00
daemon.h Update 2018 copyright 2018-01-26 10:03:20 -05:00
executor.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
executor.h Update 2018 copyright 2018-01-26 10:03:20 -05:00
main.cpp daemon: print monero version at startup when calling a detached daemon 2018-11-30 17:55:16 +00:00
p2p.h Fix typos in various files 2018-03-15 18:25:38 +02:00
protocol.h Merge pull request #3181 2018-02-16 14:19:54 +01:00
rpc_command_executor.cpp ArticMine's new block weight algorithm 2019-03-04 09:33:58 +00:00
rpc_command_executor.h Merge pull request #5080 2019-01-28 21:34:17 +02:00
rpc.h Don't cache nettype in core_rpc_server use m_core 2018-11-16 15:32:05 +11:00