Commit Graph
110 Commits
Author SHA1 Message Date
Duke Leto 89a4226965 Report rpc port in error when unable to connect 2021-08-05 15:55:34 -04:00
Duke Leto 2331ed0c56 Default HSC is now HUSH3 and some doc fixes 2021-07-10 12:23:55 -04:00
Duke Leto 84dffacdea More details about invalid RPC replies 2021-03-29 17:51:56 -04:00
Duke Leto b58c15b9fb update copyrights 2020-12-10 07:45:36 -05:00
Duke Leto c737c0dfaf We call them Hush Smart Chains around here 2020-11-15 11:54:06 -05:00
Duke Leto be16f80abc Hush Full Node is now GPLv3
Any projects which want to use Hush code from now on will need to be licensed as
GPLv3 or we will send the lawyers: https://www.softwarefreedom.org/

Notably, Komodo (KMD) is licensed as GPLv2 and is no longer compatible to receive
code changes, without causing legal issues. MIT projects, such as Zcash, also cannot pull
in changes from the Hush Full Node without permission from The Hush Developers,
which may in some circumstances grant an MIT license on a case-by-case basis.
2020-10-21 07:28:10 -04:00
Duke Leto 9e6cdec2f6 Update hush-cli cli help 2020-09-19 20:38:43 -04:00
jl777 0ea9ae3c05 Update copyright to 2019 2018-12-31 21:41:05 -11:00
blackjok3r d89fe8b560 fix bitcoin-cli.cpp includes 2018-11-30 01:52:39 +08:00
miketout 9feb4b9e08 Major updates integration from all upstreams 2018-09-18 14:33:53 -07:00
Daniel Cousens 4519a766b6 move rpc* to rpc/ 2018-07-18 11:07:16 -06:00
jl777 05c2ba6371 split out asset chain p2p port from roc port 2018-04-22 17:10:35 +03:00
Jack Grigg abf5dd31af Add static asserts to ensure CONTINUE_EXECUTION doesn't collide 2018-04-12 18:11:46 -06:00
Karl-Johan Alm 3b26f5c361 Removed using namespace std from bitcoin-cli/-tx and added std:: in appropriate places. 2018-04-12 18:10:04 -06:00
UdjinM6 fadbbe1e04 Fix exit codes:
- `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error)
- error reading config file should exit with `1`

Slightly refactor AppInitRPC/AppInitRawTx to return standard exit codes (EXIT_FAILURE/EXIT_SUCCESS) or CONTINUE_EXECUTION (-1)
2018-04-12 18:10:04 -06:00
Puru e8f5b0278e bitcoin-cli.cpp: Use symbolic constant for exit code 2018-04-12 18:10:04 -06:00
Wladimir J. van der Laan 21e33231af rpc: Input-from-stdin mode for bitcoin-cli
Implements #7442 by adding an option `-stdin` which reads
additional arguments from stdin, one per line.

For example

```bash
echo -e "mysecretcode\n120" | src/bitcoin-cli -stdin walletpassphrase
echo -e "walletpassphrase\nmysecretcode\n120" | src/bitcoin-cli -stdin
```
2018-04-12 18:08:17 -06:00
jl777 6e1d2e7dc9 Test 2018-03-24 15:59:48 +02:00
jl777 c88fa588de Test 2018-03-22 15:13:15 +02:00
jl777 95c463966a Dont create .conf from cli 2018-02-27 22:25:37 +02:00
Scott Sadler d430a5e8ca upgrade cJSON and move customizations to komodo_cJSON 2017-10-23 09:55:37 -07:00
ca333 59d405e867 333 2017-10-09 15:56:28 +02:00
ca333 9d36579649 uni3 2017-10-09 11:45:49 +02:00
jl777 f50685fe28 Support mnzd and mnz-cli 2017-10-06 16:22:25 +03:00
jl777 450f60749f Fix rpcport 2017-09-25 11:44:10 +02:00
jl777 6e9f40ca49 Test 2017-03-30 05:42:52 +03:00
jl777 945f015d80 Initial merge 2017-03-30 04:35:16 +03:00
zkbot f7fcad709b Auto merge of #2203 - arcalinea:2142_security_log_message, r=daira
Add message directing users to security guide

Addresses #2142, which was blocking on updates to zcash/support/security.html. That page has now been added, so this message directing users to the site can be included.

It displays in the zcash-cli --help and --version message text, and on the zcashd metrics screen.
2017-03-26 01:36:24 +00:00
Daira Hopwood f0d1accb7d Line-wrap privacy notice. Use <> around URL and end sentence with '.'.
Include privacy notice in help text for zcashd -help.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-26 02:08:29 +01:00
Jack Grigg 206e2b9737 Wrap error string 2017-03-25 17:39:56 +13:00
Jay Graber ab1d2d575c Add security message to license text, rm url from translation string 2017-03-24 13:48:27 -07:00
Jay Graber 54c0a28123 Add security warning to zcashd metrics display 2017-03-23 20:43:23 -07:00
Jay Graber efa9c265c4 Add security warning to zcash-cli --help and --version message output 2017-03-23 18:13:09 -07:00
Ian Kelling 629a875229 Docs: add details to -rpcclienttimeout doc 2017-03-24 09:03:59 +13:00
Karl-Johan Alm 68377e18a8 Switched bitcoin-cli.cpp to use RAII unique pointers with deleters. 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 7c2ab05969 bitcoin-cli: Make error message less confusing
Sorry for the churn on this, but the current message (introduced in #9073)
isn't acceptable:

    $ src/bitcoin-cli getinfo
    rpc: couldn't connect to server
    (make sure server is running and you are connecting to the correct RPC port: -1 unknown)

Putting the error code after the words "RPC port" made me wonder whether
there was a port configuration issue.

This changes it to:

    $ src/bitcoin-cli getinfo
    error: couldn't connect to server: unknown (code -1)
    (make sure server is running and you are connecting to the correct RPC port)
2017-03-24 09:03:59 +13:00
instagibbs 603205e381 Add common failure cases for rpc server connection failure 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 6415573a59 bitcoin-cli: More detailed error reporting
Register a evhttp error handler to get a more detailed error message
if the HTTP request fails.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 89bccddcd8 rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeout
The two timeouts for the server and client, are essentially different:

- In the case of the server it should be a lower value to avoid clients
clogging up connection slots

- In the case of the client it should be a high value to accomedate slow
  responses from the server, for example for slow queries or when the
  lock is contended

Split the options into `-rpcservertimeout` and `-rpcclienttimeout` with
respective defaults of 30 and 900.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 167b6231c9 Move windows socket init to utility function 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan afd64f76ea evhttpd implementation
- *Replace usage of boost::asio with [libevent2](http://libevent.org/)*.
boost::asio is not part of C++11, so unlike other boost there is no
forwards-compatibility reason to stick with it. Together with #4738 (convert
json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with
regard to compile-time slowness.

- *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling
is handled by libevent, a work queue (with configurable depth and parallelism)
is used to handle application requests.

- *Wrap HTTP request in C++ class*; this makes the application code mostly
HTTP-server-neutral

- *Refactor RPC to move all http-specific code to a separate file*.
Theoreticaly this can allow building without HTTP server but with another RPC
backend, e.g. Qt's debug console (currently not implemented) or future RPC
mechanisms people may want to use.

- *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL
paths they want to handle.

By using a proven, high-performance asynchronous networking library (also used
by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided.

What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests
pass. The aim for now is everything but SSL support.

Configuration options:

- `-rpcthreads`: repurposed as "number of  work handler threads". Still
defaults to 4.

- `-rpcworkqueue`: maximum depth of work queue. When this is reached, new
requests will return a 500 Internal Error.

- `-rpctimeout`: inactivity time, in seconds, after which to disconnect a
client.

- `-debug=http`: low-level http activity logging
2017-03-24 09:03:59 +13:00
Jonas Schnelli f061578b8f [bitcoin-cli] improve error output 2017-03-03 10:57:17 -08:00
Jonas Schnelli a10a6e2a0e [Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2017-02-10 02:18:51 +00:00
Jonas Schnelli d014114d67 Remove JSON Spirit wrapper, remove JSON Spirit leftovers
- implement find_value() function for UniValue
- replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper
- remove JSON Spirit sources
2017-02-10 00:35:24 +00:00
Jonas Schnelli 851f58f94e remove JSON Spirit UniValue wrapper 2017-02-10 00:35:24 +00:00
Jonas Schnelli 9756b7bd29 extend conversion to UniValue 2017-02-10 00:35:24 +00:00
Jeff Garzik ed21d5bd4b Convert tree to using univalue. Eliminate all json_spirit uses. 2017-02-10 00:35:24 +00:00
jl777 7aab5c7086 test 2017-01-30 07:57:14 +02:00
jl777 a012e05877 test 2017-01-29 23:31:41 +02:00
jl777 156b16bf6d test 2017-01-29 23:26:11 +02:00