Commit Graph

492 Commits

Author SHA1 Message Date
moneromooo-monero 60f36386e4
Avoid unnecessary temp block and copy ctor
block already has a default ctor, and the extra object
churn due to its innards (vectors, etc) is pointless.
2018-11-19 17:57:17 +00:00
moneromooo-monero 31d80027b5
tests: add unit tests for get_output_distribution 2018-11-16 19:21:45 +00:00
doy-lee 6f2497bc7a Don't cache nettype in core_rpc_server use m_core
This can go out of sync with m_core's nettype if you run in fakechain
mode since entering fakechain mode is done through code not the command
line and core_rpc_server only looks at the command line to figure out
the nettype.
2018-11-16 15:32:05 +11:00
Riccardo Spagni 23fc891555
Merge pull request #4750
e61062b6 use current height - 1 for top block height in err msgs (cryptochangements34)
2018-11-14 21:32:21 +02:00
Riccardo Spagni ff347c98a1
Merge pull request #4747
dad5bbfd return message in stop_mining if mining never started (cryptochangements34)
2018-11-14 21:32:10 +02:00
Riccardo Spagni 299d75b209
Merge pull request #4735
73e504c1 rpc: adjust ring size error message now that too high is also possible (moneromooo-monero)
a5ca7f4f core: fix unmixable special case allowing ring size below 11 (moneromooo-monero)
2018-11-06 21:31:14 +02:00
Riccardo Spagni 0c7086bf7f
Merge pull request #4687
6097472a Update ZMQ fee estimate and add ZMQ output distribution (Lee Clagett)
2018-11-04 20:44:49 +02:00
cryptochangements34 e61062b6f2 use current height - 1 for top block height in err msgs 2018-11-02 19:31:31 -04:00
cryptochangements34 dad5bbfdf9
return message in stop_mining if mining never started 2018-10-28 09:50:33 -04:00
moneromooo-monero 73e504c139
rpc: adjust ring size error message now that too high is also possible 2018-10-27 11:16:28 +00:00
Lee Clagett 6097472a19 Update ZMQ fee estimate and add ZMQ output distribution 2018-10-23 23:46:31 -04:00
stoffu e51c978770
rpc: fix wrongly formatted JSON for pruned tx
Fix for #4399.
Also unifies code for serializing pruned tx to binary/json into one.
2018-10-22 10:52:40 +09:00
Riccardo Spagni 9f34a3a29a
Merge pull request #4659
b916ca63 rpc: fix output distribution caching ignoring chain changes (moneromooo-monero)
2018-10-20 20:37:54 +02:00
moneromooo-monero b916ca63a8
rpc: fix output distribution caching ignoring chain changes
0 is placeholder for whole chain, so we should compare chain
height changes rather than chain-height-or-zero. Even this isn't
totally foolproof if a blocks are popped and the same number
added again, but it is much better as it prevents the data from
slowly going out of sync.
2018-10-19 09:22:35 +00:00
stoffu 776aefdac1
tx_pool: revert #4592 and move bin2hex conversion to on_get_transaction_pool 2018-10-18 08:01:56 +09:00
AnythingTechPro 9a85669724
rpc: fixed typo in JSON command error response message 2018-10-04 22:12:53 -04:00
Riccardo Spagni fd74815f65
Merge pull request #4399
f77ce675 rpc: allow pruning of json encoded txs (cryptochangements34)
2018-09-21 20:46:00 +02:00
Riccardo Spagni 0645dcdbdb
Merge pull request #4378
ac934663 rpc: add a "is an update available" flag in get_info (moneromooo-monero)
2018-09-21 20:41:53 +02:00
Riccardo Spagni 629db71593
Merge pull request #4373
4f81cd3a rpc: add cumulative difficulty in block header data (moneromooo-monero)
2018-09-21 20:40:23 +02:00
Riccardo Spagni 9d0565615c
Merge pull request #4354
03c07b16 rpc: return "already mining" in start_mining if already mining (moneromooo-monero)
2018-09-18 17:56:51 +02:00
Riccardo Spagni 0ff0850545
Merge pull request #4344
cd647612 rpc: don't include start time if restricted (moneromooo-monero)
2018-09-18 17:54:25 +02:00
cryptochangements34 f77ce675cb rpc: allow pruning of json encoded txs 2018-09-17 20:38:40 -04:00
moneromooo-monero be001326d1
remove obsolete daemon selection of fake outs and old tx construction 2018-09-14 10:51:45 +00:00
moneromooo-monero ac9346637a
rpc: add a "is an update available" flag in get_info
Make it easier for a user to be told when to update
2018-09-14 09:28:03 +00:00
moneromooo-monero 4f81cd3a3c
rpc: add cumulative difficulty in block header data 2018-09-13 12:41:59 +00:00
moneromooo-monero 5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
moneromooo-monero 03c07b167d
rpc: return "already mining" in start_mining if already mining 2018-09-09 15:27:30 +00:00
moneromooo-monero cd647612b0
rpc: don't include start time if restricted 2018-09-07 13:28:40 +00:00
luigi1111 9315e12d34
Merge pull request #4033
3e46db9 rpc: add a non binary get_transaction_pool_hashes RPC (moneromooo-monero)
2018-07-19 13:55:37 -05:00
luigi1111 3e026ff6ed
Merge pull request #4013
e5592c4 rpc: add blockchain disk size to getinfo (moneromooo-monero)
2018-07-19 13:40:42 -05:00
luigi1111 21afa71ba6
Merge pull request #3981
45e419b db: store cumulative rct output distribution in the db for speed (moneromooo-monero)
2018-07-19 13:39:24 -05:00
luigi1111 d518dae4bf
Merge pull request #3973
50af357 alt_chain_info can now give more info about a particular alt chain (moneromooo-monero)
2018-07-19 13:37:10 -05:00
luigi1111 025187e6c9
Merge pull request #3854
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-07-19 13:35:25 -05:00
moneromooo-monero 45e419bd5c
db: store cumulative rct output distribution in the db for speed
This gets rid of the temporary precalc cache.

