Unverified Commit fec0e492 authored by Bernhard Schuster's avatar Bernhard Schuster Committed by GitHub
Browse files

introduce errors with info (#1834)

parent 56492295
Pipeline #112040 passed with stages
in 26 minutes and 36 seconds
This diff is collapsed.
...@@ -14,19 +14,12 @@ wasm-opt = false ...@@ -14,19 +14,12 @@ wasm-opt = false
crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]
[dependencies] [dependencies]
log = "0.4.8" log = "0.4.11"
futures = { version = "0.3.4", features = ["compat"] } structopt = { version = "0.3.8", optional = true }
structopt = "0.3.8"
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" }
service = { package = "polkadot-service", path = "../node/service", default-features = false, optional = true } service = { package = "polkadot-service", path = "../node/service", default-features = false, optional = true }
tokio = { version = "0.2.13", features = ["rt-threaded"], optional = true }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
...@@ -46,7 +39,7 @@ default = [ "wasmtime", "db", "cli", "full-node", "trie-memory-tracker" ] ...@@ -46,7 +39,7 @@ default = [ "wasmtime", "db", "cli", "full-node", "trie-memory-tracker" ]
wasmtime = [ "sc-cli/wasmtime" ] wasmtime = [ "sc-cli/wasmtime" ]
db = [ "service/db" ] db = [ "service/db" ]
cli = [ cli = [
"tokio", "structopt",
"sc-cli", "sc-cli",
"sc-service", "sc-service",
"frame-benchmarking-cli", "frame-benchmarking-cli",
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
//! Polkadot CLI library. //! Polkadot CLI library.
#![warn(missing_docs)] #![warn(missing_docs)]
#![warn(unused_extern_crates)]
#[cfg(feature = "browser")] #[cfg(feature = "browser")]
mod browser; mod browser;
......
...@@ -10,4 +10,4 @@ reed_solomon = { package = "reed-solomon-erasure", version = "4.0.2"} ...@@ -10,4 +10,4 @@ reed_solomon = { package = "reed-solomon-erasure", version = "4.0.2"}
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master" } trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master" }
derive_more = "0.15.0" thiserror = "1.0.21"
...@@ -30,6 +30,7 @@ use primitives::v0::{self, Hash as H256, BlakeTwo256, HashT}; ...@@ -30,6 +30,7 @@ use primitives::v0::{self, Hash as H256, BlakeTwo256, HashT};
use primitives::v1; use primitives::v1;
use sp_core::Blake2Hasher; use sp_core::Blake2Hasher;
use trie::{EMPTY_PREFIX, MemoryDB, Trie, TrieMut, trie_types::{TrieDBMut, TrieDB}}; use trie::{EMPTY_PREFIX, MemoryDB, Trie, TrieMut, trie_types::{TrieDBMut, TrieDB}};
use thiserror::Error;
use self::wrapped_shard::WrappedShard; use self::wrapped_shard::WrappedShard;
...@@ -39,35 +40,43 @@ mod wrapped_shard; ...@@ -39,35 +40,43 @@ mod wrapped_shard;
const MAX_VALIDATORS: usize = <galois_16::Field as reed_solomon::Field>::ORDER; const MAX_VALIDATORS: usize = <galois_16::Field as reed_solomon::Field>::ORDER;
/// Errors in erasure coding. /// Errors in erasure coding.
#[derive(Debug, Clone, PartialEq, derive_more::Display)] #[derive(Debug, Clone, PartialEq, Error)]
pub enum Error { pub enum Error {
/// Returned when there are too many validators. /// Returned when there are too many validators.
#[error("There are too many validators")]
TooManyValidators, TooManyValidators,
/// Cannot encode something for no validators /// Cannot encode something for no validators
#[error("Validator set is empty")]
EmptyValidators, EmptyValidators,
/// Cannot reconstruct: wrong number of validators. /// Cannot reconstruct: wrong number of validators.
#[error("Validator count mismatches between encoding and decoding")]
WrongValidatorCount, WrongValidatorCount,
/// Not enough chunks present. /// Not enough chunks present.
#[error("Not enough chunks to reconstruct message")]
NotEnoughChunks, NotEnoughChunks,
/// Too many chunks present. /// Too many chunks present.
#[error("Too many chunks present")]
TooManyChunks, TooManyChunks,
/// Chunks not of uniform length or the chunks are empty. /// Chunks not of uniform length or the chunks are empty.
#[error("Chunks are not unform, mismatch in length or are zero sized")]
NonUniformChunks, NonUniformChunks,
/// An uneven byte-length of a shard is not valid for GF(2^16) encoding. /// An uneven byte-length of a shard is not valid for GF(2^16) encoding.
#[error("Uneven length is not valid for field GF(2^16)")]
UnevenLength, UnevenLength,
/// Chunk index out of bounds. /// Chunk index out of bounds.
#[display(fmt = "Chunk is out of bounds: {} {}", _0, _1)] #[error("Chunk is out of bounds: {chunk_index} not included in 0..{n_validators}")]
ChunkIndexOutOfBounds(usize, usize), ChunkIndexOutOfBounds{ chunk_index: usize, n_validators: usize },
/// Bad payload in reconstructed bytes. /// Bad payload in reconstructed bytes.
#[error("Reconstructed payload invalid")]
BadPayload, BadPayload,
/// Invalid branch proof. /// Invalid branch proof.
#[error("Invalid branch proof")]
InvalidBranchProof, InvalidBranchProof,
/// Branch out of bounds. /// Branch out of bounds.
#[error("Branch is out of bounds")]
BranchOutOfBounds, BranchOutOfBounds,
} }
impl std::error::Error for Error { }
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
struct CodeParams { struct CodeParams {
data_shards: usize, data_shards: usize,
...@@ -206,7 +215,7 @@ fn reconstruct<'a, I: 'a, T: Decode>(n_validators: usize, chunks: I) -> Result<T ...@@ -206,7 +215,7 @@ fn reconstruct<'a, I: 'a, T: Decode>(n_validators: usize, chunks: I) -> Result<T
let mut shard_len = None; let mut shard_len = None;
for (chunk_data, chunk_idx) in chunks.into_iter().take(n_validators) { for (chunk_data, chunk_idx) in chunks.into_iter().take(n_validators) {
if chunk_idx >= n_validators { if chunk_idx >= n_validators {
return Err(Error::ChunkIndexOutOfBounds(chunk_idx, n_validators)); return Err(Error::ChunkIndexOutOfBounds{ chunk_index: chunk_idx, n_validators });
} }
let shard_len = shard_len.get_or_insert_with(|| chunk_data.len()); let shard_len = shard_len.get_or_insert_with(|| chunk_data.len());
......
...@@ -5,7 +5,6 @@ authors = ["Parity Technologies <admin@parity.io>"] ...@@ -5,7 +5,6 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
derive_more = "0.99.9"
futures = "0.3.5" futures = "0.3.5"
log = "0.4.8" log = "0.4.8"
polkadot-erasure-coding = { path = "../../erasure-coding" } polkadot-erasure-coding = { path = "../../erasure-coding" }
...@@ -14,6 +13,7 @@ polkadot-node-subsystem = { path = "../subsystem" } ...@@ -14,6 +13,7 @@ polkadot-node-subsystem = { path = "../subsystem" }
polkadot-node-subsystem-util = { path = "../subsystem-util" } polkadot-node-subsystem-util = { path = "../subsystem-util" }
polkadot-primitives = { path = "../../primitives" } polkadot-primitives = { path = "../../primitives" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
thiserror = "1.0.21"
[dev-dependencies] [dev-dependencies]
polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" } polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" }
...@@ -14,19 +14,20 @@ ...@@ -14,19 +14,20 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>. // along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
use thiserror::Error;
#[derive(Debug, derive_more::From)] #[derive(Debug, Error)]
pub enum Error { pub enum Error {
#[from] #[error(transparent)]
Subsystem(polkadot_node_subsystem::SubsystemError), Subsystem(#[from] polkadot_node_subsystem::SubsystemError),
#[from] #[error(transparent)]
OneshotRecv(futures::channel::oneshot::Canceled), OneshotRecv(#[from] futures::channel::oneshot::Canceled),
#[from] #[error(transparent)]
Runtime(polkadot_node_subsystem::errors::RuntimeApiError), Runtime(#[from] polkadot_node_subsystem::errors::RuntimeApiError),
#[from] #[error(transparent)]
Util(polkadot_node_subsystem_util::Error), Util(#[from] polkadot_node_subsystem_util::Error),
#[from] #[error(transparent)]
Erasure(polkadot_erasure_coding::Error), Erasure(#[from] polkadot_erasure_coding::Error),
} }
pub type Result<T> = std::result::Result<T, Error>; pub type Result<T> = std::result::Result<T, Error>;
...@@ -5,12 +5,12 @@ authors = ["Parity Technologies <admin@parity.io>"] ...@@ -5,12 +5,12 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
derive_more = "0.99.9"
futures = "0.3.5" futures = "0.3.5"
futures-timer = "3.0.2" futures-timer = "3.0.2"
kvdb = "0.7.0" kvdb = "0.7.0"
kvdb-rocksdb = "0.9.1" kvdb-rocksdb = "0.9.1"
log = "0.4.8" log = "0.4.11"
thiserror = "1.0.21"
codec = { package = "parity-scale-codec", version = "1.3.1", features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.3.1", features = ["derive"] }
erasure = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" } erasure = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" }
......
...@@ -44,6 +44,7 @@ use polkadot_node_subsystem_util::metrics::{self, prometheus}; ...@@ -44,6 +44,7 @@ use polkadot_node_subsystem_util::metrics::{self, prometheus};
use polkadot_subsystem::messages::{ use polkadot_subsystem::messages::{
AllMessages, AvailabilityStoreMessage, ChainApiMessage, RuntimeApiMessage, RuntimeApiRequest, AllMessages, AvailabilityStoreMessage, ChainApiMessage, RuntimeApiMessage, RuntimeApiRequest,
}; };
use thiserror::Error;
const LOG_TARGET: &str = "availability"; const LOG_TARGET: &str = "availability";
...@@ -53,22 +54,22 @@ mod columns { ...@@ -53,22 +54,22 @@ mod columns {
pub const NUM_COLUMNS: u32 = 2; pub const NUM_COLUMNS: u32 = 2;
} }
#[derive(Debug, derive_more::From)] #[derive(Debug, Error)]
enum Error { enum Error {
#[from] #[error(transparent)]
Chain(ChainApiError), RuntimeAPI(#[from] RuntimeApiError),
#[from] #[error(transparent)]
Erasure(erasure::Error), ChainAPI(#[from] ChainApiError),
#[from] #[error(transparent)]
Io(io::Error), Erasure(#[from] erasure::Error),
#[from] #[error(transparent)]
Oneshot(oneshot::Canceled), Io(#[from] io::Error),
#[from] #[error(transparent)]
Runtime(RuntimeApiError), Oneshot(#[from] oneshot::Canceled),
#[from] #[error(transparent)]
Subsystem(SubsystemError), Subsystem(#[from] SubsystemError),
#[from] #[error(transparent)]
Time(SystemTimeError), Time(#[from] SystemTimeError),
} }
/// A wrapper type for delays. /// A wrapper type for delays.
......
...@@ -6,19 +6,16 @@ edition = "2018" ...@@ -6,19 +6,16 @@ edition = "2018"
[dependencies] [dependencies]
futures = "0.3.5" futures = "0.3.5"
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-node-primitives = { path = "../../primitives" } polkadot-node-primitives = { path = "../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" } polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-subsystem-util = { path = "../../subsystem-util" }
erasure-coding = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" } erasure-coding = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" }
statement-table = { package = "polkadot-statement-table", path = "../../../statement-table" } statement-table = { package = "polkadot-statement-table", path = "../../../statement-table" }
derive_more = "0.99.9"
bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] } bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] }
log = "0.4.8" log = "0.4.11"
thiserror = "1.0.21"
[dev-dependencies] [dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
//! Implements a `CandidateBackingSubsystem`. //! Implements a `CandidateBackingSubsystem`.
#![deny(unused_crate_dependencies)]
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
use std::convert::TryFrom; use std::convert::TryFrom;
use std::pin::Pin; use std::pin::Pin;
...@@ -64,22 +66,26 @@ use statement_table::{ ...@@ -64,22 +66,26 @@ use statement_table::{
SignedStatement as TableSignedStatement, Summary as TableSummary, SignedStatement as TableSignedStatement, Summary as TableSummary,
}, },
}; };
use thiserror::Error;
#[derive(Debug, derive_more::From)] #[derive(Debug, Error)]
enum Error { enum Error {
#[error("Candidate is not found")]
CandidateNotFound, CandidateNotFound,
#[error("Signature is invalid")]
InvalidSignature, InvalidSignature,
StoreFailed, #[error("Failed to send candidates {0:?}")]
#[from] Send(Vec<NewBackedCandidate>),
Erasure(erasure_coding::Error), #[error("Oneshot never resolved")]
#[from] Oneshot(#[from] #[source] oneshot::Canceled),
ValidationFailed(ValidationFailed), #[error("Obtaining erasure chunks failed")]
#[from] ObtainErasureChunks(#[from] #[source] erasure_coding::Error),
Oneshot(oneshot::Canceled), #[error(transparent)]
#[from] ValidationFailed(#[from] ValidationFailed),
Mpsc(mpsc::SendError), #[error(transparent)]
#[from] Mpsc(#[from] mpsc::SendError),
UtilError(util::Error), #[error(transparent)]
UtilError(#[from] util::Error),
} }
/// Holds all data needed for candidate backing job operation. /// Holds all data needed for candidate backing job operation.
...@@ -468,7 +474,7 @@ impl CandidateBackingJob { ...@@ -468,7 +474,7 @@ impl CandidateBackingJob {
CandidateBackingMessage::GetBackedCandidates(_, tx) => { CandidateBackingMessage::GetBackedCandidates(_, tx) => {
let backed = self.get_backed(); let backed = self.get_backed();
tx.send(backed).map_err(|_| oneshot::Canceled)?; tx.send(backed).map_err(|data| Error::Send(data))?;
} }
} }
...@@ -640,7 +646,7 @@ impl CandidateBackingJob { ...@@ -640,7 +646,7 @@ impl CandidateBackingJob {
) )
).await?; ).await?;
rx.await?.map_err(|_| Error::StoreFailed)?; let _ = rx.await?;
Ok(()) Ok(())
} }
......
...@@ -6,11 +6,11 @@ edition = "2018" ...@@ -6,11 +6,11 @@ edition = "2018"
[dependencies] [dependencies]
bitvec = "0.17.4" bitvec = "0.17.4"
derive_more = "0.99.9"
futures = "0.3.5" futures = "0.3.5"
log = "0.4.8" log = "0.4.11"
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem = { path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-subsystem-util = { path = "../../subsystem-util" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
wasm-timer = "0.2.4" wasm-timer = "0.2.4"
thiserror = "1.0.21"
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
//! The bitfield signing subsystem produces `SignedAvailabilityBitfield`s once per block. //! The bitfield signing subsystem produces `SignedAvailabilityBitfield`s once per block.
#![deny(unused_crate_dependencies, unused_results)]
#![warn(missing_docs)]
use bitvec::bitvec; use bitvec::bitvec;
use futures::{ use futures::{
channel::{mpsc, oneshot}, channel::{mpsc, oneshot},
...@@ -37,6 +40,7 @@ use polkadot_node_subsystem_util::{ ...@@ -37,6 +40,7 @@ use polkadot_node_subsystem_util::{
use polkadot_primitives::v1::{AvailabilityBitfield, CoreState, Hash, ValidatorIndex}; use polkadot_primitives::v1::{AvailabilityBitfield, CoreState, Hash, ValidatorIndex};
use std::{convert::TryFrom, pin::Pin, time::Duration}; use std::{convert::TryFrom, pin::Pin, time::Duration};
use wasm_timer::{Delay, Instant}; use wasm_timer::{Delay, Instant};
use thiserror::Error;
/// Delay between starting a bitfield signing job and its attempting to create a bitfield. /// Delay between starting a bitfield signing job and its attempting to create a bitfield.
const JOB_DELAY: Duration = Duration::from_millis(1500); const JOB_DELAY: Duration = Duration::from_millis(1500);
...@@ -45,6 +49,7 @@ const JOB_DELAY: Duration = Duration::from_millis(1500); ...@@ -45,6 +49,7 @@ const JOB_DELAY: Duration = Duration::from_millis(1500);
pub struct BitfieldSigningJob; pub struct BitfieldSigningJob;
/// Messages which a `BitfieldSigningJob` is prepared to receive. /// Messages which a `BitfieldSigningJob` is prepared to receive.
#[allow(missing_docs)]
pub enum ToJob { pub enum ToJob {
BitfieldSigning(BitfieldSigningMessage), BitfieldSigning(BitfieldSigningMessage),
Stop, Stop,
...@@ -79,6 +84,7 @@ impl From<BitfieldSigningMessage> for ToJob { ...@@ -79,6 +84,7 @@ impl From<BitfieldSigningMessage> for ToJob {
} }
/// Messages which may be sent from a `BitfieldSigningJob`. /// Messages which may be sent from a `BitfieldSigningJob`.
#[allow(missing_docs)]
pub enum FromJob { pub enum FromJob {
AvailabilityStore(AvailabilityStoreMessage), AvailabilityStore(AvailabilityStoreMessage),
BitfieldDistribution(BitfieldDistributionMessage), BitfieldDistribution(BitfieldDistributionMessage),
...@@ -112,28 +118,28 @@ impl TryFrom<AllMessages> for FromJob { ...@@ -112,28 +118,28 @@ impl TryFrom<AllMessages> for FromJob {
} }
/// Errors we may encounter in the course of executing the `BitfieldSigningSubsystem`. /// Errors we may encounter in the course of executing the `BitfieldSigningSubsystem`.
#[derive(Debug, derive_more::From)] #[derive(Debug, Error)]
pub enum Error { pub enum Error {
/// error propagated from the utility subsystem /// error propagated from the utility subsystem
#[from] #[error(transparent)]
Util(util::Error), Util(#[from] util::Error),
/// io error /// io error
#[from] #[error(transparent)]
Io(std::io::Error), Io(#[from] std::io::Error),
/// a one shot channel was canceled /// a one shot channel was canceled
#[from] #[error(transparent)]
Oneshot(oneshot::Canceled), Oneshot(#[from] oneshot::Canceled),
/// a mspc channel failed to send /// a mspc channel failed to send
#[from] #[error(transparent)]
MpscSend(mpsc::SendError), MpscSend(#[from] mpsc::SendError),
/// several errors collected into one /// several errors collected into one
#[from] #[error("Multiple errours occured: {0:?}")]
Multiple(Vec<Error>), Multiple(Vec<Error>),
/// the runtime API failed to return what we wanted /// the runtime API failed to return what we wanted
#[from] #[error(transparent)]
Runtime(RuntimeApiError), Runtime(#[from] RuntimeApiError),
/// the keystore failed to process signing request /// the keystore failed to process signing request
#[from] #[error("Keystore failed: {0:?}")]
Keystore(KeystoreError), Keystore(KeystoreError),
} }
...@@ -252,7 +258,7 @@ async fn construct_availability_bitfield( ...@@ -252,7 +258,7 @@ async fn construct_availability_bitfield(
if errs.is_empty() { if errs.is_empty() {
Ok(out.into_inner().into()) Ok(out.into_inner().into())
} else { } else {
Err(errs.into()) Err(Error::Multiple(errs.into()))
} }
} }
......
...@@ -5,9 +5,9 @@ authors = ["Parity Technologies <admin@parity.io>"] ...@@ -5,9 +5,9 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
derive_more = "0.99.9"
futures = "0.3.5" futures = "0.3.5"
log = "0.4.8" log = "0.4.11"
thiserror = "1.0.21"
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-node-primitives = { path = "../../primitives" } polkadot-node-primitives = { path = "../../primitives" }
polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem = { path = "../../subsystem" }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
//! The provisioner is responsible for assembling a relay chain block //! The provisioner is responsible for assembling a relay chain block
//! from a set of available parachain candidates of its choice. //! from a set of available parachain candidates of its choice.
#![deny(missing_docs)] #![deny(missing_docs, unused_crate_dependencies, unused_results)]
use futures::{ use futures::{
channel::{mpsc, oneshot}, channel::{mpsc, oneshot},
...@@ -39,6 +39,7 @@ use polkadot_primitives::v1::{ ...@@ -39,6 +39,7 @@ use polkadot_primitives::v1::{
CandidateDescriptor, CandidateReceipt, CollatorId, Hash, Id as ParaId, PoV, CandidateDescriptor, CandidateReceipt, CollatorId, Hash, Id as ParaId, PoV,
}; };
use std::{convert::TryFrom, pin::Pin, sync::Arc}; use std::{convert::TryFrom, pin::Pin, sync::Arc};