Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p2p: migrate secret_connection from tmkms #696

Merged
merged 10 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
members = [
"light-client",
"light-node",
"p2p",
"proto",
"rpc",
"rpc-probe",
Expand Down
42 changes: 42 additions & 0 deletions p2p/Cargo.toml
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"]
19 changes: 19 additions & 0 deletions p2p/src/error.rs
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,
}
18 changes: 18 additions & 0 deletions p2p/src/lib.rs
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;
Loading