Commit Graph

367 Commits

Author SHA1 Message Date
moneromooo-monero
ab87e7fdae
rpc: the cache is still for non cumulative on that branch 2018-06-01 09:05:47 +01:00
luigi1111
737712c0c6
Merge pull request #3561
353e9c0 Core RPC: optionally add POW hash to block_header_response (stoffu)
2018-05-31 14:38:01 -05:00
moneromooo-monero
d3447364d0
rpc: convert distribution to cumulative after caching
This avoids double conversion on a later cache hit
2018-05-31 16:54:57 +01:00
moneromooo-monero
b665bab1d6
rpc: fix get_output_distribution cache for the cumulative case
The distribution was not converted to cumulative after a cache hit
2018-05-30 15:03:36 +01:00
moneromooo-monero
a87980f6c2
fix build with GCC 8.1.0 2018-05-26 14:54:10 +01:00
moneromooo-monero
b9389e582e
db_lmdb: save pruned and prunable tx data separately
This bumps DB version to 2, migration code will run for v1 DBs
2018-05-23 22:48:12 +01:00
moneromooo-monero
5f8ffca34d
speed up get_output_distribution (and precalc common case) 2018-05-21 19:51:58 +01:00
Riccardo Spagni
69b6f5b6a6
Merge pull request #3705
f9d0827b Fix broken interactive daemon 'limit' commands plus RPC calls (rbrunner7)
2018-04-28 17:02:08 +02:00
rbrunner7
f9d0827bba Fix broken interactive daemon 'limit' commands plus RPC calls 2018-04-25 21:37:10 +02:00
moneromooo-monero
ffeeefde60
speedup get_output_histogram for all amounts when min_count > 0
This skips the vast majority of "dust" output amounts with just
one instance on the chain. Clocks in at 0.15% of the original
time on testnet.
2018-04-23 10:54:28 +01:00
Riccardo Spagni
03ff3be10e
Merge pull request #3672
875c1cab wallet2: increase rpc timeout for get_output_distribution (moneromooo-monero)
70f23217 add top height to get_output_distribution, and cache it for rct (moneromooo-monero)
8c7363fb rpc: add missing perf timer for get_output_distribution (moneromooo-monero)
2018-04-21 21:54:08 +02:00
moneromooo-monero
70f2321763
add top height to get_output_distribution, and cache it for rct
This should cache the vast majority of calls for long running wallets
2018-04-19 16:06:22 +01:00
moneromooo-monero
8c7363fbef
rpc: add missing perf timer for get_output_distribution 2018-04-19 16:06:20 +01:00
Riccardo Spagni
5e08fd89ea
Merge pull request #3549
73951cbd wallet2: request transactions in slices when scanning for known rings (moneromooo-monero)
25fe67e4 rpc: allow getting pruned blocks from gettransactions (moneromooo-monero)
2018-04-12 13:49:33 +02:00
Riccardo Spagni
5053f8f40b
Merge pull request #3502
11c933e1 fix lambda compile error on openbsd (moneromooo-monero)
2018-04-12 11:14:43 +02:00
moneromooo-monero
25fe67e4cf
rpc: allow getting pruned blocks from gettransactions
and get them pruned in find_and_save_rings, since it does not need
the pruned data in the first place.

