ayush.mishra
Wed, 20 Dec 2023 05:58:29 +0000
Ecosystem

Polkadot Release Analysis v1.5.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.5.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.5.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.

Migrations in this release:

xcmp-queue: V4

Tooling Section

Sidecar - v17.3.2

Txwrapper - v7.1.1

PolkadotJS - v10.11.1

AssetTransferApi - v0.1.4

Medium Impact

[C, P, S] pallet-xcm: add new flexible transfer_assets() call/extrinsic

PR: pallet-xcm: add new flexible `transfer_assets()` call/extrinsic by acatangiu · Pull Request #2388 · paritytech/polkadot-sdk · GitHub

Why is this important?

This PR enables easy ForeignAssets transfers using pallet-xcm.

As a part of this PR, a new extrinsic transfer_assets() has been introduced for the complex scenarios. It also reverts (limited_)reserve_transfer_assets to only allow reserve-based transfers for all assets including fees.

This PR aligns everything under either explicit reserve-transfer, explicit teleport, or this new flexible transfer_assets() which can mix and match as needed with fewer artificial constraints imposed to the user.

For more details, please check PR description.

[C, P, S] Adds derive_impl to relay-chain and parachain runtimes

PR: Adds derive_impl to relay-chain and parachain runtimes by gupnik · Pull Request #2476 · paritytech/polkadot-sdk · GitHub

Why is this important?

As a part of this PR:

1. experimental feature tag has been removed from SoloChainDefaultConfig, which provides a viable default config for solochain.

2. RelayChainDefaultConfig and ParaChainDefaultConfig has been added. At the moment, they are same as the solo one, but can change over time as needed. RelayChainDefaultConfig provides default configurations in a relay-chain environment and ParaChainDefaultConfig does the same in a parachain environment.

3. derive_impl has been added with the appropriate default config to relay and parachains.

How does this impact the Polkadot builders?

This PR contains breaking changes for both solochain and parachain developers.

1. Add derive_impl to inject default types

For Solochain:

+#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime {

For Parachain

+#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime {

2. Remove below configuration parameters from frame_system, which are injected by default after above change.

- type RuntimeCall = RuntimeCall;
- type Lookup = AccountIdLookup<AccountId, ()>;
- type Hashing = BlakeTwo256;
- type RuntimeEvent = RuntimeEvent;
- type RuntimeOrigin = RuntimeOrigin;
- type PalletInfo = PalletInfo;
- type OnNewAccount = ();
- type OnKilledAccount = ();
- type BaseCallFilter = Everything;
- type SystemWeightInfo = ();

Low Impact

[S] substrate-node: NativeElseWasmExecutor is no longer used

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

Why is this important?

As a part of this PR, NativeElseWasmExecutor has been removed from Substrate Node. This is related to #2358, where CodeExecutor was improved.

This is a breaking change. You would need to replace new_native_or_wasm_executor with new_wasm_executor::<sp_io::SubstrateHostFunctions>. Please check PR for more details.

[S] Sassafras Consensus Pallet

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

Why is this important?

As a part of this PR, a new pallet Sassafras Consensus has been introduced.

Sassafras is a constant-time block production protocol that aims to ensure that there is exactly one block produced with constant time intervals rather than multiple or none.

The PR is well described. For more details, please check PR description.

[C] Cleanup XCMP QueueConfigData

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

Why is this important?

As part of the work done of replacing the DMP pallet with the MessageQueue (#1246) for delayed execution of incoming messages, fields in QueueConfigData were marked as deprecated. This PR removes the deprecated fields along with a migration that bumps the page threshold default values.

How does this impact the Polkadot builders?

Please refer to the PR for the migration.

Related: #1795

[C,S] Contracts: use compiled rust tests

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

Why is this important?

With the upcoming RISC-V support, this PR makes it so that all our test fixtures in pallet-contracts can be used to test the new VM. A lot of the work in this PR is taking .wat code and rewriting it in Rust so that it can be compiled for the different targets (wasm, RISC-V).

Additionally, this PR include a new pallet-contracts-uapi. This crate exposes all the host functions that a contract can import in a platform independent matter (wasm vs. RISC-V) and use to interact with the environment.

Related: #2189

[C, P, S] Rework the event system of sc-network

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

Why is this important?

As a part of this PR, a new concept NotificationService has been introduced which allows Polkadot protocols to communicate with the underlying notification protocol implementation directly, without routing events through NetworkWorker.

The NotificationService concept introduces two additional benefits:

1. allow protocols to start using custom handshakes

2. allow protocols to accept/reject inbound peers

This PR also deprecates the use of NetworkEventStream for all notification-related events and going forward only DHT events are provided through NetworkEventStream. For more details, please check PR description.

Related: #512, #514, #515, #554, #556

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

2 posts - 2 participants