Also make the RPC able to send data back in binary or JSON,
since there can be a lot of data

This bumps the LMDB database format to v3, with migration.
2018-07-13 11:37:04 +01:00
victorsintnicolaas 9e1403e155 update get_info RPC and bump RPC version 2018-06-29 10:06:18 +02:00
victorsintnicolaas 34cb6b4b70 add --regtest and --fixed-difficulty for regression testing
on_generateblocks RPC call combines functionality from the on_getblocktemplate and on_submitblock RPC calls to allow rapid block creation. Difficulty is set permanently to 1 for regtest.
Makes use of FAKECHAIN network type, but takes hard fork heights from mainchain
Default reserve_size in generate_blocks RPC call is now 1. If it is 0, the following error occurs 'Failed to calculate offset for'.
Queries hard fork heights info of other network types
2018-06-29 10:06:11 +02:00
moneromooo-monero a830db2577
rpc: rework to avoid repeated calculations in get_blocks.bin 2018-06-26 22:14:23 +01:00
moneromooo-monero ed2c81ed95
replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-06-26 22:14:21 +01:00
moneromooo-monero 209ec963b5
rpc: sanity check on number of txes in a block 2018-06-26 22:14:18 +01:00
moneromooo-monero 6795bd0d4e
rpc: add option to skip coinbase info in get_blocks.bin 2018-06-26 22:14:16 +01:00
moneromooo-monero 50af3579ee
alt_chain_info can now give more info about a particular alt chain 2018-06-26 08:19:51 +01:00
moneromooo-monero 3e46db97e5
rpc: add a non binary get_transaction_pool_hashes RPC 2018-06-21 09:02:42 +01:00
moneromooo-monero e5592c4bab
rpc: add blockchain disk size to getinfo
This should help new nodes predict how much disk space will be
needed for a full sync
2018-06-20 23:48:37 +01:00
luigi1111 5bfe03804c
Merge pull request #3892
d344736 rpc: convert distribution to cumulative after caching (moneromooo-monero)
2018-06-07 12:22:04 -05:00
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 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
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
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
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
stoffu 7539603f94
Bootstrap daemon 2018-01-30 20:15:47 +09: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
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero 42f86624a3
rpc: expose recent median block size in getinfo 2018-01-17 11:12:26 +00:00
moneromooo-monero 40ab12a773
epee: remove dependency on common 2018-01-10 01:57:51 +00:00
moneromooo-monero 45a1c4c088
add empty container sanity checks when using front() and back() 2017-12-18 15:15:40 +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 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 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 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
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
Riccardo Spagni 3eac7ab94f
Merge pull request #2587
cba34494 rpc: out_peers now works again (moneromooo-monero)
2017-10-15 18:38:12 +02: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
Riccardo Spagni 0e74777071
Merge pull request #2452
0aaaca29 tx_pool: set the "invalid input" bit when check_tx_inputs fails (moneromooo-monero)
9236823b simplewallet: print tx rejection reason where it was missing (moneromooo-monero)
3dee3301 core_rpc_server: print tx rejection reason at L0 too (moneromooo-monero)
2017-09-25 16:53:07 +02:00
moneromooo-monero b5faac5304
get_blockchain_top now returns void
It was always returning true, and could not be foreseen to
usefully return errors in the future. This silences CID 162652
as well as saves some checking code in a few places.
2017-09-25 15:48:13 +01:00
Riccardo Spagni ce37967dd2
Merge pull request #2386
a15e8583 wallet2: guard against daemon sending txes in the wrong order (moneromooo-monero)
8fe5f609 rpc: order transactions in the order they were requested (moneromooo-monero)
2017-09-25 16:40:54 +02:00
Riccardo Spagni ec0e144e90
Merge pull request #2377
b5cbdce8 wallet2: correctly handle in/out payments for view-only wallet (stoffu)
2017-09-25 16:40:16 +02:00
Riccardo Spagni 44ad32fd4a
Merge pull request #2357
58015df4 Fix getblocktemplate RPC returning wrong reserved_offset (Guillaume LE VAILLANT)
2017-09-25 16:39:01 +02:00
moneromooo-monero 309290d1c7
Source updates are in a source subdirectory
rather than in the same directory as the prebuilt versions
2017-09-22 21:48:19 +01:00
moneromooo-monero 792ba4f0fe
Log categories can now be added to and removed from
Also, set_log without parameters now prints the log categories
2017-09-22 18:08:14 +01:00
stoffu b5cbdce8a6
wallet2: correctly handle in/out payments for view-only wallet 2017-09-21 07:46:19 +09:00
MaxXor 2e59f6ea50 rpc: add new RPCs to get and set limits 2017-09-19 10:30:55 +02:00
moneromooo-monero 3dee3301ba
core_rpc_server: print tx rejection reason at L0 too 2017-09-16 10:32:42 +01:00
moneromooo-monero 8fe5f609d1
rpc: order transactions in the order they were requested 2017-09-11 16:48:25 +01:00
Thomas Winget 9ac2ad0744
DRY refactoring 2017-08-31 07:48:27 -04:00
Riccardo Spagni e00238a355
Merge pull request #2347
5807529e blockchain: cap memory size of retrieved blocks (moneromooo-monero)
c1b10381 rpc: decrease memory usage a bit in getblocks.bin (moneromooo-monero)
2017-08-27 18:13:50 +02:00
moneromooo-monero c1b10381fc
rpc: decrease memory usage a bit in getblocks.bin 2017-08-26 20:53:54 +01:00
Guillaume LE VAILLANT 58015df4cf Fix getblocktemplate RPC returning wrong reserved_offset
The byte for TX_EXTRA_TAG_PUBKEY is already included in
res.reserved_offset by the call to slow_memmem.
2017-08-26 18:38:27 +02:00
moneromooo-monero 55bec1f03d
rpc: add a new RPC to get current txpool backlog (sizes and fees) 2017-08-26 16:23:31 +01:00
moneromooo-monero 61770ec2da
change mixin to ring size in user visible places 2017-08-07 21:12:27 +01:00
Riccardo Spagni 6db8a60a18
Merge pull request #2149
158c3ecf core: thread most of handle_incoming_tx (moneromooo-monero)
f57ee382 cryptonote_protocol: retry stale spans early (moneromooo-monero)
90df52e1 cryptonote_protocol: light cleanup (moneromooo-monero)
84e23156 cryptonote_protocol: avoid spurious SYNCHRONIZED OK messages (moneromooo-monero)
5be43fcd cryptonote_protocol_handler: sync speedup (moneromooo-monero)
2017-08-07 15:24:58 +02:00
moneromooo-monero 5be43fcdba
cryptonote_protocol_handler: sync speedup
A block queue is now placed between block download and
block processing. Blocks are now requested only from one
peer (unless starved).

