summaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6729luigi11112020-07-311-1/+1
|\ | | | | | | f370093 build: prepare v0.16.0.3 release (selsta)
| * build: prepare v0.16.0.3 releaseselsta2020-07-301-1/+1
| |
* | blockchain: guard against exceptions in add_new_block/childrenmoneromooo-monero2020-07-301-0/+11
|/ | | | Reporter requested credit to be given to Decred
* Merge pull request #6672v0.16.0.1luigi11112020-06-231-1/+1
|\ | | | | | | fa199f2 build: prepare v0.16.0.1 release (selsta)
| * build: prepare v0.16.0.1 releaseselsta2020-06-211-1/+1
| |
* | Merge pull request #6651luigi11112020-06-221-1/+16
|\ \ | |/ |/| | | a67c634 blockchain: fix timestamp/difficulty cache getting out of sync (moneromooo-monero)
| * blockchain: fix timestamp/difficulty cache getting out of syncmoneromooo-monero2020-06-131-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cache is discarded when a block is popped, but then gets rebuilt when the difficulty for next block is requested. While this is all properly locked, it does not take into account the delay caused by a database transaction being only committed (and thus its effects made visible to other threads) later on, which means another thread could request difficulty between the pop and the commit, which would end up using stale database view to build the cache, but that cache would not be invalidated again when the transaction gets committed, which would cause the cache to not match the new database data. To fix this, we now keep track of when the cache is invalidated so we can invalidate it again upon database transaction commit to ensure it gets calculated again with fresh data next time it is nedeed.
* | blockchain: fix total_height in getblocks.bin responsemoneromooo-monero2020-06-111-0/+1
|/
* blockchain: detect and log bad difficulty calculationsmoneromooo-monero2020-05-171-5/+72
|
* build: prepare v0.16.0.0 releaseselsta2020-05-091-1/+1
|
* Merge pull request #6358luigi11112020-04-101-30/+2
|\ | | | | | | 8958b4e blockchain_db: faster fetching of consecutive txes (moneromooo-monero)
| * blockchain_db: faster fetching of consecutive txesmoneromooo-monero2020-02-271-30/+2
| | | | | | | | Useful for wallet refresh or node sync
* | Merge pull request #6347luigi11112020-04-041-8/+16
|\ \ | | | | | | | | | fcb06f7 cryptonote_core: skip block notify on blockchain switching rollback (xiphon)
| * | cryptonote_core: skip block notify on blockchain switching rollbackxiphon2020-02-191-8/+16
| |/
* | Merge pull request #6339luigi11112020-04-041-2/+2
|\ \ | | | | | | | | | c61abf8 remove empty statements (shopglobal)
| * | remove empty statementsInterchained2020-02-171-2/+2
| |/ | | | | | | Cleaning up a little around the code base.
* | Merge pull request #6284Alexander Blair2020-03-271-2/+2
|\ \ | | | | | | | | | 02224e71 Fix check_fee() discrepancy. (UkoeHB)
| * | Fix check_fee() discrepancy.UkoeHB2020-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | M100 = max{300kb, min{100block_median, m_long_term_effective_median_block_weight}} not M100 = max{300kb, m_long_term_effective_median_block_weight} Fix base reward in get_dynamic_base_fee_estimate(). get_dynamic_base_fee_estimate() should match check_fee() Fee is calculated based on block reward, and the reward penalty takes into account 0.5*max_block_weight (both before and after HF_VERSION_EFFECTIVE_SHORT_TERM_MEDIAN_IN_PENALTY). Moved median calculation according to best practice of 'keep definitions close to where they are used'.
* | | Merge pull request #6211Alexander Blair2020-02-281-0/+7
|\ \ \ | |_|/ |/| | | | | 5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
| * | rpc: add bad-blocks to flush_cache RPCmoneromooo-monero2019-12-021-0/+7
| | | | | | | | | | | | Flushes m_invalid_blocks in Blockchain.
* | | Merge pull request #6233luigi11112020-02-041-1/+1
|\ \ \ | | | | | | | | | | | | 8a27645 blockchain: fix flushing txes from the txpool (moneromooo-monero)
| * | | blockchain: fix flushing txes from the txpoolmoneromooo-monero2019-12-141-1/+1
| | |/ | |/|
* | | Merge pull request #6140Alexander Blair2020-01-251-3/+10
|\ \ \ | | | | | | | | | | | | 08635a08 blockchain: speedup fetching pruned contiguous tx blobs (moneromooo-monero)
| * | | blockchain: speedup fetching pruned contiguous tx blobsmoneromooo-monero2019-11-151-3/+10
| | |/ | |/| | | | | | | About twice as fast, very roughly
* | | Merge pull request #6124Alexander Blair2020-01-161-1/+6
|\ \ \ | |_|/ |/| | | | | 21d4c216 blockchain: error out if the builtin hashes data size is wrong (moneromooo-monero)
| * | blockchain: error out if the builtin hashes data size is wrongmoneromooo-monero2019-11-121-1/+6
| |/
* / Adding support for hidden (anonymity) txpoolLee Clagett2019-11-021-13/+18
|/
* 0.15.0.0 release engineeringRiccardo Spagni2019-11-021-1/+1
|
* blockchain: fix unwanted error when probing the pool for a txmoneromooo-monero2019-10-271-2/+11
|
* Merge pull request #5974luigi11112019-10-221-2/+4
|\ | | | | | | 7fcd0b5 blockchain: initialize pow to ff..ff (moneromooo-monero)
| * blockchain: initialize pow to ff..ffmoneromooo-monero2019-10-161-2/+4
| | | | | | | | as a safety to reject if it somehow does not get initialised
* | Merge pull request #5970luigi11112019-10-221-3/+12
|\ \ | | | | | | | | | ab96181 blockchain: use effective median block weight for penalty from v12 (moneromooo-monero)
| * | blockchain: use effective median block weight for penalty from v12moneromooo-monero2019-10-111-3/+12
| |/ | | | | | | | | It was using the raw block weight median, which was not what was intended in ArticMine's design
* | Merge pull request #5966luigi11112019-10-221-8/+3
|\ \ | | | | | | | | | be82c40 Support median block size > 4 GB (moneromooo-monero)
| * | Support median block size > 4 GBmoneromooo-monero2019-10-211-8/+3
| | | | | | | | | | | | | | | add a 128/64 division routine so we can use a > 32 bit median block size in calculations
* | | Merge pull request #5919luigi11112019-10-221-0/+28
|\ \ \ | | | | | | | | | | | | 01f660f blockchain: fill in cumulative block weight for alt blocks (moneromooo-monero)
| * | | blockchain: fill in cumulative block weight for alt blocksmoneromooo-monero2019-10-101-0/+28
| | | |
* | | | Merge pull request #5941luigi11112019-10-141-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | d37d30f blockchain: tweak fee as a function of median values (moneromooo-monero)
| * | | | blockchain: tweak fee as a function of median valuesmoneromooo-monero2019-09-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the lesser of the short and long terms medians, rather then the long term median alone From ArticMine: I found a bug in the new fee calculation formula with using only the long term median It actually needs to be the lesser of the long term median and the old (modified short term median) short term median with the last 10 blocks calculated as empty Yes the issue occurs if there is a large long term median and, the short term median then falls and tries to then rise again The fees are could be not high enough for example LTM and STM rise to say 2000000 bytes STM falls back to 300000 bytes Fees are now based on 2000000 bytes until LTM also falls So the STM is could prevented from rising back up STM short term median LTM long term median
* | | | | Merge pull request #5933luigi11112019-10-141-0/+2
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | 3455efa ban peers sending bad pow outright (moneromooo-monero)
| * | | | ban peers sending bad pow outrightmoneromooo-monero2019-09-251-0/+2
| | | | | | | | | | | | | | | | | | | | PoW is expensive to verify, so be strict
* | | | | Merge pull request #5915luigi11112019-10-081-50/+194
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | 8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
| * | | | monerod can now sync from pruned blocksmoneromooo-monero2019-09-271-50/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the peer (whether pruned or not itself) supports sending pruned blocks to syncing nodes, the pruned version will be sent along with the hash of the pruned data and the block weight. The original tx hashes can be reconstructed from the pruned txes and theur prunable data hash. Those hashes and the block weights are hashes and checked against the set of precompiled hashes, ensuring the data we received is the original data. It is currently not possible to use this system when not using the set of precompiled hashes, since block weights can not otherwise be checked for validity. This is off by default for now, and is enabled by --sync-pruned-blocks
* | | | | Merge pull request #5902luigi11112019-09-301-1/+3
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | b9da023 blockchain: keep block template timestamp not below recent median (moneromooo-monero)
| * | | | blockchain: keep block template timestamp not below recent medianmoneromooo-monero2019-09-111-1/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Such a template would yield an invalid block, though would require an attacker to have mined a long blockchain with drifting times (assuming the miner's clock is roughly correct) Fixed by crCr62U0
* | / / RandomX integrationHoward Chu2019-09-251-4/+40
| |/ / |/| | | | | | | | Support RandomX PoW algorithm
* | | Merge pull request #5882luigi11112019-09-241-0/+10
|\ \ \ | | | | | | | | | | | | a444f06 blockchain: enforce 10 block age for spending outputs (moneromooo-monero)
| * | | blockchain: enforce 10 block age for spending outputsmoneromooo-monero2019-09-171-0/+10
| | |/ | |/| | | | | | | | | | Some custom wallet code apparently ignores this, which causes users of that code to be fingerprinted
* | | Merge pull request #5877luigi11112019-09-241-8/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | 2cd4fd8 Changed the use of boost:value_initialized for C++ list initializer (JesusRami) 4ad191f Removed unused boost/value_init header (whyamiroot) 928f4be Make null hash constants constexpr (whyamiroot)
| * | | Changed the use of boost:value_initialized for C++ list initializerJesus Ramirez2019-09-021-8/+8
| | | |