aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/hardfork.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Copyright: Update to 2022mj-xmr2022-03-041-1/+1
|
* Remove unused variables in monero codebaseKevin Barbour2021-02-091-1/+0
| | | | | | | | | | | There are quite a few variables in the code that are no longer (or perhaps never were) in use. These were discovered by enabling compiler warnings for unused variables and cleaning them up. In most cases where the unused variables were the result of a function call the call was left but the variable assignment removed, unless it was obvious that it was a simple getter with no side effects.
* Update copyright year to 2020SomaticFanatic2020-05-061-1/+1
| | | | Update copyright year to 2020
* testdb: add override keyword where missingstoffu2019-04-171-6/+6
| | | | and delete obsolete BlockchainBDB::get_tx_output_indices along the way
* Update 2019 copyrightbinaryFate2019-03-051-1/+1
|
* ArticMine's new block weight algorithmmoneromooo-monero2019-03-041-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* tests: add unit tests for get_output_distributionmoneromooo-monero2018-11-161-87/+7
|
* core: avoid unnecessary tx/blob conversionsmoneromooo-monero2018-11-011-1/+1
|
* v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero2018-09-111-2/+2
|
* blockchain_db: remove unused get_output_key variantmoneromooo-monero2018-07-301-1/+0
| | | | It was actually incorrect, as it would not return commitment
* Merge pull request #4013luigi11112018-07-191-0/+1
|\ | | | | | | e5592c4 rpc: add blockchain disk size to getinfo (moneromooo-monero)
| * rpc: add blockchain disk size to getinfomoneromooo-monero2018-06-201-0/+1
| | | | | | | | | | This should help new nodes predict how much disk space will be needed for a full sync
* | Merge pull request #3981luigi11112018-07-191-18/+20
|\ \ | | | | | | | | | 45e419b db: store cumulative rct output distribution in the db for speed (moneromooo-monero)
| * | db: store cumulative rct output distribution in the db for speedmoneromooo-monero2018-07-131-18/+20
| |/ | | | | | | | | | | | | | | | | This gets rid of the temporary precalc cache. Also make the RPC able to send data back in binary or JSON, since there can be a lot of data This bumps the LMDB database format to v3, with migration.
* | Merge pull request #3854luigi11112018-07-191-0/+1
|\ \ | |/ |/| | | | | | | | | 149da42 db_lmdb: enable batch transactions by default (stoffu) 34cb6b4 add --regtest and --fixed-difficulty for regression testing (vicsn) 9e1403e update get_info RPC and bump RPC version (vicsn) 207b66e first new functional tests (vicsn)
| * add --regtest and --fixed-difficulty for regression testingvictorsintnicolaas2018-06-291-0/+1
| | | | | | | | | | | | | | on_generateblocks RPC call combines functionality from the on_getblocktemplate and on_submitblock RPC calls to allow rapid block creation. Difficulty is set permanently to 1 for regtest. Makes use of FAKECHAIN network type, but takes hard fork heights from mainchain Default reserve_size in generate_blocks RPC call is now 1. If it is 0, the following error occurs 'Failed to calculate offset for'. Queries hard fork heights info of other network types
* | unit_tests/hardfork: add tests for get_voting_info()stoffu2018-05-301-0/+49
| |
* | hardfork: fix get_next_version()stoffu2018-05-301-0/+29
| |
* | unit_tests/hardfork: add tests for check_for_height()stoffu2018-05-301-0/+24
| |
* | hardfork: fix get_earliest_ideal_height_for_version() to support ↵stoffu2018-05-301-0/+25
|/ | | | non-existent versions
* Merge pull request #3251luigi11112018-05-291-2/+4
|\ | | | | | | b9389e5 db_lmdb: save pruned and prunable tx data separately (moneromooo-monero)
| * db_lmdb: save pruned and prunable tx data separatelymoneromooo-monero2018-05-231-2/+4
| | | | | | | | This bumps DB version to 2, migration code will run for v1 DBs
* | unit_tests: fix build after get_output_didstribution signature changemoneromooo-monero2018-05-211-1/+1
|/
* speed up get_output_distribution (and precalc common case)moneromooo-monero2018-05-211-0/+1
|
* Revert "Merge pull request #3775"Riccardo Spagni2018-05-211-1/+1
| | | | | This reverts commit 20ef37bbcac7715d5299dd77d401583420e07ced, reversing changes made to 40070a661fd2ff503e07f4ed48dfe9fe67cfa297.
* unit_tests: fix build after get_output_didstribution signature changemoneromooo-monero2018-04-281-1/+1
|
* add RPC to get a histogram of outputs of a given amountmoneromooo-monero2018-03-161-1/+2
|
* Update 2018 copyrightxmr-eric2018-01-261-1/+1
|
* Fix exceptions not finding txpool txes when relayingmoneromooo-monero2017-12-201-1/+1
|
* Protect node privacy by proper filtering in restricted-mode RPC answersbinaryFate2017-11-081-2/+2
| | | | | | | | | | | | | This patch allows to filter out sensitive information for queries that rely on the pool state, when running in restricted mode. This filtering is only applied to data sent back to RPC queries. Results of inline commands typed locally in the daemon are not affected. In practice, when running with `--restricted-rpc`: * get_transaction_pool will list relayed transactions with the fields "last relayed time" and "received time" set to zero. * get_transaction_pool will not list transaction that have do_not_relay set to true, and will not list key images that are used only for such transactions * get_transaction_pool_hashes.bin will not list such transaction * get_transaction_pool_stats will not count such transactions in any of the aggregated values that are computed The implementation does not make filtering the default, so developers should be mindful of this if they add new RPC functionality. Fixes #2590.
* Use actual batch size for resize estimatesHoward Chu2017-09-171-1/+1
| | | | | | | And optimize import startup: Remember start_height position during initial count_blocks pass to avoid having to reread entire file again to arrive at start_height
* Toggle SAFE syncmode on and off automaticallyHoward Chu2017-08-201-0/+1
| | | | | | | | | If monerod is started with default sync mode, set it to SAFE after synchronization completes. Set it back to FAST if synchronization restarts (e.g. because another peer has a longer blockchain). If monerod is started with an explicit sync mode, none of this automation takes effect.
* DB cleanupHoward Chu2017-08-191-1/+1
| | | | | Hide LMDB-specific stuff behind blockchain_db.h. Nobody besides blockchain_db.cpp should ever be including DB-specific headers any more.
* blockchain_db: add a txpool tx getter which returns existencemoneromooo-monero2017-06-111-0/+1
| | | | Avoids exception spam for the "nope, not found" case
* Don't copy blockchain for coinbase_tx_sumHoward Chu2017-06-011-1/+1
| | | | | Changed Blockchain::for_all_blocks() to for_blocks_range() Operate on blockchain in-place instead of building a copy first.
* Move txpool to the databasemoneromooo-monero2017-05-251-0/+9
| | | | | | | Integration could go further (ie, return_tx_to_pool calls should not be needed anymore, possibly other things). poolstate.bin is now obsolete.
* fix dependency: put HardFork back to cryptonote_basic, made some ↵kenshi842017-03-101-1/+1
| | | | BlockchainDB functions virtual again to avoid missing symbols error
* core: move hardfork back to cryptonote_coremoneromooo-monero2017-02-251-1/+1
| | | | | should fix a cross dependency betewen cryptonote_basic and blockchain_db
* update copyright year, fix occasional lack of newline at line endRiccardo Spagni2017-02-211-1/+1
|
* Merge pull request #1758Riccardo Spagni2017-02-211-1/+2
|\ | | | | | | 5664826a unit_tests: hardfork unit test now needs get_block_blob_from_height (moneromooo-monero)
| * unit_tests: hardfork unit test now needs get_block_blob_from_heightmoneromooo-monero2017-02-211-1/+2
| |
* | More for PR #1724Howard Chu2017-02-211-1/+1
|/ | | | Fix unit_tests build (get_output_key API change)
* blockchain_db: add "raw" blobdata getters for block and transactionmoneromooo-monero2017-02-131-1/+3
| | | | This speeds up operations such as serving blocks to syncing peers
* extract some basic code from libcryptonote_core into libcryptonote_basickenshi842017-02-081-1/+1
|
* unit_tests: fix missing return after batch_start prototype changemoneromooo-monero2017-01-211-1/+1
|
* Merge pull request #1506Riccardo Spagni2017-01-151-1/+1
|\ | | | | | | | | | | | | | | 3ff54bdd Check for correct thread before ending batch transaction (Howard Chu) eaf8470b Must wait for previous batch to finish before starting new one (Howard Chu) c903c554 Don't cache block height, always get from DB (Howard Chu) eb1fb601 Tweak default db-sync-mode to fast:async:1 (Howard Chu) 0693cff9 Use batch transactions when syncing (Howard Chu)
| * Use batch transactions when syncingHoward Chu2017-01-141-1/+1
| | | | | | | | | | Faster throughput while avoiding corruption. I.e., makes running with --db-sync-mode safe more tolerable.
* | blockchain: allow marking "tx not found" without an exceptionmoneromooo-monero2017-01-071-0/+1
|/ | | | | This is a normal occurence in many cases, and there is no need to spam the log with those when it is.
* Fixed undefined behavior in TestDBLee Clagett2016-11-231-2/+2
|
* unit_tests: fix build after get_output_histogram signature changemoneromooo-monero2016-10-191-1/+1
|