Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The road to the native runtime free world #62

Open
bkchr opened this issue Jan 4, 2022 · 46 comments
Open

The road to the native runtime free world #62

bkchr opened this issue Jan 4, 2022 · 46 comments
Labels
I6-meta A specific issue for grouping tasks or bugs of a specific category.

Comments

@bkchr
Copy link
Member

bkchr commented Jan 4, 2022

The Vision

We want to get rid off the native runtime. Initially the native runtime was added to overcome the performance "problems" of using wasmi for the runtime execution. However, with wasmtime we are around 2x slower than native. While this still isn't perfect, it is way faster than wasmi that is around 10x slower (all depending on the work load etc). While the performance plays an important role here there are also other things to consider, like ensuring that the native and wasm runtime are deterministic. We have already run into problems with Polkadot when it comes to this determinism problems. While we can ensure to use the exact same compiler version for building the Polkadot binary in our release process, we can not ensure that everyone else is also using the same compiler version as we used for the wasm build.

There is also a nice write up and some discussions here: paritytech/substrate#7288

The Plan

To remove the native runtime, we need to fix some things before:

  1. Make the wasm memory growable. We have already run into a situation of a OOM. This happened because we only allow a fixed amount of memory per wasm instance. We solved this problem temporarily by running the native runtime which can just use the entire system memory and then afterwards we released a new Polkadot node with an increased memory budget. So, we were lucky because we had the native runtime that saved our ass, but if we remove it it would not be there anymore. So, we should support growing of the wasm memory. It can still in the end allocate in maximum 4GB, but that should be way enough for all our use cases and combined with some proper monitoring we should be able to be informed before we hit this upper limit.
  2. Remove runtime api requirement of statically checking that the runtime api is implemented. Currently when trying to use a runtime api, it is required to tell the compiler that a certain type is required that needs to implement a runtime api. This was done on purpose to give people better hints at compile time that they don't have implemented a certain api, but this only works by checking the native runtime (because we can not tell the compiler to check the wasm file). So, if we want to remove the native runtime we also need to remove this requirement on having the runtime api being implemented for a type. This can be solved by implementing the runtime apis for a different trait that will then be able to call into the runtime. We will also need to change some stuff, like checking that a runtime api is implemented on startup instead of failing later when the node is running. Remove sp-api requirement on compile time bounds #27
  3. Genesis is currently being created using the native runtime. We will also need to fix this. Maybe with an extra tool or whatever. GenesisConfig in a native runtime free world #25

Open Questions

If you want to help us out and contribute to this issue, in this section you can find open questions and tasks where we would appreciate any input.

There are maybe still some other things to consider and to fix on the way, like only compiling the runtime for wasm instead of the current native & wasm build.


Here you can find the board with specific sub-tasks to this milestone:
https://github.com/orgs/paritytech/projects/18/views/9

@bkchr bkchr added the Z5-epic label Jan 4, 2022
@burdges
Copy link

burdges commented Jan 4, 2022

As an aside not strictly relevant here, we do envision having "runtime libraries" eventually, like SPREEs or perhaps large verifier keys ala halo2, which might be implemented in another way like a flat file of data, or if they undergo closer auditing then eBPF or native code loaded via dlopen, or a native generator for a verifier key. Afaik all node should use identical deployment scheme, so we'd never walk back the consensus improvement described here.

@bkchr
Copy link
Member Author

bkchr commented Jan 4, 2022

Okay, sounds interesting. I always thought that SPREE would be different wasm files that are just linked at runtime?

Do we really want to native load code? Doesn't this destroy the entire advantage of using wasm? I mean then we could have done that from the beginning and could have distributed the runtime as a native library.

@burdges
Copy link

burdges commented Jan 4, 2022

I've too little grasp about what "wasm files linked at runtime" means, but the SPREE would require process-like separation from the main PVF, and the SPREE invokes hostcalls that modify the SPREE state, for which the main PVF lacks permission.

At least in my mind that's impossible with "linked at runtime" so instead the SPREE exposes some crate linked at build time, but then itself creates new hostcalls or more SPREE-calls available to the whole PVF including its own part.

Yes, SPREEs could be WASM but maybe 2x matters enough that a common enough SPREE would be native and well audited, or maybe doing those native builds limits our hardware choices too much? I donno..

Do we really want to native load code?

I donno, it's plausible we'd never want native code loaded, but much here remains unclear to me, like the performance hit eBPF takes.

I only raised the comment in case anything of this impacts how you remove the native runtime. :)

@bkchr
Copy link
Member Author

bkchr commented Jan 5, 2022

I've too little grasp about what "wasm files linked at runtime" means, but the SPREE would require process-like separation from the main PVF, and the SPREE invokes hostcalls that modify the SPREE state, for which the main PVF lacks permission.

Yeah that makes sense and I did not thought about it, but this could just be a host call to communicate with SPREE and the SPREE could be anything.

Aka we could have SPREE by default in wasm and could provide native compiled SPREE that ships with the node. If the requested SPREE version would not be supported by the node, we could just run the wasm version. However, I think whatever we do it is orthogonal to removing the native runtime.

I only raised the comment in case anything of this impacts how you remove the native runtime. :)

That is always a good idea nevertheless :)

@Wizdave97
Copy link

@bkchr Would host functions be removed entirely along side the native runtime?
Or would there be a workaround for that?

@bkchr
Copy link
Member Author

bkchr commented Jun 7, 2022

Host functions can not be removed and will not be removed.

@Garandor
Copy link

A question on this popped up at Manta-Network/Manta#701

The gist of it is:
There already exists a commandline flag to force WASM execution: --execution wasm

While stopping validators on a nondeterminism issue is certainly bad and should be avoided ( e.g. using that same CLI flag ), it might be tolerable for other full node network participants - as a downtime on their functions ( serving RPC in our case ) is not nearly as critical to the network as a chain stall.

