mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 04:11:09 +00:00
Fix full spellcheck (#1076)
* fix(spellcheck): test of fixing * fix(hunspell): improved many typos etc. * fix(hunspell): all errors solved * fix(hunspell): extended scope of files - the build should fail * Return error code. * Fix spelling, sort dictionary. * fix(hunspell): added fix to gitlabs check * fix(typo): one typo and test of verification on github * fix(typo): one typo Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
562fac801d
commit
f86d101d7c
@@ -19,7 +19,7 @@
|
||||
//! The messages are interpreted directly as runtime `Call`. We attempt to decode
|
||||
//! them and then dispatch as usual. To prevent compatibility issues, the Calls have
|
||||
//! to include a `spec_version`. This will be checked before dispatch. In the case of
|
||||
//! a succesful dispatch an event is emitted.
|
||||
//! a successful dispatch an event is emitted.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
@@ -28,9 +28,9 @@ pub enum Error {
|
||||
BlockNumberDecode,
|
||||
/// Failed to decode Substrate header.
|
||||
HeaderDecode(codec::Error),
|
||||
/// Failed to decode best voters set.
|
||||
/// Failed to decode the best voters set.
|
||||
BestSetDecode(codec::Error),
|
||||
/// Best voters set is invalid.
|
||||
/// The best voters set is invalid.
|
||||
InvalidBestSet,
|
||||
/// Failed to decode finality proof.
|
||||
FinalityProofDecode(codec::Error),
|
||||
|
||||
@@ -36,7 +36,7 @@ pub struct CachedFinalityVotes<Submitter> {
|
||||
/// best finalized.
|
||||
pub stopped_at_finalized_sibling: bool,
|
||||
/// Header ancestors that were read while we have been searching for
|
||||
/// cached votes entry. Newest header has index 0.
|
||||
/// cached votes entry. The newest header has index 0.
|
||||
pub unaccounted_ancestry: VecDeque<(HeaderId, Option<Submitter>, AuraHeader)>,
|
||||
/// Cached finality votes, if they have been found. The associated
|
||||
/// header is not included into `unaccounted_ancestry`.
|
||||
@@ -59,7 +59,7 @@ pub struct FinalityEffects<Submitter> {
|
||||
pub struct FinalityVotes<Submitter> {
|
||||
/// Number of votes per each validator.
|
||||
pub votes: BTreeMap<Address, u64>,
|
||||
/// Ancestry blocks with oldest ancestors at the beginning and newest at the
|
||||
/// Ancestry blocks with the oldest ancestors at the beginning and newest at the
|
||||
/// end of the queue.
|
||||
pub ancestry: VecDeque<FinalityAncestor<Submitter>>,
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::{AuraConfiguration, ChainTime, ChangeToEnact, PruningStrategy, Storag
|
||||
use bp_eth_poa::{AuraHeader, HeaderId, Receipt};
|
||||
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
||||
|
||||
/// Imports bunch of headers and updates blocks finality.
|
||||
/// Imports a bunch of headers and updates blocks finality.
|
||||
///
|
||||
/// Transactions receipts must be provided if `header_import_requires_receipts()`
|
||||
/// has returned true.
|
||||
|
||||
@@ -169,8 +169,8 @@ struct PruningRange {
|
||||
/// were unable to prune for whatever reason (i.e. if it isn't finalized yet and has
|
||||
/// scheduled validators set change).
|
||||
pub oldest_unpruned_block: u64,
|
||||
/// Number of oldest block(s) that we want to keep. We want to prune blocks in range
|
||||
/// [`oldest_unpruned_block`; `oldest_block_to_keep`).
|
||||
/// Number of the oldest block(s) that we want to keep. We want to prune blocks in range
|
||||
/// [ `oldest_unpruned_block`; `oldest_block_to_keep` ).
|
||||
pub oldest_block_to_keep: u64,
|
||||
}
|
||||
|
||||
@@ -316,10 +316,10 @@ pub trait PruningStrategy: Default {
|
||||
/// Pallet may prune both finalized and unfinalized blocks. But it can't give any
|
||||
/// guarantees on when it will happen. Example: if some unfinalized block at height N
|
||||
/// has scheduled validators set change, then the module won't prune any blocks with
|
||||
/// number >= N even if strategy allows that.
|
||||
/// number greater than or equal to N even if strategy allows that.
|
||||
///
|
||||
/// If your strategy allows pruning unfinalized blocks, this could lead to switch
|
||||
/// between finalized forks (only if authorities are misbehaving). But since 50%+1 (or 2/3)
|
||||
/// between finalized forks (only if authorities are misbehaving). But since 50 percent plus one (or 2/3)
|
||||
/// authorities are able to do whatever they want with the chain, this isn't considered
|
||||
/// fatal. If your strategy only prunes finalized blocks, we'll never be able to finalize
|
||||
/// header that isn't descendant of current best finalized block.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
//! Although the name implies that it is used by tests, it shouldn't be be used _directly_ by tests.
|
||||
//! Instead these utilities should be used by the Mock runtime, which in turn is used by tests.
|
||||
//!
|
||||
//! On the other hand, they may be used directly by the bechmarking module.
|
||||
//! On the other hand, they may be used directly by the benchmark module.
|
||||
|
||||
// Since this is test code it's fine that not everything is used
|
||||
#![allow(dead_code)]
|
||||
|
||||
@@ -43,7 +43,7 @@ pub fn is_importable_header<S: Storage>(storage: &S, header: &AuraHeader) -> Res
|
||||
Ok((id, finalized_id))
|
||||
}
|
||||
|
||||
/// Try accept unsigned aura header into transaction pool.
|
||||
/// Try to accept unsigned aura header into transaction pool.
|
||||
///
|
||||
/// Returns required and provided tags.
|
||||
pub fn accept_aura_header_into_pool<S: Storage, CT: ChainTime>(
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
//! 2. The number of `pre-commits` in the justification
|
||||
//!
|
||||
//! Vote ancestries are the headers between (`finality_target`, `head_of_chain`], where
|
||||
//! `header_of_chain` is a decendant of `finality_target`.
|
||||
//! `header_of_chain` is a descendant of `finality_target`.
|
||||
//!
|
||||
//! Pre-commits are messages which are signed by validators at the head of the chain they think is
|
||||
//! the best.
|
||||
@@ -34,7 +34,7 @@
|
||||
//! [A] <- [B] <- [C]
|
||||
//!
|
||||
//! The common ancestor of both forks is block A, so this is what GRANDPA will finalize. In order to
|
||||
//! verify this we will have vote ancestries of [B, C, B', C'] and pre-commits [C, C'].
|
||||
//! verify this we will have vote ancestries of `[B, C, B', C']` and pre-commits `[C, C']`.
|
||||
//!
|
||||
//! Note that the worst case scenario here would be a justification where each validator has it's
|
||||
//! own fork which is `SESSION_LENGTH` blocks long.
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//!
|
||||
//! Since this pallet only tracks finalized headers it does not deal with forks. Forks can only
|
||||
//! occur if the GRANDPA validator set on the bridged chain is either colluding or there is a severe
|
||||
//! bug causing resulting in an equivocation. Such events are outside of the scope of this pallet.
|
||||
//! bug causing resulting in an equivocation. Such events are outside the scope of this pallet.
|
||||
//! Shall the fork occur on the bridged chain governance intervention will be required to
|
||||
//! re-initialize the bridge and track the right fork.
|
||||
|
||||
@@ -175,7 +175,7 @@ pub mod pallet {
|
||||
/// Bootstrap the bridge pallet with an initial header and authority set from which to sync.
|
||||
///
|
||||
/// The initial configuration provided does not need to be the genesis header of the bridged
|
||||
/// chain, it can be any arbirary header. You can also provide the next scheduled set change
|
||||
/// chain, it can be any arbitrary header. You can also provide the next scheduled set change
|
||||
/// if it is already know.
|
||||
///
|
||||
/// This function is only allowed to be called from a trusted origin and writes to storage
|
||||
@@ -355,7 +355,7 @@ pub mod pallet {
|
||||
/// is found it will be enacted immediately.
|
||||
///
|
||||
/// This function does not support forced changes, or scheduled changes with delays
|
||||
/// since these types of changes are indicitive of abnormal behaviour from GRANDPA.
|
||||
/// since these types of changes are indicative of abnormal behavior from GRANDPA.
|
||||
///
|
||||
/// Returned value will indicate if a change was enacted or not.
|
||||
pub(crate) fn try_enact_authority_change<T: Config<I>, I: 'static>(
|
||||
@@ -401,7 +401,7 @@ pub mod pallet {
|
||||
///
|
||||
/// Will use the GRANDPA current authorities known to the pallet.
|
||||
///
|
||||
/// If succesful it returns the decoded GRANDPA justification so we can refund any weight which
|
||||
/// If successful it returns the decoded GRANDPA justification so we can refund any weight which
|
||||
/// was overcharged in the initial call.
|
||||
pub(crate) fn verify_justification<T: Config<I>, I: 'static>(
|
||||
justification: &GrandpaJustification<BridgedHeader<T, I>>,
|
||||
@@ -432,7 +432,7 @@ pub mod pallet {
|
||||
/// Import a previously verified header to the storage.
|
||||
///
|
||||
/// Note this function solely takes care of updating the storage and pruning old entries,
|
||||
/// but does not verify the validaty of such import.
|
||||
/// but does not verify the validity of such import.
|
||||
pub(crate) fn insert_header<T: Config<I>, I: 'static>(header: BridgedHeader<T, I>, hash: BridgedBlockHash<T, I>) {
|
||||
let index = <ImportedHashesPointer<T, I>>::get();
|
||||
let pruning = <ImportedHashes<T, I>>::try_get(index);
|
||||
|
||||
@@ -31,14 +31,14 @@ use sp_std::fmt::Debug;
|
||||
|
||||
/// Instant message payments made in given currency.
|
||||
///
|
||||
/// The balance is initally reserved in a special `relayers-fund` account, and transferred
|
||||
/// The balance is initially reserved in a special `relayers-fund` account, and transferred
|
||||
/// to the relayer when message delivery is confirmed.
|
||||
///
|
||||
/// Additionaly, confirmation transaction submitter (`confirmation_relayer`) is reimbursed
|
||||
/// Additionally, confirmation transaction submitter (`confirmation_relayer`) is reimbursed
|
||||
/// with the confirmation rewards (part of message fee, reserved to pay for delivery confirmation).
|
||||
///
|
||||
/// NOTE The `relayers-fund` account must always exist i.e. be over Existential Deposit (ED; the
|
||||
/// pallet enforces that) to make sure that even if the message cost is below ED it is still payed
|
||||
/// pallet enforces that) to make sure that even if the message cost is below ED it is still paid
|
||||
/// to the relayer account.
|
||||
/// NOTE It's within relayer's interest to keep their balance above ED as well, to make sure they
|
||||
/// can receive the payment.
|
||||
|
||||
@@ -86,7 +86,7 @@ mod mock;
|
||||
pub trait Config<I = DefaultInstance>: frame_system::Config {
|
||||
// General types
|
||||
|
||||
/// They overarching event type.
|
||||
/// They are overarching event type.
|
||||
type Event: From<Event<Self, I>> + Into<<Self as frame_system::Config>::Event>;
|
||||
/// Benchmarks results from runtime we're plugged into.
|
||||
type WeightInfo: WeightInfoExt;
|
||||
@@ -786,22 +786,22 @@ impl<T: Config<I>, I: Instance> Pallet<T, I> {
|
||||
OutboundMessages::<T, I>::get(MessageKey { lane_id: lane, nonce })
|
||||
}
|
||||
|
||||
/// Get nonce of latest generated message at given outbound lane.
|
||||
/// Get nonce of the latest generated message at given outbound lane.
|
||||
pub fn outbound_latest_generated_nonce(lane: LaneId) -> MessageNonce {
|
||||
OutboundLanes::<I>::get(&lane).latest_generated_nonce
|
||||
}
|
||||
|
||||
/// Get nonce of latest confirmed message at given outbound lane.
|
||||
/// Get nonce of the latest confirmed message at given outbound lane.
|
||||
pub fn outbound_latest_received_nonce(lane: LaneId) -> MessageNonce {
|
||||
OutboundLanes::<I>::get(&lane).latest_received_nonce
|
||||
}
|
||||
|
||||
/// Get nonce of latest received message at given inbound lane.
|
||||
/// Get nonce of the latest received message at given inbound lane.
|
||||
pub fn inbound_latest_received_nonce(lane: LaneId) -> MessageNonce {
|
||||
InboundLanes::<T, I>::get(&lane).last_delivered_nonce()
|
||||
}
|
||||
|
||||
/// Get nonce of latest confirmed message at given inbound lane.
|
||||
/// Get nonce of the latest confirmed message at given inbound lane.
|
||||
pub fn inbound_latest_confirmed_nonce(lane: LaneId) -> MessageNonce {
|
||||
InboundLanes::<T, I>::get(&lane).last_confirmed_nonce
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ impl OnDeliveryConfirmed for TestOnDeliveryConfirmed1 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Seconde on-messages-delivered callback.
|
||||
/// Second on-messages-delivered callback.
|
||||
#[derive(Debug)]
|
||||
pub struct TestOnDeliveryConfirmed2;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ pub enum ReceivalConfirmationResult {
|
||||
/// New messages have been confirmed by the confirmation transaction.
|
||||
ConfirmedMessages(DeliveredMessages),
|
||||
/// Confirmation transaction brings no new confirmation. This may be a result of relayer
|
||||
/// error or several relayers runnng.
|
||||
/// error or several relayers running.
|
||||
NoNewConfirmations,
|
||||
/// Bridged chain is trying to confirm more messages than we have generated. May be a result
|
||||
/// of invalid bridged chain storage.
|
||||
|
||||
@@ -266,7 +266,7 @@ pub trait WeightInfoExt: WeightInfo {
|
||||
weight_of_two_messages_and_two_tx_overheads.saturating_sub(weight_of_two_messages_and_single_tx_overhead)
|
||||
}
|
||||
|
||||
/// Returns weight that needs to be accounted when receiving given number of messages with message
|
||||
/// Returns weight that needs to be accounted when receiving given a number of messages with message
|
||||
/// delivery transaction (`receive_messages_proof`).
|
||||
fn receive_messages_proof_messages_overhead(messages: MessageNonce) -> Weight {
|
||||
let weight_of_two_messages_and_single_tx_overhead = Self::receive_two_messages_proof();
|
||||
@@ -293,7 +293,7 @@ pub trait WeightInfoExt: WeightInfo {
|
||||
weight_of_two_messages_and_two_tx_overheads.saturating_sub(weight_of_two_messages_and_single_tx_overhead)
|
||||
}
|
||||
|
||||
/// Returns weight that needs to be accounted when receiving confirmations for given number of
|
||||
/// Returns weight that needs to be accounted when receiving confirmations for given a number of
|
||||
/// messages with delivery confirmation transaction (`receive_messages_delivery_proof`).
|
||||
fn receive_messages_delivery_proof_messages_overhead(messages: MessageNonce) -> Weight {
|
||||
let weight_of_two_messages = Self::receive_delivery_proof_for_two_messages_by_single_relayer();
|
||||
@@ -303,7 +303,7 @@ pub trait WeightInfoExt: WeightInfo {
|
||||
.saturating_mul(messages as Weight)
|
||||
}
|
||||
|
||||
/// Returns weight that needs to be accounted when receiving confirmations for given number of
|
||||
/// Returns weight that needs to be accounted when receiving confirmations for given a number of
|
||||
/// relayers entries with delivery confirmation transaction (`receive_messages_delivery_proof`).
|
||||
fn receive_messages_delivery_proof_relayers_overhead(relayers: MessageNonce) -> Weight {
|
||||
let weight_of_two_messages_by_two_relayers = Self::receive_delivery_proof_for_two_messages_by_two_relayers();
|
||||
@@ -314,7 +314,7 @@ pub trait WeightInfoExt: WeightInfo {
|
||||
.saturating_mul(relayers as Weight)
|
||||
}
|
||||
|
||||
/// Returns weight that needs to be accounted when storage proof of given size is recieved (either in
|
||||
/// Returns weight that needs to be accounted when storage proof of given size is received (either in
|
||||
/// `receive_messages_proof` or `receive_messages_delivery_proof`).
|
||||
///
|
||||
/// **IMPORTANT**: this overhead is already included in the 'base' transaction cost - e.g. proof
|
||||
|
||||
Reference in New Issue
Block a user