Also set decode_to_json to false where missing, we don't need this
either.
2018-04-07 08:29:11 +01:00
stoffu
353e9c0c90
Core RPC: optionally add POW hash to block_header_response 2018-04-05 23:15:15 +09:00
moneromooo-monero
11c933e137
fix lambda compile error on openbsd 2018-03-27 14:48:36 +01:00
moneromooo-monero
1834127c82
rpc: make get_output_distribution a non-restricted RPC
so that those nodes can still be used for sending transactions
2018-03-23 10:56:55 +00:00
Riccardo Spagni
0f27fc57ac
Merge pull request #3336
57c0b1ed Fix typos in various files (Dimitris Apostolou)
2018-03-16 18:08:07 +02:00
moneromooo-monero
41f727ce42
add RPC to get a histogram of outputs of a given amount 2018-03-16 10:32:26 +00:00
Dimitris Apostolou
57c0b1ed9f Fix typos in various files 2018-03-15 18:25:38 +02:00
stoffu
af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
whythat
b3b2d4d20c options: add testnet option dependencies 2018-02-16 22:32:01 +02:00
whythat
05a12ccc2d options: remove testnet-* options 2018-02-16 22:32:01 +02:00
Riccardo Spagni
04a676397f
Merge pull request #3165
7539603f Bootstrap daemon (stoffu)
2018-02-16 14:18:50 +01:00
Riccardo Spagni
381faf06c7
Merge pull request #3163
628b78ae Fix in_peers/out_peers RPC operations (Erik de Castro Lopo)
ece9bcf5 rpc_client: Fix error handling (Erik de Castro Lopo)
8f30350d Fix method name in invoke_http_json_rpc (Erik de Castro Lopo)
32c0f908 Allow the number of incoming connections to be limited (Erik de Castro Lopo)
d609a2c1 Rename delete_connections to delete_out_connections (Erik de Castro Lopo)
b927c0fc Rename connections_count to max_out_connection_count (Erik de Castro Lopo)
2018-02-16 14:18:38 +01:00
Riccardo Spagni
5d36ed6613
Merge pull request #3094
a85dbb3f Fixed typos and wording tweaks (Maxithi)
2018-02-16 14:17:46 +01:00
stoffu
7539603f94
Bootstrap daemon 2018-01-30 20:15:47 +09:00
Maxithi
a85dbb3f2f
Fixed typos and wording tweaks 2018-01-29 12:13:23 +01:00
Erik de Castro Lopo
32c0f908cd Allow the number of incoming connections to be limited
It was already possible to limit outgoing connections. One might want
to do this on home network connections with high bandwidth but low
usage caps.
2018-01-29 11:14:02 +11:00
Erik de Castro Lopo
d609a2c164 Rename delete_connections to delete_out_connections
This rename is needed so that delete_in_connections can be added.
2018-01-29 07:06:08 +11:00
Erik de Castro Lopo
b927c0fc7a Rename connections_count to max_out_connection_count
This is needed so that a max_in_connection_count can be added.
2018-01-29 07:06:08 +11:00
Riccardo Spagni
f7dcb730cb
Merge pull request #3144
42f86624 rpc: expose recent median block size in getinfo (moneromooo-monero)
2018-01-27 17:25:40 -08:00
Riccardo Spagni
6d48bddffd
Merge pull request #3136
e0404d35 rpc: default do_not_relay to false in sendrawtransaction (moneromooo-monero)
2018-01-27 17:25:07 -08:00
xmr-eric
84a7f6a482 Readd copyright starting date 2018-01-26 10:03:20 -05:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
Riccardo Spagni
c222b6485e
Merge pull request #3068
301ec15c Change cryptonote::COMMAND_RPC_SET_LIMIT::response to use int64_t (Nick Johnson)
2018-01-25 16:47:29 -08:00
Riccardo Spagni
008b492963
Merge pull request #3047
fa5c0bab Implement #3045, fixing RPC snakecases (Nick Johnson)
2018-01-25 16:45:45 -08:00
Riccardo Spagni
5e211b4186
Merge pull request #3020
03ac3890 zmq: use older 3-arg version of setsockopt (stoffu)
2018-01-25 16:40:03 -08:00
moneromooo-monero
42f86624a3
rpc: expose recent median block size in getinfo 2018-01-17 11:12:26 +00:00
moneromooo-monero
e0404d35fe
rpc: default do_not_relay to false in sendrawtransaction 2018-01-16 11:15:01 +00:00
stoffu
6d8b29ef28
fix some link errors in debug mode for macos 2018-01-10 01:57:56 +00:00
moneromooo-monero
40ab12a773
epee: remove dependency on common 2018-01-10 01:57:51 +00:00
Nick Johnson
fa5c0bab44
Implement #3045, fixing RPC snakecases 2018-01-06 15:11:36 -06:00
Nick Johnson
301ec15c49
Change cryptonote::COMMAND_RPC_SET_LIMIT::response to use int64_t 2018-01-04 21:01:10 -06:00
stoffu
03ac389022
zmq: use older 3-arg version of setsockopt 2017-12-28 13:15:49 +09:00
moneromooo-monero
45a1c4c088
add empty container sanity checks when using front() and back() 2017-12-18 15:15:40 +00:00
moneromooo-monero
b4524892fb
rpc: guard against json parsing a non object 2017-12-18 15:15:32 +00:00
moneromooo-monero
490a5d41ca
rpc: do not try to use an invalid txid in relay_tx 2017-12-18 15:15:01 +00:00
Riccardo Spagni
066fd7aced
Merge pull request #2877
43f5269f Wallets now do not depend on the daemon rpc lib (moneromooo-monero)
bb89ae8b move connection_basic and network_throttle from src/p2p to epee (moneromooo-monero)
4abf25f3 cryptonote_core does not depend on p2p anymore (moneromooo-monero)
2017-12-17 12:59:44 +02:00
moneromooo-monero
43f5269f84
Wallets now do not depend on the daemon rpc lib
The shared RPC code is now moved off into a separate lib
2017-12-16 23:28:59 +00:00
moneromooo-monero
4abf25f3c9
cryptonote_core does not depend on p2p anymore
As a followon side effect, this makes a lot of inline code
included only in particular cpp files (and instanciated
when necessary.
2017-12-16 23:28:38 +00:00
moneromooo-monero
09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
Riccardo Spagni
8da24c2a57
Merge pull request #2878
abebe392 rpc: add offline state in info rpc (moneromooo-monero)
7696e849 core: make --offline also disable DNS lookups (moneromooo-monero)
2017-12-16 23:27:00 +02:00
Riccardo Spagni
9b511d3e93
Merge pull request #2866
cf5f6236 Corrections in rate limiting / trottle code, especially in 'out' direction (rbrunner7)
2017-12-16 23:24:41 +02:00
Riccardo Spagni
ce951ef560
Merge pull request #2856
009eed17 rpc: increase the max number of outs one can request (moneromooo-monero)
2017-12-16 23:15:43 +02:00
Riccardo Spagni
3052dab81d
Merge pull request #2836
23b6f685 RPC: allow binding of restricted port in addition to core port (Tim L)
2017-12-02 09:26:15 +02:00
Riccardo Spagni
ed8fc8ac1c
Merge pull request #2838
310b790a make connection_id a string in RPC (moneromooo-monero)
2017-12-02 09:23:22 +02:00
moneromooo-monero
abebe392c7
rpc: add offline state in info rpc 2017-11-30 15:44:01 +00:00
rbrunner7
cf5f623616 Corrections in rate limiting / trottle code, especially in 'out' direction
Deleted 3 out of 4 calls to method connection_basic::sleep_before_packet
that were erroneous / superfluous, which enabled the elimination of a
"fudge" factor of 2.1 in connection_basic::set_rate_up_limit;
also ended the multiplying of limit values and numbers of bytes
transferred by 1024 before handing them over to the global throttle
objects
2017-11-28 21:18:01 +01:00
Riccardo Spagni
ed2fc4a1ff
Merge pull request #2794
43f27c7d core: warn when free disk space is low (moneromooo-monero)
2017-11-25 19:48:33 +02:00
moneromooo-monero
009eed17f1
rpc: increase the max number of outs one can request
It's getting hit too easily
2017-11-23 19:15:45 +00:00
moneromooo-monero
310b790a64
make connection_id a string in RPC
It's sent as JSON, so raw binary is not appropriate
2017-11-18 00:13:07 +00:00
Tim L
23b6f685de RPC: allow binding of restricted port in addition to core port 2017-11-17 16:23:41 -05:00
Riccardo Spagni
10a237783a
Merge pull request #2692
0f2c2d4c rpc: remove obsolete busy core checks (moneromooo-monero)
2017-11-14 21:32:33 +02:00
Riccardo Spagni
edebe4e3b6
Merge pull request #2736
0d9c0db9 Do not build against epee_readline if it was not built (Howard Chu)
178014c9 split off readline code into epee_readline (moneromooo-monero)
a9e14a19 link against readline only for monerod and wallet-wallet-{rpc,cli} (moneromooo-monero)
437421ce wallet: move some scoped_message_writer calls from the libs (moneromooo-monero)
e89994e9 wallet: rejig to avoid prompting in wallet2 (moneromooo-monero)
ec5135e5 move input_line from command_line to simplewallet (moneromooo-monero)
082db75f move cryptonote command line options to cryptonote_core (moneromooo-monero)
2017-11-14 21:31:51 +02:00
Riccardo Spagni
5de492be40
Merge pull request #2629
383ff4f6 remove "using namespace std" from headers (moneromooo-monero)
2017-11-14 21:29:49 +02:00
moneromooo-monero
0f2c2d4c34
rpc: remove obsolete busy core checks 2017-11-14 17:15:19 +00:00
moneromooo-monero
e89994e98f
wallet: rejig to avoid prompting in wallet2
wallet2 is a library, and should not prompt for stdin. Instead,
pass a function so simplewallet can prompt on stdin, and a GUI
might display a window, etc.
2017-11-14 17:06:26 +00:00
moneromooo-monero
082db75f28
move cryptonote command line options to cryptonote_core
Those have no reason to be in a generic module
2017-11-14 17:06:19 +00:00
moneromooo-monero
383ff4f689
remove "using namespace std" from headers
It's nasty, and actually breaks on Solaris, where if.h fails to
build due to:

  struct map *if_memmap;
2017-11-14 16:56:10 +00:00
Riccardo Spagni
f48aeab5c4
Merge pull request #2756
0bf09154 Fix file permission issue (Tim L)
2017-11-14 16:02:28 +02:00
Riccardo Spagni
a2241e8151
Merge pull request #2753
fa514082 RPC: get_info add rpc_connections_count (Tim L)
2017-11-14 15:54:33 +02:00
Riccardo Spagni
e0e6e375bb
Merge pull request #2738
4a17f0c2 rpc: add performance timers (moneromooo-monero)
2017-11-14 15:28:47 +02:00
Riccardo Spagni
e759c78a17
Merge pull request #2735
a524b750 rpc: added miner_tx_hash to resp of getblock (stoffu)
2017-11-14 15:27:51 +02:00
Riccardo Spagni
474e02ccde
Merge pull request #2651
118a1bed rpc: make get_coinbase_tx_sum a restricted RPC (moneromooo-monero)
2017-11-14 15:00:39 +02:00
Riccardo Spagni
fd0740e5e7
Merge pull request #2615
10013e94 Protect node privacy by proper filtering in restricted-mode RPC answers (binaryFate)
2017-11-14 14:53:10 +02:00
moneromooo-monero
43f27c7d43
core: warn when free disk space is low 2017-11-14 10:21:34 +00:00
stoffu
a524b7508e
rpc: added miner_tx_hash to resp of getblock 2017-11-14 16:31:46 +09:00
binaryFate
10013e9434 Protect node privacy by proper filtering in restricted-mode RPC answers
This patch allows to filter out sensitive information for queries that rely on the pool state, when running in restricted mode.
This filtering is only applied to data sent back to RPC queries. Results of inline commands typed locally in the daemon are not affected.
In practice, when running with `--restricted-rpc`:
* get_transaction_pool will list relayed transactions with the fields "last relayed time" and "received time" set to zero.
* get_transaction_pool will not list transaction that have do_not_relay set to true, and will not list key images that are used only for such transactions
* get_transaction_pool_hashes.bin will not list such transaction
* get_transaction_pool_stats will not count such transactions in any of the aggregated values that are computed

The implementation does not make filtering the default, so developers should be mindful of this if they add new RPC functionality.
Fixes #2590.
2017-11-08 13:07:07 +01:00
Tim L
fa51408272 RPC: get_info add rpc_connections_count 2017-11-07 16:34:49 -05:00
moneromooo-monero
ccf53a566c
track double spending in the txpool
Transactions in the txpool are marked when another transaction
is seen double spending one or more of its inputs.
This is then exposed wherever appropriate.

Note that being marked with this "double spend seen" flag does
NOT mean this transaction IS a double spend and will never be
mined: it just means that the network has seen at least another
transaction spending at least one of the same inputs, so care
should be taken to wait for a few confirmations before acting
upon that transaction (ie, mostly of use for merchants wanting
to accept unconfirmed transactions).
2017-11-06 00:05:44 +00:00
Riccardo Spagni
4022a0a57e
Merge pull request #2729
161401dd Fix JSON-RPC response object over ZMQ (Lee Clagett)
2017-11-06 01:42:55 +02:00
Tim L
0bf0915446 Fix file permission issue
This branch fixes a file permission issue introduced by 69c37200aa
2017-11-03 11:27:50 -04:00
Tim L
69c37200aa RPC Add cross origin resource sharing support 2017-10-30 13:55:56 -04:00
moneromooo-monero
4a17f0c2c7
rpc: add performance timers
Enable with perf:DEBUG
2017-10-30 09:39:36 +00:00
Lee Clagett
161401ddca Fix JSON-RPC response object over ZMQ 2017-10-26 17:25:14 -04:00
Riccardo Spagni
3eac7ab94f
Merge pull request #2587
cba34494 rpc: out_peers now works again (moneromooo-monero)
2017-10-15 18:38:12 +02:00
Jaquee
8bfa6c2d9f lightwallet rpc server commands 2017-10-15 17:30:23 +02:00
moneromooo-monero
118a1bed28
rpc: make get_coinbase_tx_sum a restricted RPC
It's pretty slow and I/O intensive
2017-10-14 09:49:24 +01:00
kenshi84
53ad5a0f42
Subaddresses 2017-10-07 13:06:21 +09:00
Riccardo Spagni
86e9de588c
Merge pull request #2548
7d4ef258 rpc: fix getting txpool transactions (moneromooo-monero)
2017-10-06 23:00:43 +04:00
moneromooo-monero
cba3449415
rpc: out_peers now works again 2017-10-06 08:40:14 +01:00
Lee Clagett
8b00687735 Upgrades to epee::net_utils::network_address
- internal nullptr checks
  - prevent modifications to network_address (shallow copy issues)
  - automagically works with any type containing interface functions
  - removed fnv1a hashing
  - ipv4_network_address now flattened with no base class
2017-10-05 11:57:09 -04:00
Riccardo Spagni
87d0516f7d
Merge pull request #2513
309290d1 Source updates are in a source subdirectory (moneromooo-monero)
2017-10-02 23:29:25 +04:00
Riccardo Spagni
3bab2676ec
Merge pull request #2512
792ba4f0 Log categories can now be added to and removed from (moneromooo-monero)
48f92eb6 easylogging++: add categories getter (moneromooo-monero)
f35afe62 epee: factor log level/categories setting (moneromooo-monero)
2017-10-02 23:28:59 +04:00
Riccardo Spagni
3bf20a77f2
Merge pull request #2470
2e59f6ea rpc: add new RPCs to get and set limits (MaxXor)
2017-10-02 23:15:22 +04:00
moneromooo-monero
7d4ef25800
rpc: fix getting txpool transactions 2017-09-29 16:29:26 +01:00
moneromooo-monero
5d65a75b69
move checkpoints in a separate library 2017-09-25 21:16:26 +01:00