We might want to actually optimize non-critical nodes for the happy case where everything works and have the 2x speedup in runtime execution result in a higher number of RPCs served per node ( got no numbers on the actual performance impact yet, using the 2x number from @bkchr's initial description here, actual gain I guess will also depend on the weight used per block on average )

native runtime free as on the tin would remove this optionality of tolerating stability issues for performance gain, so IMHO it's not desirable, since you can already force the WASM runtime with the above CLI flag.

@bkchr
Copy link
Member Author

bkchr commented Jul 26, 2022

Did you benchmark the execution? And do you have that many calls into the runtime on your RPC nodes?

@Garandor
Copy link

Garandor commented Jul 26, 2022

Did you benchmark the execution? And do you have that many calls into the runtime on your RPC nodes?

No benchmarks yet. Can only intuit at this point that in the case of full-ish blocks and benchmark-scale machines a 2x performance penalty would hurt RPC throughput.

We do expect high RPC load on our nodes through custom wallet syncing logic in the near future.
I realize these RPC serving nodes can be easily scaled horizontally, but what I'm arguing here is that this change would condemn non-critical network participants to waste resources for a gain in stability which may not be strictly necessary.

A proposal could be to force --execution wasm on validators but leave --execution native_else_wasm as default on full nodes, leaving them to opt into wasm execution with --execution wasm.

@tomaka
Copy link
Contributor

tomaka commented Jul 26, 2022

A "2x" slowdown estimate in the runtime execution speed does in no way translate in a 2x slowdown in the number of RPC requests that can be served. The slowdown obviously depends on the kind of requests that you get, but I would expect it to be basically 0. Until recently, PolkadotJS didn't even expose the possibility to call into the runtime through the RPC layer.

got no numbers on the actual performance impact yet

I don't think it is reasonable to argue that the performance hit is not worth the removal of the native runtime without having any number to back this up.

@Garandor
Copy link

Garandor commented Jul 26, 2022

I don't think it is reasonable to argue that the performance hit is not worth the removal of the native runtime without having any number to back this up.

I agree, which is why I'm pointing to the general problem of wasting of CPU cycles here. Wallet RPC is just our use-case. Other people will be running indexing (e.g. subsquid) on their full nodes - they're also impacted by this change.
How much so, I do not know.

but I would expect it to be basically 0.

Great if true and then I have no more issue with this.
My basis for argument is the assumption that a node that's executing block weight close to the benchmark limit will have a high CPU load if it's exactly on spec. That would leave little free resources to handle RPCs into the runtime. If that same node now had ~50% idle CPU because of native execution finishing faster, it'd have plenty capacity for "extra" RPC work.
Please correct me if this assumption is wrong

@tomaka
Copy link
Contributor

tomaka commented Jul 26, 2022

If the runtime execution speed was suddenly divided by 2, then the weights would be multiplied by 2 in return.

The CPU usage problem that you describe is indeed correct, but it's independent of the time it takes to execute the runtime. No matter whether it takes 5 microseconds or 5 milliseconds to verify for example a balance transfer, the weights are adjusted so that a node running on the reference machine will use 100% CPU if the chain is at maximum capacity.

The time it takes for the runtime to execute influences the maximum number of transactions per second of a chain, but not (or very little) the CPU usage of the nodes.

@Garandor
Copy link

Garandor commented Jul 26, 2022

No matter whether it takes 5 microseconds or 5 milliseconds to verify for example a balance transfer, the weights are adjusted so that a node running on the reference machine will use 100% CPU if the chain is at maximum capacity.

There's some subtlety here. Weights are always benchmarked with the WASM runtime, as it's obviously important for validators - who always use it - to not overflow execution time.

Full nodes executing the native runtime thus use weights that were created with the WASM runtime, but execute them 2x faster => lower CPU usage on full nodes executing native assuming reference hardware.

@wigy-opensource-developer

My basis for argument is the assumption that a node that's executing block weight close to the benchmark limit will have a high CPU load if it's exactly on spec. That would leave little free resources to handle RPCs into the runtime. If that same node now had ~50% idle CPU because of native execution finishing faster, it'd have plenty capacity for "extra" RPC work. Please correct me if this assumption is wrong

You also need to consider how much of the RPC requests are querying recent state and how much of them are interested in "archive" data. The current native approach only helps if most of the calls are querying recent data, and the node is upgraded soon after an on-chain runtime upgrade. But yeah, we need hard benchmarking data to see how much extra resources are needed to avoid this native runtime optimization.

@tomaka
Copy link
Contributor

tomaka commented Jul 27, 2022

You also need to consider how much of the RPC requests are querying recent state and how much of them are interested in "archive" data. The current native approach only helps if most of the calls are querying recent data,

There's no relationship between the runtime and querying data through RPC requests.
When an RPC requests wants to read a storage value, it just reads directly from the database. The runtime is completely unrelated to this.

@arkpar
Copy link
Member

arkpar commented Jul 27, 2022

It is also worth mentioning that RPC throughput scales well with the number of CPU cores. Whilst block import is serialized at the moment. Weight calculations do not account for any extra cores, that may be used for serving RPC requests.

@Garandor
Copy link

Garandor commented Jul 27, 2022

It is also worth mentioning that RPC throughput scales well with the number of CPU cores. Whilst block import is serialized at the moment. Weight calculations do not account for any extra cores, that may be used for serving RPC requests.

Thanks, considering the 100% CPU load from block execution one-core-only combined with the knowledge that RPC reads from DB instead of adding load to the runtime thread fixes my concern

@kianenigma
Copy link
Contributor

kianenigma commented Jun 21, 2023

For the purpose of the master tutorial, what I would love to have is a fixed node that can ingest different runtimes (one at a time, of course), and run any of them. This should ideally be as simple as changing a single line in Cargo.toml, or simple be a --runtime wasm.wasm.

Will this be feasible once this is done?

I think this is already feasible using the first ugly approach. Assuming we only do wasm execution, we just need a glue trait that would convey some types like OpaqueBlock, and a few other types needed for building the RPC extensions (AccountId, Nonce) and the GenesisConfig.

As far as I know, genesis state will be built with wasm after this, and we are moving away from custom RPCs as well. So I think the amount of information that the client needs to know about the runtime is actually very very small.

looking at bin/minimal/node is a good small example to demonstrate this.

Alternatively, these concrete types that the client needs to know about the runtime in order to build genesis, RPC and such can be auto-generated by construct_runtime. I tried to hint at this in mod prelude which is mentioned in this idea.

@athei
Copy link
Member

athei commented Aug 14, 2023

I guess then it would be an interesting experiment to see by how much the size of a runtime goes up if we replace all RuntimeDebug by Debug. We could compare if there is a substantial difference when sp-api/disable-logging is set. With lto enabled the linker should be able to eliminate the unused impls.

@bkchr
Copy link
Member Author

bkchr commented Aug 14, 2023

Yep

@nazar-pc
Copy link
Contributor

nazar-pc commented Aug 14, 2023

I tried once RuntimeDebug and noticed it was somehow more code with RuntimeDebug than Debug and I never used RuntimeDebug in my code since. I didn't bother checking why it was the case though.

@the-right-joyce the-right-joyce transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added I6-meta A specific issue for grouping tasks or bugs of a specific category. and removed Z5-epic labels Aug 25, 2023
@Polkadot-Forum
Copy link

This issue has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/polkadot-release-analysis-v1-0-0/3585/4

@michalkucharczyk
Copy link
Contributor

When it comes to generating chain-spec files, I have some concerns: where the generating code should be placed and how it should work.

In the past the generation of the chain-spec was simply done with command (assuming kusama-runtime feature enabled in polkadot):

polkadot build-spec --chain kusama-staging --raw

Once the support for native runtime is removed and with work done in #1256, we will need following building bricks to create a chain-spec file:

  • runtime wasm blob with GenesisBuilder API enabled,
  • a JSON patch to overwrite/customize specific keys in RuntimeGenesisConfig (or JSON file containg full config). Patch can be provided as a static file (example), or as a function which provides a patch (example, example).

When it comes to tooling for kusama/polkadot/westend/... development chain-spec creation I see following options:

  1. Keep support in polkadot-node, w/o dependencies to runtime crates. This requires build-spec command to be extenede with path to wasm runtime file:

    polkadot build-spec --chain kusama-staging --runtime /path/to/kusama-runtime.wasm --raw 
    

    We would also keep all the functions generating the patch in polkadot/node/service/src/chain_spec.rs.

  2. Keep support in polkadot-node, with dependencies to runtime crates (only to get a right wasm blob e.g. polkadot::WASM_BINARY).

    # nothing changed here:
    polkadot build-spec --chain kusama-staging --raw 
    

    In this case we also keep all the functions generating the patch in polkadot/node/service/src/chain_spec.rs.

  3. Move the build-spec subcommand to new tool (chain-spec-builder, which with workd done in chain-spec: getting ready for native-runtime-free world #1256 already allows some generic chain-spec operations).
    The tool could be moved to new repo (like try-runtime).

    chain-spec-builder runtime -r ./kusama-runtime.wasm --raw-storage  --chain-spec kusama-staging
    

    In this scenario the functions for generating the patches would be removed from polkadot-sdk repo and moved to the chain-spec-builder code.
    It would also be possible to remove functions generating the JSON patches, and keep patches as files (for each runtime and variant) but that could be inconvienent as one may still need way to easy modify the chain-spec.

@crystalin
Copy link

Giving my 2-cents. I would prefer to keep it within polkadot binary

@bkchr
Copy link
Member Author

bkchr commented Sep 22, 2023

I would favor option 1 and 3. Option two would us bring back to the old model of including the runtime crate, which blows up compile time again.

The tool proposed in 3 will be really good and can be used by things like zombienet that patches the chain specs anyway.

One other thing that is lingering in my head since some time, we could support pointing to a Cargo.toml file via cli. When the node or the independent tool are pointed to a Cargo.toml file, we should build the crate and use the resulting wasm binary as input binary. I can see this bringing a nice devex when you want to easily test changes to the runtime. It would then only require to restart the node and then it would also recompile the crate.

node --chain my-runtime/Cargo.toml

@crystalin
Copy link

I think Wasm or Cargo.toml are both good. Building wasm is fairly easy and straightforward so.

Having another tool makes me worry about maintaining it and having it hard to discover (for new people) or to follow progress. (right now the polkadot -h gives you a lot of useful info and commands)

@michalkucharczyk
Copy link
Contributor

To re-iterate my previous thoughts on the chain-specs in native-runtime-free world:

Removing RuntimeGenesisConfig struct is not enough to decouple the node/client side from the native-runtime entirely.

There are still some left-overs required on the node side to build the chain-spec. Examples of the types (or consts) that one needs to know are as follows:

  • AccountId,
  • HostConfiguration,
  • SessionKeys (BabeId, GrandpaId etc)
  • westend::BABE_GENESIS_EPOCH_CONFIG

These types need to be known at time of creating the json chain-spec. One needs to know what the types are to properly put them into the json format of runtime genesis config.

To overcome this problem, I propose to move the creation of the JSON representation of the runtime genesis config into the runtime itself, and exposing multiple configurations through the GenesisBuilder API.
GenesisBuilder implementation may encapsulate any number of predefined named configurations (e.g. "dev", "testnet", "staging" "alice"), and make them accessible via the runtime API.
The named configuration within runtime would be provided in the form of JSON patch (meaning that only the customized fields would be included into it).

The GenesisBuilder API could be updated as follows (draft):

fn list_patches_names() -> Vec<String>;
fn get_patch(name: String) -> serde_json::Value;
fn get_default_config() -> serde_json::Value;
fn build_storage(value: serde_json::Value);

The ChainsSpecBuilder (introduced in #1256) would be extended with one additional method: with_named_genesis_config_patch, allowing chain-spec construction with the following code:

type RococoChainSpec = ChainSpecBuilder<(), Extensions>;

RococoChainSpec::builder(rococo::WASM_BINARY, Extensions::default()) 
   .with_name("Rococo Staging Testnet")
   .with_id("rococo_staging_testnet")
   .with_chain_type(ChainType::Live)
   .with_named_genesis_config_patch("staging")
   .with_telemetry_endpoints(...)
   .with_boot_nodes(...)
   .with_protocol_id(DEFAULT_PROTOCOL_ID)
   .build()

The above sequence interacts with the GenesisBuilder API of provided runtime, and builds the chain-spec.

genesis-builder-00
(cc: @kianenigma)

@bkchr
Copy link
Member Author

bkchr commented Oct 15, 2023

fn get_patch(name: String) -> serde_json::Value;
fn get_default_config() -> serde_json::Value;

I don't see a reason why these are two functions?

@michalkucharczyk
Copy link
Contributor

fn get_patch(name: String) -> serde_json::Value;
fn get_default_config() -> serde_json::Value;

I don't see a reason why these are two functions?

get_default_config() is a wrapper to RuntimeGenesisConfig::default (as we need default config to apply patch [runtime-builtin or user-provided]),
get_patch(name: String) allows to get predefined builtin patch which shall be applied to default value. (Having patch allows for better flexibility as we can put patch into chainspec).

@bkchr
Copy link
Member Author

bkchr commented Oct 16, 2023

But why return a patch in the first place if you can directly return the chain spec?

@michalkucharczyk
Copy link
Contributor

michalkucharczyk commented Oct 16, 2023

But why return a patch in the first place if you can directly return the chain spec?

  • IMO the patch provides more flexibility. If you put the patch into chain spec then you can still reuse the chain spec even if RuntimeGenesisConfig is changed in future (e.g. new pallet added).
  • it may be more convenient to have patch in predefined chainspecs (e.g. easier to read),
  • we may still want to keep the option to apply user patch the default config for development purposes.
  • it may be more consistent if both: predefined chainspecs ('dev','staging','testnet`) and user provided chain-spec contain patch. If former would be a full config the chain specs would not be so consistent.

@bkchr
Copy link
Member Author

bkchr commented Oct 23, 2023

Okay, thank you for the explanation! Sounds reasonable. But maybe we can come up with a better name for "patch". Maybe just rename it to "config"? I mean it is a config, just not the whole 🤔 Okay, this actually brings me back to making the parameter to get_config optional and if it is None, it could return the default config.

juangirini added a commit that referenced this issue Nov 30, 2023
This PR introduces the new crate `developer_hub` into the polkadot-sdk
repo. The vision for the developer-hub crate is detailed in [this
document](https://docs.google.com/document/d/1XLLkFNE8v8HLvZpI2rzsa8N2IN1FcKntc8q-Sc4xBAk/edit?usp=sharing).

<img width="1128" alt="Screenshot 2023-11-02 at 10 45 48"
src="https://github.com/paritytech/polkadot-sdk/assets/5588131/1e12b60f-fef5-42c4-8503-a3ba234077c3">


Other than adding the new crate, it also does the following: 

* Remove the `substrate` crate, as there is now a unique umbrella crate
for multiple things in `developer_hub::polkadot_sdk`.
* (backport candidate) A minor change to `frame-support` macros that
allows `T::RuntimeOrigin` to also be acceptable as the origin type.
* (backport candidate) A minor change to `frame-system` that allows us
to deposit events at genesis because now the real genesis config is
generated via wasm, and we can safely assume `cfg!(feature = "std")`
means only testing. related to #62.
* (backport candidate) Introduces a small `read_events_for_pallet` to
`frame_system` for easier event reading in tests.
* From paritytech/polkadot-sdk-docs#31, it
takes action on improving the `pallet::call` docs.
* From paritytech/polkadot-sdk-docs#31, it
takes action on improving the `UncheckedExtrinsic` docs.

## Way Forward

First, a version of this is deployed temporarily
[here](https://blog.kianenigma.nl/polkadot-sdk/developer_hub/index.html).
I will keep it up to date on a daily basis.

### This Pull Request

I see two ways forward: 

1. We acknowledge that everything in `developer-hub` is going to be WIP,
and merge this asap. We should not yet use links to this crate anywhere.
2. We make this be the feature branch, make PRs against this, and either
gradually backport it, or only merge to master once it is done.

I am personally in favor of option 1. If we stick to option 2, we need a
better way to deploy a staging version of this to gh-pages.

### Issue Tracking

The main issues related to the future of `developer_hub` are: 

- paritytech/polkadot-sdk-docs#31
- paritytech/polkadot-sdk-docs#4
- paritytech/polkadot-sdk-docs#26 
- paritytech/polkadot-sdk-docs#32
- paritytech/polkadot-sdk-docs#36


### After This Pull Request

- [ ] create a redirect for
https://paritytech.github.io/polkadot-sdk/master/substrate/
- [x] analytics 
- [ ] link checker
- [ ] the matter of publishing, and how all of these relative links for
when we do, that is still an open question. There is section on this in
the landing page.
- [ ] updated https://paritytech.github.io/

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Juan Girini <juangirini@gmail.com>
Co-authored-by: bader y <ibnbassem@gmail.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
claravanstaden referenced this issue in Snowfork/polkadot-sdk Dec 6, 2023
* [ci] Enable zombienet jobs in PRs (#2361)

Since preparation for the merge queues needs more time I'm enabling
zombienet jobs in PRs CI back.

* westend: remove SessionKeys migration already applied on-chain (#2363)

Westend now successfully updated to `spec: 103000`, we **have to
remove** the session keys migration before the next release as it
doesn't gracefully handle reapplying it.

* implementers-guide: update github link (#2368)

cc @joepetrowski

* Fix Typo: `PalletXcmExtrinsicsBenchmark` (#2354)

Missed in https://github.com/paritytech/polkadot-sdk/pull/1672

* add pallet nomination-pools versioned migration to kitchensink (#2167)

The versioned migrations are already there in pallet nomination-pools:

https://github.com/paritytech/polkadot-sdk/blob/f6ee4781f633f0f89598f7b230595afe401da8dc/substrate/frame/nomination-pools/src/migration.rs#L27-L48

Just updating the kitchensink runtime to point to them.

This is also nice because it points the dev to an example of how to use
`VersionedMigration`.

* fix typo (#2377)

* bump zombienet version `v1.3.80` (#2376)

New release includes logic to move all jobs to `spot instances`.
Thx!

* [NPoS] Check if staker is exposed in paged exposure storage entries (#2369)

Addresses a bug caused by
https://github.com/paritytech/polkadot-sdk/pull/1189. The changes are
still not released yet, so would like to push the fix soon so it can go
together with the release of the above PR.

`fast_unstake` checks if a staker is exposed in an era. However, this fn
is still returning whether the staker is exposed based on the old
storage item. This PR fixes that by looking in both old and new exposure
storages.

Also adds some integrity tests for paged exposures.

* Beefy: small fixes (#2378)

Related to #2285

- save the state of the BEEFY gadget after processing a finality proof.
We need this in order to avoid skipping blocks.
- avoid reprocessing the old state when not necessary

* crypto: `lazy_static` removed, light parser for address URI added (#2250)

The `lazy_static` package does not work well in `no-std`: it requires
`spin_no_std` feature, which also will propagate into `std` if enabled.
This is not what we want.

This PR provides simple address uri parser which allows to get rid of
_regex_ which was used to parse the address uri, what in turns allows to
remove lazy_static.

Three regular expressions
(`SS58_REGEX`,`SECRET_PHRASE_REGEX`,`JUNCTION_REGEX`) were replaced with
the parser which unifies all of them.

The new parser does not support Unicode, it is ASCII only.

Related to: #2044

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: command-bot <>

* [trivial] asset-hubs runtimes: fix incorrect doc-comments (#2384)

Fix some incorrect doc-comments

* Do not panic if the `fdlimit` call to increase the file descriptor limit fails (#2155)

# Description

Sometimes changing file descriptor limits is not allowed, but there is
no need to crash the node if/when this happens. Since `fdlimit`'s author
decided to use panics instead of returning `Result`, we need to catch
it.

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
of this project (at minimum one label for `T`
  required)
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works (if applicable)

---------

Co-authored-by: Koute <koute@users.noreply.github.com>

* Relax `force_default_xcm_version` for testnet system parachains (#2385)

This PR fixes two things:
- relax `force_default_xcm_version` for testnet system parachains (e.g.
BridgeHubWestend has now 2 and there is no way to change it to 3, so we
need to call `force_xcm_version(3)` for every parachain that it is
connected to, because we send XCMv3 messages)
- add `Storage` item to `PolkadotXcm` pallet definition (now we cannot
see storage items for `pallet_xcm` in PJS)


## TODO

- [ ] when merged open PR to `polkadot-fellows/runtimes` repo

* Make collator RPC mode non-experimental (#2381)

The `--relay-chain-rpc-urls` CLI flag has been available for a while
now. We have collators with this running and parachain teams are also
using it. It should be fine now to remove the experimental status.

* Fix migrations and add CI check for new system chains (#2336)

Westend Collectives migration CI check can be fixed once we have
https://github.com/paritytech/try-runtime-cli/pull/58, will open another
PR once it is available.

- [x] Remove deprecated `DmpQueue` pallet from Rococo Contracts, the
migration is complete
- [x] Fix Asset Hub Rococo storage versions
- [x] Add migration check CI for Asset Hub Rococo and Westend Bridge Hub

* Bump bandersnatch VRF revision (#2389)

Closes https://github.com/paritytech/polkadot-sdk/issues/2327

cc @burdges

* Bump secp256k1 from 0.24.3 to 0.28.0 (#2357)

Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from
0.24.3 to 0.28.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-bitcoin/rust-secp256k1/blob/master/CHANGELOG.md">secp256k1's
changelog</a>.</em></p>
<blockquote>
<h1>0.28.0 - 2023-10-23</h1>
<ul>
<li>Add bindings to the ElligatorSwift implementation <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/627">#627</a></li>
<li>Depend on recent release of <code>bitcoin_hashes</code> v0.13.0 <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/621">#621</a></li>
<li>Add a verify function to <code>PublicKey</code> <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/618">#618</a></li>
<li>Add serialize function for schnorr::Signature <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/607">#607</a></li>
<li>Bump MSRV to 1.48 <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/595">#595</a></li>
<li>Remove implementations of <code>PartialEq</code>, <code>Eq</code>,
<code>PartialOrd</code>, <code>Ord</code>, and <code>Hash</code> from
the
<code>impl_array_newtype</code> macro. Users will now need to derive
these traits if they are wanted.</li>
</ul>
<h1>0.27.0 - 2023-03-15</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/588">Depend
on newly release <code>bitcoin_hashes</code> v0.12</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/578">Implement
<code>Debug</code> trait for <code>Scalar</code> type</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/582">Implement
<code>insecure-erase</code></a>.</li>
</ul>
<h1>0.26.0 - 2202-12-19</h1>
<ul>
<li>Update libsecp25k1 to v0.2.0</li>
</ul>
<h1>0.25.0 - 2022-12-07</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/548">Fix
soundness issue with <code>preallocated_gen_new</code></a></li>
<li>Update to <code>secp256k1-sys</code> <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/549">v0.7.0</a></li>
<li>Use type system to <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/483">improve
safety</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/490">Change
secp256k1-sys symbol names to 0_6_1</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/499">Introduce
<code>rustfmt</code></a> to the codebase.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/507">Make
all raw pointer methods go through the CPtr trait</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/518">Make
comparison functions stable</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/512">Remove</a>
public constant <code>ONE_KEY</code> (consider using
<code>FromStr</code> as a replacement).</li>
</ul>
<h1>0.24.1 - 2022-10-25</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/491">Fix
broken deserialization logic of <code>KeyPair</code></a> that previously
always panicked. After the patch deserialization only panics if neither
the <code>global-context</code> nor the <code>alloc</code> (default)
feature is active.</li>
</ul>
<h1>0.24.0 - 2022-07-20</h1>
<ul>
<li>Upgrade to new release of <a
href="https://github.com/rust-bitcoin/bitcoin_hashes/releases/tag/0.11.0">bitcoin_hashes</a>.</li>
</ul>
<h1>0.23.4 - 2022-07-14</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/474">Disable
automatic rerandomization of contexts under WASM</a></li>
</ul>
<h1>0.23.3 - 2022-06-29</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/465">Add
must_use for mut self key manipulation methods</a></li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/466">Fix
fuzzing feature guard</a></li>
</ul>
<h1>0.23.2 - 2022-06-27</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/7de09c8050da12a13ef9ee3850597f69c887952d"><code>7de09c8</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Tracking PR for release: `secp256k1 v0...</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/3dc5b165401f249c01a88cec54061301cffd97a0"><code>3dc5b16</code></a>
Bump version to v0.28.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/3aada83180beec2b9f5ab8e7b9280a5517d3bcde"><code>3aada83</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Add bindings to the ElligatorSwift imp...</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/39febcb866ce285d53052a3636602f04483aa710"><code>39febcb</code></a>
Create rust-bidings</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/da4f67b274c3061717723a568cfb182e4e2e7cce"><code>da4f67b</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Update vendored lib secp256k1 to v0.4.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/80b2a8d4aa6ffa72041d569eab2278cd8c1ace2a"><code>80b2a8d</code></a>
Update vendored libsecp to v0.4.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/d2285c929a086276ce6d1670d795c49191e30c65"><code>d2285c9</code></a>
ci: Remove MIPS* from CI</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/0d58f50d523b40a78de0b87146208e3ad338c8ba"><code>0d58f50</code></a>
ci: generalize grp in &quot;illegal callback&quot; test</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/acf9ac13e9f8df84dd52d2f012cda7211a6af10c"><code>acf9ac1</code></a>
delete <code>test_manual_create_destroy</code> test</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/04ce50891bb0d49be5355f5c0d82db70d7dda65a"><code>04ce508</code></a>
lib: fix bad unit test</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-bitcoin/rust-secp256k1/compare/secp256k1-0.24.3...secp256k1-0.28.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=secp256k1&package-manager=cargo&previous-version=0.24.3&new-version=0.28.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Preserve artifact cache unless stale (#1918)

Co-authored-by: Marcin S <marcin@realemail.net>

* Pools: Add `MaxUnbonding` to metadata (#2397)

* Bump docker/build-push-action from 5.0.0 to 5.1.0 (#2404)

Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 5.0.0 to 5.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.1.0</h2>
<ul>
<li>Add <code>annotations</code> input by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/992">docker/build-push-action#992</a></li>
<li>Add <code>secret-envs</code> input by <a
href="https://github.com/elias-lundgren"><code>@​elias-lundgren</code></a>
in <a
href="https://redirect.github.com/docker/build-push-action/pull/980">docker/build-push-action#980</a></li>
<li>Bump <code>@​babel/traverse</code> from 7.17.3 to 7.23.2 in <a
href="https://redirect.github.com/docker/build-push-action/pull/991">docker/build-push-action#991</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.13.0-rc.1 to
0.14.0 in <a
href="https://redirect.github.com/docker/build-push-action/pull/990">docker/build-push-action#990</a>
<a
href="https://redirect.github.com/docker/build-push-action/pull/1006">docker/build-push-action#1006</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0">https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/docker/build-push-action/commit/4a13e500e55cf31b7a5d59a38ab2040ab0f42f56"><code>4a13e50</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1006">#1006</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="https://github.com/docker/build-push-action/commit/74166686865cdc289a02f214871fb53447b73447"><code>7416668</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b4f76a5dc6a67282180eddc6d460f23bc97bfcbc"><code>b4f76a5</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.13.0 to
0.14.0</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b7feb766fae338d85274c87a9d0f24c09690dbe2"><code>b7feb76</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1005">#1005</a>
from crazy-max/ci-inspect</li>
<li><a
href="https://github.com/docker/build-push-action/commit/fae8018297c67066fff64a6e9c319c86f89b8982"><code>fae8018</code></a>
ci: inspect sbom and provenance</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b625868b13c3feb675cabbf9bfeb52ae94166606"><code>b625868</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1004">#1004</a>
from crazy-max/ci-update-buildx</li>
<li><a
href="https://github.com/docker/build-push-action/commit/5193ef1da6ea0d66de97d22817c258b203ade96a"><code>5193ef1</code></a>
ci: update buildx to latest</li>
<li><a
href="https://github.com/docker/build-push-action/commit/d3afd779e409ac26db5374fb27fe4aae9f6adb42"><code>d3afd77</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/991">#991</a>
from docker/dependabot/npm_and_yarn/babel/traverse-7....</li>
<li><a
href="https://github.com/docker/build-push-action/commit/7a786bb2b9408f7f997564f677248fabd4b886d5"><code>7a786bb</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/992">#992</a>
from crazy-max/annotations</li>
<li><a
href="https://github.com/docker/build-push-action/commit/c66ae3adcfbf698ecd851c6bb782654a0c6ffcae"><code>c66ae3a</code></a>
chore: update generated content</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/build-push-action/compare/0565240e2d4ab88bba5387d719585280857ece09...4a13e500e55cf31b7a5d59a38ab2040ab0f42f56">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=5.0.0&new-version=5.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* remove retry from backers on failed candidate validation (#2182)

Hey guys, as discussed I've changed the name to a more general one
`PvfExecKind`, is this good or too general?
Creating this as a draft, I still have to fix the tests.

Closes #1585

Kusama address: FkB6QEo8VnV3oifugNj5NeVG3Mvq1zFbrUu4P5YwRoe5mQN

---------

Co-authored-by: command-bot <>
Co-authored-by: Marcin S <marcin@realemail.net>

* bump zombienet version `v1.3.82` (#2396)

Includes:
 - bump `pjs` modules versions
- re-enable test disable in
https://github.com/paritytech/polkadot-sdk/pull/2294

---------

Co-authored-by: Bastian Köcher <info@kchr.de>

* `chain-spec-builder`: cleanup (#2174)

This PR removes:
-  `New`, `Generate`, `Edit` commands,
- `kitchensink` dependency
from the `chain-spec-builder` util.

New `convert-to-raw`, `update-code` commands were added.

Additionally renames the `runtime` command (which was added in #1256) to
`create`.

---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>

* Refactor `ValidationError` (#2406)

* Add output positional arg to undying-collator cli (#2375)

Follow up from https://github.com/paritytech/polkadot-sdk/pull/2370 to
add `output` positional argument to undying-collator.

cc @JoshOrndorff

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* PVF worker: switch on seccomp networking restrictions (#2221)

* cumulus-consensus-common: block import: `delayed_best_block` flag added (#2001)

This PR adds the `delayed_best_block` flag to `ParachainBlockImport`. If
not set, the `params.fork_choice` is not updated (to
`ForkChoiceStrategy::Custom`) during the block import.

When `delayed_best_block` is set to `false` all parachain blocks on the
[longest
fork](https://github.com/paritytech/polkadot-sdk/blob/552be4800d9e4b480f79a300fc531783e04be099/substrate/client/service/src/client/client.rs#L708-L709)
will be notified as the best block, allowing transaction pool to be
updated with every imported block.

Otherwise imported blocks will not be notified as best blocks
(`fork_choice=ForkChoiceStrategy::Custom(false)`), and transaction pool
would be updated only with best block received from relay-chain.

Improvement for: #1202

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Different XCM builders, default one requires fee payment (#2253)

Adding on top of the new builder pattern for creating XCM programs, I'm
adding some more APIs:

```rust
let paying_fees: Xcm<()> = Xcm::builder() // Only allow paying for fees
  .withdraw_asset() // First instruction has to load the holding register
  .buy_execution() // Second instruction has to be `buy_execution`
  .build();

let paying_fees_invalid: Xcm<()> = Xcm::builder()
  .withdraw_asset()
  .build(); // Invalid, need to pay for fees

let not_paying_fees: Xcm<()> = Xcm::builder_unpaid()
  .unpaid_execution() // Needed
  .withdraw_asset()
  .deposit_asset()
  .build();

let all_goes: Xcm<()> = Xcm::builder_unsafe() // You can do anything
  .withdraw_asset()
  .deposit_asset()
  .build();
```

The invalid bits are because the methods don't even exist on the types
that you'd want to call them on.

---------

Co-authored-by: command-bot <>

* added action to pass review bot on merge queue (#2414)

This action will trigger when a merge queue is created and will add a
positive status check under the `review-bot` account, allowing the PR to
pass the required check for the merge.

---------

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* Update tick collator for async backing (#1497)

This updates the tick runtime and polkadot-parachain collator to use
async backing.

* cumulus-test-service: block import fix (#2430)

This is follow-up for:
https://github.com/paritytech/polkadot-sdk/pull/2001

Block import queue for `test-parachain` (`cumulus-test-service`) shall
use delayed best block feature.

This should fixed broken zombienet tests.

* Deprecate `RewardDestination::Controller` (#2380)

Deprecates `RewardDestination::Controller` variant.

- [x] `RewardDestination::Controller` annotated with `#[deprecated]`.
- [x] `Controller` variant is now handled the same way as `Stash` in
`payout_stakers`.
- [x] `set_payee` errors if `RewardDestination::Controller` is provided.
- [x] Added `update_payee` call to lazily migrate
`RewardDestination::Controller` `Payee` storage entries to
`RewardDestination::Account(controller)` .
- [x] `payout_stakers_dead_controller` has been removed from benches &
weights - was not used.
- [x] Tests no longer use `RewardDestination::Controller`.

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: georgepisaltu <52418509+georgepisaltu@users.noreply.github.com>

* Revert docker images tag naming to <prnum-shortsha> (#2434)

Docker images from paritypr are also used in testnets. PR reverts docker
tags naming to a more convenient.

cc @PierreBesson

* Fixes import path in benchmark macro (#2437)

Fully-qualified path was not being used in benchmark macro for one of
the cases. This PR fixes this and removes the unnecessary import in a
couple of files, which I believe was done to fix this issue.

* PVF: Fix unshare "no such file or directory" error (#2426)

* Make TypeInfo for SkipCheckIfFeeless transparent, too (#2449)

The `SkipCheckifFeeless::IDENTIFIER` became transparent (ie was whatever
the inner signed ext was). This PR just makes the `TypeInfo` transparent
too, so that libraries that use said info to decode the data (ie subxt)
can behave identically whether or not the `SkipCheckifFeeless` wrapper
is used or not.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* work with additional key values (#1757)

Add the possibility to inject additional key-values in the
sproof-builder that generates the relay root that gets stored in
parachain-system.

Rationale: pallets that verify additional storage items (not those
verified by parachain-system) from the relay should be able to proof
against the relay root that gets stored in parachain-system. This PR
allows to create provide additional nibles that can later be used for
verifiability in other pallets

* polkadot-node-subsystems: `ChainApiBackend` added + `polkadot-debug` image version fixed (#2411)

The out-dated version (bad tag) of [polkadot
image](https://github.com/paritytech/polkadot-sdk/blob/ede4a362622dfa69eb167eaa876246b1289f4b41/.gitlab/pipeline/zombienet/cumulus.yml#L31)
([docker
info](https://hub.docker.com/layers/paritypr/polkadot-debug/master/images/sha256:adb1658052cf671b50c90d5cece5c7a131efa1a95978249bd5cb85a5ad654f7a?context=explore))
was used. This PR fixes this.

See also:
https://github.com/paritytech/polkadot-sdk/pull/2411#issuecomment-1822632724

Also adds an abstraction that allows asynchronous backends to be passed to `ChainApiSubsystem`
---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>

* Remove `#[macro_use]` annotation from `mod service` in all nodes. (#2456)

This PR removes `#[macro_use]` from the service module in each of the
Substrate nodes in the repo.

* Parachain Template
* Polkadot Parachain
* Minimal Node
* Node Template
* Kitchen Sink Node

IDK why this annotation was present, maybe from when we had the
`new_partial!` macro?

---------

Co-authored-by: Joshy Orndorff <git-user-email.h0ly5@simplelogin.com>

* Add `on-chain-release-build` feature for Collectives Westend (#2463)

Collectives Westend is missing an `on-chain-release-build` feature flag.

* CI: Disable runtime upgrade spec name check on Westend Asset Hub and fix Staking pallet migration (#2447)

Westend Asset Hub currently failing because the spec name is being
changed next runtime upgrade
(https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4413125).

This also fixes an idempotency issue with a staking pallet migration.
Similar issues will be caught automatically now that we've also updated
to try-runtime-cli v0.5.0 which checks for idempotency issues.

This also enables try-state checks running in the CI.

* sp-api: Move macro related re-exports to `__private` (#2446)

This moves the macro related re-exports to `__private` to make it more
obvious for downstream users that they are using an internal api.

---------

Co-authored-by: command-bot <>

* Fix trait imports from sp-api (#2472)

Broken after #2446.

* Amend staking docs to account for state of controller deprecation (#2451)

Amends some staking pallet docs, and deprecation comment, to adjust to
the latest controller deprecation state.

Note, do we need the `README.md` file, which is a duplicate of the
pallet docs? Docs would be easier to maintain, and less ambiguity for
devs to refer to, if we had one source of truth in the generated pallet
docs.

* Make publish CI consistant and bump to v0.3.0 (#2453)

* pallet-xcm: ensure xcm outcome is always complete, revert effects otherwise (#2405)

On extrinsics/call, ensure local XCM execution is complete/successful.
Otherwise, fail the extrinsic so that state changes don't get committed
to the db.

Added regression tests that fail without the fix.

fixes #2237

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* pallet-staking: Converts all math operations to safe (#2435)

This PR converts unsafe math operations to safe in the staking pallet.
 
Closes https://github.com/paritytech/polkadot-sdk/issues/2431

---------

Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>

* Adapt test worker to profile flag (#2450)

closes #2194 

cc @mrcnski

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Disable any peer connections for parachain nodes in pov-recovery zombienet test (#2475)

I noticed that this test broke at some point. The parachain nodes should
only acquire their blocks from the relay chain. But they were connecting
to their peers and started fetching blocks from there.

In this test I now take additional measures so we check that each nodes
really uses pov-recovery to get the blocks.

* Remove dmp-queue pallet from Rococo Asset Hub and Bridge Hub (#2483)

DMP queue migration is complete and the pallet should be removed to fix
the check runtime upgrade CI.

<img width="1501" alt="Screenshot 2023-11-24 at 16 05 37"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/ee1da6bb-2756-4423-8085-1e4c73553ad5">

<img width="1501" alt="Screenshot 2023-11-24 at 16 06 44"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/03f3e88f-aed8-4eaa-aab6-7998f72258be">

* relay-chain-consensus: set a fork_choice (#2462)

After #2001 the `fork_choice` strategy may remain uninitialized in the
block import pipeline which uses relay-chain verifier.
Refer to
https://github.com/paritytech/polkadot-sdk/pull/2430#issuecomment-1823979813
for some further discussion.

* Improve `UnpinHandleInner` debug (#2485)

Printing the `unpin_worker_sender` included the entire stacktrace and
that is a little bit too verbose.

* Derive `MaxEncodedLen` on `SlotDuration` (#2484)

# Description

Needed this in my code as part of the larger data structure.

---------

Co-authored-by: command-bot <>

* pallet-xcm: fix benchmarking (#2489)

Use non-zero weight limit in benchmarking `pallet_xcm::execute()` so the
given XCM actually executes.

* [NPoS] Use EraInfo to manipulate exposure in fast-unstake tests (#2459)

The FastUnstake pallet tests were previously directly modifying storage
items in the pallet-staking to alter exposure. However, due to the
introduction of the [new paged exposure
feature](https://github.com/paritytech/polkadot-sdk/pull/1189) these
tests were not testing against correct storage items. This issue
resulted in a bug that I didn't catch, which has been addressed in [this
fix](https://github.com/paritytech/polkadot-sdk/pull/2369).

This PR introduces a modification to how the pallet-fast-unstake handles
exposure. It now utilizes `pallet-staking::EraInfo` to set or mutate
Exposures.

* Remove `RuntimeApi` dependency on system parachain runtime code (#2455)

The last issue blocking the removal of the Polkadot and Kusama system
parachains from the repo in #1737 is the dependency on the runtime code
through the RuntimeApi in `polkadot-parachain`.

This PR introduces two fake runtimes to satisfy the build requirements
and changes the `new_partial` function to make it not be generic over
the runtimes.
The reason for the second runtime is the different Aura keys used in
Polkadot Asset Hub, as the impl for AuraApi depends on this type.
If this changes the `RuntimeApi` generic could be removed completely
from all functions in `services.rs` and and generic type parameters in
`services.rs` and specified as a concrete type to TFullClient`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Add missing workspace members (#2491)

The following members have been added:

```pre
cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal
cumulus/parachains/testnets-common
polkadot/node/tracking-allocator
substrate/frame/examples/frame-crate
```

CI check can be added after
https://github.com/paritytech/pipeline-scripts/pull/105 is merged.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>

* bump zombienet version `v1.3.83` (#2492)

Include fix for `0002-parachains-upgrade-smoke-test` test.

* Do not pollute global base path with export genesis/wasm (#2487)

Otherwise the user may runs into weird errors if there is already a db.

* Zombienet: add polkadot-debug image publish as needs for cumulus tests (#2493)

Add `build-push-image-polkadot-debug` job to needs since we changed to
use the polkadot-debug image from the current branch for cumulus test
and we need to be sure that the image is ready. Fix issues like
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4481059

cc: @bkchr

Co-authored-by: Bastian Köcher <git@kchr.de>

* polkadot-parachain: one chain-spec for all (#2457)

This PR removes some `ChainSpec` types which are not necessary
(left-overs from #1256). Currently `ChainSpec` does not have to be
generic over the specific `RuntimeGenesisConfig`, it is enough to use
single type for all:

https://github.com/paritytech/polkadot-sdk/blob/9f787018857660440182142adc806954d7d07709/cumulus/polkadot-parachain/src/chain_spec/mod.rs#L53-L54


related to: https://github.com/paritytech/polkadot-sdk/issues/25

---------

Co-authored-by: command-bot <>

* Update documentation for SafeMode and TxPause Pallets (#2413)

# Description

Documentation for the TxPause and SafeMode pallets.

Based on reading and the notes from the following related PRs:
- https://github.com/paritytech/substrate/pull/12092

I believe this also completes the checklist to be able to close the
related PRs:
- Close #302 
- Close #274

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* PVF: remove audit log access (#2461)

* New runtime `spec_version` format + backport of the bump to 1.4.0 (#2468)

## Overview

This PR aligns the `spec_version` formatting to the [recent
changes](https://github.com/polkadot-fellows/runtimes/pull/26/files#diff-efa4caeb17487ecb13d8f5eb7863c3241d84afa2e73fbf25909a2ca89df0f362R142)
made for the Polkadot/Kusama runtimes.

It also backports the latest version `v1.4.0` bumps as `1_004_000`.

## Details

During the switch from `v0.9` to `v1.x`, the format of the
`spec_version` was modified from: `(M)m_ppp` for a runtime considered on
version `M.m.pp`. For instance `0.9.42` had a `spec_version` of `9420`.

With the transition to `v1.x`, the format was changed to a bigger number
(still `u32`) formatted as `MM_mm_ppp` where `1.2.3` would be stored as
`01_02_003`.

This PR aligns the format with that has been introduced in the
fellowship repo: `MMM_mmm_ppp`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Zombienet tests - disputes on finalized blocks (#2184)

**Overview:**
Adding an extra malus variant focusing on disputing finalized blocks. It
will:
- wrap around approval-voting
- listen to `OverseerSignal::BlockFinalized` and when encountered start
a dispute for the `dispute_offset`th ancestor
- simply pass through all other messages and signals

Add zombienet tests testing various edgecases:
- disputing freshly finalized blocks
- disputing stale finalized blocks
- disputing eagerly pruned finalized blocks (might be separate PR)

**TODO:**
- [x] Register new malus variant
- [x] Simple pass through wrapper (approval-voting)
- [x] Simple network definition
- [x] Listen to block finalizations
- [x] Fetch ancestor hash
- [x] Fetch session index
- [x] Fetch candidate
- [x] Construct and send dispute message
- [x] zndsl test 1 checking that disputes on fresh finalizations resolve
valid Closes #1365
- [x] zndsl test 2 checking that disputes for too old finalized blocks
are not possible Closes #1364
- [ ] zndsl test 3 checking that disputes for candidates with eagerly
pruned relay parent state are handled correctly #1359 (deferred to a
separate PR)
- [x] Unit tests for new malus variant (testing cli etc)
- [x] Clean/streamline error handling
- [ ] ~~Ensure it tests properly on session boundaries~~

---------

Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: Marcin S. <marcin@realemail.net>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Decomissioned PR-Custom-Review (#2503)

This PR decomissions
[`PR-Custom-Review`](https://github.com/paritytech/pr-custom-review) in
replacement for
[`Review-bot`](https://github.com/paritytech/review-bot).

* Build the standard library crates when building the runtimes (#2217)

Our executor currently only supports the WASM MVP feature set, however
nowadays when compiling WASM the Rust compiler has more features enabled
by default.

We do set the `-C target-cpu=mvp` flag to make sure that *our* code gets
compiled in a way that is compatible with our executor, however this
doesn't affect Rust's standard library crates (`std`, `core` and
`alloc`) which are by default precompiled and still can make use of
these extra features.

So in this PR we force the compiler to also compile the standard library
crates for us to make sure that they also only use the MVP features.

I've added the `WASM_BUILD_STD` environment variable which can be used
to disable this behavior if set to `0`.

Unfortunately this *will* slow down the compile times when building
runtimes, but there isn't much that we can do about that.

Fixes https://github.com/paritytech/polkadot-sdk/issues/1755

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* asset-hub-westend-integration-tests: add more asset transfers tests (#2488)

Just adds more tests.

* Remove the timestamp handler (#2506)

* Staking: `chill_other` takes stash instead of controller (#2501)

The `chill_other` call is the only staking call that explicitly requires
`controller` in its signature. This PR changes the controller arg to be
the stash instead, with `StakingLedger` then fetching the controller
from storage.

This is not a breaking change per se - the call types do not change, but
is noteworthy as UIs will now want to pass the stash account into
`chill_other` calls, & metadata will reflect this.

Note: This is very low impact. `chill_other` has [hardly ever been
used](https://polkadot.subscan.io/extrinsic?address=&module=staking&call=chill_other&result=all&signedChecked=signed%20only&startDate=&endDate=&startBlock=&timeType=date&version=9431&endBlock=)
on Polkadot - notwithstanding the one called 11 days ago at block
18177457 that was a part of test I did, the last call was made 493 days
ago. Only 2 calls have ever been successful.

Addresses controller deprecation #2500

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* CI: Fix `build-and-attach-release-runtimes.yml` (#2471)

Incorporate suggestion from release team to get this workflow working.

edit: worked on this test GH release:
https://github.com/paritytech/polkadot-sdk/releases/tag/liam-debug-ghw.
let's try it.

* Fixes cumulus README instructions (#2442)

README instructions fixes to be compatible with the `polkadot-prepare`
and `polkadot-execute` binary split.

* Pools: Add ability to configure commission claiming permissions (#2474)

Addresses #409.

This request has been raised by multiple community members - the ability
for the nomination pool root role to configure permissionless commission
claiming:

> Would it be possible to have a claim_commission_other extrinsic for
claiming commission of nomination pools permissionless?

This PR does not quite introduce this additional call, but amends
`do_claim_commission` to check a new `claim_permission` field in the
`Commission` struct, configured by an enum:

```
enum CommissionClaimPermission {
   Permissionless,
   Account(AccountId),
}
```
This can be optionally set in a bonded pool's
`commission.claim_permission` field:

```
struct BondedPool {
   commission: {
      <snip>
      claim_permission: Option<CommissionClaimPermission<T::AccountId>>,
   },
   <snip>
}
```

This is a new field and requires a migration to add it to existing
pools. This will be `None` on pool creation, falling back to the `root`
role having sole access to claim commission if it is not set; this is
the behaviour as it is today. Once set, the field _can_ be set to `None`
again.

#### Changes
- [x] Add `commision.claim_permission` field.
- [x] Add `can_claim_commission` and amend `do_claim_commission`.
- [x] Add `set_commission_claim_permission` call.
- [x] Test to cover new configs and call.
- [x] Add and amend benchmarks.
- [x] Generate new weights + slot into call
`set_commission_claim_permission`.
- [x] Add migration to introduce `commission.claim_permission`, bump
storage version.
- [x] Update Westend weights.
- [x] Migration working.

---------

Co-authored-by: command-bot <>

* Added NetworkId::PolkadotBulletin variant (#2517)

We're going to bridge Polkadot Bridge Hub with [Polkadot Bulletin
chain](https://github.com/zdave-parity/polkadot-bulletin-chain) soon
(and Rococo Bridge Hub with 1:1 copy of Polkadot Bulletin chain even
sooner), so we need a variant for that chain in `NetworkId`. As
suggested, I'm adding a new variant for it to the `NetworkId` (we may
have used `ByGenesis(_)`, but decision was made to have a dedicated
variant for that).

* polkadot: disable block authoring backoff on production networks (#2510)

Currently the polkadot node will backoff from block authoring if
finality starts lagging. This PR disables this mechanism on production
networks (polkadot and kusama) and adds a flags to optionally force
enabling it.

* Set `frame_system::LastRuntimeUpgrade` after running `try-runtime` migrations (#2515)

Sets `frame_system::LastRuntimeUpgrade` after running try-runtime
migrations to better emulate real behavior.

This fixes an issue where migrations using the spec version to determine
whether to execute can incorrectly fail idempotency checks.

@s0me0ne-unkn0wn noticed this issue with the session key migration
introduced in https://github.com/paritytech/polkadot-sdk/pull/2265.

* Increase `cargo-check-each-crate-macos` timeout (#2519)

* Moves all test runtimes to use `derive_impl` (#2409)

Step in https://github.com/paritytech/polkadot-sdk/issues/171

This PR adds `derive_impl` on all `frame_system` config impls for mock
runtimes. The overridden configs are maintained as of now to ensure
minimal changes.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* PVF: Add test instructions (#2058)

* Remove `wasm-builder`'s README (#2525)

Followup of https://github.com/paritytech/polkadot-sdk/pull/2217

This PR deletes the README of the `wasm-builder` crate and moves its
docs back into the rustdoc, [as requested
here](https://github.com/paritytech/polkadot-sdk/pull/2217#discussion_r1406401175).
(:

* Remove `im-online` pallet from Rococo and Westend (#2265)

Co-authored-by: ordian <write@reusable.software>
Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>

* polkadot: remove grandpa pause support (#2511)

This was never used and we probably don't need it anyway.

* Remove pov-recovery race condition/Improve zombienet test (#2526)

The test was a bit flaky on CI. 

There was a race condition in the pov-recovery system. If the timing is
bad, it can happen that a block waits for a parent that is already
queued for import. The check if a block has children waiting happens
when we insert into the import queue. So we need to do an additional
check once we receive the import notification for the parent block.

Second issue is that `alice` was missing `--in-peers 0` and `--out-peers
0`, so alice was sometimes still fetching block via sync and the
assertion on the logs in zombienet would fail.

There is another potential issue that I saw once locally. We have a
failing pov-recovery queue that fails from time to time to check that
the retry mechanism does what it should. We now make sure that the same
candidate is never failed twice, so the tests become more predictable.

* Rework the event system of `sc-network` (#1370)

This commit introduces a new concept called `NotificationService` which
allows Polkadot protocols to communicate with the underlying
notification protocol implementation directly, without routing events
through `NetworkWorker`. This implies that each protocol has its own
service which it uses to communicate with remote peers and that each
`NotificationService` is unique with respect to the underlying
notification protocol, meaning `NotificationService` for the transaction
protocol can only be used to send and receive transaction-related
notifications.

The `NotificationService` concept introduces two additional benefits:
  * allow protocols to start using custom handshakes
  * allow protocols to accept/reject inbound peers

Previously the validation of inbound connections was solely the
responsibility of `ProtocolController`. This caused issues with light
peers and `SyncingEngine` as `ProtocolController` would accept more
peers than `SyncingEngine` could accept which caused peers to have
differing views of their own states. `SyncingEngine` would reject excess
peers but these rejections were not properly communicated to those peers
causing them to assume that they were accepted.

With `NotificationService`, the local handshake is not sent to remote
peer if peer is rejected which allows it to detect that it was rejected.

This commit also deprecates the use of `NetworkEventStream` for all
notification-related events and going forward only DHT events are
provided through `NetworkEventStream`. If protocols wish to follow each
other's events, they must introduce additional abtractions, as is done
for GRANDPA and transactions protocols by following the syncing protocol
through `SyncEventStream`.

Fixes https://github.com/paritytech/polkadot-sdk/issues/512
Fixes https://github.com/paritytech/polkadot-sdk/issues/514
Fixes https://github.com/paritytech/polkadot-sdk/issues/515
Fixes https://github.com/paritytech/polkadot-sdk/issues/554
Fixes https://github.com/paritytech/polkadot-sdk/issues/556

---
These changes are transferred from
https://github.com/paritytech/substrate/pull/14197 but there are no
functional changes compared to that PR

---------

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>

* [ci] Run gitspiegel trigger with merge conflicts (#2531)

Currently gitspiegel trigger won't run if there is merge conflict. This
PR fixes it.

close https://github.com/paritytech/gitspiegel/issues/183

* Remove long deprecated `AllPalletsWithoutSystemReversed` (#2509)

Remove deprecated `AllPalletsXY` types.

They have been deprecated for nearly 1.5 years now, I think its fine to
remove them.
If anyone feels like we should first put a date on the deprecation as
stated in the deprecation guideline, feel free to speak up. To me it
looks like this has been forgotten and can be directly removed.

* Remove `dmp_queue` pallet from Westend SP runtimes  (#2516)

Westend SP dmp queue pallet removal is complete.

<img width="1499" alt="Screenshot 2023-11-28 at 08 31 27"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/906246fb-3de9-4133-a827-431636a097ad">

<img width="1499" alt="Screenshot 2023-11-28 at 08 32 08"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/bde84891-b044-42c7-9a0b-59125cd24db1">

<img width="1499" alt="Screenshot 2023-11-28 at 08 31 45"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/38337484-0856-45c0-b9ff-8c785bc3c0e3">

* Enable parallel key scraping (#1985)

closes #174

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* substrate-node: `NativeElseWasmExecutor` is no longer used (#2521)

This PR removes `NativeElseWasmExecutor` usage from substrate node.
Instead [`WasmExecutor<(sp_io::SubstrateHostFunctions,
sp_statement_store::runtime_api::HostFunctions)>`](https://github.com/paritytech/polkadot-sdk/blob/49a41ab3bb3f630c20e5b24cec8d92382404631c/substrate/bin/node/executor/src/lib.rs#L26)
is used.

Related to #2358.

---------

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Remove system parachains Polkadot and Kusama runtimes (#1737)

Since the Polkadot and Kusama runtimes are no longer in the repo, the
relevant systems parachains runtimes also need to be removed. More
context [here](https://github.com/paritytech/polkadot-sdk/issues/603)
and [here](https://github.com/paritytech/polkadot-sdk/pull/1731).

Removes the following:
- `asset-hub-kusama` and `asset-hub-polkadot`
- `bridge-hub-kusama` and `bridge-hub-polkadot`
- `collectives-polkadot`
- `glutton-kusama`

Partially solves #603 and adds to #1731.

* Improve `CodeExecutor` (#2358)

Since `sp-state-machine` and `GenesisConfigBuilderRuntimeCaller` always
set `use_native` to be false.
We should remove this param and make `NativeElseWasmExecutor` behave
like its name.
It could make the above components use the correct execution strategy.

Maybe polkadot do not need about `NativeElseWasmExecutor` anymore. But
it is still needed by other chains and it's useful for debugging.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>

* add Rotko common good parachain nodes (#2533)

rotko networks parachain bootnodes 
```
# array of commands for testing
parachains=(
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/33514/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/34514/ws/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/35514/wss/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/33524/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/34524/ws/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/35524/wss/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/33534/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/34534/ws/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/35534/wss/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/33543/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/34543/ws/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/35543/wss/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/33553/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/34553/ws/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/35553/wss/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/33563/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/34563/ws/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/35563/wss/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/33573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/34573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/35573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/33593/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/34593/ws/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/35593/wss/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
)
```

* Bump fs4 from 0.6.6 to 0.7.0 (#1844)

* ParachainHost: No need to be generic over the block or hash type (#2537)

The `BlockNumber` and `Hash` are fixed types any way.

* Adding LuckyFriday's Bootnodes per IBP Application (#2538)

Good day,

This PR requests the inclusion of two bootnode entries for Polkadot,
Kusama and Westend as part of LuckyFriday's IBP application. The nodes
are hosted on self-owned hardware in a co-located facility. We've
undertaken connectivity tests ourselves and also from members of the
IBP.

The test commands used are as follows:

```
polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks

polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30333/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks

polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30334/wss/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks

polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30333/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks

polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks

polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30333/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks
```

All tests yielded syncing with 1 peer, a positive result. We have also
backed up our node-key in the event that restoration is required.

I hope that the aforementioned meets the requirement for inclusion and
look forward to a speedy turnaround.

Kind Regards,
Will | Paradox

* sp-api: Sprinkle some `automatically_derived` attributes

This attribute is informing tooling that the code is automatically
derived and thus, should not enable any linting.

* Disable trace-level logging from the `test-linux-stable-int` (#2546)

* chainHead: Backport error codes from spec (#2539)

This PR backports the error codes from the spec.

This relies on two specs for defining the error codes:
- Our rpc-spec-v2 https://github.com/paritytech/json-rpc-interface-spec.
- JSON-RPC spec https://www.jsonrpc.org/specification#error_object.

To better describe the error codes, they are divided into two separate
modules `rpc_spec_v2` and `json_rpc_spec` respectively.

The `InvalidSubscriptionID` and `FetchBlockHeader` are merged into the
JSON-RPC spec `INTERNAL_ERROR`.
While the other error codes are adjusted from spec.

Errors that are currently in use:
- -32801 block hash not reported by chainHead_follow or block hash has
been unpinned
- -32802 chainHead_follow started with withRuntime == false
- -32803 chainHead_follow did not generate an
operationWaitingForContinue event

The following are errors defined in the [JSON-RPC
spec](https://www.jsonrpc.org/specification#error_object):
- -32602 The provided parameter isn't one of the expected values, has
different format or is missing
- -32603 Internal server error

Note: Error `-32801` must be introduced and generated by the outstanding
https://github.com/paritytech/polkadot-sdk/issues/1505

Closes: https://github.com/paritytech/polkadot-sdk/issues/2530

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* state-db: log_target usage fixed (#2547)

Use `LOG_TARGET/LOG_TARGET_PIN` in logs.

* Parachain Template: Prune `AuxStore` bound and corresponding crate dependency (#2303)

This small PR removes an unnecessary trait bound to the `AuxStore` trait
from the Parachain template's `rpc.rs` file.

With that bound removed, the entire dependency on `sc-client-api` can
also be removed.

---------

Co-authored-by: Joshy Orndorff <git-user-email.h0ly5@simplelogin.com>
Co-authored-by: Bastian Köcher <git@kchr.de>

* Contracts: use compiled rust tests (#2347)

see #2189

This PR does the following:
- Bring the user api functions into a new pallet-contracts-uapi (They
are currently defined in ink!
[here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs)
- Add older api versions and unstable to the user api trait.
- Remove pallet-contracts-primitives and bring the types it defined in
uapi / pallet-contracts
- Add the infrastructure to build fixtures from Rust files and test it
works by replacing `dummy.wat` and `call.wat`
- Move all the doc from wasm/runtime.rs to pallet-contracts-uapi.

This will be done in a follow up:
- convert the rest of the test from .wat to rust
- bring risc-v uapi up to date with wasm
- finalize the uapi host fns, making sure everything is codegen from the
source host fns in pallet-contracts

---------

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* upgraded review bot to 2.3.0 (#2549)

Upgraded to version 2.3.0 which includes:
- paritytech/review-bot#103
- paritytech/review-bot#102

* Register metrics for the notification handles (#2562)

Add metrics for notification handles so substream events are correctly
reported to Prometheus

* Introduce Polkadot-Sdk `developer_hub`  (#2102)

This PR introduces the new crate `developer_hub` into the polkadot-sdk
repo. The vision for the developer-hub crate is detailed in [this
document](https://docs.google.com/document/d/1XLLkFNE8v8HLvZpI2rzsa8N2IN1FcKntc8q-Sc4xBAk/edit?usp=sharing).

<img width="1128" alt="Screenshot 2023-11-02 at 10 45 48"
src="https://github.com/paritytech/polkadot-sdk/assets/5588131/1e12b60f-fef5-42c4-8503-a3ba234077c3">


Other than adding the new crate, it also does the following: 

* Remove the `substrate` crate, as there is now a unique umbrella crate
for multiple things in `developer_hub::polkadot_sdk`.
* (backport candidate) A minor change to `frame-support` macros that
allows `T::RuntimeOrigin` to also be acceptable as the origin type.
* (backport candidate) A minor change to `frame-system` that allows us
to deposit events at genesis because now the real genesis config is
generated via wasm, and we can safely assume `cfg!(feature = "std")`
means only testing. related to #62.
* (backport candidate) Introduces a small `read_events_for_pallet` to
`frame_system` for easier event reading in tests.
* From https://github.com/paritytech/polkadot-sdk-docs/issues/31, it
takes action on improving the `pallet::call` docs.
* From https://github.com/paritytech/polkadot-sdk-docs/issues/31, it
takes action on improving the `UncheckedExtrinsic` docs.

## Way Forward

First, a version of this is deployed temporarily
[here](https://blog.kianenigma.nl/polkadot-sdk/developer_hub/index.html).
I will keep it up to date on a daily basis.

### This Pull Request

I see two ways forward: 

1. We acknowledge that everything in `developer-hub` is going to be WIP,
and merge this asap. We should not yet use links to this crate anywhere.
2. We make this be the feature branch, make PRs against this, and either
gradually backport it, or only merge to master once it is done.

I am personally in favor of option 1. If we stick to option 2, we need a
better way to deploy a staging version of this to gh-pages.

### Issue Tracking

The main issues related to the future of `developer_hub` are: 

- https://github.com/paritytech/polkadot-sdk-docs/issues/31
- https://github.com/paritytech/polkadot-sdk-docs/issues/4
- https://github.com/paritytech/polkadot-sdk-docs/issues/26 
- https://github.com/paritytech/polkadot-sdk-docs/issues/32
- https://github.com/paritytech/polkadot-sdk-docs/issues/36


### After This Pull Request

- [ ] create a redirect for
https://paritytech.github.io/polkadot-sdk/master/substrate/
- [x] analy…
claravanstaden referenced this issue in Snowfork/polkadot-sdk Dec 6, 2023
* [ci] Enable zombienet jobs in PRs (#2361)

Since preparation for the merge queues needs more time I'm enabling
zombienet jobs in PRs CI back.

* westend: remove SessionKeys migration already applied on-chain (#2363)

Westend now successfully updated to `spec: 103000`, we **have to
remove** the session keys migration before the next release as it
doesn't gracefully handle reapplying it.

* implementers-guide: update github link (#2368)

cc @joepetrowski

* Fix Typo: `PalletXcmExtrinsicsBenchmark` (#2354)

Missed in https://github.com/paritytech/polkadot-sdk/pull/1672

* add pallet nomination-pools versioned migration to kitchensink (#2167)

The versioned migrations are already there in pallet nomination-pools:

https://github.com/paritytech/polkadot-sdk/blob/f6ee4781f633f0f89598f7b230595afe401da8dc/substrate/frame/nomination-pools/src/migration.rs#L27-L48

Just updating the kitchensink runtime to point to them.

This is also nice because it points the dev to an example of how to use
`VersionedMigration`.

* fix typo (#2377)

* bump zombienet version `v1.3.80` (#2376)

New release includes logic to move all jobs to `spot instances`.
Thx!

* [NPoS] Check if staker is exposed in paged exposure storage entries (#2369)

Addresses a bug caused by
https://github.com/paritytech/polkadot-sdk/pull/1189. The changes are
still not released yet, so would like to push the fix soon so it can go
together with the release of the above PR.

`fast_unstake` checks if a staker is exposed in an era. However, this fn
is still returning whether the staker is exposed based on the old
storage item. This PR fixes that by looking in both old and new exposure
storages.

Also adds some integrity tests for paged exposures.

* Beefy: small fixes (#2378)

Related to #2285

- save the state of the BEEFY gadget after processing a finality proof.
We need this in order to avoid skipping blocks.
- avoid reprocessing the old state when not necessary

* crypto: `lazy_static` removed, light parser for address URI added (#2250)

The `lazy_static` package does not work well in `no-std`: it requires
`spin_no_std` feature, which also will propagate into `std` if enabled.
This is not what we want.

This PR provides simple address uri parser which allows to get rid of
_regex_ which was used to parse the address uri, what in turns allows to
remove lazy_static.

Three regular expressions
(`SS58_REGEX`,`SECRET_PHRASE_REGEX`,`JUNCTION_REGEX`) were replaced with
the parser which unifies all of them.

The new parser does not support Unicode, it is ASCII only.

Related to: #2044

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: command-bot <>

* [trivial] asset-hubs runtimes: fix incorrect doc-comments (#2384)

Fix some incorrect doc-comments

* Do not panic if the `fdlimit` call to increase the file descriptor limit fails (#2155)

# Description

Sometimes changing file descriptor limits is not allowed, but there is
no need to crash the node if/when this happens. Since `fdlimit`'s author
decided to use panics instead of returning `Result`, we need to catch
it.

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
of this project (at minimum one label for `T`
  required)
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works (if applicable)

---------

Co-authored-by: Koute <koute@users.noreply.github.com>

* Relax `force_default_xcm_version` for testnet system parachains (#2385)

This PR fixes two things:
- relax `force_default_xcm_version` for testnet system parachains (e.g.
BridgeHubWestend has now 2 and there is no way to change it to 3, so we
need to call `force_xcm_version(3)` for every parachain that it is
connected to, because we send XCMv3 messages)
- add `Storage` item to `PolkadotXcm` pallet definition (now we cannot
see storage items for `pallet_xcm` in PJS)


## TODO

- [ ] when merged open PR to `polkadot-fellows/runtimes` repo

* Make collator RPC mode non-experimental (#2381)

The `--relay-chain-rpc-urls` CLI flag has been available for a while
now. We have collators with this running and parachain teams are also
using it. It should be fine now to remove the experimental status.

* Fix migrations and add CI check for new system chains (#2336)

Westend Collectives migration CI check can be fixed once we have
https://github.com/paritytech/try-runtime-cli/pull/58, will open another
PR once it is available.

- [x] Remove deprecated `DmpQueue` pallet from Rococo Contracts, the
migration is complete
- [x] Fix Asset Hub Rococo storage versions
- [x] Add migration check CI for Asset Hub Rococo and Westend Bridge Hub

* Bump bandersnatch VRF revision (#2389)

Closes https://github.com/paritytech/polkadot-sdk/issues/2327

cc @burdges

* Bump secp256k1 from 0.24.3 to 0.28.0 (#2357)

Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from
0.24.3 to 0.28.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-bitcoin/rust-secp256k1/blob/master/CHANGELOG.md">secp256k1's
changelog</a>.</em></p>
<blockquote>
<h1>0.28.0 - 2023-10-23</h1>
<ul>
<li>Add bindings to the ElligatorSwift implementation <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/627">#627</a></li>
<li>Depend on recent release of <code>bitcoin_hashes</code> v0.13.0 <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/621">#621</a></li>
<li>Add a verify function to <code>PublicKey</code> <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/618">#618</a></li>
<li>Add serialize function for schnorr::Signature <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/607">#607</a></li>
<li>Bump MSRV to 1.48 <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/595">#595</a></li>
<li>Remove implementations of <code>PartialEq</code>, <code>Eq</code>,
<code>PartialOrd</code>, <code>Ord</code>, and <code>Hash</code> from
the
<code>impl_array_newtype</code> macro. Users will now need to derive
these traits if they are wanted.</li>
</ul>
<h1>0.27.0 - 2023-03-15</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/588">Depend
on newly release <code>bitcoin_hashes</code> v0.12</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/578">Implement
<code>Debug</code> trait for <code>Scalar</code> type</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/582">Implement
<code>insecure-erase</code></a>.</li>
</ul>
<h1>0.26.0 - 2202-12-19</h1>
<ul>
<li>Update libsecp25k1 to v0.2.0</li>
</ul>
<h1>0.25.0 - 2022-12-07</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/548">Fix
soundness issue with <code>preallocated_gen_new</code></a></li>
<li>Update to <code>secp256k1-sys</code> <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/549">v0.7.0</a></li>
<li>Use type system to <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/483">improve
safety</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/490">Change
secp256k1-sys symbol names to 0_6_1</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/499">Introduce
<code>rustfmt</code></a> to the codebase.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/507">Make
all raw pointer methods go through the CPtr trait</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/518">Make
comparison functions stable</a>.</li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/512">Remove</a>
public constant <code>ONE_KEY</code> (consider using
<code>FromStr</code> as a replacement).</li>
</ul>
<h1>0.24.1 - 2022-10-25</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/491">Fix
broken deserialization logic of <code>KeyPair</code></a> that previously
always panicked. After the patch deserialization only panics if neither
the <code>global-context</code> nor the <code>alloc</code> (default)
feature is active.</li>
</ul>
<h1>0.24.0 - 2022-07-20</h1>
<ul>
<li>Upgrade to new release of <a
href="https://github.com/rust-bitcoin/bitcoin_hashes/releases/tag/0.11.0">bitcoin_hashes</a>.</li>
</ul>
<h1>0.23.4 - 2022-07-14</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/474">Disable
automatic rerandomization of contexts under WASM</a></li>
</ul>
<h1>0.23.3 - 2022-06-29</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/465">Add
must_use for mut self key manipulation methods</a></li>
<li><a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/pull/466">Fix
fuzzing feature guard</a></li>
</ul>
<h1>0.23.2 - 2022-06-27</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/7de09c8050da12a13ef9ee3850597f69c887952d"><code>7de09c8</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Tracking PR for release: `secp256k1 v0...</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/3dc5b165401f249c01a88cec54061301cffd97a0"><code>3dc5b16</code></a>
Bump version to v0.28.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/3aada83180beec2b9f5ab8e7b9280a5517d3bcde"><code>3aada83</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Add bindings to the ElligatorSwift imp...</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/39febcb866ce285d53052a3636602f04483aa710"><code>39febcb</code></a>
Create rust-bidings</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/da4f67b274c3061717723a568cfb182e4e2e7cce"><code>da4f67b</code></a>
Merge <a
href="https://redirect.github.com/rust-bitcoin/rust-secp256k1/issues/256">rust-bitcoin/rust-secp256k1256</a>:
Update vendored lib secp256k1 to v0.4.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/80b2a8d4aa6ffa72041d569eab2278cd8c1ace2a"><code>80b2a8d</code></a>
Update vendored libsecp to v0.4.0</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/d2285c929a086276ce6d1670d795c49191e30c65"><code>d2285c9</code></a>
ci: Remove MIPS* from CI</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/0d58f50d523b40a78de0b87146208e3ad338c8ba"><code>0d58f50</code></a>
ci: generalize grp in &quot;illegal callback&quot; test</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/acf9ac13e9f8df84dd52d2f012cda7211a6af10c"><code>acf9ac1</code></a>
delete <code>test_manual_create_destroy</code> test</li>
<li><a
href="https://github.com/rust-bitcoin/rust-secp256k1/commit/04ce50891bb0d49be5355f5c0d82db70d7dda65a"><code>04ce508</code></a>
lib: fix bad unit test</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-bitcoin/rust-secp256k1/compare/secp256k1-0.24.3...secp256k1-0.28.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=secp256k1&package-manager=cargo&previous-version=0.24.3&new-version=0.28.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Preserve artifact cache unless stale (#1918)

Co-authored-by: Marcin S <marcin@realemail.net>

* Pools: Add `MaxUnbonding` to metadata (#2397)

* Bump docker/build-push-action from 5.0.0 to 5.1.0 (#2404)

Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 5.0.0 to 5.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.1.0</h2>
<ul>
<li>Add <code>annotations</code> input by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/992">docker/build-push-action#992</a></li>
<li>Add <code>secret-envs</code> input by <a
href="https://github.com/elias-lundgren"><code>@​elias-lundgren</code></a>
in <a
href="https://redirect.github.com/docker/build-push-action/pull/980">docker/build-push-action#980</a></li>
<li>Bump <code>@​babel/traverse</code> from 7.17.3 to 7.23.2 in <a
href="https://redirect.github.com/docker/build-push-action/pull/991">docker/build-push-action#991</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.13.0-rc.1 to
0.14.0 in <a
href="https://redirect.github.com/docker/build-push-action/pull/990">docker/build-push-action#990</a>
<a
href="https://redirect.github.com/docker/build-push-action/pull/1006">docker/build-push-action#1006</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0">https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/docker/build-push-action/commit/4a13e500e55cf31b7a5d59a38ab2040ab0f42f56"><code>4a13e50</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1006">#1006</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="https://github.com/docker/build-push-action/commit/74166686865cdc289a02f214871fb53447b73447"><code>7416668</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b4f76a5dc6a67282180eddc6d460f23bc97bfcbc"><code>b4f76a5</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.13.0 to
0.14.0</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b7feb766fae338d85274c87a9d0f24c09690dbe2"><code>b7feb76</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1005">#1005</a>
from crazy-max/ci-inspect</li>
<li><a
href="https://github.com/docker/build-push-action/commit/fae8018297c67066fff64a6e9c319c86f89b8982"><code>fae8018</code></a>
ci: inspect sbom and provenance</li>
<li><a
href="https://github.com/docker/build-push-action/commit/b625868b13c3feb675cabbf9bfeb52ae94166606"><code>b625868</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1004">#1004</a>
from crazy-max/ci-update-buildx</li>
<li><a
href="https://github.com/docker/build-push-action/commit/5193ef1da6ea0d66de97d22817c258b203ade96a"><code>5193ef1</code></a>
ci: update buildx to latest</li>
<li><a
href="https://github.com/docker/build-push-action/commit/d3afd779e409ac26db5374fb27fe4aae9f6adb42"><code>d3afd77</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/991">#991</a>
from docker/dependabot/npm_and_yarn/babel/traverse-7....</li>
<li><a
href="https://github.com/docker/build-push-action/commit/7a786bb2b9408f7f997564f677248fabd4b886d5"><code>7a786bb</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/992">#992</a>
from crazy-max/annotations</li>
<li><a
href="https://github.com/docker/build-push-action/commit/c66ae3adcfbf698ecd851c6bb782654a0c6ffcae"><code>c66ae3a</code></a>
chore: update generated content</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/build-push-action/compare/0565240e2d4ab88bba5387d719585280857ece09...4a13e500e55cf31b7a5d59a38ab2040ab0f42f56">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=5.0.0&new-version=5.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* remove retry from backers on failed candidate validation (#2182)

Hey guys, as discussed I've changed the name to a more general one
`PvfExecKind`, is this good or too general?
Creating this as a draft, I still have to fix the tests.

Closes #1585

Kusama address: FkB6QEo8VnV3oifugNj5NeVG3Mvq1zFbrUu4P5YwRoe5mQN

---------

Co-authored-by: command-bot <>
Co-authored-by: Marcin S <marcin@realemail.net>

* bump zombienet version `v1.3.82` (#2396)

Includes:
 - bump `pjs` modules versions
- re-enable test disable in
https://github.com/paritytech/polkadot-sdk/pull/2294

---------

Co-authored-by: Bastian Köcher <info@kchr.de>

* `chain-spec-builder`: cleanup (#2174)

This PR removes:
-  `New`, `Generate`, `Edit` commands,
- `kitchensink` dependency
from the `chain-spec-builder` util.

New `convert-to-raw`, `update-code` commands were added.

Additionally renames the `runtime` command (which was added in #1256) to
`create`.

---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>

* Refactor `ValidationError` (#2406)

* Add output positional arg to undying-collator cli (#2375)

Follow up from https://github.com/paritytech/polkadot-sdk/pull/2370 to
add `output` positional argument to undying-collator.

cc @JoshOrndorff

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* PVF worker: switch on seccomp networking restrictions (#2221)

* cumulus-consensus-common: block import: `delayed_best_block` flag added (#2001)

This PR adds the `delayed_best_block` flag to `ParachainBlockImport`. If
not set, the `params.fork_choice` is not updated (to
`ForkChoiceStrategy::Custom`) during the block import.

When `delayed_best_block` is set to `false` all parachain blocks on the
[longest
fork](https://github.com/paritytech/polkadot-sdk/blob/552be4800d9e4b480f79a300fc531783e04be099/substrate/client/service/src/client/client.rs#L708-L709)
will be notified as the best block, allowing transaction pool to be
updated with every imported block.

Otherwise imported blocks will not be notified as best blocks
(`fork_choice=ForkChoiceStrategy::Custom(false)`), and transaction pool
would be updated only with best block received from relay-chain.

Improvement for: #1202

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Different XCM builders, default one requires fee payment (#2253)

Adding on top of the new builder pattern for creating XCM programs, I'm
adding some more APIs:

```rust
let paying_fees: Xcm<()> = Xcm::builder() // Only allow paying for fees
  .withdraw_asset() // First instruction has to load the holding register
  .buy_execution() // Second instruction has to be `buy_execution`
  .build();

let paying_fees_invalid: Xcm<()> = Xcm::builder()
  .withdraw_asset()
  .build(); // Invalid, need to pay for fees

let not_paying_fees: Xcm<()> = Xcm::builder_unpaid()
  .unpaid_execution() // Needed
  .withdraw_asset()
  .deposit_asset()
  .build();

let all_goes: Xcm<()> = Xcm::builder_unsafe() // You can do anything
  .withdraw_asset()
  .deposit_asset()
  .build();
```

The invalid bits are because the methods don't even exist on the types
that you'd want to call them on.

---------

Co-authored-by: command-bot <>

* added action to pass review bot on merge queue (#2414)

This action will trigger when a merge queue is created and will add a
positive status check under the `review-bot` account, allowing the PR to
pass the required check for the merge.

---------

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* Update tick collator for async backing (#1497)

This updates the tick runtime and polkadot-parachain collator to use
async backing.

* cumulus-test-service: block import fix (#2430)

This is follow-up for:
https://github.com/paritytech/polkadot-sdk/pull/2001

Block import queue for `test-parachain` (`cumulus-test-service`) shall
use delayed best block feature.

This should fixed broken zombienet tests.

* Deprecate `RewardDestination::Controller` (#2380)

Deprecates `RewardDestination::Controller` variant.

- [x] `RewardDestination::Controller` annotated with `#[deprecated]`.
- [x] `Controller` variant is now handled the same way as `Stash` in
`payout_stakers`.
- [x] `set_payee` errors if `RewardDestination::Controller` is provided.
- [x] Added `update_payee` call to lazily migrate
`RewardDestination::Controller` `Payee` storage entries to
`RewardDestination::Account(controller)` .
- [x] `payout_stakers_dead_controller` has been removed from benches &
weights - was not used.
- [x] Tests no longer use `RewardDestination::Controller`.

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: georgepisaltu <52418509+georgepisaltu@users.noreply.github.com>

* Revert docker images tag naming to <prnum-shortsha> (#2434)

Docker images from paritypr are also used in testnets. PR reverts docker
tags naming to a more convenient.

cc @PierreBesson

* Fixes import path in benchmark macro (#2437)

Fully-qualified path was not being used in benchmark macro for one of
the cases. This PR fixes this and removes the unnecessary import in a
couple of files, which I believe was done to fix this issue.

* PVF: Fix unshare "no such file or directory" error (#2426)

* Make TypeInfo for SkipCheckIfFeeless transparent, too (#2449)

The `SkipCheckifFeeless::IDENTIFIER` became transparent (ie was whatever
the inner signed ext was). This PR just makes the `TypeInfo` transparent
too, so that libraries that use said info to decode the data (ie subxt)
can behave identically whether or not the `SkipCheckifFeeless` wrapper
is used or not.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* work with additional key values (#1757)

Add the possibility to inject additional key-values in the
sproof-builder that generates the relay root that gets stored in
parachain-system.

Rationale: pallets that verify additional storage items (not those
verified by parachain-system) from the relay should be able to proof
against the relay root that gets stored in parachain-system. This PR
allows to create provide additional nibles that can later be used for
verifiability in other pallets

* polkadot-node-subsystems: `ChainApiBackend` added + `polkadot-debug` image version fixed (#2411)

The out-dated version (bad tag) of [polkadot
image](https://github.com/paritytech/polkadot-sdk/blob/ede4a362622dfa69eb167eaa876246b1289f4b41/.gitlab/pipeline/zombienet/cumulus.yml#L31)
([docker
info](https://hub.docker.com/layers/paritypr/polkadot-debug/master/images/sha256:adb1658052cf671b50c90d5cece5c7a131efa1a95978249bd5cb85a5ad654f7a?context=explore))
was used. This PR fixes this.

See also:
https://github.com/paritytech/polkadot-sdk/pull/2411#issuecomment-1822632724

Also adds an abstraction that allows asynchronous backends to be passed to `ChainApiSubsystem`
---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>

* Remove `#[macro_use]` annotation from `mod service` in all nodes. (#2456)

This PR removes `#[macro_use]` from the service module in each of the
Substrate nodes in the repo.

* Parachain Template
* Polkadot Parachain
* Minimal Node
* Node Template
* Kitchen Sink Node

IDK why this annotation was present, maybe from when we had the
`new_partial!` macro?

---------

Co-authored-by: Joshy Orndorff <git-user-email.h0ly5@simplelogin.com>

* Add `on-chain-release-build` feature for Collectives Westend (#2463)

Collectives Westend is missing an `on-chain-release-build` feature flag.

* CI: Disable runtime upgrade spec name check on Westend Asset Hub and fix Staking pallet migration (#2447)

Westend Asset Hub currently failing because the spec name is being
changed next runtime upgrade
(https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4413125).

This also fixes an idempotency issue with a staking pallet migration.
Similar issues will be caught automatically now that we've also updated
to try-runtime-cli v0.5.0 which checks for idempotency issues.

This also enables try-state checks running in the CI.

* sp-api: Move macro related re-exports to `__private` (#2446)

This moves the macro related re-exports to `__private` to make it more
obvious for downstream users that they are using an internal api.

---------

Co-authored-by: command-bot <>

* Fix trait imports from sp-api (#2472)

Broken after #2446.

* Amend staking docs to account for state of controller deprecation (#2451)

Amends some staking pallet docs, and deprecation comment, to adjust to
the latest controller deprecation state.

Note, do we need the `README.md` file, which is a duplicate of the
pallet docs? Docs would be easier to maintain, and less ambiguity for
devs to refer to, if we had one source of truth in the generated pallet
docs.

* Make publish CI consistant and bump to v0.3.0 (#2453)

* pallet-xcm: ensure xcm outcome is always complete, revert effects otherwise (#2405)

On extrinsics/call, ensure local XCM execution is complete/successful.
Otherwise, fail the extrinsic so that state changes don't get committed
to the db.

Added regression tests that fail without the fix.

fixes #2237

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* pallet-staking: Converts all math operations to safe (#2435)

This PR converts unsafe math operations to safe in the staking pallet.
 
Closes https://github.com/paritytech/polkadot-sdk/issues/2431

---------

Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>

* Adapt test worker to profile flag (#2450)

closes #2194 

cc @mrcnski

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Disable any peer connections for parachain nodes in pov-recovery zombienet test (#2475)

I noticed that this test broke at some point. The parachain nodes should
only acquire their blocks from the relay chain. But they were connecting
to their peers and started fetching blocks from there.

In this test I now take additional measures so we check that each nodes
really uses pov-recovery to get the blocks.

* Remove dmp-queue pallet from Rococo Asset Hub and Bridge Hub (#2483)

DMP queue migration is complete and the pallet should be removed to fix
the check runtime upgrade CI.

<img width="1501" alt="Screenshot 2023-11-24 at 16 05 37"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/ee1da6bb-2756-4423-8085-1e4c73553ad5">

<img width="1501" alt="Screenshot 2023-11-24 at 16 06 44"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/03f3e88f-aed8-4eaa-aab6-7998f72258be">

* relay-chain-consensus: set a fork_choice (#2462)

After #2001 the `fork_choice` strategy may remain uninitialized in the
block import pipeline which uses relay-chain verifier.
Refer to
https://github.com/paritytech/polkadot-sdk/pull/2430#issuecomment-1823979813
for some further discussion.

* Improve `UnpinHandleInner` debug (#2485)

Printing the `unpin_worker_sender` included the entire stacktrace and
that is a little bit too verbose.

* Derive `MaxEncodedLen` on `SlotDuration` (#2484)

# Description

Needed this in my code as part of the larger data structure.

---------

Co-authored-by: command-bot <>

* pallet-xcm: fix benchmarking (#2489)

Use non-zero weight limit in benchmarking `pallet_xcm::execute()` so the
given XCM actually executes.

* [NPoS] Use EraInfo to manipulate exposure in fast-unstake tests (#2459)

The FastUnstake pallet tests were previously directly modifying storage
items in the pallet-staking to alter exposure. However, due to the
introduction of the [new paged exposure
feature](https://github.com/paritytech/polkadot-sdk/pull/1189) these
tests were not testing against correct storage items. This issue
resulted in a bug that I didn't catch, which has been addressed in [this
fix](https://github.com/paritytech/polkadot-sdk/pull/2369).

This PR introduces a modification to how the pallet-fast-unstake handles
exposure. It now utilizes `pallet-staking::EraInfo` to set or mutate
Exposures.

* Remove `RuntimeApi` dependency on system parachain runtime code (#2455)

The last issue blocking the removal of the Polkadot and Kusama system
parachains from the repo in #1737 is the dependency on the runtime code
through the RuntimeApi in `polkadot-parachain`.

This PR introduces two fake runtimes to satisfy the build requirements
and changes the `new_partial` function to make it not be generic over
the runtimes.
The reason for the second runtime is the different Aura keys used in
Polkadot Asset Hub, as the impl for AuraApi depends on this type.
If this changes the `RuntimeApi` generic could be removed completely
from all functions in `services.rs` and and generic type parameters in
`services.rs` and specified as a concrete type to TFullClient`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Add missing workspace members (#2491)

The following members have been added:

```pre
cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal
cumulus/parachains/testnets-common
polkadot/node/tracking-allocator
substrate/frame/examples/frame-crate
```

CI check can be added after
https://github.com/paritytech/pipeline-scripts/pull/105 is merged.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>

* bump zombienet version `v1.3.83` (#2492)

Include fix for `0002-parachains-upgrade-smoke-test` test.

* Do not pollute global base path with export genesis/wasm (#2487)

Otherwise the user may runs into weird errors if there is already a db.

* Zombienet: add polkadot-debug image publish as needs for cumulus tests (#2493)

Add `build-push-image-polkadot-debug` job to needs since we changed to
use the polkadot-debug image from the current branch for cumulus test
and we need to be sure that the image is ready. Fix issues like
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4481059

cc: @bkchr

Co-authored-by: Bastian Köcher <git@kchr.de>

* polkadot-parachain: one chain-spec for all (#2457)

This PR removes some `ChainSpec` types which are not necessary
(left-overs from #1256). Currently `ChainSpec` does not have to be
generic over the specific `RuntimeGenesisConfig`, it is enough to use
single type for all:

https://github.com/paritytech/polkadot-sdk/blob/9f787018857660440182142adc806954d7d07709/cumulus/polkadot-parachain/src/chain_spec/mod.rs#L53-L54


related to: https://github.com/paritytech/polkadot-sdk/issues/25

---------

Co-authored-by: command-bot <>

* Update documentation for SafeMode and TxPause Pallets (#2413)

# Description

Documentation for the TxPause and SafeMode pallets.

Based on reading and the notes from the following related PRs:
- https://github.com/paritytech/substrate/pull/12092

I believe this also completes the checklist to be able to close the
related PRs:
- Close #302 
- Close #274

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* PVF: remove audit log access (#2461)

* New runtime `spec_version` format + backport of the bump to 1.4.0 (#2468)

## Overview

This PR aligns the `spec_version` formatting to the [recent
changes](https://github.com/polkadot-fellows/runtimes/pull/26/files#diff-efa4caeb17487ecb13d8f5eb7863c3241d84afa2e73fbf25909a2ca89df0f362R142)
made for the Polkadot/Kusama runtimes.

It also backports the latest version `v1.4.0` bumps as `1_004_000`.

## Details

During the switch from `v0.9` to `v1.x`, the format of the
`spec_version` was modified from: `(M)m_ppp` for a runtime considered on
version `M.m.pp`. For instance `0.9.42` had a `spec_version` of `9420`.

With the transition to `v1.x`, the format was changed to a bigger number
(still `u32`) formatted as `MM_mm_ppp` where `1.2.3` would be stored as
`01_02_003`.

This PR aligns the format with that has been introduced in the
fellowship repo: `MMM_mmm_ppp`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* Zombienet tests - disputes on finalized blocks (#2184)

**Overview:**
Adding an extra malus variant focusing on disputing finalized blocks. It
will:
- wrap around approval-voting
- listen to `OverseerSignal::BlockFinalized` and when encountered start
a dispute for the `dispute_offset`th ancestor
- simply pass through all other messages and signals

Add zombienet tests testing various edgecases:
- disputing freshly finalized blocks
- disputing stale finalized blocks
- disputing eagerly pruned finalized blocks (might be separate PR)

**TODO:**
- [x] Register new malus variant
- [x] Simple pass through wrapper (approval-voting)
- [x] Simple network definition
- [x] Listen to block finalizations
- [x] Fetch ancestor hash
- [x] Fetch session index
- [x] Fetch candidate
- [x] Construct and send dispute message
- [x] zndsl test 1 checking that disputes on fresh finalizations resolve
valid Closes #1365
- [x] zndsl test 2 checking that disputes for too old finalized blocks
are not possible Closes #1364
- [ ] zndsl test 3 checking that disputes for candidates with eagerly
pruned relay parent state are handled correctly #1359 (deferred to a
separate PR)
- [x] Unit tests for new malus variant (testing cli etc)
- [x] Clean/streamline error handling
- [ ] ~~Ensure it tests properly on session boundaries~~

---------

Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: Marcin S. <marcin@realemail.net>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Decomissioned PR-Custom-Review (#2503)

This PR decomissions
[`PR-Custom-Review`](https://github.com/paritytech/pr-custom-review) in
replacement for
[`Review-bot`](https://github.com/paritytech/review-bot).

* Build the standard library crates when building the runtimes (#2217)

Our executor currently only supports the WASM MVP feature set, however
nowadays when compiling WASM the Rust compiler has more features enabled
by default.

We do set the `-C target-cpu=mvp` flag to make sure that *our* code gets
compiled in a way that is compatible with our executor, however this
doesn't affect Rust's standard library crates (`std`, `core` and
`alloc`) which are by default precompiled and still can make use of
these extra features.

So in this PR we force the compiler to also compile the standard library
crates for us to make sure that they also only use the MVP features.

I've added the `WASM_BUILD_STD` environment variable which can be used
to disable this behavior if set to `0`.

Unfortunately this *will* slow down the compile times when building
runtimes, but there isn't much that we can do about that.

Fixes https://github.com/paritytech/polkadot-sdk/issues/1755

---------

Co-authored-by: Bastian Köcher <git@kchr.de>

* asset-hub-westend-integration-tests: add more asset transfers tests (#2488)

Just adds more tests.

* Remove the timestamp handler (#2506)

* Staking: `chill_other` takes stash instead of controller (#2501)

The `chill_other` call is the only staking call that explicitly requires
`controller` in its signature. This PR changes the controller arg to be
the stash instead, with `StakingLedger` then fetching the controller
from storage.

This is not a breaking change per se - the call types do not change, but
is noteworthy as UIs will now want to pass the stash account into
`chill_other` calls, & metadata will reflect this.

Note: This is very low impact. `chill_other` has [hardly ever been
used](https://polkadot.subscan.io/extrinsic?address=&module=staking&call=chill_other&result=all&signedChecked=signed%20only&startDate=&endDate=&startBlock=&timeType=date&version=9431&endBlock=)
on Polkadot - notwithstanding the one called 11 days ago at block
18177457 that was a part of test I did, the last call was made 493 days
ago. Only 2 calls have ever been successful.

Addresses controller deprecation #2500

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* CI: Fix `build-and-attach-release-runtimes.yml` (#2471)

Incorporate suggestion from release team to get this workflow working.

edit: worked on this test GH release:
https://github.com/paritytech/polkadot-sdk/releases/tag/liam-debug-ghw.
let's try it.

* Fixes cumulus README instructions (#2442)

README instructions fixes to be compatible with the `polkadot-prepare`
and `polkadot-execute` binary split.

* Pools: Add ability to configure commission claiming permissions (#2474)

Addresses #409.

This request has been raised by multiple community members - the ability
for the nomination pool root role to configure permissionless commission
claiming:

> Would it be possible to have a claim_commission_other extrinsic for
claiming commission of nomination pools permissionless?

This PR does not quite introduce this additional call, but amends
`do_claim_commission` to check a new `claim_permission` field in the
`Commission` struct, configured by an enum:

```
enum CommissionClaimPermission {
   Permissionless,
   Account(AccountId),
}
```
This can be optionally set in a bonded pool's
`commission.claim_permission` field:

```
struct BondedPool {
   commission: {
      <snip>
      claim_permission: Option<CommissionClaimPermission<T::AccountId>>,
   },
   <snip>
}
```

This is a new field and requires a migration to add it to existing
pools. This will be `None` on pool creation, falling back to the `root`
role having sole access to claim commission if it is not set; this is
the behaviour as it is today. Once set, the field _can_ be set to `None`
again.

#### Changes
- [x] Add `commision.claim_permission` field.
- [x] Add `can_claim_commission` and amend `do_claim_commission`.
- [x] Add `set_commission_claim_permission` call.
- [x] Test to cover new configs and call.
- [x] Add and amend benchmarks.
- [x] Generate new weights + slot into call
`set_commission_claim_permission`.
- [x] Add migration to introduce `commission.claim_permission`, bump
storage version.
- [x] Update Westend weights.
- [x] Migration working.

---------

Co-authored-by: command-bot <>

* Added NetworkId::PolkadotBulletin variant (#2517)

We're going to bridge Polkadot Bridge Hub with [Polkadot Bulletin
chain](https://github.com/zdave-parity/polkadot-bulletin-chain) soon
(and Rococo Bridge Hub with 1:1 copy of Polkadot Bulletin chain even
sooner), so we need a variant for that chain in `NetworkId`. As
suggested, I'm adding a new variant for it to the `NetworkId` (we may
have used `ByGenesis(_)`, but decision was made to have a dedicated
variant for that).

* polkadot: disable block authoring backoff on production networks (#2510)

Currently the polkadot node will backoff from block authoring if
finality starts lagging. This PR disables this mechanism on production
networks (polkadot and kusama) and adds a flags to optionally force
enabling it.

* Set `frame_system::LastRuntimeUpgrade` after running `try-runtime` migrations (#2515)

Sets `frame_system::LastRuntimeUpgrade` after running try-runtime
migrations to better emulate real behavior.

This fixes an issue where migrations using the spec version to determine
whether to execute can incorrectly fail idempotency checks.

@s0me0ne-unkn0wn noticed this issue with the session key migration
introduced in https://github.com/paritytech/polkadot-sdk/pull/2265.

* Increase `cargo-check-each-crate-macos` timeout (#2519)

* Moves all test runtimes to use `derive_impl` (#2409)

Step in https://github.com/paritytech/polkadot-sdk/issues/171

This PR adds `derive_impl` on all `frame_system` config impls for mock
runtimes. The overridden configs are maintained as of now to ensure
minimal changes.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* PVF: Add test instructions (#2058)

* Remove `wasm-builder`'s README (#2525)

Followup of https://github.com/paritytech/polkadot-sdk/pull/2217

This PR deletes the README of the `wasm-builder` crate and moves its
docs back into the rustdoc, [as requested
here](https://github.com/paritytech/polkadot-sdk/pull/2217#discussion_r1406401175).
(:

* Remove `im-online` pallet from Rococo and Westend (#2265)

Co-authored-by: ordian <write@reusable.software>
Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>

* polkadot: remove grandpa pause support (#2511)

This was never used and we probably don't need it anyway.

* Remove pov-recovery race condition/Improve zombienet test (#2526)

The test was a bit flaky on CI. 

There was a race condition in the pov-recovery system. If the timing is
bad, it can happen that a block waits for a parent that is already
queued for import. The check if a block has children waiting happens
when we insert into the import queue. So we need to do an additional
check once we receive the import notification for the parent block.

Second issue is that `alice` was missing `--in-peers 0` and `--out-peers
0`, so alice was sometimes still fetching block via sync and the
assertion on the logs in zombienet would fail.

There is another potential issue that I saw once locally. We have a
failing pov-recovery queue that fails from time to time to check that
the retry mechanism does what it should. We now make sure that the same
candidate is never failed twice, so the tests become more predictable.

* Rework the event system of `sc-network` (#1370)

This commit introduces a new concept called `NotificationService` which
allows Polkadot protocols to communicate with the underlying
notification protocol implementation directly, without routing events
through `NetworkWorker`. This implies that each protocol has its own
service which it uses to communicate with remote peers and that each
`NotificationService` is unique with respect to the underlying
notification protocol, meaning `NotificationService` for the transaction
protocol can only be used to send and receive transaction-related
notifications.

The `NotificationService` concept introduces two additional benefits:
  * allow protocols to start using custom handshakes
  * allow protocols to accept/reject inbound peers

Previously the validation of inbound connections was solely the
responsibility of `ProtocolController`. This caused issues with light
peers and `SyncingEngine` as `ProtocolController` would accept more
peers than `SyncingEngine` could accept which caused peers to have
differing views of their own states. `SyncingEngine` would reject excess
peers but these rejections were not properly communicated to those peers
causing them to assume that they were accepted.

With `NotificationService`, the local handshake is not sent to remote
peer if peer is rejected which allows it to detect that it was rejected.

This commit also deprecates the use of `NetworkEventStream` for all
notification-related events and going forward only DHT events are
provided through `NetworkEventStream`. If protocols wish to follow each
other's events, they must introduce additional abtractions, as is done
for GRANDPA and transactions protocols by following the syncing protocol
through `SyncEventStream`.

Fixes https://github.com/paritytech/polkadot-sdk/issues/512
Fixes https://github.com/paritytech/polkadot-sdk/issues/514
Fixes https://github.com/paritytech/polkadot-sdk/issues/515
Fixes https://github.com/paritytech/polkadot-sdk/issues/554
Fixes https://github.com/paritytech/polkadot-sdk/issues/556

---
These changes are transferred from
https://github.com/paritytech/substrate/pull/14197 but there are no
functional changes compared to that PR

---------

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>

* [ci] Run gitspiegel trigger with merge conflicts (#2531)

Currently gitspiegel trigger won't run if there is merge conflict. This
PR fixes it.

close https://github.com/paritytech/gitspiegel/issues/183

* Remove long deprecated `AllPalletsWithoutSystemReversed` (#2509)

Remove deprecated `AllPalletsXY` types.

They have been deprecated for nearly 1.5 years now, I think its fine to
remove them.
If anyone feels like we should first put a date on the deprecation as
stated in the deprecation guideline, feel free to speak up. To me it
looks like this has been forgotten and can be directly removed.

* Remove `dmp_queue` pallet from Westend SP runtimes  (#2516)

Westend SP dmp queue pallet removal is complete.

<img width="1499" alt="Screenshot 2023-11-28 at 08 31 27"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/906246fb-3de9-4133-a827-431636a097ad">

<img width="1499" alt="Screenshot 2023-11-28 at 08 32 08"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/bde84891-b044-42c7-9a0b-59125cd24db1">

<img width="1499" alt="Screenshot 2023-11-28 at 08 31 45"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/38337484-0856-45c0-b9ff-8c785bc3c0e3">

* Enable parallel key scraping (#1985)

closes #174

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* substrate-node: `NativeElseWasmExecutor` is no longer used (#2521)

This PR removes `NativeElseWasmExecutor` usage from substrate node.
Instead [`WasmExecutor<(sp_io::SubstrateHostFunctions,
sp_statement_store::runtime_api::HostFunctions)>`](https://github.com/paritytech/polkadot-sdk/blob/49a41ab3bb3f630c20e5b24cec8d92382404631c/substrate/bin/node/executor/src/lib.rs#L26)
is used.

Related to #2358.

---------

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Remove system parachains Polkadot and Kusama runtimes (#1737)

Since the Polkadot and Kusama runtimes are no longer in the repo, the
relevant systems parachains runtimes also need to be removed. More
context [here](https://github.com/paritytech/polkadot-sdk/issues/603)
and [here](https://github.com/paritytech/polkadot-sdk/pull/1731).

Removes the following:
- `asset-hub-kusama` and `asset-hub-polkadot`
- `bridge-hub-kusama` and `bridge-hub-polkadot`
- `collectives-polkadot`
- `glutton-kusama`

Partially solves #603 and adds to #1731.

* Improve `CodeExecutor` (#2358)

Since `sp-state-machine` and `GenesisConfigBuilderRuntimeCaller` always
set `use_native` to be false.
We should remove this param and make `NativeElseWasmExecutor` behave
like its name.
It could make the above components use the correct execution strategy.

Maybe polkadot do not need about `NativeElseWasmExecutor` anymore. But
it is still needed by other chains and it's useful for debugging.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>

* add Rotko common good parachain nodes (#2533)

rotko networks parachain bootnodes 
```
# array of commands for testing
parachains=(
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/33514/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/34514/ws/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/35514/wss/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/33524/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/34524/ws/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/35524/wss/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/33534/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/34534/ws/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/35534/wss/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/33543/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/34543/ws/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/35543/wss/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/33553/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/34553/ws/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/35553/wss/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/33563/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/34563/ws/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/35563/wss/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/33573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/34573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/35573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/33593/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/34593/ws/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
  "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/35593/wss/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
)
```

* Bump fs4 from 0.6.6 to 0.7.0 (#1844)

* ParachainHost: No need to be generic over the block or hash type (#2537)

The `BlockNumber` and `Hash` are fixed types any way.

* Adding LuckyFriday's Bootnodes per IBP Application (#2538)

Good day,

This PR requests the inclusion of two bootnode entries for Polkadot,
Kusama and Westend as part of LuckyFriday's IBP application. The nodes
are hosted on self-owned hardware in a co-located facility. We've
undertaken connectivity tests ourselves and also from members of the
IBP.

The test commands used are as follows:

```
polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks

polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30333/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks

polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30334/wss/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks

polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30333/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks

polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks

polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30333/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks
```

All tests yielded syncing with 1 peer, a positive result. We have also
backed up our node-key in the event that restoration is required.

I hope that the aforementioned meets the requirement for inclusion and
look forward to a speedy turnaround.

Kind Regards,
Will | Paradox

* sp-api: Sprinkle some `automatically_derived` attributes

This attribute is informing tooling that the code is automatically
derived and thus, should not enable any linting.

* Disable trace-level logging from the `test-linux-stable-int` (#2546)

* chainHead: Backport error codes from spec (#2539)

This PR backports the error codes from the spec.

This relies on two specs for defining the error codes:
- Our rpc-spec-v2 https://github.com/paritytech/json-rpc-interface-spec.
- JSON-RPC spec https://www.jsonrpc.org/specification#error_object.

To better describe the error codes, they are divided into two separate
modules `rpc_spec_v2` and `json_rpc_spec` respectively.

The `InvalidSubscriptionID` and `FetchBlockHeader` are merged into the
JSON-RPC spec `INTERNAL_ERROR`.
While the other error codes are adjusted from spec.

Errors that are currently in use:
- -32801 block hash not reported by chainHead_follow or block hash has
been unpinned
- -32802 chainHead_follow started with withRuntime == false
- -32803 chainHead_follow did not generate an
operationWaitingForContinue event

The following are errors defined in the [JSON-RPC
spec](https://www.jsonrpc.org/specification#error_object):
- -32602 The provided parameter isn't one of the expected values, has
different format or is missing
- -32603 Internal server error

Note: Error `-32801` must be introduced and generated by the outstanding
https://github.com/paritytech/polkadot-sdk/issues/1505

Closes: https://github.com/paritytech/polkadot-sdk/issues/2530

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* state-db: log_target usage fixed (#2547)

Use `LOG_TARGET/LOG_TARGET_PIN` in logs.

* Parachain Template: Prune `AuxStore` bound and corresponding crate dependency (#2303)

This small PR removes an unnecessary trait bound to the `AuxStore` trait
from the Parachain template's `rpc.rs` file.

With that bound removed, the entire dependency on `sc-client-api` can
also be removed.

---------

Co-authored-by: Joshy Orndorff <git-user-email.h0ly5@simplelogin.com>
Co-authored-by: Bastian Köcher <git@kchr.de>

* Contracts: use compiled rust tests (#2347)

see #2189

This PR does the following:
- Bring the user api functions into a new pallet-contracts-uapi (They
are currently defined in ink!
[here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs)
- Add older api versions and unstable to the user api trait.
- Remove pallet-contracts-primitives and bring the types it defined in
uapi / pallet-contracts
- Add the infrastructure to build fixtures from Rust files and test it
works by replacing `dummy.wat` and `call.wat`
- Move all the doc from wasm/runtime.rs to pallet-contracts-uapi.

This will be done in a follow up:
- convert the rest of the test from .wat to rust
- bring risc-v uapi up to date with wasm
- finalize the uapi host fns, making sure everything is codegen from the
source host fns in pallet-contracts

---------

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* upgraded review bot to 2.3.0 (#2549)

Upgraded to version 2.3.0 which includes:
- paritytech/review-bot#103
- paritytech/review-bot#102

* Register metrics for the notification handles (#2562)

Add metrics for notification handles so substream events are correctly
reported to Prometheus

* Introduce Polkadot-Sdk `developer_hub`  (#2102)

This PR introduces the new crate `developer_hub` into the polkadot-sdk
repo. The vision for the developer-hub crate is detailed in [this
document](https://docs.google.com/document/d/1XLLkFNE8v8HLvZpI2rzsa8N2IN1FcKntc8q-Sc4xBAk/edit?usp=sharing).

<img width="1128" alt="Screenshot 2023-11-02 at 10 45 48"
src="https://github.com/paritytech/polkadot-sdk/assets/5588131/1e12b60f-fef5-42c4-8503-a3ba234077c3">


Other than adding the new crate, it also does the following: 

* Remove the `substrate` crate, as there is now a unique umbrella crate
for multiple things in `developer_hub::polkadot_sdk`.
* (backport candidate) A minor change to `frame-support` macros that
allows `T::RuntimeOrigin` to also be acceptable as the origin type.
* (backport candidate) A minor change to `frame-system` that allows us
to deposit events at genesis because now the real genesis config is
generated via wasm, and we can safely assume `cfg!(feature = "std")`
means only testing. related to #62.
* (backport candidate) Introduces a small `read_events_for_pallet` to
`frame_system` for easier event reading in tests.
* From https://github.com/paritytech/polkadot-sdk-docs/issues/31, it
takes action on improving the `pallet::call` docs.
* From https://github.com/paritytech/polkadot-sdk-docs/issues/31, it
takes action on improving the `UncheckedExtrinsic` docs.

## Way Forward

First, a version of this is deployed temporarily
[here](https://blog.kianenigma.nl/polkadot-sdk/developer_hub/index.html).
I will keep it up to date on a daily basis.

### This Pull Request

I see two ways forward: 

1. We acknowledge that everything in `developer-hub` is going to be WIP,
and merge this asap. We should not yet use links to this crate anywhere.
2. We make this be the feature branch, make PRs against this, and either
gradually backport it, or only merge to master once it is done.

I am personally in favor of option 1. If we stick to option 2, we need a
better way to deploy a staging version of this to gh-pages.

### Issue Tracking

The main issues related to the future of `developer_hub` are: 

- https://github.com/paritytech/polkadot-sdk-docs/issues/31
- https://github.com/paritytech/polkadot-sdk-docs/issues/4
- https://github.com/paritytech/polkadot-sdk-docs/issues/26 
- https://github.com/paritytech/polkadot-sdk-docs/issues/32
- https://github.com/paritytech/polkadot-sdk-docs/issues/36


### After This Pull Request

- [ ] create a redirect for
https://paritytech.github.io/polkadot-sdk/master/substrate/
- [x] analy…
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this issue Mar 25, 2024
This PR introduces the new crate `developer_hub` into the polkadot-sdk
repo. The vision for the developer-hub crate is detailed in [this
document](https://docs.google.com/document/d/1XLLkFNE8v8HLvZpI2rzsa8N2IN1FcKntc8q-Sc4xBAk/edit?usp=sharing).

<img width="1128" alt="Screenshot 2023-11-02 at 10 45 48"
src="https://github.com/paritytech/polkadot-sdk/assets/5588131/1e12b60f-fef5-42c4-8503-a3ba234077c3">


Other than adding the new crate, it also does the following: 

* Remove the `substrate` crate, as there is now a unique umbrella crate
for multiple things in `developer_hub::polkadot_sdk`.
* (backport candidate) A minor change to `frame-support` macros that
allows `T::RuntimeOrigin` to also be acceptable as the origin type.
* (backport candidate) A minor change to `frame-system` that allows us
to deposit events at genesis because now the real genesis config is
generated via wasm, and we can safely assume `cfg!(feature = "std")`
means only testing. related to paritytech#62.
* (backport candidate) Introduces a small `read_events_for_pallet` to
`frame_system` for easier event reading in tests.
* From paritytech/polkadot-sdk-docs#31, it
takes action on improving the `pallet::call` docs.
* From paritytech/polkadot-sdk-docs#31, it
takes action on improving the `UncheckedExtrinsic` docs.

## Way Forward

First, a version of this is deployed temporarily
[here](https://blog.kianenigma.nl/polkadot-sdk/developer_hub/index.html).
I will keep it up to date on a daily basis.

### This Pull Request

I see two ways forward: 

1. We acknowledge that everything in `developer-hub` is going to be WIP,
and merge this asap. We should not yet use links to this crate anywhere.
2. We make this be the feature branch, make PRs against this, and either
gradually backport it, or only merge to master once it is done.

I am personally in favor of option 1. If we stick to option 2, we need a
better way to deploy a staging version of this to gh-pages.

### Issue Tracking

The main issues related to the future of `developer_hub` are: 

- paritytech/polkadot-sdk-docs#31
- paritytech/polkadot-sdk-docs#4
- paritytech/polkadot-sdk-docs#26 
- paritytech/polkadot-sdk-docs#32
- paritytech/polkadot-sdk-docs#36


### After This Pull Request

- [ ] create a redirect for
https://paritytech.github.io/polkadot-sdk/master/substrate/
- [x] analytics 
- [ ] link checker
- [ ] the matter of publishing, and how all of these relative links for
when we do, that is still an open question. There is section on this in
the landing page.
- [ ] updated https://paritytech.github.io/

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Juan Girini <juangirini@gmail.com>
Co-authored-by: bader y <ibnbassem@gmail.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I6-meta A specific issue for grouping tasks or bugs of a specific category.
Projects
Status: Open
Status: in progress
Development

No branches or pull requests