Includes a new sync_info coommand.
2017-08-07 09:33:04 +01:00
moneroexamples 125f823bda Add on_get_alt_blocks_hashes RPC call 2017-07-04 12:32:44 +08:00
moneromooo-monero 8f96cfc20a
Remove typeid use in network_address
Since I had to add an ID to the derived classes anyway,
this can be used instead. This removes an apparently
pointless warning from CLANG too.
2017-06-28 09:11:24 +01:00
Riccardo Spagni 50d8f73f06
Merge pull request #2091
e4da88a2 Fixed typo in rpc/core_rpc_server.cpp (Julien Klepatch)
2017-06-24 12:43:28 +02:00
Riccardo Spagni a237f90c5b
Merge pull request #2052
072102cf abstracted nework addresses (moneromooo-monero)
2017-06-18 14:23:59 +02:00
Julien Klepatch e4da88a223 Fixed typo in rpc/core_rpc_server.cpp 2017-06-18 16:12:54 +08:00
Howard Chu 5414970dcd
Speedup print_pool_stats
Since we're just counting txs, there's no reason to deserialize all the blobs.
2017-06-01 17:34:03 +01:00
Riccardo Spagni 545e2b003c
Merge pull request #1982
b52abd13 Move txpool to the database (moneromooo-monero)
2017-05-30 21:12:44 +02:00
moneromooo-monero 072102cfd2
abstracted nework addresses
All code which was using ip and port now uses a new IPv4 object,
subclass of a new network_address class. This will allow easy
addition of I2P addresses later (and also IPv6, etc).
Both old style and new style peer lists are now sent in the P2P
protocol, which is inefficient but allows peers using both
codebases to talk to each other. This will be removed in the
future. No other subclasses than IPv4 exist yet.
2017-05-27 11:35:54 +01:00
moneromooo-monero b52abd1370
Move txpool to the database
Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).

