Struct rococo_runtime::Runtime

source ·
pub struct Runtime;

Implementations§

Trait Implementations§

Get current account nonce of given AccountId.
Retrieve authority identifiers of the current and next authority set.
Return the configuration for BABE.
Returns the slot that started the current epoch.
Returns information regarding the current epoch.
Returns information regarding the next epoch (which was already previously announced). Read more
Generates a proof of key ownership for the given authority in the current epoch. An example usage of this module is coupled with the session historical module to prove that a given authority key is tied to a given staking identity during a specific session. Proofs of key ownership are necessary for submitting equivocation reports. NOTE: even though the API takes a slot as parameter the current implementations ignores this parameter and instead relies on this method being called at the correct block height, i.e. any point at which the epoch for the given slot is live on-chain. Future implementations will instead use indexed data through an offchain worker, not requiring older states to be available. Read more
Submits an unsigned extrinsic to report an equivocation. The caller must provide the equivocation proof and a key ownership proof (should be obtained using generate_key_ownership_proof). The extrinsic will be unsigned and should only be accepted for local authorship (not to be broadcast to the network). This method returns None when creation of the extrinsic fails, e.g. if equivocation reporting is disabled for the given runtime (i.e. this method is hardcoded to return None). Only useful in an offchain context. Read more
Return the current active BEEFY validator set
Get the benchmark metadata available for this runtime. Read more
Dispatch the given benchmark.
Apply the given extrinsic. Read more
Finish the current block.
Generate inherent extrinsics. The inherent data will vary from chain to chain.
Check that the inherents are valid. The inherent data will vary from chain to chain.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
The balance of an account.
Handler for the unbalanced reduction when removing a dust account.
The overarching event type.
The minimum amount required to keep an account open.
The means of storing the balances of an account.
The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation. Read more
The maximum number of named reserves that can exist on an account.
The id type for named reserves.
Weight information for extrinsics in this pallet.
Prefix for elements stored in the Off-chain DB via Indexing API. Read more
A hasher type for MMR. Read more
The hashing output type. Read more
A hook to act on the new MMR root. Read more
Weights for this pallet.
Data stored in the leaf nodes. Read more
The outer origin type.
The outer call dispatch type.
The outer event type.
The time-out for council motions.
Maximum number of proposals allowed to be active in parallel.
Default vote strategy of this collective.
The maximum number of members supported by the pallet. Used for weight estimation. Read more
Weight information for extrinsics in this pallet.
The overarching event type.
Required origin for adding a member (though can always be Root).
Required origin for removing a member (though can always be Root).
Required origin for adding and removing a member in a single action.
Required origin for resetting membership.
Required origin for setting or resetting the prime member.
The receiver of the signal for when the membership has been initialized. This happens pre-genesis and will usually be the same as MembershipChanged. If you need to do something different on initialization, then you can change this accordingly. Read more
The receiver of the signal for when the membership has changed.
The maximum number of members that this membership can have. Read more
Weight information for extrinsics in this pallet.
The overarching event type.
Required origin for sending XCM messages. If successful, it resolves to MultiLocation which exists as an interior location within this chain’s XCM context. Read more
The type used to actually dispatch an XCM to its destination.
Required origin for executing XCM messages, including the teleport functionality. If successful, then it resolves to MultiLocation which exists as an interior location within this chain’s XCM context. Read more
Our XCM filter which messages to be executed using XcmExecutor must pass.
Something to execute an XCM message.
Our XCM filter which messages to be teleported using the dedicated extrinsic must pass.
Our XCM filter which messages to be reserve-transferred using the dedicated extrinsic must pass.
Means of measuring the weight consumed by an XCM message locally.
Means of inverting a location.
The outer Origin type.
The outer Call type.
The latest supported version that we advertise. Generally just set it to pallet_xcm::CurrentXcmVersion. Read more
The basic call filter to use in Origin. All origins are built with this filter as base, except Root. Read more
Block & extrinsics weights: base values and limits.
The maximum length of a block (in bytes).
The weight of runtime database operations the runtime can invoke.
The Origin type used by dispatchable calls.
The aggregated Call type.
Account index (aka nonce) type. This stores the number of previous transactions associated with a sender account. Read more
The block number type used by the runtime.
The output of the Hashing function.
The hashing system (algorithm) being used in the runtime (e.g. Blake2).
The user account identifier type for the runtime.
Converting trait to take a source type and convert to AccountId. Read more
The block header.
The aggregated event type of the runtime.
Maximum number of block number to block hash mappings to keep (oldest pruned first).
Get the chain’s current version.
Provides information about the pallet setup in the runtime. Read more
Data to be associated with an account (other than nonce/transaction counter, which this pallet does regardless). Read more
Handler for when a new account has just been created.
A function that is invoked when an account has been determined to be dead. Read more
The designated SS58 prefix of this chain. Read more
What to do if the runtime wants to change the code to something new. Read more
The maximum number of consumers allowed on a single account.
The amount of time, in slots, that each epoch should last. NOTE: Currently it is not possible to change the epoch duration after the chain has started. Attempting to do so will brick block production. Read more
The expected average block time at which BABE should be creating blocks. Since BABE is probabilistic it is not trivial to figure out what the expected average block time should be based on the slot duration and the security parameter c (where 1 - c represents the probability of a slot being empty). Read more
BABE requires some logic to be triggered on every block to query for whether an epoch has ended and to perform the transition to the next epoch. Read more
A way to check whether a given validator is disabled and should not be authoring blocks. Blocks authored by a disabled validator will lead to a panic as part of this module’s initialization. Read more
A system for proving ownership of keys, i.e. that a given key was part of a validator set, needed for validating equivocation reports. Read more
The proof of key ownership, used for validating equivocation reports. The proof must include the session index and validator count of the session at which the equivocation occurred. Read more
The identification of a key owner, used when reporting equivocations.
The equivocation handling subsystem, defines methods to report an offence (after the equivocation has been validated) and for submitting a transaction to report an equivocation (from an offchain context). NOTE: when enabling equivocation handling (i.e. this type isn’t set to ()) you must use this pallet’s ValidateUnsigned in the runtime definition. Read more
Max number of authorities allowed
Type used for storing an account’s index; implies the maximum number of accounts the system can hold. Read more
The currency trait.
The deposit needed for reserving an index.
The overarching event type.
Weight information for extrinsics in this pallet.
The event type of this module.
The function call.
A system for proving ownership of keys, i.e. that a given key was part of a validator set, needed for validating equivocation reports. Read more
The proof of key ownership, used for validating equivocation reports The proof must include the session index and validator count of the session at which the equivocation occurred. Read more
The identification of a key owner, used when reporting equivocations.
The equivocation handling subsystem, defines methods to report an offence (after the equivocation has been validated) and for submitting a transaction to report an equivocation (from an offchain context). NOTE: when enabling equivocation handling (i.e. this type isn’t set to ()) you must use this pallet’s ValidateUnsigned in the runtime definition. Read more
Weights for this pallet.
Max Authorities in use
Find the author of a block.
The number of blocks back we should accept uncles. This means that we will deal with uncle-parents that are UncleGenerations + 1 before now. Read more
A filter for uncles within a block. This is for implementing further constraints on what uncles can be included, other than their ancestry. Read more
An event handler for authored blocks.
Weight information for extrinsics in this pallet.
Weight information for extrinsics in this pallet.
A type for retrieving AccountIds of the validators in the current session. These are stash keys of the validators. It’s used for rewards and slashing. Identification is only needed for slashing. Read more
Full identification of the validator.
A conversion from validator ID to full identification. Read more
The aggregate event.
A place where all received upward messages are funneled.
The factor by which the weight limit it multiplied for the first UMP message to execute with. Read more
Origin which is allowed to execute overweight messages.
Weight information for extrinsics in this pallet.
The outer event type.
An interface for reserving deposits for opening channels. Read more
Something that provides the weight of this pallet.
Weight information for extrinsics in this pallet.
A randomness beacon.
An origin which is allowed to force updates to parachains.
Weight information for extrinsics in this pallet.
The overarching event type.
Origin for assigning slots.
The type representing the leasing system.
The number of lease periods a permanent parachain slot lasts.
The number of lease periods a temporary parachain slot lasts.
The max number of permanent slots that can be assigned.
The max number of temporary slots that can be assigned.
The max number of temporary slots to be scheduled per lease periods.
The overarching event type.
The aggregated origin type must support the parachains origin. We require that we can infallibly convert between this origin and the system origin, but in reality, they’re the same type, we just can’t express that to the Rust type system without writing a where clause everywhere. Read more
The system’s currency for parathread payment.
Runtime hook for when a parachain and parathread swap.
The deposit to be paid to run a parathread. This should include the cost for storing the genesis head and validation code. Read more
The deposit to be paid per byte stored on chain.
Weight Information for the Extrinsics in the Pallet
Authority identifier type
The maximum number of authorities that can be added.
A hook to act on the new BEEFY validator set. Read more
Weight information for extrinsics in this pallet.
Current leaf version. Read more
Convert BEEFY AuthorityId to a form that would end up in the Merkle Tree. Read more
The type expected for the leaf extra data
Retrieve arbitrary data that should be added to the mmr leaf
The overarching event type.
The type representing the leasing system.
The parachain registrar type.
The number of blocks over which an auction may be retroactively ended.
The length of each sample to take during the ending period. Read more
Something that provides randomness in the runtime.
The origin which may initiate auctions.
Weight Information for the Extrinsics in the Pallet
The overarching event type.
The currency type used for bidding.
The parachain registrar type.
The number of blocks over which a single period lasts.
The number of blocks to offset each lease period by.
The origin which may forcibly create or clear leases. Root can always do this.
Weight Information for the Extrinsics in the Pallet
PalletId for the crowdloan pallet. An appropriate value could be PalletId(*b"py/cfund")
The amount to be held on deposit by the depositor of a crowdloan.
The minimum amount that may be contributed into a crowdloan. Should almost certainly be at least ExistentialDeposit. Read more
Max number of storage keys to remove per extrinsic call.
The parachain registrar type. We just use this to ensure that only the manager of a para is able to start a crowdloan for its slot. Read more
The type representing the auctioning system.
The maximum length for the memo attached to a crowdloan contribution.
Weight Information for the Extrinsics in the Pallet
The overarching event type.
A sudo-able call.
The overarching event type.
The overarching call type.
The caller origin, overarching type of all pallets origins.
Weight information for extrinsics in this pallet.
The overarching event type.
The overarching call type.
The currency mechanism.
A kind of proxy; specified with the proxy and passed in to the IsProxyable fitler. The instance filter determines whether a given call may be proxied under this type. Read more
The base amount of currency needed to reserve for creating a proxy. Read more
The amount of currency needed per proxy added. Read more
The maximum amount of proxies allowed for a single account.
Weight information for extrinsics in this pallet.
The maximum amount of time-delayed announcements that are allowed to be pending.
The type of hash used for hashing the call.
The base amount of currency needed to reserve for creating an announcement. Read more
The amount of currency needed per announcement made. Read more
The overarching event type.
The overarching call type.
The currency mechanism.
The base amount of currency needed to reserve for creating a multisig execution or to store a dispatch call for later. Read more
The amount of currency needed per unit threshold when creating a multisig execution. Read more
The maximum amount of signatories allowed in the multisig.
Weight information for extrinsics in this pallet.
The identifier type for an authority.
The overarching event type.
A type for retrieving the validators supposed to be online in a session.
A trait that allows us to estimate the current session progress and also the average session length. Read more
A type that gives us the ability to submit unresponsiveness offence reports.
A configuration for base priority of unsigned transactions. Read more
Weight information for extrinsics in this pallet.
The maximum number of keys that can be added.
The maximum number of peers to be stored in ReceivedHeartbeats
The maximum size of the encoding of PeerId and MultiAddr that are coming from the hearbeat Read more
The overarching event type.
Full identification of the validator.
A handler called for every offence report.
The maximum number of authorities that can be added.
Type used for expressing timestamp.
Something which can be notified when the timestamp is set. Set this to () if not needed. Read more
The minimum period between blocks. Beware that this is different to the expected period that the block production apparatus provides. Your chosen consensus system will generally work with this to determine a sensible block time. e.g. For Aura, it will be double this period on default settings. Read more
Weight information for extrinsics in this pallet.
The overarching event type.
Handler for withdrawing, refunding and depositing the transaction fee. Transaction fees are withdrawn before the transaction is executed. After the transaction was executed the transaction weight can be adjusted, depending on the used resources by the transaction. If the transaction weight is lower than expected, parts of the transaction fee might be refunded. In the end the fees can be deposited. Read more
A fee mulitplier for Operational extrinsics to compute “virtual tip” to boost their priority Read more
Convert a weight value into a deductible fee based on the currency type.
Convert a length value into a deductible fee based on the currency type.
Update the multiplier of the next block, based on the previous block’s weight.
The overarching event type.
A stable ID for a validator.
A conversion from account ID to validator ID. Read more
Indicator for when to end the session.
Something that can predict the next session rotation. This should typically come from the same logical unit that provides ShouldEndSession, yet, it gives a best effort estimate. It is helpful to implement EstimateNextNewSession. Read more
Handler for managing new session.
Handler when a session has changed.
The keys.
Weight information for extrinsics in this pallet.
Returns the version of the runtime.
Execute the given block.
Initialize a block with the given header.

