From 17b607b6c3d38a173d95c2ae20dc82882dffa9f5 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 8 Apr 2021 08:35:24 +0300 Subject: [PATCH] Update Rococo session key (& small para type cleanups) (#3378) --- packages/types-known/src/spec/rococo.ts | 11 +- .../src/interfaces/parachains/definitions.ts | 6 +- .../src/interfaces/parachains/rocco.json | 6933 ----------------- .../types/src/interfaces/parachains/types.ts | 6 +- 4 files changed, 15 insertions(+), 6941 deletions(-) delete mode 100644 packages/types/src/interfaces/parachains/rocco.json diff --git a/packages/types-known/src/spec/rococo.ts b/packages/types-known/src/spec/rococo.ts index 8227a4048f..27471631af 100644 --- a/packages/types-known/src/spec/rococo.ts +++ b/packages/types-known/src/spec/rococo.ts @@ -10,7 +10,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { FullIdentification: '()', // No staking, only session (as per config) - Keys: 'SessionKeys6' + Keys: 'SessionKeys7' }; const versioned: OverrideVersionedType[] = [ @@ -31,7 +31,14 @@ const versioned: OverrideVersionedType[] = [ } }, { - minmax: [215, undefined], + minmax: [215, 228], + types: { + ...sharedTypes, + Keys: 'SessionKeys6' + } + }, + { + minmax: [229, undefined], types: { ...sharedTypes } diff --git a/packages/types/src/interfaces/parachains/definitions.ts b/packages/types/src/interfaces/parachains/definitions.ts index 32a3ede085..3fe7e059b7 100644 --- a/packages/types/src/interfaces/parachains/definitions.ts +++ b/packages/types/src/interfaces/parachains/definitions.ts @@ -152,7 +152,7 @@ export default { } }, DisputeStatementSet: { - candidate_hash: 'CandidateHash', + candidateHash: 'CandidateHash', session: 'SessionIndex', statements: 'Vec<(DisputeStatement, ValidatorIndex, ValidatorSignature)>' }, @@ -178,7 +178,7 @@ export default { }, ExplicitDisputeStatement: { valid: 'bool', - candidate_hash: 'CandidateHash', + candidateHash: 'CandidateHash', session: 'SessionIndex' }, DoubleVoteReport: { @@ -269,7 +269,7 @@ export default { }, ParachainsInherentData: { bitfields: 'SignedAvailabilityBitfields', - backed_candidates: 'Vec', + backedCandidates: 'Vec', disputes: 'MultiDisputeStatementSet', parentHeader: 'Header' }, diff --git a/packages/types/src/interfaces/parachains/rocco.json b/packages/types/src/interfaces/parachains/rocco.json deleted file mode 100644 index a5dbe304de..0000000000 --- a/packages/types/src/interfaces/parachains/rocco.json +++ /dev/null @@ -1,6933 +0,0 @@ -{ - magicNumber: 1,635,018,093, - metadata: { - V12: { - modules: [ - { - name: System, - storage: { - prefix: System, - items: [ - { - name: Account, - modifier: Default, - type: { - Map: { - hasher: Blake2_128Concat, - key: AccountId, - value: AccountInfo, - linked: false - } - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - The full account information for a particular account ID. - ] - }, - { - name: ExtrinsicCount, - modifier: Optional, - type: { - Plain: u32 - }, - fallback: 0x00, - documentation: [ - Total extrinsics count for the current block. - ] - }, - { - name: BlockWeight, - modifier: Default, - type: { - Plain: ConsumedWeight - }, - fallback: 0x000000000000000000000000000000000000000000000000, - documentation: [ - The current weight for the block. - ] - }, - { - name: AllExtrinsicsLen, - modifier: Optional, - type: { - Plain: u32 - }, - fallback: 0x00, - documentation: [ - Total length (in bytes) for all extrinsics put together, for the current block. - ] - }, - { - name: BlockHash, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: BlockNumber, - value: Hash, - linked: false - } - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - Map of block numbers to block hashes. - ] - }, - { - name: ExtrinsicData, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: u32, - value: Bytes, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Extrinsics data for the current block (maps an extrinsic's index to its data). - ] - }, - { - name: Number, - modifier: Default, - type: { - Plain: BlockNumber - }, - fallback: 0x00000000, - documentation: [ - The current block number being processed. Set by `execute_block`. - ] - }, - { - name: ParentHash, - modifier: Default, - type: { - Plain: Hash - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - Hash of the previous block. - ] - }, - { - name: Digest, - modifier: Default, - type: { - Plain: DigestOf - }, - fallback: 0x00, - documentation: [ - Digest of the current block, also part of the block header. - ] - }, - { - name: Events, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Events deposited for the current block. - ] - }, - { - name: EventCount, - modifier: Default, - type: { - Plain: EventIndex - }, - fallback: 0x00000000, - documentation: [ - The number of events in the `Events` list. - ] - }, - { - name: EventTopics, - modifier: Default, - type: { - Map: { - hasher: Blake2_128Concat, - key: Hash, - value: Vec<(BlockNumber,EventIndex)>, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Mapping between a topic (represented by T::Hash) and a vector of indexes, - of events in the `>` list., - , - All topic vectors have deterministic storage locations depending on the topic. This, - allows light-clients to leverage the changes trie storage tracking mechanism and, - in case of changes fetch the list of events of interest., - , - The value has the type `(T::BlockNumber, EventIndex)` because if we used only just, - the `EventIndex` then in case if the topic has the same contents on the next block, - no notification will be triggered thus the event might be lost. - ] - }, - { - name: LastRuntimeUpgrade, - modifier: Optional, - type: { - Plain: LastRuntimeUpgradeInfo - }, - fallback: 0x00, - documentation: [ - Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened. - ] - }, - { - name: UpgradedToU32RefCount, - modifier: Default, - type: { - Plain: bool - }, - fallback: 0x00, - documentation: [ - True if we have upgraded so that `type RefCount` is `u32`. False (default) if not. - ] - }, - { - name: UpgradedToTripleRefCount, - modifier: Default, - type: { - Plain: bool - }, - fallback: 0x00, - documentation: [ - True if we have upgraded so that AccountInfo contains three types of `RefCount`. False, - (default) if not. - ] - }, - { - name: ExecutionPhase, - modifier: Optional, - type: { - Plain: Phase - }, - fallback: 0x00, - documentation: [ - The execution phase of the block. - ] - } - ] - }, - calls: [ - { - name: fill_block, - args: [ - { - name: _ratio, - type: Perbill - } - ], - documentation: [ - A dispatch that will fill the block weight up to the given ratio. - ] - }, - { - name: remark, - args: [ - { - name: _remark, - type: Bytes - } - ], - documentation: [ - Make some on-chain remark., - , - # , - - `O(1)`, - # - ] - }, - { - name: set_heap_pages, - args: [ - { - name: pages, - type: u64 - } - ], - documentation: [ - Set the number of pages in the WebAssembly environment's heap., - , - # , - - `O(1)`, - - 1 storage write., - - Base Weight: 1.405 µs, - - 1 write to HEAP_PAGES, - # - ] - }, - { - name: set_code, - args: [ - { - name: code, - type: Bytes - } - ], - documentation: [ - Set the new runtime code., - , - # , - - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`, - - 1 storage write (codec `O(C)`)., - - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive)., - - 1 event., - The weight of this function is dependent on the runtime, but generally this is very expensive., - We will treat this as a full block., - # - ] - }, - { - name: set_code_without_checks, - args: [ - { - name: code, - type: Bytes - } - ], - documentation: [ - Set the new runtime code without doing any checks of the given `code`., - , - # , - - `O(C)` where `C` length of `code`, - - 1 storage write (codec `O(C)`)., - - 1 event., - The weight of this function is dependent on the runtime. We will treat this as a full block., - # - ] - }, - { - name: set_changes_trie_config, - args: [ - { - name: changes_trie_config, - type: Option - } - ], - documentation: [ - Set the new changes trie configuration., - , - # , - - `O(1)`, - - 1 storage write or delete (codec `O(1)`)., - - 1 call to `deposit_log`: Uses `append` API, so O(1), - - Base Weight: 7.218 µs, - - DB Weight:, - - Writes: Changes Trie, System Digest, - # - ] - }, - { - name: set_storage, - args: [ - { - name: items, - type: Vec - } - ], - documentation: [ - Set some items of storage., - , - # , - - `O(I)` where `I` length of `items`, - - `I` storage writes (`O(1)`)., - - Base Weight: 0.568 * i µs, - - Writes: Number of items, - # - ] - }, - { - name: kill_storage, - args: [ - { - name: keys, - type: Vec - } - ], - documentation: [ - Kill some items from storage., - , - # , - - `O(IK)` where `I` length of `keys` and `K` length of one key, - - `I` storage deletions., - - Base Weight: .378 * i µs, - - Writes: Number of items, - # - ] - }, - { - name: kill_prefix, - args: [ - { - name: prefix, - type: Key - }, - { - name: _subkeys, - type: u32 - } - ], - documentation: [ - Kill all storage items with a key that starts with the given prefix., - , - **NOTE:** We rely on the Root origin to provide us the number of subkeys under, - the prefix we are removing to accurately calculate the weight of this function., - , - # , - - `O(P)` where `P` amount of keys with prefix `prefix`, - - `P` storage deletions., - - Base Weight: 0.834 * P µs, - - Writes: Number of subkeys + 1, - # - ] - }, - { - name: remark_with_event, - args: [ - { - name: remark, - type: Bytes - } - ], - documentation: [ - Make some on-chain remark and emit event., - , - # , - - `O(b)` where b is the length of the remark., - - 1 event., - # - ] - } - ], - events: [ - { - name: ExtrinsicSuccess, - args: [ - DispatchInfo - ], - documentation: [ - An extrinsic completed successfully. [info] - ] - }, - { - name: ExtrinsicFailed, - args: [ - DispatchError, - DispatchInfo - ], - documentation: [ - An extrinsic failed. [error, info] - ] - }, - { - name: CodeUpdated, - args: [], - documentation: [ - `:code` was updated. - ] - }, - { - name: NewAccount, - args: [ - AccountId - ], - documentation: [ - A new [account] was created. - ] - }, - { - name: KilledAccount, - args: [ - AccountId - ], - documentation: [ - An [account] was reaped. - ] - }, - { - name: Remarked, - args: [ - AccountId, - Hash - ], - documentation: [ - On on-chain remark happened. [origin, remark_hash] - ] - } - ], - constants: [ - { - name: BlockWeights, - type: BlockWeights, - value: 0x00f2052a0100000000204aa9d1010000405973070000000001c0766c8f58010000010098f73e5d010000010000000000000000405973070000000001c0febef9cc0100000100204aa9d1010000010088526a740000004059730700000000000000, - documentation: [ - Block & extrinsics weights: base values and limits. - ] - }, - { - name: BlockLength, - type: BlockLength, - value: 0x00003c000000500000005000, - documentation: [ - The maximum length of a block (in bytes). - ] - }, - { - name: BlockHashCount, - type: BlockNumber, - value: 0x60090000, - documentation: [ - Maximum number of block number to block hash mappings to keep (oldest pruned first). - ] - }, - { - name: DbWeight, - type: RuntimeDbWeight, - value: 0x40787d010000000000e1f50500000000, - documentation: [ - The weight of runtime database operations the runtime can invoke. - ] - }, - { - name: Version, - type: RuntimeVersion, - value: 0x18726f636f636f487061726974792d726f636f636f2d76312e3200000000e50000000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a04000000d2bc9897eed08f1502000000f78b278be53f454c02000000af2c0297a23e6d3d01000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000000000000, - documentation: [ - Get the chain's current version. - ] - }, - { - name: SS58Prefix, - type: u8, - value: *, - documentation: [ - The designated SS85 prefix of this chain., - , - This replaces the ss58Format property declared in the chain spec. Reason is, - that the runtime should know about the prefix in order to make use of it as, - an identifier of the chain. - ] - } - ], - errors: [ - { - name: InvalidSpecName, - documentation: [ - The name of specification does not match between the current runtime, - and the new runtime. - ] - }, - { - name: SpecVersionNeedsToIncrease, - documentation: [ - The specification version is not allowed to decrease between the current runtime, - and the new runtime. - ] - }, - { - name: FailedToExtractRuntimeVersion, - documentation: [ - Failed to extract the runtime version from the new runtime., - , - Either calling `Core_version` or decoding `RuntimeVersion` failed. - ] - }, - { - name: NonDefaultComposite, - documentation: [ - Suicide called when the account has non-default composite data. - ] - }, - { - name: NonZeroRefCount, - documentation: [ - There is a non-zero reference count preventing the account from being purged. - ] - } - ], - index: 0 - }, - { - name: Babe, - storage: { - prefix: Babe, - items: [ - { - name: EpochIndex, - modifier: Default, - type: { - Plain: u64 - }, - fallback: 0x0000000000000000, - documentation: [ - Current epoch index. - ] - }, - { - name: Authorities, - modifier: Default, - type: { - Plain: Vec<(AuthorityId,BabeAuthorityWeight)> - }, - fallback: 0x00, - documentation: [ - Current epoch authorities. - ] - }, - { - name: GenesisSlot, - modifier: Default, - type: { - Plain: Slot - }, - fallback: 0x0000000000000000, - documentation: [ - The slot at which the first epoch actually started. This is 0, - until the first block of the chain. - ] - }, - { - name: CurrentSlot, - modifier: Default, - type: { - Plain: Slot - }, - fallback: 0x0000000000000000, - documentation: [ - Current slot number. - ] - }, - { - name: Randomness, - modifier: Default, - type: { - Plain: Randomness - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - The epoch randomness for the *current* epoch., - , - # Security, - , - This MUST NOT be used for gambling, as it can be influenced by a, - malicious validator in the short term. It MAY be used in many, - cryptographic protocols, however, so long as one remembers that this, - (like everything else on-chain) it is public. For example, it can be, - used where a number is needed that cannot have been chosen by an, - adversary, for purposes such as public-coin zero-knowledge proofs. - ] - }, - { - name: PendingEpochConfigChange, - modifier: Optional, - type: { - Plain: NextConfigDescriptor - }, - fallback: 0x00, - documentation: [ - Pending epoch configuration change that will be applied when the next epoch is enacted. - ] - }, - { - name: NextRandomness, - modifier: Default, - type: { - Plain: Randomness - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - Next epoch randomness. - ] - }, - { - name: NextAuthorities, - modifier: Default, - type: { - Plain: Vec<(AuthorityId,BabeAuthorityWeight)> - }, - fallback: 0x00, - documentation: [ - Next epoch authorities. - ] - }, - { - name: SegmentIndex, - modifier: Default, - type: { - Plain: u32 - }, - fallback: 0x00000000, - documentation: [ - Randomness under construction., - , - We make a tradeoff between storage accesses and list length., - We store the under-construction randomness in segments of up to, - `UNDER_CONSTRUCTION_SEGMENT_LENGTH`., - , - Once a segment reaches this length, we begin the next one., - We reset all segments and return to `0` at the beginning of every, - epoch. - ] - }, - { - name: UnderConstruction, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: u32, - value: Vec, - linked: false - } - }, - fallback: 0x00, - documentation: [ - TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay. - ] - }, - { - name: Initialized, - modifier: Optional, - type: { - Plain: MaybeRandomness - }, - fallback: 0x00, - documentation: [ - Temporary value (cleared at block finalization) which is `Some`, - if per-block initialization has already been called for current block. - ] - }, - { - name: AuthorVrfRandomness, - modifier: Default, - type: { - Plain: MaybeRandomness - }, - fallback: 0x00, - documentation: [ - Temporary value (cleared at block finalization) that includes the VRF output generated, - at this block. This field should always be populated during block processing unless, - secondary plain slots are enabled (which don't contain a VRF output). - ] - }, - { - name: EpochStart, - modifier: Default, - type: { - Plain: (BlockNumber,BlockNumber) - }, - fallback: 0x0000000000000000, - documentation: [ - The block numbers when the last and current epoch have started, respectively `N-1` and, - `N`., - NOTE: We track this is in order to annotate the block number when a given pool of, - entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in, - slots, which may be skipped, the block numbers may not line up with the slot numbers. - ] - }, - { - name: Lateness, - modifier: Default, - type: { - Plain: BlockNumber - }, - fallback: 0x00000000, - documentation: [ - How late the current block is compared to its parent., - , - This entry is populated as part of block execution and is cleaned up, - on block finalization. Querying this storage entry outside of block, - execution context should always yield zero. - ] - }, - { - name: EpochConfig, - modifier: Optional, - type: { - Plain: BabeEpochConfiguration - }, - fallback: 0x00, - documentation: [ - The configuration for the current epoch. Should never be `None` as it is initialized in genesis. - ] - }, - { - name: NextEpochConfig, - modifier: Optional, - type: { - Plain: BabeEpochConfiguration - }, - fallback: 0x00, - documentation: [ - The configuration for the next epoch, `None` if the config will not change, - (you can fallback to `EpochConfig` instead in that case). - ] - } - ] - }, - calls: [ - { - name: report_equivocation, - args: [ - { - name: equivocation_proof, - type: EquivocationProof - }, - { - name: key_owner_proof, - type: KeyOwnerProof - } - ], - documentation: [ - Report authority equivocation/misbehavior. This method will verify, - the equivocation proof and validate the given key ownership proof, - against the extracted offender. If both are valid, the offence will, - be reported. - ] - }, - { - name: report_equivocation_unsigned, - args: [ - { - name: equivocation_proof, - type: EquivocationProof - }, - { - name: key_owner_proof, - type: KeyOwnerProof - } - ], - documentation: [ - Report authority equivocation/misbehavior. This method will verify, - the equivocation proof and validate the given key ownership proof, - against the extracted offender. If both are valid, the offence will, - be reported., - This extrinsic must be called unsigned and it is expected that only, - block authors will call it (validated in `ValidateUnsigned`), as such, - if the block author is defined it will be defined as the equivocation, - reporter. - ] - }, - { - name: plan_config_change, - args: [ - { - name: config, - type: NextConfigDescriptor - } - ], - documentation: [ - Plan an epoch config change. The epoch config change is recorded and will be enacted on, - the next call to `enact_epoch_change`. The config will be activated one epoch after., - Multiple calls to this method will replace any existing planned config change that had, - not been enacted yet. - ] - } - ], - events: null, - constants: [ - { - name: EpochDuration, - type: u64, - value: 0x2c01000000000000, - documentation: [ - 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. - ] - }, - { - name: ExpectedBlockTime, - type: Moment, - value: 0x7017000000000000, - documentation: [ - 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). - ] - } - ], - errors: [ - { - name: InvalidEquivocationProof, - documentation: [ - An equivocation proof provided as part of an equivocation report is invalid. - ] - }, - { - name: InvalidKeyOwnershipProof, - documentation: [ - A key ownership proof provided as part of an equivocation report is invalid. - ] - }, - { - name: DuplicateOffenceReport, - documentation: [ - A given equivocation report is valid but already previously reported. - ] - } - ], - index: 1 - }, - { - name: Timestamp, - storage: { - prefix: Timestamp, - items: [ - { - name: Now, - modifier: Default, - type: { - Plain: Moment - }, - fallback: 0x0000000000000000, - documentation: [ - Current time for the current block. - ] - }, - { - name: DidUpdate, - modifier: Default, - type: { - Plain: bool - }, - fallback: 0x00, - documentation: [ - Did the timestamp get updated in this block? - ] - } - ] - }, - calls: [ - { - name: set, - args: [ - { - name: now, - type: Compact - } - ], - documentation: [ - Set the current time., - , - This call should be invoked exactly once per block. It will panic at the finalization, - phase, if this call hasn't been invoked by that time., - , - The timestamp should be greater than the previous one by the amount specified by, - `MinimumPeriod`., - , - The dispatch origin for this call must be `Inherent`., - , - # , - - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`), - - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`), - - 1 event handler `on_timestamp_set`. Must be `O(1)`., - # - ] - } - ], - events: null, - constants: [ - { - name: MinimumPeriod, - type: Moment, - value: 0xb80b000000000000, - documentation: [ - 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. - ] - } - ], - errors: [], - index: 2 - }, - { - name: Indices, - storage: { - prefix: Indices, - items: [ - { - name: Accounts, - modifier: Optional, - type: { - Map: { - hasher: Blake2_128Concat, - key: AccountIndex, - value: (AccountId,BalanceOf,bool), - linked: false - } - }, - fallback: 0x00, - documentation: [ - The lookup from index to account. - ] - } - ] - }, - calls: [ - { - name: claim, - args: [ - { - name: index, - type: AccountIndex - } - ], - documentation: [ - Assign an previously unassigned index., - , - Payment: `Deposit` is reserved from the sender account., - , - The dispatch origin for this call must be _Signed_., - , - - `index`: the index to be claimed. This must not be in use., - , - Emits `IndexAssigned` if successful., - , - # , - - `O(1)`., - - One storage mutation (codec `O(1)`)., - - One reserve operation., - - One event., - -------------------, - - DB Weight: 1 Read/Write (Accounts), - # - ] - }, - { - name: transfer, - args: [ - { - name: new, - type: AccountId - }, - { - name: index, - type: AccountIndex - } - ], - documentation: [ - Assign an index already owned by the sender to another account. The balance reservation, - is effectively transferred to the new account., - , - The dispatch origin for this call must be _Signed_., - , - - `index`: the index to be re-assigned. This must be owned by the sender., - - `new`: the new owner of the index. This function is a no-op if it is equal to sender., - , - Emits `IndexAssigned` if successful., - , - # , - - `O(1)`., - - One storage mutation (codec `O(1)`)., - - One transfer operation., - - One event., - -------------------, - - DB Weight:, - - Reads: Indices Accounts, System Account (recipient), - - Writes: Indices Accounts, System Account (recipient), - # - ] - }, - { - name: free, - args: [ - { - name: index, - type: AccountIndex - } - ], - documentation: [ - Free up an index owned by the sender., - , - Payment: Any previous deposit placed for the index is unreserved in the sender account., - , - The dispatch origin for this call must be _Signed_ and the sender must own the index., - , - - `index`: the index to be freed. This must be owned by the sender., - , - Emits `IndexFreed` if successful., - , - # , - - `O(1)`., - - One storage mutation (codec `O(1)`)., - - One reserve operation., - - One event., - -------------------, - - DB Weight: 1 Read/Write (Accounts), - # - ] - }, - { - name: force_transfer, - args: [ - { - name: new, - type: AccountId - }, - { - name: index, - type: AccountIndex - }, - { - name: freeze, - type: bool - } - ], - documentation: [ - Force an index to an account. This doesn't require a deposit. If the index is already, - held, then any deposit is reimbursed to its current owner., - , - The dispatch origin for this call must be _Root_., - , - - `index`: the index to be (re-)assigned., - - `new`: the new owner of the index. This function is a no-op if it is equal to sender., - - `freeze`: if set to `true`, will freeze the index so it cannot be transferred., - , - Emits `IndexAssigned` if successful., - , - # , - - `O(1)`., - - One storage mutation (codec `O(1)`)., - - Up to one reserve operation., - - One event., - -------------------, - - DB Weight:, - - Reads: Indices Accounts, System Account (original owner), - - Writes: Indices Accounts, System Account (original owner), - # - ] - }, - { - name: freeze, - args: [ - { - name: index, - type: AccountIndex - } - ], - documentation: [ - Freeze an index so it will always point to the sender account. This consumes the deposit., - , - The dispatch origin for this call must be _Signed_ and the signing account must have a, - non-frozen account `index`., - , - - `index`: the index to be frozen in place., - , - Emits `IndexFrozen` if successful., - , - # , - - `O(1)`., - - One storage mutation (codec `O(1)`)., - - Up to one slash operation., - - One event., - -------------------, - - DB Weight: 1 Read/Write (Accounts), - # - ] - } - ], - events: [ - { - name: IndexAssigned, - args: [ - AccountId, - AccountIndex - ], - documentation: [ - A account index was assigned. [index, who] - ] - }, - { - name: IndexFreed, - args: [ - AccountIndex - ], - documentation: [ - A account index has been freed up (unassigned). [index] - ] - }, - { - name: IndexFrozen, - args: [ - AccountIndex, - AccountId - ], - documentation: [ - A account index has been frozen to its current account ID. [index, who] - ] - } - ], - constants: [ - { - name: Deposit, - type: BalanceOf, - value: 0x0010a5d4e80000000000000000000000, - documentation: [ - The deposit needed for reserving an index. - ] - } - ], - errors: [ - { - name: NotAssigned, - documentation: [ - The index was not already assigned. - ] - }, - { - name: NotOwner, - documentation: [ - The index is assigned to another account. - ] - }, - { - name: InUse, - documentation: [ - The index was not available. - ] - }, - { - name: NotTransfer, - documentation: [ - The source and destination accounts are identical. - ] - }, - { - name: Permanent, - documentation: [ - The index is permanent and may not be freed/changed. - ] - } - ], - index: 3 - }, - { - name: Balances, - storage: { - prefix: Balances, - items: [ - { - name: TotalIssuance, - modifier: Default, - type: { - Plain: Balance - }, - fallback: 0x00000000000000000000000000000000, - documentation: [ - The total units issued in the system. - ] - }, - { - name: Account, - modifier: Default, - type: { - Map: { - hasher: Blake2_128Concat, - key: AccountId, - value: AccountData, - linked: false - } - }, - fallback: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - The balance of an account., - , - NOTE: This is only used in the case that this pallet is used to store balances. - ] - }, - { - name: Locks, - modifier: Default, - type: { - Map: { - hasher: Blake2_128Concat, - key: AccountId, - value: Vec, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Any liquidity locks on some account balances., - NOTE: Should only be accessed when setting, changing and freeing a lock. - ] - }, - { - name: StorageVersion, - modifier: Default, - type: { - Plain: Releases - }, - fallback: 0x00, - documentation: [ - Storage version of the pallet., - , - This is set to v2.0.0 for new networks. - ] - } - ] - }, - calls: [ - { - name: transfer, - args: [ - { - name: dest, - type: LookupSource - }, - { - name: value, - type: Compact - } - ], - documentation: [ - Transfer some liquid free balance to another account., - , - `transfer` will set the `FreeBalance` of the sender and receiver., - It will decrease the total issuance of the system by the `TransferFee`., - If the sender's account is below the existential deposit as a result, - of the transfer, the account will be reaped., - , - The dispatch origin for this call must be `Signed` by the transactor., - , - # , - - Dependent on arguments but not critical, given proper implementations for, - input config types. See related functions below., - - It contains a limited number of reads and writes internally and no complex computation., - , - Related functions:, - , - - `ensure_can_withdraw` is always called internally but has a bounded complexity., - - Transferring balances to accounts that did not exist before will cause, - `T::OnNewAccount::on_new_account` to be called., - - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`., - - `transfer_keep_alive` works the same way as `transfer`, but has an additional, - check that the transfer will not kill the origin account., - ---------------------------------, - - Base Weight: 73.64 µs, worst case scenario (account created, account removed), - - DB Weight: 1 Read and 1 Write to destination account, - - Origin account is already in memory, so no DB operations for them., - # - ] - }, - { - name: set_balance, - args: [ - { - name: who, - type: LookupSource - }, - { - name: new_free, - type: Compact - }, - { - name: new_reserved, - type: Compact - } - ], - documentation: [ - Set the balances of a given account., - , - This will alter `FreeBalance` and `ReservedBalance` in storage. it will, - also decrease the total issuance of the system (`TotalIssuance`)., - If the new free or reserved balance is below the existential deposit,, - it will reset the account nonce (`frame_system::AccountNonce`)., - , - The dispatch origin for this call is `root`., - , - # , - - Independent of the arguments., - - Contains a limited number of reads and writes., - ---------------------, - - Base Weight:, - - Creating: 27.56 µs, - - Killing: 35.11 µs, - - DB Weight: 1 Read, 1 Write to `who`, - # - ] - }, - { - name: force_transfer, - args: [ - { - name: source, - type: LookupSource - }, - { - name: dest, - type: LookupSource - }, - { - name: value, - type: Compact - } - ], - documentation: [ - Exactly as `transfer`, except the origin must be root and the source account may be, - specified., - # , - - Same as transfer, but additional read and write because the source account is, - not assumed to be in the overlay., - # - ] - }, - { - name: transfer_keep_alive, - args: [ - { - name: dest, - type: LookupSource - }, - { - name: value, - type: Compact - } - ], - documentation: [ - Same as the [`transfer`] call, but with a check that the transfer will not kill the, - origin account., - , - 99% of the time you want [`transfer`] instead., - , - [`transfer`]: struct.Pallet.html#method.transfer, - # , - - Cheaper than transfer because account cannot be killed., - - Base Weight: 51.4 µs, - - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already), - # - ] - } - ], - events: [ - { - name: Endowed, - args: [ - AccountId, - Balance - ], - documentation: [ - An account was created with some free balance. [account, free_balance] - ] - }, - { - name: DustLost, - args: [ - AccountId, - Balance - ], - documentation: [ - An account was removed whose balance was non-zero but below ExistentialDeposit,, - resulting in an outright loss. [account, balance] - ] - }, - { - name: Transfer, - args: [ - AccountId, - AccountId, - Balance - ], - documentation: [ - Transfer succeeded. [from, to, value] - ] - }, - { - name: BalanceSet, - args: [ - AccountId, - Balance, - Balance - ], - documentation: [ - A balance was set by root. [who, free, reserved] - ] - }, - { - name: Deposit, - args: [ - AccountId, - Balance - ], - documentation: [ - Some amount was deposited (e.g. for transaction fees). [who, deposit] - ] - }, - { - name: Reserved, - args: [ - AccountId, - Balance - ], - documentation: [ - Some balance was reserved (moved from free to reserved). [who, value] - ] - }, - { - name: Unreserved, - args: [ - AccountId, - Balance - ], - documentation: [ - Some balance was unreserved (moved from reserved to free). [who, value] - ] - }, - { - name: ReserveRepatriated, - args: [ - AccountId, - AccountId, - Balance, - Status - ], - documentation: [ - Some balance was moved from the reserve of the first account to the second account., - Final argument indicates the destination balance type., - [from, to, balance, destination_status] - ] - } - ], - constants: [ - { - name: ExistentialDeposit, - type: Balance, - value: 0x00e40b54020000000000000000000000, - documentation: [ - The minimum amount required to keep an account open. - ] - } - ], - errors: [ - { - name: VestingBalance, - documentation: [ - Vesting balance too high to send value - ] - }, - { - name: LiquidityRestrictions, - documentation: [ - Account liquidity restrictions prevent withdrawal - ] - }, - { - name: Overflow, - documentation: [ - Got an overflow after adding - ] - }, - { - name: InsufficientBalance, - documentation: [ - Balance too low to send value - ] - }, - { - name: ExistentialDeposit, - documentation: [ - Value too low to create account due to existential deposit - ] - }, - { - name: KeepAlive, - documentation: [ - Transfer/payment would kill account - ] - }, - { - name: ExistingVestingSchedule, - documentation: [ - A vesting schedule already exists for this account - ] - }, - { - name: DeadAccount, - documentation: [ - Beneficiary account must pre-exist - ] - } - ], - index: 4 - }, - { - name: TransactionPayment, - storage: { - prefix: TransactionPayment, - items: [ - { - name: NextFeeMultiplier, - modifier: Default, - type: { - Plain: Multiplier - }, - fallback: 0x000064a7b3b6e00d0000000000000000, - documentation: [] - }, - { - name: StorageVersion, - modifier: Default, - type: { - Plain: Releases - }, - fallback: 0x00, - documentation: [] - } - ] - }, - calls: null, - events: null, - constants: [ - { - name: TransactionByteFee, - type: BalanceOf, - value: 0x00e1f505000000000000000000000000, - documentation: [ - The fee to be paid for making a transaction; the per-byte portion. - ] - }, - { - name: WeightToFee, - type: Vec, - value: 0x0408000000000000000000000000000000000000000001, - documentation: [ - The polynomial that is applied in order to derive fee from weight. - ] - } - ], - errors: [], - index: 5 - }, - { - name: Authorship, - storage: { - prefix: Authorship, - items: [ - { - name: Uncles, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Uncles - ] - }, - { - name: Author, - modifier: Optional, - type: { - Plain: AccountId - }, - fallback: 0x00, - documentation: [ - Author of current block. - ] - }, - { - name: DidSetUncles, - modifier: Default, - type: { - Plain: bool - }, - fallback: 0x00, - documentation: [ - Whether uncles were already set in this block. - ] - } - ] - }, - calls: [ - { - name: set_uncles, - args: [ - { - name: new_uncles, - type: Vec
- } - ], - documentation: [ - Provide a set of uncles. - ] - } - ], - events: null, - constants: [], - errors: [ - { - name: InvalidUncleParent, - documentation: [ - The uncle parent not in the chain. - ] - }, - { - name: UnclesAlreadySet, - documentation: [ - Uncles already set in the block. - ] - }, - { - name: TooManyUncles, - documentation: [ - Too many uncles. - ] - }, - { - name: GenesisUncle, - documentation: [ - The uncle is genesis. - ] - }, - { - name: TooHighUncle, - documentation: [ - The uncle is too high in chain. - ] - }, - { - name: UncleAlreadyIncluded, - documentation: [ - The uncle is already included. - ] - }, - { - name: OldUncle, - documentation: [ - The uncle isn't recent enough to be included. - ] - } - ], - index: 6 - }, - { - name: Offences, - storage: { - prefix: Offences, - items: [ - { - name: Reports, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ReportIdOf, - value: OffenceDetails, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The primary structure that holds all offence records keyed by report identifiers. - ] - }, - { - name: DeferredOffences, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Deferred reports that have been rejected by the offence handler and need to be submitted, - at a later time. - ] - }, - { - name: ConcurrentReportsIndex, - modifier: Default, - type: { - DoubleMap: { - hasher: Twox64Concat, - key1: Kind, - key2: OpaqueTimeSlot, - value: Vec, - key2Hasher: Twox64Concat - } - }, - fallback: 0x00, - documentation: [ - A vector of reports of the same kind that happened at the same time slot. - ] - }, - { - name: ReportsByKindIndex, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: Kind, - value: Bytes, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Enumerates all reports of a kind along with the time they happened., - , - All reports are sorted by the time of offence., - , - Note that the actual type of this mapping is `Vec`, this is because values of, - different types are not supported at the moment so we are doing the manual serialization. - ] - } - ] - }, - calls: [], - events: [ - { - name: Offence, - args: [ - Kind, - OpaqueTimeSlot, - bool - ], - documentation: [ - There is an offence reported of the given `kind` happened at the `session_index` and, - (kind-specific) time slot. This event is not deposited for duplicate slashes. last, - element indicates of the offence was applied (true) or queued (false), - [kind, timeslot, applied]. - ] - } - ], - constants: [], - errors: [], - index: 7 - }, - { - name: Historical, - storage: null, - calls: null, - events: null, - constants: [], - errors: [], - index: 8 - }, - { - name: Session, - storage: { - prefix: Session, - items: [ - { - name: Validators, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - The current set of validators. - ] - }, - { - name: CurrentIndex, - modifier: Default, - type: { - Plain: SessionIndex - }, - fallback: 0x00000000, - documentation: [ - Current index of the session. - ] - }, - { - name: QueuedChanged, - modifier: Default, - type: { - Plain: bool - }, - fallback: 0x00, - documentation: [ - True if the underlying economic identities or weighting behind the validators, - has changed in the queued validator set. - ] - }, - { - name: QueuedKeys, - modifier: Default, - type: { - Plain: Vec<(ValidatorId,Keys)> - }, - fallback: 0x00, - documentation: [ - The queued keys for the next session. When the next session begins, these keys, - will be used to determine the validator's session keys. - ] - }, - { - name: DisabledValidators, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Indices of disabled validators., - , - The set is cleared when `on_session_ending` returns a new set of identities. - ] - }, - { - name: NextKeys, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ValidatorId, - value: Keys, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The next session keys for a validator. - ] - }, - { - name: KeyOwner, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: (KeyTypeId,Bytes), - value: ValidatorId, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The owner of a key. The key is the `KeyTypeId` + the encoded key. - ] - } - ] - }, - calls: [ - { - name: set_keys, - args: [ - { - name: keys, - type: Keys - }, - { - name: proof, - type: Bytes - } - ], - documentation: [ - Sets the session key(s) of the function caller to `keys`., - Allows an account to set its session key prior to becoming a validator., - This doesn't take effect until the next session., - , - The dispatch origin of this function must be signed., - , - # , - - Complexity: `O(1)`, - Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed., - - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`, - - DbWrites: `origin account`, `NextKeys`, - - DbReads per key id: `KeyOwner`, - - DbWrites per key id: `KeyOwner`, - # - ] - }, - { - name: purge_keys, - args: [], - documentation: [ - Removes any session key(s) of the function caller., - This doesn't take effect until the next session., - , - The dispatch origin of this function must be signed., - , - # , - - Complexity: `O(1)` in number of key types., - Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed., - - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`, - - DbWrites: `NextKeys`, `origin account`, - - DbWrites per key id: `KeyOwnder`, - # - ] - } - ], - events: [ - { - name: NewSession, - args: [ - SessionIndex - ], - documentation: [ - New session has happened. Note that the argument is the [session_index], not the block, - number as the type might suggest. - ] - } - ], - constants: [], - errors: [ - { - name: InvalidProof, - documentation: [ - Invalid ownership proof. - ] - }, - { - name: NoAssociatedValidatorId, - documentation: [ - No associated validator ID for account. - ] - }, - { - name: DuplicatedKey, - documentation: [ - Registered duplicate key. - ] - }, - { - name: NoKeys, - documentation: [ - No keys are associated with this account. - ] - }, - { - name: NoAccount, - documentation: [ - Key setting account is not live, so it's impossible to associate keys. - ] - } - ], - index: 9 - }, - { - name: Grandpa, - storage: { - prefix: GrandpaFinality, - items: [ - { - name: State, - modifier: Default, - type: { - Plain: StoredState - }, - fallback: 0x00, - documentation: [ - State of the current authority set. - ] - }, - { - name: PendingChange, - modifier: Optional, - type: { - Plain: StoredPendingChange - }, - fallback: 0x00, - documentation: [ - Pending change: (signaled at, scheduled change). - ] - }, - { - name: NextForced, - modifier: Optional, - type: { - Plain: BlockNumber - }, - fallback: 0x00, - documentation: [ - next block number where we can force a change. - ] - }, - { - name: Stalled, - modifier: Optional, - type: { - Plain: (BlockNumber,BlockNumber) - }, - fallback: 0x00, - documentation: [ - `true` if we are currently stalled. - ] - }, - { - name: CurrentSetId, - modifier: Default, - type: { - Plain: SetId - }, - fallback: 0x0000000000000000, - documentation: [ - The number of changes (both in terms of keys and underlying economic responsibilities), - in the set of Grandpa validators from genesis. - ] - }, - { - name: SetIdSession, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: SetId, - value: SessionIndex, - linked: false - } - }, - fallback: 0x00, - documentation: [ - A mapping from grandpa set ID to the index of the *most recent* session for which its, - members were responsible., - , - TWOX-NOTE: `SetId` is not under user control. - ] - } - ] - }, - calls: [ - { - name: report_equivocation, - args: [ - { - name: equivocation_proof, - type: EquivocationProof - }, - { - name: key_owner_proof, - type: KeyOwnerProof - } - ], - documentation: [ - Report voter equivocation/misbehavior. This method will verify the, - equivocation proof and validate the given key ownership proof, - against the extracted offender. If both are valid, the offence, - will be reported. - ] - }, - { - name: report_equivocation_unsigned, - args: [ - { - name: equivocation_proof, - type: EquivocationProof - }, - { - name: key_owner_proof, - type: KeyOwnerProof - } - ], - documentation: [ - Report voter equivocation/misbehavior. This method will verify the, - equivocation proof and validate the given key ownership proof, - against the extracted offender. If both are valid, the offence, - will be reported., - , - This extrinsic must be called unsigned and it is expected that only, - block authors will call it (validated in `ValidateUnsigned`), as such, - if the block author is defined it will be defined as the equivocation, - reporter. - ] - }, - { - name: note_stalled, - args: [ - { - name: delay, - type: BlockNumber - }, - { - name: best_finalized_block_number, - type: BlockNumber - } - ], - documentation: [ - Note that the current authority set of the GRANDPA finality gadget has, - stalled. This will trigger a forced authority set change at the beginning, - of the next session, to be enacted `delay` blocks after that. The delay, - should be high enough to safely assume that the block signalling the, - forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters, - will start the new authority set using the given finalized block as base., - Only callable by root. - ] - } - ], - events: [ - { - name: NewAuthorities, - args: [ - AuthorityList - ], - documentation: [ - New authority set has been applied. [authority_set] - ] - }, - { - name: Paused, - args: [], - documentation: [ - Current authority set has been paused. - ] - }, - { - name: Resumed, - args: [], - documentation: [ - Current authority set has been resumed. - ] - } - ], - constants: [], - errors: [ - { - name: PauseFailed, - documentation: [ - Attempt to signal GRANDPA pause when the authority set isn't live, - (either paused or already pending pause). - ] - }, - { - name: ResumeFailed, - documentation: [ - Attempt to signal GRANDPA resume when the authority set isn't paused, - (either live or already pending resume). - ] - }, - { - name: ChangePending, - documentation: [ - Attempt to signal GRANDPA change with one already pending. - ] - }, - { - name: TooSoon, - documentation: [ - Cannot signal forced change so soon after last. - ] - }, - { - name: InvalidKeyOwnershipProof, - documentation: [ - A key ownership proof provided as part of an equivocation report is invalid. - ] - }, - { - name: InvalidEquivocationProof, - documentation: [ - An equivocation proof provided as part of an equivocation report is invalid. - ] - }, - { - name: DuplicateOffenceReport, - documentation: [ - A given equivocation report is valid but already previously reported. - ] - } - ], - index: 10 - }, - { - name: ImOnline, - storage: { - prefix: ImOnline, - items: [ - { - name: HeartbeatAfter, - modifier: Default, - type: { - Plain: BlockNumber - }, - fallback: 0x00000000, - documentation: [ - The block number after which it's ok to send heartbeats in the current, - session., - , - At the beginning of each session we set this to a value that should fall, - roughly in the middle of the session duration. The idea is to first wait for, - the validators to produce a block in the current session, so that the, - heartbeat later on will not be necessary., - , - This value will only be used as a fallback if we fail to get a proper session, - progress estimate from `NextSessionRotation`, as those estimates should be, - more accurate then the value we calculate for `HeartbeatAfter`. - ] - }, - { - name: Keys, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - The current set of keys that may issue a heartbeat. - ] - }, - { - name: ReceivedHeartbeats, - modifier: Optional, - type: { - DoubleMap: { - hasher: Twox64Concat, - key1: SessionIndex, - key2: AuthIndex, - value: Bytes, - key2Hasher: Twox64Concat - } - }, - fallback: 0x00, - documentation: [ - For each session index, we keep a mapping of `AuthIndex` to, - `offchain::OpaqueNetworkState`. - ] - }, - { - name: AuthoredBlocks, - modifier: Default, - type: { - DoubleMap: { - hasher: Twox64Concat, - key1: SessionIndex, - key2: ValidatorId, - value: u32, - key2Hasher: Twox64Concat - } - }, - fallback: 0x00000000, - documentation: [ - For each session index, we keep a mapping of `ValidatorId` to the, - number of blocks authored by the given authority. - ] - } - ] - }, - calls: [ - { - name: heartbeat, - args: [ - { - name: heartbeat, - type: Heartbeat - }, - { - name: _signature, - type: Signature - } - ], - documentation: [ - # , - - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len), - and E is length of `heartbeat.network_state.external_address`, - - `O(K)`: decoding of length `K`, - - `O(E)`: decoding/encoding of length `E`, - - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,, - `ReceivedHeartbeats`, - - DbWrites: `ReceivedHeartbeats`, - # - ] - } - ], - events: [ - { - name: HeartbeatReceived, - args: [ - AuthorityId - ], - documentation: [ - A new heartbeat was received from `AuthorityId` [authority_id] - ] - }, - { - name: AllGood, - args: [], - documentation: [ - At the end of the session, no offence was committed. - ] - }, - { - name: SomeOffline, - args: [ - Vec - ], - documentation: [ - At the end of the session, at least one validator was found to be [offline]. - ] - } - ], - constants: [], - errors: [ - { - name: InvalidKey, - documentation: [ - Non existent public key. - ] - }, - { - name: DuplicatedHeartbeat, - documentation: [ - Duplicated heartbeat. - ] - } - ], - index: 11 - }, - { - name: AuthorityDiscovery, - storage: null, - calls: [], - events: null, - constants: [], - errors: [], - index: 12 - }, - { - name: ParachainsOrigin, - storage: null, - calls: null, - events: null, - constants: [], - errors: [], - index: 13 - }, - { - name: ParachainsConfiguration, - storage: { - prefix: Configuration, - items: [ - { - name: ActiveConfig, - modifier: Default, - type: { - Plain: HostConfiguration - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100000001000000000000000000060000006400000002000000c80000000100000000000000000000000000000000000000, - documentation: [ - The active configuration for the current session. - ] - }, - { - name: PendingConfig, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: SessionIndex, - value: HostConfiguration, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Pending configuration (if any) for the next session. - ] - } - ] - }, - calls: [ - { - name: set_validation_upgrade_frequency, - args: [ - { - name: new, - type: BlockNumber - } - ], - documentation: [ - Set the validation upgrade frequency. - ] - }, - { - name: set_validation_upgrade_delay, - args: [ - { - name: new, - type: BlockNumber - } - ], - documentation: [ - Set the validation upgrade delay. - ] - }, - { - name: set_code_retention_period, - args: [ - { - name: new, - type: BlockNumber - } - ], - documentation: [ - Set the acceptance period for an included candidate. - ] - }, - { - name: set_max_code_size, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the max validation code size for incoming upgrades. - ] - }, - { - name: set_max_pov_size, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the max POV block size for incoming upgrades. - ] - }, - { - name: set_max_head_data_size, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the max head data size for paras. - ] - }, - { - name: set_parathread_cores, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the number of parathread execution cores. - ] - }, - { - name: set_parathread_retries, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the number of retries for a particular parathread. - ] - }, - { - name: set_group_rotation_frequency, - args: [ - { - name: new, - type: BlockNumber - } - ], - documentation: [ - Set the parachain validator-group rotation frequency - ] - }, - { - name: set_chain_availability_period, - args: [ - { - name: new, - type: BlockNumber - } - ], - documentation: [ - Set the availability period for parachains. - ] - }, - { - name: set_thread_availability_period, - args: [ - { - name: new, - type: BlockNumber - } - ], - documentation: [ - Set the availability period for parathreads. - ] - }, - { - name: set_scheduling_lookahead, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the scheduling lookahead, in expected number of blocks at peak throughput. - ] - }, - { - name: set_max_validators_per_core, - args: [ - { - name: new, - type: Option - } - ], - documentation: [ - Set the maximum number of validators to assign to any core. - ] - }, - { - name: set_max_validators, - args: [ - { - name: new, - type: Option - } - ], - documentation: [ - Set the maximum number of validators to use in parachain consensus. - ] - }, - { - name: set_dispute_period, - args: [ - { - name: new, - type: SessionIndex - } - ], - documentation: [ - Set the dispute period, in number of sessions to keep for disputes. - ] - }, - { - name: set_dispute_post_conclusion_acceptance_period, - args: [ - { - name: new, - type: BlockNumber - } - ], - documentation: [ - Set the dispute post conclusion acceptance period. - ] - }, - { - name: set_dispute_max_spam_slots, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the maximum number of dispute spam slots. - ] - }, - { - name: set_dispute_conclusion_by_time_out_period, - args: [ - { - name: new, - type: BlockNumber - } - ], - documentation: [ - Set the dispute conclusion by time out period. - ] - }, - { - name: set_no_show_slots, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the no show slots, in number of number of consensus slots., - Must be at least 1. - ] - }, - { - name: set_n_delay_tranches, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the total number of delay tranches. - ] - }, - { - name: set_zeroth_delay_tranche_width, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the zeroth delay tranche width. - ] - }, - { - name: set_needed_approvals, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the number of validators needed to approve a block. - ] - }, - { - name: set_relay_vrf_modulo_samples, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the number of samples to do of the RelayVRFModulo approval assignment criterion. - ] - }, - { - name: set_max_upward_queue_count, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum items that can present in a upward dispatch queue at once. - ] - }, - { - name: set_max_upward_queue_size, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum total size of items that can present in a upward dispatch queue at once. - ] - }, - { - name: set_max_downward_message_size, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Set the critical downward message size. - ] - }, - { - name: set_preferred_dispatchable_upward_messages_step_weight, - args: [ - { - name: new, - type: Weight - } - ], - documentation: [ - Sets the soft limit for the phase of dispatching dispatchable upward messages. - ] - }, - { - name: set_max_upward_message_size, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum size of an upward message that can be sent by a candidate. - ] - }, - { - name: set_max_upward_message_num_per_candidate, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum number of messages that a candidate can contain. - ] - }, - { - name: set_hrmp_open_request_ttl, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the number of sessions after which an HRMP open channel request expires. - ] - }, - { - name: set_hrmp_sender_deposit, - args: [ - { - name: new, - type: Balance - } - ], - documentation: [ - Sets the amount of funds that the sender should provide for opening an HRMP channel. - ] - }, - { - name: set_hrmp_recipient_deposit, - args: [ - { - name: new, - type: Balance - } - ], - documentation: [ - Sets the amount of funds that the recipient should provide for accepting opening an HRMP, - channel. - ] - }, - { - name: set_hrmp_channel_max_capacity, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum number of messages allowed in an HRMP channel at once. - ] - }, - { - name: set_hrmp_channel_max_total_size, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum total size of messages in bytes allowed in an HRMP channel at once. - ] - }, - { - name: set_hrmp_max_parachain_inbound_channels, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum number of inbound HRMP channels a parachain is allowed to accept. - ] - }, - { - name: set_hrmp_max_parathread_inbound_channels, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum number of inbound HRMP channels a parathread is allowed to accept. - ] - }, - { - name: set_hrmp_channel_max_message_size, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum size of a message that could ever be put into an HRMP channel. - ] - }, - { - name: set_hrmp_max_parachain_outbound_channels, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum number of outbound HRMP channels a parachain is allowed to open. - ] - }, - { - name: set_hrmp_max_parathread_outbound_channels, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum number of outbound HRMP channels a parathread is allowed to open. - ] - }, - { - name: set_hrmp_max_message_num_per_candidate, - args: [ - { - name: new, - type: u32 - } - ], - documentation: [ - Sets the maximum number of outbound HRMP messages can be sent by a candidate. - ] - } - ], - events: null, - constants: [], - errors: [ - { - name: InvalidNewValue, - documentation: [ - The new value for a configuration parameter is invalid. - ] - } - ], - index: 14 - }, - { - name: Shared, - storage: { - prefix: ParasShared, - items: [ - { - name: CurrentSessionIndex, - modifier: Default, - type: { - Plain: SessionIndex - }, - fallback: 0x00000000, - documentation: [ - The current session index. - ] - }, - { - name: ActiveValidatorIndices, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - All the validators actively participating in parachain consensus., - Indices are into the broader validator set. - ] - }, - { - name: ActiveValidatorKeys, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - The parachain attestation keys of the validators actively participating in parachain consensus., - This should be the same length as `ActiveValidatorIndices`. - ] - } - ] - }, - calls: [], - events: null, - constants: [], - errors: [], - index: 15 - }, - { - name: Inclusion, - storage: { - prefix: ParaInclusion, - items: [ - { - name: AvailabilityBitfields, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ValidatorIndex, - value: AvailabilityBitfieldRecord, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The latest bitfield for each validator, referred to by their index in the validator set. - ] - }, - { - name: PendingAvailability, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: CandidatePendingAvailability, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Candidates pending availability by `ParaId`. - ] - }, - { - name: PendingAvailabilityCommitments, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: CandidateCommitments, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The commitments of candidates pending availability, by ParaId. - ] - } - ] - }, - calls: [], - events: [ - { - name: CandidateBacked, - args: [ - CandidateReceipt, - HeadData, - CoreIndex, - GroupIndex - ], - documentation: [ - A candidate was backed. [candidate, head_data] - ] - }, - { - name: CandidateIncluded, - args: [ - CandidateReceipt, - HeadData, - CoreIndex, - GroupIndex - ], - documentation: [ - A candidate was included. [candidate, head_data] - ] - }, - { - name: CandidateTimedOut, - args: [ - CandidateReceipt, - HeadData, - CoreIndex - ], - documentation: [ - A candidate timed out. [candidate, head_data] - ] - } - ], - constants: [], - errors: [ - { - name: WrongBitfieldSize, - documentation: [ - Availability bitfield has unexpected size. - ] - }, - { - name: BitfieldDuplicateOrUnordered, - documentation: [ - Multiple bitfields submitted by same validator or validators out of order by index. - ] - }, - { - name: ValidatorIndexOutOfBounds, - documentation: [ - Validator index out of bounds. - ] - }, - { - name: InvalidBitfieldSignature, - documentation: [ - Invalid signature - ] - }, - { - name: UnscheduledCandidate, - documentation: [ - Candidate submitted but para not scheduled. - ] - }, - { - name: CandidateScheduledBeforeParaFree, - documentation: [ - Candidate scheduled despite pending candidate already existing for the para. - ] - }, - { - name: WrongCollator, - documentation: [ - Candidate included with the wrong collator. - ] - }, - { - name: ScheduledOutOfOrder, - documentation: [ - Scheduled cores out of order. - ] - }, - { - name: HeadDataTooLarge, - documentation: [ - Head data exceeds the configured maximum. - ] - }, - { - name: PrematureCodeUpgrade, - documentation: [ - Code upgrade prematurely. - ] - }, - { - name: NewCodeTooLarge, - documentation: [ - Output code is too large - ] - }, - { - name: CandidateNotInParentContext, - documentation: [ - Candidate not in parent context. - ] - }, - { - name: UnoccupiedBitInBitfield, - documentation: [ - The bitfield contains a bit relating to an unassigned availability core. - ] - }, - { - name: InvalidGroupIndex, - documentation: [ - Invalid group index in core assignment. - ] - }, - { - name: InsufficientBacking, - documentation: [ - Insufficient (non-majority) backing. - ] - }, - { - name: InvalidBacking, - documentation: [ - Invalid (bad signature, unknown validator, etc.) backing. - ] - }, - { - name: NotCollatorSigned, - documentation: [ - Collator did not sign PoV. - ] - }, - { - name: ValidationDataHashMismatch, - documentation: [ - The validation data hash does not match expected. - ] - }, - { - name: InternalError, - documentation: [ - Internal error only returned when compiled with debug assertions. - ] - }, - { - name: IncorrectDownwardMessageHandling, - documentation: [ - The downward message queue is not processed correctly. - ] - }, - { - name: InvalidUpwardMessages, - documentation: [ - At least one upward message sent does not pass the acceptance criteria. - ] - }, - { - name: HrmpWatermarkMishandling, - documentation: [ - The candidate didn't follow the rules of HRMP watermark advancement. - ] - }, - { - name: InvalidOutboundHrmp, - documentation: [ - The HRMP messages sent by the candidate is not valid. - ] - }, - { - name: InvalidValidationCodeHash, - documentation: [ - The validation code hash of the candidate is not valid. - ] - } - ], - index: 16 - }, - { - name: ParasInherent, - storage: { - prefix: ParaInherent, - items: [ - { - name: Included, - modifier: Optional, - type: { - Plain: () - }, - fallback: 0x00, - documentation: [ - Whether the paras inherent was included within this block., - , - The `Option<()>` is effectively a bool, but it never hits storage in the `None` variant, - due to the guarantees of FRAME's storage APIs., - , - If this is `None` at the end of the block, we panic and render the block invalid. - ] - } - ] - }, - calls: [ - { - name: enter, - args: [ - { - name: data, - type: ParachainsInherentData - } - ], - documentation: [ - Enter the paras inherent. This will process bitfields and backed candidates. - ] - } - ], - events: null, - constants: [], - errors: [ - { - name: TooManyInclusionInherents, - documentation: [ - Inclusion inherent called more than once per block. - ] - }, - { - name: InvalidParentHeader, - documentation: [ - The hash of the submitted parent header doesn't correspond to the saved block hash of, - the parent. - ] - } - ], - index: 17 - }, - { - name: Scheduler, - storage: { - prefix: ParaScheduler, - items: [ - { - name: ValidatorGroups, - modifier: Default, - type: { - Plain: Vec> - }, - fallback: 0x00, - documentation: [ - All the validator groups. One for each core. Indices are into `ActiveValidators` - not the, - broader set of Polkadot validators, but instead just the subset used for parachains during, - this session., - , - Bound: The number of cores is the sum of the numbers of parachains and parathread multiplexers., - Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k. - ] - }, - { - name: ParathreadQueue, - modifier: Default, - type: { - Plain: ParathreadClaimQueue - }, - fallback: 0x0000000000, - documentation: [ - A queue of upcoming claims and which core they should be mapped onto., - , - The number of queued claims is bounded at the `scheduling_lookahead`, - multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500. - ] - }, - { - name: AvailabilityCores, - modifier: Default, - type: { - Plain: Vec> - }, - fallback: 0x00, - documentation: [ - One entry for each availability core. Entries are `None` if the core is not currently occupied. Can be, - temporarily `Some` if scheduled but not occupied., - The i'th parachain belongs to the i'th core, with the remaining cores all being, - parathread-multiplexers., - , - Bounded by the maximum of either of these two values:, - * The number of parachains and parathread multiplexers, - * The number of validators divided by `configuration.max_validators_per_core`. - ] - }, - { - name: ParathreadClaimIndex, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - An index used to ensure that only one claim on a parathread exists in the queue or is, - currently being handled by an occupied core., - , - Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500. - ] - }, - { - name: SessionStartBlock, - modifier: Default, - type: { - Plain: BlockNumber - }, - fallback: 0x00000000, - documentation: [ - The block number where the session start occurred. Used to track how many group rotations have occurred., - , - Note that in the context of parachains modules the session change is signalled during, - the block and enacted at the end of the block (at the finalization stage, to be exact)., - Thus for all intents and purposes the effect of the session change is observed at the, - block following the session change, block number of which we save in this storage value. - ] - }, - { - name: Scheduled, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Currently scheduled cores - free but up to be occupied., - , - Bounded by the number of cores: one for each parachain and parathread multiplexer., - , - The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/, - for the upcoming block. - ] - } - ] - }, - calls: [], - events: null, - constants: [], - errors: [], - index: 18 - }, - { - name: Paras, - storage: { - prefix: Paras, - items: [ - { - name: Parachains, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - All parachains. Ordered ascending by ParaId. Parathreads are not included. - ] - }, - { - name: ParaLifecycles, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: ParaLifecycle, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The current lifecycle of a all known Para IDs. - ] - }, - { - name: Heads, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: HeadData, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The head-data of every registered para. - ] - }, - { - name: CurrentCodeHash, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Hash, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The validation code hash of every live para., - , - Corresponding code can be retrieved with [`CodeByHash`]. - ] - }, - { - name: PastCodeHash, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: (ParaId,BlockNumber), - value: Hash, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Actual past code hash, indicated by the para id as well as the block number at which it, - became outdated., - , - Corresponding code can be retrieved with [`CodeByHash`]. - ] - }, - { - name: PastCodeMeta, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: ParaPastCodeMeta, - linked: false - } - }, - fallback: 0x0000, - documentation: [ - Past code of parachains. The parachains themselves may not be registered anymore,, - but we also keep their code on-chain for the same amount of time as outdated code, - to keep it available for secondary checkers. - ] - }, - { - name: PastCodePruning, - modifier: Default, - type: { - Plain: Vec<(ParaId,BlockNumber)> - }, - fallback: 0x00, - documentation: [ - Which paras have past code that needs pruning and the relay-chain block at which the code was replaced., - Note that this is the actual height of the included block, not the expected height at which the, - code upgrade would be applied, although they may be equal., - This is to ensure the entire acceptance period is covered, not an offset acceptance period starting, - from the time at which the parachain perceives a code upgrade as having occurred., - Multiple entries for a single para are permitted. Ordered ascending by block number. - ] - }, - { - name: FutureCodeUpgrades, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: BlockNumber, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The block number at which the planned code change is expected for a para., - The change will be applied after the first parablock for this ID included which executes, - in the context of a relay chain block with a number >= `expected_at`. - ] - }, - { - name: FutureCodeHash, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Hash, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The actual future code hash of a para., - , - Corresponding code can be retrieved with [`CodeByHash`]. - ] - }, - { - name: ActionsQueue, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: SessionIndex, - value: Vec, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The actions to perform during the start of a specific session index. - ] - }, - { - name: UpcomingParasGenesis, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: ParaGenesisArgs, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Upcoming paras instantiation arguments. - ] - }, - { - name: CodeByHashRefs, - modifier: Default, - type: { - Map: { - hasher: Identity, - key: Hash, - value: u32, - linked: false - } - }, - fallback: 0x00000000, - documentation: [ - The number of reference on the validation code in [`CodeByHash`] storage. - ] - }, - { - name: CodeByHash, - modifier: Optional, - type: { - Map: { - hasher: Identity, - key: Hash, - value: ValidationCode, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Validation code stored by its hash., - , - This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and, - [`PastCodeHash`]. - ] - } - ] - }, - calls: [ - { - name: force_set_current_code, - args: [ - { - name: para, - type: ParaId - }, - { - name: new_code, - type: ValidationCode - } - ], - documentation: [ - Set the storage for the parachain validation code immediately. - ] - }, - { - name: force_set_current_head, - args: [ - { - name: para, - type: ParaId - }, - { - name: new_head, - type: HeadData - } - ], - documentation: [ - Set the storage for the current parachain head data immediately. - ] - }, - { - name: force_schedule_code_upgrade, - args: [ - { - name: para, - type: ParaId - }, - { - name: new_code, - type: ValidationCode - }, - { - name: expected_at, - type: BlockNumber - } - ], - documentation: [ - Schedule a code upgrade for block `expected_at`. - ] - }, - { - name: force_note_new_head, - args: [ - { - name: para, - type: ParaId - }, - { - name: new_head, - type: HeadData - } - ], - documentation: [ - Note a new block head for para within the context of the current block. - ] - }, - { - name: force_queue_action, - args: [ - { - name: para, - type: ParaId - } - ], - documentation: [ - Put a parachain directly into the next session's action queue., - We can't queue it any sooner than this without going into the, - initializer... - ] - } - ], - events: [ - { - name: CurrentCodeUpdated, - args: [ - ParaId - ], - documentation: [ - Current code has been updated for a Para. [para_id] - ] - }, - { - name: CurrentHeadUpdated, - args: [ - ParaId - ], - documentation: [ - Current head has been updated for a Para. [para_id] - ] - }, - { - name: CodeUpgradeScheduled, - args: [ - ParaId - ], - documentation: [ - A code upgrade has been scheduled for a Para. [para_id] - ] - }, - { - name: NewHeadNoted, - args: [ - ParaId - ], - documentation: [ - A new head has been noted for a Para. [para_id] - ] - }, - { - name: ActionQueued, - args: [ - ParaId, - SessionIndex - ], - documentation: [ - A para has been queued to execute pending actions. [para_id] - ] - } - ], - constants: [], - errors: [ - { - name: NotRegistered, - documentation: [ - Para is not registered in our system. - ] - }, - { - name: CannotOnboard, - documentation: [ - Para cannot be onboarded because it is already tracked by our system. - ] - }, - { - name: CannotOffboard, - documentation: [ - Para cannot be offboarded at this time. - ] - }, - { - name: CannotUpgrade, - documentation: [ - Para cannot be upgraded to a parachain. - ] - }, - { - name: CannotDowngrade, - documentation: [ - Para cannot be downgraded to a parathread. - ] - } - ], - index: 19 - }, - { - name: Initializer, - storage: { - prefix: Initializer, - items: [ - { - name: HasInitialized, - modifier: Optional, - type: { - Plain: () - }, - fallback: 0x00, - documentation: [ - Whether the parachains modules have been initialized within this block., - , - Semantically a bool, but this guarantees it should never hit the trie,, - as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values., - , - As a bool, `set(false)` and `remove()` both lead to the next `get()` being false, but one of, - them writes to the trie and one does not. This confusion makes `Option<()>` more suitable for, - the semantics of this variable. - ] - }, - { - name: BufferedSessionChanges, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Buffered session changes along with the block number at which they should be applied., - , - Typically this will be empty or one element long. Apart from that this item never hits, - the storage., - , - However this is a `Vec` regardless to handle various edge cases that may occur at runtime, - upgrade boundaries or if governance intervenes. - ] - } - ] - }, - calls: [ - { - name: force_approve, - args: [ - { - name: up_to, - type: BlockNumber - } - ], - documentation: [ - Issue a signal to the consensus engine to forcibly act as though all parachain, - blocks in all relay chain blocks up to and including the given number in the current, - chain are valid and should be finalized. - ] - } - ], - events: null, - constants: [], - errors: [], - index: 20 - }, - { - name: Dmp, - storage: { - prefix: Dmp, - items: [ - { - name: DownwardMessageQueues, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Vec, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The downward messages addressed for a certain para. - ] - }, - { - name: DownwardMessageQueueHeads, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Hash, - linked: false - } - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - A mapping that stores the downward message queue MQC head for each para., - , - Each link in this chain has a form:, - `(prev_head, B, H(M))`, where, - - `prev_head`: is the previous head hash or zero if none., - - `B`: is the relay-chain block number in which a message was appended., - - `H(M)`: is the hash of the message being appended. - ] - } - ] - }, - calls: [], - events: null, - constants: [], - errors: [], - index: 21 - }, - { - name: Ump, - storage: { - prefix: Ump, - items: [ - { - name: RelayDispatchQueues, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Vec, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The messages waiting to be handled by the relay-chain originating from a certain parachain., - , - Note that some upward messages might have been already processed by the inclusion logic. E.g., - channel management messages., - , - The messages are processed in FIFO order. - ] - }, - { - name: RelayDispatchQueueSize, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: (u32,u32), - linked: false - } - }, - fallback: 0x0000000000000000, - documentation: [ - Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`., - , - First item in the tuple is the count of messages and second, - is the total length (in bytes) of the message payloads., - , - Note that this is an auxilary mapping: it's possible to tell the byte size and the number of, - messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of, - loading the whole message queue if only the total size and count are required., - , - Invariant:, - - The set of keys should exactly match the set of keys of `RelayDispatchQueues`. - ] - }, - { - name: NeedsDispatch, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry., - , - Invariant:, - - The set of items from this vector should be exactly the set of the keys in, - `RelayDispatchQueues` and `RelayDispatchQueueSize`. - ] - }, - { - name: NextDispatchRoundStartWith, - modifier: Optional, - type: { - Plain: ParaId - }, - fallback: 0x00, - documentation: [ - This is the para that gets will get dispatched first during the next upward dispatchable queue, - execution round., - , - Invariant:, - - If `Some(para)`, then `para` must be present in `NeedsDispatch`. - ] - } - ] - }, - calls: [], - events: null, - constants: [], - errors: [], - index: 22 - }, - { - name: Hrmp, - storage: { - prefix: Hrmp, - items: [ - { - name: HrmpOpenChannelRequests, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: HrmpChannelId, - value: HrmpOpenChannelRequest, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The set of pending HRMP open channel requests., - , - The set is accompanied by a list for iteration., - , - Invariant:, - - There are no channels that exists in list but not in the set and vice versa. - ] - }, - { - name: HrmpOpenChannelRequestsList, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [] - }, - { - name: HrmpOpenChannelRequestCount, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: u32, - linked: false - } - }, - fallback: 0x00000000, - documentation: [ - This mapping tracks how many open channel requests are inititated by a given sender para., - Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has `(X, _)`, - as the number of `HrmpOpenChannelRequestCount` for `X`. - ] - }, - { - name: HrmpAcceptedChannelRequestCount, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: u32, - linked: false - } - }, - fallback: 0x00000000, - documentation: [ - This mapping tracks how many open channel requests were accepted by a given recipient para., - Invariant: `HrmpOpenChannelRequests` should contain the same number of items `(_, X)` with, - `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`. - ] - }, - { - name: HrmpCloseChannelRequests, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: HrmpChannelId, - value: (), - linked: false - } - }, - fallback: 0x00, - documentation: [ - A set of pending HRMP close channel requests that are going to be closed during the session change., - Used for checking if a given channel is registered for closure., - , - The set is accompanied by a list for iteration., - , - Invariant:, - - There are no channels that exists in list but not in the set and vice versa. - ] - }, - { - name: HrmpCloseChannelRequestsList, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [] - }, - { - name: HrmpWatermarks, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: BlockNumber, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The HRMP watermark associated with each para., - Invariant:, - - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session. - ] - }, - { - name: HrmpChannels, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: HrmpChannelId, - value: HrmpChannel, - linked: false - } - }, - fallback: 0x00, - documentation: [ - HRMP channel data associated with each para., - Invariant:, - - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session. - ] - }, - { - name: HrmpIngressChannelsIndex, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Vec, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Ingress/egress indexes allow to find all the senders and receivers given the opposite, - side. I.e., - , - (a) ingress index allows to find all the senders for a given recipient., - (b) egress index allows to find all the recipients for a given sender., - , - Invariants:, - - for each ingress index entry for `P` each item `I` in the index should present in `HrmpChannels`, - as `(I, P)`., - - for each egress index entry for `P` each item `E` in the index should present in `HrmpChannels`, - as `(P, E)`., - - there should be no other dangling channels in `HrmpChannels`., - - the vectors are sorted. - ] - }, - { - name: HrmpEgressChannelsIndex, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Vec, - linked: false - } - }, - fallback: 0x00, - documentation: [] - }, - { - name: HrmpChannelContents, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: HrmpChannelId, - value: Vec, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Storage for the messages for each channel., - Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`. - ] - }, - { - name: HrmpChannelDigests, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Vec<(BlockNumber,Vec)>, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Maintains a mapping that can be used to answer the question:, - What paras sent a message at the given block number for a given reciever., - Invariants:, - - The inner `Vec` is never empty., - - The inner `Vec` cannot store two same `ParaId`., - - The outer vector is sorted ascending by block number and cannot store two items with the same, - block number. - ] - } - ] - }, - calls: [ - { - name: hrmp_init_open_channel, - args: [ - { - name: recipient, - type: ParaId - }, - { - name: proposed_max_capacity, - type: u32 - }, - { - name: proposed_max_message_size, - type: u32 - } - ], - documentation: [ - Initiate opening a channel from a parachain to a given recipient with given channel, - parameters., - , - - `proposed_max_capacity` - specifies how many messages can be in the channel at once., - - `proposed_max_message_size` - specifies the maximum size of any of the messages., - , - These numbers are a subject to the relay-chain configuration limits., - , - The channel can be opened only after the recipient confirms it and only on a session, - change. - ] - }, - { - name: hrmp_accept_open_channel, - args: [ - { - name: sender, - type: ParaId - } - ], - documentation: [ - Accept a pending open channel request from the given sender., - , - The channel will be opened only on the next session boundary. - ] - }, - { - name: hrmp_close_channel, - args: [ - { - name: channel_id, - type: HrmpChannelId - } - ], - documentation: [ - Initiate unilateral closing of a channel. The origin must be either the sender or the, - recipient in the channel being closed., - , - The closure can only happen on a session change. - ] - } - ], - events: [ - { - name: OpenChannelRequested, - args: [ - ParaId, - ParaId, - u32, - u32 - ], - documentation: [ - Open HRMP channel requested., - [sender, recipient, proposed_max_capacity, proposed_max_message_size] - ] - }, - { - name: OpenChannelAccepted, - args: [ - ParaId, - ParaId - ], - documentation: [ - Open HRMP channel accepted. [sender, recipient] - ] - }, - { - name: ChannelClosed, - args: [ - ParaId, - HrmpChannelId - ], - documentation: [ - HRMP channel closed. [by_parachain, channel_id] - ] - } - ], - constants: [], - errors: [ - { - name: OpenHrmpChannelToSelf, - documentation: [ - The sender tried to open a channel to themselves. - ] - }, - { - name: OpenHrmpChannelInvalidRecipient, - documentation: [ - The recipient is not a valid para. - ] - }, - { - name: OpenHrmpChannelZeroCapacity, - documentation: [ - The requested capacity is zero. - ] - }, - { - name: OpenHrmpChannelCapacityExceedsLimit, - documentation: [ - The requested capacity exceeds the global limit. - ] - }, - { - name: OpenHrmpChannelZeroMessageSize, - documentation: [ - The requested maximum message size is 0. - ] - }, - { - name: OpenHrmpChannelMessageSizeExceedsLimit, - documentation: [ - The open request requested the message size that exceeds the global limit. - ] - }, - { - name: OpenHrmpChannelAlreadyExists, - documentation: [ - The channel already exists - ] - }, - { - name: OpenHrmpChannelAlreadyRequested, - documentation: [ - There is already a request to open the same channel. - ] - }, - { - name: OpenHrmpChannelLimitExceeded, - documentation: [ - The sender already has the maximum number of allowed outbound channels. - ] - }, - { - name: AcceptHrmpChannelDoesntExist, - documentation: [ - The channel from the sender to the origin doesn't exist. - ] - }, - { - name: AcceptHrmpChannelAlreadyConfirmed, - documentation: [ - The channel is already confirmed. - ] - }, - { - name: AcceptHrmpChannelLimitExceeded, - documentation: [ - The recipient already has the maximum number of allowed inbound channels. - ] - }, - { - name: CloseHrmpChannelUnauthorized, - documentation: [ - The origin tries to close a channel where it is neither the sender nor the recipient. - ] - }, - { - name: CloseHrmpChannelDoesntExist, - documentation: [ - The channel to be closed doesn't exist. - ] - }, - { - name: CloseHrmpChannelAlreadyUnderway, - documentation: [ - The channel close request is already requested. - ] - } - ], - index: 23 - }, - { - name: SessionInfo, - storage: { - prefix: ParaSessionInfo, - items: [ - { - name: AssignmentKeysUnsafe, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Assignment keys for the current session., - Note that this API is private due to it being prone to 'off-by-one' at session boundaries., - When in doubt, use `Sessions` API instead. - ] - }, - { - name: EarliestStoredSession, - modifier: Default, - type: { - Plain: SessionIndex - }, - fallback: 0x00000000, - documentation: [ - The earliest session for which previous session info is stored. - ] - }, - { - name: Sessions, - modifier: Optional, - type: { - Map: { - hasher: Identity, - key: SessionIndex, - value: SessionInfo, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Session information in a rolling window., - Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`., - Does not have any entries before the session index in the first session change notification. - ] - } - ] - }, - calls: [], - events: null, - constants: [], - errors: [], - index: 24 - }, - { - name: Registrar, - storage: { - prefix: Registrar, - items: [ - { - name: PendingSwap, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: ParaId, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Pending swap operations. - ] - }, - { - name: Paras, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: ParaInfo, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Amount held on deposit for each para and the original depositor., - , - The given account ID is responsible for registering the code and initial head data, but may only do, - so if it isn't yet registered. (After that, it's up to governance to do so.) - ] - } - ] - }, - calls: [ - { - name: register, - args: [ - { - name: id, - type: ParaId - }, - { - name: genesis_head, - type: HeadData - }, - { - name: validation_code, - type: ValidationCode - } - ], - documentation: [ - Register a Para Id on the relay chain., - , - This function will queue the new Para Id to be a parathread., - Using the Slots pallet, a parathread can then be upgraded to get a, - parachain slot., - , - This function must be called by a signed origin., - , - The origin must pay a deposit for the registration information,, - including the genesis information and validation code. - ] - }, - { - name: deregister, - args: [ - { - name: id, - type: ParaId - } - ], - documentation: [ - Deregister a Para Id, freeing all data and returning any deposit., - , - The caller must be the para itself or Root and the para must be a parathread. - ] - }, - { - name: swap, - args: [ - { - name: other, - type: ParaId - } - ], - documentation: [ - Swap a parachain with another parachain or parathread. The origin must be a `Parachain`., - The swap will happen only if there is already an opposite swap pending. If there is not,, - the swap will be stored in the pending swaps map, ready for a later confirmatory swap., - , - The `ParaId`s remain mapped to the same head data and code so external code can rely on, - `ParaId` to be a long-term identifier of a notional parachain. However, their, - scheduling info (i.e. whether they're a parathread or parachain), auction information, - and the auction deposit are switched. - ] - } - ], - events: [ - { - name: Registered, - args: [ - ParaId, - AccountId - ], - documentation: [] - }, - { - name: Deregistered, - args: [ - ParaId - ], - documentation: [] - } - ], - constants: [ - { - name: ParaDeposit, - type: BalanceOf, - value: 0x005039278c0400000000000000000000, - documentation: [] - }, - { - name: DataDepositPerByte, - type: BalanceOf, - value: 0x80f0fa02000000000000000000000000, - documentation: [] - }, - { - name: MaxCodeSize, - type: u32, - value: 0x0000a000, - documentation: [] - }, - { - name: MaxHeadSize, - type: u32, - value: 0x00500000, - documentation: [] - } - ], - errors: [ - { - name: NotRegistered, - documentation: [ - The ID is not registered. - ] - }, - { - name: AlreadyRegistered, - documentation: [ - The ID is already registered. - ] - }, - { - name: NotOwner, - documentation: [ - The caller is not the owner of this Id. - ] - }, - { - name: CodeTooLarge, - documentation: [ - Invalid para code size. - ] - }, - { - name: HeadDataTooLarge, - documentation: [ - Invalid para head data size. - ] - }, - { - name: DefinitelyNotWasm, - documentation: [ - The validation code provided doesn't start with the Wasm file magic string. - ] - }, - { - name: NotParachain, - documentation: [ - Para is not a Parachain. - ] - }, - { - name: NotParathread, - documentation: [ - Para is not a Parathread. - ] - }, - { - name: CannotDeregister, - documentation: [ - Cannot deregister para - ] - }, - { - name: CannotDowngrade, - documentation: [ - Cannot schedule downgrade of parachain to parathread - ] - }, - { - name: CannotUpgrade, - documentation: [ - Cannot schedule upgrade of parathread to parachain - ] - } - ], - index: 25 - }, - { - name: Auctions, - storage: { - prefix: Auctions, - items: [ - { - name: AuctionCounter, - modifier: Default, - type: { - Plain: AuctionIndex - }, - fallback: 0x00000000, - documentation: [ - Number of auctions started so far. - ] - }, - { - name: AuctionInfo, - modifier: Optional, - type: { - Plain: (LeasePeriodOf,BlockNumber) - }, - fallback: 0x00, - documentation: [ - Information relating to the current auction, if there is one., - , - The first item in the tuple is the lease period index that the first of the four, - contiguous lease periods on auction is for. The second is the block number when the, - auction will begin to end, i.e. the first block of the Ending Period of the auction. - ] - }, - { - name: ReservedAmounts, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: (AccountId,ParaId), - value: BalanceOf, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Amounts currently reserved in the accounts of the bidders currently winning, - (sub-)ranges. - ] - }, - { - name: Winning, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: BlockNumber, - value: WinningData, - linked: false - } - }, - fallback: 0x00, - documentation: [ - The winning bids for each of the 10 ranges at each sample in the final Ending Period of, - the current auction. The map's key is the 0-based index into the Sample Size. The, - first sample of the ending period is 0; the last is `Sample Size - 1`. - ] - } - ] - }, - calls: [ - { - name: new_auction, - args: [ - { - name: duration, - type: Compact - }, - { - name: lease_period_index, - type: Compact - } - ], - documentation: [ - Create a new auction., - , - This can only happen when there isn't already an auction in progress and may only be, - called by the root origin. Accepts the `duration` of this auction and the, - `lease_period_index` of the initial lease period of the four that are to be auctioned. - ] - }, - { - name: bid, - args: [ - { - name: para, - type: Compact - }, - { - name: auction_index, - type: Compact - }, - { - name: first_slot, - type: Compact - }, - { - name: last_slot, - type: Compact - }, - { - name: amount, - type: Compact - } - ], - documentation: [ - Make a new bid from an account (including a parachain account) for deploying a new, - parachain., - , - Multiple simultaneous bids from the same bidder are allowed only as long as all active, - bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted., - , - - `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and, - funded by) the same account., - - `auction_index` is the index of the auction to bid on. Should just be the present, - value of `AuctionCounter`., - - `first_slot` is the first lease period index of the range to bid on. This is the, - absolute lease period index value, not an auction-specific offset., - - `last_slot` is the last lease period index of the range to bid on. This is the, - absolute lease period index value, not an auction-specific offset., - - `amount` is the amount to bid to be held as deposit for the parachain should the, - bid win. This amount is held throughout the range. - ] - }, - { - name: cancel_auction, - args: [], - documentation: [ - Cancel an in-progress auction., - , - Can only be called by Root origin. - ] - } - ], - events: [ - { - name: AuctionStarted, - args: [ - AuctionIndex, - LeasePeriod, - BlockNumber - ], - documentation: [ - An auction started. Provides its index and the block number where it will begin to, - close and the first lease period of the quadruplet that is auctioned., - [auction_index, lease_period, ending] - ] - }, - { - name: AuctionClosed, - args: [ - AuctionIndex - ], - documentation: [ - An auction ended. All funds become unreserved. [auction_index] - ] - }, - { - name: WonDeploy, - args: [ - AccountId, - SlotRange, - ParaId, - Balance - ], - documentation: [ - Someone won the right to deploy a parachain. Balance amount is deducted for deposit., - [bidder, range, parachain_id, amount] - ] - }, - { - name: WonRenewal, - args: [ - ParaId, - LeasePeriod, - LeasePeriod, - Balance - ], - documentation: [ - An existing parachain won the right to continue., - First balance is the extra amount reseved. Second is the total amount reserved., - [parachain_id, begin, count, total_amount] - ] - }, - { - name: Reserved, - args: [ - AccountId, - Balance, - Balance - ], - documentation: [ - Funds were reserved for a winning bid. First balance is the extra amount reserved., - Second is the total. [bidder, extra_reserved, total_amount] - ] - }, - { - name: Unreserved, - args: [ - AccountId, - Balance - ], - documentation: [ - Funds were unreserved since bidder is no longer active. [bidder, amount] - ] - }, - { - name: ReserveConfiscated, - args: [ - ParaId, - AccountId, - Balance - ], - documentation: [ - Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve, - but no parachain slot has been leased., - [parachain_id, leaser, amount] - ] - }, - { - name: BidAccepted, - args: [ - AccountId, - ParaId, - Balance, - LeasePeriod, - LeasePeriod - ], - documentation: [ - A new bid has been accepted as the current winner., - [who, para_id, amount, first_slot, last_slot] - ] - }, - { - name: WinningOffset, - args: [ - AuctionIndex, - BlockNumber - ], - documentation: [ - The winning offset was chosen for an auction. This will map into the `Winning` storage map., - [auction_index, block_number] - ] - } - ], - constants: [ - { - name: EndingPeriod, - type: BlockNumber, - value: 0x58020000, - documentation: [] - } - ], - errors: [ - { - name: AuctionInProgress, - documentation: [ - This auction is already in progress. - ] - }, - { - name: LeasePeriodInPast, - documentation: [ - The lease period is in the past. - ] - }, - { - name: NotParaOrigin, - documentation: [ - The origin for this call must be a parachain. - ] - }, - { - name: ParaNotRegistered, - documentation: [ - Para is not registered - ] - }, - { - name: ParaNotOnboarding, - documentation: [ - The parachain ID is not on-boarding. - ] - }, - { - name: InvalidOrigin, - documentation: [ - The origin for this call must be the origin who registered the parachain. - ] - }, - { - name: AlreadyRegistered, - documentation: [ - Parachain is already registered. - ] - }, - { - name: InvalidCode, - documentation: [ - The code must correspond to the hash. - ] - }, - { - name: UnsetDeployData, - documentation: [ - Deployment data has not been set for this parachain. - ] - }, - { - name: NotCurrentAuction, - documentation: [ - Not a current auction. - ] - }, - { - name: NotAuction, - documentation: [ - Not an auction. - ] - }, - { - name: CodeTooLarge, - documentation: [ - Given code size is too large. - ] - }, - { - name: HeadDataTooLarge, - documentation: [ - Given initial head data is too large. - ] - }, - { - name: AuctionEnded, - documentation: [ - Auction has already ended. - ] - } - ], - index: 26 - }, - { - name: Crowdloan, - storage: { - prefix: Crowdloan, - items: [ - { - name: Funds, - modifier: Optional, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: FundInfo, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Info on all of the funds. - ] - }, - { - name: NewRaise, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - The funds that have had additional contributions during the last block. This is used, - in order to determine which funds should submit new or updated bids. - ] - }, - { - name: EndingsCount, - modifier: Default, - type: { - Plain: u32 - }, - fallback: 0x00000000, - documentation: [ - The number of auctions that have entered into their ending period so far. - ] - }, - { - name: NextTrieIndex, - modifier: Default, - type: { - Plain: u32 - }, - fallback: 0x00000000, - documentation: [ - Tracker for the next available trie index - ] - } - ] - }, - calls: [ - { - name: create, - args: [ - { - name: index, - type: Compact - }, - { - name: cap, - type: Compact - }, - { - name: first_period, - type: Compact - }, - { - name: last_period, - type: Compact - }, - { - name: end, - type: Compact - }, - { - name: verifier, - type: Option - } - ], - documentation: [ - Create a new crowdloaning campaign for a parachain slot with the given lease period range. - ] - }, - { - name: contribute, - args: [ - { - name: index, - type: Compact - }, - { - name: value, - type: Compact - }, - { - name: signature, - type: Option - } - ], - documentation: [ - Contribute to a crowd sale. This will transfer some balance over to fund a parachain, - slot. It will be withdrawable when the crowdloan has ended and the funds are unused. - ] - }, - { - name: withdraw, - args: [ - { - name: who, - type: AccountId - }, - { - name: index, - type: Compact - } - ], - documentation: [ - Withdraw full balance of a specific contributor., - , - Origin must be signed, but can come from anyone., - , - The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement, - flag must be set. For a fund to be ready for retirement, then:, - - it must not already be in retirement;, - - the amount of raised funds must be bigger than the _free_ balance of the account;, - - and either:, - - the block number must be at least `end`; or, - - the current lease period must be greater than the fund's `last_period`., - , - In this case, the fund's retirement flag is set and its `end` is reset to the current block, - number., - , - - `who`: The account whose contribution should be withdrawn., - - `index`: The parachain to whose crowdloan the contribution was made. - ] - }, - { - name: refund, - args: [ - { - name: index, - type: Compact - } - ], - documentation: [ - Automatically refund contributors of an ended crowdloan., - Due to weight restrictions, this function may need to be called multiple, - times to fully refund all users. We will refund `RemoveKeysLimit` users at a time., - , - Origin must be signed, but can come from anyone. - ] - }, - { - name: dissolve, - args: [ - { - name: index, - type: Compact - } - ], - documentation: [ - Remove a fund after the retirement period has ended and all funds have been returned. - ] - }, - { - name: edit, - args: [ - { - name: index, - type: Compact - }, - { - name: cap, - type: Compact - }, - { - name: first_period, - type: Compact - }, - { - name: last_period, - type: Compact - }, - { - name: end, - type: Compact - }, - { - name: verifier, - type: Option - } - ], - documentation: [ - Edit the configuration for an in-progress crowdloan., - , - Can only be called by Root origin. - ] - }, - { - name: add_memo, - args: [ - { - name: index, - type: ParaId - }, - { - name: memo, - type: Bytes - } - ], - documentation: [ - Add an optional memo to an existing crowdloan contribution., - , - Origin must be Signed, and the user must have contributed to the crowdloan. - ] - }, - { - name: poke, - args: [ - { - name: index, - type: ParaId - } - ], - documentation: [ - Poke the fund into NewRaise, - , - Origin must be Signed, and the fund has non-zero raise. - ] - } - ], - events: [ - { - name: Created, - args: [ - ParaId - ], - documentation: [ - Create a new crowdloaning campaign. [fund_index] - ] - }, - { - name: Contributed, - args: [ - AccountId, - ParaId, - Balance - ], - documentation: [ - Contributed to a crowd sale. [who, fund_index, amount] - ] - }, - { - name: Withdrew, - args: [ - AccountId, - ParaId, - Balance - ], - documentation: [ - Withdrew full balance of a contributor. [who, fund_index, amount] - ] - }, - { - name: PartiallyRefunded, - args: [ - ParaId - ], - documentation: [ - The loans in a fund have been partially dissolved, i.e. there are some left, - over child keys that still need to be killed. [fund_index] - ] - }, - { - name: AllRefunded, - args: [ - ParaId - ], - documentation: [ - All loans in a fund have been refunded. [fund_index] - ] - }, - { - name: Dissolved, - args: [ - ParaId - ], - documentation: [ - Fund is dissolved. [fund_index] - ] - }, - { - name: DeployDataFixed, - args: [ - ParaId - ], - documentation: [ - The deploy data of the funded parachain is set. [fund_index] - ] - }, - { - name: Onboarded, - args: [ - ParaId, - ParaId - ], - documentation: [ - On-boarding process for a winning parachain fund is completed. [find_index, parachain_id] - ] - }, - { - name: HandleBidResult, - args: [ - ParaId, - DispatchResult - ], - documentation: [ - The result of trying to submit a new bid to the Slots pallet. - ] - }, - { - name: Edited, - args: [ - ParaId - ], - documentation: [ - The configuration to a crowdloan has been edited. [fund_index] - ] - }, - { - name: MemoUpdated, - args: [ - AccountId, - ParaId, - Bytes - ], - documentation: [ - A memo has been updated. [who, fund_index, memo] - ] - }, - { - name: AddedToNewRaise, - args: [ - ParaId - ], - documentation: [ - A parachain has been moved to NewRaise - ] - } - ], - constants: [ - { - name: ModuleId, - type: ModuleId, - value: py/cfund, - documentation: [] - }, - { - name: MinContribution, - type: BalanceOf, - value: 0x0010a5d4e80000000000000000000000, - documentation: [] - }, - { - name: RemoveKeysLimit, - type: u32, - value: 0xf4010000, - documentation: [] - } - ], - errors: [ - { - name: FirstPeriodInPast, - documentation: [ - The current lease period is more than the first lease period. - ] - }, - { - name: FirstPeriodTooFarInFuture, - documentation: [ - The first lease period needs to at least be less than 3 `max_value`. - ] - }, - { - name: LastPeriodBeforeFirstPeriod, - documentation: [ - Last lease period must be greater than first lease period. - ] - }, - { - name: LastPeriodTooFarInFuture, - documentation: [ - The last lease period cannot be more then 3 periods after the first period. - ] - }, - { - name: CannotEndInPast, - documentation: [ - The campaign ends before the current block number. The end must be in the future. - ] - }, - { - name: EndTooFarInFuture, - documentation: [ - The end date for this crowdloan is not sensible. - ] - }, - { - name: Overflow, - documentation: [ - There was an overflow. - ] - }, - { - name: ContributionTooSmall, - documentation: [ - The contribution was below the minimum, `MinContribution`. - ] - }, - { - name: InvalidParaId, - documentation: [ - Invalid fund index. - ] - }, - { - name: CapExceeded, - documentation: [ - Contributions exceed maximum amount. - ] - }, - { - name: ContributionPeriodOver, - documentation: [ - The contribution period has already ended. - ] - }, - { - name: InvalidOrigin, - documentation: [ - The origin of this call is invalid. - ] - }, - { - name: NotParachain, - documentation: [ - This crowdloan does not correspond to a parachain. - ] - }, - { - name: LeaseActive, - documentation: [ - This parachain lease is still active and retirement cannot yet begin. - ] - }, - { - name: BidOrLeaseActive, - documentation: [ - This parachain's bid or lease is still active and withdraw cannot yet begin. - ] - }, - { - name: FundsNotReturned, - documentation: [ - Funds have not yet been returned. - ] - }, - { - name: FundNotEnded, - documentation: [ - The crowdloan has not yet ended. - ] - }, - { - name: NoContributions, - documentation: [ - There are no contributions stored in this crowdloan. - ] - }, - { - name: HasActiveParachain, - documentation: [ - This crowdloan has an active parachain and cannot be dissolved. - ] - }, - { - name: NotReadyToDissolve, - documentation: [ - The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period. - ] - }, - { - name: InvalidSignature, - documentation: [ - Invalid signature. - ] - }, - { - name: MemoTooLarge, - documentation: [ - The provided memo is too large. - ] - }, - { - name: AlreadyInNewRaise, - documentation: [ - The fund is already in NewRaise - ] - } - ], - index: 27 - }, - { - name: Slots, - storage: { - prefix: Slots, - items: [ - { - name: Leases, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: ParaId, - value: Vec>, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Amounts held on deposit for each (possibly future) leased parachain., - , - The actual amount locked on its behalf by any account at any time is the maximum of the second values, - of the items in this list whose first value is the account., - , - The first item in the list is the amount locked for the current Lease Period. Following, - items are for the subsequent lease periods., - , - The default value (an empty list) implies that the parachain no longer exists (or never, - existed) as far as this module is concerned., - , - If a parachain doesn't exist *yet* but is scheduled to exist in the future, then it, - will be left-padded with one or more `None`s to denote the fact that nothing is held on, - deposit for the non-existent chain currently, but is held at some point in the future., - , - It is illegal for a `None` value to trail in the list. - ] - } - ] - }, - calls: [ - { - name: force_lease, - args: [ - { - name: para, - type: ParaId - }, - { - name: leaser, - type: AccountId - }, - { - name: amount, - type: BalanceOf - }, - { - name: period_begin, - type: LeasePeriodOf - }, - { - name: period_count, - type: LeasePeriodOf - } - ], - documentation: [ - Just a hotwire into the `lease_out` call, in case Root wants to force some lease to happen, - independently of any other on-chain mechanism to use it., - , - Can only be called by the Root origin. - ] - }, - { - name: clear_all_leases, - args: [ - { - name: para, - type: ParaId - } - ], - documentation: [ - Clear all leases for a Para Id, refunding any deposits back to the original owners., - , - Can only be called by the Root origin. - ] - }, - { - name: trigger_onboard, - args: [ - { - name: para, - type: ParaId - } - ], - documentation: [ - Try to onboard a parachain that has a lease for the current lease period., - , - This function can be useful if there was some state issue with a para that should, - have onboarded, but was unable to. As long as they have a lease period, we can, - let them onboard from here., - , - Origin must be signed, but can be called by anyone. - ] - } - ], - events: [ - { - name: NewLeasePeriod, - args: [ - LeasePeriod - ], - documentation: [ - A new [lease_period] is beginning. - ] - }, - { - name: Leased, - args: [ - ParaId, - AccountId, - LeasePeriod, - LeasePeriod, - Balance, - Balance - ], - documentation: [ - An existing parachain won the right to continue., - First balance is the extra amount reseved. Second is the total amount reserved., - [parachain_id, leaser, period_begin, period_count, extra_reseved, total_amount] - ] - }, - { - name: Claimed, - args: [ - ParaId - ], - documentation: [ - A para ID value has been claimed. - ] - } - ], - constants: [ - { - name: LeasePeriod, - type: BlockNumber, - value: 0x40380000, - documentation: [] - } - ], - errors: [ - { - name: LeasePeriodInPast, - documentation: [ - The lease period is in the past. - ] - }, - { - name: NotParaOrigin, - documentation: [ - The origin for this call must be a parachain. - ] - }, - { - name: ParaNotOnboarding, - documentation: [ - The parachain ID is not onboarding. - ] - }, - { - name: InvalidOrigin, - documentation: [ - The origin for this call must be the origin who registered the parachain. - ] - }, - { - name: AlreadyRegistered, - documentation: [ - Parachain is already registered. - ] - }, - { - name: InvalidCode, - documentation: [ - The code must correspond to the hash. - ] - }, - { - name: UnsetDeployData, - documentation: [ - Deployment data has not been set for this parachain. - ] - }, - { - name: NonIntersectingRange, - documentation: [ - The bid must overlap all intersecting ranges. - ] - }, - { - name: CodeTooLarge, - documentation: [ - Given code size is too large. - ] - }, - { - name: HeadDataTooLarge, - documentation: [ - Given initial head data is too large. - ] - }, - { - name: InUse, - documentation: [ - The Id given is already in use. - ] - }, - { - name: LeaseError, - documentation: [ - There was an error with the lease. - ] - } - ], - index: 28 - }, - { - name: ParasSudoWrapper, - storage: null, - calls: [ - { - name: sudo_schedule_para_initialize, - args: [ - { - name: id, - type: ParaId - }, - { - name: genesis, - type: ParaGenesisArgs - } - ], - documentation: [ - Schedule a para to be initialized at the start of the next session. - ] - }, - { - name: sudo_schedule_para_cleanup, - args: [ - { - name: id, - type: ParaId - } - ], - documentation: [ - Schedule a para to be cleaned up at the start of the next session. - ] - }, - { - name: sudo_schedule_parathread_upgrade, - args: [ - { - name: id, - type: ParaId - } - ], - documentation: [ - Upgrade a parathread to a parachain - ] - }, - { - name: sudo_schedule_parachain_downgrade, - args: [ - { - name: id, - type: ParaId - } - ], - documentation: [ - Downgrade a parachain to a parathread - ] - }, - { - name: sudo_queue_downward_xcm, - args: [ - { - name: id, - type: ParaId - }, - { - name: xcm, - type: VersionedXcm - } - ], - documentation: [ - Send a downward XCM to the given para., - , - The given parachain should exist and the payload should not exceed the preconfigured size, - `config.max_downward_message_size`. - ] - }, - { - name: sudo_establish_hrmp_channel, - args: [ - { - name: sender, - type: ParaId - }, - { - name: recipient, - type: ParaId - }, - { - name: max_capacity, - type: u32 - }, - { - name: max_message_size, - type: u32 - } - ], - documentation: [ - Forcefully establish a channel from the sender to the recipient., - , - This is equivalent to sending an `Hrmp::hrmp_init_open_channel` extrinsic followed by, - `Hrmp::hrmp_accept_open_channel`. - ] - } - ], - events: null, - constants: [], - errors: [ - { - name: ParaDoesntExist, - documentation: [ - The specified parachain or parathread is not registered. - ] - }, - { - name: ParaAlreadyExists, - documentation: [ - The specified parachain or parathread is already registered. - ] - }, - { - name: ExceedsMaxMessageSize, - documentation: [ - A DMP message couldn't be sent because it exceeds the maximum size allowed for a downward, - message. - ] - }, - { - name: DefinitelyNotWasm, - documentation: [ - The validation code provided doesn't start with the Wasm file magic string. - ] - }, - { - name: CouldntCleanup, - documentation: [ - Could not schedule para cleanup. - ] - }, - { - name: NotParathread, - documentation: [ - Not a parathread. - ] - }, - { - name: NotParachain, - documentation: [ - Not a parachain. - ] - }, - { - name: CannotUpgrade, - documentation: [ - Cannot upgrade parathread. - ] - }, - { - name: CannotDowngrade, - documentation: [ - Cannot downgrade parachain. - ] - } - ], - index: 29 - }, - { - name: Sudo, - storage: { - prefix: Sudo, - items: [ - { - name: Key, - modifier: Default, - type: { - Plain: AccountId - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - The `AccountId` of the sudo key. - ] - } - ] - }, - calls: [ - { - name: sudo, - args: [ - { - name: call, - type: Call - } - ], - documentation: [ - Authenticates the sudo key and dispatches a function call with `Root` origin., - , - The dispatch origin for this call must be _Signed_., - , - # , - - O(1)., - - Limited storage reads., - - One DB write (event)., - - Weight of derivative `call` execution + 10,000., - # - ] - }, - { - name: sudo_unchecked_weight, - args: [ - { - name: call, - type: Call - }, - { - name: _weight, - type: Weight - } - ], - documentation: [ - Authenticates the sudo key and dispatches a function call with `Root` origin., - This function does not check the weight of the call, and instead allows the, - Sudo user to specify the weight of the call., - , - The dispatch origin for this call must be _Signed_., - , - # , - - O(1)., - - The weight of this call is defined by the caller., - # - ] - }, - { - name: set_key, - args: [ - { - name: new, - type: LookupSource - } - ], - documentation: [ - Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key., - , - The dispatch origin for this call must be _Signed_., - , - # , - - O(1)., - - Limited storage reads., - - One DB change., - # - ] - }, - { - name: sudo_as, - args: [ - { - name: who, - type: LookupSource - }, - { - name: call, - type: Call - } - ], - documentation: [ - Authenticates the sudo key and dispatches a function call with `Signed` origin from, - a given account., - , - The dispatch origin for this call must be _Signed_., - , - # , - - O(1)., - - Limited storage reads., - - One DB write (event)., - - Weight of derivative `call` execution + 10,000., - # - ] - } - ], - events: [ - { - name: Sudid, - args: [ - DispatchResult - ], - documentation: [ - A sudo just took place. [result] - ] - }, - { - name: KeyChanged, - args: [ - AccountId - ], - documentation: [ - The [sudoer] just switched identity; the old key is supplied. - ] - }, - { - name: SudoAsDone, - args: [ - DispatchResult - ], - documentation: [ - A sudo just took place. [result] - ] - } - ], - constants: [], - errors: [ - { - name: RequireSudo, - documentation: [ - Sender must be the Sudo account - ] - } - ], - index: 30 - }, - { - name: Mmr, - storage: { - prefix: MerkleMountainRange, - items: [ - { - name: RootHash, - modifier: Default, - type: { - Plain: Hash - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - Latest MMR Root hash. - ] - }, - { - name: NumberOfLeaves, - modifier: Default, - type: { - Plain: u64 - }, - fallback: 0x0000000000000000, - documentation: [ - Current size of the MMR (number of leaves). - ] - }, - { - name: Nodes, - modifier: Optional, - type: { - Map: { - hasher: Identity, - key: u64, - value: Hash, - linked: false - } - }, - fallback: 0x00, - documentation: [ - Hashes of the nodes in the MMR., - , - Note this collection only contains MMR peaks, the inner nodes (and leaves), - are pruned and only stored in the Offchain DB. - ] - } - ] - }, - calls: [], - events: null, - constants: [], - errors: [], - index: 31 - }, - { - name: Beefy, - storage: { - prefix: Beefy, - items: [ - { - name: Authorities, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - The current authorities set - ] - }, - { - name: ValidatorSetId, - modifier: Default, - type: { - Plain: ValidatorSetId - }, - fallback: 0x0000000000000000, - documentation: [ - The current validator set id - ] - }, - { - name: NextAuthorities, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Authorities set scheduled to be used with the next session - ] - } - ] - }, - calls: null, - events: null, - constants: [], - errors: [], - index: 32 - }, - { - name: MmrLeaf, - storage: { - prefix: Beefy, - items: [ - { - name: BeefyNextAuthorities, - modifier: Default, - type: { - Plain: BeefyNextAuthoritySet - }, - fallback: 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - documentation: [ - Details of next BEEFY authority set., - , - This storage entry is used as cache for calls to [`update_beefy_next_authority_set`]. - ] - } - ] - }, - calls: null, - events: null, - constants: [], - errors: [], - index: 33 - }, - { - name: ValidatorManager, - storage: { - prefix: ParachainProposer, - items: [ - { - name: ValidatorsToRetire, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Validators that should be retired, because their Parachain was deregistered. - ] - }, - { - name: ValidatorsToAdd, - modifier: Default, - type: { - Plain: Vec - }, - fallback: 0x00, - documentation: [ - Validators that should be added. - ] - } - ] - }, - calls: [ - { - name: register_validators, - args: [ - { - name: validators, - type: Vec - } - ], - documentation: [ - Add new validators to the set., - , - The new validators will be active from current session + 2. - ] - }, - { - name: deregister_validators, - args: [ - { - name: validators, - type: Vec - } - ], - documentation: [ - Remove validators from the set., - , - The removed validators will be deactivated from current session + 2. - ] - } - ], - events: [ - { - name: ValidatorsRegistered, - args: [ - Vec - ], - documentation: [ - New validators were added to the set. - ] - }, - { - name: ValidatorsDeregistered, - args: [ - Vec - ], - documentation: [ - Validators were removed from the set. - ] - } - ], - constants: [], - errors: [], - index: 34 - }, - { - name: Utility, - storage: null, - calls: [ - { - name: batch, - args: [ - { - name: calls, - type: Vec - } - ], - documentation: [ - Send a batch of dispatch calls., - , - May be called from any origin., - , - - `calls`: The calls to be dispatched from the same origin., - , - If origin is root then call are dispatch without checking origin filter. (This includes, - bypassing `frame_system::Config::BaseCallFilter`)., - , - # , - - Complexity: O(C) where C is the number of calls to be batched., - # , - , - This will return `Ok` in all circumstances. To determine the success of the batch, an, - event is deposited. If a call failed and the batch was interrupted, then the, - `BatchInterrupted` event is deposited, along with the number of successful calls made, - and the error of the failed call. If all were successful, then the `BatchCompleted`, - event is deposited. - ] - }, - { - name: as_derivative, - args: [ - { - name: index, - type: u16 - }, - { - name: call, - type: Call - } - ], - documentation: [ - Send a call through an indexed pseudonym of the sender., - , - Filter from origin are passed along. The call will be dispatched with an origin which, - use the same filter as the origin of this call., - , - NOTE: If you need to ensure that any account-based filtering is not honored (i.e., - because you expect `proxy` to have been used prior in the call stack and you do not want, - the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`, - in the Multisig pallet instead., - , - NOTE: Prior to version *12, this was called `as_limited_sub`., - , - The dispatch origin for this call must be _Signed_. - ] - }, - { - name: batch_all, - args: [ - { - name: calls, - type: Vec - } - ], - documentation: [ - Send a batch of dispatch calls and atomically execute them., - The whole transaction will rollback and fail if any of the calls failed., - , - May be called from any origin., - , - - `calls`: The calls to be dispatched from the same origin., - , - If origin is root then call are dispatch without checking origin filter. (This includes, - bypassing `frame_system::Config::BaseCallFilter`)., - , - # , - - Complexity: O(C) where C is the number of calls to be batched., - # - ] - } - ], - events: [ - { - name: BatchInterrupted, - args: [ - u32, - DispatchError - ], - documentation: [ - Batch of dispatches did not complete fully. Index of first failing dispatch given, as, - well as the error. [index, error] - ] - }, - { - name: BatchCompleted, - args: [], - documentation: [ - Batch of dispatches completed fully with no error. - ] - } - ], - constants: [], - errors: [], - index: 90 - }, - { - name: Proxy, - storage: { - prefix: Proxy, - items: [ - { - name: Proxies, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: AccountId, - value: (Vec,BalanceOf), - linked: false - } - }, - fallback: 0x0000000000000000000000000000000000, - documentation: [ - The set of account proxies. Maps the account which has delegated to the accounts, - which are being delegated to, together with the amount held on deposit. - ] - }, - { - name: Announcements, - modifier: Default, - type: { - Map: { - hasher: Twox64Concat, - key: AccountId, - value: (Vec,BalanceOf), - linked: false - } - }, - fallback: 0x0000000000000000000000000000000000, - documentation: [ - The announcements made by the proxy (key). - ] - } - ] - }, - calls: [ - { - name: proxy, - args: [ - { - name: real, - type: AccountId - }, - { - name: force_proxy_type, - type: Option - }, - { - name: call, - type: Call - } - ], - documentation: [ - Dispatch the given `call` from an account that the sender is authorised for through, - `add_proxy`., - , - Removes any corresponding announcement(s)., - , - The dispatch origin for this call must be _Signed_., - , - Parameters:, - - `real`: The account that the proxy will make a call on behalf of., - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call., - - `call`: The call to be made by the `real` account., - , - # , - Weight is a function of the number of proxies the user has (P)., - # - ] - }, - { - name: add_proxy, - args: [ - { - name: delegate, - type: AccountId - }, - { - name: proxy_type, - type: ProxyType - }, - { - name: delay, - type: BlockNumber - } - ], - documentation: [ - Register a proxy account for the sender that is able to make calls on its behalf., - , - The dispatch origin for this call must be _Signed_., - , - Parameters:, - - `proxy`: The account that the `caller` would like to make a proxy., - - `proxy_type`: The permissions allowed for this proxy account., - - `delay`: The announcement period required of the initial proxy. Will generally be, - zero., - , - # , - Weight is a function of the number of proxies the user has (P)., - # - ] - }, - { - name: remove_proxy, - args: [ - { - name: delegate, - type: AccountId - }, - { - name: proxy_type, - type: ProxyType - }, - { - name: delay, - type: BlockNumber - } - ], - documentation: [ - Unregister a proxy account for the sender., - , - The dispatch origin for this call must be _Signed_., - , - Parameters:, - - `proxy`: The account that the `caller` would like to remove as a proxy., - - `proxy_type`: The permissions currently enabled for the removed proxy account., - , - # , - Weight is a function of the number of proxies the user has (P)., - # - ] - }, - { - name: remove_proxies, - args: [], - documentation: [ - Unregister all proxy accounts for the sender., - , - The dispatch origin for this call must be _Signed_., - , - WARNING: This may be called on accounts created by `anonymous`, however if done, then, - the unreserved fees will be inaccessible. **All access to this account will be lost.**, - , - # , - Weight is a function of the number of proxies the user has (P)., - # - ] - }, - { - name: anonymous, - args: [ - { - name: proxy_type, - type: ProxyType - }, - { - name: delay, - type: BlockNumber - }, - { - name: index, - type: u16 - } - ], - documentation: [ - Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and, - initialize it with a proxy of `proxy_type` for `origin` sender., - , - Requires a `Signed` origin., - , - - `proxy_type`: The type of the proxy that the sender will be registered as over the, - new account. This will almost always be the most permissive `ProxyType` possible to, - allow for maximum flexibility., - - `index`: A disambiguation index, in case this is called multiple times in the same, - transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just, - want to use `0`., - - `delay`: The announcement period required of the initial proxy. Will generally be, - zero., - , - Fails with `Duplicate` if this has already been called in this transaction, from the, - same sender, with the same parameters., - , - Fails if there are insufficient funds to pay for deposit., - , - # , - Weight is a function of the number of proxies the user has (P)., - # , - TODO: Might be over counting 1 read - ] - }, - { - name: kill_anonymous, - args: [ - { - name: spawner, - type: AccountId - }, - { - name: proxy_type, - type: ProxyType - }, - { - name: index, - type: u16 - }, - { - name: height, - type: Compact - }, - { - name: ext_index, - type: Compact - } - ], - documentation: [ - Removes a previously spawned anonymous proxy., - , - WARNING: **All access to this account will be lost.** Any funds held in it will be, - inaccessible., - , - Requires a `Signed` origin, and the sender account must have been created by a call to, - `anonymous` with corresponding parameters., - , - - `spawner`: The account that originally called `anonymous` to create this account., - - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`., - - `proxy_type`: The proxy type originally passed to `anonymous`., - - `height`: The height of the chain when the call to `anonymous` was processed., - - `ext_index`: The extrinsic index in which the call to `anonymous` was processed., - , - Fails with `NoPermission` in case the caller is not a previously created anonymous, - account whose `anonymous` call has corresponding parameters., - , - # , - Weight is a function of the number of proxies the user has (P)., - # - ] - }, - { - name: announce, - args: [ - { - name: real, - type: AccountId - }, - { - name: call_hash, - type: CallHashOf - } - ], - documentation: [ - Publish the hash of a proxy-call that will be made in the future., - , - This must be called some number of blocks before the corresponding `proxy` is attempted, - if the delay associated with the proxy relationship is greater than zero., - , - No more than `MaxPending` announcements may be made at any one time., - , - This will take a deposit of `AnnouncementDepositFactor` as well as, - `AnnouncementDepositBase` if there are no other pending announcements., - , - The dispatch origin for this call must be _Signed_ and a proxy of `real`., - , - Parameters:, - - `real`: The account that the proxy will make a call on behalf of., - - `call_hash`: The hash of the call to be made by the `real` account., - , - # , - Weight is a function of:, - - A: the number of announcements made., - - P: the number of proxies the user has., - # - ] - }, - { - name: remove_announcement, - args: [ - { - name: real, - type: AccountId - }, - { - name: call_hash, - type: CallHashOf - } - ], - documentation: [ - Remove a given announcement., - , - May be called by a proxy account to remove a call they previously announced and return, - the deposit., - , - The dispatch origin for this call must be _Signed_., - , - Parameters:, - - `real`: The account that the proxy will make a call on behalf of., - - `call_hash`: The hash of the call to be made by the `real` account., - , - # , - Weight is a function of:, - - A: the number of announcements made., - - P: the number of proxies the user has., - # - ] - }, - { - name: reject_announcement, - args: [ - { - name: delegate, - type: AccountId - }, - { - name: call_hash, - type: CallHashOf - } - ], - documentation: [ - Remove the given announcement of a delegate., - , - May be called by a target (proxied) account to remove a call that one of their delegates, - (`delegate`) has announced they want to execute. The deposit is returned., - , - The dispatch origin for this call must be _Signed_., - , - Parameters:, - - `delegate`: The account that previously announced the call., - - `call_hash`: The hash of the call to be made., - , - # , - Weight is a function of:, - - A: the number of announcements made., - - P: the number of proxies the user has., - # - ] - }, - { - name: proxy_announced, - args: [ - { - name: delegate, - type: AccountId - }, - { - name: real, - type: AccountId - }, - { - name: force_proxy_type, - type: Option - }, - { - name: call, - type: Call - } - ], - documentation: [ - Dispatch the given `call` from an account that the sender is authorized for through, - `add_proxy`., - , - Removes any corresponding announcement(s)., - , - The dispatch origin for this call must be _Signed_., - , - Parameters:, - - `real`: The account that the proxy will make a call on behalf of., - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call., - - `call`: The call to be made by the `real` account., - , - # , - Weight is a function of:, - - A: the number of announcements made., - - P: the number of proxies the user has., - # - ] - } - ], - events: [ - { - name: ProxyExecuted, - args: [ - DispatchResult - ], - documentation: [ - A proxy was executed correctly, with the given [result]. - ] - }, - { - name: AnonymousCreated, - args: [ - AccountId, - AccountId, - ProxyType, - u16 - ], - documentation: [ - Anonymous account has been created by new proxy with given, - disambiguation index and proxy type. [anonymous, who, proxy_type, disambiguation_index] - ] - }, - { - name: Announced, - args: [ - AccountId, - AccountId, - Hash - ], - documentation: [ - An announcement was placed to make a call in the future. [real, proxy, call_hash] - ] - } - ], - constants: [ - { - name: ProxyDepositBase, - type: BalanceOf, - value: 0x0a000000000000000000000000000000, - documentation: [ - The base amount of currency needed to reserve for creating a proxy., - , - This is held for an additional storage item whose value size is, - `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes. - ] - }, - { - name: ProxyDepositFactor, - type: BalanceOf, - value: 0x0a000000000000000000000000000000, - documentation: [ - The amount of currency needed per proxy added., - , - This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing, - storage value. Thus, when configuring `ProxyDepositFactor` one should take into account, - `32 + proxy_type.encode().len()` bytes of data. - ] - }, - { - name: MaxProxies, - type: u16, - value: 0x2000, - documentation: [ - The maximum amount of proxies allowed for a single account. - ] - }, - { - name: MaxPending, - type: u32, - value: 0x20000000, - documentation: [ - The maximum amount of time-delayed announcements that are allowed to be pending. - ] - }, - { - name: AnnouncementDepositBase, - type: BalanceOf, - value: 0x0a000000000000000000000000000000, - documentation: [ - The base amount of currency needed to reserve for creating an announcement., - , - This is held when a new storage item holding a `Balance` is created (typically 16 bytes). - ] - }, - { - name: AnnouncementDepositFactor, - type: BalanceOf, - value: 0x0a000000000000000000000000000000, - documentation: [ - The amount of currency needed per announcement made., - , - This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes), - into a pre-existing storage value. - ] - } - ], - errors: [ - { - name: TooMany, - documentation: [ - There are too many proxies registered or too many announcements pending. - ] - }, - { - name: NotFound, - documentation: [ - Proxy registration not found. - ] - }, - { - name: NotProxy, - documentation: [ - Sender is not a proxy of the account to be proxied. - ] - }, - { - name: Unproxyable, - documentation: [ - A call which is incompatible with the proxy type's filter was attempted. - ] - }, - { - name: Duplicate, - documentation: [ - Account is already a proxy. - ] - }, - { - name: NoPermission, - documentation: [ - Call may not be made by proxy because it may escalate its privileges. - ] - }, - { - name: Unannounced, - documentation: [ - Announcement, if made at all, was made too recently. - ] - }, - { - name: NoSelfProxy, - documentation: [ - Cannot add self as proxy. - ] - } - ], - index: 91 - } - ], - extrinsic: { - version: 4, - signedExtensions: [ - CheckSpecVersion, - CheckTxVersion, - CheckGenesis, - CheckMortality, - CheckNonce, - CheckWeight, - ChargeTransactionPayment - ] - } - } - } -} diff --git a/packages/types/src/interfaces/parachains/types.ts b/packages/types/src/interfaces/parachains/types.ts index 0bc6ad4df4..23b89b2619 100644 --- a/packages/types/src/interfaces/parachains/types.ts +++ b/packages/types/src/interfaces/parachains/types.ts @@ -266,7 +266,7 @@ export interface DisputeStatement extends Enum { /** @name DisputeStatementSet */ export interface DisputeStatementSet extends Struct { - readonly candidate_hash: CandidateHash; + readonly candidateHash: CandidateHash; readonly session: SessionIndex; readonly statements: Vec>; } @@ -292,7 +292,7 @@ export interface ExchangeAsset extends Struct { /** @name ExplicitDisputeStatement */ export interface ExplicitDisputeStatement extends Struct { readonly valid: bool; - readonly candidate_hash: CandidateHash; + readonly candidateHash: CandidateHash; readonly session: SessionIndex; } @@ -613,7 +613,7 @@ export interface ParachainProposal extends Struct { /** @name ParachainsInherentData */ export interface ParachainsInherentData extends Struct { readonly bitfields: SignedAvailabilityBitfields; - readonly backed_candidates: Vec; + readonly backedCandidates: Vec; readonly disputes: MultiDisputeStatementSet; readonly parentHeader: Header; }