poolstate.bin is now obsolete.
2017-05-25 22:23:37 +01:00
assylias bff90264b8
Add expected total reward to RPC "getblocktemplate".
Only works from V5 fork onward - returns 0 before that block.
2017-04-19 18:28:16 +01:00
moneromooo-monero 548075b1f5
daemon: new relay_tx command and RPC 2017-04-02 12:17:35 +01:00
moneromooo-monero 558cfc31ca
core, wallet: faster tx pool scanning
Includes a new RPC to get tx pool hashes fast.
2017-03-23 09:25:22 +00:00
moneromooo-monero b553c282fb
rpc: fix BUILD_TAG mispelling (BUILDTAG)
This ensures a manual or RPC update tries the right build tag,
rather than source, which is currently not setup
2017-03-05 16:59:39 +00:00
Riccardo Spagni 78a99fe7da
Merge pull request #1820
7a44f38a Add support for the wallet to refresh pruned blocks (moneromooo-monero)
da18898f ringct: do not require range proof in decodeRct/decodeRctSimple (moneromooo-monero)
b49c6ab4 rpc: add a default category for daemon rpc (moneromooo-monero)
f113b92b core: add functions to serialize base tx info (moneromooo-monero)
6fd4b827 node_rpc_proxy: allow caching daemon RPC version (moneromooo-monero)
b5c74e40 wallet: invalidate node proxy cache when reconnecting (moneromooo-monero)
2017-03-03 14:30:02 +02:00
moneromooo-monero 7a44f38a7f
Add support for the wallet to refresh pruned blocks 2017-02-27 22:29:00 +00:00
moneromooo-monero b49c6ab45d
rpc: add a default category for daemon rpc 2017-02-27 20:25:35 +00:00
moneromooo-monero ea873ceb2c
daemon/rpc: updates command and RPC
subcommands "check", "download", and "update".
update is not yet implemented.
2017-02-24 23:18:27 +00:00
moneromooo-monero 8262da8137
rpc: make mining_status RPC work when syncing 2017-02-23 20:40:28 +00:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Riccardo Spagni 49efd3add9
Merge pull request #1727
0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
2017-02-21 11:27:15 +02:00
Riccardo Spagni d2059dfab2
Merge pull request #1737
69ab14d9 More robust battery status handling. (Dion Ahmetaj)
2017-02-21 11:16:08 +02:00
Dion Ahmetaj 69ab14d91e More robust battery status handling.
Added an extra path to check for linux power supply status.
Added ignore battery option. If set to true, then when we can't figure out
the power status, we'll assume the system is plugged in.
2017-02-16 14:35:01 -05:00
moneromooo-monero 9925edcb1e
rpc: fix some RPC calls not returning OK status when needed 2017-02-13 23:50:10 +00:00
moneromooo-monero 0288310e3b
blockchain_db: add "raw" blobdata getters for block and transaction
This speeds up operations such as serving blocks to syncing peers
2017-02-13 21:11:37 +00:00
Riccardo Spagni b0e992237e
Merge pull request #1712
3b6839cc mlog: move log level changes to global level (moneromooo-monero)
38a1b9c9 rpc: fix daemon mixed style set_log 2,category:level (moneromooo-monero)
28d0b11f mlog: s/Mew/New/ in log (moneromooo-monero)
2017-02-12 23:25:07 +02:00
moneromooo-monero 38a1b9c956
rpc: fix daemon mixed style set_log 2,category:level 2017-02-12 11:37:09 +00:00
Dion Ahmetaj ad95e65028 Added a note about smart mining to status command. Fixed up a bug where I was resetting bg mining enabled instead of started. Upped the miner threshold. Also moved setting of enabled on start above miner thread creation since starting with true, then stopping, then starting with false resulted in race condition. 2017-02-10 18:07:43 -05:00
Dion Ahmetaj 345ed4823c Background/smart mining. If a users' computer is plugged into a power
source, and CPU has been idle for some time, then begin mining to some
threshold (don't destroy the users' CPU).

