Commit graph

87 commits

Author SHA1 Message Date
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
moneromooo-monero d87a2d2bb2
core_rpc_server: replace vector<bool> with vector<int> in RPC
vector<bool> causes issues in serialization with Boost 1.56
2015-08-13 16:33:28 +01:00
moneromooo-monero e7b00abfaa
core_rpc_server: find transactions in the pool as well as the blockchain 2015-08-11 15:54:19 +01:00
moneromooo-monero 83bbea4c7f
Add a is_key_image_spent daemon command and RPC call 2015-08-11 10:52:41 +01:00
moneromooo-monero 754f863a7e
core_rpc_server: log some error messages to the console
It's helpful when you don't know something failed (especially as
everything ends up returning true, so caller thinks all's fine)
2015-05-28 23:13:32 +01:00
moneromooo-monero bac366e173
core_rpc_server: reenable print_pl 2015-05-28 14:10:39 +01:00