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
README.md
View file @
732a3804
...
...
@@ -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 customi
s
ed by editing
`/etc/default/polkadot`
. This file will not be
be customi
z
ed 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.
...
...
bridges/primitives/chain-kusama/src/lib.rs
View file @
732a3804
...
...
@@ -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
;
...
...
bridges/primitives/chain-polkadot/src/lib.rs
View file @
732a3804
...
...
@@ -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
;
...
...
bridges/primitives/chain-rococo/src/lib.rs
View file @
732a3804
...
...
@@ -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
;
...
...
bridges/primitives/chain-westend/src/lib.rs
View file @
732a3804
...
...
@@ -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
;
...
...
bridges/primitives/runtime/src/lib.rs
View file @
732a3804
...
...
@@ -70,7 +70,7 @@ pub type InstanceId = [u8; 4];
/// Type of accounts on the source chain.
pub
enum
SourceAccount
<
T
>
{
/// An account that belongs to Root (privile
d
ged origin).
/// An account that belongs to Root (privileged origin).
Root
,
/// A non-priviledged account.
///
...
...
@@ -82,7 +82,7 @@ pub enum SourceAccount<T> {
/// 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 succes
s
fully 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.
...
...
node/core/pvf/src/artifacts.rs
View file @
732a3804
...
...
@@ -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 retri
e
ve the artifacts from the table that are older than the supplied Time-To-Live.
pub
fn
prune
(
&
mut
self
,
artifact_ttl
:
Duration
)
->
Vec
<
ArtifactId
>
{
let
now
=
SystemTime
::
now
();
...
...
node/core/pvf/src/host.rs
View file @
732a3804
...
...
@@ -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 immediatel
l
y.
/// This is async to accom
m
odate 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 immediatel
l
y.
/// This is async to accom
m
odate 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
<
Pvf
>
)
->
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 exe
u
ction
/// A mapping from an artifact ID which is in preparation state to the list of pending exec
u
tion
/// requests that should be executed once the artifact's prepration is finished.
#[derive(Default)]
struct
AwaitingPrepare
(
HashMap
<
ArtifactId
,
Vec
<
PendingExecutionRequest
>>
);
...
...
node/network/availability-distribution/src/error.rs
View file @
732a3804
...
...
@@ -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.
...
...
node/network/availability-distribution/src/requester/fetch_task/mod.rs
View file @
732a3804
...
...
@@ -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
{
...
...
node/network/availability-distribution/src/requester/mod.rs
View file @
732a3804
...
...
@@ -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 availabil
i
ty distribution.
#[tracing::instrument(level
=
"trace"
,
skip(self,
ctx,
runtime,
update),
fields(subsystem
=
LOG_TARGET))]
pub
async
fn
update_fetching_heads
<
Context
>
(
&
mut
self
,
...
...
node/network/availability-distribution/src/tests/state.rs
View file @
732a3804
...
...
@@ -68,7 +68,7 @@ pub struct TestState {
pub
relay_chain
:
Vec
<
Hash
>
,
/// 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 sub
s
ystem still succe
e
ds with its goal.
pub
chunks
:
HashMap
<
(
CandidateHash
,
ValidatorIndex
),
Vec
<
Option
<
ErasureChunk
>>>
,
/// All chunks that are valid and should be accepted.
pub
valid_chunks
:
HashSet
<
(
CandidateHash
,
ValidatorIndex
)
>
,
...
...
node/network/bitfield-distribution/src/lib.rs
View file @
732a3804
...
...
@@ -233,7 +233,7 @@ impl BitfieldDistribution {
}
}
/// Modify the reputation of a peer based on its behavio
u
r.
/// Modify the reputation of a peer based on its behavior.
#[tracing::instrument(level
=
"trace"
,
skip(ctx),
fields(subsystem
=
LOG_TARGET))]
async
fn
modify_reputation
<
Context
>
(
ctx
:
&
mut
Context
,
...
...
@@ -560,7 +560,7 @@ where
}
}
/// Handle the changes nec
a
ssary when our view changes.
/// Handle the changes nec
e
ssary 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
);
...
...
node/network/bridge/src/lib.rs
View file @
732a3804
...
...
@@ -317,7 +317,7 @@ impl<Net, AD, Context> Subsystem<Context> for NetworkBridge<Net, AD>
}
struct
PeerData
{
/// Latest view sent by the peer.
///
The
Latest view sent by the peer.
view
:
View
,
}
...
...
node/network/bridge/src/network.rs
View file @
732a3804
...
...
@@ -93,7 +93,7 @@ where
/// An action to be carried out by the network.
///
/// This type is used for implementing `Sink` in order to c
u
mmunicate asynchronously with the
/// This type is used for implementing `Sink` in order to c
o
mmunicate asynchronously with the
/// underlying network implementation in the `Network` trait.
#[derive(Debug,
PartialEq)]
pub
enum
NetworkAction
{
...
...
node/network/collator-protocol/src/collator_side.rs
View file @
732a3804
...
...
@@ -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 advertis
e
ment message.
async
fn
expect_advertise_collation_msg
(
virtual_overseer
:
&
mut
VirtualOverseer
,
peer
:
&
PeerId
,
...
...
node/network/protocol/src/lib.rs
View file @
732a3804
...
...
@@ -324,14 +324,14 @@ pub mod v1 {
LargeStatement
(
StatementMetadata
),
}
/// Data that maes a statement unique.
/// Data that ma
k
es a statement unique.
#[derive(Debug,
Clone,
Encode,
Decode,
PartialEq,
Eq,
Hash)]
pub
struct
StatementMetadata
{
/// Relay
t
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 validi
d
ty.
/// 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
...
...
node/network/protocol/src/peer_set.rs
View file @
732a3804
...
...
@@ -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)]
...
...
node/network/protocol/src/request_response/request.rs
View file @
732a3804
...
...
@@ -104,7 +104,7 @@ pub enum Recipient {
/// discovery system.
#[derive(Debug)]
pub
struct
OutgoingRequest
<
Req
>
{
/// Intende
nt
recipient of this request.
/// Intende
d
recipient of this request.
pub
peer
:
Recipient
,
/// The actual request to send over the wire.
pub
payload
:
Req
,
...
...
node/network/statement-distribution/src/error.rs
View file @
732a3804
...
...
@@ -28,7 +28,7 @@ use crate::LOG_TARGET;
/// General result.
pub
type
Result
<
T
>
=
std
::
result
::
Result
<
T
,
Error
>
;
/// Result for non
fatal only failures.
/// Result for non
-
fatal only failures.
pub
type
NonFatalResult
<
T
>
=
std
::
result
::
Result
<
T
,
NonFatal
>
;
/// Result for fatal only failures.
pub
type
FatalResult
<
T
>
=
std
::
result
::
Result
<
T
,
Fatal
>
;
...
...
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