Skip to content

Commit

Permalink
WebSockets RPC server (openethereum#5425)
Browse files Browse the repository at this point in the history
* Basic WS server.

* CLI for WS server.

* Bump jsonrpc

* Fixing test.
  • Loading branch information
tomusdrw authored and debris committed Apr 13, 2017
1 parent 1df30ee commit ea09aa5
Show file tree
Hide file tree
Showing 28 changed files with 385 additions and 138 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ test-windows:
- git submodule update --init --recursive
script:
- set RUST_BACKTRACE=1
- echo cargo test --features json-tests -p rlp -p ethash -p ethcore -p ethcore-bigint -p ethcore-dapps -p ethcore-rpc -p ethcore-signer -p ethcore-util -p ethcore-network -p ethcore-io -p ethkey -p ethstore -p ethsync -p ethcore-ipc -p ethcore-ipc-tests -p ethcore-ipc-nano -p parity %CARGOFLAGS% --verbose --release
- echo cargo test --features json-tests -p rlp -p ethash -p ethcore -p ethcore-bigint -p ethcore-dapps -p parity-rpc -p ethcore-signer -p ethcore-util -p ethcore-network -p ethcore-io -p ethkey -p ethstore -p ethsync -p ethcore-ipc -p ethcore-ipc-tests -p ethcore-ipc-nano -p parity %CARGOFLAGS% --verbose --release
tags:
- rust-windows
allow_failure: true
Expand Down
139 changes: 84 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ ethcore = { path = "ethcore" }
ethcore-util = { path = "util" }
ethcore-io = { path = "util/io" }
ethcore-devtools = { path = "devtools" }
ethcore-rpc = { path = "rpc" }
ethcore-signer = { path = "signer" }
ethcore-ipc = { path = "ipc/rpc" }
ethcore-ipc-nano = { path = "ipc/nano" }
Expand All @@ -45,12 +44,13 @@ ethkey = { path = "ethkey" }
evmbin = { path = "evmbin" }
rlp = { path = "util/rlp" }
rpc-cli = { path = "rpc_cli" }
parity-rpc-client = { path = "rpc_client" }
parity-hash-fetch = { path = "hash-fetch" }
parity-ipfs-api = { path = "ipfs" }
parity-updater = { path = "updater" }
parity-reactor = { path = "util/reactor" }
parity-local-store = { path = "local-store" }
parity-reactor = { path = "util/reactor" }
parity-rpc = { path = "rpc" }
parity-rpc-client = { path = "rpc_client" }
parity-updater = { path = "updater" }
path = { path = "util/path" }

parity-dapps = { path = "dapps", optional = true }
Expand Down Expand Up @@ -85,7 +85,7 @@ ui-precompiled = [
dapps = ["parity-dapps"]
ipc = ["ethcore/ipc", "ethsync/ipc"]
jit = ["ethcore/jit"]
dev = ["clippy", "ethcore/dev", "ethcore-util/dev", "ethsync/dev", "ethcore-rpc/dev", "parity-dapps/dev", "ethcore-signer/dev"]
dev = ["clippy", "ethcore/dev", "ethcore-util/dev", "ethsync/dev", "parity-rpc/dev", "parity-dapps/dev", "ethcore-signer/dev"]
json-tests = ["ethcore/json-tests"]
test-heavy = ["ethcore/test-heavy"]
ethkey-cli = ["ethcore/ethkey-cli"]
Expand Down
2 changes: 1 addition & 1 deletion dapps/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use std::sync::Arc;
use hyper;

use ethcore_rpc::{Metadata, Origin};
use parity_rpc::{Metadata, Origin};
use jsonrpc_core::{Middleware, MetaIoHandler};
use jsonrpc_http_server::{self as http, AccessControlAllowOrigin, HttpMetaExtractor};
use jsonrpc_http_server::tokio_core::reactor::Remote;
Expand Down
8 changes: 8 additions & 0 deletions parity/cli/config.full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ cors = "null"
apis = ["web3", "eth", "net", "parity", "traces", "rpc"]
hosts = ["none"]

[websockets]
disable = false
port = 8546
interface = "local"
origins = ["none"]
apis = ["web3", "eth", "net", "parity", "traces", "rpc"]
hosts = ["none"]

[ipc]
disable = false
path = "$HOME/.parity/jsonrpc.ipc"
Expand Down
3 changes: 3 additions & 0 deletions parity/cli/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ allow_ips = "public"
reserved_only = true
reserved_peers = "./path/to/reserved_peers"

[websockets]
disable = true
origins = ["none"]

[rpc]
disable = true
Expand Down
Loading

0 comments on commit ea09aa5

Please sign in to comment.