Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 94a238a

Browse files
committed
*: Add scaffolding and integration for core/authority-discovery module
1 parent d34eb4f commit 94a238a

File tree

11 files changed

+419
-7
lines changed

11 files changed

+419
-7
lines changed

Cargo.lock

Lines changed: 97 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ members = [
6363
"core/utils/fork-tree",
6464
"core/utils/wasm-builder",
6565
"core/utils/wasm-builder-runner",
66+
"core/authority-discovery",
6667
"srml/support",
6768
"srml/support/procedural",
6869
"srml/support/procedural/tools",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
name = "substrate-authority-discovery"
3+
version = "2.0.0"
4+
authors = ["Parity Technologies <[email protected]>"]
5+
edition = "2018"
6+
build = "build.rs"
7+
8+
[build-dependencies]
9+
prost-build = "0.5"
10+
11+
[dependencies]
12+
network = { package = "substrate-network", path = "../../core/network" }
13+
sr-primitives = { path = "../../core/sr-primitives" }
14+
primitives = { package = "substrate-primitives", path = "../primitives" }
15+
client = { package = "substrate-client", path = "../../core/client" }
16+
authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", path = "./primitives", default-features = false }
17+
codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" }
18+
futures = "0.1.17"
19+
tokio-timer = "0.2"
20+
keystore = { package = "substrate-keystore", path = "../../core/keystore" }
21+
libp2p = { version = "0.12.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] }
22+
serde_json = "1.0"
23+
log = "0.4"
24+
derive_more = "0.14.0"
25+
prost = "0.5"
26+
bytes = "0.4"

core/authority-discovery/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
prost_build::compile_protos(&["src/schema/dht.proto"], &["src/schema"]).unwrap();
3+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2019 Parity Technologies (UK) Ltd.
2+
// This file is part of Substrate.
3+
4+
// Substrate is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
9+
// Substrate is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
14+
// You should have received a copy of the GNU General Public License
15+
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
16+
17+
//! Authority discovery errors.
18+
19+
/// AuthorityDiscovery Result.
20+
pub type Result<T> = std::result::Result<T, Error>;
21+
22+
#[derive(Debug, derive_more::Display, derive_more::From)]
23+
pub enum Error {
24+
}

0 commit comments

Comments
 (0)