summaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* update checkpoint hashesRiccardo Spagni2017-09-061-1/+1
|
* Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocksmoneromooo-monero2017-08-291-3/+14
|
* Merge pull request #2319Riccardo Spagni2017-08-261-1/+18
|\ | | | | | | | | c22d22e2 Cleanup test impact of adding safesyncmode() method (Howard Chu) 9a859844 Toggle SAFE syncmode on and off automatically (Howard Chu)
| * Toggle SAFE syncmode on and off automaticallyHoward Chu2017-08-201-1/+18
| | | | | | | | | | | | | | | | | | 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.
* | blockchain: cap memory size of retrieved blocksmoneromooo-monero2017-08-261-2/+7
| | | | | | | | | | It helps keep memory usage down when a wallet refreshes through a string of large blocks
* | core: add mainnet v6 fork height at 1400000moneromooo-monero2017-08-231-0/+3
|/
* protocol: pass blockchain cumulative difficulty when syncingmoneromooo-monero2017-08-151-0/+1
| | | | Not used yet.
* Merge pull request #2250Riccardo Spagni2017-08-151-1/+3
|\ | | | | | | f4f7eeba blockchain: log more info when we reject an orphan (moneromooo-monero)
| * blockchain: log more info when we reject an orphanmoneromooo-monero2017-08-041-1/+3
| | | | | | | | We want to know what happened when a block is wrongly rejected
* | Merge pull request #2246Riccardo Spagni2017-08-151-11/+3
|\ \ | | | | | | | | | d732c73e blockchain: remove a few unused variables (moneromooo-monero)
| * | blockchain: remove a few unused variablesmoneromooo-monero2017-08-031-11/+3
| |/
* | Merge pull request #2237Riccardo Spagni2017-08-151-8/+8
|\ \ | | | | | | | | | | | | | | | 5d4ef719 core: speed up output index unique set calculation (moneromooo-monero) 19d7f568 perf_timer: allow profiling more granular than millisecond (moneromooo-monero) bda8c598 epee: add nanosecond timer and pause/restart profiling macros (moneromooo-monero)
| * | core: speed up output index unique set calculationmoneromooo-monero2017-08-011-8/+8
| |/ | | | | | | | | | | | | | | | | A sort+uniq step was done for every tx in a 200 block chunk, causing a lot of repeated scanning as the size of the offset map got larger with every added tx. We now do the step only once at the end of the loop. Doing it this way potentially uses more memory, but testing shows that it's currently only about 2% more.
* | change mixin to ring size in user visible placesmoneromooo-monero2017-08-071-6/+6
| |
* | Merge pull request #2225Riccardo Spagni2017-08-071-0/+9
|\ \ | | | | | | | | | 5d91b26c blockchain: skip checking tx semantics in embedded block hash range (moneromooo-monero)
| * | blockchain: skip checking tx semantics in embedded block hash rangemoneromooo-monero2017-07-301-0/+9
| |/ | | | | | | | | If the txes are bad, this'll be picked up by the block hash mismatch since the tx merkle root is part of the block hash.
* | Merge pull request #2243Riccardo Spagni2017-08-071-0/+2
|\ \ | | | | | | | | | 4d873046 blockchain: add testnet v6 fork height at 971400 (moneromooo-monero)
| * | blockchain: add testnet v6 fork height at 971400moneromooo-monero2017-08-071-0/+2
| |/
* | Merge pull request #2222Riccardo Spagni2017-08-071-1/+2
|\ \ | | | | | | | | | 878205f1 core: fix lock ordering bug at init time (moneromooo-monero)
| * | core: fix lock ordering bug at init timemoneromooo-monero2017-07-291-1/+2
| |/
* | Merge pull request #2216Riccardo Spagni2017-08-071-6/+6
|\ \ | | | | | | | | | | | | | | | d8becf2e blockchain: fix cryptonight buffer leak on exit (moneromooo-monero) 91aa90fc blockchain: ensure all blocks get their longhash precalculated (moneromooo-monero) ff4bcaed blockchain: pass correct height to get_block_longhash (moneromooo-monero)
| * | blockchain: fix cryptonight buffer leak on exitmoneromooo-monero2017-07-281-1/+1
| | |
| * | blockchain: ensure all blocks get their longhash precalculatedmoneromooo-monero2017-07-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the number of blocks to check was not a multiple of the number of preparation threads, the last few blocks would not be included in the threaded long hash calculation. Those would still get calculated when the block gets added to the chain, however, so this was only a tiny performance hit, rather than a security bug.
| * | blockchain: pass correct height to get_block_longhashmoneromooo-monero2017-07-271-4/+2
| |/
* / blockchain: one off warning when seeing a block with unknown versionmoneromooo-monero2017-07-241-0/+14
|/
* blockchain_db: add a txpool tx getter which returns existencemoneromooo-monero2017-06-111-0/+5
| | | | Avoids exception spam for the "nope, not found" case
* Don't copy blockchain for coinbase_tx_sumHoward Chu2017-06-011-2/+2
| | | | | Changed Blockchain::for_all_blocks() to for_blocks_range() Operate on blockchain in-place instead of building a copy first.
* Merge pull request #1982Riccardo Spagni2017-05-301-3/+71
|\ | | | | | | b52abd13 Move txpool to the database (moneromooo-monero)
| * Move txpool to the databasemoneromooo-monero2017-05-251-3/+71
| | | | | | | | | | | | | | Integration could go further (ie, return_tx_to_pool calls should not be needed anymore, possibly other things). poolstate.bin is now obsolete.
* | Merge pull request #1968Riccardo Spagni2017-04-241-1/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 5e5b8512 Fix obsolete OpenSSL API usage (hyc) 6c72d6a0 Fix Android recognition (hyc) e65d66fe Fix ARM64 identification (hyc) a4673218 Clean up ARMv8-a aes_expand_key() (hyc) a3d77901 Fix block_longhash_worker thread (hyc)
| * | Fix block_longhash_worker threadhyc2017-04-121-1/+3
| |/ | | | | | | | | Wasn't getting its stack size initialized; crashes on Android with a default stack size of 1MB.
* / Add expected total reward to RPC "getblocktemplate".assylias2017-04-191-2/+2
|/ | | | Only works from V5 fork onward - returns 0 before that block.
* Fixed typo in v5 hard fork finalized dateDerek Zhang2017-03-241-1/+1
|
* blockchain: offset v5 addition date on testnetmoneromooo-monero2017-03-241-1/+1
| | | | | to silence the update warning, since v5 was done very early on testnet
* blockchain: lower the relay fee by 2%moneromooo-monero2017-03-201-1/+1
| | | | | This ensures we accept txes with a fee that's slightly too small, to accomodate blockchain median jitter
* Add intervening v5 fork for increased min block sizemoneromooo-monero2017-03-151-14/+19
| | | | | | | | | | Minimum mixin 4 and enforced ringct is moved from v5 to v6. v5 is now used for an increased minimum block size (from 60000 to 300000) to cater for larger typical/minimum transaction size. The fee algorithm is also changed to decrease the base per kB fee, and add a cheap tier for those transactions which we do not care if they get delayed (or even included in a block).
* blockchain: don't try to load an empty block hash setmoneromooo-monero2017-03-051-1/+1
| | | | | | | If the blocks aren't being linked against a binary (such as one of the blockchain utilities), the symbol will not be NULL, but the size will be 0. This avoids a apurious warning about the data hash.
* core: quantize per kB fee to 8 decimalsmoneromooo-monero2017-03-031-1/+19
|
* core: protect precomputed block hashes with SHA256moneromooo-monero2017-02-231-1/+28
|
* update copyright year, fix occasional lack of newline at line endRiccardo Spagni2017-02-211-1/+1
|
* Merge pull request #1727Riccardo Spagni2017-02-211-22/+69
|\ | | | | | | 0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
| * blockchain_db: add "raw" blobdata getters for block and transactionmoneromooo-monero2017-02-131-22/+69
| | | | | | | | This speeds up operations such as serving blocks to syncing peers
* | Merge pull request #1724Riccardo Spagni2017-02-211-1/+1
|\ \ | | | | | | | | | cca95c1c blockchain_db: do not throw on expected partial results getting keys (moneromooo-monero)
| * | blockchain_db: do not throw on expected partial results getting keysmoneromooo-monero2017-02-131-1/+1
| |/ | | | | | | | | | | | | | | | | When scanning for outputs used in a set of incoming blocks, we expect that some of the inputs in their transactions will not be found in the blockchain, as they could be in previous blocks in that set. Those outputs will be scanned there at a later point. In this case, we add a flag to control wehther an output not being found is expected or not.
* / Add a few read txns to streamlineHoward Chu2017-02-181-0/+4
|/ | | | Slight perf gain, but mainly to reduce spam at loglevel 3
* extract some basic code from libcryptonote_core into libcryptonote_basickenshi842017-02-081-6/+5
|
* Replace BOOST_REVERSE_FOREACH with ranged forMiguel Herranz2017-01-221-1/+2
|
* rpc: fix orphan_status when getting blocksmoneromooo-monero2017-01-221-1/+5
| | | | It was always set to false, even for orphan blocks
* Change logging to easylogging++moneromooo-monero2017-01-161-128/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the epee and data_loggers logging systems with a single one, and also adds filename:line and explicit severity levels. Categories may be defined, and logging severity set by category (or set of categories). epee style 0-4 log level maps to a sensible severity configuration. Log files now also rotate when reaching 100 MB. To select which logs to output, use the MONERO_LOGS environment variable, with a comma separated list of categories (globs are supported), with their requested severity level after a colon. If a log matches more than one such setting, the last one in the configuration string applies. A few examples: This one is (mostly) silent, only outputting fatal errors: MONERO_LOGS=*:FATAL This one is very verbose: MONERO_LOGS=*:TRACE This one is totally silent (logwise): MONERO_LOGS="" This one outputs all errors and warnings, except for the "verify" category, which prints just fatal errors (the verify category is used for logs about incoming transactions and blocks, and it is expected that some/many will fail to verify, hence we don't want the spam): MONERO_LOGS=*:WARNING,verify:FATAL Log levels are, in decreasing order of priority: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE Subcategories may be added using prefixes and globs. This example will output net.p2p logs at the TRACE level, but all other net* logs only at INFO: MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE Logs which are intended for the user (which Monero was using a lot through epee, but really isn't a nice way to go things) should use the "global" category. There are a few helper macros for using this category, eg: MGINFO("this shows up by default") or MGINFO_RED("this is red"), to try to keep a similar look and feel for now. Existing epee log macros still exist, and map to the new log levels, but since they're used as a "user facing" UI element as much as a logging system, they often don't map well to log severities (ie, a log level 0 log may be an error, or may be something we want the user to see, such as an important info). In those cases, I tried to use the new macros. In other cases, I left the existing macros in. When modifying logs, it is probably best to switch to the new macros with explicit levels. The --log-level options and set_log commands now also accept category settings, in addition to the epee style log levels.
* Merge pull request #1577Riccardo Spagni2017-01-151-0/+8
|\ | | | | | | feb499aa core: check block version for alt chains too (moneromooo-monero)