mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 18:17:56 +00:00
committed by
GitHub
parent
cac9d85cb3
commit
fcfb766366
@@ -21,7 +21,8 @@ use crate::{crypto::Signature, ValidatorSetId};
|
||||
|
||||
/// A commitment signed by GRANDPA validators as part of BEEFY protocol.
|
||||
///
|
||||
/// The commitment contains a [payload] extracted from the finalized block at height [block_number].
|
||||
/// The commitment contains a [payload](Commitment::payload) extracted from the finalized block at
|
||||
/// height [block_number](Commitment::block_number).
|
||||
/// GRANDPA validators collect signatures on commitments and a stream of such signed commitments
|
||||
/// (see [SignedCommitment]) forms the BEEFY protocol.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, codec::Encode, codec::Decode)]
|
||||
@@ -33,7 +34,7 @@ pub struct Commitment<TBlockNumber, TPayload> {
|
||||
/// validator set. The protocol does not enforce any particular format of this data,
|
||||
/// nor how often it should be present in commitments, however the light client has to be
|
||||
/// provided with full validator set whenever it performs the transition (i.e. importing first
|
||||
/// block with [validator_set_id] incremented).
|
||||
/// block with [validator_set_id](Commitment::validator_set_id) incremented).
|
||||
pub payload: TPayload,
|
||||
|
||||
/// Finalized block number this commitment is for.
|
||||
@@ -51,8 +52,8 @@ pub struct Commitment<TBlockNumber, TPayload> {
|
||||
///
|
||||
/// Validator set is changing once per epoch. The Light Client must be provided by details
|
||||
/// about the validator set whenever it's importing first commitment with a new
|
||||
/// `validator_set_id`. Validator set data MUST be verifiable, for instance using [payload]
|
||||
/// information.
|
||||
/// `validator_set_id`. Validator set data MUST be verifiable, for instance using
|
||||
/// [payload](Commitment::payload) information.
|
||||
pub validator_set_id: ValidatorSetId,
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ pub(crate) fn syn_err(message: &'static str) -> syn::Error {
|
||||
/// ```
|
||||
///
|
||||
/// The given struct provides function to convert from/to `Assignment` as part of
|
||||
/// [`sp_npos_elections::Solution`] trait:
|
||||
/// `sp_npos_elections::Solution` trait:
|
||||
///
|
||||
/// - `fn from_assignment<..>(..)`
|
||||
/// - `fn into_assignment<..>(..)`
|
||||
|
||||
@@ -201,7 +201,7 @@ impl<VoterIndex, TargetIndex, P: PerThing> IndexAssignment<VoterIndex, TargetInd
|
||||
}
|
||||
}
|
||||
|
||||
/// A type alias for [`IndexAssignment`] made from [`crate::Solution`].
|
||||
/// A type alias for [`IndexAssignment`] made from [`crate::NposSolution`].
|
||||
pub type IndexAssignmentOf<C> = IndexAssignment<
|
||||
<C as crate::NposSolution>::VoterIndex,
|
||||
<C as crate::NposSolution>::TargetIndex,
|
||||
|
||||
@@ -89,7 +89,7 @@ pub type HostFuncType<T> = fn(&mut T, &[Value]) -> Result<ReturnValue, HostError
|
||||
/// will be used by the guest module.
|
||||
///
|
||||
/// The memory can't be directly accessed by supervisor, but only
|
||||
/// through designated functions [`get`](Memory::get) and [`set`](Memory::set).
|
||||
/// through designated functions [`get`](SandboxMemory::get) and [`set`](SandboxMemory::set).
|
||||
pub trait SandboxMemory: Sized + Clone {
|
||||
/// Construct a new linear memory instance.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user