aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/long_term_block_weight.cpp
Commit message (Collapse)AuthorAgeFilesLines
* add a test for the long term weight cacheBoog9002023-10-021-0/+35
|
* Copyright: Update to 2022mj-xmr2022-03-041-1/+1
|
* tx_pool: full tx revalidation on fork boundariesmoneromooo-monero2021-11-011-5/+10
| | | | | | avoids mining txes after a fork that are invalid by this fork's rules, but were valid by the previous fork rules at the time they were verified and added to the txpool.
* Update copyright year to 2020SomaticFanatic2020-05-061-1/+1
| | | | Update copyright year to 2020
* unit_tests/long_term_block_weight: some tweaks that seem to make more sensestoffu2019-04-091-8/+9
|
* unit_tests: fix long term block weight test after cache changemoneromooo-monero2019-04-031-0/+5
|
* blockchain: speed up getting N blocks weights/long term weightsmoneromooo-monero2019-03-081-0/+12
|
* save some database calls when getting top block hash and heightmoneromooo-monero2019-03-051-1/+3
|
* Avoid repeated (de)serialization when syncingmoneromooo-monero2019-03-051-14/+14
|
* ArticMine's new block weight algorithmmoneromooo-monero2019-03-041-0/+384
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.