Skip to content

Releases: paritytech/polkadot-sdk

Polkadot v1.14.1

26 Jul 09:28
7c4cd60
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.14.0 to polkadot-v1.14.1.

Changelog

Changelog for Node Operator

ℹ️ These changes are relevant to: Those who don't write any code and only run code.

[#5040]: Update libp2p-websocket to v0.42.2

Fixes a panic coming from the libp2p-websocket which stops the node.
This fix ensures that polling multiple time after error results in an error instead of panics.

Rust compiler versions

This release was built and tested against the following versions of rustc.
Other versions may work.

  • Rust Stable: "1.77.0"

Docker images

The docker images for the polkadot node binary and the polkadot-parachain binary can be found at Docker hub (will be available a few minutes after the release has been published):

You may also pull it with:

docker pull parity/polkadot:latest

or

docker pull parity/polkadot-parachain:latest

Polkadot v1.14.0

02 Jul 13:55
3649614
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.13.0 to polkadot-v1.14.0.

Changelog

Changelog for Node Dev

ℹ️ These changes are relevant to: Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself.

[#4724]: Fix core sharing and make use of scheduling_lookahead during backing

Core sharing (two or more parachains scheduled on the same core with interlaced assignments) was not working correctly.
Adds the neccessary fixes to the backing subsystems. Moreover, adds support for backing collations which are built and advertised ahead of time (with up to scheduling_lookahead relay chain blocks in advance).

[#4833]: Reinitialize should allow to override existing config in collationGeneration

The Reinitialize collationGeneration subsystem message currently fails if no other config is already set.
As it is difficult to query the collationGeneration subsystem to check when to call Initialize or Reinitialize, this PR proposes that Reinitialize overrides the configuration regardless if there was one already set.

[#4730]: rpc upgrade jsonrpsee to v0.23.1

Upgrade the rpc library jsonrpsee to v0.23.1 to utilize:

  • Add Extensions which we now is using to get the connection id (used by the rpc spec v2)
  • Update hyper to v1.0, http v1.0, soketto and related crates (hyper::service::make_service_fn is removed)
  • The subscription API for the client is modified to know why a subscription was closed.

[#4618]: Unify logic for fetching the :code of a block

Client::code_at will now use the same substitute to determine the code for a given block as it is done when executing any runtime call.

[#4844]: Make Verifier::verify and BlockImport::check_block use &self instead of &mut self

Verifier::verify and BlockImport::check_block were refactored to use &self instead of &mut self because there is no fundamental requirement for those operations to be exclusive in nature.

[#4733]: Add pov-recovery unit tests and support for elastic scaling

Adds unit tests for cumulus pov-recovery and support for elastic scaling (recovering multiple candidates in a single relay chain block).

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#3940]: RFC-5: Add request revenue info

Partially implemented RFC-5 in terms of revenue requests and notifications

[#3679]: [pallet-contracts] bump wasmi to 0.32

[#4831]: treasury pallet: - remove unused config parameters

Remove unused config parameters ApproveOrigin and OnSlash from the treasury pallet.
Add OnSlash config parameter to the bounties and tips pallets.

[#3843]: Introduce a new dispatchable function set_partial_params in pallet-core-fellowship

This PR adds a new dispatchable function set_partial_params to update config with multiple arguments without duplicating the
fields that does not need to update.

[#4769]: Use real rust type for pallet alias in runtime macro

This PR adds the ability to use a real rust type for pallet alias in the new runtime macro:

#[runtime::pallet_index(0)]
pub type System = frame_system::Pallet<Runtime>;

Please note that the current syntax still continues to be supported.

[#4684]: Refactor of the parachain template

Introduce the construct runtime V2 to the parachain template runtime. In addition, url links in the parachain pallet template now direct to the polkadot sdk docs.

[#3951]: Pallet Assets Freezer

This pallet is an extension of pallet-assets, supporting freezes similar to pallet-balances.
To use this pallet, set Freezer of pallet-assets Config to the according instance of pallet-assets-freezer.

[#4757]: pallet assets: optional auto-increment for the asset ID

Introduce an optional auto-increment setup for the IDs of new assets.

[#4807]: pallet ranked collective: max member count per rank

Configuration for the maximum member count per rank, with the option for no limit.

[#4596]: Frame: Consideration trait generic over Footprint and handles zero cost

Consideration trait generic over Footprint and can handle zero cost for a give footprint.

Consideration trait is generic over Footprint (currently defined over the type with the same name). This makes it possible to setup a custom footprint (e.g. current number of proposals in the storage).

Consideration::new and Consideration::update return an Option<Self> instead Self, this make it possible to define no cost for a specific footprint (e.g. current number of proposals in the storage < max_proposal_count / 2).

[#4710]: Dont partially modify HRMP pages

The xcmp-queue pallet now does not partially modify a page anymore when the next message does not fully fit into it but instead cleanly creates a new one.

[#4765]: CheckWeight - account for extrinsic len as proof size

This changes how CheckWeight extension works. It will now account for the extrinsic length as proof size. When on_idle is called, the remaining weight parameter reflects this.

[#4513]: Removed pallet::getter usage from pallet-elections-phragmen

This PR removed the pallet::getters from pallet-elections-phragmen.
The syntax StorageItem::<T, I>::get() should be used instead.

[#4865]: Implement trait ContainsLengthBound for pallet-membership

Implement trait ContainsLengthBound for pallet membership otherwise we can't use it with pallet-tips without wrapper

[#4857]: [xcm] runtime api for LocationToAccount conversions

Introduces a new runtime API to help with conversions of XCM Location to the runtime's AccountId, showing an Ss58 formatted address for easier verification.

Besides that, the xcm-fee-payment-runtime-api module was merged into the new xcm-runtime-apis.
If you are using the xcm-fee-payment-runtime-api dependency, you just need to change it to xcm-runtime-apis and update the imports from use xcm_fee_payment_runtime_api::* to use xcm_runtime_apis::*.

[#4756]: Do not make pallet-nfts benchmarks signature-dependent

  • Adds extra functionality to pallet-nfts's BenchmarkHelper to provide signers and sign message.
  • Abstracts away the explicit link with Sr25519 schema in the benchmarks, allowing parachains with a different one to be able to run them and calculate the weights.
  • Adds a default implementation for the empty tuple that leaves the code equivalent.

[#3828]: [FRAME] Remove storage migration type

Introduce migration type to remove data associated with a specific storage of a pallet.

[#3374]: removed pallet::getter from pallet-timestamp

This PR removes all the pallet::getter usages from pallet-timestamp, and updates depdendant runtimes accordingly.
The syntax StorageItem::<T, I>::get() should be used instead.

Changelog for Node Operator

ℹ️ These changes are relevant to: Those who don't write any code and only run code.

[#4662]: Cleanup PVF artifact by cache limit and stale time

Extend the PVF artifacts cleanup strategy. Previously, we pruned artifacts that were stale more than 24 hours.
After this change we attempt pruning artifacts only when they reach the 10 GB cache limit. If the least used artifact is stale less than 24 hours we don't remove it.

[#4685]: Chain-spec-builder supports codeSubstitutes.

A new subcommand add-code-substitute is available for the chain-spec-builder binary. It allows users to provide a runtime that should be used from a given block onwards. The codeSubstitutes field in the chain spec is used to force usage of a given runtime at a given block until the next runtime upgrade. It can be used to progress chains that are stalled due to runtime bugs that prevent block-building. However, parachain usage is only possible in combination with an updated validation function on the relay chain.

[#4618]: Unify logic for fetching the :code of a block

Fixes an issue on parachains when running with a custom substitute of the on chain wasm code and having replaced the wasm code on the relay chain. The relay chain was rejecting blocks build this way, because the collator was reporting the actual on chain wasm code hash to the relay chain. However, the relay chain was expecting the code hash of the wasm code substitute that was also registered on the relay chain.

[#4802]: Add health/readiness endpoint to the rpc server

Add /health/readiness endpoint to the rpc server which returns HTTP status code 200 if the chain is synced and can connect to the rest of the network otherwise status code 500 is returned.
The endpoint can be reached by performing a HTTP GET request to the endpoint such as $ curl <endpoint>/health/readiness

[#4799]: network: Upgrade litep2p to v0.6.0

This PR brings the latest litep2p v0.6.0 to polkadot-sdk with stability improvements, security fixes, and performance optimizations.

Specifically:

  • Incoming DHT records ...
Read more

Polkadot v1.13.0

12 Jun 15:41
d5160c1
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.12.0 to polkadot-v1.13.0.

Changelog

Changelog for Node Dev

ℹ️ These changes are relevant to: Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself.

[#4431]: Statement-Distribution validator disabling changes

In preparation for launching re-enabling (#2418), we need to adjust the disabling strategy of statement-distribution to use the relay parent's state instead of the latest state (union of active leaves). This will also ensure no raciness of getting the latest state vs accepting statements from disabling validators at the cost of being more lenient/potentially accepting more statements from disabled validators.

[#4410]: [sc-chain-spec] Remove deprecated code

The RuntimeGenesisConfig generic type parameter was removed from GenericChainSpec struct.
ChainSpec::from_genesis method was removed.
Removed related deprecated code from sc-chain-spec.
This change simplifies the codebase and ensures the use of up-to-date definitions.

[#4555]: Move para_id to MockValidationDataInherentDataProvider

This moves the para_id from MockXcmConfig to MockValidationDataInherentDataProvider to make it more prominent. The para_id should be set to the parachain id of the parachain that gets mocked to ensure that the relay chain storage proof is setup correctly etc.

[#4595]: Remove elastic-scaling-experimental feature flag

The feature was masking the ability of collators to respond with CollationWithParentHeadData to validator collation fetch requests, a requirement for elastic scaling.
Please note that CollationWithParentHeadData is only sent by collators of parachains with multiple cores assigned, otherwise collators must respond with CollationFetchingResponse::Collation

[#1644]: Add availability-recovery from systematic chunks

Implements polkadot-fellows/RFCs#47 and adds the logic for availability recovery from systematic chunks.
The /req_chunk/1 req-response protocol is now considered deprecated in favour of /req_chunk/2. Systematic recovery is guarded by a configuration bit in the runtime (bit with index 2 of the node_features field from the HostConfiguration) and must not be enabled until all (or almost all) validators have upgraded to the node version that includes this PR.

[#4471]: Remove prospective-parachains subsystem from collator nodes

Removes the prospective-parachains subsystem from collators. The GetMinimumRelayParents of the implicit view is replaced by direct ChainAPI and runtime calls. The subsystem was causing performance problems when collating connected to an RPC node, due to the high number of runtime API calls, which were unneccessary for a collator.

[#4198]: Replace Multiaddr & related types with substrate-specific types

Introduce custom types / substrate wrappers for Multiaddr, multiaddr::Protocol, Multihash, ed25519::* and supplementary еypes like errors and iterators.
Common code in substrate uses these custom types, while libp2p & litep2p network backends use their corresponding libraries types.
This is needed to independently upgrade libp2p & litep2p dependencies.

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#3935]: Introduce Polkadot-SDK umbrella crate

Introduces a new "umbrella" crate that re-exports all published crates of the Polkadot-SDK.
This helps developers to select a valid set of versions for all underlying dependencies.

You can now use this create and remove lots of dependencies from your runtime and node crates.
The staging-node-cli and kitchensink-runtime both adopt this pattern as an example.

Full docs in docs/sdk/src/reference_docs/umbrella_crate.rs.

[#4646]: [Identity] Remove double encoding username signature payload

The signature payload for setting a username for an account in pallet-identity is now just the raw bytes of said username (still including the suffix), removing the need to first encode these bytes before signing.

[#4510]: [Contracts] Remove internal topic index

This PR removes topics from internal events emitted by pallet_contracts. It does not touch the deposit_event host function used by
smart contracts that can still include topics.
Event topics incurs significant Storage costs, and are only used by light clients to index events and avoid downloading the entire block.
They are not used by Dapp or Indexers that download the whole block anyway.

[#4392]: Remove pallet::getter usage from both bounties and child bounties pallet

This PR removes pallet::getters from pallet-bounties and pallet-child-bounties.
The syntax StorageItem::<T, I>::get() should be used instead.

[#4444]: Rococo AH: cleanup storage

Remove old storage that is left over in the Rococo AH storage.

[#4514]: Removed pallet::getter usage from pallet-fast-unstake

This PR removed the pallet::getters from pallet-fast-unstake.
The syntax StorageItem::<T, I>::get() should be used instead.

[#3952]: Storage bound the XCMP queue pallet

Enforce upper limits for the number of active XCMP channels, the number of outgoing XCMP messages per channel and the number of signals per channel.

Integration

If you see this error in your try-runtime-cli:

Max message size for channel is too large. 
This means that the V5 migration can be front-run and an attacker could place a large message just right before the migration to make other messages un-decodable.
Please either increase `MaxPageSize` or decrease the `max_message_size` for this channel. 
Channel max: 102400, MaxPageSize: 65535

Then increase the MaxPageSize of the cumulus_pallet_xcmp_queue to something like this:

type MaxPageSize = ConstU32<{ 103 * 1024 }>;

[#4380]: Remove parametrized-consensus-hook feature

parametrized-consensus-hook feature is obsolete and is removed by this PR. The long-deprecated CheckInherents trait is set to be removed by September 2024.

[#4465]: Bridge: added force_set_pallet_state call to pallet-bridge-grandpa

Added force_set_pallet_state to the pallet-bridge-grandpa. It is only callable by the root (governance or sudo) and may be used to update current authorities set and the best finalized header without any additional checks.

[#3905]: Allows Nomination Pool to use different staking strategies including a new DelegateStake strategy.

This PR introduces a new staking strategy called DelegateStake. This strategy allows the nomination pool to delegate its stake to a validator, that is, funds are locked in user account itself instead of being transferred to the pool account. Includes migration of pools to this strategy for Westend.

[#4274]: Introduce CheckMetadataHash signed extension

Introduces the new CheckMetadataHash signed extension. This extension can be added to a runtime to support verifying the metadata hash as described in RFC78.
This removes the requirement for having a metadata portal and in general a centralized authentication of the metadata. With this signed extension the runtime is able to verify that the metadata used by the wallet was correct. This is mainly useful for offline wallets which users need to trust any way, not that useful for online wallets.

There is a guide generate_metadata_hash for how to integrate this into a runtime that should make it quite easy to integrate the signed extension.

[#4472]: Remove pallet::getter usage from pallet-democracy

This PR removes the pallet::getters from pallet-democracy.
The syntax StorageItem::<T, I>::get() should be used instead.

[#4634]: Implement XcmPaymentApi and DryRunApi on all system parachains

The new XcmPaymentApi and DryRunApi have been implement on all westend and rococo system parachains.
These can be used to build UIs that estimate XCM execution and sending, using libraries like PAPI or PJS.

[#4233]: [pallet_contracts] Update Host fn benchnmarks

Update how the host functions are benchmarked.
Instead of benchnarking a contract that calls the host functions, we now benchmark the host functions directly.

[#4249]: Moves runtime macro out of experimental flag

Now that the runtime macro (Construct Runtime V2) has been successfully deployed on Westend, this PR moves it out of the experimental feature flag and makes it generally available for runtime devs.

[#4475]: Deprecate dmp-queue pallet

Schedule the DMP queue pallet for deletion. It is not needed anymore sine #1246.

[#4521]: AdaptPrice trait is now price controlled

The broker pallet price adaptation interface is changed to be less opinionated and more information is made available to the AdaptPrice trait. A new example impl is included which adapts the price based not on the number of cores sold, but rather on the price that was achieved during the sale to mitigate a potential price manipulation vector. More information here: #4360

[#4571]: Ignore mandatory extrinsics in total PoV size check

The CheckWeight extension is checking that extrinsic length and ...

Read more

Polkadot v1.12.0

21 May 13:29
b401690
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.11.0 to polkadot-v1.12.0.

Changelog

Changelog for Node Dev

ℹ️ These changes are relevant to: Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself.

[#4442]: Improve mock relay in --dev mode to support async backing

Support async backing in --dev mode. Improve the relay mock MockValidationDataInherentDataProvider to mach expectations of async backing runtimes.

[#4185]: State trie migration on asset-hub westend and collectives westend

On westend and rococo asset-hub and collectives westend the state version is switched to one
and a manual migration will be operate as describe in https://hackmd.io/JagpUd8tTjuKf9HQtpvHIQ
2.2 Running the signed migration with account 5F4EbSkZz18X36xhbsjvDNs6NuZ82HyYtq5UiJ1h9SBHJXZD.

[#4157]: Bridge: added free headers submission support to the substrate-relay

Bridge finality and parachains relayer now supports mode, where it only submits some headers
for free. There's a setting in a runtime configuration, which introduces this "free header"
concept. Submitting such header is considered a common good deed, so it is free for relayers.

[#4457]: sc-service: export all public functions

A PR #3166 converted private functions used in spawn_tasks() to public to make it possible to have custom
implementation of the spawn_tasks(). However, not all functions were included in the list of exports from
sc-service crate.

[#4211]: Re-prepare PVF artifacts only if needed

When a change in the executor environment parameters can not affect the prepared artifact,
it is preserved without recompilation and used for future executions. That mitigates
situations where every unrelated executor parameter change resulted in re-preparing every
artifact on every validator, causing a significant finality lag.

[#3962]: Change fork calculation algorithm.

This PR changes the fork calculation and pruning algorithm to enable future block header pruning.
During the finalization of the block we prune known stale forks, so forks are pruned faster.

[#4035]: Prospective parachains rework

Changes prospective-parachains from dealing with trees of unincluded candidates to maintaining only candidate chains
and a number of unconnected candidates (for which we don't yet know the parent candidate but which otherwise seem potentially viable).
This is needed for elastic scaling, in order to have full throughput even if a candidate is validated by a backing group before the parent candidate
is fetched from the other backing group.
Also simplifies the subsystem by no longer allowing parachain cycles.

[#4329]: Deprecate NativeElseWasmExecutor

Deprecates the NativeElseWasmExecutor as native execution is already
discouraged and should be removed entirely. The executor should be
replaced by WasmExecutor which can be found in sc-executor.

The NativeElseWasmExecutor will be removed at the end of 2024.

[#4295]: Make parachain template async backing ready

Promotes the parachain template (both node and runtime) to use async backing APIs so that
developers starting a new project from the template could get async backing integrated out
of the box.

[#3444]: Rate-limiting of statement distribution v2 requests to 1 per peer

A new malicious node variant that sends duplicate statement
distribution messages to spam other peers.

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#4220]: Refactor XCM Simulator Example

This PR refactors the XCM Simulator Example to improve developer experience when trying to read and understand the example. 3 monolithic files have been broken down into their respective components across various modules. No major logical changes were made.

[#4364]: Fix dust unbonded for zero existential deposit

When a staker unbonds and withdraws, it is possible that their stash will contain less currency than the existential deposit. If that happens, their stash is reaped. But if the existential deposit is zero, the reap is not triggered. This PR adjusts pallet_staking to reap a stash in the special case that the stash value is zero and the existential deposit is zero.

[#4311]: Not allow reap stash for virtual stakers.

Add guards to staking dispathables to prevent virtual stakers to be reaped.

[#4312]: Add Deposited/Withdrawn events for pallet-assets

New events were added to pallet-assets: Deposited and Withdrawn. Make sure
to cover those events on tests if necessary.

[#4414]: Rococo Asset Hub: undeploy state-trie migration

The state-trie migration on the Rococo Asset Hub is completed and is now removed.

[#3865]: Balances: add failsafe for consumer ref underflow

Pallet balances now handles the case that historic accounts violate a invariant that they should have a consumer ref on reserved > 0 balance.
This disallows such accounts from reaping and should prevent TI from getting messed up even more.

[#4346]: Allow for 0 existential deposit in benchmarks for pallet_staking, pallet_session, and pallet_balances

Changes were made to benchmarks for pallet_staking, pallet_session, and pallet-balances to accommodate runtimes with 0 existential deposit. This should not affect the vast majority of runtimes. For runtimes with 0 existential deposit, the benchmarks for pallet_staking and pallet_session will still fail when using U128CurrencyToVote in the pallet-staking config; developers can use or write another CurrencyToVote implementation for benchmarking to work around this.

[#3872]: XcmDryRunApi - Runtime API for dry-running extrinsics and XCM programs.

This PR introduces a new runtime API, the XcmDryRunApi, that allows dry-running
extrinsics and XCM programs to get their execution effects.
These effects include:

  • Local execution result, either pass or fail
  • Emitted events
  • Forwarded XCMs
  • In the case of extrinsics, the XCM program that they execute
    This API can be used on its own to test extrinsics or XCM programs,
    or used alongside the XcmPaymentApi to estimate execution and delivery
    fees.

This PR also adds a new configuration item to XCM: XcmRecorder.
This can be set to either (), the xcm pallet, or some custom implementation.
If set to (), the dry run API will not return the local XCM program executed
by running an extrinsic.
After this PR, it is necessary to add the new configuration item to your xcm
configs.

[#4281]: Add support for versioned notification for HRMP pallet

The configuration of the HRMP pallet has been expanded to include the VersionWrapper type,
which controls the encoding of XCM notifications related to the opening/closing of HRMP channels.
If your runtime does not concern itself with the XCM version used for notifications,
you can set it as type VersionWrapper = () to always use the latest XCM.
If your runtime does care about the XCM version when sending to child parachains,
you can provide an instance of the pallet_xcm with type VersionWrapper = XcmPallet,
which can manage XCM versions for destinations.

[#3904]: Introduce pallet-delegated-staking

Adds a new pallet delegated-staking that allows delegators to delegate their funds to agents who can stake
these funds on behalf of them. This would be used by Nomination Pools to migrate into a delegation staking based
pool.

[#4406]: Adds benchmarking and try-runtime support in polkadot-sdk-frame crate

Adds benchmarking and try-runtime support in polkadot-sdk-frame crate

[#4091]: Removed pallet::getter usage from the authority-discovery pallet

This PR removed pallet::getters from pallet-authority-discoverys storage items.
When accessed inside the pallet, use the syntax StorageItem::<T, I>::get().
When accessed outside the pallet, use the getters current_authorities() and next_authorities() instead.

[#4326]: CheckWeight checks for combined extrinsic length and proof size

The CheckWeight SignedExtension will now perform an additional check. The extension was verifying the extrinsic length and
weight limits individually. However, the proof size dimension of the weight and extrinsic length together are bound by the PoV size limit.
The CheckWeight extension will now check that the combined size of the proof and the extrinsic lengths will not
exceed the PoV size limit.

[#4034]: Introduces TypeWithDefault<T, D: Get<T>>

This PR introduces a new type TypeWithDefault<T, D: Get<T>> to be able to provide a
custom default for any type. This can, then, be used to provide the nonce type that returns
the current block number as the default, to avoid replay of immortal transactions.

[#3964]: Burn extrinsic call and fn burn_from Preservation argument

pallet-balances extrinsic calls has been expanded with burn call.
An argument flag is allowed to specify whether the account should be kept alive or not.
This in turn required a change to the fungible's pub trait Mutate burn_from function which now
also accepts Preservation as an argument.
In order to keep the behavior same as before, developers should simply specify Preservation::Expandable.

[#4461]: Fix extrinsics count logging in frame-system

Fixes the issue of the number ...

Read more

Polkadot v1.11.0

30 Apr 12:30
0bb6249
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.10.0 to polkadot-v1.11.0.

Changelog

Changelog for Node Dev

These changes are relevant to: Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself.

[#4059]: Remove redundent logging code

Simplified logging code, now does slightly less work while logging.

[#4027]: Add candidates_pending_availability Runtime API

This new API retrieves all CommittedCandidateReceipts of all candidates pending availability for a parachain at a given relay chain block number. It is required by collators that make use of elastic scaling capability in the context of PoV recovery and block import. The old API candidate_pending_availability is now deprectated and will be removed in the future.

[#3979]: Deprecate para_id() from CoreState in polkadot primitives

CoreState's para_id() function is getting deprecated in favour of direct usage of the ClaimQueue. This is the preferred approach because it provides a better view on what is scheduled on each core.

[#4169]: Stabilize transactionBroadcast RPC class to version 1

The transactionBroadcast RPC API is stabilized to version 1.

[#3953]: Adapt RemoteExternalities and its related types to be used with generic hash parameters

Modify RemoteExternalities, Mode, OnlineConfig andSnapshot to rely now on generic parameter, instead of BlockT. Adjust in consequence their implementation to be compatible with types Hash, or if possible any generic. Adapt Builder struct and implementation for these bounds.

[#4171]: Stabilize transactionWatch RPC class to version 1

The transactionWatch RPC API is stabilized to version 1.

[#3512]: [FRAME] Introduce Runtime Omni Bencher

Introduces a new freestanding binary; the frame-omni-bencher. This can be used as alternative to the node-integrated benchmark pallet command. It currently only supports pallet benchmarking.

The optional change to integrate this MR is in the node. The run function is now deprecated in favour or run_with_spec. This should be rather easy to integrate:

runner.sync_run(|config| cmd
-    .run::<HashingFor<Block>, ReclaimHostFunctions>(config)
+    .run_with_spec::<HashingFor<Block>, ReclaimHostFunctions>(Some(config.chain_spec))
)

Additionally, a new --runtime CLI arg was introduced to the benchmark pallet command. It allows to generate the genesis state directly by the runtime, instead of using a spec file.

[#4168]: Stabilize chianHead RPC class to version 1

The chainHead RPC API is stabilized to version 1.

[#2714]: GenesisConfig presets for runtime

The ChainSpecBuilder is extended with with_genesis_config_preset_name method which allows to build chain-spec using named preset provided by the runtime.

[#2944]: Integrate litep2p into Polkadot SDK

litep2p is a libp2p-compatible P2P networking library. It supports all of the features of rust-libp2p that are currently being utilized by Polkadot SDK and is a drop-in replacement for any node operator.

For node developers, introduction of litep2p implies specifying the networking backend that Polkadot SDK shall use for P2P networking. A new trait called NetworkBackend is introduced which is implemented by both the libp2p and litep2p backends and which is used to initialize any networking-related code.

[#3801]: Remove slot_duration from aura::collators::basic::Params

Removes the slot_duration parameter from the aura::collators::basic::Params. The slot_duration will now be fetched from the runtime using the Aura runtime api.

Changelog for Runtime Dev

These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#3485]: Broker: sale price runtime api

Defines a runtime api for pallet-broker for getting the current price of a core in the ongoing sale.

[#3660]: Removed pallet::getter usage from Polkadot Runtime pallets

This PR removes all the pallet::getter usages from the Polkadot Runtime pallets, and updates dependant runtimes accordingly. The syntax StorageItem::<T, I>::get() should be used instead.

[#3889]: Allow privileged virtual bond into pallet Staking

Introduces a new low level API to allow privileged virtual bond into pallet Staking. This allows other pallets to stake funds into staking pallet while managing the fund lock and unlocking process themselves.

[#3708]: XCM builder pattern automatically converts instruction parameters.

Small quality of life improvement.
Previously, an XCM could be built like this:

let xcm = Xcm::builder()
    .withdraw_asset((Parent, 100u128).into())
    .buy_execution((Parent, 1u128).into())
    .deposit_asset(All.into(), AccountId32 { id: [0u8; 32], network: None }.into())
    .build();

Now, it can be built like this:

let xcm = Xcm::builder()
    .withdraw_asset((Parent, 100u128))
    .buy_execution((Parent, 1u128))
    .deposit_asset(All, [0u8; 32])
    .build();

[#4037]: Remove xcm::v3 from assets-common nits

Remove xcm::v3 imports from assets-common to make it more generic and facilitate the transition to newer XCM versions. The implementations AssetIdForTrustBackedAssetsConvert, ForeignAssetsConvertedConcreteId, or TrustBackedAssetsAsLocation
used hard-coded xcm::v3::Location, which has been changed to use xcm::latest::Location by default. Alternatively, the providing runtime can configure them according to its needs, such as with a lower XCM version.

Example:

- AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocationV3>,
+ AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocationV3, xcm::v3::Location>,

Another change is that the removed xcm_builder::V4V3LocationConverter can be replaced with WithLatestLocationConverter.

[#3659]: Unity Balance Conversion for Different IDs of Native Asset

Introduce types to define 1:1 balance conversion for different relative asset ids/locations of native asset for ConversionToAssetBalance trait bounds.

[#2119]: Add example pallet for Multi-Block-Migrations

  • Add an example pallet to demonstrate Multi-Block-Migrations.
  • Add a MigrationId to frame-support for more convenient identification or migrations.
  • Add default config prelude for testing in pallet-migrations.

[#2292]: Migrate Fee Payment from Currency to fungible traits

Deprecates the CurrencyAdapter and introduces FungibleAdapter
Deprecates ToStakingPot and replaces usage with ResolveTo
Updated DealWithFees, ToAuthor, AssetsToBlockAuthor to all use fungible traits
Updated runtime XCM Weight Traders to use ResolveTo
Updated runtime TransactionPayment pallets to use FungibleAdapter instead of CurrencyAdapter

Runtime Migration Guide:

  • Replace usage of CurrencyAdapter with FungibleAdapter
  • Replace usage of ToStakingPot<Runtime> with ResolveTo<pallet_collator_selection::StakingPotAccountId<Runtime>, Balances>

[#3250]: Asset Conversion: Pool Account ID derivation with additional Pallet ID seed

Introduce PalletId as an additional seed parameter for pool's account id derivation.
The PR also introduces the pallet_asset_conversion_ops pallet with a call to migrate a pool to the new account. Additionally fungibles::roles::ResetTeam and fungible::lifetime::Refund traits, to facilitate the migration functionality.

[#4229]: Fix Stuck Collator Funds

Fixes stuck collator funds by providing a migration that should have been in PR 1340.

[#4118]: pallet assets: minor improvement on errors returned for some calls

Some calls in pallet assets have better errors. No new error is introduced, only more sensible choice are made.

[#4006]: Deploy pallet-parameters to rococo and fix dynamic_params name expand

Fix the expanded names of dynamic_params to not remove suffix "s".

Also deploy the parameters pallet to the rococo-runtime.

[#4189]: polkadot_runtime_parachains::coretime: Expose MaxXcmTransactWeight

Expose MaxXcmTransactWeight via the Config trait. This exposes the possibility for runtime implementors to set the maximum weight required for the calls on the coretime chain. Basically it needs to be set to max_weight(set_leases, reserve, notify_core_count) where set_leases etc are the calls on the coretime chain. This ensures that these XCM transact calls send by the relay chain coretime pallet to the coretime chain can be dispatched.

[#4075]: Adds ability to trigger tasks via unsigned transactions

This PR updates the validate_unsigned hook for frame_system to allow valid tasks to be submitted as unsigned transactions. It also updates the task example to be able to submit such transactions via an off-chain worker.

Note that is_valid call on a task MUST be cheap with minimal to no storage reads.
Else, it can make the blockchain vulnerable to DoS attacks.

Further, these tasks will be executed in a random order.

[#3789]: [pallet-contracts] Benchmarks improvements

Reuse wasmi module when validating the wasm code.

[#4156]: AllowHrmpNotificationsFromRelayChain barrier for HRMP notifications from the relaychain

A new barrier, AllowHrmpNotificationsFromRelayChain, has been added.
This barrier can be utilized to ensure that HRMP notifications originate solely from the Relay Chain.
If your runtime relies on these notifications, you can include it in the runtime's barrier type for `xcm_executor::Conf...

Read more

Polkadot Parachain v1.10.1

11 Apr 18:03
8eb1f55
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.10.0 to polkadot-parachain-v1.10.1.

Changelog

Changelog for Node Operator

[#4070]: Avoid using para_backing_state if runtime doesn't support async backing

Fixes #4067 which prevents collators to upgrade to latest release (v1.10.0)

Rust compiler versions

This release was built and tested against the following versions of rustc.
Other versions may work.

Rust Stable:  rustc 1.75.0 (82e1608df 2023-12-21)

Polkadot v1.10.0

09 Apr 13:13
7049c3c
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.9.0 to polkadot-v1.10.0.

Changelog

Changelog for Node Dev

[#3521]: Collator side changes for elastic scaling

Parachain teams wishing to utilize the benefits of elastic scaling will need to upgrade their collator code to include these changes.

[#3302]: Collator protocol changes for elastic scaling

This PR introduces changes to the collator protocol to support elastic scaling.
Namely, a new variant added to the collation response to include parent head-data along with the collation. Currently, the new variant is not being used.

[#3950]: Add ClaimQueue wrapper

Intoduces a new wrapper type: ClaimQueueSnapshot. It contains a snapshot of the ClaimQueue at an arbitrary relay chain block. Two methods are exposed to allow access to the claims at specific depths.

[#3795]: Enable collators to build on multiple cores

Introduces a CoreIndex parameter in SubmitCollationParams. This enables the collators to make use of potentially multiple cores assigned at some relay chain block. This extra parameter is used by the collator protocol and collation generation subsystems to forward the collation to the approapriate backing group.

[#3580]: Expose ClaimQueue via a runtime api and consume it in collation-generation

Creates a new runtime api exposing the ClaimQueue from scheduler pallet. Consume the api in collation generation (if available) by getting what's scheduled on a core from the ClaimQueue instead of from next_up_on_available (from AvailabilityCores runtime api).

[#3854]: Export unified ParachainHostFunctions from cumulus-client-service

Exports ParachainHostFunctions to have a bundled version of SubstrateHostFunctions and cumulus_primitives_proof_size_hostfunction::storage_proof_size::HostFunctions. This increases discoverability and makes it more obvious that they should be used together in parachain nodes.

[#3479]: Elastic scaling: runtime dependency tracking and enactment

Adds support in the inclusion and paras_inherent runtime modules for backing and including multiple candidates of the same para if they form a chain.

Changelog for Runtime Dev

[#3817]: Parachain Runtime API Implementations into mod apis Refactoring

This PR introduces a refactoring to the runtime API implementations within the parachain template project. The primary changes include enhancing the visibility of RUNTIME_API_VERSIONS to pub in impl_runtime_apis.rs, centralizing API implementations in a new apis.rs file, and streamlining lib.rs. These changes aim to improve project structure, maintainability, and readability.

Key Changes:

  • RUNTIME_API_VERSIONS is now publicly accessible, enhancing module-wide visibility.
  • Introduction of apis.rs centralizes runtime API implementations, promoting a cleaner and more navigable project structure.
  • The main runtime library file, lib.rs, has been updated to reflect these structural changes, removing redundant API implementations and simplifying runtime configuration by pointing VERSION to the newly exposed RUNTIME_API_VERSIONS from apis.rs.

Motivations:

  • Improved Project Structure: Centralizing API implementations offers a more organized and understandable project layout.
  • Enhanced Readability: The refactoring efforts aim to declutter lib.rs, facilitating easier comprehension for new contributors.

[#3722]: Fix kusama 0 backing rewards when entering active set

This PR fixes getting 0 backing rewards the first session when a node enters the active set.

[#3607]: XCM fee payment API

A runtime API was added for estimating the fees required for XCM execution and delivery.
This is the basic building block needed for UIs to accurately estimate fees.
An example implementation is shown in the PR. Ideally it's simple to implement, you only need to call existing parts of your XCM config.
The API looks like so:

      fn query_acceptable_payment_assets(xcm_version: Version) -> Result<Vec<VersionedAssetId>, Error>;
      fn query_xcm_weight(message: VersionedXcm<Call>) -> Result<Weight, Error>;
      fn query_weight_to_asset_fee(weight: Weight, asset: VersionedAssetId) -> Result<u128, Error>;
      fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result<VersionedAssets, Error>;

The first three relate to XCM execution fees, given an XCM, you can query its weight, then which assets are acceptable for buying weight and convert weight to a number of those assets.
The last one takes in a destination and a message you want to send from the runtime you're executing this on, it will give you the delivery fees.

[#3761]: Snowbridge: Synchronize from Snowfork repository

This PR improves the beacon client to send the execution header along with the message as proof and removes the verification and storing of all execution headers.
If the AH sovereign account is depleted and relayer rewards cannot be paid, the message should still be processed.

[#3792]: [pallet-xcm] fix transport fees for remote reserve transfers

This PR fixes pallet_xcm::transfer_assets and pallet_xcm::limited_reserve_transfer_assets extrinsics for transfers that need to go through remote reserves. The fix is adding a SetFeesMode { jit_withdraw: true } instruction before local execution of InitiateReserveWithdraw so that delivery fees are correctly charged by the xcm-executor. Without this change, a runtime that has implemented delivery fees would not be able to execute remote reserve transfers using these extrinsics.

[#3808]: Fix spelling mistakes in source code

Public crate changes:

  • The public trait RuntimeParameterStore in substrate/frame/support had the associated type renamed from AggregratedKeyValue to AggregatedKeyValue.
  • The public trait AggregratedKeyValue in substrate/frame/support was similarly renamed to AggregatedKeyValue.
  • The public methods test_versioning and test_versioning_register_only of the TestApi trait in substrate/primitives/runtime-interface/test-wasm had the spelling of versionning changed to versioning.
  • The public functions read_trie_first_descendant_value and read_child_trie_first_descendant_value in substrate/primitives/trie had the spelling of descedant changed to descendant.

[#3714]: Handle legacy lease swaps on coretime

When a registar::swap extrinsic is executed it swaps two leases on the relay chain but the broker chain never knows about this swap. This change notifies the broker chain via a XCM message for a swap so that it can update its state.

[#3740]: Removed pallet::getter usage from Beefy and MMR pallets

This PR removes pallet::getter usage from pallet-beefy, pallet-beefy-mmr and pallet-mmr, and updates dependant code and runtimes accordingly.
The syntax StorageItem::<T, I>::get() should be used instead.

[#3927]: pallet-xcm: deprecate transfer extrinsics without weight limit

pallet-xcm's extrinsics teleport_assets and reserve_transfer_assets have been marked as deprecated. Please change their usage to the limited_teleport_assets and limited_reserve_transfer_assets, respectively; or use the generic/flexible transfer_assets extrinsic.

[#3738]: Removed pallet::getter usage from pallet-alliance

This PR removes pallet::getter usage from pallet-alliance, and updates dependant code accordingly.
The syntax StorageItem::<T, I>::get() should be used instead.

[#3190]: Fix algorithmic complexity of the on-demand scheduler.

Improves on demand performance by a significant factor. Previously, having many on-demand cores would cause really poor blocktimes due to the fact that for each core the full order queue was processed. This allows for increasing the max size of the on-demand queue if needed.
At the same time, the spot price for on-demand is now checked prior to every order, ensuring that economic backpressure will be applied.

[#3654]: Remove experimental feature from pallet-aura

The experimental feature in pallet-aura, previously used to gate different experimental changes, became redundant with the introduction of the async backing which relies on the mentioned changes, therefore, it is removed.

[#3718]: Deprecate scheduler traits v1 and v2

Add #[deprecated] attribute to scheduler traits v1 and v2 to deprecate old versions

[#3471]: removed pallet::getter from cumulus pallets

This PR removes all the pallet::getter usages from cumulus pallets, and updates depdendant runtimes accordingly.
The ParaId can be retrieved using <ParachainInfo as Get<ParaId>>::get().
For other storage items, the syntax StorageItem::<T, I>::get() should be used instead.

[#3754]: Migrates Westend to Runtime V2

This PR migrates Westend from construct_runtime to Runtime V2 as introduced in #1378

[#3350]: removed pallet::getter from Pallet AURA

This PR removes all the declarations of macro pallet::getter in the Pallet AURA and replaces the use of storage getter functions authorities() & current_slot() with StorageItem::get() API across the crates as listed bellow.
The purpose is to discourage developers to use this macro, that is currently being removed and soon will be deprecated.

[#3749]: pallet-xcm: deprecate execute and send in favor of execute_blob and send_blob

pallet-xcm's extrinsics execute and send have been marked as deprecated. Please change their usage to the new execute_blob and send_blob. The migration from the old extrinsic to the new is very simple.
If you have your message xcm: VersionedXcm<Call>, then instead of passing in Box::new(xcm) to both execute and send, you would pass in `xcm.enc...

Read more

Polkadot v1.9.0

19 Mar 14:23
3c3d6fc
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.8.0 to polkadot-v1.9.0.

Changelog

Changelog for Node Dev

[#3187]: Retrying an execution on failed runtime construction

If a runtime construction error happened during the execution request, then the artifact is re-prepared and the execution request is retried at most once. See also the related issue.

[#3233]: provisioner: allow multiple cores assigned to the same para

Enable supplying multiple backable candidates to the paras_inherent pallet for the same paraid.

[#3447]: Use generic hash for runtime wasm in resolve_state_version_from_wasm

Changes the runtime hash algorithm used in resolve_state_version_from_wasm from DefaultHasher to a caller-provided one (usually HashingFor<Block>). Fixes a bug where the runtime wasm was being compiled again when it was not needed, because the hash did not match.

Changelog for Node Operator

[#3523]: Fix crash of synced parachain node run with --sync=warp

Fix crash of SyncingEngine when an already synced parachain node is run with --sync=warp (issue #3496).
The issue manifests itself by errors in the logs:

[Parachain] Cannot set warp sync target block: no warp sync strategy is active.
[Parachain] Failed to set warp sync target block header, terminating `SyncingEngine`.

Followed by a stream of messages:

[Parachain] Protocol command streams have been shut down

[#3231]: Allow parachain which acquires multiple coretime cores to make progress

Adds the needed changes so that parachains which acquire multiple coretime cores can still make progress.
Only one of the cores will be able to be occupied at a time.
Only works if the ElasticScalingMVP node feature is enabled in the runtime and the block author validator is updated to include this change.

[#3510]: Fix multi-collator parachain transition to async backing

The dynamic Aura slot duration, introduced in PR#3211, didn't take the block import pipeline into account. The result was the parachain backed by multiple collators not being able to keep producing blocks after its runtime was upgraded to support async backing, requiring to
restart all the collator nodes. This change fixes the issue, introducing the dynamic Aura slot duration into the block import pipeline.

[#3504]: add prometheus label "is_rate_limited" to rpc calls

This PR adds a label "is_rate_limited" to the prometheus metrics "substrate_rpc_calls_time" and "substrate_rpc_calls_finished" than can be used to distinguish rate-limited RPC calls from other RPC calls. Because rate-limited RPC calls may take tens of seconds.

Changelog for Runtime Dev

[#3491]: Remove Deprecated OldWeight

Removed deprecated sp_weights::OldWeight type. Use [weight_v2::Weight] instead.

[#3002]: PoV Reclaim Runtime Side

Adds a mechanism to reclaim proof size weight.

  1. Introduces a new SignedExtension that reclaims the difference
    between benchmarked proof size weight and actual consumed proof size weight.
  2. Introduces a manual mechanism, StorageWeightReclaimer, to reclaim excess storage weight for situations
    that require manual weight management. The most prominent case is the on_idle hook.
  3. Adds the storage_proof_size host function to the PVF. Parachain nodes should add it to ensure compatibility.

To enable proof size reclaiming, add the host storage_proof_size host function to the parachain node. Add the
StorageWeightReclaim SignedExtension to your runtime and enable proof recording during block import.

[#3378]: Remove deprecated GenesisConfig

Removes deprecated type GenesisConfig, it was replaced by RuntimeGenesisConfig on May 24 of 2023. The type GenesisConfig was deprecated on May 24 of 2023 #14210

[#1554]: Runtime Upgrade ref docs and Single Block Migration example pallet

frame_support::traits::GetStorageVersion::current_storage_version has been renamed frame_support::traits::GetStorageVersion::in_code_storage_version.
A simple find-replace is sufficient to handle this change.

[#3456]: Removed pallet::getter usage from pallet-collective

This PR removes pallet::getter usage from pallet-collective, and updates dependant code accordingly.
The syntax StorageItem::<T, I>::get() should be used instead.

[#1781]: Multi-Block-Migrations, poll hook and new System Callbacks

The major things that this MR touches are:

Multi-Block-Migrations: pallet-migrations is introduced that can be configured in the System of a runtime to act as multi-block migrator. The migrations pallet then in turn receives the list of MBMs as config parameter. The list of migrations can be an aggregated
tuple of SteppedMigration trait implementation.
It is paramount that the migrations pallet is configured in System once it is deployed. A test is in place to double check this.

To integrate this into your runtime, it is only necessary to change the return type of initialize_block to RuntimeExecutiveMode. For extended info please see #1781.

poll: a new pallet hook named poll is added. This can be used for places where the code that should be executed is not deadline critical. Runtime devs are advised to skim their usage of on_initialize and on_finalize to see whether they can be replace with poll. poll is not guaranteed to be called each block. In fact it will not be called when MBMs are ongoing.

System Callbacks: The system pallet gets five new config items - all of which can be safely set to () as default. They are:

  • SingleBlockMigrations: replaces the Executive now for configuring migrations.
  • MultiBlockMigrator: the pallet-migrations would be set here, if deployed.
  • PreInherents: a hook that runs before any inherent.
  • PostInherents: a hook to run between inherents and poll/MBM logic.
  • PostTransactions: a hook to run after all transactions but before on_idle.

[#3377]: Permissioned contract deployment

This PR introduces two new config types that specify the origins allowed to upload and instantiate contract code. However, this check is not enforced when a contract instantiates another contract.

[#3532]: Remove deprecated trait Store

The deprecated trait Store feature has been removed from the codebase. Please remove usages of generate_store macro from your pallets and access the storage through generics. For example, <Self as Store>::StoredRange::mutate will need to be updated to StoredRange::<T>::mutate.

[#2393]: [XCMP] Use the number of 'ready' pages in XCMP suspend logic

Semantics of the suspension logic in the XCMP queue pallet change from using the number of total pages to the number of 'ready' pages. The number of ready pages is now also exposed by the MessageQueue pallet to downstream via the queue footprint.

[#3505]: Removes as [disambiguation_path] from the required syntax in derive_impl

This PR removes the need to specify as [disambiguation_path] for cases where the trait definition resides within the same scope as default impl path.

For example, in the following macro invocation

#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime {
  ...
}

the trait DefaultConfig lies within the frame_system scope and TestDefaultConfig impls the DefaultConfig trait.

Using this information, we can compute the disambiguation path internally, thus removing the need of an explicit specification:

#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for Runtime {
  ...
}

In cases where the trait lies outside this scope, we would still need to specify it explicitly, but this should take care of most (if not all) uses of derive_impl within FRAME's context.

[#3460]: Repot all templates

This PR moves all templates into a single folder in the polkadot-sdk repo (/templates) and unifies their crate names as well. Most notably, the crate name for what was formerly known as node-template is no solochain-template-node. The other two crates in the template are
consequently called: solochain-runtime-template and pallet-solochain-template. The other two template crate names follow a similar patter, just replacing solochain with parachain or minimal.

This PR is part of a bigger step toward automating the template repositories, see the following: #3155

[#3643]: Fix weight refund for pallet_collator_selection::set_candidacy_bond

This PR implements the weight refund of pallet_collator_selection::set_candidacy_bond to account for no iterations over the candidate list when the candidacy bond is decreased.

[#3665]: Revert "FRAME Create TransactionExtension as a replacement for SignedExtension (#2280)"

This PR reverts the PR which introduced TransactionExtension to replace SignedExtension.

[#3371]: removed pallet::getter from example pallets

This PR removes all the pallet::getter usages from the template pallets found in the Substrate and Cumulus template nodes, and from the Substrate example pallets.
The purpose is to discourage developers to use this macro, that is currently being removed and soon will be deprecated.

[#3574]: Generate test functions for each benchmark with benchmarking v2

This PR fixes an issue where using impl_benchmark_test_suite macro within modules that use the benchmarking v2 macros (#[benchmarks] and #[instance_benchmarks]) always produced a single test called test_benchmarks instead of a separate benchmark test for every benchmark (noted with the `...

Read more

Polkadot v1.8.0

27 Feb 14:26
ec7817e
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.7.2 to polkadot-v1.8.0.

Changelog

Changelog for Node Dev

[#3395]: benchmarking-cli pallet subcommand: refactor --list and add --all option

pallet subcommand's --list now accepts two values: "all" and "pallets". The former will list all available benchmarks, the latter will list only pallets.
Also adds --all to run all the available benchmarks and --no-csv-header to omit the csv-style header in the output.
NOTE: changes are backward compatible.

[#3079]: Implement transaction_unstable_broadcast and transaction_unstable_stop

A new RPC class is added to handle transactions. The transaction_unstable_broadcast broadcasts the provided transaction to the peers of the node, until the transaction_unstable_stop is called. The APIs are marked as unstable and subject to change in the future. To know if the transaction was added to the chain, users can decode the bodies of announced finalized blocks. This is a low-level approach for transactionWatch_unstable_submitAndWatch.

[#3160]: prospective-parachains: allow requesting a chain of backable candidates

Enable requesting a chain of multiple backable candidates. Will be used by the provisioner to build paras inherent data for elastic scaling.

[#3244]: Make the benchmark pallet command only require a Hasher

Currently the benchmark pallet command requires a Block type, while only using its hasher. Now this is changed to only require the Easher. This means to use HashingFor<Block> in the place where Block was required.
Example patch for your node with cmd being BenchmarkCmd::Pallet(cmd):

- cmd.run::<Block, ()>(config)
+ cmd.run::<HashingFor<Block>, ()>(config)

[#3308]: Parachains-Aura: Only produce once per slot

With the introduction of asynchronous backing the relay chain allows parachain to include blocks every 6 seconds. The Cumulus Aura implementations, besides the lookahead collator, are building blocks when there is a free slot for the parachain in the relay chain. Most parachains are still running with a 12s slot duration and not allowing to build multiple blocks per slot. But, the block production logic will be triggered every 6s, resulting in error logs like: "no space left for the block in the unincluded segment". This is solved by ensuring that we don't build multiple blocks per slot.

[#3166]: Expose internal functions used by spawn_tasks

This allows to build a custom version of spawn_tasks with less copy-paste required

Changelog for Node Operator

[#3358]: Do not stall finality on spam disputes

This PR fixes the issue that periodically caused finality stalls on Kusama due to disputes happening there in combination with disputes spam protection mechanism.
See: #3345

[#3301]: rpc server add rate limiting.

Add rate limiting for RPC server which can be utilized by the CLI --rpc-rate-limit <calls per minute>
The rate-limiting is disabled by default.

[#3230]: rpc server remove prometheus metrics substrate_rpc_requests_started/finished and refactor WS ping/pongs.

This PR updates the rpc server library to jsonrpsee v0.22 to utilize new APIs.

Breaking changes:

  • Remove prometheus RPC metrics substrate_rpc_requests_started and substrate_rpc_requests_finished.
  • The RPC server now disconnects inactive peers that didn't acknowledge WebSocket pings more than three times in time.

Added:

  • Add prometheus RPC substrate_rpc_sessions_time to collect the duration for each WebSocket session.

[#3364]: rpc server expose batch request configuration

Add functionality to limit RPC batch requests by two new CLI options:
--rpc-disable-batch-request - disable batch requests on the server
--rpc-max-batch-request-len - limit batches to LEN on the server

[#3435]: Fix BEEFY-related gossip messages error logs

Added logic to pump the gossip engine while waiting for other things to make sure gossiped messages get consumed (practically discarded until worker is fully initialized). This fixes an issue where node operators saw error logs, and fixes potential RAM bloat when BEEFY initialization takes a long time (i.e. during clean sync).

[#3477]: Allow parachain which acquires multiple coretime cores to make progress

Adds the needed changes so that parachains which acquire multiple coretime cores can still make progress.
Only one of the cores will be able to be occupied at a time.
Only works if the ElasticScalingMVP node feature is enabled in the runtime and the block author validator is updated to include this change.

Changelog for Runtime Dev

[#1660]: Implements a percentage cap on staking rewards from era inflation

The pallet-staking exposes a new perbill configuration, MaxStakersRewards, which caps the amount of era inflation that is distributed to the stakers. The remainder of the era inflation is minted directly into T::RewardRemainder account. This allows the runtime to be configured to assign a minimum inflation value per era to a specific account (e.g. treasury).

[#3052]: Fixes a scenario where a nomination pool's TotalValueLocked is out of sync due to staking's implicit withdraw

The nomination pools pallet TotalValueLocked may get out of sync if the staking pallet does implicit withdrawal of unlocking chunks belonging to a bonded pool stash. This fix is based on a new method on the OnStakingUpdate traits, on_withdraw, which allows the
nomination pools pallet to adjust the TotalValueLocked every time there is an implicit or explicit withdrawal from a bonded pool's stash.

[#3384]: [pallet_contracts] stabilize call_v2, instantiate_v2, lock_dependency and unlock_dependency

These APIs are currently unstable and are being stabilized in this PR.
Note: add_delegate_dependency and remove_delegate_dependency have been renamed to lock_dependency and unlock_dependency respectively.

[#3225]: Introduce submit_finality_proof_ex call to bridges GRANDPA pallet

New call has been added to pallet-bridge-grandpa: submit_finality_proof_ex. It should be used instead of deprecated submit_finality_proof. submit_finality_proof will be removed later.

[#3325]: Ensure TracksInfo tracks are sorted by ID.

Add a integrity_check function to trait TracksInfo and explicitly state that tracks must always be sorted by ID. The referenda pallet now also uses this check in its integrity_test.

[#2903]: Implement ConversionToAssetBalance in asset-rate

Implements the ConversionToAssetBalance trait to the asset-rate pallet.

Previously only the ConversionFromAssetBalance trait was implemented, which would allow to convert an asset balance into the corresponding native balance.

The ConversionToAssetBalance allows to use pallet-asset-rate, e.g., as a mechanism to charge XCM fees in an asset that is not the native.

[#3361]: Fix double charge of host function weight

Fixed a double charge which can lead to quadratic gas consumption of the call and instantiate host functions.

[#3060]: Add retry mechanics to pallet-scheduler

This PR adds retry mechanics to pallet-scheduler, as described in the issue above.
Users can now set a retry configuration for a task so that, in case its scheduled run fails, it will be retried after a number of blocks, for a specified number of times or until it succeeds. If a retried task runs successfully before running out of retries, its remaining retry counter will be reset to the initial value. If a retried task runs out of retries, it will be removed from the schedule. Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. Periodic tasks will have their periodic schedule put on hold while the task is retrying.

[#3243]: Don't fail fast if the weight limit of a cross contract call is too big

Cross contracts calls will now be executed even if the supplied weight limit is bigger than the reamining weight. If the actual weight is too low they will fail in the cross contract call and roll back. This is different from the old behaviour where the limit for the cross contract call must be smaller than the remaining weight.

[#2061]: Add Parameters Pallet

Adds pallet-parameters that allows to have parameters for pallet configs that dynamically change at runtime. Allows to be permissioned on a per-key basis and is compatible with ORML macros.

[#3154]: Contracts: Stabilize caller_is_root API

Removed the #[unstable] attrribute on caller_is_root host function.

[#3212]: Ranked collective introduce Add and Remove origins

Add two new origins to the ranked-collective pallet. One to add new members and one to remove members, named AddOrigin and RemoveOrigin respectively.

[#3370]: Remove key getter from pallet-sudo

Removed the key getter function from the sudo pallet. There is no replacement for getting the key currently.

[#2290]: im-online pallet offcain storage cleanup

Adds a function clear_offchain_storage to pallet-im-online. This function can be used after the pallet was removed to clear its offchain storage.

[#3184]: Contracts: Remove no longer enforced limits from the Schedule

The limits are no longer in use and do nothing. Every builder overwritting them can just adapt their code to remove them without any consequence.

[#3415]: [pallet-contracts] Add APIVersion to the config.

Add APIVersion to the config to communicate the state of the Host functions exposed by the pallet.

Changelog for Runtime User

[#3319]: Add Coretime to Westend

Add the on demand and coretime assigners and migrate from legacy parachain ...

Read more

Polkadot v1.7.2

26 Feb 13:02
f5fc487
Compare
Choose a tag to compare

This release contains the changes from polkadot-v1.7.1 to polkadot-v1.7.2.

Rust compiler versions

This release was built and tested against the following versions of rustc.
Other versions may work.

Rust Stable:  rustc 1.75.0 (82e1608df 2023-12-21)
Rust Nightly: rustc 1.77.0-nightly (ef71f1047 2024-01-21)

Node Changes

Changelog for Node Operator

[#3469]: Allow parachain which acquires multiple coretime cores to make progress

Adds the needed changes so that parachains which acquire multiple coretime cores can still make progress.
Only one of the cores will be able to be occupied at a time.
Only works if the ElasticScalingMVP node feature is enabled in the runtime and the block author validator is updated to include this change.