From 1ee787f337932a0a2ba26958f896431bdcc95692 Mon Sep 17 00:00:00 2001 From: gilescope Date: Tue, 1 Jun 2021 10:13:39 +0100 Subject: [PATCH 1/2] Spelling corrections --- client/rpc-api/src/child_state/mod.rs | 4 ++-- client/service/src/builder.rs | 6 +++--- client/service/src/config.rs | 6 +++--- client/telemetry/src/lib.rs | 2 +- client/transaction-pool/graph/src/ready.rs | 2 +- .../transaction-pool/graph/src/validated_pool.rs | 2 +- client/transaction-pool/src/lib.rs | 2 +- client/transaction-pool/src/testing/pool.rs | 2 +- docs/CHANGELOG.md | 14 +++++++------- docs/Upgrading-2.0-to-3.0.md | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/client/rpc-api/src/child_state/mod.rs b/client/rpc-api/src/child_state/mod.rs index cffb1590c7f49..7ab897d6174a4 100644 --- a/client/rpc-api/src/child_state/mod.rs +++ b/client/rpc-api/src/child_state/mod.rs @@ -27,8 +27,8 @@ use crate::state::ReadProof; /// Substrate child state API /// -/// Note that all `PrefixedStorageKey` are desierialized -/// from json and not guaranted valid. +/// Note that all `PrefixedStorageKey` are deserialized +/// from json and not guaranteed valid. #[rpc] pub trait ChildStateApi { /// RPC Metadata diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index ba566252742e9..ebf600b12f020 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -252,7 +252,7 @@ impl KeystoreContainer { /// Should be called right away at startup and not at runtime: /// even though this overrides any previously set remote store, it /// does not reset any references previously handed out - they will - /// stick araound. + /// stick around. pub fn set_remote_keystore(&mut self, remote: Arc) where T: CryptoStore + SyncCryptoStore + 'static { @@ -268,7 +268,7 @@ impl KeystoreContainer { } } - /// Returns the synchrnous keystore wrapper + /// Returns the synchronous keystore wrapper pub fn sync_keystore(&self) -> SyncCryptoStorePtr { if let Some(c) = self.remote.as_ref() { c.sync_keystore_ref() @@ -850,7 +850,7 @@ pub struct BuildNetworkParams<'a, TBl: BlockT, TExPool, TImpQu, TCl> { pub import_queue: TImpQu, /// An optional, shared data fetcher for light clients. pub on_demand: Option>>, - /// A block annouce validator builder. + /// A block announce validator builder. pub block_announce_validator_builder: Option) -> Box + Send> + Send >>, diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 5d8ee89225cb8..6ccf86c6e3b35 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -246,7 +246,7 @@ pub enum BasePath { #[cfg(not(target_os = "unknown"))] Temporary(TempDir), /// A path on the disk. - Permanenent(PathBuf), + Permanent(PathBuf), } impl BasePath { @@ -267,7 +267,7 @@ impl BasePath { /// Note: this function will not ensure that the directory exist nor create the directory. It /// will also not delete the directory when the instance is dropped. pub fn new>(path: P) -> BasePath { - BasePath::Permanenent(path.as_ref().to_path_buf()) + BasePath::Permanent(path.as_ref().to_path_buf()) } /// Create a base path from values describing the project. @@ -285,7 +285,7 @@ impl BasePath { match self { #[cfg(not(target_os = "unknown"))] BasePath::Temporary(temp_dir) => temp_dir.path(), - BasePath::Permanenent(path) => path.as_path(), + BasePath::Permanent(path) => path.as_path(), } } diff --git a/client/telemetry/src/lib.rs b/client/telemetry/src/lib.rs index 5c233d54903dc..06c82d44ab381 100644 --- a/client/telemetry/src/lib.rs +++ b/client/telemetry/src/lib.rs @@ -400,7 +400,7 @@ impl Telemetry { .map_err(|_| Error::TelemetryWorkerDropped) } - /// Make a new clonable handle to this [`Telemetry`]. This is used for reporting telemetries. + /// Make a new cloneable handle to this [`Telemetry`]. This is used for reporting telemetries. pub fn handle(&self) -> TelemetryHandle { TelemetryHandle { message_sender: Arc::new(Mutex::new(self.message_sender.clone())), diff --git a/client/transaction-pool/graph/src/ready.rs b/client/transaction-pool/graph/src/ready.rs index 7946f49e6a17a..2c0575bf1efb0 100644 --- a/client/transaction-pool/graph/src/ready.rs +++ b/client/transaction-pool/graph/src/ready.rs @@ -240,7 +240,7 @@ impl ReadyTransactions { self.ready.read().contains_key(hash) } - /// Retrive transaction by hash + /// Retrieve transaction by hash pub fn by_hash(&self, hash: &Hash) -> Option>> { self.by_hashes(&[hash.clone()]).into_iter().next().unwrap_or(None) } diff --git a/client/transaction-pool/graph/src/validated_pool.rs b/client/transaction-pool/graph/src/validated_pool.rs index 2e4db12486192..b9c2593f019c2 100644 --- a/client/transaction-pool/graph/src/validated_pool.rs +++ b/client/transaction-pool/graph/src/validated_pool.rs @@ -155,7 +155,7 @@ impl ValidatedPool { /// A fast check before doing any further processing of a transaction, like validation. /// - /// If `ingore_banned` is `true`, it will not check if the transaction is banned. + /// If `ignore_banned` is `true`, it will not check if the transaction is banned. /// /// It checks if the transaction is already imported or banned. If so, it returns an error. pub fn check_is_known( diff --git a/client/transaction-pool/src/lib.rs b/client/transaction-pool/src/lib.rs index efd5a7a14342b..bc5f6e367ff86 100644 --- a/client/transaction-pool/src/lib.rs +++ b/client/transaction-pool/src/lib.rs @@ -578,7 +578,7 @@ impl MaintainedTransactionPool for BasicPool async move { // We keep track of everything we prune so that later we won't add - // tranactions with those hashes from the retracted blocks. + // transactions with those hashes from the retracted blocks. let mut pruned_log = HashSet::>::new(); // If there is a tree route, we use this to prune known tx based on the enacted diff --git a/client/transaction-pool/src/testing/pool.rs b/client/transaction-pool/src/testing/pool.rs index 063947b383d03..904870ae0ece9 100644 --- a/client/transaction-pool/src/testing/pool.rs +++ b/client/transaction-pool/src/testing/pool.rs @@ -361,7 +361,7 @@ fn should_revalidate_across_many_blocks() { #[test] -fn should_push_watchers_during_maintaince() { +fn should_push_watchers_during_maintenance() { fn alice_uxt(nonce: u64) -> Extrinsic { uxt(Alice, 209 + nonce) } diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a918ef5d554ca..c867a245739ff 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -8,14 +8,14 @@ The format is based on [Keep a Changelog]. ## 2.0.1-> 3.0.0 - Apollo 14 -Most notably, this is the first release of the new FRAME (2.0) with its new macro-syntax and some changes in types, and pallet versioning. This release also incorporates the faster and improve version 2.0 of the parity-scale-codec and upgraded dependencies all-around. While the `FinalityTracker` pallet has been dropped, this release marks the first public appereance of a few new pallets, too;Bounties, Lottery, Tips (extracted from the `Treasury`-pallet, see #7536) and Merkle-Mountain-Ranges (MMR). +Most notably, this is the first release of the new FRAME (2.0) with its new macro-syntax and some changes in types, and pallet versioning. This release also incorporates the faster and improve version 2.0 of the parity-scale-codec and upgraded dependencies all-around. While the `FinalityTracker` pallet has been dropped, this release marks the first public appearance of a few new pallets, too;Bounties, Lottery, Tips (extracted from the `Treasury`-pallet, see #7536) and Merkle-Mountain-Ranges (MMR). On the client side, the most notable changes are around the keystore, making it async and switching to a different signing model allowing for remote-signing to be implemented; and various changes to improve networking and light-client support, like adding the Grandpa warp sync request-response protocol (#7711). _Contracts_: Please note that the contracts pallet _is not part_ of this release. The pallet is not yet ready and will be released separately in the coming weeks. The currently released contracts pallet _is not compatible_ with the new FRAME, thus if you need the contracts pallet, we recommend you wait with the upgrade until it has been released, too. ### Upgrade instructions -Not too much has changed on the top and API level for developing Substrate betweeen 2.0 and 3.0. The easiest and quickest path for upgading is just to take the latest node-template and try applying your changes to it: +Not too much has changed on the top and API level for developing Substrate between 2.0 and 3.0. The easiest and quickest path for upgrading is just to take the latest node-template and try applying your changes to it: 1. take a diff between 2.0 and your changes 2. store that diff 3. remove everything, copy over the 3.0 node-template @@ -31,7 +31,7 @@ Runtime * contracts: Emit event on contract termination (#8014) * Fix elections-phragmen and proxy issue (#7040) * Allow validators to block and kick their nominator set. (#7930) -* Decouple Stkaing and Election - Part1: Support traits (#7908) +* Decouple Staking and Election - Part1: Support traits (#7908) * Introduces account existence providers reference counting (#7363) * contracts: Cap the surcharge reward by the amount of rent that way payed by a contract (#7870) * Use checked math when calculating storage size (#7885) @@ -215,7 +215,7 @@ Runtime Migrations Runtime ------- -* Custom Codec Implenetation for NPoS Election (#6720) +* Custom Codec Implementation for NPoS Election (#6720) * Successful `note_imminent_preimage` is free (#6793) * pallet-democracy use of weightinfo (#6783) * Update Balances Pallet to use `WeightInfo` (#6610) @@ -276,7 +276,7 @@ Runtime Client ------ -* Update wasmtime to (almost) lastest master (#6662) +* Update wasmtime to (almost) latest master (#6662) * Update to latest sysinfo prevents leaking fd-handlers (#6708) * Tracing values (#6679) * Graceful shutdown for the task manager (#6654) @@ -309,7 +309,7 @@ Runtime * `pallet-scheduler`: Check that `when` is not in the past (#6480) * Fix `sp-api` handling of multiple arguments (#6484) * Fix issues with `Operational` transactions validity and prioritization. (#6435) -* pallet-atomic-swap: generialized swap action (#6421) +* pallet-atomic-swap: generalized swap action (#6421) * Avoid multisig reentrancy (#6445) * Root origin use no filter by default. Scheduler and Democracy dispatch without asserting BaseCallFilter (#6408) * Scale and increase validator count (#6417) @@ -334,7 +334,7 @@ Client * Remove penalty on duplicate Status message (#6377) * Fix the broken weight multiplier update function (#6334) * client/authority-discovery: Don't add own address to priority group (#6370) -* Split the service initialisation up into seperate functions (#6332) +* Split the service initialisation up into separate functions (#6332) * Fix transaction pool event sending (#6341) * Add a [prefix]_process_start_time_seconds metric (#6315) * new crate sc-light (#6235) diff --git a/docs/Upgrading-2.0-to-3.0.md b/docs/Upgrading-2.0-to-3.0.md index f1f6f31e92030..46f01ab7824cd 100644 --- a/docs/Upgrading-2.0-to-3.0.md +++ b/docs/Upgrading-2.0-to-3.0.md @@ -4,7 +4,7 @@ An incomplete guide. ## Refreshing the node-template -Not much has changed on the top and API level for developing Substrate betweeen 2.0 and 3.0. If you've made only small changes to the node-template, we recommend to do the following - it is easiest and quickest path forward: +Not much has changed on the top and API level for developing Substrate between 2.0 and 3.0. If you've made only small changes to the node-template, we recommend to do the following - it is easiest and quickest path forward: 1. take a diff between 2.0 and your changes 2. store that diff 3. remove everything, copy over the 3.0 node-template @@ -558,7 +558,7 @@ First and foremost, grandpa internalised a few aspects, and thus `new_partial` d + )); ``` -As these changes pull through the enitrety of `cli/src/service.rs`, we recommend looking at the final diff below for guidance. +As these changes pull through the entirety of `cli/src/service.rs`, we recommend looking at the final diff below for guidance. ##### In a nutshell From c29de2802172128db70b54ab59da9e304b84a060 Mon Sep 17 00:00:00 2001 From: gilescope Date: Tue, 1 Jun 2021 10:33:02 +0100 Subject: [PATCH 2/2] As this might break let's do as a separate PR --- client/service/src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 6ccf86c6e3b35..5d8ee89225cb8 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -246,7 +246,7 @@ pub enum BasePath { #[cfg(not(target_os = "unknown"))] Temporary(TempDir), /// A path on the disk. - Permanent(PathBuf), + Permanenent(PathBuf), } impl BasePath { @@ -267,7 +267,7 @@ impl BasePath { /// Note: this function will not ensure that the directory exist nor create the directory. It /// will also not delete the directory when the instance is dropped. pub fn new>(path: P) -> BasePath { - BasePath::Permanent(path.as_ref().to_path_buf()) + BasePath::Permanenent(path.as_ref().to_path_buf()) } /// Create a base path from values describing the project. @@ -285,7 +285,7 @@ impl BasePath { match self { #[cfg(not(target_os = "unknown"))] BasePath::Temporary(temp_dir) => temp_dir.path(), - BasePath::Permanent(path) => path.as_path(), + BasePath::Permanenent(path) => path.as_path(), } }