All chains
    Preparing search index...
    set_keys: TxDescriptor<
        {
            keys: Binary;
            max_delivery_and_remote_execution_fee?: bigint;
            proof: Binary;
        },
    >

    Set session keys for a validator. Keys are validated on AssetHub and forwarded to RC.

    On the first call, a deposit of KeyDeposit is held from the stash. Subsequent calls do not charge again. The deposit is released on purge_keys.

    Validation on AssetHub:

    • Keys are decoded as T::RelayChainSessionKeys to ensure they match RC's expected format.

    If validation passes, only the validated keys are sent to RC (with empty proof), since RC trusts AH's validation.

    Note: Ownership proof validation requires PR #1739 which is not backported to stable2512. The proof parameter will be added when that PR is backported.

    Fees: The actual cost of this call is higher than what the weight-based fee estimate shows. In addition to the local transaction weight fee, the stash account is charged an XCM fee (delivery + RC execution cost) via XcmExecutor::charge_fees. The relay chain uses UnpaidExecution, so the full remote cost is charged upfront on AssetHub.

    When called via a staking proxy, the proxy pays the transaction weight fee, while the stash (delegating account) pays the XCM fee.

    Max Fee Limit: Users can optionally specify max_delivery_and_remote_execution_fee to limit the delivery + RC execution fee. This does not include the local transaction weight fee. If the fee exceeds this limit, the operation fails with FeesExceededMax. Pass None for unlimited (no cap).

    NOTE: unlike the current flow for new validators on RC (bond -> set_keys -> validate), users on Asset Hub MUST call bond and validate BEFORE calling set_keys. Attempting to set keys before declaring intent to validate will fail with NotValidator.