This patch only supports windows and linux (I've only tested on Win64 and
Ubuntu).

The variables currently default to pretty conservative values (i.e. 20%
CPU mining threshold).
2017-02-10 18:07:39 -05:00
Riccardo Spagni eacf2124b6 Merge pull request #1689
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-11 00:35:25 +02:00
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Lee Clagett ce7fcbb4ae Add server auth to monerod, and client auth to wallet-cli and wallet-rpc 2017-02-06 01:15:41 -05:00
Riccardo Spagni 72aa788a0e
Merge pull request #1636
cc1462e0 Add concurrency check to rpc mining to ensure not too many threads. number of cores times 4 or 257. (Ashley Perpetual)
2017-02-02 21:12:13 +02:00
Riccardo Spagni 5bb95fc613
Merge pull request #1634
99f58437 Fix invalid + of std::string and int (Timothy D. Prime)
2017-02-02 19:43:05 +02:00
Ashley Perpetual cc1462e0b7 Add concurrency check to rpc mining to ensure not too many threads. number of cores times 4 or 257. 2017-01-28 05:59:56 +08:00
Timothy D. Prime 99f584376e Fix invalid + of std::string and int
These warnings were emitted by clang++, and they are real bugs.
src/rpc/core_rpc_server.cpp:208:58: warning: adding 'uint64_t'
      (aka 'unsigned long') to a string does not append to the string
      [-Wstring-plus-int]
        res.status = "Error retrieving block at height " + height;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
