aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/hardfork.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-03-10fix dependency: put HardFork back to cryptonote_basic, made some ↵kenshi841-417/+0
BlockchainDB functions virtual again to avoid missing symbols error
2017-03-03Fix #1824 don't end batch that we didn't startHoward Chu1-2/+3
2017-02-25core: move hardfork back to cryptonote_coremoneromooo-monero1-0/+416
should fix a cross dependency betewen cryptonote_basic and blockchain_db
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-416/+0
2017-01-16Change logging to easylogging++moneromooo-monero1-0/+3
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.
2017-01-14core: check block version for alt chains toomoneromooo-monero1-0/+13
This is incompatible with block version voting
2016-08-12daemon: print time to next forkmoneromooo-monero1-0/+12
2016-07-25hardfork: fix off by one in rescaning fork state after restartmoneromooo-monero1-3/+8
This code should die anyway.
2016-07-13remove hf_starting_height dbmoneromooo-monero1-17/+6
It's not really needed, it used to be an optimization for when that code was not using the db and needed to recalculate things fast on startup.
2016-02-23read txn/cursor stuffHoward Chu1-1/+5
Could wrap more later.
2016-02-08hardfork: add a default fork entry for v1 if none existmoneromooo-monero1-0/+5
To avoid special cases
2016-02-01hardfork: allow passing chain height in get(height) for conveniencemoneromooo-monero1-1/+4
2016-01-30hardfork: fix mixup in indexing variable in get_voting_infomoneromooo-monero1-1/+1
2016-01-15hardfork: fix accepting v2 blocks too earlymoneromooo-monero1-2/+1
2015-12-31fixed copyrights with bad year referencesRiccardo Spagni1-1/+1
2015-12-30Merge pull request #570Riccardo Spagni1-1/+1
fc34132 Remove assert from status command (hyc)
2015-12-27Remove assert from status commandhyc1-1/+1
Crashes every time...
2015-12-26hardfork: ensure current_fork_index can not become negative on rescanmoneromooo-monero1-1/+1
2015-12-19Allow the wallet to access hard fork informationmoneromooo-monero1-1/+11
And make it change behavior slightly when close/after first hard fork
2015-12-14hardfork: only accept major versions we know aboutmoneromooo-monero1-0/+1
2015-11-24hardfork: fix more major/minor issuesmoneromooo-monero1-17/+18
Also add some more tests, and rename some instances of "version" and "add" for clarity. NOTE: the starting height values are sometimes wrong. I suspect this is due to the hard fork reorg code being buggy, since they're good when syncing after the fact. However, they're not actually used by the consensus code, so I'm ignoring this for now, but this needs debugging.
2015-11-23hardfork: fix rescan on loadmoneromooo-monero1-1/+1
2015-11-23hardfork: fix actual/voting confusionmoneromooo-monero1-3/+8
2015-11-10hardfork: add a get_ideal_version(uint64_t) functionmoneromooo-monero1-0/+11
It returns the ideal version for a given height, which is based on the minimum height for a fork, disregarding votes
2015-11-08hardfork: allow per-fork voting thresholdsmoneromooo-monero1-9/+16
And setup the first fork to not vote
2015-10-21hardfork: switch voting to block minor versionmoneromooo-monero1-5/+16
Using major version would cause older daemons to reject those blocks as they fail to deserialize blocks with a major version which is not 1. There is no such restriction on the minor version, so switching allows older daemons to coexist with newer ones till the actual fork date, when most will hopefully have updated already. Also, for the same reason, we consider a vote for 0 to be a vote for 1, since older daemons set minor version to 0.
2015-10-17hardfork: use DB transactions when reorganizingmoneromooo-monero1-3/+3
It speeds up a lot, which can be significant when reorganizing from the genesis block to create the hard fork data.
2015-10-17hardfork: simplify work done on reloadmoneromooo-monero1-1/+37
There is no need to fully recalculate and rewrite state, just refill state from the DB.
2015-10-04hardfork: move an assert so it actually worksmoneromooo-monero1-1/+1
An unsigned quantity is always >= 0
2015-09-27hardfork: rescan speedupmoneromooo-monero1-11/+30
Add a block height before which version 1 is assumed Use DB transactions
2015-09-27hardfork: remove use of GNU extension for initializing objectmoneromooo-monero1-2/+2
2015-09-27hardfork: change window semantics to not count the newly added blockmoneromooo-monero1-5/+20
This allows knowing the hard fork a block must obey in order to be added to the blockchain. The previous semantics would use that new block's version vote to determine this hard fork, which made it impossible to use the rules to validate transactions entering the tx pool (and made it impossible to validate a block before adding it to the blockchain).
2015-09-20hardfork: most state now saved to the DBmoneromooo-monero1-61/+48
There will be a delay on first load of an existing blockchain as it gets reparsed for this state data.
2015-09-20hardfork: remove the "parts are copyright cryptonote" noticesmoneromooo-monero1-2/+0
I coded the whole thing from scratch.
2015-09-19Add an RPC call and daemon command to get info on hard fork votingmoneromooo-monero1-2/+18
2015-09-12New hardfork classmoneromooo-monero1-0/+266
This keeps track of voting via block version, in order to decide when to enable a particular fork's code.