Skip to content

Commit

Permalink
whisper is no longer a part of parity-ethereum repo (openethereum#10855)
Browse files Browse the repository at this point in the history
* whisper is no longer a part of parity-ethereum repo

* fix failing tests

* update whisper help with the link to the new repo

* Removed AttachedProtocols

* updated whisper info in README.md files

* Update parity/deprecated.rs

Co-Authored-By: Andronik Ordian <[email protected]>
  • Loading branch information
debris and ordian authored Jul 12, 2019
1 parent 5a13117 commit cfe826f
Show file tree
Hide file tree
Showing 33 changed files with 42 additions and 4,417 deletions.
74 changes: 0 additions & 74 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ parity-runtime = { path = "util/runtime" }
parity-rpc = { path = "rpc" }
parity-updater = { path = "updater" }
parity-version = { path = "util/version" }
parity-whisper = { path = "whisper" }
parity-path = "0.1"
dir = { path = "util/dir" }
panic_hook = { path = "util/panic-hook" }
Expand Down Expand Up @@ -134,7 +133,6 @@ members = [
"ethcore/wasm/run",
"evmbin",
"parity-clib",
"whisper/cli",
"util/triehash-ethereum",
"util/keccak-hasher",
"util/patricia-trie-ethereum",
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ We recommend installing Rust through [rustup](https://www.rustup.rs/). If you do

`clang` is required. It comes with Xcode command line tools or can be installed with homebrew.

- Windows:
- Windows:
Make sure you have Visual Studio 2015 with C++ support installed. Next, download and run the `rustup` installer from
https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe, start "VS2015 x64 Native Tools Command Prompt", and use the following command to install and set up the `msvc` toolchain:
```bash
Expand Down Expand Up @@ -320,10 +320,6 @@ Caching, Importing Blocks, and Block Information
patricia-trie-ethereum registrar rlp_compress rlp_derive parity-runtime stats
time-utils triehash-ethereum unexpected parity-version
```
* Parity Whisper Protocol Implementation
```bash
parity-whisper whisper-cli
```

</p></details>

Expand Down Expand Up @@ -360,10 +356,10 @@ In addition to the Parity Ethereum client, there are additional tools in this re
- [evmbin](./evmbin) - Parity Ethereum EVM Implementation.
- [ethstore](./accounts/ethstore) - Parity Ethereum Key Management.
- [ethkey](./accounts/ethkey) - Parity Ethereum Keys Generator.
- [whisper](./whisper) - Parity Ethereum Whisper-v2 PoC Implementation.

The following tool is available in a separate repository:
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum Encoding of Function Calls. [Docs here](https://crates.io/crates/ethabi)
- [whisper](https://github.com/paritytech/whisper) - Parity Ethereum Whisper-v2 PoC Implementation.

## 7. Community <a id="chapter-007"></a>

Expand Down
2 changes: 1 addition & 1 deletion accounts/ethkey/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ _This project is a part of the Parity Ethereum toolchain._
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethstore) - Parity Ethereum key management.
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethkey) - Parity Ethereum keys generator.
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
- [whisper](https://github.com/paritytech/whisper) - Implementation of Whisper-v2 PoC.
2 changes: 1 addition & 1 deletion accounts/ethstore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,4 @@ _This project is a part of the Parity Ethereum toolchain._
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethstore) - Parity Ethereum key management.
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethkey) - Parity Ethereum keys generator.
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
- [whisper](https://github.com/paritytech/whisper) - Implementation of Whisper-v2 PoC.
39 changes: 0 additions & 39 deletions ethcore/sync/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,31 +219,6 @@ impl From<light_net::Status> for PipProtocolInfo {
}
}

/// Configuration to attach alternate protocol handlers.
/// Only works when IPC is disabled.
pub struct AttachedProtocol {
/// The protocol handler in question.
pub handler: Arc<dyn NetworkProtocolHandler + Send + Sync>,
/// 3-character ID for the protocol.
pub protocol_id: ProtocolId,
/// Supported versions and their packet counts.
pub versions: &'static [(u8, u8)],
}

impl AttachedProtocol {
fn register(&self, network: &NetworkService) {
let res = network.register_protocol(
self.handler.clone(),
self.protocol_id,
self.versions
);

if let Err(e) = res {
warn!(target: "sync", "Error attaching protocol {:?}: {:?}", self.protocol_id, e);
}
}
}

/// A prioritized tasks run in a specialised timer.
/// Every task should be completed within a hard deadline,
/// if it's not it's either cancelled or split into multiple tasks.
Expand Down Expand Up @@ -291,8 +266,6 @@ pub struct Params {
pub provider: Arc<dyn (::light::Provider)>,
/// Network layer configuration.
pub network_config: NetworkConfiguration,
/// Other protocols to attach.
pub attached_protos: Vec<AttachedProtocol>,
}

/// Ethereum network protocol handler
Expand All @@ -303,8 +276,6 @@ pub struct EthSync {
eth_handler: Arc<SyncProtocolHandler>,
/// Light (pip) protocol handler
light_proto: Option<Arc<LightProtocol>>,
/// Other protocols to attach.
attached_protos: Vec<AttachedProtocol>,
/// The main subprotocol name
subprotocol_name: [u8; 3],
/// Light subprotocol name.
Expand Down Expand Up @@ -409,7 +380,6 @@ impl EthSync {
light_proto: light_proto,
subprotocol_name: params.config.subprotocol_name,
light_subprotocol_name: params.config.light_subprotocol_name,
attached_protos: params.attached_protos,
priority_tasks: Mutex::new(priority_tasks_tx),
is_major_syncing
});
Expand Down Expand Up @@ -613,9 +583,6 @@ impl ChainNotify for EthSync {
self.network.register_protocol(light_proto, self.light_subprotocol_name, ::light::net::PROTOCOL_VERSIONS)
.unwrap_or_else(|e| warn!("Error registering light client protocol: {:?}", e));
}

// register any attached protocols.
for proto in &self.attached_protos { proto.register(&self.network) }
}

fn stop(&self) {
Expand Down Expand Up @@ -886,15 +853,12 @@ pub struct LightSyncParams<L> {
pub subprotocol_name: [u8; 3],
/// Other handlers to attach.
pub handlers: Vec<Arc<dyn LightHandler>>,
/// Other subprotocols to run.
pub attached_protos: Vec<AttachedProtocol>,
}

/// Service for light synchronization.
pub struct LightSync {
proto: Arc<LightProtocol>,
sync: Arc<dyn SyncInfo + Sync + Send>,
attached_protos: Vec<AttachedProtocol>,
network: NetworkService,
subprotocol_name: [u8; 3],
network_id: u64,
Expand Down Expand Up @@ -937,7 +901,6 @@ impl LightSync {
Ok(LightSync {
proto: light_proto,
sync: sync,
attached_protos: params.attached_protos,
network: service,
subprotocol_name: params.subprotocol_name,
network_id: params.network_id,
Expand Down Expand Up @@ -996,8 +959,6 @@ impl ManageNetwork for LightSync {

self.network.register_protocol(light_proto, self.subprotocol_name, ::light::net::PROTOCOL_VERSIONS)
.unwrap_or_else(|e| warn!("Error registering light client protocol: {:?}", e));

for proto in &self.attached_protos { proto.register(&self.network) }
}

fn stop_network(&self) {
Expand Down
2 changes: 1 addition & 1 deletion evmbin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ _This project is a part of the Parity Ethereum toolchain._
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethstore) - Parity Ethereum key management.
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/accounts/ethkey) - Parity Ethereum keys generator.
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
- [whisper](https://github.com/paritytech/whisper) - Implementation of Whisper-v2 PoC.
Loading

0 comments on commit cfe826f

Please sign in to comment.