9137ad2cblockchain: add a testnet v9 a day after v8 (moneromooo-monero)ac4f71c2wallet2: bump testnet rollback to account for coming reorg (moneromooo-monero)8f418a6dbulletproofs: #include <openssl/bn.h> (moneromooo-monero)2bf63650bulletproofs: speed up the latest changes a bit (moneromooo-monero)044dff5abulletproofs: scale points by 8 to ensure subgroup validity (moneromooo-monero)c83012c4bulletproofs: match aggregated verification to sarang's latest prototype (moneromooo-monero)ce0c7432performance_tests: add padded bulletproof construction (moneromooo-monero)1224e53bcore_tests: add a test for 4-aggregated BP verification (moneromooo-monero)0e6ed559fuzz_tests: add a bulletproof fuzz test (moneromooo-monero)463434d1more comprehensive test for ge_p3 comparison to identity/point at infinity (moneromooo-monero)d0a0565funit_tests: add a few more multiexp unit tests (moneromooo-monero)6526d87fcore_tests: add a test for a tx with empty bulletproof (moneromooo-monero)a129bbd9multiexp: fix maxscalar off by one (moneromooo-monero)7ed496ccringct: error out when hashToPoint* returns the point at infinity (moneromooo-monero)d1591853cryptonote_basic: check output type before using it (moneromooo-monero)61632dc1ringct: prevent a potential very large allocation (moneromooo-monero)a4317e61crypto: some paranoid checks in generate_signature/check_signature (moneromooo-monero)7434df1ccrypto: never return zero in random32_unbiased (moneromooo-monero)0825e974multiexp: fix wrong Bos-Coster result for 1 non trivial input (moneromooo-monero)a1359ad4Check inputs to addKeys are in range (moneromooo-monero)fe0fa3b9bulletproofs: reject x, y, z, or w[i] being zero (moneromooo-monero)5ffb2ff9v8: per byte fee, pad bulletproofs, fixed 11 ring size (moneromooo-monero)869b3bf8bulletproofs: a few fixes from the Kudelski review (moneromooo-monero)c4291762bulletproofs: reject points not in the main subgroup (moneromooo-monero)15697177bulletproofs: speed up a few multiplies using existing Hi cache (moneromooo-monero)0b05a0faAdd Pippenger cache and limit Straus cache size (moneromooo-monero)51eb3bdcadd pippenger unit tests (moneromooo-monero)b17b8db3performance_tests: add stats and loop count multiplier options (moneromooo-monero)7314d919perf_timer: split timer class into a base one and a logging one (moneromooo-monero)d126a02bperformance_tests: add aggregated bulletproof tx verification (moneromooo-monero)263431c4Pippenger multiexp (moneromooo-monero)1ed0ed4dmultiexp: cut down on memory allocations (moneromooo-monero)1b867e7fprecalc the ge_p3 representation of H (moneromooo-monero)ef56529fperformance_tests: document the tested bulletproof layouts (moneromooo-monero)30111780unit_tests: a couple more bulletproof unit tests for gamma (moneromooo-monero)c444b1b2require canonical multi output bulletproof layout (moneromooo-monero)7e67c52fAdd a define for the max number of bulletproof multi-outputs (moneromooo-monero)2a8fcb42Bulletproof aggregated verification and tests (moneromooo-monero)126196b0multiexp: some speedups (moneromooo-monero)71d67bdaaligned: aligned memory alloc/realloc/free (moneromooo-monero)cb9ecab1performance_tests: add signature generation/verification (moneromooo-monero)bacf0a1ebulletproofs: add aggregated verification (moneromooo-monero)e895c3demake straus cached mode thread safe, and add tests for it (moneromooo-monero)7f48bf05multiexp: bos coster now works for just one point (moneromooo-monero)9ce9f8cabulletproofs: add multi output bulletproofs to rct (moneromooo-monero)f34e2e20performance_tests: add tx checking tests with more than 2 outputs (moneromooo-monero)0793184bperformance_tests: add a --verbose flag, and default to terse (moneromooo-monero)939bc223add Straus multiexp (moneromooo-monero)9ff6e6a0ringct: add bos coster multiexp (moneromooo-monero)e9164bb3bulletproofs: misc optimizations (moneromooo-monero)112f32f0performance_tests: add crypto ops (moneromooo-monero)f5d7b993performance_tests: add bulletproofs (moneromooo-monero)8f4ce989performance_tests: add RingCT MLSAG gen/ver tests (moneromooo-monero)1aa10c43performance_tests: add (Borromean) range proofs (moneromooo-monero)aacfd6e3bulletproofs: multi-output bulletproofs (moneromooo-monero)cb1cc757performance_tests: don't override log level to 0 (moneromooo-monero)
Running all tests
To run all tests, run:
cd /path/to/monero
make [-jn] debug-test # where n is number of compiler processes
To test a release build, replace debug-test with release-test in the previous command.
Core tests
Core tests take longer than any other Monero tests, due to the high amount of computational work involved in validating core components.
Tests are located in tests/core_tests/, and follow a straightforward naming convention. Most cases cover core functionality (block_reward.cpp, chaingen.cpp, rct.cpp, etc.), while some cover basic security tests (double_spend.cpp & integer_overflow.cpp).
To run only Monero's core tests (after building):
cd build/debug/tests/core
ctest
To run the same tests on a release build, replace debug with release.
Crypto Tests
Crypto tests are located under the tests/crypto directory.
crypto-tests.hcontains test harness headersmain.cppimplements the driver for the crypto tests
Tests correspond to components under src/crypto/. A quick comparison reveals the pattern, and new tests should continue the naming convention.
To run only Monero's crypto tests (after building):
cd build/debug/tests/crypto
ctest
To run the same tests on a release build, replace debug with release.
Daemon tests
[TODO]
Functional tests
[TODO]
Functional tests are located under the tests/functional directory.
First, run a regtest daemon in the offline mode and with a fixed difficulty:
monerod --regtest --offline --fixed-difficulty 1
Alternatively, you can run multiple daemons and let them connect with each other by using --add-exclusive-node. In this case, make sure that the same fixed difficulty is given to all the daemons.
Next, restore a mainnet wallet with the following seed and restore height 0 (the file path doesn't matter):
velvet lymph giddy number token physics poetry unquoted nibs useful sabotage limits benches lifestyle eden nitrogen anvil fewest avoid batch vials washing fences goat unquoted
Open the wallet file with monero-wallet-rpc with RPC port 18083. Finally, start tests by invoking ./blockchain.py or ./speed.py
Fuzz tests
Fuzz tests are written using American Fuzzy Lop (AFL), and located under the tests/fuzz directory.
An additional helper utility is provided contrib/fuzz_testing/fuzz.sh. AFL must be installed, and some additional setup may be necessary for the script to run properly.
Hash tests
Hash tests exist under tests/hash, and include a set of target hashes in text files.
To run only Monero's hash tests (after building):
cd build/debug/tests/hash
ctest
To run the same tests on a release build, replace debug with release.
Libwallet API tests
[TODO]
Net Load tests
[TODO]
Performance tests
Performance tests are located in tests/performance_tests, and test features for performance metrics on the host machine.
To run only Monero's performance tests (after building):
cd build/debug/tests/performance_tests
./performance_tests
If the performance_tests binary does not exist, try running make in the build/debug/tests/performance_tests directory.
To run the same tests on a release build, replace debug with release.
Unit tests
Unit tests are defined under the tests/unit_tests directory. Independent components are tested individually to ensure they work properly on their own.
To run only Monero's unit tests (after building):
cd build/debug/tests/unit_tests
ctest
To run the same tests on a release build, replace debug with release.
Writing new tests
Test hygiene
When writing new tests, please implement all functions in .cpp or .c files, and only put function headers in .h files. This will help keep the fairly complex test suites somewhat sane going forward.
Writing fuzz tests
[TODO]