mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 08:41:02 +00:00
Try check-rustdoc pipeline (#1782)
* Try check-rustdoc pipeline * another try * another try without `--all-features` * fixed cargo doc issues * exclude relay-rialto-parachain-client from cargo doc --------- Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
e55d4dd6e0
commit
5fbabb3907
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
//! The Rialto parachain runtime. This can be compiled with `#[no_std]`, ready for Wasm.
|
//! The Rialto parachain runtime. This can be compiled with `#[no_std]`, ready for Wasm.
|
||||||
//!
|
//!
|
||||||
//! Originally a copy of runtime from https://github.com/substrate-developer-hub/substrate-parachain-template.
|
//! Originally a copy of runtime from <https://github.com/substrate-developer-hub/substrate-parachain-template>.
|
||||||
|
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Module provides utilities for easier XCM handling, e.g:
|
//! Module provides utilities for easier XCM handling, e.g:
|
||||||
//! [`XcmExecutor`] -> [`MessageSender`] -> <outbound message queue>
|
//! `XcmExecutor` -> `MessageSender` -> `OutboundMessageQueue`
|
||||||
//! |
|
//! |
|
||||||
//! <relayer>
|
//! `Relayer`
|
||||||
//! |
|
//! |
|
||||||
//! [`XcmRouter`] <- [`MessageDispatch`] <- <inbound message queue>
|
//! `XcmRouter` <- `MessageDispatch` <- `InboundMessageQueue`
|
||||||
|
|
||||||
use bp_messages::{
|
use bp_messages::{
|
||||||
source_chain::MessagesBridge,
|
source_chain::MessagesBridge,
|
||||||
@@ -136,7 +136,7 @@ pub trait XcmBlobHauler {
|
|||||||
/// Runtime message sender adapter.
|
/// Runtime message sender adapter.
|
||||||
type MessageSender: MessagesBridge<Self::MessageSenderOrigin, XcmAsPlainPayload>;
|
type MessageSender: MessagesBridge<Self::MessageSenderOrigin, XcmAsPlainPayload>;
|
||||||
|
|
||||||
/// Runtime message sender origin, which is used by [`MessageSender`].
|
/// Runtime message sender origin, which is used by [`Self::MessageSender`].
|
||||||
type MessageSenderOrigin;
|
type MessageSenderOrigin;
|
||||||
/// Our location within the Consensus Universe.
|
/// Our location within the Consensus Universe.
|
||||||
fn message_sender_origin() -> Self::MessageSenderOrigin;
|
fn message_sender_origin() -> Self::MessageSenderOrigin;
|
||||||
@@ -145,8 +145,8 @@ pub trait XcmBlobHauler {
|
|||||||
fn xcm_lane() -> LaneId;
|
fn xcm_lane() -> LaneId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// XCM bridge adapter which connects [`XcmBlobHauler`] with [`MessageSender`] and makes sure that
|
/// XCM bridge adapter which connects [`XcmBlobHauler`] with [`XcmBlobHauler::MessageSender`] and
|
||||||
/// XCM blob is sent to the [`pallet_bridge_messages`] queue to be relayed.
|
/// makes sure that XCM blob is sent to the [`pallet_bridge_messages`] queue to be relayed.
|
||||||
pub struct XcmBlobHaulerAdapter<XcmBlobHauler>(sp_std::marker::PhantomData<XcmBlobHauler>);
|
pub struct XcmBlobHaulerAdapter<XcmBlobHauler>(sp_std::marker::PhantomData<XcmBlobHauler>);
|
||||||
impl<HaulerOrigin, H: XcmBlobHauler<MessageSenderOrigin = HaulerOrigin>> HaulBlob
|
impl<HaulerOrigin, H: XcmBlobHauler<MessageSenderOrigin = HaulerOrigin>> HaulBlob
|
||||||
for XcmBlobHaulerAdapter<H>
|
for XcmBlobHaulerAdapter<H>
|
||||||
|
|||||||
@@ -86,12 +86,12 @@ pub const MAX_AUTHORITIES_COUNT: u32 = 5;
|
|||||||
|
|
||||||
/// Reasonable number of headers in the `votes_ancestries` on Millau chain.
|
/// Reasonable number of headers in the `votes_ancestries` on Millau chain.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
pub const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8;
|
pub const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8;
|
||||||
|
|
||||||
/// Approximate average header size in `votes_ancestries` field of justification on Millau chain.
|
/// Approximate average header size in `votes_ancestries` field of justification on Millau chain.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 256;
|
pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 256;
|
||||||
|
|
||||||
/// Approximate maximal header size on Millau chain.
|
/// Approximate maximal header size on Millau chain.
|
||||||
@@ -100,7 +100,7 @@ pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 256;
|
|||||||
/// engine (GRANDPA, Babe, BEEFY, ...) - so we multiply it by 3. And also
|
/// engine (GRANDPA, Babe, BEEFY, ...) - so we multiply it by 3. And also
|
||||||
/// `AVERAGE_HEADER_SIZE_IN_JUSTIFICATION` bytes for other stuff.
|
/// `AVERAGE_HEADER_SIZE_IN_JUSTIFICATION` bytes for other stuff.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
pub const MAX_HEADER_SIZE: u32 = MAX_AUTHORITIES_COUNT
|
pub const MAX_HEADER_SIZE: u32 = MAX_AUTHORITIES_COUNT
|
||||||
.saturating_mul(3)
|
.saturating_mul(3)
|
||||||
.saturating_add(AVERAGE_HEADER_SIZE_IN_JUSTIFICATION);
|
.saturating_add(AVERAGE_HEADER_SIZE_IN_JUSTIFICATION);
|
||||||
|
|||||||
@@ -75,12 +75,12 @@ pub const MAX_AUTHORITIES_COUNT: u32 = 5;
|
|||||||
|
|
||||||
/// Reasonable number of headers in the `votes_ancestries` on Rialto chain.
|
/// Reasonable number of headers in the `votes_ancestries` on Rialto chain.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
pub const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8;
|
pub const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8;
|
||||||
|
|
||||||
/// Approximate average header size in `votes_ancestries` field of justification on Rialto chain.
|
/// Approximate average header size in `votes_ancestries` field of justification on Rialto chain.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 256;
|
pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 256;
|
||||||
|
|
||||||
/// Approximate maximal header size on Rialto chain.
|
/// Approximate maximal header size on Rialto chain.
|
||||||
@@ -89,7 +89,7 @@ pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 256;
|
|||||||
/// engine (GRANDPA, Babe, BEEFY, ...) - so we multiply it by 3. And also
|
/// engine (GRANDPA, Babe, BEEFY, ...) - so we multiply it by 3. And also
|
||||||
/// `AVERAGE_HEADER_SIZE_IN_JUSTIFICATION` bytes for other stuff.
|
/// `AVERAGE_HEADER_SIZE_IN_JUSTIFICATION` bytes for other stuff.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
pub const MAX_HEADER_SIZE: u32 = MAX_AUTHORITIES_COUNT
|
pub const MAX_HEADER_SIZE: u32 = MAX_AUTHORITIES_COUNT
|
||||||
.saturating_mul(3)
|
.saturating_mul(3)
|
||||||
.saturating_add(AVERAGE_HEADER_SIZE_IN_JUSTIFICATION);
|
.saturating_add(AVERAGE_HEADER_SIZE_IN_JUSTIFICATION);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ pub const MAX_AUTHORITIES_COUNT: u32 = 1_256;
|
|||||||
|
|
||||||
/// Reasonable number of headers in the `votes_ancestries` on Polkadot-like chains.
|
/// Reasonable number of headers in the `votes_ancestries` on Polkadot-like chains.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
///
|
///
|
||||||
/// This value comes from recent (February, 2023) Kusama and Polkadot headers. There are no
|
/// This value comes from recent (February, 2023) Kusama and Polkadot headers. There are no
|
||||||
/// justifications with any additional headers in votes ancestry, so reasonable headers may
|
/// justifications with any additional headers in votes ancestry, so reasonable headers may
|
||||||
@@ -65,7 +65,7 @@ pub const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 2;
|
|||||||
/// Approximate average header size in `votes_ancestries` field of justification on Polkadot-like
|
/// Approximate average header size in `votes_ancestries` field of justification on Polkadot-like
|
||||||
/// chains.
|
/// chains.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
///
|
///
|
||||||
/// This value comes from recent (February, 2023) Kusama headers. Average is `336` there, but some
|
/// This value comes from recent (February, 2023) Kusama headers. Average is `336` there, but some
|
||||||
/// non-mandatory headers has size `40kb` (they contain the BABE epoch descriptor with all
|
/// non-mandatory headers has size `40kb` (they contain the BABE epoch descriptor with all
|
||||||
@@ -75,7 +75,7 @@ pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 20 * 1024;
|
|||||||
|
|
||||||
/// Approximate maximal header size on Polkadot-like chains.
|
/// Approximate maximal header size on Polkadot-like chains.
|
||||||
///
|
///
|
||||||
/// See [`bp_header_chain::ChainWithGrandpa`] for more details.
|
/// See [`bp-header-chain::ChainWithGrandpa`] for more details.
|
||||||
///
|
///
|
||||||
/// This value comes from recent (February, 2023) Kusama headers. Maximal header is a mandatory
|
/// This value comes from recent (February, 2023) Kusama headers. Maximal header is a mandatory
|
||||||
/// header. In its SCALE-encoded form it is `80348` bytes. Let's have some reserve here.
|
/// header. In its SCALE-encoded form it is `80348` bytes. Let's have some reserve here.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
//! Substrate client as Substrate messages source. The chain we connect to should have
|
//! Substrate client as Substrate messages source. The chain we connect to should have
|
||||||
//! runtime that implements `<BridgedChainName>HeaderApi` to allow bridging with
|
//! runtime that implements `<BridgedChainName>HeaderApi` to allow bridging with
|
||||||
//! <BridgedName> chain.
|
//! `<BridgedName>` chain.
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
messages_lane::{
|
messages_lane::{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
//! Substrate client as Substrate messages target. The chain we connect to should have
|
//! Substrate client as Substrate messages target. The chain we connect to should have
|
||||||
//! runtime that implements `<BridgedChainName>HeaderApi` to allow bridging with
|
//! runtime that implements `<BridgedChainName>HeaderApi` to allow bridging with
|
||||||
//! <BridgedName> chain.
|
//! `<BridgedName>` chain.
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
messages_lane::{
|
messages_lane::{
|
||||||
|
|||||||
Reference in New Issue
Block a user