* Ensure jsonrpc threading settings are sane
Starting with `jsonrpc` v14, the "server threads" setting is more important than before and the current default of 1 means the https server is effectively single-threaded. This PR proposes a new default of 4 (and ensures that crazy settings like e.g. `0` are bumped to at least `1`).
Also included: some docs, tests and cosmetics.
* Update parity/rpc.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update parity/rpc.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Remove (i.e. deprecate) `--jsonrpc-threads` command line option
* Call numbers NUM
* Don't show a default for --jsonrpc-threads (deprecated)
* Show deprecation warning when using `--jsonrpc-threads` or `processing_threads`
* Update parity/deprecated.rs
Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Fix test
* Fix tests for real
* OnDemand no longer loop until there is a query.
All peer known at the time will be queried, and the query fail if all
return no reply.
Returning the failure is done through an empty Vec of reply (the type
of the oneshot channel remains unchanged).
Before this commit the query were send randomly to any peer until there
is a reply (for a query that got no result it was an issue, for other
queries it was quering multiple times the same peers).
After this commit the first query is random but next queries
follows hashmap iterator order.
Test no_capability was broken by this commit (the pending query was
removed).
* OnDemand no longer loop until there is a query.
All peer known at the time will be queried, and the query fail if all
return no reply.
Returning the failure is done through an empty Vec of reply (the type
of the oneshot channel remains unchanged).
Before this commit the query were send randomly to any peer until there
is a reply (for a query that got no result it was an issue, for other
queries it was quering multiple times the same peers).
After this commit the first query is random but next queries
follows hashmap iterator order.
Test no_capability was broken by this commit (the pending query was
removed). If adding some kind of timeout mechanism it could be restored.
* Comment plus better field names.
* No panick on dropped oneshot channel.
* Use Set to avoid counter heuristic
* Cli option `on_demand_nb_retry` for maximum number of retry when doing
on demand query in light client.
* Missing test update for previous commit
* Add a timeout (only when there is no peer to query), that way we do not
set number of query to minimum current number peer or configured number
of query : that way capability test was restored.
* Adding an error type for on_demand, it helps having variant of error
reported at rpc level : choice of rpc error code error might not be
right.
* Duration as constant is nice
* Switch to duration in main too
* Fix indentation (sorry for that).
* Fix error management (bad merge in previous commit)
* Lots of english corrections, major change on the new command parameters :
- use standard '-' instead of '_'
- renaming nb_retry params to 'on-demand-retry-count'
* kvdb-rocksdb: update to RocksDB 5.8.8
* kvdb-rocksdb: tune RocksDB options
* Switch to level-style compaction
* Increase default block size (16K), and use bigger blocks for HDDs (64K)
* Increase default file size base (64MB SSDs, 256MB HDDs)
* Create a single block cache shared across all column families
* Tune compaction settings using RocksDB helper functions, taking into account
memory budget spread across all columns
* Configure backgrounds jobs based on the number of CPUs
* Set some default recommended settings
* ethcore: remove unused config blockchain.db_cache_size
* parity: increase default value for db_cache_size
* kvdb-rocksdb: enable compression on all levels
* kvdb-rocksdb: set global db_write_bufer_size
* kvdb-rocksdb: reduce db_write_bufer_size to force earlier flushing
* kvdb-rocksdb: use master branch for rust-rocksdb dependency
* Refactor and port CLI from Docopt to Clap (#2066)
* Add --can-restart and --force-direct to help
* Add flag support to subc & move import/export options to subcommand
* Reorder subcommand args (put positional args last in CLI help message)