aboutsummaryrefslogtreecommitdiff
path: root/tests (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-11-24hardfork: fix more major/minor issuesmoneromooo-monero1-44/+57
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-21Relay transactions when they linger too long in the poolmoneromooo-monero3-4/+4
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.
2015-11-18Merge pull request #490Riccardo Spagni3-13/+13
baf101e More changes for 2-min blocks 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 (Javier Smooth) 4fea1a5 Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block version 2 (Javier Smooth)
2015-11-17tests: fix build error with CLANGmoneromooo-monero1-1/+1
2015-11-13More changes for 2-min blocksJavier Smooth1-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
2015-11-13Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block ↵Javier Smooth2-9/+9
version 2
2015-11-10hardfork: add a get_ideal_version(uint64_t) functionmoneromooo-monero1-0/+22
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-0/+28
And setup the first fork to not vote
2015-11-03unit_tests: fix build without berkeleydbmoneromooo-monero1-1/+7
2015-10-27Remove some old/obsolete/unused codemoneromooo-monero1-1/+0
git history's here if needed to get any of this back
2015-10-26Build fixes for the old blockchain_storage versionmoneromooo-monero1-0/+5
2015-10-21hardfork: switch voting to block minor versionmoneromooo-monero1-4/+1
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-21unit_tests: remove leftover debug traces in hardfork testmoneromooo-monero1-2/+0
2015-09-27hardfork: rescan speedupmoneromooo-monero1-8/+8
Add a block height before which version 1 is assumed Use DB transactions
2015-09-27hardfork: change window semantics to not count the newly added blockmoneromooo-monero1-10/+13
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-142/+200
There will be a delay on first load of an existing blockchain as it gets reparsed for this state data.
2015-09-12New hardfork classmoneromooo-monero2-1/+396
This keeps track of voting via block version, in order to decide when to enable a particular fork's code.
2015-08-27dns: make ctor privatemoneromooo-monero1-6/+6
This ensures one can't instanciate a DNSResolver object by mistake, but uses the singleton. A separate create static function is added for cases where a new object is explicitely needed.
2015-07-26Fix block_reward unit testsRostislav1-10/+10
2015-07-15** CHANGES ARE EXPERIMENTAL (FOR TESTING ONLY)NoodleDoodleNoodleDoodleNoodleDoodleNoo1-0/+2
Bockchain: 1. Optim: Multi-thread long-hash computation when encountering groups of blocks. 2. Optim: Cache verified txs and return result from cache instead of re-checking whenever possible. 3. Optim: Preload output-keys when encoutering groups of blocks. Sort by amount and global-index before bulk querying database and multi-thread when possible. 4. Optim: Disable double spend check on block verification, double spend is already detected when trying to add blocks. 5. Optim: Multi-thread signature computation whenever possible. 6. Patch: Disable locking (recursive mutex) on called functions from check_tx_inputs which causes slowdowns (only seems to happen on ubuntu/VMs??? Reason: TBD) 7. Optim: Removed looped full-tx hash computation when retrieving transactions from pool (???). 8. Optim: Cache difficulty/timestamps (735 blocks) for next-difficulty calculations so that only 2 db reads per new block is needed when a new block arrives (instead of 1470 reads). Berkeley-DB: 1. Fix: 32-bit data errors causing wrong output global indices and failure to send blocks to peers (etc). 2. Fix: Unable to pop blocks on reorganize due to transaction errors. 3. Patch: Large number of transaction aborts when running multi-threaded bulk queries. 4. Patch: Insufficient locks error when running full sync. 5. Patch: Incorrect db stats when returning from an immediate exit from "pop block" operation. 6. Optim: Add bulk queries to get output global indices. 7. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3) 8. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key 9. Optim: Added thread-safe buffers used when multi-threading bulk queries. 10. Optim: Added support for nosync/write_nosync options for improved performance (*see --db-sync-mode option for details) 11. Mod: Added checkpoint thread and auto-remove-logs option. 12. *Now usable on 32-bit systems like RPI2. LMDB: 1. Optim: Added custom comparison for 256-bit key tables (minor speed-up, TBD: get actual effect) 2. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3) 3. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key 4. Optim: Added support for sync/writemap options for improved performance (*see --db-sync-mode option for details) 5. Mod: Auto resize to +1GB instead of multiplier x1.5 ETC: 1. Minor optimizations for slow-hash for ARM (RPI2). Incomplete. 2. Fix: 32-bit saturation bug when computing next difficulty on large blocks. [PENDING ISSUES] 1. Berkely db has a very slow "pop-block" operation. This is very noticeable on the RPI2 as it sometimes takes > 10 MINUTES to pop a block during reorganization. This does not happen very often however, most reorgs seem to take a few seconds but it possibly depends on the number of outputs present. TBD. 2. Berkeley db, possible bug "unable to allocate memory". TBD. [NEW OPTIONS] (*Currently all enabled for testing purposes) 1. --fast-block-sync arg=[0:1] (default: 1) a. 0 = Compute long hash per block (may take a while depending on CPU) b. 1 = Skip long-hash and verify blocks based on embedded known good block hashes (faster, minimal CPU dependence) 2. --db-sync-mode arg=[[safe|fast|fastest]:[sync|async]:[nblocks_per_sync]] (default: fastest:async:1000) a. safe = fdatasync/fsync (or equivalent) per stored block. Very slow, but safest option to protect against power-out/crash conditions. b. fast/fastest = Enables asynchronous fdatasync/fsync (or equivalent). Useful for battery operated devices or STABLE systems with UPS and/or systems with battery backed write cache/solid state cache. Fast - Write meta-data but defer data flush. Fastest - Defer meta-data and data flush. Sync - Flush data after nblocks_per_sync and wait. Async - Flush data after nblocks_per_sync but do not wait for the operation to finish. 3. --prep-blocks-threads arg=[n] (default: 4 or system max threads, whichever is lower) Max number of threads to use when computing long-hash in groups. 4. --show-time-stats arg=[0:1] (default: 1) Show benchmark related time stats. 5. --db-auto-remove-logs arg=[0:1] (default: 1) For berkeley-db only. Auto remove logs if enabled. **Note: lmdb and berkeley-db have changes to the tables and are not compatible with official git head version. At the moment, you need a full resync to use this optimized version. [PERFORMANCE COMPARISON] **Some figures are approximations only. Using a baseline machine of an i7-2600K+SSD+(with full pow computation): 1. The optimized lmdb/blockhain core can process blocks up to 585K for ~1.25 hours + download time, so it usually takes 2.5 hours to sync the full chain. 2. The current head with memory can process blocks up to 585K for ~4.2 hours + download time, so it usually takes 5.5 hours to sync the full chain. 3. The current head with lmdb can process blocks up to 585K for ~32 hours + download time and usually takes 36 hours to sync the full chain. Averate procesing times (with full pow computation): lmdb-optimized: 1. tx_ave = 2.5 ms / tx 2. block_ave = 5.87 ms / block memory-official-repo: 1. tx_ave = 8.85 ms / tx 2. block_ave = 19.68 ms / block lmdb-official-repo (0f4a036437fd41a5498ee5e74e2422ea6177aa3e) 1. tx_ave = 47.8 ms / tx 2. block_ave = 64.2 ms / block **Note: The following data denotes processing times only (does not include p2p download time) lmdb-optimized processing times (with full pow computation): 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 1.25 hours processing time (--db-sync-mode=fastest:async:1000). 2. Laptop, Dual-core / 4-threads U4200 (3Mb) - 4.90 hours processing time (--db-sync-mode=fastest:async:1000). 3. Embedded, Quad-core / 4-threads Z3735F (2x1Mb) - 12.0 hours processing time (--db-sync-mode=fastest:async:1000). lmdb-optimized processing times (with per-block-checkpoint) 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 10 minutes processing time (--db-sync-mode=fastest:async:1000). berkeley-db optimized processing times (with full pow computation) 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 1.8 hours processing time (--db-sync-mode=fastest:async:1000). 2. RPI2. Improved from estimated 3 months(???) into 2.5 days (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000). berkeley-db optimized processing times (with per-block-checkpoint) 1. RPI2. 12-15 hours (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).
2015-06-20Set dnssec_valid value correctly in dns_utils; fix address_from_url testRostislav1-1/+2
2015-05-31cleaning up, removing redundant files, renaming, fixing incorrect licensesRiccardo Spagni2-2/+2
2015-05-20Merge pull request #290Riccardo Spagni2-0/+16
fee8424 Allow name@domain.tld for OpenAlias lookups (warptangent) a0fe18f Revert "Allow name@domain.tld for OpenAlias lookups" (warptangent)
2015-05-19Allow name@domain.tld for OpenAlias lookupswarptangent2-0/+16
Based on tewinget's update. Make OpenAlias address format independent of existing DNS functions. Add tests. Test: make debug-test cd build/debug/tests/unit_tests # test that regular DNS functions work, including IPv4 lookups. # also test function that converts OpenAlias address format make && ./unit_tests --gtest_filter=DNSResolver* # test that OpenAlias addresses like donate@getmonero.org work from # wallet tools make && ./unit_tests --gtest_filter=AddressFromURL.Success
2015-05-17s/terget/target/moneromooo-monero2-6/+6
2015-04-10[fix] log level change. compilation: dns, testsrfree2monero4-3/+9
old unbound #warning does not block compilation unit tests build fine. Even though the RPC/P2P network type is required again
2015-04-07Merge BlockchainDB into upstreamThomas Winget2-0/+327
2015-04-01Merge remote-tracking branch 'monero-official/master' into network-1.6-work1rfree2monero41-1927/+4973
2015-03-29Merge upstream into blockchainThomas Winget1-2/+34
2015-03-25update berkeleydb branch to blockchain branchThomas Winget41-1925/+4939
2015-03-25Merge upstream updates into blockchain branchThomas Winget41-1925/+4939
2015-03-24DNSSEC added (hardcoded key)Thomas Winget1-2/+34
DNSSEC is now implemented with the hardcoded key from unbound. This will need to be not hardcoded in the future, but is okay for now. Unit tests updated for DNSSEC (as well as for the fact that, contrary to previous assumption, example.com does not have a static IP address).
2015-03-24Merge pull request #243Riccardo Spagni2-3/+4
51e3579 Fixed bug in static linking boost on MINGW (Thomas Winget) f78bb00 Hopefully fixes build on Windows for real this time (Thomas Winget) 2b0583b Hopefully fixes build on Windows (Thomas Winget) 9dab105 DNS checkpoint loading for testnet should now be correct (Thomas Winget) 52f9629 sending commands to forked daemon works on testnet now (Thomas Winget) 76289d0 Fix tests building -- function signatures changed (Thomas Winget) db53e19 revert stop_daemon method to use correct exit (Thomas Winget) 96cbecf RPC calls for background daemon added in (Thomas Winget) 9193d6f Daemonize changes pulled in -- daemon builds (Thomas Winget)
2015-03-24updated gtest to latestRiccardo Spagni37-1919/+4932
2015-03-24Merge upstream to daemonize changesThomas Winget2-3/+3
Preparation for PR
2015-03-16BerkeleyDB Blockchain building, not working yetThomas Winget1-5/+23
Everything except actually *using* BlockchainBDB is wired up, but the db itself is not yet working. Some error about user mem not large enough. I think I know what this error means, but I can't determine the cause. Notes: BerkeleyDB does not allow 0-indexing in its recno type databases, so block numbers *in the database* will be 1-indexed. Modifications to indexing have been made as needed.
2015-03-16CMake wiring, minor cleanup, minor test additionThomas Winget2-1/+3
Make Cmake things aware of BerkeleyDB and BlockchainBDB Make the BlockchainDB unit tests aware of BlockchainBDB
2015-03-10Fixed includes in BlockchainDB unit testsThomas Winget1-2/+2
2015-03-01Fix tests building -- function signatures changedThomas Winget2-3/+4
2015-02-28move website and DNS unit tests from monero.cc to getmonero.orgRiccardo Spagni2-3/+3
2015-02-242014 network limit 1.3 fix log/path/data +utilsrfree2monero10-1/+23
+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).
2015-02-202014 network limit 1.0a +utils +toc -doc -drmonerorfree2monero5-0/+11
commands and options for network limiting works very well e.g. for 50 KiB/sec up and down ToS (QoS) flag peer number limit TODO some spikes in ingress/download TODO problems when other up and down limit added "otshell utils" - simple logging (with colors, text files channels)
2015-01-07add BlockchainDB tests to new cmakeThomas Winget1-0/+1
2015-01-04BlockchainDB unit tests, lmdb linker flagThomas Winget1-6/+22
Some BlockchainDB unit testing fleshed out (and working), rudimentary linker flag for lmdb in CMakeLists, but should probably be done "correctly" at some point (find it on whatever system you're building on and all that jazz). update for rebase (warptangent 2015-01-04) fix conflicts with upstream CMakeLists.txt files tests/CMakeLists.txt (remove edits from original commit)
2015-01-04Initial commit of BlockchainDB tests, other miscThomas Winget1-0/+290
miscellaneous changes to BlockchainDB/blockchain as well, namely replacing instances of std::list with std::vector
2015-01-02year updated in licenseRiccardo Spagni96-95/+95
2014-10-24cmake: fix up link linesBen Boeckel2-2/+4
2014-10-24cmake: support 2.8.7Ben Boeckel10-11/+11
Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer versions prefer PUBLIC and PRIVATE instead, but still support the LINK_ prefix.
2014-10-23cmake: fix up miniupnpc's defineBen Boeckel1-3/+5
It's only necessary on Windows builds and new versions renamed the define without any compatibility bridge.
2014-10-23daemon_tests: update cmake codeBen Boeckel1-4/+50
It's still not valid, but it's commented out anyways; update to code so it matches the style at least.
2014-10-23gtest: support an external gtestBen Boeckel3-9/+22
2014-10-23cmake: put each test executable in its own directoryBen Boeckel10-45/+562
2014-10-23Merge pull request #182Riccardo Spagni6-35/+45
1795c38 fixed unit tests (Riccardo Spagni) bc537ac miniupnpc static define change (Riccardo Spagni)
2014-10-20Apple and BSD don't need malloc.hRiccardo Spagni1-1/+5
2014-10-15removed unecessary mnemonics testRiccardo Spagni1-13/+0
2014-10-15Merge pull request #176Riccardo Spagni1-0/+167
b94b8cd Added unit test. Fails for Japanese for some reason. (Oran Juice) 4c8a628 Remove iostream header put in during testing (Oran Juice) 9875f5b Variable unique prefix lengths for seed (Oran Juice)
2014-10-15fixed conflict in tests CMakeListsRiccardo Spagni2-1/+127
2014-10-08fixed unit testsRiccardo Spagni5-35/+43
2014-10-08Added unit test. Fails for Japanese for some reason.Oran Juice1-0/+167
2014-10-07miniupnpc static define changeRiccardo Spagni1-0/+2
2014-10-06fix for mingw not playing nicely with libunbound configure, fix for ↵Riccardo Spagni1-7/+7
correctly finding static libs on various operating systems
2014-10-06use the correct CMake variable for static buildsRiccardo Spagni1-7/+7
2014-10-06tests: add a test for slow_memmemmoneromooo-monero2-1/+127
2014-10-02remove pthreads, successfully tested on gcc 4.9.1 without pthreadsRiccardo Spagni1-7/+7
2014-09-30reload checkpoints file every ~hr and print if any failThomas Winget1-0/+1
also some other minor bug squashing and code formatting
2014-09-30updated DNSResolver/things that use it for DNSSECThomas Winget1-9/+17
Note: DNSResolver does not yet *use* DNSSEC, but rather this commit is preparation for including DNSSEC validation. The function in src/wallet/wallet2.cpp that uses DNSResolver still needs its parameters updated accordingly.
2014-09-25Revert "low risk, potentially varint overflow bug patched thanks to BBR"Riccardo Spagni1-31/+0
This reverts commit 4e2b2b942daa4206ec44c66e59863670dfe3fde4.
2014-09-24low risk, potentially varint overflow bug patched thanks to BBRRiccardo Spagni1-0/+31
2014-09-24fixed unbound libs in testRiccardo Spagni1-7/+7
2014-09-23change to allow (at least a bit) for multiple TXT recordsThomas Winget2-7/+17
2014-09-23Monero addres from DNS TXT record implemented, tests passThomas Winget2-0/+141
Still need to deal with DNSSEC and optional fields in the TXT record.
2014-09-23ipv4 and ipv6 resolution workingThomas Winget1-0/+65
IPv4 and IPv6 name resolution working. Unit tests written (and passing). net_node.{h,inl} code modified to use DNS seeds.
2014-09-23Updated CMake files -- added libunbound linker flagThomas Winget1-7/+7
CMake config file written, but was unable to test/get it working properly because of a bug in CMake with functions related to find_package. Simple "-lunbound" flag used in its stead for now. May not build on non-Linux systems, not sure yet.
2014-09-15Separate testnet address prefixZachary Michaels4-15/+15
2014-09-15Pass tx and nonce to genesis block constructorZachary Michaels1-1/+1
2014-09-15Reorganize testnet constantsZachary Michaels4-9/+22
2014-09-15Add testnet flagZachary Michaels2-2/+2
Source: cryptonotefoundation
2014-09-11cpu affinity fixes in performance tests for FreeBSDfluffypony1-2/+2
2014-09-11gtest patches for FreeBSDfluffypony2-1/+9
2014-09-11fixed upnp libs in tests cmakefluffypony1-1/+31
2014-07-23License updated to BSD 3-clausefluffypony79-230/+2295
2014-07-17Merge pull request #63 from mikezackles/bytecoin_for_mergemikezackles1-1/+1
Misc fixes from bytecoin
2014-07-01Allow conditional compilation with VS 2013+Zachary Michaels1-1/+1
2014-06-30final changes to get transaction splitting building. needs testing.Thomas Winget1-1/+3
2014-06-11Link to pthreads on non-apple unixZachary Michaels1-7/+7
2014-06-04'getinfo' daemon HTTP-RPC returns 'target_height' for progress estimationsNeozaru1-0/+1
2014-05-25add checkpoints.cpp in unit testsmydesktop1-0/+140
2014-05-25extra filesmydesktop1-0/+45
2014-05-250.8.8updatemydesktop2-6/+9
2014-05-03initial [broken] updatemydesktop11-47/+126
2014-04-30mac osx building fixesmydesktop1-1/+1
2014-04-30various fixes to allow mac osx compilationmydesktop3-9/+15
2014-04-09Port mapping with UPnPAntonio Juarez1-2/+4
2014-04-02json rpc for wallet and bugfixAntonio Juarez12-99/+219
2014-03-20some fixesAntonio Juarez6-23/+162
2014-03-03moved all stuff to githubAntonio Juarez126-0/+50178