The obvious intent is achieved by using std::to_string().
2017-01-26 10:11:37 -08:00
Miguel Herranz 0644eed772 Remove boost/foreach.cpp includes 2017-01-22 23:31:34 +01:00
Miguel Herranz 629e3101ab Replace BOOST_FOREACH with C++11 ranged for 2017-01-22 21:38:10 +01:00
moneromooo-monero b70ab128fc
rpc: fix orphan_status when getting blocks
It was always set to false, even for orphan blocks
2017-01-22 12:20:55 +00:00
Riccardo Spagni ab69d5b367
Merge pull request #1569
16b8b66a specify restore height by YYYY-MM-DD format (kenshi84)
2017-01-15 20:32:57 -05:00
kenshi84 16b8b66adc specify restore height by YYYY-MM-DD format 2017-01-16 10:00:28 +09:00
moneromooo-monero 5833d66f65
Change logging to easylogging++
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.
2017-01-16 00:25:46 +00:00
Riccardo Spagni 10c6afd316
Merge pull request #1571
81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
2017-01-15 14:50:10 -05:00
moneromooo-monero 81c384e408
fix do_not_relay not preventing relaying on a timer
Also print its value when printing pool
2017-01-14 13:07:05 +00:00
moneromooo-monero 5b5017e267
rpc: add a command to get info about the current blockchain
About the tip of the main chain, and the last N blocks
2017-01-13 23:21:38 +00:00
Riccardo Spagni 0b6031adbf
Merge pull request #1543
19be7225 Add start_time to get_info methods and show uptime (Miguel Herranz)
2017-01-13 14:35:21 -05:00
Miguel Herranz 19be7225cc Add start_time to get_info methods and show uptime 2017-01-12 00:15:21 +01:00
kenshi84 f1dde1a429 wallet cli: print originating block heights of mixin keys when making transfer 2017-01-09 15:10:34 +09:00
moneromooo-monero 9731b4e54f
rpc: add block size to GET_BLOCK_HEADER RPC
and print it in print_bc
2017-01-06 19:38:27 +00:00
moneromooo-monero 9188b3468c
rpc: add current block size to the getinfo call 2017-01-06 19:30:10 +00:00
moneromooo-monero 55fa0479a0
rpc: new function and RPC to get alternative chain info 2016-12-17 11:28:49 +00:00
moneromooo-monero 1d9e223944
rpc: do not include output indices for pool txes
Those aren't yet in the blockchain, so will not be found
(and aren't yet known, since it depends on where exactly the
tx will be mined in the next block or blocks)
2016-11-23 18:56:54 +00:00
moneromooo-monero 2c0173c722
Add a get_outs (fully text based) version of get_outs.bin 2016-11-22 20:00:40 +00:00
moneromooo-monero e05907b3e7
rpc: add output indices to gettransactions
Someone apparently needs that to make a wallet but never asked.
If you read that and that's not what you wanted, the bugtracker
is at https://github.com/monero-project/monero/issues
2016-11-22 20:00:23 +00:00
moneromooo-monero e6deb8abda
rpc: add a dynamic fee estimation RPC call 2016-10-31 08:38:00 +00:00
Riccardo Spagni b9f31bbc10
Merge pull request #1222
5e10fb0 rpc: add blockchain cumulative difficulty to getinfo call (moneromooo-monero)
2016-10-22 22:14:35 +02:00
Riccardo Spagni 7426b5374f
Merge pull request #1221
094f4c8 rpc: add missing top block hash to json getinfo call (moneromooo-monero)
2016-10-22 22:13:24 +02:00
moneromooo-monero 88faec75fe
wallet: select part of the fake outs from recent outputs
25% of the outputs are selected from the last 5 days (if possible),
in order to avoid the common case of sending recently received
outputs again. 25% and 5 days are subject to review later, since
it's just a wallet level change.
2016-10-15 18:17:16 +01:00
moneromooo-monero 5e10fb042d
rpc: add blockchain cumulative difficulty to getinfo call 2016-10-15 15:00:21 +01:00
moneromooo-monero 094f4c8cc6
rpc: add missing top block hash to json getinfo call 2016-10-15 14:35:29 +01:00
Dion Ahmetaj 7db29d6903 print_coinbase_tx_sum now breaks output into fee and emission components 2016-10-10 19:55:18 -04:00
Dion Ahmetaj dd6c44327b changed params from start/end index to height/count 2016-10-10 17:19:36 -04:00
Dion Ahmetaj e95d3f359b attempted to remove whitespace spam 2016-10-10 16:41:24 -04:00
Dion Ahmetaj 412da63622 added print_coinbase_tx_sum option 2016-10-10 15:45:51 -04:00
Jacob Brydolf 79bb5a670a
Fix build after spelling corrections in core_rpc_server 2016-10-04 13:55:55 +02:00
Riccardo Spagni ab60c0503c
Merge pull request #1164
179b1f4 daemon: implement missing print_bc and matching RPC (moneromooo-monero)
2016-10-04 12:14:12 +02:00
Riccardo Spagni e34ef4de6c
Merge pull request #1171
6390673 Removed all code related to fast_exit (NanoAkron)
2016-10-04 11:41:41 +02:00
NanoAkron 6390673137 Removed all code related to fast_exit 2016-10-03 02:06:55 +01:00
moneromooo-monero 179b1f43af
daemon: implement missing print_bc and matching RPC 2016-10-02 10:21:21 +01:00
NanoAkron 25be1d3ed4 Noticed two spellings of the word 'response' in the codebase, one 'responce' and the other 'response'.
Fixed to the standard spelling 'response'. This may fix some functionality - some calls had mixed spellings.
2016-09-29 14:38:12 +01:00
moneromooo-monero eeb2bbc0fc
epee: optionally restrict HTTP service to a configurable user agent
This is intended to catch traffic coming from a web browser,
so we avoid issues with a web page sending a transfer RPC to
the wallet. Requiring a particular user agent can act as a
simple password scheme, while we wait for 0MQ and proper
authentication to be merged.
2016-09-18 20:32:02 +01:00
moneromooo-monero 3cb2edec66
rpc: send global indices along with blocks/transacions on refresh
This plugs a privacy leak, where the wallet tells the daemon
which transactions contain outputs for the wallet by asking
for additional information for that particular transaction.

