Polkadot Release Analysis v1.6.0

Polkadot Release Analysis v1.6.0

:warning: 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.

:hammer_and_wrench: Tooling Section


:warning: 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


[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: pallet-vesting: Configurable block number provider by arrudagates · Pull Request #2403 · paritytech/polkadot-sdk · GitHub

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: Tasks: general system for recognizing and executing service work by sam0x17 · Pull Request #1343 · paritytech/polkadot-sdk · GitHub

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.


:information_source: 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: Add Authorize Upgrade Pattern to Frame System by joepetrowski · Pull Request #2682 · paritytech/polkadot-sdk · GitHub

Why is this important?

Adds the authorize_upgradeenact_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: [NPoS] Remove better solution threshold for unsigned submissions by Ank4n · Pull Request #2694 · paritytech/polkadot-sdk · GitHub

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: Add FungibleAdapter by franciscoaguirre · Pull Request #2684 · paritytech/polkadot-sdk · GitHub

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

1 Like

I’d like to take a moment to mention that this will be the last publication of the Release Analysis. Giving way to a new and improved version of providing the ecosystem with the latest changes! An automated flavor with details coming directly from the authors of the changes and dedicated audiences.

Many kudos to @chevdor for taking it to the next level with the prdocs. I can’t wait to see them as part of the future releases.
And many thanks to my colleagues @ayush.mishra and @bruno for helping to bring you these posts with each release.

We hope you all have found these reports useful during their lifespan! :heart:

4 Likes