pub struct ParachainConfig { /* private fields */ }Expand description
A parachain configuration, composed of collators and fine-grained configuration options.
Implementations§
Source§impl ParachainConfig
impl ParachainConfig
Sourcepub fn registration_strategy(&self) -> Option<&RegistrationStrategy>
pub fn registration_strategy(&self) -> Option<&RegistrationStrategy>
The registration strategy for the parachain.
Sourcepub fn onboard_as_parachain(&self) -> bool
pub fn onboard_as_parachain(&self) -> bool
Whether the parachain should be onboarded or stay a parathread
Sourcepub fn num_cores(&self) -> Option<u32>
pub fn num_cores(&self) -> Option<u32>
Number of cores to assign (1 assigned autatically at genesis)
Sourcepub fn initial_balance(&self) -> u128
pub fn initial_balance(&self) -> u128
The initial balance of the parachain account.
Sourcepub fn default_command(&self) -> Option<&Command>
pub fn default_command(&self) -> Option<&Command>
The default command used for collators.
Sourcepub fn default_image(&self) -> Option<&Image>
pub fn default_image(&self) -> Option<&Image>
The default container image used for collators.
Sourcepub fn default_resources(&self) -> Option<&Resources>
pub fn default_resources(&self) -> Option<&Resources>
The default resources limits used for collators.
Sourcepub fn default_db_snapshot(&self) -> Option<&AssetLocation>
pub fn default_db_snapshot(&self) -> Option<&AssetLocation>
The default database snapshot location that will be used for state.
Sourcepub fn default_args(&self) -> Vec<&Arg>
pub fn default_args(&self) -> Vec<&Arg>
The default arguments that will be used to execute the collator command.
Sourcepub fn genesis_wasm_path(&self) -> Option<&AssetLocation>
pub fn genesis_wasm_path(&self) -> Option<&AssetLocation>
The location of a pre-existing genesis WASM runtime blob of the parachain.
Sourcepub fn genesis_wasm_generator(&self) -> Option<&Command>
pub fn genesis_wasm_generator(&self) -> Option<&Command>
The generator command used to create the genesis WASM runtime blob of the parachain.
Sourcepub fn genesis_state_path(&self) -> Option<&AssetLocation>
pub fn genesis_state_path(&self) -> Option<&AssetLocation>
The location of a pre-existing genesis state of the parachain.
Sourcepub fn genesis_state_generator(&self) -> Option<&CommandWithCustomArgs>
pub fn genesis_state_generator(&self) -> Option<&CommandWithCustomArgs>
The generator command used to create the genesis state of the parachain.
Sourcepub fn genesis_overrides(&self) -> Option<&Value>
pub fn genesis_overrides(&self) -> Option<&Value>
The genesis overrides as a JSON value.
Sourcepub fn chain_spec_path(&self) -> Option<&AssetLocation>
pub fn chain_spec_path(&self) -> Option<&AssetLocation>
The location of a pre-existing chain specification for the parachain.
Sourcepub fn chain_spec_command(&self) -> Option<&str>
pub fn chain_spec_command(&self) -> Option<&str>
The full template command to genera the chain-spec
Sourcepub fn chain_spec_command_is_local(&self) -> bool
pub fn chain_spec_command_is_local(&self) -> bool
Does the chain_spec_command needs to be run locally
Sourcepub fn chain_spec_command_output_path(&self) -> Option<&str>
pub fn chain_spec_command_output_path(&self) -> Option<&str>
The file where the chain_spec_command will write the chain-spec into.
Defaults to /dev/stdout.
Sourcepub fn post_process_script(&self) -> Option<&str>
pub fn post_process_script(&self) -> Option<&str>
Optional post-process script to run after chain-spec generation for this parachain.
Sourcepub fn is_cumulus_based(&self) -> bool
pub fn is_cumulus_based(&self) -> bool
Whether the parachain is based on cumulus.
Sourcepub fn is_evm_based(&self) -> bool
pub fn is_evm_based(&self) -> bool
Whether the parachain is evm based (e.g frontier).
Sourcepub fn bootnodes_addresses(&self) -> Vec<&Multiaddr>
pub fn bootnodes_addresses(&self) -> Vec<&Multiaddr>
The bootnodes addresses the collators will connect to.
Sourcepub fn no_default_bootnodes(&self) -> bool
pub fn no_default_bootnodes(&self) -> bool
Whether to not automatically assign a bootnode role if none of the nodes are marked as bootnodes.
Sourcepub fn collators(&self) -> Vec<&NodeConfig>
pub fn collators(&self) -> Vec<&NodeConfig>
The collators of the parachain.
Sourcepub fn group_collators_configs(&self) -> Vec<&GroupNodeConfig>
pub fn group_collators_configs(&self) -> Vec<&GroupNodeConfig>
The grouped collators of the parachain.
Sourcepub fn wasm_override(&self) -> Option<&AssetLocation>
pub fn wasm_override(&self) -> Option<&AssetLocation>
The location of a wasm runtime to override in the chain-spec.
Sourcepub fn raw_spec_override(&self) -> Option<&JsonOverrides>
pub fn raw_spec_override(&self) -> Option<&JsonOverrides>
The location of a file or inline json to override raw chain-spec.
Sourcepub fn chain_spec_runtime(&self) -> Option<&ChainSpecRuntime>
pub fn chain_spec_runtime(&self) -> Option<&ChainSpecRuntime>
The location of runtime to use by chain-spec builder lib (from sc-chain-spec crate)
Trait Implementations§
Source§impl Clone for ParachainConfig
impl Clone for ParachainConfig
Source§fn clone(&self) -> ParachainConfig
fn clone(&self) -> ParachainConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParachainConfig
impl Debug for ParachainConfig
Source§impl<'de> Deserialize<'de> for ParachainConfig
impl<'de> Deserialize<'de> for ParachainConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ParachainConfig
impl PartialEq for ParachainConfig
Source§impl Serialize for ParachainConfig
impl Serialize for ParachainConfig
impl StructuralPartialEq for ParachainConfig
Auto Trait Implementations§
impl Freeze for ParachainConfig
impl RefUnwindSafe for ParachainConfig
impl Send for ParachainConfig
impl Sync for ParachainConfig
impl Unpin for ParachainConfig
impl UnsafeUnpin for ParachainConfig
impl UnwindSafe for ParachainConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.