aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/testdb.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-04-17testdb: add override keyword where missingstoffu1-101/+100
and delete obsolete BlockchainBDB::get_tx_output_indices along the way
2019-04-14blockchain_db: fix db txn ending too earlymoneromooo-monero1-3/+7
The db txn in add_block ending caused the entire overarching batch txn to stop. Also add a new guard class so a db txn can be stopped in the face of exceptions. Also use a read only db txn in init when the db itself is read only, and do not save the max tx size in that case.
2019-04-05cryptonote: rework block blob size sanity checkmoneromooo-monero1-0/+3
Use the actual block weight limit, assuming that weight is always greater or equal to size
2019-03-21Merge pull request #5256Riccardo Spagni1-0/+2
4b21d38d blockchain: speed up getting N blocks weights/long term weights (moneromooo-monero)
2019-03-08blockchain: speed up getting N blocks weights/long term weightsmoneromooo-monero1-0/+2
2019-03-05Update 2019 copyrightbinaryFate1-1/+1
2019-03-05save some database calls when getting top block hash and heightmoneromooo-monero1-1/+1
2019-03-05Avoid repeated (de)serialization when syncingmoneromooo-monero1-1/+1
2019-03-04ArticMine's new block weight algorithmmoneromooo-monero1-0/+152
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.