summaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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)
| * core: check block version for alt chains toomoneromooo-monero2017-01-141-0/+8
| | | | | | | | This is incompatible with block version voting
* | Merge pull request #1576Riccardo Spagni2017-01-151-6/+3
|\ \ | | | | | | | | | ba3968f6 rct: split rct checks between semantics and other (moneromooo-monero)
| * | rct: split rct checks between semantics and othermoneromooo-monero2017-01-141-6/+3
| |/ | | | | | | Semantics can be checked early
* | Merge pull request #1571Riccardo Spagni2017-01-151-8/+8
|\ \ | | | | | | | | | 81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
| * | fix do_not_relay not preventing relaying on a timermoneromooo-monero2017-01-141-8/+8
| |/ | | | | | | Also print its value when printing pool
* | Merge pull request #1565Riccardo Spagni2017-01-151-0/+2
|\ \ | | | | | | | | | 50b230d1 core: ensure block size limit is set from the start (moneromooo-monero)
| * | core: ensure block size limit is set from the startmoneromooo-monero2017-01-131-0/+2
| |/ | | | | | | | | | | It can now be queried by RPC, so it needs to be set before it is otherwise needed for consensus, even if no blocks had to be added (ie, exit and restart quickly).
* | Merge pull request #1506Riccardo Spagni2017-01-151-2/+12
|\ \ | |/ |/| | | | | | | | | | | 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)
| * Must wait for previous batch to finish before starting new oneHoward Chu2017-01-141-1/+6
| |
| * Use batch transactions when syncingHoward Chu2017-01-141-2/+7
| | | | | | | | | | Faster throughput while avoiding corruption. I.e., makes running with --db-sync-mode safe more tolerable.
* | Merge pull request #1555Riccardo Spagni2017-01-131-3/+6
|\ \ | | | | | | | | | 758c0eb7 fix time stats mixin (luigi1111)
| * | fix time stats mixinluigi11112017-01-101-3/+6
| | | | | | | | | | | | also add blobsize
* | | wallet cli: print originating block heights of mixin keys when making transferkenshi842017-01-091-1/+1
|/ /
* | Merge pull request #1534Riccardo Spagni2017-01-081-1/+1
|\ \ | | | | | | | | | | | | | | | 1607cb7e tx_pool: better block template filling algorithm (moneromooo-monero) 9731b4e5 rpc: add block size to GET_BLOCK_HEADER RPC (moneromooo-monero) 9188b346 rpc: add current block size to the getinfo call (moneromooo-monero)
| * | tx_pool: better block template filling algorithmmoneromooo-monero2017-01-071-1/+1
| |/ | | | | | | | | | | | | | | Continue filling until we reach the block size limit, or the resulting coinbase decreases. Also remove old sanity check on block size, which is now not wanted anymore.
* | Merge pull request #1502Riccardo Spagni2017-01-081-0/+1
|\ \ | | | | | | | | | 591d8368 core: invalidate difficulty cache when resetting blockchain (moneromooo-monero)
| * | core: invalidate difficulty cache when resetting blockchainmoneromooo-monero2016-12-251-0/+1
| |/
* | Merge pull request #1493Riccardo Spagni2017-01-081-5/+5
|\ \ | |/ |/| | | 0478ac68 blockchain: allow marking "tx not found" without an exception (moneromooo-monero)
| * blockchain: allow marking "tx not found" without an exceptionmoneromooo-monero2017-01-071-5/+5
| | | | | | | | | | This is a normal occurence in many cases, and there is no need to spam the log with those when it is.
* | add tx hash to time statsluigi11112016-12-211-2/+5
|/ | | | Also miner tx hash to log level 1 (have you ever tried to find a testnet miner tx hash?)
* Merge pull request #1467Riccardo Spagni2016-12-201-0/+32
|\ | | | | | | 55fa0479 rpc: new function and RPC to get alternative chain info (moneromooo-monero)
| * rpc: new function and RPC to get alternative chain infomoneromooo-monero2016-12-171-0/+32
| |
* | also use portable serializer for boost_serialization_helper.h and ↵kenshi842016-12-201-2/+0
|/ | | | net_node.inl, completely adandon boost/archive/binary_oarchive.hpp
* blockchain: fix reorganizations past a hard fork boundarymoneromooo-monero2016-12-131-0/+3
| | | | | | | After popping blocks from the old chain, the hard fork object's notion of the current version was not in line with the new height, causing the first blocks from the new chain to be rejected due to a false expection of a newer version.
* Merge pull request #1418Riccardo Spagni2016-12-101-4/+4
|\ | | | | | | dfbb85b6 blockchain: fix setting non trovial alternate chain as invalid (moneromooo-monero)
| * blockchain: fix setting non trovial alternate chain as invalidmoneromooo-monero2016-12-081-4/+4
| | | | | | | | | | | | The wrong iterator was being used. Also preincrement iterators to avoid possibly invalidating them, I'm not sure this is necessary, but let's be safe.
* | blockchain: bring the v4 fork height one block forwardluigi11112016-12-061-3/+3
|/ | | | | This will ensure the early 0.10 daemons will barf at the fork height, and not a bit later, which could be confusing.
* Merge pull request #1398Riccardo Spagni2016-12-041-3/+3
|\ | | | | | | f4772bae Fix a few minor typos (Pierre Boyer)
| * Fix a few minor typosPierre Boyer2016-12-041-3/+3
| |
* | Merge pull request #1397Riccardo Spagni2016-12-041-1/+20
|\ \ | | | | | | | | | 3f7d6fb5 Fix delayed exit when syncing (moneromooo-monero)
| * | Fix delayed exit when syncingmoneromooo-monero2016-12-041-1/+20
| |/
* | Merge pull request #1392Riccardo Spagni2016-12-041-1/+7
|\ \ | | | | | | | | | 204b1bff blockchain: use high bound block reward on error where appropriate (moneromooo-monero)
| * | blockchain: use high bound block reward on error where appropriatemoneromooo-monero2016-12-011-1/+7
| |/ | | | | | | | | | | If the block reward to use for the fee calculation can't be calculated (should not happen in practice), use a high bound, so we use a fee overestimate that will be accepted by the network.
* / blockchain: reject invalid pubkeys from v4moneromooo-monero2016-11-281-0/+13
|/
* Add a get_outs (fully text based) version of get_outs.binmoneromooo-monero2016-11-221-1/+1
|
* rpc: add a dynamic fee estimation RPC callmoneromooo-monero2016-10-311-0/+30
|
* core: dynamic fee algorithm from ArticMinemoneromooo-monero2016-10-311-0/+52
| | | | | | | | | | | | | | | The fee will vary based on the base reward and the current block size limit: fee = (R/R0) * (M0/M) * F0 R: base reward R0: reference base reward (10 monero) M: block size limit M0: minimum block size limit (60000) F0: 0.002 monero Starts applying at v4
* wallet: select part of the fake outs from recent outputsmoneromooo-monero2016-10-151-2/+2
| | | | | | | 25% of the outputs are selected from the last 5 days (if possible), in order to avoid the common case of sending recently received outputs again. 25% and 5 days are subject to review later, since it's just a wallet level change.