As a nice bonus, this actually makes refresh slightly faster.
2016-08-28 21:29:38 +01:00
moneromooo-monero c2ec6d35b9
mixable transactions must be rct for v3 2016-08-28 21:29:07 +01:00
moneromooo-monero 4258dab4d6
core: new /getrandom_rctouts.bin binary RPC call
to get random ringct outputs to mix with
2016-08-28 21:28:16 +01:00
moneromooo-monero 9e82b694da
remove original Cryptonote blockchain_storage blockchain format 2016-08-28 21:27:32 +01:00
moneromooo-monero 7e4e0021f4
daemon: print time to next fork 2016-08-12 20:32:23 +01:00
moneromooo-monero 11dc091464
Fake outs set is now decided by the wallet
This plugs a privacy leak from the wallet to the daemon,
as the daemon could previously see what input is included
as a transaction input, which the daemon hadn't previously
supplied. Now, the wallet requests a particular set of
outputs, including the real one.

This can result in transactions that can't be accepted if
the wallet happens to select too many outputs with non standard
unlock times. The daemon could know this and select another
output, but the wallet is blind to it. It's currently very
unlikely since I don't think anything uses non default
unlock times. The wallet requests more outputs than necessary
so it can use spares if any of the returns outputs are still
locked. If there are not enough spares to reach the desired
mixin, the transaction will fail.
2016-08-11 14:35:27 +01:00
moneromooo-monero 1593553e03
new unlocked parameter to output_histogram
This constrains the number of instances of any amount
to the unlocked ones (as defined by the default unlock time
setting: outputs with non default unlock time are not
considered, so may be counted as unlocked even if they are
not actually unlocked).
2016-08-01 22:16:00 +01:00
moneromooo-monero 22d8344cb5
core_rpc_server: fix gray/white peer list mixup 2016-07-26 20:02:43 +01:00
moneromooo-monero 014f3a0d39
Add a daemon RPC version, and make simplewallet check it
If the version is different, simplewallet will refuse to use that
daemon, unless --allow-mismatched-daemon-version is used.
2016-07-10 16:49:40 +01:00
moneromooo-monero f11191a818
rpc: restrict number of fake outs requested in restricted rpc mode 2016-06-29 20:43:14 +01:00
moneromooo-monero 0c6e9e4ddd
rpc: fix getblock RPC sending blob as binary, not hex dump 2016-06-10 17:48:19 +01:00
Howard Chu b7140daea2 Add GET_HASHES_FAST rpc, use it in wallet
When m_refresh_from_block_height has been set, only hashes will be
retrieved up to that height, instead of full blocks. The same will
be done for "refresh <height>" when the specified height is beyond
the current local blockchain.
2016-04-17 15:25:46 +01:00
Riccardo Spagni c2e9866fc6
Merge pull request #797
d662ab5 rpc: print human readable time since received when printing pool (moneromooo-monero)
5c9dd23 rpc: add a do_not_relay boolean to tx submission (moneromooo-monero)
2016-04-14 16:20:41 +09:00
moneromooo-monero f17b2f42b2
rpc: add pool/blockchain and block height results to gettransactions 2016-04-09 12:40:32 +01:00
moneromooo-monero 5c9dd23b1c
rpc: add a do_not_relay boolean to tx submission
Just to make it easier
2016-04-05 20:15:54 +01:00
Riccardo Spagni ab43e80331
Merge pull request #777
8757e46 add blockhashing blob to getblocktemplate (Howard Chu)
2016-04-02 12:05:07 +09:00
Riccardo Spagni a38ad63f8f
Merge pull request #767
24b3e90 Convey tx verification failure reasons to the RPC client (moneromooo-monero)
2016-04-02 12:02:07 +09:00
Howard Chu 8757e46b78 add blockhashing blob to getblocktemplate 2016-03-30 16:54:36 +01:00
moneromooo-monero 24b3e9007a
Convey tx verification failure reasons to the RPC client
This allows appropriate action to be taken, like displaying
the reason to the user.

Do just that in simplewallet, which should help a lot in
determining why users fail to send.

Also make it so a tx which is accepted but not relayed is
seen as a success rather than a failure.
2016-03-27 12:37:18 +01:00
moneromooo-monero 600a3cf0c0
New RPC and daemon command to get output histogram
This is a list of existing output amounts along with the number
of outputs of that amount in the blockchain.

The daemon command takes:
- no parameters: all outputs with at least 3 instances
- one parameter: all outputs with at least that many instances
- two parameters: all outputs within that many instances

The default starts at 3 to avoid massive spamming of all dust
outputs in the blockchain, and is the current minimum mixin
requirement.

