diff --git a/polkadot/README.md b/polkadot/README.md index 584307726f..5281d40803 100644 --- a/polkadot/README.md +++ b/polkadot/README.md @@ -24,7 +24,7 @@ service that can be used to run a Polkadot node. This is disabled by default, and can be started by running `systemctl start polkadot` on demand (use `systemctl enable polkadot` to make it auto-start after reboot). By default, it will run as the `polkadot` user. Command-line flags passed to the binary can -be customised by editing `/etc/default/polkadot`. This file will not be +be customized by editing `/etc/default/polkadot`. This file will not be overwritten on updating polkadot. You may also just run the node directly from the command-line. diff --git a/polkadot/bridges/primitives/chain-kusama/src/lib.rs b/polkadot/bridges/primitives/chain-kusama/src/lib.rs index 7163d15ef1..b221aff049 100644 --- a/polkadot/bridges/primitives/chain-kusama/src/lib.rs +++ b/polkadot/bridges/primitives/chain-kusama/src/lib.rs @@ -79,7 +79,7 @@ sp_api::decl_runtime_apis! { /// /// Returns `None` if message is too expensive to be sent to Kusama from this chain. /// - /// Please keep in mind that this method returns lowest message fee required for message + /// Please keep in mind that this method returns the lowest message fee required for message /// to be accepted to the lane. It may be good idea to pay a bit over this price to account /// future exchange rate changes and guarantee that relayer would deliver your message /// to the target chain. @@ -109,7 +109,7 @@ sp_api::decl_runtime_apis! { pub trait FromKusamaInboundLaneApi { /// Returns nonce of the latest message, received by given lane. fn latest_received_nonce(lane: LaneId) -> MessageNonce; - /// Nonce of latest message that has been confirmed to the bridged chain. + /// Nonce of the latest message that has been confirmed to the bridged chain. fn latest_confirmed_nonce(lane: LaneId) -> MessageNonce; /// State of the unrewarded relayers set at given lane. fn unrewarded_relayers_state(lane: LaneId) -> UnrewardedRelayersState; diff --git a/polkadot/bridges/primitives/chain-polkadot/src/lib.rs b/polkadot/bridges/primitives/chain-polkadot/src/lib.rs index 8e0d30cdb6..8398b3d527 100644 --- a/polkadot/bridges/primitives/chain-polkadot/src/lib.rs +++ b/polkadot/bridges/primitives/chain-polkadot/src/lib.rs @@ -79,7 +79,7 @@ sp_api::decl_runtime_apis! { /// /// Returns `None` if message is too expensive to be sent to Polkadot from this chain. /// - /// Please keep in mind that this method returns lowest message fee required for message + /// Please keep in mind that this method returns the lowest message fee required for message /// to be accepted to the lane. It may be good idea to pay a bit over this price to account /// future exchange rate changes and guarantee that relayer would deliver your message /// to the target chain. @@ -109,7 +109,7 @@ sp_api::decl_runtime_apis! { pub trait FromPolkadotInboundLaneApi { /// Returns nonce of the latest message, received by given lane. fn latest_received_nonce(lane: LaneId) -> MessageNonce; - /// Nonce of latest message that has been confirmed to the bridged chain. + /// Nonce of the latest message that has been confirmed to the bridged chain. fn latest_confirmed_nonce(lane: LaneId) -> MessageNonce; /// State of the unrewarded relayers set at given lane. fn unrewarded_relayers_state(lane: LaneId) -> UnrewardedRelayersState; diff --git a/polkadot/bridges/primitives/chain-rococo/src/lib.rs b/polkadot/bridges/primitives/chain-rococo/src/lib.rs index 66cbb475bd..f5953d3c8e 100644 --- a/polkadot/bridges/primitives/chain-rococo/src/lib.rs +++ b/polkadot/bridges/primitives/chain-rococo/src/lib.rs @@ -127,7 +127,7 @@ sp_api::decl_runtime_apis! { /// /// Returns `None` if message is too expensive to be sent to Rococo from this chain. /// - /// Please keep in mind that this method returns lowest message fee required for message + /// Please keep in mind that this method returns the lowest message fee required for message /// to be accepted to the lane. It may be good idea to pay a bit over this price to account /// future exchange rate changes and guarantee that relayer would deliver your message /// to the target chain. @@ -157,7 +157,7 @@ sp_api::decl_runtime_apis! { pub trait FromRococoInboundLaneApi { /// Returns nonce of the latest message, received by given lane. fn latest_received_nonce(lane: LaneId) -> MessageNonce; - /// Nonce of latest message that has been confirmed to the bridged chain. + /// Nonce of the latest message that has been confirmed to the bridged chain. fn latest_confirmed_nonce(lane: LaneId) -> MessageNonce; /// State of the unrewarded relayers set at given lane. fn unrewarded_relayers_state(lane: LaneId) -> UnrewardedRelayersState; diff --git a/polkadot/bridges/primitives/chain-westend/src/lib.rs b/polkadot/bridges/primitives/chain-westend/src/lib.rs index db97364ef4..08ca9c28c8 100644 --- a/polkadot/bridges/primitives/chain-westend/src/lib.rs +++ b/polkadot/bridges/primitives/chain-westend/src/lib.rs @@ -141,7 +141,7 @@ sp_api::decl_runtime_apis! { /// /// Returns `None` if message is too expensive to be sent to Westend from this chain. /// - /// Please keep in mind that this method returns lowest message fee required for message + /// Please keep in mind that this method returns the lowest message fee required for message /// to be accepted to the lane. It may be good idea to pay a bit over this price to account /// future exchange rate changes and guarantee that relayer would deliver your message /// to the target chain. @@ -171,7 +171,7 @@ sp_api::decl_runtime_apis! { pub trait FromWestendInboundLaneApi { /// Returns nonce of the latest message, received by given lane. fn latest_received_nonce(lane: LaneId) -> MessageNonce; - /// Nonce of latest message that has been confirmed to the bridged chain. + /// Nonce of the latest message that has been confirmed to the bridged chain. fn latest_confirmed_nonce(lane: LaneId) -> MessageNonce; /// State of the unrewarded relayers set at given lane. fn unrewarded_relayers_state(lane: LaneId) -> UnrewardedRelayersState; diff --git a/polkadot/bridges/primitives/runtime/src/lib.rs b/polkadot/bridges/primitives/runtime/src/lib.rs index aa457f1d0b..e12f484417 100644 --- a/polkadot/bridges/primitives/runtime/src/lib.rs +++ b/polkadot/bridges/primitives/runtime/src/lib.rs @@ -70,7 +70,7 @@ pub type InstanceId = [u8; 4]; /// Type of accounts on the source chain. pub enum SourceAccount { - /// An account that belongs to Root (priviledged origin). + /// An account that belongs to Root (privileged origin). Root, /// A non-priviledged account. /// @@ -82,7 +82,7 @@ pub enum SourceAccount { /// Derive an account ID from a foreign account ID. /// /// This function returns an encoded Blake2 hash. It is the responsibility of the caller to ensure -/// this can be succesfully decoded into an AccountId. +/// this can be successfully decoded into an AccountId. /// /// The `bridge_id` is used to provide extra entropy when producing account IDs. This helps prevent /// AccountId collisions between different bridges on a single target chain. diff --git a/polkadot/node/core/pvf/src/artifacts.rs b/polkadot/node/core/pvf/src/artifacts.rs index e84e11193d..7c8188a323 100644 --- a/polkadot/node/core/pvf/src/artifacts.rs +++ b/polkadot/node/core/pvf/src/artifacts.rs @@ -168,7 +168,7 @@ impl Artifacts { .is_none()); } - /// Remove and retrive the artifacts from the table that are older than the supplied Time-To-Live. + /// Remove and retrieve the artifacts from the table that are older than the supplied Time-To-Live. pub fn prune(&mut self, artifact_ttl: Duration) -> Vec { let now = SystemTime::now(); diff --git a/polkadot/node/core/pvf/src/host.rs b/polkadot/node/core/pvf/src/host.rs index d740622ea1..1777af3b4e 100644 --- a/polkadot/node/core/pvf/src/host.rs +++ b/polkadot/node/core/pvf/src/host.rs @@ -52,8 +52,8 @@ impl ValidationHost { /// Execute PVF with the given code, params and priority. The result of execution will be sent /// to the provided result sender. /// - /// This is async to accomodate the fact a possibility of back-pressure. In vast majority of - /// situations this function should return immediatelly. + /// This is async to accommodate the fact a possibility of back-pressure. In the vast majority of + /// situations this function should return immediately. /// /// Returns an error if the request cannot be sent to the validation host, i.e. if it shut down. pub async fn execute_pvf( @@ -76,8 +76,8 @@ impl ValidationHost { /// Sends a signal to the validation host requesting to prepare a list of the given PVFs. /// - /// This is async to accomodate the fact a possibility of back-pressure. In vast majority of - /// situations this function should return immediatelly. + /// This is async to accommodate the fact a possibility of back-pressure. In the vast majority of + /// situations this function should return immediately. /// /// Returns an error if the request cannot be sent to the validation host, i.e. if it shut down. pub async fn heads_up(&mut self, active_pvfs: Vec) -> Result<(), String> { @@ -219,7 +219,7 @@ struct PendingExecutionRequest { result_tx: ResultSender, } -/// A mapping from an artifact ID which is in preparation state to the list of pending exeuction +/// A mapping from an artifact ID which is in preparation state to the list of pending execution /// requests that should be executed once the artifact's prepration is finished. #[derive(Default)] struct AwaitingPrepare(HashMap>); diff --git a/polkadot/node/network/availability-distribution/src/error.rs b/polkadot/node/network/availability-distribution/src/error.rs index 893bb6bc46..666e9a3776 100644 --- a/polkadot/node/network/availability-distribution/src/error.rs +++ b/polkadot/node/network/availability-distribution/src/error.rs @@ -68,7 +68,7 @@ pub enum Fatal { Runtime(#[from] #[source] runtime::Fatal), } -/// Non fatal errors of this subsystem. +/// Non-fatal errors of this subsystem. #[derive(Debug, Error)] pub enum NonFatal { /// av-store will drop the sender on any error that happens. diff --git a/polkadot/node/network/availability-distribution/src/requester/fetch_task/mod.rs b/polkadot/node/network/availability-distribution/src/requester/fetch_task/mod.rs index bdb51bdd2a..42f5554ae8 100644 --- a/polkadot/node/network/availability-distribution/src/requester/fetch_task/mod.rs +++ b/polkadot/node/network/availability-distribution/src/requester/fetch_task/mod.rs @@ -221,13 +221,13 @@ impl FetchTask { } } - /// Whether or not there are still relay parents around with this candidate pending + /// Whether there are still relay parents around with this candidate pending /// availability. pub fn is_live(&self) -> bool { !self.live_in.is_empty() } - /// Whether or not this task can be considered finished. + /// Whether this task can be considered finished. /// /// That is, it is either canceled, succeeded or failed. pub fn is_finished(&self) -> bool { diff --git a/polkadot/node/network/availability-distribution/src/requester/mod.rs b/polkadot/node/network/availability-distribution/src/requester/mod.rs index b91297987b..a13140f701 100644 --- a/polkadot/node/network/availability-distribution/src/requester/mod.rs +++ b/polkadot/node/network/availability-distribution/src/requester/mod.rs @@ -91,7 +91,7 @@ impl Requester { } /// Update heads that need availability distribution. /// - /// For all active heads we will be fetching our chunks for availabilty distribution. + /// For all active heads we will be fetching our chunks for availability distribution. #[tracing::instrument(level = "trace", skip(self, ctx, runtime, update), fields(subsystem = LOG_TARGET))] pub async fn update_fetching_heads( &mut self, diff --git a/polkadot/node/network/availability-distribution/src/tests/state.rs b/polkadot/node/network/availability-distribution/src/tests/state.rs index 73fcd5f7ce..7364b7fb3f 100644 --- a/polkadot/node/network/availability-distribution/src/tests/state.rs +++ b/polkadot/node/network/availability-distribution/src/tests/state.rs @@ -68,7 +68,7 @@ pub struct TestState { pub relay_chain: Vec, /// Whenever the subsystem tries to fetch an erasure chunk one item of the given vec will be /// popped. So you can experiment with serving invalid chunks or no chunks on request and see - /// whether the subystem still succeds with its goal. + /// whether the subsystem still succeeds with its goal. pub chunks: HashMap<(CandidateHash, ValidatorIndex), Vec>>, /// All chunks that are valid and should be accepted. pub valid_chunks: HashSet<(CandidateHash, ValidatorIndex)>, diff --git a/polkadot/node/network/bitfield-distribution/src/lib.rs b/polkadot/node/network/bitfield-distribution/src/lib.rs index 92c160cfc2..848eeb02bb 100644 --- a/polkadot/node/network/bitfield-distribution/src/lib.rs +++ b/polkadot/node/network/bitfield-distribution/src/lib.rs @@ -233,7 +233,7 @@ impl BitfieldDistribution { } } -/// Modify the reputation of a peer based on its behaviour. +/// Modify the reputation of a peer based on its behavior. #[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))] async fn modify_reputation( ctx: &mut Context, @@ -560,7 +560,7 @@ where } } -/// Handle the changes necassary when our view changes. +/// Handle the changes necessary when our view changes. #[tracing::instrument(level = "trace", fields(subsystem = LOG_TARGET))] fn handle_our_view_change(state: &mut ProtocolState, view: OurView) { let old_view = std::mem::replace(&mut (state.view), view); diff --git a/polkadot/node/network/bridge/src/lib.rs b/polkadot/node/network/bridge/src/lib.rs index 400acba46d..48059c42be 100644 --- a/polkadot/node/network/bridge/src/lib.rs +++ b/polkadot/node/network/bridge/src/lib.rs @@ -317,7 +317,7 @@ impl Subsystem for NetworkBridge } struct PeerData { - /// Latest view sent by the peer. + /// The Latest view sent by the peer. view: View, } diff --git a/polkadot/node/network/bridge/src/network.rs b/polkadot/node/network/bridge/src/network.rs index 2f6fa8d1f5..8eda64a2c2 100644 --- a/polkadot/node/network/bridge/src/network.rs +++ b/polkadot/node/network/bridge/src/network.rs @@ -93,7 +93,7 @@ where /// An action to be carried out by the network. /// -/// This type is used for implementing `Sink` in order to cummunicate asynchronously with the +/// This type is used for implementing `Sink` in order to communicate asynchronously with the /// underlying network implementation in the `Network` trait. #[derive(Debug, PartialEq)] pub enum NetworkAction { diff --git a/polkadot/node/network/collator-protocol/src/collator_side.rs b/polkadot/node/network/collator-protocol/src/collator_side.rs index 5d17a358fc..69d26298fd 100644 --- a/polkadot/node/network/collator-protocol/src/collator_side.rs +++ b/polkadot/node/network/collator-protocol/src/collator_side.rs @@ -1048,7 +1048,7 @@ mod tests { /// Generate a new relay parent and inform the subsystem about the new view. /// - /// If `merge_views == true` it means the subsystem will be informed that we working on the old `relay_parent` + /// If `merge_views == true` it means the subsystem will be informed that we are working on the old `relay_parent` /// and the new one. async fn advance_to_new_round(&mut self, virtual_overseer: &mut VirtualOverseer, merge_views: bool) { let old_relay_parent = self.relay_parent; @@ -1339,7 +1339,7 @@ mod tests { ); } - /// Check that the next received message is a collation advertisment message. + /// Check that the next received message is a collation advertisement message. async fn expect_advertise_collation_msg( virtual_overseer: &mut VirtualOverseer, peer: &PeerId, diff --git a/polkadot/node/network/protocol/src/lib.rs b/polkadot/node/network/protocol/src/lib.rs index 5f19a4af89..75e9a88052 100644 --- a/polkadot/node/network/protocol/src/lib.rs +++ b/polkadot/node/network/protocol/src/lib.rs @@ -324,14 +324,14 @@ pub mod v1 { LargeStatement(StatementMetadata), } - /// Data that maes a statement unique. + /// Data that makes a statement unique. #[derive(Debug, Clone, Encode, Decode, PartialEq, Eq, Hash)] pub struct StatementMetadata { - /// Relayt parent this statement is relevant under. + /// Relay parent this statement is relevant under. pub relay_parent: Hash, /// Hash of the candidate that got validated. pub candidate_hash: CandidateHash, - /// Validator that attested the valididty. + /// Validator that attested the validity. pub signed_by: ValidatorIndex, /// Signature of seconding validator. pub signature: ValidatorSignature, @@ -369,7 +369,7 @@ pub mod v1 { } } - /// Whether or not this message contains a large statement. + /// Whether this message contains a large statement. pub fn is_large_statement(&self) -> bool { if let Self::LargeStatement(_) = self { true diff --git a/polkadot/node/network/protocol/src/peer_set.rs b/polkadot/node/network/protocol/src/peer_set.rs index 520567a5bd..e83019d5d3 100644 --- a/polkadot/node/network/protocol/src/peer_set.rs +++ b/polkadot/node/network/protocol/src/peer_set.rs @@ -30,7 +30,7 @@ pub enum PeerSet { Collation, } -/// Whether or not a node is an authority or not. +/// Whether a node is an authority or not. /// /// Peer set configuration gets adjusted accordingly. #[derive(Copy, Clone, Debug, Eq, PartialEq)] diff --git a/polkadot/node/network/protocol/src/request_response/request.rs b/polkadot/node/network/protocol/src/request_response/request.rs index 69b86ff7f6..f8df5ee4a1 100644 --- a/polkadot/node/network/protocol/src/request_response/request.rs +++ b/polkadot/node/network/protocol/src/request_response/request.rs @@ -104,7 +104,7 @@ pub enum Recipient { /// discovery system. #[derive(Debug)] pub struct OutgoingRequest { - /// Intendent recipient of this request. + /// Intended recipient of this request. pub peer: Recipient, /// The actual request to send over the wire. pub payload: Req, diff --git a/polkadot/node/network/statement-distribution/src/error.rs b/polkadot/node/network/statement-distribution/src/error.rs index 82e918dfd1..097b370999 100644 --- a/polkadot/node/network/statement-distribution/src/error.rs +++ b/polkadot/node/network/statement-distribution/src/error.rs @@ -28,7 +28,7 @@ use crate::LOG_TARGET; /// General result. pub type Result = std::result::Result; -/// Result for non fatal only failures. +/// Result for non-fatal only failures. pub type NonFatalResult = std::result::Result; /// Result for fatal only failures. pub type FatalResult = std::result::Result; diff --git a/polkadot/node/network/statement-distribution/src/requester.rs b/polkadot/node/network/statement-distribution/src/requester.rs index 2368da3cd2..f2430ed10d 100644 --- a/polkadot/node/network/statement-distribution/src/requester.rs +++ b/polkadot/node/network/statement-distribution/src/requester.rs @@ -39,7 +39,7 @@ const RETRY_TIMEOUT: Duration = Duration::from_millis(500); /// Messages coming from a background task. pub enum RequesterMessage { - /// Get an update of availble peers to try for fetching a given statement. + /// Get an update of available peers to try for fetching a given statement. GetMorePeers { relay_parent: Hash, candidate_hash: CandidateHash, @@ -69,7 +69,7 @@ pub enum RequesterMessage { /// A fetching task, taking care of fetching large statements via request/response. /// /// A fetch task does not know about a particular `Statement` instead it just tries fetching a -/// `CommittedCandidateReceipt` from peers, whether or not this can be used to re-assemble one ore +/// `CommittedCandidateReceipt` from peers, whether this can be used to re-assemble one ore /// many `SignedFullStatement`s needs to be verified by the caller. pub async fn fetch( relay_parent: Hash, diff --git a/polkadot/node/network/statement-distribution/src/responder.rs b/polkadot/node/network/statement-distribution/src/responder.rs index 4f572446ab..da7e914edc 100644 --- a/polkadot/node/network/statement-distribution/src/responder.rs +++ b/polkadot/node/network/statement-distribution/src/responder.rs @@ -35,7 +35,7 @@ const COST_INVALID_REQUEST: Rep = Rep::CostMajor("Peer sent unparsable request") /// Messages coming from a background task. pub enum ResponderMessage { - /// Get an update of availble peers to try for fetching a given statement. + /// Get an update of available peers to try for fetching a given statement. GetData { requesting_peer: PeerId, relay_parent: Hash, @@ -48,7 +48,7 @@ pub enum ResponderMessage { /// A fetching task, taking care of fetching large statements via request/response. /// /// A fetch task does not know about a particular `Statement` instead it just tries fetching a -/// `CommittedCandidateReceipt` from peers, whether or not this can be used to re-assemble one ore +/// `CommittedCandidateReceipt` from peers, whether this can be used to re-assemble one ore /// many `SignedFullStatement`s needs to be verified by the caller. pub async fn respond( mut receiver: mpsc::Receiver, diff --git a/polkadot/node/primitives/src/lib.rs b/polkadot/node/primitives/src/lib.rs index a59f6cd1e0..7646ca1ff2 100644 --- a/polkadot/node/primitives/src/lib.rs +++ b/polkadot/node/primitives/src/lib.rs @@ -51,7 +51,7 @@ pub const POV_BOMB_LIMIT: usize = MAX_POV_SIZE as usize; /// /// This is the committed candidate receipt instead of the bare candidate receipt. As such, /// it gives access to the commitments to validators who have not executed the candidate. This -/// is necessary to allow a block-producing validator to include candidates from outside of the para +/// is necessary to allow a block-producing validator to include candidates from outside the para /// it is assigned to. #[derive(Clone, PartialEq, Eq, Encode, Decode)] pub enum Statement { @@ -202,7 +202,7 @@ pub struct CollationResult { pub collation: Collation, /// An optional result sender that should be informed about a successfully seconded collation. /// - /// There is no guarantee that this sender is informed ever about any result, it is completly okay to just drop it. + /// There is no guarantee that this sender is informed ever about any result, it is completely okay to just drop it. /// However, if it is called, it should be called with the signed statement of a parachain validator seconding the /// collation. pub result_sender: Option>, diff --git a/polkadot/node/service/src/chain_spec.rs b/polkadot/node/service/src/chain_spec.rs index 278724746b..5458b9bcfa 100644 --- a/polkadot/node/service/src/chain_spec.rs +++ b/polkadot/node/service/src/chain_spec.rs @@ -59,16 +59,16 @@ pub struct Extensions { pub bad_blocks: sc_client_api::BadBlocks, } -/// The `ChainSpec` parametrised for the polkadot runtime. +/// The `ChainSpec` parameterized for the polkadot runtime. pub type PolkadotChainSpec = service::GenericChainSpec; -/// The `ChainSpec` parametrised for the kusama runtime. +/// The `ChainSpec` parameterized for the kusama runtime. pub type KusamaChainSpec = service::GenericChainSpec; -/// The `ChainSpec` parametrised for the westend runtime. +/// The `ChainSpec` parameterized for the westend runtime. pub type WestendChainSpec = service::GenericChainSpec; -/// The `ChainSpec` parametrized for the rococo runtime. +/// The `ChainSpec` parameterized for the rococo runtime. pub type RococoChainSpec = service::GenericChainSpec; /// Extension for the Rococo genesis config to support a custom changes to the genesis state. diff --git a/polkadot/node/subsystem-util/src/error_handling.rs b/polkadot/node/subsystem-util/src/error_handling.rs index b2040e53ab..36e59bb7b2 100644 --- a/polkadot/node/subsystem-util/src/error_handling.rs +++ b/polkadot/node/subsystem-util/src/error_handling.rs @@ -20,8 +20,8 @@ //! //! - Ergonomic API with little repetition. //! - Still explicitness where it matters - fatal errors should be visible and justified. -//! - Easy recovering from non fatal errors. -//! - Errors start as non fatal and can be made fatal at the level where it is really clear they +//! - Easy recovering from non-fatal errors. +//! - Errors start as non-fatal and can be made fatal at the level where it is really clear they //! are fatal. E.g. cancellation of a oneshot might be fatal in one case, but absolutely expected //! in another. //! - Good error messages. Fatal errors don't need to be properly structured (as we won't handle @@ -37,7 +37,7 @@ use thiserror::Error; /// Errors might either be fatal and should bring the subsystem down or are at least at the point /// of occurrence deemed potentially recoverable. /// -/// Upper layers might have a better view and might make a non fatal error of a called function a +/// Upper layers might have a better view and might make a non-fatal error of a called function a /// fatal one. The opposite should not happen, therefore don't make an error fatal if you don't /// know it is in all cases. /// @@ -102,7 +102,7 @@ use thiserror::Error; /// } /// ``` /// Then mostly use `Error` in functions, you may also use `NonFatal` and `Fatal` directly in -/// functions that strictly only fail non fatal or fatal respectively, as `Fatal` and `NonFatal` +/// functions that strictly only fail non-fatal or fatal respectively, as `Fatal` and `NonFatal` /// can automatically converted into the above defined `Error`. /// ``` #[derive(Debug, Error)] @@ -135,7 +135,7 @@ impl Fault Self::Fatal(f.into()) } - /// Build an `Fault` from compatible non fatal error. + /// Build an `Fault` from compatible non-fatal error. pub fn from_non_fatal>(e: E1) -> Self { Self::Err(e.into()) } @@ -153,10 +153,10 @@ impl Fault } } -/// Unwrap non fatal error and report fatal one. +/// Unwrap non-fatal error and report fatal one. /// /// This function is useful for top level error handling. Fatal errors will be extracted, -/// non fatal error will be returned for handling. +/// non-fatal error will be returned for handling. /// /// Usage: /// diff --git a/polkadot/node/subsystem-util/src/runtime/mod.rs b/polkadot/node/subsystem-util/src/runtime/mod.rs index f07db07630..5b2180f6d2 100644 --- a/polkadot/node/subsystem-util/src/runtime/mod.rs +++ b/polkadot/node/subsystem-util/src/runtime/mod.rs @@ -63,7 +63,7 @@ pub struct ExtendedSessionInfo { pub validator_info: ValidatorInfo, } -/// Information about ourself, in case we are an `Authority`. +/// Information about ourselves, in case we are an `Authority`. /// /// This data is derived from the `SessionInfo` and our key as found in the keystore. pub struct ValidatorInfo { diff --git a/polkadot/node/subsystem/src/lib.rs b/polkadot/node/subsystem/src/lib.rs index 3cc4894a49..7cc21beeb9 100644 --- a/polkadot/node/subsystem/src/lib.rs +++ b/polkadot/node/subsystem/src/lib.rs @@ -181,7 +181,7 @@ pub enum SubsystemError { /// Per origin (or subsystem) annotations to wrap an error. #[error("Error originated in {origin}")] FromOrigin { - /// An additional anotation tag for the origin of `source`. + /// An additional annotation tag for the origin of `source`. origin: &'static str, /// The wrapped error. Marked as source for tracking the error chain. #[source] source: Box diff --git a/polkadot/node/subsystem/src/messages/network_bridge_event.rs b/polkadot/node/subsystem/src/messages/network_bridge_event.rs index c0a58ada77..8d7c237985 100644 --- a/polkadot/node/subsystem/src/messages/network_bridge_event.rs +++ b/polkadot/node/subsystem/src/messages/network_bridge_event.rs @@ -45,7 +45,7 @@ impl NetworkBridgeEvent { /// /// This tries to transform M in `PeerMessage` to a message type specific to a subsystem. /// It is used to dispatch events coming from a peer set to the various subsystems that are - /// handled within that peer set. More concretly a `ValidationProtocol` will be transformed + /// handled within that peer set. More concretely a `ValidationProtocol` will be transformed /// for example into a `BitfieldDistributionMessage` in case of the `BitfieldDistribution` /// constructor. /// diff --git a/polkadot/node/test/service/src/chain_spec.rs b/polkadot/node/test/service/src/chain_spec.rs index e0085fe173..6c0bdace85 100644 --- a/polkadot/node/test/service/src/chain_spec.rs +++ b/polkadot/node/test/service/src/chain_spec.rs @@ -29,7 +29,7 @@ use sp_runtime::Perbill; const DEFAULT_PROTOCOL_ID: &str = "dot"; -/// The `ChainSpec` parametrized for polkadot test runtime. +/// The `ChainSpec` parameterized for polkadot test runtime. pub type PolkadotChainSpec = service::GenericChainSpec; diff --git a/polkadot/node/test/service/src/lib.rs b/polkadot/node/test/service/src/lib.rs index 4104a53cdd..e09d9adc4b 100644 --- a/polkadot/node/test/service/src/lib.rs +++ b/polkadot/node/test/service/src/lib.rs @@ -104,7 +104,7 @@ impl ClientHandle for TestClient { /// nodes if you want the future node to be connected to other nodes. /// /// The `storage_update_func` function will be executed in an externalities provided environment -/// and can be used to make adjustements to the runtime genesis storage. +/// and can be used to make adjustments to the runtime genesis storage. pub fn node_config( storage_update_func: impl Fn(), task_executor: TaskExecutor, @@ -210,7 +210,7 @@ pub fn node_config( /// want it to be connected to other nodes. /// /// The `storage_update_func` function will be executed in an externalities provided environment -/// and can be used to make adjustements to the runtime genesis storage. +/// and can be used to make adjustments to the runtime genesis storage. pub fn run_validator_node( task_executor: TaskExecutor, key: Sr25519Keyring, @@ -242,11 +242,11 @@ pub fn run_validator_node( /// want it to be connected to other nodes. /// /// The `storage_update_func` function will be executed in an externalities provided environment -/// and can be used to make adjustements to the runtime genesis storage. +/// and can be used to make adjustments to the runtime genesis storage. /// /// # Note /// -/// The collator functionionality still needs to be registered at the node! This can be done using +/// The collator functionality still needs to be registered at the node! This can be done using /// [`PolkadotTestNode::register_collator`]. pub fn run_collator_node( task_executor: TaskExecutor, diff --git a/polkadot/primitives/src/v0.rs b/polkadot/primitives/src/v0.rs index dc3c8dceb7..ab7c3fe18b 100644 --- a/polkadot/primitives/src/v0.rs +++ b/polkadot/primitives/src/v0.rs @@ -184,7 +184,7 @@ pub const PARACHAIN_INFO: Info = Info { scheduling: Scheduling::Always, }; -/// Auxilliary for when there's an attempt to swap two parachains/parathreads. +/// Auxiliary for when there's an attempt to swap two parachains/parathreads. pub trait SwapAux { /// Result describing whether it is possible to swap two parachains. Doesn't mutate state. fn ensure_can_swap(one: Id, other: Id) -> Result<(), &'static str>; @@ -435,7 +435,7 @@ pub struct AbridgedCandidateReceipt { /// A candidate-receipt with commitments directly included. pub struct CommitedCandidateReceipt { - /// The descriptor of the candidae. + /// The descriptor of the candidate. pub descriptor: CandidateDescriptor, /// The commitments of the candidate receipt. diff --git a/polkadot/primitives/src/v1/mod.rs b/polkadot/primitives/src/v1/mod.rs index 48d6ad1e67..dc11e25fd5 100644 --- a/polkadot/primitives/src/v1/mod.rs +++ b/polkadot/primitives/src/v1/mod.rs @@ -181,7 +181,7 @@ pub const PARACHAINS_INHERENT_IDENTIFIER: InherentIdentifier = *b"parachn0"; pub const ASSIGNMENT_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"asgn"); /// Maximum compressed code size we support right now. -/// At the moment we have runtime upgrade on chain, which restricts scalability severly. If we want +/// At the moment we have runtime upgrade on chain, which restricts scalability severely. If we want /// to have bigger values, we should fix that first. pub const MAX_CODE_SIZE: u32 = 3 * 1024 * 1024; @@ -370,7 +370,7 @@ impl CommittedCandidateReceipt { self.to_plain().hash() } - /// Does this committed candidate receipt corrensponds to the given [`CandidateReceipt`]? + /// Does this committed candidate receipt corresponds to the given [`CandidateReceipt`]? pub fn corresponds_to(&self, receipt: &CandidateReceipt) -> bool where H: PartialEq { receipt.descriptor == self.descriptor && receipt.commitments_hash == self.commitments.hash() } @@ -392,7 +392,7 @@ impl Ord for CommittedCandidateReceipt { } /// The validation data provides information about how to create the inputs for validation of a candidate. -/// This information is derived from the chain state and will vary from para to para, although some of the +/// This information is derived from the chain state and will vary from para to para, although some /// fields may be the same for every para. /// /// Since this data is used to form inputs to the validation function, it needs to be persisted by the @@ -408,7 +408,7 @@ impl Ord for CommittedCandidateReceipt { /// already been done. As such, there is no need for the validation data used to inform validators and /// collators about the checks the relay-chain will perform to be persisted by the availability system. /// -/// The `PersistedValidationData` should be relatively lightweight primarly because it is constructed +/// The `PersistedValidationData` should be relatively lightweight primarily because it is constructed /// during inclusion for each candidate and therefore lies on the critical path of inclusion. #[derive(PartialEq, Eq, Clone, Encode, Decode)] #[cfg_attr(feature = "std", derive(Debug, Default, MallocSizeOf))] @@ -1025,7 +1025,7 @@ pub enum ConsensusLog { /// A parachain or parathread upgraded its code. #[codec(index = 1)] ParaUpgradeCode(Id, Hash), - /// A parachain or parathread scheduled a code ugprade. + /// A parachain or parathread scheduled a code upgrade. #[codec(index = 2)] ParaScheduleUpgradeCode(Id, Hash, BlockNumber), /// Governance requests to auto-approve every candidate included up to the given block diff --git a/polkadot/runtime/common/src/auctions.rs b/polkadot/runtime/common/src/auctions.rs index 9c625bb62c..994ac8f4fc 100644 --- a/polkadot/runtime/common/src/auctions.rs +++ b/polkadot/runtime/common/src/auctions.rs @@ -122,7 +122,7 @@ pub mod pallet { /// [bidder, range, parachain_id, amount] WonDeploy(T::AccountId, SlotRange, ParaId, BalanceOf), /// An existing parachain won the right to continue. - /// First balance is the extra amount reseved. Second is the total amount reserved. + /// First balance is the extra amount reserved. Second is the total amount reserved. /// [parachain_id, begin, count, total_amount] WonRenewal(ParaId, LeasePeriodOf, LeasePeriodOf, BalanceOf), /// Funds were reserved for a winning bid. First balance is the extra amount reserved. diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs index 31a937804f..5824a7f5c4 100644 --- a/polkadot/runtime/common/src/claims.rs +++ b/polkadot/runtime/common/src/claims.rs @@ -69,7 +69,7 @@ impl WeightInfo for TestWeightInfo { fn move_claim() -> Weight { 0 } } -/// The kind of a statement an account needs to make for a claim to be valid. +/// The kind of statement an account needs to make for a claim to be valid. #[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, RuntimeDebug)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum StatementKind {