monero/src/rpc
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 Adding initial support for broadcasting transactions over Tor 2019-01-28 23:56:33 +00:00
core_rpc_server.cpp ArticMine's new block weight algorithm 2019-03-04 09:33:58 +00:00
core_rpc_server.h rpc: fix internal daemon calls in restricted rpc getting partial data 2019-01-28 19:35:20 +00:00
core_rpc_server_commands_defs.h ArticMine's new block weight algorithm 2019-03-04 09:33:58 +00:00
core_rpc_server_error_codes.h add --regtest and --fixed-difficulty for regression testing 2018-06-29 10:06:11 +02:00
daemon_handler.cpp Adding initial support for broadcasting transactions over Tor 2019-01-28 23:56:33 +00:00
daemon_handler.h Update ZMQ fee estimate and add ZMQ output distribution 2018-10-23 23:46:31 -04:00
daemon_messages.cpp remove some unused code 2018-11-23 15:37:36 +00:00
daemon_messages.h Merge pull request #4687 2018-11-04 20:44:49 +02:00
daemon_rpc_version.h Update 2018 copyright 2018-01-26 10:03:20 -05:00
instanciations.cpp Readd copyright starting date 2018-01-26 10:03:20 -05:00
message.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
message.h rpc: init m_rpc_version in Message ctor 2018-10-16 11:58:54 +00:00
message_data_structs.h Pruning 2019-01-22 20:30:51 +00:00
rpc_args.cpp rpc: allow to pass RPC login via RPC_LOGIN env var 2018-08-31 15:51:59 +02:00
rpc_args.h Update 2018 copyright 2018-01-26 10:03:20 -05:00
rpc_handler.cpp rpc: speed up the common get_output_distribution case while syncing 2018-11-27 14:01:40 +00:00
rpc_handler.h tests: add unit tests for get_output_distribution 2018-11-16 19:21:45 +00:00
zmq_server.cpp Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
zmq_server.h Readd copyright starting date 2018-01-26 10:03:20 -05:00