summaryrefslogtreecommitdiff
path: root/tests/core_tests
Commit message (Collapse)AuthorAgeFilesLines
* update copyright year, fix occasional lack of newline at line endRiccardo Spagni2017-02-2129-29/+29
|
* extract some basic code from libcryptonote_core into libcryptonote_basickenshi842017-02-084-14/+14
|
* core_tests: decrease trace level from trace to debugmoneromooo-monero2017-01-281-1/+1
| | | | It had become very, very spammy
* Change logging to easylogging++moneromooo-monero2017-01-164-67/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix do_not_relay not preventing relaying on a timermoneromooo-monero2017-01-141-2/+2
| | | | Also print its value when printing pool
* cmake: transitive deps and remove deprecated LINK_*redfish2016-09-181-5/+1
| | | | | | | | | | | | | | Keep the immediate direct deps at the library that depends on them, declare deps as PUBLIC so that targets that link against that library get the library's deps as transitive deps. Break dep cycle between blockchain_db <-> crytonote_core. No code refactoring, just hide cycle from cmake so that it doesn't complain (cycles are allowed only between static libs, not shared libs). This is in preparation for supproting BUILD_SHARED_LIBS cmake built-in option for building internal libs as shared.
* tests: hard fork list must end with a 0moneromooo-monero2016-08-283-4/+4
|
* New "Halfway RingCT" outputs for coinbase transactionsmoneromooo-monero2016-08-288-11/+26
| | | | | | | | | | | | | | | When RingCT is enabled, outputs from coinbase transactions are created as a single output, and stored as RingCT output, with a fake mask. Their amount is not hidden on the blockchain itself, but they are then able to be used as fake inputs in a RingCT ring. Since the output amounts are hidden, their "dustiness" is not an obstacle anymore to mixing, and this makes the coinbase transactions a lot smaller, as well as helping the TXO set to grow more slowly. Also add a new "Null" type of rct signature, which decreases the size required when no signatures are to be stored, as in a coinbase tx.
* rct amount key modified as per luigi1111's recommendationsmoneromooo-monero2016-08-281-8/+9
| | | | | | | | | This allows the key to be not the same for two outputs sent to the same address (eg, if you pay yourself, and also get change back). Also remove the key amounts lists and return parameters since we don't actually generate random ones, so we don't need to save them as we can recalculate them when needed if we have the correct keys.
* rct: change the simple flag to a typemoneromooo-monero2016-08-281-1/+1
| | | | for future expansion
* core_tests: fix a couple pre-rct tests using rctmoneromooo-monero2016-08-281-2/+2
|
* change fork settings to allow pre-rct txes for one more fork cyclemoneromooo-monero2016-08-282-9/+9
|
* rct: make the amount key derivable by a third party with the tx keymoneromooo-monero2016-08-281-5/+3
| | | | Scheme design from luigi1114.
* port get_tx_key/check_tx_key to rctmoneromooo-monero2016-08-281-2/+4
|
* integrate simple rct apimoneromooo-monero2016-08-281-1/+4
|
* rct: add the tx prefix hash into the MLSAGmoneromooo-monero2016-08-283-0/+33
| | | | to protect the non-signatures parts of the tx from tampering.
* Add rct core testsmoneromooo-monero2016-08-287-10/+764
|
* add rct to the protocolmoneromooo-monero2016-08-287-34/+25
| | | | | It is not yet constrained to a fork, so don't use on the real network or you'll be orphaned or rejected.
* tests: fix tests broken by the removal of the block reward accumulation loopmoneromooo-monero2016-05-015-23/+17
| | | | | | The tests for rejection of unmixable outputs in v2 are commented out, as there are no unmixable outputs created anymore. This should be restored at some point.
* tests: fix build with older GCCJavier Smooth2016-04-021-2/+4
|
* core_tests: fix compile failure with GCC 4.8.4moneromooo-monero2016-03-211-1/+1
| | | | Reported and tested by smooth
* Revert "Print stack trace upon exceptions"moneromooo-monero2016-03-213-10/+10
| | | | | | Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
* Print stack trace upon exceptionsmoneromooo-monero2016-03-193-10/+10
| | | | Useful for debugging users' logs
* move g_test_dbg_lock_sleep from a global to a function level staticmoneromooo-monero2016-02-221-2/+0
| | | | | This avoids the need to define that variable in every program which uses epee.
* Merge pull request #659Riccardo Spagni2016-02-171-1/+1
|\ | | | | | | d56b2e5 core_tests: fix a compile problem with CLANG (moneromooo-monero)
| * core_tests: fix a compile problem with CLANGmoneromooo-monero2016-02-131-1/+1
| | | | | | | | | | | | | | It doesn't like const objects from classes that do not have a user defined ctor, apparently. Reported by othe.
* | Add the new test filesmoneromooo-monero2016-02-132-0/+295
|/ | | | Forgot to add them before commit
* core_tests: add tests for hard fork behaviors (MRL-0004)moneromooo-monero2016-02-084-7/+22
| | | | | | We also replace the --fakechain option with an optional structure containing details about configuration for the core/blockchain, for test purposes. This seems more future friendly.
* core_tests: allow setting miner tx max_outs when creating a blockmoneromooo-monero2016-02-082-4/+6
|
* tests: fix compilation failure after V1 define renamemoneromooo-monero2016-01-311-1/+1
|
* updated copyright yearRiccardo Spagni2015-12-3125-25/+25
|
* core_tests: deinit core before destroying itmoneromooo-monero2015-12-301-1/+3
| | | | This fixes a use after free by ioservice threads
* tests: fix various tests by using parameters better suited to moneromoneromooo-monero2015-12-253-8/+8
| | | | | | Either smaller coin values (as monero has smaller block rewards), or pre-hard fork values (full reward zone), or post-Bytecoin values (emission speed).
* tests: fix some double spending testsmoneromooo-monero2015-12-251-7/+8
| | | | | | | | | | | Some tests assume the first output in a transaction goes to the recipient. However, it can be the change. When it is, the recipient's keys will not recognize this output. To fix this, we send all we have, to ensure there is no change, and the first output goes to the recipient. I'm not sure why this worked with Cryptonote. The tests sent 17 coins, which seems way smaller than the first Bytecoin block reward, so there would have been change too. Maybe outputs were not shuffled originally.
* tests: use 255 as a "too high" block versionmoneromooo-monero2015-12-251-2/+2
| | | | | While the original cryptonote accepted only the current major version, we can accept higher ones.
* blockchain: fix bitflipping test with quantized block rewardsmoneromooo-monero2015-12-251-1/+2
| | | | | | | Block reward may now be less than the full amount allowed. This was breaking the bitflipping test. We now keep track of whether a block which was accepted by the core has a lower than allowed block reward, and allow this in the test.
* core_tests: fix ring_signature_1 testsmoneromooo-monero2015-12-131-8/+8
| | | | | | | | They were trying to send too much monero, and thus failing. The parameters were set in such a way that the (simple) output gathering code could fulfill them for 4 block rewards for the original Bytecoin emission, but that does not work with monero so we need to use smaller values.
* core_tests: bump default test fee to 0.02 moneromoneromooo-monero2015-12-131-1/+1
| | | | | | The current monero consensus uses 0.01 per kB fees, so use enough for 2 kB transactions for now. It'll probably have to be either bumped further or changed to calculate the proper fee.
* add a --fakechain argument for testsmoneromooo-monero2015-12-131-0/+4
| | | | | | | | | | | The core tests use the blockchain, and reset it to be able to add test data to it. This does not play nice with the databases, since those will save that data without an explicit save call. We add a fakechain flag that the tests will set, which tells the core and blockchain code to use a separate database, as well as skip a few things like checkpoints and fixup, which only make sense for real data.
* tests: remove data-dir argument registrationmoneromooo-monero2015-12-091-1/+0
| | | | | It is already registered in cryptonote::core::init_options, which we now call
* Relay transactions when they linger too long in the poolmoneromooo-monero2015-11-211-2/+2
| | | | | | | | The last relayed time of a transaction is maintained, and transactions will be relayed again if they are still in the pool after a certain amount of time, which increases with the transaction's age. All such transactions are resent, whether or not they originated on the local node.
* More changes for 2-min blocksJavier Smooth2015-11-131-4/+4
| | | | | | Use the correct block time for realtime fuzz on locktime Use the correct block time to calculate next_difficulty on alt chains (will not work as-is with voting) Lock unit tests to original block time for now
* Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block ↵Javier Smooth2015-11-131-2/+2
| | | | version 2
* Merge remote-tracking branch 'monero-official/master' into network-1.6-work1rfree2monero2015-04-011-1/+3
|\
| * Fix tests building -- function signatures changedThomas Winget2015-03-011-1/+3
| |
* | 2014 network limit 1.3 fix log/path/data +utilsrfree2monero2015-02-242-0/+4
|/ | | | | | | | | | | +toc -doc -drmonero Fixed the windows path, and improved logging and data (for graph) logging, fixed some locks and added more checks. Still there is a locking error, not added by my patches, but present in master version (locking of map/list of peers).
* year updated in licenseRiccardo Spagni2015-01-0225-25/+25
|
* cmake: support 2.8.7Ben Boeckel2014-10-241-1/+1
| | | | | | Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer versions prefer PUBLIC and PRIVATE instead, but still support the LINK_ prefix.
* cmake: put each test executable in its own directoryBen Boeckel2014-10-231-0/+74
|
* Separate testnet address prefixZachary Michaels2014-09-151-2/+2
|