Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
732a3804
Unverified
Commit
732a3804
authored
May 22, 2021
by
Bernhard Schuster
Committed by
GitHub
May 22, 2021
Browse files
cargo spellcheck (#3067)
parent
94b79d07
Changes
34
Hide whitespace changes
Inline
Side-by-side
node/network/statement-distribution/src/requester.rs
View file @
732a3804
...
...
@@ -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 avail
a
ble 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
,
...
...
node/network/statement-distribution/src/responder.rs
View file @
732a3804
...
...
@@ -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 avail
a
ble 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
<
sc_network
::
config
::
IncomingRequest
>
,
...
...
node/primitives/src/lib.rs
View file @
732a3804
...
...
@@ -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 complet
e
ly 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
<
futures
::
channel
::
oneshot
::
Sender
<
SignedFullStatement
>>
,
...
...
node/service/src/chain_spec.rs
View file @
732a3804
...
...
@@ -59,16 +59,16 @@ pub struct Extensions {
pub
bad_blocks
:
sc_client_api
::
BadBlocks
<
polkadot_primitives
::
v1
::
Block
>
,
}
/// The `ChainSpec` parametri
s
ed for the polkadot runtime.
/// The `ChainSpec` paramet
e
ri
z
ed for the polkadot runtime.
pub
type
PolkadotChainSpec
=
service
::
GenericChainSpec
<
polkadot
::
GenesisConfig
,
Extensions
>
;
/// The `ChainSpec` parametri
s
ed for the kusama runtime.
/// The `ChainSpec` paramet
e
ri
z
ed for the kusama runtime.
pub
type
KusamaChainSpec
=
service
::
GenericChainSpec
<
kusama
::
GenesisConfig
,
Extensions
>
;
/// The `ChainSpec` parametri
s
ed for the westend runtime.
/// The `ChainSpec` paramet
e
ri
z
ed for the westend runtime.
pub
type
WestendChainSpec
=
service
::
GenericChainSpec
<
westend
::
GenesisConfig
,
Extensions
>
;
/// The `ChainSpec` parametrized for the rococo runtime.
/// The `ChainSpec` paramet
e
rized for the rococo runtime.
pub
type
RococoChainSpec
=
service
::
GenericChainSpec
<
RococoGenesisExt
,
Extensions
>
;
/// Extension for the Rococo genesis config to support a custom changes to the genesis state.
...
...
node/subsystem-util/src/error_handling.rs
View file @
732a3804
...
...
@@ -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<E, F> Fault<E, F>
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
<
E1
:
Into
<
E
>>
(
e
:
E1
)
->
Self
{
Self
::
Err
(
e
.into
())
}
...
...
@@ -153,10 +153,10 @@ impl<E, F> Fault<E, F>
}
}
/// 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:
///
...
...
node/subsystem-util/src/runtime/mod.rs
View file @
732a3804
...
...
@@ -63,7 +63,7 @@ pub struct ExtendedSessionInfo {
pub
validator_info
:
ValidatorInfo
,
}
/// Information about oursel
f
, in case we are an `Authority`.
/// Information about oursel
ves
, in case we are an `Authority`.
///
/// This data is derived from the `SessionInfo` and our key as found in the keystore.
pub
struct
ValidatorInfo
{
...
...
node/subsystem/src/lib.rs
View file @
732a3804
...
...
@@ -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 an
n
otation tag for the origin of `source`.
origin
:
&
'static
str
,
/// The wrapped error. Marked as source for tracking the error chain.
#[source]
source
:
Box
<
dyn
'static
+
std
::
error
::
Error
+
Send
+
Sync
>
...
...
node/subsystem/src/messages/network_bridge_event.rs
View file @
732a3804
...
...
@@ -45,7 +45,7 @@ impl<M> NetworkBridgeEvent<M> {
///
/// 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 concret
e
ly a `ValidationProtocol` will be transformed
/// for example into a `BitfieldDistributionMessage` in case of the `BitfieldDistribution`
/// constructor.
///
...
...
node/test/service/src/chain_spec.rs
View file @
732a3804
...
...
@@ -29,7 +29,7 @@ use sp_runtime::Perbill;
const
DEFAULT_PROTOCOL_ID
:
&
str
=
"dot"
;
/// The `ChainSpec` parametrized for polkadot test runtime.
/// The `ChainSpec` paramet
e
rized for polkadot test runtime.
pub
type
PolkadotChainSpec
=
service
::
GenericChainSpec
<
polkadot_test_runtime
::
GenesisConfig
,
Extensions
>
;
...
...
node/test/service/src/lib.rs
View file @
732a3804
...
...
@@ -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 adjust
e
ments 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 adjust
e
ments 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 adjust
e
ments to the runtime genesis storage.
/// and can be used to make adjustments to the runtime genesis storage.
///
/// # Note
///
/// The collator function
ion
ality 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
,
...
...
primitives/src/v0.rs
View file @
732a3804
...
...
@@ -184,7 +184,7 @@ pub const PARACHAIN_INFO: Info = Info {
scheduling
:
Scheduling
::
Always
,
};
/// Auxil
l
iary 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<H = Hash> {
/// A candidate-receipt with commitments directly included.
pub
struct
CommitedCandidateReceipt
<
H
=
Hash
>
{
/// The descriptor of the candidae.
/// The descriptor of the candida
t
e.
pub
descriptor
:
CandidateDescriptor
,
/// The commitments of the candidate receipt.
...
...
primitives/src/v1/mod.rs
View file @
732a3804
...
...
@@ -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 sever
e
ly. 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<H: Clone> CommittedCandidateReceipt<H> {
self
.to_plain
()
.hash
()
}
/// Does this committed candidate receipt corre
n
sponds to the given [`CandidateReceipt`]?
/// Does this committed candidate receipt corresponds to the given [`CandidateReceipt`]?
pub
fn
corresponds_to
(
&
self
,
receipt
:
&
CandidateReceipt
<
H
>
)
->
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 primar
i
ly 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 u
g
prade.
/// A parachain or parathread scheduled a code up
g
rade.
#[codec(index
=
2
)]
ParaScheduleUpgradeCode
(
Id
,
Hash
,
BlockNumber
),
/// Governance requests to auto-approve every candidate included up to the given block
...
...
runtime/common/src/auctions.rs
View file @
732a3804
...
...
@@ -122,7 +122,7 @@ pub mod pallet {
/// [bidder, range, parachain_id, amount]
WonDeploy
(
T
::
AccountId
,
SlotRange
,
ParaId
,
BalanceOf
<
T
>
),
/// 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 rese
r
ved. Second is the total amount reserved.
/// [parachain_id, begin, count, total_amount]
WonRenewal
(
ParaId
,
LeasePeriodOf
<
T
>
,
LeasePeriodOf
<
T
>
,
BalanceOf
<
T
>
),
/// Funds were reserved for a winning bid. First balance is the extra amount reserved.
...
...
runtime/common/src/claims.rs
View file @
732a3804
...
...
@@ -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
{
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment