Releases: paritytech/polkadot-sdk
Polkadot stable2407-2
This release contains the changes from polkadot-stable2407-1
to polkadot-stable2407-2
.
βΉοΈ Please note:
The tag corresponding to the current patch release polkadot-stable2407-2
and matching the old pattern will be available under polkadot-v1.15.2.
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.
[#5507]: Allow to enable full PoV size
A feature is introduced allowing a collator to enable full PoV size at compile time.
WARNING: To use this feature, security considerations must be understood and the latest SDK version must be used.
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).)
[#5510]: Fix failing XCM from relay to Coretime Chain when revenue is zero
The coretime assigner now always includes UnpaidExecution when calling notify_revenue
via a Transact
, not just when revenue is nonzero. This fixes an issue where the XCM would fail to process on the receiving side.
[#5055]: Only log error in UnixTime::now
call of the pallet-timestamp implementation if called at genesis
This minor patch re-introduces a check to ensure that the UnixTime::now
implementation in the timestamp only logs an error if called at the genesis block.
Changelog for Node Operator
βΉοΈ These changes are relevant to: Those who don't write any code and only run code.
[#5392]: Don't disconnect disabled nodes sending us dispute messages
No longer disconnect peers which we consider disabled when raising disputes as this will affect the approval process and thus finality.
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:stable2407-2
or
docker pull parity/polkadot-parachain:stable2407-2
Polkadot stable2407-1
This release contains the changes from polkadot-stable2407
to polkadot-stable2407-1
.
βΉοΈ Please note:
The tag corresponding to the current patch release polkadot-stable2407-1
and matching the old pattern will be available under polkadot-v1.15.1.
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.
[#4937]: prospective-parachains rework: take II
Add back support for backing parachain forks. Once a candidate reaches the backing quorum, validators use a shared way of picking the winning fork to back on-chain. This was done in order to increase the likelihood that all backers will vote on the winning fork.
The functionality of backing unconnected candidates introduced by the previous rework is preserved.
[#5332]: fix availability-distribution Jaeger spans memory leak
Fixes a memory leak which caused the Jaeger span storage in availability-distribution to never be pruned and therefore increasing indefinitely.
This was caused by improper handling of finalized heads. More info in #5258
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).)
[#5281]: PoV-Reclaim - Set BlockWeight
to node-side PoV size if mismatch is detected
After this change, the StorageWeightReclaim
SignedExtension
will check the node-side PoV size after every extrinsic. If we detect a case where the returned proof size is higher than the BlockWeight
value of the runtime, we set BlockWeight
to the size returned from the node.
[#5367]: Fixes std
leaking into the WASM runtime build
Fixes std
leaking into the WASM runtime build when updating serde_json
.
[#5273]: Fix storage weight reclaim bug.
A bug in storage weight reclaim signed extension is fixed. The bug was causing an underestimate of the proof size when the post dispatch info was underestimating the proof size and the pre dispatch info was overestimating the proof size at the same time.
Changelog for Node Operator
βΉοΈ These changes are relevant to: Those who don't write any code and only run code.
[#5247]: Prepare PVFs if node is a validator in the next session
- On every active leaf candidate-validation subsystem checks if the node is the next session authority.
- If it is, it fetches backed candidates and prepares unknown PVFs.
- Number of PVF preparations per block is limited to not overload subsystem.
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:stable2407-1
or
docker pull parity/polkadot-parachain:stable2407-1
Polkadot stable2407
This release contains the changes from polkadot-v1.14.1
to polkadot-stable2407
.
βΉοΈ Please note:
Starting from this release (related post on the Polkadot forum, the process for Polkadot node releases is changing. The new process is described in the RELEASE.md.
Therefore, the naming of the releases and final release tags will be adapted to replicate the schedule of the stable releases. Since each stable release will be done quarterly, it will be named based on the model: Polkadot stableYYMM
, and the tags will follow accordingly: polkadot-stableYYMM
, where YYMM
represents the date (last month of the quarter) of the release.
The old tags based on the version will be kept during the transition period. The tag corresponding the current stable release polkadot-stable2407
and matching the old attern is available under polkadot-v1.15.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.
[#4848]: Optimize logic for gossiping assignments
Optimize the logic for gossiping assignments by obtaining the list of peer ids from the topology instead of iterating through all connected validators, this gives us a 15% to 20% reduction in cpu usage.
[#4922]: Optimize finalization performance
Finalization algorithm was replaced with a more efficient version, data structures refactored to be faster and do fewer memory allocations. As the result some APIs have changed in a minor, but incompatible way.
[#4755]: Send PeerViewChange with high priority
- orchestra updated to 0.4.0, which introduces support for prioritizing system messages.
- PeerViewChange sent with high priority and should be processed first in a queue.
- To count them in tests added tracker to TestSender and TestOverseer. It acts more like a smoke test though.
[#4522]: Added runtime support for reporting BEEFY fork voting
This PR renames the submit_report_equivocation_unsigned_extrinsic
in BeefyApi
to
submit_report_double_voting_unsigned_extrinsic
and bumps the BeefyApi
version from 3 to 4.
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).)
[#4978]: Add MAX_INSTRUCTIONS_TO_DECODE to XCMv2
Added a max number of instructions to XCMv2. If using XCMv2, you'll have to take this limit into account.
It was set to 100.
[#5011]: Use BadOrigin
from sp_runtime
This PR refactor usages of deprecated frame_support::error::BadOrigin
to sp_runtime::traits::BadOrigin
[#5113]: Make the candidate relay parent progression check more strict for elastic scaling
Previously, the relay chain runtime was checking if the relay parent of a new candidate does not move backwards from the latest included on-chain candidate. This was fine prior to elastic scaling.
We now need to also check that the relay parent progresses from the latest pending availability candidate, as well as check the progression within the candidate chain in the inherent data.
Prospective-parachains is already doing this check but it's also needed in the runtime.
[#4943]: Update definition of frozen balance (docs PR)
This PR fixes a bug in the docs located in the definition of frozen balances. In addition, it extends that definition for completeness.
[#4863]: Make tracing::log
work in the runtime
Make tracing::log
work in the runtime as log
works in the runtime.
[#4902]: Removed pallet::getter
usage from the pallet-vesting
This PR removed pallet::getter
s from pallet-vesting
s storage items.
When accessed inside the pallet, use the syntax StorageItem::<T>::get()
.
[#4912]: Removed pallet::getter
usage from the pallet-babe
This PR removed pallet::getter
s from pallet-babe
s storage items.
When accessed inside the pallet, use the syntax StorageItem::<T>::get()
.
When accessed outside the pallet, use the public functions of storage.
[#4839]: Removed pallet::getter
usage from pallet-insecure-randomness-collective-flip
This PR removed the pallet::getter
s from pallet-insecure-randomness-collective-flip
.
The syntax StorageItem::<T, I>::get()
should be used instead.
[#4972]: Remove pallet::getter
usage from pallet-session
This PR removes the pallet::getter
s from pallet-session
.
The syntax StorageItem::<T, I>::get()
should be used instead.
[#4935]: Bridges V2 refactoring backport and pallet_bridge_messages
simplifications
This introduces several simplifications to the pallet_bridge_messages::Config configuration.
Types like BridgedChainId
, MaxUnrewardedRelayerEntriesAtInboundLane
, MaxUnconfirmedMessagesAtInboundLane
, MaximalOutboundPayloadSize
, InboundRelayer
, TargetHeaderChain
, and SourceHeaderChain
were removed.
Now, you only need to provide specific bridging chain configurations for ThisChain
, BridgedChain
, and BridgedHeaderChain
.
If you previously specified implementations for the bp_runtime::Chain* traits, those will fit here exactly, for example:
type ThisChain = bp_bridge_hub_rococo::BridgeHubRococo;
type BridgedChain = bp_bridge_hub_westend::BridgeHubWestend;
type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders<
Runtime,
BridgeParachainWestendInstance,
bp_bridge_hub_westend::BridgeHubWestend,
>;
[#4885]: Removed pallet::getter
usage from the pallet-transaction-storage
This PR removed pallet::getter
s from pallet-transaction-storage
s storage items.
When accessed inside the pallet, use the syntax StorageItem::<T, I>::get()
.
[#4777]: XCM builder pattern allows clear_origin before buy_execution.
Added clear_origin as an allowed command after commands that load the holdings register, in the safe xcm builder.
Previously, although it's logically allowed, an XCM could not be built like this:
let xcm = Xcm::builder()
.withdraw_asset((Parent, 100u128))
.clear_origin()
.buy_execution((Parent, 1u128))
.deposit_asset(All, [0u8; 32])
.build();
You had to use the unsafe_builder.
Now, it's allowed using the default builder.
[#3286]: Assets: can_decrease/increase for destroying asset is not successful
Functions can_decrease
and can_increase
do not return successful consequence results for assets undergoing destruction; instead, they return the UnknownAsset
consequence variant.
This update aligns their behavior with similar functions, such as reducible_balance
, increase_balance
, decrease_balance
, and burn
, which return an AssetNotLive
error for assets in the process of being destroyed.
[#4840]: Removed pallet::getter
usage from pallet-membership
This PR removed the pallet::getter
s from pallet-membership
.
The syntax StorageItem::<T, I>::get()
should be used instead.
[#4871]: Removed pallet::getter
usage from the pallet-tips
This PR removed pallet::getter
s from pallet-tips
s storage items.
When accessed inside the pallet, use the syntax StorageItem::<T, I>::get()
.
Changelog for Node Operator
βΉοΈ These changes are relevant to: Those who don't write any code and only run code.
[#5153]: Grandpa: Ensure voting doesn't fail after a re-org
Ensures that a node is still able to vote with Grandpa, when a re-org happened that changed the best chain. This ultimately prevents that a network may runs into a potential finality stall.
[#4097]: Introduce experimental slot-based collator
Introduces an experimental collator that is fit fot elastic-scaling.
It can be activated on test-parachain
and polkadot-parachain
binaries via --experimental-use-slot-based
flag. The current implementation is MVP status and purely for testing. Behaviour can change any time and should not be relied upon in environments with
any stability requirements.
[#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.
[#4663]: Add elastic scaling MVP guide
Adds a guide for parachains that want to use the experimental elastic scaling MVP.
Will be viewable at: https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/enable_elastic_scaling_mvp/index.html
[#4932]: Remove relay-chain consensus authoring support for asset-hub chains from polkadot-parachain.
The polkadot-parachain node had special handling for asset-hub parachains. They started out using relay-chain consensus and later migrated to Aura as soon as it became available. The codepath for authoring with relay chain consensus has been removed, since all asset hub chains have long migrated.
Changelog for Runtime User
βΉοΈ These changes are relevant to: Anyone using the runtime. This can be a token holder or a dev writing a front end for a chain.
[#4978]: Add MAX_INSTRUCTIONS_TO_DECODE to XCMv2
Added a max number of instructions to XCMv2. If using XCMv2, you'll have to take this limit into account.
It was set to 100.
[#4566]: [pallet_contracts] Add suppo...
Polkadot v1.14.1
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
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
- Bump wasmi to 0.32
- Turn on lazy and unchecked compilation when calling a contract.
See https://docs.rs/wasmi/0.32.0/wasmi/enum.CompilationMode.html#variant.Lazy
See https://docs.rs/wasmi/0.32.0/wasmi/struct.Module.html#method.new_unchecked
See https://wasmi-labs.github.io/blog/posts/wasmi-v0.32 for more details, on the wasmi update.
[#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::getter
s 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 ...
Polkadot v1.13.0
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::getter
s 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::getter
s 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::getter
s 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 ...
Polkadot v1.12.0
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::getter
s from pallet-authority-discovery
s 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 ...
Polkadot v1.11.0
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
withFungibleAdapter
- Replace usage of
ToStakingPot<Runtime>
withResolveTo<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...
Polkadot Parachain v1.10.1
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
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 pointingVERSION
to the newly exposedRUNTIME_API_VERSIONS
fromapis.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
insubstrate/frame/support
had the associated type renamed fromAggregratedKeyValue
toAggregatedKeyValue
. - The public trait
AggregratedKeyValue
insubstrate/frame/support
was similarly renamed toAggregatedKeyValue
. - The public methods
test_versioning
andtest_versioning_register_only
of theTestApi
trait insubstrate/primitives/runtime-interface/test-wasm
had the spelling ofversionning
changed toversioning
. - The public functions
read_trie_first_descendant_value
andread_child_trie_first_descendant_value
insubstrate/primitives/trie
had the spelling ofdescedant
changed todescendant
.
[#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...