alejandro
Fri, 26 Jan 2024 17:10:48 +0000
Ecosystem

Polkadot Release Analysis v1.6.0

The following report is not an exhaustive list of changes included in the release, but a set of changes that we felt deserved to be highlighted due to their impact on the Polkadot ecosystem builders.

Please do not stop reading the release notes v1.6.0. This report is complementary to the changelogs, not a replacement.

Highlights are categorized into High Impact, Medium Impact, and Low Impact for ease of navigation.
Also there is a section related to all note worthy changes related to tooling integration.

Help us improve the release analysis by filling out this 6 question survey.

Summary

In the following report we are featuring some of the changes included in the polkadot node release 1.6.0. All the runtime changes that are part of this release will be included in the corresponding runtime release done by the polkadot technical fellowship.

Tooling Section

Sidecar - v17.4.0

Txwrapper - v7.2.0

PolkadotJS - v10.11.2

AssetTransferApi - v0.1.6

Medium Impact

[S,C] pallet-asset-conversion: Decoupling Native Currency Dependancy

PR: https://github.com/paritytech/polkadot-sdk/pull/2031

Why is this important?

The changes in this PR enable pallet-asset-conversion to not be tied to the existance of a native currency. One of the reasons driving these changes is the ambition to create a more user-friendly API for the SwapCredit implementation.

How does this impact the Polkadot builders?

The above mentioned pallet received changes on several types of its Config trait. Removal of certain errors and inclusion of new ones, with changes on their indices. And changes in function signatures of some of the calls, mainly due to the change of MultiAssetId to AssetKind.

Please, review the changes and update your runtime accordingly.

Related PRs

#1677 pallet-asset-conversion: Swap Credit

#2033 UnionOf types for merged fungible and fungibles implementations

#1876 Resolve Credit to Account impls of OnUnbalanced trait

[P,C] Rename ExportGenesisStateCommand to ExportGenesisHeadCommand and make it respect custom genesis block builders

PR: https://github.com/paritytech/polkadot-sdk/pull/2331

Why is this important?

The export-genesis-state subcommand is now called export-gensis-head, but export-genesis-state stays as an alias to not break any scripts.

Also, when requested for the genesis head like with the above mentioned subcommand, cumulus will now read the genesis block from the database instead of generating it on the fly independently of an existing database or not.

[S,P] Staking: Add deprecate_controller_batch AdminOrigin call

PR: https://github.com/paritytech/polkadot-sdk/pull/1677

Why is this important?

Adds a new call deprecate_controller_batch which Updates a batch of controller accounts to their corresponding stash account if they are not the same.

How does this impact the Polkadot builders?

A new type is added to pallet-staking Config trait:

/// The maximum amount of controller accounts that can be deprecated in one call.
type MaxControllersInDeprecationBatch: Get<u32>;

deprecate_controller_batch has the call index 28 and its dispatch origin must be T::AdminOrigin.

[S,P] pallet-vesting: Configurable block number provider

PR: https://github.com/paritytech/polkadot-sdk/pull/2403

Why is this change interesting for builders?

Adds BlockNumberProvider type to pallet-vesting Config trait, allowing for custom providers instead of hardcoding frame-system.

This is particularly useful for parachains wanting to use cumulus_pallet_parachain_system::RelaychainDataProvider with pallet-vesting.

[S,C] Tasks: general system for recognizing and executing service work

PR: https://github.com/paritytech/polkadot-sdk/pull/1343

Why is this important?

This change includes means to describe a Task in the runtime together with its conditions of execution, so that offchain elements, as off-chain workers, the block builder or a script, can trigger this execution.

These facilitate the implementation of use cases as lazy migrations.

Why is this change interesting for builders?

#[pallet:tasks_experimental] provides a convenient way to define such work items. It can be attached to an impl block inside a pallet, whose functions can then be annotated by the following attributes:

#[pallet::task_list]: Define an iterator over the available work items for a task

#[pallet::task_condition]: Define the conditions for a given work item to be valid

#[pallet::task_weight]: Define the weight of a given work item

#[pallet::task_index]: Define the index of a given work item

Each such function becomes a variant of the autogenerated enum Task<T> for this pallet.
All such enums are aggregated into a RuntimeTask by construct_runtime.

Code Snippets

Please, find an example here.

Low Impact

[S] pallet-sudo: Accept Root origin as valid sudo

PR: pallet-sudo: Accept `Root` origin as valid sudo by bkchr · Pull Request #2783 · paritytech/polkadot-sdk · GitHub

Why is this important?

Calls from pallet-sudo will now also accept the Root origin as valid sudo origin.

How does this impact the Polkadot builders?

This enhancement is useful for parachains that allow the relay chain as a superuser. It enables the relay chain to send an XCM message to initialize the sudo key.

[S,P,C] Add Authorize Upgrade Pattern to Frame System

PR: https://github.com/paritytech/polkadot-sdk/pull/2682

Why is this important?

Adds the authorize_upgrade → enact_authorized_upgrade pattern to frame-system. This will be useful for upgrading bridged chains that are under the governance of Polkadot without passing entire runtime Wasm blobs over a bridge.

How does this impact the Polkadot builders?

enact_authorized_upgrade has been changed to apply_authorized_upgrade.

Left calls in parachain-system and marked as deprecated to prevent breaking the API. They
just call into the frame-system functions.

Deprecated calls will be removed no earlier than June 2024.

Updated frame-system benchmarks to v2 syntax.

[S] [NPoS] Remove better solution threshold for unsigned submissions

PR: https://github.com/paritytech/polkadot-sdk/pull/2694

Why is this important?

The pallet-election-provider-multiphase constant BetterUnsignedThreshold is removed from its Config trait. Meaning that any solution submitted by the validator that is strictly better than the current queued solution would be accepted.

[S,P,C] Add FungibleAdapter

PR: https://github.com/paritytech/polkadot-sdk/pull/2684

How does this impact the Polkadot builders?

CurrencyAdapter is marked as deprecated, and FungibleAdapter is added. The substitution will be made in a future separate MR.

This change continues moving the code base away from the old Currency traits.

[S] pallet-uniques: Move migration over to VersionedMigration

PR: pallet-uniques: Move migration over to `VersionedMigration` by bkchr · Pull Request #2687 · paritytech/polkadot-sdk · GitHub

Why is this important?

The migration from pallet-uniques migrate_to_v1 is moved to MigrateV0ToV1. Allowing for this new one to be used directly instead of having to create custom OnRuntimeUpgrade including the previous one.

Your friendly neighborhood Polkadot Release Analysis team, @alejandro @ayush.mishra @bruno

2 posts - 1 participant