monero/tests/unit_tests
moneromooo-monero ebc60a098d
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-12 12:15:54 +00:00
..
CMakeLists.txt ArticMine's new block weight algorithm 2019-02-12 12:15:54 +00:00
account.cpp store secret keys encrypted where possible 2018-08-16 11:57:43 +00:00
address_from_url.cpp Merge pull request #4464 2018-10-02 22:45:42 +02:00
aligned.cpp aligned: aligned memory alloc/realloc/free 2018-09-11 13:37:34 +00:00
apply_permutation.cpp Readd copyright starting date 2018-01-26 10:03:20 -05:00
ban.cpp replace std::list with std::vector on some hot paths 2018-06-26 22:14:21 +01:00
base58.cpp Stagenet 2018-03-05 11:55:05 +09:00
block_queue.cpp Readd copyright starting date 2018-01-26 10:03:20 -05:00
block_reward.cpp v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
blockchain_db.cpp ArticMine's new block weight algorithm 2019-02-12 12:15:54 +00:00
bulletproofs.cpp unit_tests: sanity check on transaction weight 2018-09-15 16:14:38 +00:00
canonical_amounts.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
chacha.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
checkpoints.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
command_line.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
crypto.cpp add and use constant time 32 byte equality function 2018-08-23 07:56:51 +00:00
decompose_amount_into_digits.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
device.cpp unit_tests: add device unit tests 2018-04-12 13:49:05 +01:00
dns_resolver.cpp dns: change default DNS to a worldwide selection 2018-02-08 09:46:16 +00:00
epee_boosted_tcp_server.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
epee_levin_protocol_handler_async.cpp epee: adaptive connection timeout system 2018-06-10 19:39:38 +01:00
epee_utils.cpp Added features to epee::span<T> : 2018-08-03 20:33:07 -04:00
expect.cpp Adding expect<T> - a value-or-error implementation 2018-09-12 22:44:34 +00:00
fee.cpp v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
get_xtype_from_string.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
hardfork.cpp ArticMine's new block weight algorithm 2019-02-12 12:15:54 +00:00
hashchain.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
http.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
is_hdd.cpp unit_tests: fix build with GCC 5.4.0 on ubuntu 2018-09-23 14:38:31 +00:00
json_serialization.cpp bulletproofs: add multi output bulletproofs to rct 2018-09-11 13:37:28 +00:00
keccak.cpp unit_tests: add tests for incremental keccak 2018-08-20 08:47:31 +00:00
long_term_block_weight.cpp ArticMine's new block weight algorithm 2019-02-12 12:15:54 +00:00
main.cpp unit_tests: catch unhandled exceptions 2018-09-27 17:29:09 +00:00
memwipe.cpp Readd copyright starting date 2018-01-26 10:03:20 -05:00
mlocker.cpp unit_tests: add check for page size > 0 before dividing 2018-09-27 11:59:52 +00:00
mnemonics.cpp wallet: wipe seed from memory where appropriate 2018-08-16 09:17:52 +00:00
mul_div.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
multiexp.cpp unit_tests: add a few more multiexp unit tests 2018-09-11 13:38:19 +00:00
multisig.cpp Merge pull request #4036 2018-10-07 20:04:10 +02:00
output_selection.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
parse_amount.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
random.cpp crypto: remove slight bias in key generation due to modulo 2018-07-05 09:18:01 +01:00
ringct.cpp bulletproofs: speed up the latest changes a bit 2018-09-11 13:38:32 +00:00
ringdb.cpp Rename "blackball" for clarity 2018-10-18 18:46:17 +00:00
serialization.cpp Merge pull request #4264 2018-09-04 13:14:08 -05:00
sha256.cpp Readd copyright starting date 2018-01-26 10:03:20 -05:00
slow_memmem.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
subaddress.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
test_peerlist.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
test_protocol_pack.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
test_tx_utils.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
threadpool.cpp threadpool: allow leaf functions to run concurrently 2018-06-26 22:15:22 +01:00
unbound.cpp Readd copyright starting date 2018-01-26 10:03:20 -05:00
unit_tests_utils.h unit_tests: added gtest utility ASSERT_EQ_MAP for easily testing key-value map 2018-02-12 21:56:36 +09:00
uri.cpp Stagenet 2018-03-05 11:55:05 +09:00
varint.cpp Update 2018 copyright 2018-01-26 10:03:20 -05:00
vercmp.cpp Readd copyright starting date 2018-01-26 10:03:20 -05:00
wipeable_string.cpp unit_tests: fix build with GCC 5.4.0 on ubuntu 2018-09-23 14:38:31 +00:00