aboutsummaryrefslogtreecommitdiff
path: root/tests/functional_tests (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-10-27functional_tests: ensure mining stops on error in mining testmoneromooo-monero1-1/+11
this prevents messing up any subsequent test too
2019-10-25functional_tests: fix rpc_payment tests with python 3moneromooo-monero1-3/+4
2019-10-25daemon, wallet: new pay for RPC use systemmoneromooo-monero7-6/+506
Daemons intended for public use can be set up to require payment in the form of hashes in exchange for RPC service. This enables public daemons to receive payment for their work over a large number of calls. This system behaves similarly to a pool, so payment takes the form of valid blocks every so often, yielding a large one off payment, rather than constant micropayments. This system can also be used by third parties as a "paywall" layer, where users of a service can pay for use by mining Monero to the service provider's address. An example of this for web site access is Primo, a Monero mining based website "paywall": https://github.com/selene-kovri/primo This has some advantages: - incentive to run a node providing RPC services, thereby promoting the availability of third party nodes for those who can't run their own - incentive to run your own node instead of using a third party's, thereby promoting decentralization - decentralized: payment is done between a client and server, with no third party needed - private: since the system is "pay as you go", you don't need to identify yourself to claim a long lived balance - no payment occurs on the blockchain, so there is no extra transactional load - one may mine with a beefy server, and use those credits from a phone, by reusing the client ID (at the cost of some privacy) - no barrier to entry: anyone may run a RPC node, and your expected revenue depends on how much work you do - Sybil resistant: if you run 1000 idle RPC nodes, you don't magically get more revenue - no large credit balance maintained on servers, so they have no incentive to exit scam - you can use any/many node(s), since there's little cost in switching servers - market based prices: competition between servers to lower costs - incentive for a distributed third party node system: if some public nodes are overused/slow, traffic can move to others - increases network security - helps counteract mining pools' share of the network hash rate - zero incentive for a payer to "double spend" since a reorg does not give any money back to the miner And some disadvantages: - low power clients will have difficulty mining (but one can optionally mine in advance and/or with a faster machine) - payment is "random", so a server might go a long time without a block before getting one - a public node's overall expected payment may be small Public nodes are expected to compete to find a suitable level for cost of service. The daemon can be set up this way to require payment for RPC services: monerod --rpc-payment-address 4xxxxxx \ --rpc-payment-credits 250 --rpc-payment-difficulty 1000 These values are an example only. The --rpc-payment-difficulty switch selects how hard each "share" should be, similar to a mining pool. The higher the difficulty, the fewer shares a client will find. The --rpc-payment-credits switch selects how many credits are awarded for each share a client finds. Considering both options, clients will be awarded credits/difficulty credits for every hash they calculate. For example, in the command line above, 0.25 credits per hash. A client mining at 100 H/s will therefore get an average of 25 credits per second. For reference, in the current implementation, a credit is enough to sync 20 blocks, so a 100 H/s client that's just starting to use Monero and uses this daemon will be able to sync 500 blocks per second. The wallet can be set to automatically mine if connected to a daemon which requires payment for RPC usage. It will try to keep a balance of 50000 credits, stopping mining when it's at this level, and starting again as credits are spent. With the example above, a new client will mine this much credits in about half an hour, and this target is enough to sync 500000 blocks (currently about a third of the monero blockchain). There are three new settings in the wallet: - credits-target: this is the amount of credits a wallet will try to reach before stopping mining. The default of 0 means 50000 credits. - auto-mine-for-rpc-payment-threshold: this controls the minimum credit rate which the wallet considers worth mining for. If the daemon credits less than this ratio, the wallet will consider mining to be not worth it. In the example above, the rate is 0.25 - persistent-rpc-client-id: if set, this allows the wallet to reuse a client id across runs. This means a public node can tell a wallet that's connecting is the same as one that connected previously, but allows a wallet to keep their credit balance from one run to the other. Since the wallet only mines to keep a small credit balance, this is not normally worth doing. However, someone may want to mine on a fast server, and use that credit balance on a low power device such as a phone. If left unset, a new client ID is generated at each wallet start, for privacy reasons. To mine and use a credit balance on two different devices, you can use the --rpc-client-secret-key switch. A wallet's client secret key can be found using the new rpc_payments command in the wallet. Note: anyone knowing your RPC client secret key is able to use your credit balance. The wallet has a few new commands too: - start_mining_for_rpc: start mining to acquire more credits, regardless of the auto mining settings - stop_mining_for_rpc: stop mining to acquire more credits - rpc_payments: display information about current credits with the currently selected daemon The node has an extra command: - rpc_payments: display information about clients and their balances The node will forget about any balance for clients which have been inactive for 6 months. Balances carry over on node restart.
2019-10-15functional_tests: fix transfer test - long payment ids are gonemoneromooo-monero1-1/+1
2019-10-14wallet_rpc_server: don't report integrated addresses for 0 payment IDmoneromooo-monero1-1/+1
These are dummy ones
2019-10-14wallet: remove long payment ID sending supportmoneromooo-monero2-10/+15
2019-10-14wallet2: ignore received unencrypted payment IDs (but warn hard)moneromooo-monero1-6/+6
2019-09-24Merge pull request #5877luigi11111-1/+1
2cd4fd8 Changed the use of boost:value_initialized for C++ list initializer (JesusRami) 4ad191f Removed unused boost/value_init header (whyamiroot) 928f4be Make null hash constants constexpr (whyamiroot)
2019-09-17functional_tests: fix failure on windows removing filesmoneromooo-monero1-0/+2
2019-09-17fix wallet python test when run with ctestmoneromooo-monero2-1/+3
2019-09-17functional_tests: python3 compatibilitymoneromooo-monero7-15/+15
and add missing tests
2019-09-17functional_tests: pop exactly what we need to test before testingmoneromooo-monero10-10/+20
2019-09-17functional_tests: check for RPC methods which aren't exposedmoneromooo-monero2-0/+54
2019-09-17functional_tests: add get_transaction_pool_statsmoneromooo-monero1-0/+84
Also fix part of the RPC results being returned as binary. This makes the RPC backward incompatible.
2019-09-17functional_tests: add save_bcmoneromooo-monero1-0/+3
2019-09-17functional_tests: add is_key_image_spent testsmoneromooo-monero1-1/+45
2019-09-17functional_tests: add submitblock testmoneromooo-monero1-0/+28
2019-09-17functional_tests: check transaction fee is around what we expectmoneromooo-monero1-2/+9
2019-09-17functional_tests: add tx_notes testsmoneromooo-monero1-0/+18
2019-09-17functional_tests: add wallet attributes testmoneromooo-monero1-0/+23
2019-09-17functional_tests: add rescan_spent/rescan_blockchain testsmoneromooo-monero1-0/+39
2019-09-17functional_tests: add monero: URI testsmoneromooo-monero2-1/+235
2019-09-17wallet: add edit_address_book RPCmoneromooo-monero1-6/+71
2019-09-17functional_tests: add address book testsmoneromooo-monero2-1/+239
2019-09-17functional_tests: add wallet password change, store and tag testsmoneromooo-monero2-9/+165
2019-09-17functional_tests: add spend proof testsmoneromooo-monero1-0/+35
2019-09-17functional_tests: add test for mining via walletmoneromooo-monero1-7/+21
2019-09-17functional_tests: add multisig state testsmoneromooo-monero1-0/+68
2019-09-17functional_tests: add get_transfers testmoneromooo-monero1-0/+23
2019-09-17functional_tests: add missing sweep_dust parameters, and test itmoneromooo-monero1-0/+8
though not a very good test, but we don't have dust handy
2019-09-17functional_tests: move extraneous stuff out of the frameworkmoneromooo-monero1-5/+16
2019-09-05wallet: fix mismatch between two concepts of "balance"moneromooo-monero1-4/+4
One considers the blockchain, while the other considers the blockchain and some recent actions, such as a recently created transaction which spend some outputs, but isn't yet mined. Typically, the "balance" command wants the latter, to reflect the recent action, but things like proving ownership wants the former. This fixes a crash in get_reserve_proof, where a preliminary check and the main code used two concepts of "balance".
2019-09-02Changed the use of boost:value_initialized for C++ list initializerJesus Ramirez1-1/+1
2019-08-21Merge pull request #5511luigi11111-0/+59
914b106 wallet_rpc_server: use original addresses in destinations in get_transfers (moneromooo-monero) da694d4 functional_tests: add tests for pending/out transfer addresses (moneromooo-monero)
2019-08-17Merge pull request #5504luigi11111-2/+3
eeca5ca epee: support unicode in parsed strings (moneromooo-monero) 3e11bb5 functional_tests: test creating wallets with local language names (moneromooo-monero)
2019-08-17Merge pull request #5490luigi11111-0/+12
1a93aa4 functional_tests: add get_fee_estimate to blockchain test (moneromooo-monero)
2019-08-16functional_tests: test creating wallets with local language namesmoneromooo-monero1-2/+3
2019-08-15Merge pull request #5677luigi11111-1/+1
a5127cc tests: functional: fix python syntax (radfish)
2019-08-14Merge pull request #5498luigi11111-0/+7
6eb2638 functional_tests: add a 3/3 multisig test (moneromooo-monero)
2019-08-14Merge pull request #5487luigi11111-0/+1
df83ed7 consensus: from v12, enforce >= 2 outputs (moneromooo-monero)
2019-07-29functional_tests: add validate_address testsmoneromooo-monero1-0/+111
2019-07-24Merge pull request #5473luigi11111-4/+4
ddf7890 python-rpc: add missing getblock RPC parameters (moneromooo-monero)
2019-07-09wallet_rpc_server: fix get_bulk_payments with short payment idsmoneromooo-monero1-0/+3
2019-06-19tests: functional: fix python syntaxredfish1-1/+1
2019-06-01Merge pull request #5583Riccardo Spagni15-59/+60
77594c4f functional_tests: fix python3 compatibility (moneromooo-monero)
2019-05-29functional_tests: fix python3 compatibilitymoneromooo-monero15-59/+60
Also add missing bans test to the default tests
2019-05-20functional_tests: fix rare get_output_distribution failuremoneromooo-monero1-1/+10
When the wallet auto refreshes after mining the last two blocks but before popping them, it will then try to use outputs which are not unlocked yet. This is really a wallet problem, which will be fixed later.
2019-05-09python-rpc: add missing getblock RPC parametersmoneromooo-monero1-4/+4
2019-05-07Merge pull request #5496Riccardo Spagni2-1/+218
0eb0d6b8 rpc: improve get_output_distribution (moneromooo-monero)
2019-05-02Merge pull request #5484Riccardo Spagni1-0/+1
36ced067 functional_tests: flush stdout before popening new process (moneromooo-monero)
2019-05-02functional_tests: add tests for pending/out transfer addressesmoneromooo-monero1-0/+59
2019-04-26functional_tests: add a 3/3 multisig testmoneromooo-monero1-0/+7
2019-04-25rpc: improve get_output_distributionmoneromooo-monero2-1/+218
It can now handle small reorgs without having to rescan the whole blockchain. Also add a test for it.
2019-04-24functional_tests: add get_fee_estimate to blockchain testmoneromooo-monero1-0/+12
2019-04-23consensus: from v12, enforce >= 2 outputsmoneromooo-monero1-0/+1
2019-04-23functional_tests: flush stdout before popening new processmoneromooo-monero1-0/+1
2019-04-20functional_tests: reset blockchain on test startmoneromooo-monero8-0/+57
2019-04-18functional_tests: detect requests python modulemoneromooo-monero1-3/+9
2019-04-15functional_tests: add sweep_single testmoneromooo-monero1-0/+50
2019-04-15Merge pull request #5402Riccardo Spagni1-7/+7
cbf32241 rpc: make wide_difficulty hexadecimal (moneromooo-monero)
2019-04-11functional_tests: exit with 1 if any test failsmoneromooo-monero1-0/+2
2019-04-11functional_tests: cold signing key images/outputs import/exportmoneromooo-monero1-0/+6
2019-04-11functional_tests: add double spend detection testsmoneromooo-monero1-0/+61
2019-04-11functional_tests: add alt chains testsmoneromooo-monero1-1/+34
2019-04-11functional_tests: add wallet creation language testsmoneromooo-monero1-0/+21
2019-04-11functional_tests: add more wallet testsmoneromooo-monero2-0/+55
get_transfer_by_txid, get_height, open/close
2019-04-11functional_tests: add describe_transfer testsmoneromooo-monero2-0/+33
2019-04-11functional_tests: add more blockchain related testsmoneromooo-monero1-0/+125
Related to emission, reorgs, getting tx data back, output distribution and histogram
2019-04-11functional_tests: add bans testsmoneromooo-monero1-0/+117
2019-04-05rpc: make wide_difficulty hexadecimalmoneromooo-monero1-7/+7
This should be friendlier for clients which don't have bignum support
2019-03-23python-rpc: add console.pymoneromooo-monero1-1/+1
It allows one to connect to a running daemon or wallet, and use its RPC API from python. Usage: python -i console.py <port> It will detect whether it's talking to a daemon or wallet and initialize itself accordingly.
2019-03-22functional_tests: move RPC API to utils, it is not test specificmoneromooo-monero17-892/+25
2019-03-22functional_tests: add balance testsmoneromooo-monero1-59/+171
2019-03-22functional_tests: add missing parameters to get_balancemoneromooo-monero1-1/+6
2019-03-21functional_tests: add proofs tests (tx key, in/out tx, reserve)moneromooo-monero3-1/+350
2019-03-21functional_tests: add more transfer testsmoneromooo-monero2-6/+60
manual relay, transfer to integrated address, and a few negative transfer tests
2019-03-21functional_tests: add get_bulk_transfer testsmoneromooo-monero2-0/+49
2019-03-21functional_tests: add message signing/verification testsmoneromooo-monero3-1/+110
2019-03-21functional_tests: add multisig and cold signing testsmoneromooo-monero4-2/+544
2019-03-21functional_tests: support several daemons/walletsmoneromooo-monero3-29/+42
2019-03-21functional_tests: add txpool RPC testsmoneromooo-monero3-1/+178
2019-03-21functional_tests: add integrated address testsmoneromooo-monero3-1/+125
2019-03-21functional_tests: add basic transfer testsmoneromooo-monero3-14/+360
2019-03-21functional_tests: plug RPC tests into the cmake machinerymoneromooo-monero2-3/+120
2019-03-21functional_tests: add basic mining testsmoneromooo-monero3-0/+152
2019-03-21functional_tests: add wallet address/subaddress RPC testsmoneromooo-monero2-0/+259
2019-03-21functional_tests: improve RPC blockchain testsmoneromooo-monero6-72/+295
2019-03-05Update 2019 copyrightbinaryFate6-6/+6
2018-12-23Remove boost::lexical_cast for uuid and unused uuid functionLee Clagett1-0/+1
2018-10-15Fix Windows build after epee dependency changeiDunk54001-4/+0
2018-10-03functional_tests: fix linking on WindowsiDunk54001-0/+4
2018-09-17api/wallet: properly disable key encryptionstoffu1-2/+2
2018-09-14remove obsolete daemon selection of fake outs and old tx constructionmoneromooo-monero1-6/+6
2018-08-23wallet: store trusted-daemon flag in wallet2stoffu1-1/+1
2018-08-16store secret keys encrypted where possiblemoneromooo-monero1-2/+2
The secret spend key is kept encrypted in memory, and decrypted on the fly when needed. Both spend and view secret keys are kept encrypted in a JSON field in the keys file. This avoids leaving the keys in memory due to being manipulated by the JSON I/O API.
2018-07-19Merge pull request #3854luigi11116-0/+464
149da42 db_lmdb: enable batch transactions by default (stoffu) 34cb6b4 add --regtest and --fixed-difficulty for regression testing (vicsn) 9e1403e update get_info RPC and bump RPC version (vicsn) 207b66e first new functional tests (vicsn)
2018-06-29first new functional testsvictorsintnicolaas6-0/+464
2018-06-13wallet: on first refresh, start off with a quantized heightmoneromooo-monero1-7/+7
for privacy reasons, so an untrusted node can't easily track wallets from IP address to IP address, etc. The granularity is 1024 blocks, which is about a day and a half.
2018-03-05Stagenetstoffu1-3/+3
2018-01-26Update 2018 copyrightxmr-eric6-6/+6
2017-12-16move includes around to lessen overall loadmoneromooo-monero1-0/+1
2017-10-21Initialize openssl on startupmoneromooo-monero1-0/+2
2017-10-07Subaddresseskenshi841-4/+4
2017-05-23changed crypto to cncrypto so it generated libcncryptoGentian1-1/+1
fix a cmakelist
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni6-6/+6
2017-02-06Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett1-1/+1
2017-01-25Updates to epee HTTP client codeLee Clagett1-2/+2
- http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed
2017-01-16Change logging to easylogging++moneromooo-monero3-13/+11
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.
2016-09-18cmake: transitive deps and remove deprecated LINK_*redfish1-2/+2
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.
2016-08-28New "Halfway RingCT" outputs for coinbase transactionsmoneromooo-monero1-0/+1
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.
2016-08-28wallet: do not store signatures in the wallet cachemoneromooo-monero1-1/+1
Saves some substantial space. Also avoid calculating tx hashes we don't need.
2016-08-28remove original Cryptonote blockchain_storage blockchain formatmoneromooo-monero1-1/+0
2016-04-17tests: fix compile failure on wallet2::transfermoneromooo-monero1-1/+2
2016-04-02wallet: better output selection for transfer/transfer_newmoneromooo-monero1-1/+1
This now requests the set of outputs that can be mixed first, to avoid trying non dust but unmixable outputs, which we know will fail.
2016-02-22move g_test_dbg_lock_sleep from a global to a function level staticmoneromooo-monero1-2/+0
This avoids the need to define that variable in every program which uses epee.
2015-12-31updated copyright yearRiccardo Spagni6-6/+6
2015-11-17tests: fix build error with CLANGmoneromooo-monero1-1/+1
2015-05-17s/terget/target/moneromooo-monero2-6/+6
2015-02-242014 network limit 1.3 fix log/path/data +utilsrfree2monero1-0/+2
+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-01-02year updated in licenseRiccardo Spagni6-6/+6
2014-10-24cmake: fix up link linesBen Boeckel1-1/+2
2014-10-24cmake: support 2.8.7Ben Boeckel1-1/+1
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: put each test executable in its own directoryBen Boeckel1-0/+52
2014-09-15Separate testnet address prefixZachary Michaels1-3/+3
2014-09-15Reorganize testnet constantsZachary Michaels1-3/+9
2014-07-23License updated to BSD 3-clausefluffypony5-19/+145
2014-06-30final changes to get transaction splitting building. needs testing.Thomas Winget1-1/+3
2014-05-03initial [broken] updatemydesktop1-2/+2
2014-04-02json rpc for wallet and bugfixAntonio Juarez1-26/+27
2014-03-20some fixesAntonio Juarez1-7/+8
2014-03-03moved all stuff to githubAntonio Juarez5-0/+528