diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index b3f33b8..0890412 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -3,7 +3,7 @@ * Runtime Descriptions ** xref:runtime/xcm_executor.adoc[XCM Executor] * Pallet Specifications -** xref:pallets/pallet_transaction_payment.adoc[pallet_transaction_payment] +** xref:pallets/transaction_payment.adoc[pallet_transaction_payment] ** xref:pallets/pallet_xcm.adoc[pallet_xcm] ** xref:pallets/proxy.adoc[pallet_proxy] ** xref:pallets/multisig.adoc[pallet_multisig] @@ -13,3 +13,5 @@ ** xref:pallets/parachain-system.adoc[parachain_system] ** xref:pallets/balances.adoc[pallet_balances] ** xref:pallets/xcmp-queue.adoc[cumulus_pallet_xcmp_queue] +* Appendix +** xref:glossary.adoc[Glossary] diff --git a/docs/modules/ROOT/pages/glossary.adoc b/docs/modules/ROOT/pages/glossary.adoc new file mode 100644 index 0000000..79314c0 --- /dev/null +++ b/docs/modules/ROOT/pages/glossary.adoc @@ -0,0 +1,168 @@ += Glossary + +== A + +=== Announcement + +Announcement is a statement of call hash for the <> to execute in some future block. Required for some proxies where delay is specified. + +=== Asset Teleportation + +Asset Teleportation is a movement of an asset by destroying it on one side and creating a clone on the other side + +== B + +=== Barrier + +A generic filter which returns whether or not XCM may pass and be executed. If they do not pass the barrier, they are not executed. The barrier is the final filter before XCM execution. It implements the `ShouldExecute` trait and therefore takes as input an XCM and returns a bool indicating whether it should be executed. + +== C + +=== Candidacy Bond + +Candidacy bond is fixed amount to deposit to become a <>. + + +=== Candidate + +Candidate is a self-promoted <>, who deposited a candidacy bond to participate in collation process + +=== Collator + +Collator is a node that gathers collation information and communicates it to relay chain to make a block. + +== D + +=== Delay + +Delay is number of block that should pass from <> before call execution. + +=== Delegatee + +Delegatee is an account that was granted call execution rights with <> creation. + +=== Delegator + +Delegator is an account that granted call execution rights with <> creation. + +== F + +=== Freeze + +`Freeze` is reserving some amount from the account. For example, to make a transaction, the amount to be sent might be first frozen, then the checks for the transaction will be made. If the checks pass, the amount will be deducted from the sender's account and added to the recipient's. `Freeze` should be preferred if the reserved money can be lost/sent due to external reasons. + +=== Fungible Asset + +An asset where any unit of it worth the same. Opposite of <> + +== H + +=== Hold +`Hold` means reserving/holding an amount of balance from an account. The `Hold` amount cannot be spent, but still belongs to the account. For example, depositing modifying the state, and occupying space. This deposit will be repaid once the occupied space is freed. + +== I + +=== Invulnerable + +Invulnerable is a permissioned <>, that will always be part of the collation process + +== J + +=== Junction + +Junction is a single item in a path to describe a relative location (think of `dir` or `dir/$file_path` as a junction). + +=== Junctions + +Junctions is multiple `Junction`s, formed only through <> construction. + +== L + +=== Length Fee + +A fee proportional to the encoded length of the transaction. + +=== Lock + +Nearly the same as `<>`, with 2 major differences: + +* Locks can store the reason for the locking operation. +* Locks are overlapping, whereas Reserve/Hold's are additive. Example: +** Apply `Hold` to account A for 20 units, then apply another `Hold` to account A for 10 units -> a total of 30 units will be reserved/hold +** Apply `Lock` to account A for 20 units, then apply another `Lock` to account A for 10 units -> a total of 20 units will be locked, since 10 is smaller than 20. + +== M + +=== MultiAsset + +Either an amount of a single fungible asset, or one non-fungible asset. + +=== MultiLocation + +A path described by junctions leading to the location. + +== N + +=== NonFungible Asset + +An asset where each unit is worth a different amount and/or is unique in some way. Opposite of <>. + +== P + +=== Pot + +Pot is a stake that will reward block authors. Block author will get half of the current stake. + +=== Proxy + +Proxy is a statement of call execution rights transfer from <> to <>. Specified by <> and <>. + +=== Proxy type + +Proxy type is a type of calls that can be executed using this <>. + +=== Pure account + +Pure account is an account that was spawned only to be a <> for some <>. + +== R + +=== Reserve + +Deprecated, use `<>`. + +=== Reserve Asset Transfer + +When consensus systems do not have a established layer of trust over which they can transfer assets, they can opt for a trusted 3rd entity to store the assets + +== T + +=== Tip + +An optional tip. Tip increases the priority of the transaction, giving it a higher chance to be included by the transaction queue. + +== U + +=== Unincluded Segment + +A sequence of blocks that were not yet included into the relay chain state transition + +== V + +=== Validation Code + +Validation Code is the runtime binary that runs in the parachain + +=== Validation Data + +Validation Data is the information passed from the relay chain to validate the next block + +== W + +=== Weight + +The time it takes to execute runtime logic. By controlling the execution time that a block can consume, weight bounds the storage changes and computation per block. + +=== Weight Fee + +A fee proportional to amount of <> a transaction consumes. \ No newline at end of file diff --git a/docs/modules/ROOT/pages/pallets/balances.adoc b/docs/modules/ROOT/pages/pallets/balances.adoc index 71e653c..290d792 100644 --- a/docs/modules/ROOT/pages/pallets/balances.adoc +++ b/docs/modules/ROOT/pages/pallets/balances.adoc @@ -17,29 +17,18 @@ The Balances pallet provides functions for: * Slashing an account balance. * Account creation and removal. * Managing total issuance. -* Setting and managing locks. - -== Glossary - -* Freeze -- Freeze is reserving some amount from the account. For example, to make a transaction, the amount to be sent might be first frozen, then the checks for the transaction will be made. If the checks pass, the amount will be deducted from the sender's account and added to the recipient's. `Freeze` should be preferred if the reserved money can be lost/sent due to external reasons. -* Hold -- reserving/holding an amount of balance from an account. The `Hold` amount cannot be spent, but still belongs to the account. For example, depositing modifying the state, and occupying space. This deposit will be repaid once the occupied space is freed. -* Reserve -- Deprecated, use Hold. -* Lock -- Nearly the same as `Hold`, with 2 major differences: -** Locks can store the reason for the locking operation. -** Locks are overlapping, whereas Reserve/Hold's are additive. Example: -*** Apply `Hold` to account A for 20 units, then apply another `Hold` to account A for 10 units -> a total of 30 units will be reserved/hold -*** Apply `Lock` to account A for 20 units, then apply another `Lock` to account A for 10 units -> a total of 20 units will be locked, since 10 is smaller than 20. +* Setting and managing xref:glossary.adoc#lock[locks]. == Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/balances/src/lib.rs#L253[{github-icon},role=heading-link] * Pallet-specific configs -** `RuntimeHoldReason` -- The overarching hold reason. -** `RuntimeFreezeReason` -- The overarching freeze reason. +** `RuntimeHoldReason` -- The overarching xref:glossary.adoc#hold[hold] reason. +** `RuntimeFreezeReason` -- The overarching xref:glossary.adoc#freeze[freeze] reason. ** `Balance` -- The balance of an account ** `DustRemoval` -- Handler for the unbalanced reduction when removing a dust account. ** `ExistentialDeposit` -- The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO! ** `AccountStore` -- The means of storing the balances of an account. -** `ReserveIdentifier` -- The ID type for reserves. The use of reserves is deprecated in favor of holds. See `https://github.com/paritytech/substrate/pull/12951/` +** `ReserveIdentifier` -- The ID type for xref:glossary.adoc#reserve[reserves]. The use of reserves is deprecated in favor of holds. See `https://github.com/paritytech/substrate/pull/12951/` ** `FreezeIdentifier` -- The ID type for freezes. ** `MaxLocks` -- The maximum number of locks that should exist on an account. ** `MaxReserves` -- The maximum number of named reserves that can exist on an account. The use of reserves is deprecated in favor of holds. See `https://github.com/paritytech/substrate/pull/12951/` @@ -47,7 +36,7 @@ The Balances pallet provides functions for: ** `MaxFreezes` -- The maximum number of individual freeze locks that can exist on an account at any time. * Common configs ** `RuntimeEvent` -- The overarching event type. -** `WeightInfo` -- Weight information for extrinsics in this pallet. +** `WeightInfo` -- xref:glossary.adoc#weight[Weight] information for extrinsics in this pallet. == Events link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/balances/src/lib.rs#L339[{github-icon},role=heading-link] diff --git a/docs/modules/ROOT/pages/pallets/collator-selection.adoc b/docs/modules/ROOT/pages/pallets/collator-selection.adoc index eb71f54..d74432b 100644 --- a/docs/modules/ROOT/pages/pallets/collator-selection.adoc +++ b/docs/modules/ROOT/pages/pallets/collator-selection.adoc @@ -8,21 +8,13 @@ Branch/Release: `release-polkadot-v1.3.0` == Purpose -This pallet is needed to manage the set of collators for each session and to provision the next session with the actual list of collators. - -== Glossary - -- _Collator_ — a node that gathers collation information and communicates it to relay chain to make a block. -- _Pot_ — stake that will reward block authors. Block author will get half of the current stake. -- _Candidate_ — a self-promoted collator, who deposited a candidacy bond to participate in collation process -- _Candidacy Bond_ — fixed amount to deposit to become a collator -- _Invulnerable_ — permissioned collator, that will always be part of the collation process. +This pallet is needed to manage the set of xref:glossary.adoc#collator[collators] for each session and to provision the next session with the actual list of collators. == Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/cumulus/pallets/collator-selection/src/lib.rs#L118[{github-icon},role=heading-link] * Pallet-specific configs -** `UpdateOrigin` — defines the list of origins that are able to modify the settings of collators (e.g. set and remove list of invulnerables, desired candidates, candidacy bond). This type should implement the trait `EnsureOrigin`. -** `PotId` — id of account that will hold a Pot. +** `UpdateOrigin` — defines the list of origins that are able to modify the settings of collators (e.g. set and remove list of xref:glossary.adoc#invulnerable[invulnerables], desired xref:glossary.adoc#candidates[candidates], xref:glossary.adoc#candidacy_bond[candidacy bond]). This type should implement the trait `EnsureOrigin`. +** `PotId` — id of account that will hold a xref:glossary.adoc#pot[Pot]. ** `MaxCandidates` — maximum number of candidates ** `MinEligibleCollators` — minimum number of collators to collect for the session ** `MaxInvulnerables` — maximum number of invulnerables diff --git a/docs/modules/ROOT/pages/pallets/multisig.adoc b/docs/modules/ROOT/pages/pallets/multisig.adoc index 686e43c..f483c6e 100644 --- a/docs/modules/ROOT/pages/pallets/multisig.adoc +++ b/docs/modules/ROOT/pages/pallets/multisig.adoc @@ -13,14 +13,14 @@ This module enables multi-signature operations in your runtime. It allows multip == Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/multisig/src/lib.rs#L135[{github-icon},role=heading-link] * Pallet-specific configs -** `DepositBase` -- The base amount of currency needed to reserve for creating a multisig execution or to store a dispatch call for later. Recall: The deposit to be made by the account that creates the multisig is: `threshold * DepositFactor + DepositBase` +** `DepositBase` -- The base amount of currency needed to xref:glossary.adoc#reserve[reserve] for creating a multisig execution or to store a dispatch call for later. Recall: The deposit to be made by the account that creates the multisig is: `threshold * DepositFactor + DepositBase` ** `DepositFactor` -- The amount of currency needed per unit threshold when creating a multisig execution. Recall: The deposit to be made by the account that creates the multisig is: `threshold * DepositFactor + DepositBase` ** `MaxSignatories` -- The maximum amount of signatories allowed in the multisig. * Common configs ** `RuntimeEvent` -- The overarching event type. ** `RuntimeCall` -- The overarching call type. ** `Currency` -- The currency mechanism. -** `WeightInfo` -- Weight information for extrinsics in this pallet. +** `WeightInfo` -- xref:glossary.adoc#weight[Weight] information for extrinsics in this pallet. == Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/multisig/src/lib.rs#L254[{github-icon},role=heading-link] diff --git a/docs/modules/ROOT/pages/pallets/pallet_xcm.adoc b/docs/modules/ROOT/pages/pallets/pallet_xcm.adoc index 4351c16..38853db 100644 --- a/docs/modules/ROOT/pages/pallets/pallet_xcm.adoc +++ b/docs/modules/ROOT/pages/pallets/pallet_xcm.adoc @@ -10,24 +10,11 @@ Branch/Release: `release-polkadot-v1.3.0` `pallet-xcm` is responsible for filtering, routing, and executing incoming XCM. -== Glossary - -** `Asset Teleportation` -- movement of an asset by destroying it on one side and creating a clone on the other side -** `Reserve Asset Transfer` -- When consensus systems do not have a established layer of trust over which they can transfer assets, they can opt for a trusted 3rd entity to store the assets. -** `Barrier` -- A generic filter which returns whether or not XCM may pass and be executed. If they do not pass the barrier, they are not executed. The barrier is the final filter before XCM execution. It implements the `ShouldExecute` trait and therefore takes as input an XCM and returns a bool indicating whether it should be executed. -** `Fungible Asset` -- any unit is worth the same -** `NonFungible Asset` -- each unit is worth a different amount and/or is unique in some way -** `Junction` -- single item in a path to describe a relative location (think of `dir` or `dir/$file_path` as a junction) -** `Junctions` -- multiple `Junction`s, formed only through MultiLocation construction -** `MultiAsset` -- Either an amount of a single fungible asset, or one non-fungible asset. -** `MultiLocation` -- path described by junctions leading to the location -** `MAX_ASSETS_FOR_TRANSFER` -- The maximum number of distinct assets allowed to be transferred in a single helper extrinsic. Set to 2 in this code. - == Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/polkadot/xcm/pallet-xcm/src/lib.rs#L192[{github-icon},role=heading-link] * Pallet-specific origins: ** `AdminOrigin` -- The origin that is allowed to call privileged operations on the XCM pallet. Type must implement trait `EnsureOrigin`. -** `ExecuteXcmOrigin` -- Required origin for executing XCM messages, including the teleport functionality. If successful, it returns a `MultiLocation` which exists as an interior location within this chain's XCM context. Type must implement trait `EnsureOrigin`. +** `ExecuteXcmOrigin` -- Required origin for executing XCM messages, including the teleport functionality. If successful, it returns a `xref:glossary.adoc#multilocation[MultiLocation]` which exists as an interior location within this chain's XCM context. Type must implement trait `EnsureOrigin`. ** `SendXcmOrigin` -- Required origin for sending XCM messages. If successful, it resolves to `MultiLocation`. Type must implement trait `EnsureOrigin`. * Pallet-specific ID types: @@ -36,7 +23,7 @@ Branch/Release: `release-polkadot-v1.3.0` * Pallet-specific handlers: ** `OnChargeTransaction` -- Handler for withdrawing, refunding and depositing the transaction fee. Type must implement the trait `OnChargeTransaction`. ** `Currency` -- Lockable currency used in the pallet. Type must implement the trait `LockableCurrency`. -** `Weigher` -- Measures weight consumed by XCM local execution. Type must implement the trait `WeightBounds`. +** `Weigher` -- Measures xref:glossary.adoc#weight[weight] consumed by XCM local execution. Type must implement the trait `WeightBounds`. ** `XcmExecutor` -- Means of executing XCM. Type must implement the trait `ExecuteXcm`. ** `XcmRouter` -- The type used to dispatch an XCM to its destination. Type must implement the trait `SendXcm`. @@ -47,7 +34,7 @@ Branch/Release: `release-polkadot-v1.3.0` ** `TrustedLockers` -- Returns whether or not the origin can be trusted for a specific asset. Type must implement `ContainsPair` where each pair is an `asset` and an `origin` thereby entrusting `origin` for operations relating to `asset`. * Pallet-specific converters: -** `CurrencyMatcher` -- The `MultiAsset` matcher for `Currency`. Type must implement the trait `MatchesFungible`. +** `CurrencyMatcher` -- The `xref:glossary.adoc#multiasset[MultiAsset]` matcher for `Currency`. Type must implement the trait `MatchesFungible`. ** `SovereignAccountOf` -- How to get an `AccountId` value from a `MultiLocation`, useful for handling asset locks. Type must implement `ConvertLocation`. * Pallet-specific constants: @@ -267,7 +254,7 @@ The origin must be `ExecuteXcmOrigin` for this call. - `BadOrigin` —- origin did not match `ExecuteXcm` - `BadVersion` -- `beneficiary` or `assets` have incorrect versioning -- `TooManyAssets` -- assets length exceeds MAX_ASSETS_FOR_TRANSFER +- `TooManyAssets` -- assets length exceeds MAX_ASSETS_FOR_TRANSFER which equals 2 in this code **Events:** @@ -305,7 +292,7 @@ The origin must be `ExecuteXcmOrigin` for this call. - `BadOrigin` —- origin did not match `ExecuteXcm` - `BadVersion` -- `beneficiary` or `assets` have incorrect versioning -- `TooManyAssets` -- assets length exceeds MAX_ASSETS_FOR_TRANSFER +- `TooManyAssets` -- assets length exceeds MAX_ASSETS_FOR_TRANSFER which equals 2 in this code **Events:** diff --git a/docs/modules/ROOT/pages/pallets/parachain-system.adoc b/docs/modules/ROOT/pages/pallets/parachain-system.adoc index 242081e..90976df 100644 --- a/docs/modules/ROOT/pages/pallets/parachain-system.adoc +++ b/docs/modules/ROOT/pages/pallets/parachain-system.adoc @@ -14,27 +14,21 @@ This pallet is a core element of each parachain. It will: - Process binary code upgrades - Process incoming messages from both relay chain and other parachains (if a channel is established between them) - Send outgoing messages to relay chain and other parachains -- Build collation info when requested by collator - -== Glossary - -- _Validation Code_ — the runtime binary that runs in the parachain -- _Validation Data_ — information passed from the relay chain to validate the next block -- _(Aggregated) Unincluded Segment_ — sequence of blocks that were not yet included into the relay chain state transition +- Build collation info when requested by xref:glossary.adoc#collator[collator] == Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/cumulus/pallets/parachain-system/src/lib.rs#L207[{github-icon},role=heading-link] * Pallet-specific configs: -** `OnSystemEvent` — a handler that will be called when new validation data will be set (once each block). New validation data will also be passed to it. Look to `trait OnSystemEvent` for more details. +** `OnSystemEvent` — a handler that will be called when new xref:glossary.adoc#validation_data[validation data] will be set (once each block). New validation data will also be passed to it. Look to `trait OnSystemEvent` for more details. ** `SelfParaId` — getter for a parachain id of this chain ** `OutboundXcmpMessageSource` — source of outgoing XCMP messages. It is queried in `finalize_block` and later included into collation information // it was added after 1.3.0. I am leaving it commented for the future updates // ** `DmpQueue` — a handler for the incoming *downward* messages from relay chain -** `ReservedDmpWeight` — weight reserved for DMP message processing. This config seems to be is not used as the function that processes these messages (`enqueue_inbound_downward_messages`) returns used weight. +** `ReservedDmpWeight` — xref:glossary.adoc#weight[weight] reserved for DMP message processing. This config seems to be is not used as the function that processes these messages (`enqueue_inbound_downward_messages`) returns used weight. ** `XcmpMessageHandler` — a handler for the incoming _horizontal_ messages from other parachains ** `ReservedXcmpWeight` — default weight limit for the for the XCMP message processing. May be overriden by storage `ReservedXcmpWeightOverride` . If incoming messages in block will exceed the weight limit, they won’t be processed. ** `CheckAssociatedRelayNumber` — type that implements `trait CheckAssociatedRelayNumber` . Currently there are three implementations: no check (`AnyRelayNumber`), strict increase (`RelayNumberStrictlyIncreases`), monotonic increase (`RelayNumberMonotonicallyIncreases`). It is needed to maintain some order between blocks in relay chain and parachain. -** `ConsensusHook` — this is a feature-enabled config ( for the management of the unincluded segment. Requires the implementation of `trait ConsensusHook`. There are several implementations of it, in `parachain-system` crate (`FixedCapacityUnincludedSegment`) and in `aura-ext` crate (`FixedVelocityConsensusHook`). It is needed to maintain the logic of segment length handling. +** `ConsensusHook` — this is a feature-enabled config ( for the management of the xref:glossary.adoc#unincluded_segment[unincluded segment]. Requires the implementation of `trait ConsensusHook`. There are several implementations of it, in `parachain-system` crate (`FixedCapacityUnincludedSegment`) and in `aura-ext` crate (`FixedVelocityConsensusHook`). It is needed to maintain the logic of segment length handling. * Common parameters for all pallets: ** `RuntimeEvent` ** `WeightInfo` @@ -123,7 +117,7 @@ Validate and perform the authorized upgrade. === Pallet's workflow * Block Initialization -** Remove already processed validation code +** Remove already processed xref:glossary.adoc#validation_code[validation code] ** Update `UnincludedSegment` with latest parent hash ** Cleans up `ValidationData` and other functions. ** Calculate weights for everything that was done in `on_finalize` hook diff --git a/docs/modules/ROOT/pages/pallets/proxy.adoc b/docs/modules/ROOT/pages/pallets/proxy.adoc index 33c48fa..6daea2d 100644 --- a/docs/modules/ROOT/pages/pallets/proxy.adoc +++ b/docs/modules/ROOT/pages/pallets/proxy.adoc @@ -10,24 +10,14 @@ Branch/Release: `release-polkadot-v1.3.0` This pallet enables delegation of rights to execute certain call types from one origin to another. -== Glossary - -* _Announcement_ — a statement of call hash for the proxy to execute in some future block. Required for some proxies where delay is specified -* _Delay_ — number of block that should pass from announcement before call execution -* _Delegatee_ — account that was granted call execution rights with proxy creation -* _Delegator_ — account that granted call execution rights with proxy creation -* _Proxy_ — statement of call execution rights transfer from delegator to delegatee. Specified by proxy type and delay. -* _Proxy type_ — type of calls that can be executed using this proxy. -* _Pure account_ — account that was spawned only to be a delegatee for some proxy. - == Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/proxy/src/lib.rs#L107[{github-icon},role=heading-link] * Pallet-specific configs: -** `ProxyType` -- a type that describes different variants of proxy. It must implement `Default` trait and `InstanceFilter` trait. +** `ProxyType` -- a type that describes different variants of xref:glossary.adoc#proxy[proxy]. It must implement `Default` trait and `InstanceFilter` trait. ** `ProxyDepositBase` -- a base amount of currency that defines a deposit for proxy creation. ** `ProxyDepositFactor` -- an amount of currency that will be frozen along with the `ProxyDepositBase` for each additional proxy. ** `MaxProxies` -- maximum number of proxies that single account can create. -** `MaxPending` -- maximum number of announcements that can be made per account. +** `MaxPending` -- maximum number of xref:glossary.adoc#announcement[announcements] that can be made per account. ** `CallHasher` -- a type implementing a `Hash` trait. Will be used to hash the executed call. ** `AnnouncementDepositBase` -- a base amount of currency that defines a deposit for announcement creation. ** `AnnouncementDepositFactor` -- an amount of currency that will be frozen along with the `AnnouncementDepositBase` for each additional announcement. @@ -53,7 +43,7 @@ Create a new `Proxy` that allows `delegate` to execute calls that fulfill `prox The origin must be signed for this call. -This call will take (or modify) a deposit based on number of proxies created by delegator and calculated by this formula: `ProxyDepositBase + ProxyDepositFactor * ` +This call will take (or modify) a deposit based on number of proxies created by xref:glossary.adoc#delegator[delegator] and calculated by this formula: `ProxyDepositBase + ProxyDepositFactor * ` There may not be more proxies than `MaxProxies` @@ -69,7 +59,7 @@ There may not be more proxies than `MaxProxies` - `LookupError` — delegate not found - `NoSelfProxy` — delegate and call origin is the same account - `Duplicate` — proxy already exists -- `TooMany` — too many proxies created for this delegate with this type and the same delay +- `TooMany` — too many proxies created for this delegate with this type and the same xref:glossary.adoc#delay[delay] - `InsufficientBalance` — delegator does not have enough funds for deposit for proxy creation - `LiquidityRestrictions` — account restrictions (like frozen funds or vesting) prevent from creating a deposit - `Overflow` — reserved funds overflow the currency type. Should not happen in usual scenarios. @@ -136,7 +126,7 @@ If the proxy requires an announcement before the call, this dispatchable will fa **Params:** - `real: AccountIdLookupOf` — the account on which behalf this call will be made -- `force_proxy_type: Option` — specific proxy type to get proxy for. If not specified, first one found in the storage will be used. +- `force_proxy_type: Option` — specific xref:glossary.adoc#proxy_type[proxy type] to get proxy for. If not specified, first one found in the storage will be used. - `call: Box<::RuntimeCall>` — a call to execute **Errors:** @@ -200,7 +190,7 @@ pub fn reject_announcement( Remove the given announcement. Deposit is returned in case of success. -May be called from delegator of the proxy to remove announcement made by delegatee. +May be called from delegator of the proxy to remove announcement made by xref:glossary.adoc#delegatee[delegatee]. The origin must be signed for this call. @@ -301,7 +291,7 @@ pub fn create_pure( ) ---- -This call creates a new account with a proxy issued to it from the call’s origin. +This call creates a xref:glossary.adoc#pur_account[pure account] with a proxy issued to it from the call’s origin. The origin must be signed for this call. diff --git a/docs/modules/ROOT/pages/pallets/transaction_payment.adoc b/docs/modules/ROOT/pages/pallets/transaction_payment.adoc index c553bff..4024d29 100644 --- a/docs/modules/ROOT/pages/pallets/transaction_payment.adoc +++ b/docs/modules/ROOT/pages/pallets/transaction_payment.adoc @@ -10,7 +10,7 @@ Branch/Release: `release-polkadot-v1.3.0` `pallet-transaction-payment` implements transaction fee logic. -In substrate, every transaction has an associated `call`, and each `call` has its own weight function. The weight function estimates the time it takes to execute the `call`. +In substrate, every transaction has an associated `call`, and each `call` has its own xref:glossary.adoc#weight[weight] function. The weight function estimates the time it takes to execute the `call`. `Config::WeightToFee` is a mapping between the smallest unit of compute (*Weight*) and smallest unit of fee. @@ -18,20 +18,13 @@ This pallet also exposes - how to update fees for the next block based on past fees (`Config::FeeMultiplierUpdate`) - how fees are paid (`Config::OnChargeTransaction`) -The base fee and adjusted weight and length fees constitute the _inclusion fee_, which is the minimum fee for a transaction to be included in a block. The formula of final fee: +The base fee and adjusted xref:glossary.adoc#weight_fee[weight] and xref:glossary.adoc#length_fee[length] fees constitute the _inclusion fee_, which is the minimum fee for a transaction to be included in a block. The formula of final fee: ```rust, ignore inclusion_fee = base_fee + length_fee + [fee_multiplier_update * weight_fee]; final_fee = inclusion_fee + tip; ``` The inputs are defined below in the glossary and config sections. -== Glossary - -** `Weight` -- The time it takes to execute runtime logic. By controlling the execution time that a block can consume, weight bounds the storage changes and computation per block. -** `WeightFee` -- A fee proportional to amount of weight a transaction consumes. -** `LengthFee` -- A fee proportional to the encoded length of the transaction. -** `Tip` -- An optional tip. Tip increases the priority of the transaction, giving it a higher chance to be included by the transaction queue. - == Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/pallet-transaction-payment/src/lib.rs#L445[{github-icon},role=heading-link] * Pallet-specific handlers: diff --git a/docs/modules/ROOT/pages/pallets/xcmp-queue.adoc b/docs/modules/ROOT/pages/pallets/xcmp-queue.adoc index 6468e0a..9051785 100644 --- a/docs/modules/ROOT/pages/pallets/xcmp-queue.adoc +++ b/docs/modules/ROOT/pages/pallets/xcmp-queue.adoc @@ -10,7 +10,6 @@ Branch/Release: `release-polkadot-v1.5.0` Responsible for the Queues (both incoming and outgoing) for XCMP messages. This pallet does not actually receive or send messages. Its responsibility is to place the incoming and outgoing XCMP messages in their respective queues and manage these queues. - == Config link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.5.0/cumulus/pallets/xcmp-queue/src/lib.rs#L112[{github-icon},role=heading-link] * Pallet-specific configs @@ -19,11 +18,11 @@ Responsible for the Queues (both incoming and outgoing) for XCMP messages. This ** `XcmpQueue` -- Defines max length of an XCMP message, and how `enqueue_message` should behave. ** `MaxInboundSuspended` -- The maximum number of inbound XCMP channels that can be suspended simultaneously. Any further channel suspensions will fail and messages may get dropped without further notice. Choosing a high value (1000) is okay. ** `ControllerOrigin` -- The origin that is allowed to resume or suspend the XCMP queue. -** `ControllerOriginConverter>` -- The conversion function used to attempt to convert an XCM `MultiLocation` origin to a superuser origin. This is used for allowing the superuser's queue to send messages even to paused queues. +** `ControllerOriginConverter>` -- The conversion function used to attempt to convert an XCM `xref:glossary.adoc#multilocation[MultiLocation]` origin to a superuser origin. This is used for allowing the superuser's queue to send messages even to paused queues. ** `PriceForSiblingDelivery` -- The price for delivering an XCM to a sibling parachain destination. * Common configs ** `RuntimeEvent` -- The overarching event type. -** `WeightInfo` -- The weight information of this pallet. +** `WeightInfo` -- The xref:glossary.adoc#weight[weight] information of this pallet. == Dispatchables link:https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.5.0/cumulus/pallets/xcmp-queue/src/lib.rs#L150[{github-icon},role=heading-link] diff --git a/docs/modules/ROOT/pages/runtime/xcm_executor.adoc b/docs/modules/ROOT/pages/runtime/xcm_executor.adoc index a419347..30479c8 100644 --- a/docs/modules/ROOT/pages/runtime/xcm_executor.adoc +++ b/docs/modules/ROOT/pages/runtime/xcm_executor.adoc @@ -21,7 +21,7 @@ The inner `trait Config` used to parameterize `XcmExecutor` has the following as * Handlers: - `XcmSender` -- How to send an onward XCM message. Type must implement the trait `SendXcm`. - `AssetTransactor` -- How to withdraw and deposit an asset. Type must implement the trait `TransactAsset`. -- `Trader` -- The means of purchasing weight credit for XCM execution. Type must implement the trait `WeightTrader`. +- `Trader` -- The means of purchasing xref:glossary.adoc#weight[weight] credit for XCM execution. Type must implement the trait `WeightTrader`. - `ResponseHandler` -- What to do when a response of a query is found. Type must implement the trait `OnResponse`. - `AssetTrap` -- The general asset trap handler for when assets are left in the Holding Register at the end of execution. Type must implement the trait `DropAssets`. - `AssetLocker` -- Handler for asset locking. Type must implement the trait `AssetLock`. @@ -37,7 +37,7 @@ The inner `trait Config` used to parameterize `XcmExecutor` has the following as - `IsTeleporter` -- Combinations of (Asset, Location) pairs which we trust as teleporters. Type must implement the trait `ContainsPair`. - `Aliasers` -- A list of (Origin, Target) pairs allowing a given Origin to be substituted with its corresponding Target pair. Type must implement the trait `ContainsPair`. - `Barrier` -- Whether or not to execute the XCM at all. Type must implement `ShouldExecute`. -- `UniversalAliases` -- The origin locations and specific universal junctions to which they are allowed to elevate themselves. Type must implement the trait `Contains<(MultiLocation, Junction)>`. +- `UniversalAliases` -- The origin locations and specific universal xref:glossary.adoc#junctions[junctions] to which they are allowed to elevate themselves. Type must implement the trait `Contains<(MultiLocation, Junction)>`. - `SafeCallFilter` -- The safe call filter for `Transact`. Use this type to explicitly whitelist calls that cannot undergo recursion. Type must implement the trait `Contains`. * Converters: diff --git a/docs/templates/pallet.adoc b/docs/templates/pallet.adoc index 305189d..24661f0 100644 --- a/docs/templates/pallet.adoc +++ b/docs/templates/pallet.adoc @@ -10,10 +10,6 @@ Branch/Release: `release-polkadot-v{x.x.x}` This is a freeform description of the tasks that this pallet fulfills -== Glossary - -* _Term_ -- definition of the term - == Config link:https://google.com[{github-icon},role=heading-link] * Pallet-specific configs