An optional vector of amounts may be passed, to request
histogram only for those outputs.
2016-03-26 21:10:43 +00:00
Mike C ee71946cdc Fix typo on bitmonerod rpc method error. 2016-03-14 23:09:21 -06:00
moneromooo-monero 789e2755f7
rpc: do not return bans if they're effectively spent
The blocked ip list will still hold them till next time
a connection attempt is made with that IP, so the effective
length of the ban may be negative.
2016-03-12 13:49:08 +00:00
moneromooo-monero bf6d1474c0
new flush_txpool command, and associated RPC call
It can flush a particular tx, or the whole pool (the RPC command
can flush a list of transactions too)
2016-01-30 13:28:26 +00:00
moneromooo-monero 6288295f8e
rpc: add missing return on error when getting a tx 2016-01-30 13:28:12 +00:00
moneromooo-monero 3b1d7e03fc
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
2016-01-29 17:21:11 +00:00
moneromooo-monero 664dc42e18
rpc: fix missing target information in RPC call
which fixes the status command via RPC too.

Turns out there are two versions of the GET_INFO call.
I'd never noticed before.
2016-01-11 22:52:01 +00:00
moneromooo-monero a44d94d390
rpc: is_key_image_spent now checks the tx pool too 2016-01-05 22:16:24 +00:00
Riccardo Spagni de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
Riccardo Spagni aa7d6c5412
Merge pull request #547
8ea7af1 Allow the wallet to access hard fork information (moneromooo-monero)
760331b epee: make log macros behave like statements (moneromooo-monero)
3f2970f Add missing semicolons after log statements (moneromooo-monero)
2015-12-22 10:10:54 +02:00
moneromooo-monero 8ea7af1ba3
Allow the wallet to access hard fork information
And make it change behavior slightly when close/after first hard fork
2015-12-19 14:52:30 +00:00
moneromooo-monero 0ab56b80db
print top block hash in daemon diff command
and add top block hash in get_info RPC
2015-12-18 19:56:17 +00:00
moneromooo-monero 336b37580f
Register daemon command line arguments to core if they're used in core
This fixes coretests, which does not register daemon specific arguments,
but uses core, which uses those arguments. Also gets rid of an unwanted
dependency on daemon code from core.
2015-12-08 23:06:29 +00:00
Riccardo Spagni 8a52cf4055
Merge pull request #505
7574297 core_rpc_server: add a --restricted-rpc option (moneromooo-monero)
2015-11-30 00:18:20 +02:00
Riccardo Spagni 83b412f471
Merge pull request #503
55e5a33 rpc: pass current block target in rpc (moneromooo-monero)
2015-11-30 00:16:58 +02:00
moneromooo-monero 75742977a8
core_rpc_server: add a --restricted-rpc option
It does not expose the RPC for commands like start_mining, etc
(ie, commands a public node operator might want to be restricted)
2015-11-27 18:27:24 +00:00
moneromooo-monero 55e5a33d85
rpc: pass current block target in rpc
This fixes the hash rate being wrong on testnet after the switch
to 2 minute blocks
2015-11-26 00:25:13 +00:00
moneromooo-monero 38ceb73848
add RPC calls and commands to get/set bans 2015-11-26 00:04:22 +00:00
moneromooo-monero 932994c0cb
Relay transactions when they linger too long in the pool
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-21 00:56:21 +00:00
moneromooo-monero 051ddbc741
rpc: fix start_mining and status RPC crashes
They check whether they're running on testnet by accessing the
m_rpc_server object, which does not exist when in RPC mode.

Also, fix hard_fork_info being called with the wrong API.
2015-10-28 18:09:36 +00:00
moneromooo-monero 06c65cb0ef
rpc: fix hard_fork_info RPC
I had never tested it, obviously
2015-10-26 10:17:48 +00:00
moneromooo-monero 253ed76ef4
core_rpc_server: add optional json decoded tx to COMMAND_RPC_GET_TRANSACTIONS 2015-10-13 22:11:52 +01:00
moneromooo-monero ca23c0e5c8
core_rpc_server: add a getblock RPC command, and fix print_block 2015-10-13 21:37:35 +01:00
moneromooo-monero e546f3724a
Add an RPC call and daemon command to get info on hard fork voting 2015-09-19 16:47:48 +01:00
Riccardo Spagni 7792255968
Merge pull request #369
d87a2d2 core_rpc_server: replace vector<bool> with vector<int> in RPC (moneromooo-monero)
2015-08-13 20:04:31 +02:00