monero/tests/unit_tests
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
..
account.cpp store secret keys encrypted where possible 2018-08-16 11:57:43 +00:00
address_from_url.cpp unit_tests: fix longstanding DNS related unit test 2018-09-28 15:28:38 +00:00
aligned.cpp unit_tests: add unit test for alloc alignment being a power of 2 2018-10-08 11:36:42 +00:00
apply_permutation.cpp
ban.cpp Pruning 2019-01-22 20:30:51 +00:00
base58.cpp
block_queue.cpp
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-03-04 09:33:58 +00:00
bulletproofs.cpp add a bulletproof version, new bulletproof type, and rct config 2019-01-22 23:17:24 +00:00
canonical_amounts.cpp
chacha.cpp
checkpoints.cpp
CMakeLists.txt ArticMine's new block weight algorithm 2019-03-04 09:33:58 +00:00
command_line.cpp
crypto.cpp unit_tests: don't take the address of an unwrapped secret key 2018-11-16 19:36:02 +00:00
decompose_amount_into_digits.cpp
device.cpp ringct: remove unused senderPk from ecdhTuple 2019-01-22 23:17:42 +00:00
dns_resolver.cpp
epee_boosted_tcp_server.cpp
epee_levin_protocol_handler_async.cpp epee: better network buffer data structure 2018-12-23 16:46:07 +00:00
epee_utils.cpp Adding initial support for broadcasting transactions over Tor 2019-01-28 23:56:33 +00: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
hardfork.cpp ArticMine's new block weight algorithm 2019-03-04 09:33:58 +00:00
hashchain.cpp
http.cpp
is_hdd.cpp Merge pull request #4424 2018-09-29 22:19:44 +02:00
json_serialization.cpp add a bulletproof version, new bulletproof type, and rct config 2019-01-22 23:17:24 +00:00
keccak.cpp tests: fix MSYS2 gcc 7.3.0 warning -Wtype-limits 2018-10-29 08:20:15 +03:00
logging.cpp unit_tests: add logging unit test 2018-11-09 16:57:03 +00:00
long_term_block_weight.cpp ArticMine's new block weight algorithm 2019-03-04 09:33:58 +00:00
main.cpp Merge pull request #4459 2018-09-29 22:20:38 +02:00
memwipe.cpp
mlocker.cpp Merge pull request #4459 2018-09-29 22:20:38 +02:00
mnemonics.cpp added two tests for partial word and case tolerance in mnemonics 2019-01-11 13:46:20 -06:00
mul_div.cpp move int-util.h to epee 2018-12-04 15:14:29 +00:00
multiexp.cpp unit_tests: add a few more multiexp unit tests 2018-09-11 13:38:19 +00:00
multisig.cpp remove some unused code 2018-11-23 15:37:36 +00:00
net.cpp Adding initial support for broadcasting transactions over Tor 2019-01-28 23:56:33 +00:00
notify.cpp notify: handle arbitrary tags 2019-01-28 19:32:28 +00:00
output_distribution.cpp ArticMine's new block weight algorithm 2019-03-04 09:33:58 +00:00
output_selection.cpp
parse_amount.cpp
pruning.cpp Pruning 2019-01-22 20:30:51 +00:00
random.cpp crypto: remove slight bias in key generation due to modulo 2018-07-05 09:18:01 +01:00
ringct.cpp ringct: the commitment mask is now deterministic 2019-01-22 23:17:39 +00:00
ringdb.cpp Rename "blackball" for clarity 2018-10-18 18:45:45 +00:00
serialization.cpp ringct: remove unused senderPk from ecdhTuple 2019-01-22 23:17:42 +00:00
sha256.cpp
slow_memmem.cpp tests: slow_memmem now returns size_t 2018-11-23 15:36:48 +00:00
subaddress.cpp unit_tests: do not rethrow a copy of an exception 2018-11-23 15:38:00 +00:00
test_notifier.cpp unit_tests: add a notifier test 2018-10-01 09:14:20 +00:00
test_peerlist.cpp Adding initial support for broadcasting transactions over Tor 2019-01-28 23:56:33 +00:00
test_protocol_pack.cpp
test_tx_utils.cpp cryptonote: sort tx_extra fields 2018-10-07 11:13:22 +00:00
threadpool.cpp threadpool: allow leaf functions to run concurrently 2018-06-26 22:15:22 +01:00
unbound.cpp
unit_tests_utils.h
uri.cpp
varint.cpp
vercmp.cpp
wipeable_string.cpp Merge pull request #4424 2018-09-29 22:19:44 +02:00