-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
p2p: migrate secret_connection from tmkms (#696)
* p2p: migrate secret_connection from tmkms Closes #691 * bring back versions, remove generate_key * return proper error * format code * fixes after xla review * fixes after @tony-iqlusion review * specify tendermint and tendermint-proto as path dependencies * more fixes after @xla review * remove warnings from lib.rs melekes@9e253df#r44484475 * make amino dependencies optional
- Loading branch information
Showing
10 changed files
with
988 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
members = [ | ||
"light-client", | ||
"light-node", | ||
"p2p", | ||
"proto", | ||
"rpc", | ||
"rpc-probe", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[package] | ||
name = "tendermint-p2p" | ||
version = "0.1.0" | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
repository = "https://github.com/informalsystems/tendermint-rs" | ||
readme = "README.md" | ||
keywords = ["p2p", "tendermint", "cosmos"] | ||
authors = [ | ||
"Tony Arcieri <[email protected]>", | ||
"Ismail Khoffi <[email protected]>" | ||
] | ||
|
||
description = """ | ||
The Tendermint P2P stack. | ||
""" | ||
|
||
[dependencies] | ||
chacha20poly1305 = "0.7" | ||
ed25519-dalek = "1" | ||
eyre = "0.6" | ||
hkdf = "0.10.0" | ||
merlin = "2" | ||
prost = "0.6" | ||
rand_core = { version = "0.5", features = ["std"] } | ||
sha2 = "0.9" | ||
subtle = "2" | ||
subtle-encoding = { version = "0.5" } | ||
thiserror = "1" | ||
x25519-dalek = "1.1" | ||
zeroize = "1" | ||
|
||
# path dependencies | ||
tendermint = { path = "../tendermint", version = "=0.17.0-rc3" } | ||
tendermint-proto = { path = "../proto", version = "=0.17.0-rc3" } | ||
|
||
# optional dependencies | ||
prost-amino = { version = "0.6", optional = true } | ||
prost-amino-derive = { version = "0.6", optional = true } | ||
|
||
[features] | ||
amino = ["prost-amino", "prost-amino-derive"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//! Error types | ||
|
||
use thiserror::Error; | ||
|
||
/// Kinds of errors | ||
#[derive(Copy, Clone, Debug, Error, Eq, PartialEq)] | ||
pub enum Error { | ||
/// Cryptographic operation failed | ||
#[error("cryptographic error")] | ||
CryptoError, | ||
|
||
/// Malformatted or otherwise invalid cryptographic key | ||
#[error("invalid key")] | ||
InvalidKey, | ||
|
||
/// Network protocol-related errors | ||
#[error("protocol error")] | ||
ProtocolError, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//! The Tendermint P2P stack. | ||
|
||
#![forbid(unsafe_code)] | ||
#![deny( | ||
trivial_casts, | ||
trivial_numeric_casts, | ||
unused_import_braces, | ||
unused_qualifications, | ||
rust_2018_idioms, | ||
nonstandard_style | ||
)] | ||
#![doc( | ||
html_root_url = "https://docs.rs/tendermint-p2p/0.1.0", | ||
html_logo_url = "https://raw.githubusercontent.com/informalsystems/tendermint-rs/master/img/logo-tendermint-rs_3961x4001.png" | ||
)] | ||
|
||
pub mod error; | ||
pub mod secret_connection; |
Oops, something went wrong.