Skip to content

Commit 7cb59b2

Browse files
author
debot
committed
chore: regenerate chaintypes
1 parent 7416ba7 commit 7cb59b2

22 files changed

Lines changed: 620 additions & 298 deletions

packages/chaintypes/src/westend-asset-hub/consts.d.ts

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,19 +1036,6 @@ export interface ChainConsts extends GenericChainConsts {
10361036
**/
10371037
codeHashLockupDepositPercent: Perbill;
10381038

1039-
/**
1040-
* Make contract callable functions marked as `#[unstable]` available.
1041-
*
1042-
* Contracts that use `#[unstable]` functions won't be able to be uploaded unless
1043-
* this is set to `true`. This is only meant for testnets and dev nodes in order to
1044-
* experiment with new features.
1045-
*
1046-
* # Warning
1047-
*
1048-
* Do **not** set to `true` on productions chains.
1049-
**/
1050-
unsafeUnstableInterface: boolean;
1051-
10521039
/**
10531040
* Allow EVM bytecode to be uploaded and instantiated.
10541041
**/
@@ -1274,11 +1261,6 @@ export interface ChainConsts extends GenericChainConsts {
12741261
**/
12751262
maxUnlockingChunks: number;
12761263

1277-
/**
1278-
* Maximum number of invulnerable validators.
1279-
**/
1280-
maxInvulnerables: number;
1281-
12821264
/**
12831265
* Maximum allowed era duration in milliseconds.
12841266
*
@@ -1427,11 +1409,6 @@ export interface ChainConsts extends GenericChainConsts {
14271409
* Pallet `StakingRcClient`'s constants
14281410
**/
14291411
stakingRcClient: {
1430-
/**
1431-
* Maximum length of encoded session keys.
1432-
**/
1433-
maxSessionKeysLength: number;
1434-
14351412
/**
14361413
* Generic pallet constant
14371414
**/
@@ -1455,8 +1432,7 @@ export interface ChainConsts extends GenericChainConsts {
14551432
* Duration of the singed validation phase.
14561433
*
14571434
* The duration of this should not be less than `T::Pages`, and there is no point in it
1458-
* being more than `SignedPhase::MaxSubmission::get() * T::Pages`. TODO: integrity test for
1459-
* it.
1435+
* being more than `SignedPhase::MaxSubmission::get() * T::Pages`.
14601436
**/
14611437
signedValidationPhase: number;
14621438

@@ -1489,12 +1465,6 @@ export interface ChainConsts extends GenericChainConsts {
14891465
* Pallet `MultiBlockElectionVerifier`'s constants
14901466
**/
14911467
multiBlockElectionVerifier: {
1492-
/**
1493-
* The minimum amount of improvement to the solution score that defines a solution as
1494-
* "better".
1495-
**/
1496-
solutionImprovementThreshold: Perbill;
1497-
14981468
/**
14991469
* Maximum number of backers, per winner, among all pages of an election.
15001470
*

packages/chaintypes/src/westend-asset-hub/errors.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2832,6 +2832,11 @@ export interface ChainErrors extends GenericChainErrors {
28322832
**/
28332833
InvalidKeys: GenericPalletError;
28342834

2835+
/**
2836+
* Invalid ownership proof for the session keys.
2837+
**/
2838+
InvalidProof: GenericPalletError;
2839+
28352840
/**
28362841
* Delivery fees exceeded the specified maximum.
28372842
**/

packages/chaintypes/src/westend-asset-hub/events.d.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3829,15 +3829,38 @@ export interface ChainEvents extends GenericChainEvents {
38293829
>;
38303830

38313831
/**
3832-
* Target snapshot creation failed
3832+
* Target snapshot creation failed.
38333833
**/
38343834
UnexpectedTargetSnapshotFailed: GenericPalletEvent<'MultiBlockElection', 'UnexpectedTargetSnapshotFailed', null>;
38353835

38363836
/**
3837-
* Voter snapshot creation failed
3837+
* Voter snapshot creation failed.
38383838
**/
38393839
UnexpectedVoterSnapshotFailed: GenericPalletEvent<'MultiBlockElection', 'UnexpectedVoterSnapshotFailed', null>;
38403840

3841+
/**
3842+
* Phase transition could not proceed due to being out of weight.
3843+
**/
3844+
UnexpectedPhaseTransitionOutOfWeight: GenericPalletEvent<
3845+
'MultiBlockElection',
3846+
'UnexpectedPhaseTransitionOutOfWeight',
3847+
{
3848+
from: PalletElectionProviderMultiBlockPhase;
3849+
to: PalletElectionProviderMultiBlockPhase;
3850+
required: SpWeightsWeightV2Weight;
3851+
had: SpWeightsWeightV2Weight;
3852+
}
3853+
>;
3854+
3855+
/**
3856+
* Phase transition could not even begin becaseu of being out of weight.
3857+
**/
3858+
UnexpectedPhaseTransitionHalt: GenericPalletEvent<
3859+
'MultiBlockElection',
3860+
'UnexpectedPhaseTransitionHalt',
3861+
{ required: SpWeightsWeightV2Weight; had: SpWeightsWeightV2Weight }
3862+
>;
3863+
38413864
/**
38423865
* Generic pallet event
38433866
**/

packages/chaintypes/src/westend-asset-hub/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ interface ChainKnownTypes extends GenericChainKnownTypes {
5454

5555
/**
5656
* @name: WestendAssetHubApi
57-
* @specVersion: 1021003
57+
* @specVersion: 1022000
5858
**/
5959
export interface WestendAssetHubApi extends GenericSubstrateApi {
6060
rpc: ChainJsonRpcApis;

packages/chaintypes/src/westend-asset-hub/query.d.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,13 @@ export interface ChainStorage extends GenericChainStorage {
181181
blockWeight: GenericStorageQuery<() => FrameSupportDispatchPerDispatchClass>;
182182

183183
/**
184-
* Total length (in bytes) for all extrinsics put together, for the current block.
184+
* Total size (in bytes) of the current block.
185+
*
186+
* Tracks the size of the header and all extrinsics.
185187
*
186188
* @param {Callback<number | undefined> =} callback
187189
**/
188-
allExtrinsicsLen: GenericStorageQuery<() => number | undefined>;
190+
blockSize: GenericStorageQuery<() => number | undefined>;
189191

190192
/**
191193
* Map of block numbers to block hashes.
@@ -2324,15 +2326,6 @@ export interface ChainStorage extends GenericChainStorage {
23242326
**/
23252327
validatorCount: GenericStorageQuery<() => number>;
23262328

2327-
/**
2328-
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
2329-
* easy to initialize and the performance hit is minimal (we expect no more than four
2330-
* invulnerables) and restricted to testnets.
2331-
*
2332-
* @param {Callback<Array<AccountId32>> =} callback
2333-
**/
2334-
invulnerables: GenericStorageQuery<() => Array<AccountId32>>;
2335-
23362329
/**
23372330
* Map from all locked "stash" accounts to the controller account.
23382331
*

packages/chaintypes/src/westend-asset-hub/runtime.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import type {
99
Result,
1010
UncheckedExtrinsicLike,
1111
UncheckedExtrinsic,
12-
Bytes,
1312
BytesLike,
13+
Bytes,
1414
AccountId32Like,
1515
AccountId32,
1616
U256,
@@ -30,6 +30,7 @@ import type {
3030
SpInherentsCheckInherentsResult,
3131
SpRuntimeTransactionValidityValidTransaction,
3232
SpRuntimeTransactionValidityTransactionSource,
33+
SpSessionRuntimeApiOpaqueGeneratedSessionKeys,
3334
SpCoreCryptoKeyTypeId,
3435
StagingXcmV5Location,
3536
PalletTransactionPaymentRuntimeDispatchInfo,
@@ -358,9 +359,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
358359
* Returns the concatenated SCALE encoded public keys.
359360
*
360361
* @callname: SessionKeys_generate_session_keys
362+
* @param {BytesLike} owner
361363
* @param {BytesLike | undefined} seed
362364
**/
363-
generateSessionKeys: GenericRuntimeApiMethod<(seed?: BytesLike | undefined) => Promise<Bytes>>;
365+
generateSessionKeys: GenericRuntimeApiMethod<
366+
(owner: BytesLike, seed?: BytesLike | undefined) => Promise<SpSessionRuntimeApiOpaqueGeneratedSessionKeys>
367+
>;
364368

365369
/**
366370
* Decode the given public session keys.

packages/chaintypes/src/westend-asset-hub/tx.d.ts

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,10 @@ export interface ChainTx<
712712
>;
713713

714714
/**
715-
* Cancel an anonymously scheduled task.
715+
* Cancel a scheduled task (named or anonymous), by providing the block it is scheduled for
716+
* execution in, as well as the index of the task in that block's agenda.
717+
*
718+
* In the case of a named task, it will remove it from the lookup table as well.
716719
*
717720
* @param {number} when
718721
* @param {number} index
@@ -864,6 +867,8 @@ export interface ChainTx<
864867
* original task's configuration, but will have a lower value for `remaining` than the
865868
* original `total_retries`.
866869
*
870+
* This call **cannot** be used to set a retry configuration for a named task.
871+
*
867872
* @param {[number, number]} task
868873
* @param {number} retries
869874
* @param {number} period
@@ -899,6 +904,8 @@ export interface ChainTx<
899904
* original task's configuration, but will have a lower value for `remaining` than the
900905
* original `total_retries`.
901906
*
907+
* This is the only way to set a retry configuration for a named task.
908+
*
902909
* @param {FixedBytes<32>} id
903910
* @param {number} retries
904911
* @param {number} period
@@ -1753,14 +1760,16 @@ export interface ChainTx<
17531760
session: {
17541761
/**
17551762
* Sets the session key(s) of the function caller to `keys`.
1763+
*
17561764
* Allows an account to set its session key prior to becoming a validator.
17571765
* This doesn't take effect until the next session.
17581766
*
1759-
* The dispatch origin of this function must be signed.
1760-
*
1761-
* ## Complexity
1762-
* - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
1763-
* fixed.
1767+
* - `origin`: The dispatch origin of this function must be signed.
1768+
* - `keys`: The new session keys to set. These are the public keys of all sessions keys
1769+
* setup in the runtime.
1770+
* - `proof`: The proof that `origin` has access to the private keys of `keys`. See
1771+
* [`impl_opaque_keys`](sp_runtime::impl_opaque_keys) for more information about the
1772+
* proof format.
17641773
*
17651774
* @param {AssetHubWestendRuntimeSessionKeys} keys
17661775
* @param {BytesLike} proof
@@ -1791,10 +1800,6 @@ export interface ChainTx<
17911800
* means being a controller account) or directly convertible into a validator ID (which
17921801
* usually means being a stash account).
17931802
*
1794-
* ## Complexity
1795-
* - `O(1)` in number of key types. Actual cost depends on the number of length of
1796-
* `T::Keys::key_ids()` which is fixed.
1797-
*
17981803
**/
17991804
purgeKeys: GenericTxCall<
18001805
() => ChainSubmittableExtrinsic<
@@ -3074,7 +3079,9 @@ export interface ChainTx<
30743079
* Register approval for a dispatch to be made from a deterministic composite account if
30753080
* approved by a total of `threshold - 1` of `other_signatories`.
30763081
*
3077-
* If there are enough, then dispatch the call.
3082+
* **If the approval threshold is met (including the sender's approval), this will
3083+
* immediately execute the call.** This is the only way to execute a multisig call -
3084+
* `approve_as_multi` will never trigger execution.
30783085
*
30793086
* Payment: `DepositBase` will be reserved if this is the first approval, plus
30803087
* `threshold` times `DepositFactor`. It is returned once this dispatch happens or
@@ -3090,8 +3097,9 @@ export interface ChainTx<
30903097
* transaction index) of the first approval transaction.
30913098
* - `call`: The call to be executed.
30923099
*
3093-
* NOTE: Unless this is the final approval, you will generally want to use
3094-
* `approve_as_multi` instead, since it only requires a hash of the call.
3100+
* NOTE: For intermediate approvals (not the final approval), you should generally use
3101+
* `approve_as_multi` instead, since it only requires a hash of the call and is more
3102+
* efficient.
30953103
*
30963104
* Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise
30973105
* on success, result is `Ok` and the result from the interior call, if it was executed,
@@ -3146,6 +3154,13 @@ export interface ChainTx<
31463154
* Register approval for a dispatch to be made from a deterministic composite account if
31473155
* approved by a total of `threshold - 1` of `other_signatories`.
31483156
*
3157+
* **This function will NEVER execute the call, even if the approval threshold is
3158+
* reached.** It only registers approval. To actually execute the call, `as_multi` must
3159+
* be called with the full call data by any of the signatories.
3160+
*
3161+
* This function is more efficient than `as_multi` for intermediate approvals since it
3162+
* only requires the call hash, not the full call data.
3163+
*
31493164
* Payment: `DepositBase` will be reserved if this is the first approval, plus
31503165
* `threshold` times `DepositFactor`. It is returned once this dispatch happens or
31513166
* is cancelled.
@@ -3160,7 +3175,8 @@ export interface ChainTx<
31603175
* transaction index) of the first approval transaction.
31613176
* - `call_hash`: The hash of the call to be executed.
31623177
*
3163-
* NOTE: If this is the final approval, you will want to use `as_multi` instead.
3178+
* NOTE: To execute the call after approvals are gathered, any signatory must call
3179+
* `as_multi` with the full call data. This function cannot execute the call.
31643180
*
31653181
* ## Complexity
31663182
* - `O(S)`.
@@ -11536,26 +11552,6 @@ export interface ChainTx<
1153611552
>
1153711553
>;
1153811554

11539-
/**
11540-
* Set the validators who cannot be slashed (if any).
11541-
*
11542-
* The dispatch origin must be Root.
11543-
*
11544-
* @param {Array<AccountId32Like>} invulnerables
11545-
**/
11546-
setInvulnerables: GenericTxCall<
11547-
(invulnerables: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
11548-
{
11549-
pallet: 'Staking';
11550-
palletCall: {
11551-
name: 'SetInvulnerables';
11552-
params: { invulnerables: Array<AccountId32Like> };
11553-
};
11554-
},
11555-
ChainKnownTypes
11556-
>
11557-
>;
11558-
1155911555
/**
1156011556
* Force a current staker to become completely unstaked, immediately.
1156111557
*
@@ -13089,16 +13085,17 @@ export interface ChainTx<
1308913085
* Set session keys for a validator. Keys are validated on AssetHub and forwarded to RC.
1309013086
*
1309113087
* **Validation on AssetHub:**
13092-
* Keys are decoded as `T::RelayChainSessionKeys` to ensure they match RC's expected
13093-
* format. This prevents malicious validators from bloating the XCM queue with garbage
13094-
* data.
13088+
* - Keys are decoded as `T::RelayChainSessionKeys` to ensure they match RC's expected
13089+
* format.
13090+
* - Ownership proof is validated using `OpaqueKeys::ownership_proof_is_valid`.
13091+
*
13092+
* If validation passes, only the validated keys are sent to RC (with empty proof),
13093+
* since RC trusts AH's validation. This prevents malicious validators from bloating
13094+
* the XCM queue with garbage data.
1309513095
*
1309613096
* This, combined with the enforcement of a high minimum validator bond, makes it
1309713097
* reasonable not to require a deposit.
1309813098
*
13099-
* Note: Ownership proof validation requires PR #1739 which is not backported to
13100-
* stable2512. The proof parameter will be added when that PR is backported.
13101-
*
1310213099
* **Fees:**
1310313100
* The actual cost of this call is higher than what the weight-based fee estimate shows.
1310413101
* In addition to the local transaction weight fee, the stash account is charged an XCM
@@ -13119,18 +13116,20 @@ export interface ChainTx<
1311913116
* set keys before declaring intent to validate will fail with NotValidator.
1312013117
*
1312113118
* @param {BytesLike} keys
13119+
* @param {BytesLike} proof
1312213120
* @param {bigint | undefined} maxDeliveryAndRemoteExecutionFee
1312313121
**/
1312413122
setKeys: GenericTxCall<
1312513123
(
1312613124
keys: BytesLike,
13125+
proof: BytesLike,
1312713126
maxDeliveryAndRemoteExecutionFee: bigint | undefined,
1312813127
) => ChainSubmittableExtrinsic<
1312913128
{
1313013129
pallet: 'StakingRcClient';
1313113130
palletCall: {
1313213131
name: 'SetKeys';
13133-
params: { keys: BytesLike; maxDeliveryAndRemoteExecutionFee: bigint | undefined };
13132+
params: { keys: BytesLike; proof: BytesLike; maxDeliveryAndRemoteExecutionFee: bigint | undefined };
1313413133
};
1313513134
},
1313613135
ChainKnownTypes

0 commit comments

Comments
 (0)