Submits a transaction with the node’s public and signature type. Adheres to the signed extension format of the chain.

Attempt to create signed extrinsic data that encodes call from given account. Read more
Formats the value using the given formatter. Read more
Ensure the position of inherent is correct, i.e. they are before non-inherents. Read more
The NodeBlock type.
Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed. Read more
Get current GRANDPA authority set id.
Submits an unsigned extrinsic to report an equivocation. The caller must provide the equivocation proof and a key ownership proof (should be obtained using generate_key_ownership_proof). The extrinsic will be unsigned and should only be accepted for local authorship (not to be broadcast to the network). This method returns None when creation of the extrinsic fails, e.g. if equivocation reporting is disabled for the given runtime (i.e. this method is hardcoded to return None). Only useful in an offchain context. Read more
Generates a proof of key ownership for the given authority in the given set. An example usage of this module is coupled with the session historical module to prove that a given authority key is tied to a given staking identity during a specific session. Proofs of key ownership are necessary for submitting equivocation reports. NOTE: even though the API takes a set_id as parameter the current implementations ignore this parameter and instead rely on this method being called at the correct block height, i.e. any point at which the given set id is live on-chain. Future implementations will instead use indexed data through an offchain worker, not requiring older states to be available. Read more
Returns the metadata of a runtime.
Generate MMR proof for a leaf under given index.
Verify MMR proof against on-chain MMR. Read more
Verify MMR proof against given root hash. Read more
Return the on-chain MMR root hash.
Generate MMR proof for a series of leaves under given indices.
Verify MMR proof against on-chain MMR for a batch of leaves. Read more
Verify MMR proof against given root hash or a batch of leaves. Read more
Starts the off-chain task for given block header.
Get the current validators.
Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on. Note that now in the GroupRotationInfo should be the successor of the number of the block. Read more
Yields information on all availability cores as relevant to the child block. Cores are either free or occupied. Free cores can have paras assigned to them. Read more
Yields the persisted validation data for the given ParaId along with an assumption that should be used if the para currently occupies a core. Read more
Returns the persisted validation data for the given ParaId along with the corresponding validation code hash. Instead of accepting assumption about the para, matches the validation data hash against an expected one and yields None if they’re not equal. Read more
Checks if the given validation outputs pass the acceptance criteria.
Returns the session index expected at a child of the block. Read more
Fetch the validation code used by a para, making the given OccupiedCoreAssumption. Read more
Get the receipt of a candidate pending availability. This returns Some for any paras assigned to occupied cores in availability_cores and None otherwise. Read more
Get a vector of events concerning candidates that occurred within a block.
Get the session info for the given session, if stored. Read more
Get all the pending inbound messages in the downward message queue for a para.
Get the contents of all channels addressed to the given recipient. Channels that have no messages in them are also included. Read more
Get the validation code from its hash.
Scrape dispute relevant from on-chain, backing votes and resolved disputes.
Submits a PVF pre-checking statement into the transaction pool. Read more
Returns code hashes of PVFs that require pre-checking by validators in the active set. Read more
Fetch the hash of the validation code used by a para, making the given OccupiedCoreAssumption. Read more
Returns all onchain disputes. This is a staging method! Do not use on production runtimes! Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Generate a set of session keys with optionally using the given seed. The keys should be stored within the keystore exposed via runtime externalities. Read more
Decode the given public session keys. Read more
A public key that is capable of identifying AccountIds. Read more
A matching Signature type.
Validate the transaction. Read more
Query information of a dispatch class, weight, and fee of a given encoded Call.
Query fee details of a given encoded Call.
The type identifying for which type info is provided. Read more
Returns the static type identifier for Self.
The call to validate
Validate the call right before dispatch. Read more
Return the validity of the call Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Retrieve authority identifiers of the current authority set in canonical ordering.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert from a value of T into an equivalent instance of Option<Self>. Read more
Consume self to return Some equivalent value of Option<T>. Read more
Converts self into T using Into<T>. Read more
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more
Compare self to key and return true if they are equal.
Causes self to use its Binary implementation when Debug-formatted. Read more
Causes self to use its Display implementation when Debug-formatted. Read more
Causes self to use its LowerExp implementation when Debug-formatted. Read more
Causes self to use its LowerHex implementation when Debug-formatted. Read more
Causes self to use its Octal implementation when Debug-formatted. Read more
Causes self to use its Pointer implementation when Debug-formatted. Read more
Causes self to use its UpperExp implementation when Debug-formatted. Read more
Causes self to use its UpperHex implementation when Debug-formatted. Read more
Formats each item in a sequence. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Cast reference.
Cast reference.
Cast mutable reference.
Cast mutable reference.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function. Read more
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
Convert from a value of T into an equivalent instance of Self. Read more
Consume self to return an equivalent value of T. Read more
Performance hack: Clone doesn’t get inlined for Copy types in debug mode, so make it inline anyway.
Tests if Self the same as the type T Read more
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_ref() only in debug builds, and is erased in release builds. Read more
Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_deref() only in debug builds, and is erased in release builds. Read more
Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more