- Dec 01, 2023
-
-
Davide Galassi authored
This PR introduces the pallet for Sassafras consensus. ## Non Goals The pallet delivers only the bare-bones and doesn't deliver support for auxiliary functionalities such as equivocation report and support for epoch change via session pallet. These functionalities were drafted in the [main PR](https://github.com/paritytech/polkadot-sdk/pull/1336), but IMO is better to introduce this auxiliary stuff in a follow up PR and after client code. ## Potential follow ups https://github.com/paritytech/polkadot-sdk/issues/2364 --------- Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Koute <[email protected]> Co-authored-by: Michal Kucharczyk <[email protected]> Co-authored-by: André Silva <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
dependabot[bot] authored
Bumps [proc-macro-crate](https://github.com/bkchr/proc-macro-crate) from 1.3.1 to 2.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/bkchr/proc-macro-crate/releases">proc-macro-crate's releases</a>.</em></p> <blockquote> <h2>v2.0.0</h2> <h2>What's Changed</h2> <ul> <li>Release 2.0.0 by <a href="https://github.com/bkchr"><code>@bkchr</code></a> in <a href="https://redirect.github.com/bkchr/proc-macro-crate/pull/39">bkchr/proc-macro-crate#39</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/bkchr/proc-macro-crate/compare/v1.3.1...v2.0.0">https://github.com/bkchr/proc-macro-crate/compare/v1.3.1...v2.0.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/bkchr/proc-macro-crate/commit/cc100ed2bc1ac9bb81812fd435a43e2ef023f355"><code>cc100ed</code></a> Merge pull request <a href="https://redirect.github.com/bkchr/proc-macro-crate/issues/39">#39</a> from bkchr/bkchr-2.0.0</li> <li><a href="https://github.com/bkchr/proc-macro-crate/commit/39a7c1844fc4d73ef397a7e8d9419f1f3381aa44"><code>39a7c18</code></a> Release 2.0.0</li> <li>See full diff in <a href="https://github.com/bkchr/proc-macro-crate/compare/v1.3.1...v2.0.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=proc-macro-crate&package-manager=cargo&previous-version=1.3.1&new-version=2.0.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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Nov 30, 2023
-
-
asynchronous rob authored
In gossip-support, we shuffled the list of authorities using the `rand::seq::SliceRandom::shuffle`. This function's behavior is unspecified beyond being `O(n)` and could change in the future, leading to network issues between nodes using different shuffling algorithms. In practice, the implementation was a Fisher-Yates shuffle. This PR replaces the call with a re-implementation of Fisher-Yates and adds a test to ensure the behavior is the same between the two at the moment.
-
dependabot[bot] authored
Bumps the known_good_semver group with 2 updates: [serde](https://github.com/serde-rs/serde) and [clap](https://github.com/clap-rs/clap). Updates `serde` from 1.0.188 to 1.0.193 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/serde-rs/serde/releases">serde's releases</a>.</em></p> <blockquote> <h2>v1.0.193</h2> <ul> <li>Fix field names used for the deserialization of <code>RangeFrom</code> and <code>RangeTo</code> (<a href="https://redirect.github.com/serde-rs/serde/issues/2653">#2653</a>, <a href="https://redirect.github.com/serde-rs/serde/issues/2654">#2654</a>, <a href="https://redirect.github.com/serde-rs/serde/issues/2655">#2655</a>, thanks <a href="https://github.com/emilbonnek"><code>@emilbonnek</code></a>)</li> </ul> <h2>v1.0.192</h2> <ul> <li>Allow internal tag field in untagged variant (<a href="https://redirect.github.com/serde-rs/serde/issues/2646">#2646</a>, thanks <a href="https://github.com/robsdedude"><code>@robsdedude</code></a>)</li> </ul> <h2>v1.0.191</h2> <ul> <li>Documentation improvements</li> </ul> <h2>v1.0.190</h2> <ul> <li>Preserve NaN sign when deserializing f32 from f64 or vice versa (<a href="https://redirect.github.com/serde-rs/serde/issues/2637">#2637</a>)</li> </ul> <h2>v1.0.189</h2> <ul> <li>Fix "cannot infer type" error when internally tagged enum contains untagged variant (<a href="https://redirect.github.com/serde-rs/serde/issues/2613">#2613</a>, thanks <a href="https://github.com/ahl"><code>@ahl</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/serde/commit/44613c7d0190dbb5ecd2d5ec19c636f45b7488cc"><code>44613c7</code></a> Release 1.0.193</li> <li><a href="https://github.com/serde-rs/serde/commit/c706281df3c8d50dba1763f19c856df2746eba6c"><code>c706281</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2655">#2655</a> from dtolnay/rangestartend</li> <li><a href="https://github.com/serde-rs/serde/commit/65d75b8fe3105f00ab2e01537d568d4587167582"><code>65d75b8</code></a> Add RangeFrom and RangeTo tests</li> <li><a href="https://github.com/serde-rs/serde/commit/332b0cba40bcbcc7a6b23a9706277c54791a9856"><code>332b0cb</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2654">#2654</a> from dtolnay/rangestartend</li> <li><a href="https://github.com/serde-rs/serde/commit/8c4af412969086bc8f54fdc2a079d373632e0a03"><code>8c4af41</code></a> Fix more RangeFrom / RangeEnd mixups</li> <li><a href="https://github.com/serde-rs/serde/commit/24a78f071b22ae491eec4127be696ac255b9b5d3"><code>24a78f0</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2653">#2653</a> from emilbonnek/fix/range-to-from-de-mixup</li> <li><a href="https://github.com/serde-rs/serde/commit/c91c33436d7aaef7472ebc18b734ddc9b5bd11fa"><code>c91c334</code></a> Fix Range{From,To} deserialize mixup</li> <li><a href="https://github.com/serde-rs/serde/commit/2083f43a287cac8302009fda5bbe41518dd83209"><code>2083f43</code></a> Update ui test suite to nightly-2023-11-19</li> <li><a href="https://github.com/serde-rs/serde/commit/4676abdc9e6bbbddfb33a00ce8d7e81e92f01120"><code>4676abd</code></a> Release 1.0.192</li> <li><a href="https://github.com/serde-rs/serde/commit/35700eb23e21d8cb198ef4a422ddad13b855ce3b"><code>35700eb</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2646">#2646</a> from robsdedude/fix/2643/allow-tag-field-in-untagged</li> <li>Additional commits viewable in <a href="https://github.com/serde-rs/serde/compare/v1.0.188...v1.0.193">compare view</a></li> </ul> </details> <br /> Updates `clap` from 4.4.6 to 4.4.10 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v4.4.10</h2> <h2>[4.4.10] - 2023-11-28</h2> <h3>Documentation</h3> <ul> <li>Link out to changelog</li> <li>Cross link derive's attribute reference to derive tutorial</li> </ul> <h2>v4.4.9</h2> <h2>[4.4.9] - 2023-11-27</h2> <h3>Fixes</h3> <ul> <li><em>(help)</em> Show correct <code>Command::about</code> under flattened headings</li> <li><em>(help)</em> Respect <code>hide</code> when flattening subcommands</li> </ul> <h2>v4.4.8</h2> <h2>[4.4.8] - 2023-11-10</h2> <h3>Features</h3> <ul> <li>Add <code>Command::flatten_help</code> to allow <code>git stash -h</code> like help for subcommands</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[4.4.10] - 2023-11-28</h2> <h3>Documentation</h3> <ul> <li>Link out to changelog</li> <li>Cross link derive's attribute reference to derive tutorial</li> </ul> <h2>[4.4.9] - 2023-11-27</h2> <h3>Fixes</h3> <ul> <li><em>(help)</em> Show correct <code>Command::about</code> under flattened headings</li> <li><em>(help)</em> Respect <code>hide</code> when flattening subcommands</li> </ul> <h2>[4.4.8] - 2023-11-10</h2> <h3>Features</h3> <ul> <li>Add <code>Command::flatten_help</code> to allow <code>git stash -h</code> like help for subcommands</li> </ul> <h2>[4.4.7] - 2023-10-24</h2> <h3>Performance</h3> <ul> <li>Reduced code size</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/clap-rs/clap/commit/c0a1814d3c1d93c18faaedc95fd251846e47f4fe"><code>c0a1814</code></a> chore: Release</li> <li><a href="https://github.com/clap-rs/clap/commit/c83e681e20b05f7e128088f47f8fcfc44e8ea166"><code>c83e681</code></a> docs: Update changelog</li> <li><a href="https://github.com/clap-rs/clap/commit/91bcac4ca9d442786f554abeb7b1ed6d7a464a42"><code>91bcac4</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/5230">#5230</a> from epage/migrate</li> <li><a href="https://github.com/clap-rs/clap/commit/030d87505d150345ddd425c1df21c034d2ae7748"><code>030d875</code></a> docs: Link out to the changelog at the relevant tag</li> <li><a href="https://github.com/clap-rs/clap/commit/b661a9de04aebd1adaaafdbf7e470f07a8d8a36d"><code>b661a9d</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/5229">#5229</a> from epage/derive</li> <li><a href="https://github.com/clap-rs/clap/commit/a08587b00e347492165ded1415bad6ab339e9f0b"><code>a08587b</code></a> docs(derive): Link to tutorial sections for attributes</li> <li><a href="https://github.com/clap-rs/clap/commit/21b671f689bc0b8d790dc8c42902c22822bf6f82"><code>21b671f</code></a> chore: Release</li> <li><a href="https://github.com/clap-rs/clap/commit/93ba76dbaaf9136313a4fe2978693cc39fa467dd"><code>93ba76d</code></a> docs: Update changelog</li> <li><a href="https://github.com/clap-rs/clap/commit/c1c55b30d853446e2cab78664c0d22c1b77d4dfd"><code>c1c55b3</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/5228">#5228</a> from epage/flat</li> <li><a href="https://github.com/clap-rs/clap/commit/b13f6d98622b80ba30e63c2c6e65d218cc8a4de3"><code>b13f6d9</code></a> fix(help): Hide 'help' if only flattened subcommand</li> <li>Additional commits viewable in <a href="https://github.com/clap-rs/clap/compare/v4.4.6...v4.4.10">compare view</a></li> </ul> </details> <br /> 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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
Sebastian Kunert authored
This PR provides the infrastructure for the pov-reclaim mechanism discussed in #209. The goal is to provide the current proof size to the runtime so it can be used to reclaim storage weight. ## New Host Function - A new host function is provided [here](https://github.com/skunert/polkadot-sdk/blob/5b317fda /cumulus/primitives/pov-reclaim/src/lib.rs#L23). It returns the size of the current proof size to the runtime. If recording is not enabled, it returns 0. ## Implementation Overview - Implement option to enable proof recording during import in the client. This is currently enabled for `polkadot-parachain`, `parachain-template` and the cumulus test node. - Make the proof recorder ready for no-std. It was previously only enabled for std environments, but we need to record the proof size in `validate_block` too. - Provide a recorder implementation that only the records the size of incoming nodes and does not store the nodes itself. - Fix benchmarks that were broken by async backing changes - Provide new externalities extension that is registered by default if proof recording is enabled. - I think we should discuss the naming, pov-reclaim was more intuitive to me, but we could also go with clawback like in the issue. ## Impact of proof recording during import With proof recording: 6.3058 Kelem/s Without proof recording: 6.3427 Kelem/s The measured impact on the importing performance is quite low on my machine using the block import benchmark. With proof recording I am seeing a performance hit of 0.585%. --------- Co-authored-by: command-bot <> Co-authored-by: Davide Galassi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Kian Paimani authored
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] 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 <[email protected]> Co-authored-by: Juan Girini <[email protected]> Co-authored-by: bader y <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: James Wilson <[email protected]> Co-authored-by: Michal Kucharczyk <[email protected]>
-
- Nov 29, 2023
-
-
PG Herveou authored
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 <[email protected]>
-
dependabot[bot] authored
-
Dónal Murray authored
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.
-
Michal Kucharczyk authored
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/49a41ab3 /substrate/bin/node/executor/src/lib.rs#L26) is used. Related to #2358. --------- Co-authored-by: Davide Galassi <[email protected]>
-
Liam Aharon authored
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">
-
- Nov 28, 2023
-
-
Aaro Altonen authored
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 <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]>
-
- Nov 27, 2023
-
-
Adrian Catangiu authored
Just adds more tests.
-
- Nov 25, 2023
-
-
Wil Wade authored
# 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 <[email protected]>
-
- Nov 24, 2023
-
-
Dónal Murray authored
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 <[email protected]>
-
Liam Aharon authored
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">
-
Xiliang Chen authored
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 <[email protected]>
-
- Nov 23, 2023
-
-
André Silva authored
Broken after #2446.
-
Bastian Köcher authored
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 <>
-
- Nov 22, 2023
-
-
Michal Kucharczyk authored
The out-dated version (bad tag) of [polkadot image](https://github.com/paritytech/polkadot-sdk/blob/ede4a362 /.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 <[email protected]>
-
Marcin S. authored
-
- Nov 21, 2023
-
-
Sophia Gold authored
This updates the tick runtime and polkadot-parachain collator to use async backing.
-
Francisco Aguirre authored
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 <>
-
Michal Kucharczyk authored
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 <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: command-bot <>
-
- Nov 19, 2023
-
-
Julian Eager authored
Co-authored-by: Marcin S <[email protected]>
-
- Nov 18, 2023
-
-
dependabot[bot] authored
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 "illegal callback" 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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Liam Aharon <[email protected]>
-
- Nov 17, 2023
-
-
Davide Galassi authored
Closes https://github.com/paritytech/polkadot-sdk/issues/2327 cc @burdges
-
Nazar Mokrynskyi authored
# 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 <[email protected]>
-
Michal Kucharczyk authored
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 <[email protected]> Co-authored-by: Koute <[email protected]> Co-authored-by: command-bot <>
-
- Nov 15, 2023
-
-
Bastian Köcher authored
Adds a function for querying the last runtime upgrade spec version. This can be useful for when writing runtime level migrations to ensure that they are not executed multiple times. An example would be a session key migration. --------- Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
Branislav Kontur authored
Rococo<>Wococo bridge is replaced by Rococo<Westend bridge, so this PR removes unneeded code. - [x] update bridges subtree after https://github.com/paritytech/parity-bridges-common/pull/2692 --------- Co-authored-by: command-bot <> Co-authored-by: Svyatoslav Nikolsky <[email protected]>
-
Dónal Murray authored
Add collectives and glutton parachain westend runtimes to prepare for #1737. The removal of system parachain native runtimes #1737 is blocked until chainspecs and runtime APIs can be dealt with cleanly (merge of #1256 and follow up PRs). In the meantime, these additions are ready to be merged to `master`, so I have separated them out into this PR. Also marked `bridge-hub-westend` as unimplemented in line with [this issue](https://github.com/paritytech/parity-bridges-common/issues/2602). TODO - [x] add to `command-bot` benchmarks - [x] add to `command-bot-scripts` benchmarks - [x] generate weights --------- Co-authored-by: joe petrowski <[email protected]> Co-authored-by: Muharem <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Branislav Kontur <[email protected]>
-
joe petrowski authored
The goal of this PR is to migrate Identity deposits from the Relay Chain to a system parachain. The problem I want to solve is that `IdentityOf` and `SubsOf` both store an amount that's held in reserve as a storage deposit. When migrating to a parachain, we can take a snapshot of the actual `IdentityInfo` and sub-account mappings, but should migrate (off chain) the `deposit`s to zero, since the chain (and by extension, accounts) won't have any funds at genesis. The good news is that we expect parachain deposits to be significantly lower (possibly 100x) on the parachain. That is, a deposit of 21 DOT on the Relay Chain would need 0.21 DOT on a parachain. This PR proposes to migrate the deposits in the following way: 1. Introduces a new pallet with two extrinsics: - `reap_identity`: Has a configurable `ReapOrigin`, which would be set to `EnsureSigned` on the Relay Chain (i.e. callable by anyone) and `EnsureRoot` on the parachain (we don't want identities reaped from there). - `poke_deposit`: Checks what deposit the pallet holds (at genesis, zero) and attempts to update the amount based on the calculated deposit for storage data. 2. `reap_identity` clears all storage data for a `target` account and unreserves their deposit. 3. A `ReapIdentityHandler` teleports the necessary DOT to the parachain and calls `poke_deposit`. Since the parachain deposit is much lower, and was just unreserved, we know we have enough. One awkwardness I ran into was that the XCMv3 instruction set does not provide a way for the system to teleport assets without a fee being deducted on reception. Users shouldn't have to pay a fee for the system to migrate their info to a more efficient location. So I wrote my own program and did the `InitiateTeleport` accounting on my own to send a program with `UnpaidExecution`. Have discussed an `InitiateUnpaidTeleport` instruction with @franciscoaguirre . Obviously any chain executing this would have to pass a `Barrier` for free execution. TODO: - [x] Confirm People Chain ParaId - [x] Confirm People Chain deposit rates (determined in https://github.com/paritytech/polkadot-sdk/pull/2281) - [x] Add pallet to Westend --------- Co-authored-by: Bastian Köcher <[email protected]>
-
- Nov 14, 2023
-
-
PG Herveou authored
This PR introduces: - XCM host functions `xcm_send`, `xcm_execute` - An Xcm trait into the config. that proxy these functions to to `pallet_xcm`, or disable their usage by using `()`. - A mock_network and xcm_test files to test the newly added xcm-related functions. --------- Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Sasha Gryaznov <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Alexander Theißen <[email protected]>
-
Alin Dima authored
Adds a `NodeFeatures` bitfield value to the runtime `HostConfiguration`, with the purpose of coordinating the enabling of node-side features, such as: https://github.com/paritytech/polkadot-sdk/issues/628 and https://github.com/paritytech/polkadot-sdk/issues/598. These are features that require all validators enable them at the same time, assuming all/most nodes have upgraded their node versions. This PR doesn't add any feature yet. These are coming in future PRs. Also adds a runtime API for querying the state of the client features and an extrinsic for setting/unsetting a feature by its index in the bitfield. Note: originally part of: https://github.com/paritytech/polkadot-sdk/pull/1644, but posted as standalone to be reused by other PRs until the initial PR is merged
-
jserrat authored
Co-authored-by: Marcin S <[email protected]>
-
Alexandru Vasile authored
This PR adds support for multiple hashes being passed to the `chainHeda_unpin` parameters. The `hash` parameter is renamed to `hash_or_hashes` per https://github.com/paritytech/json-rpc-interface-spec/pull/111. While at it, a new integration test is added to check the unpinning of multiple hashes. The API is checked against a hash or a vector of hashes. cc @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile <[email protected]>
-
Marcin S. authored
-
Adrian Catangiu authored
- switch from Rococo<>Wococo to Rococo<>Westend bridge - add bidirectional simple tests - remove Wococo chains from xcm-emulator - added tests for assets transfers over Rococo<>Westend bridge fixes https://github.com/paritytech/parity-bridges-common/issues/2405
-
- Nov 13, 2023
-
-
Adrian Catangiu authored
## Motivation `pallet-xcm` is the main user-facing interface for XCM functionality, including assets manipulation functions like `teleportAssets()` and `reserve_transfer_assets()` calls. While `teleportAsset()` works both ways, `reserve_transfer_assets()` works only for sending reserve-based assets to a remote destination and beneficiary when the reserve is the _local chain_. ## Solution This PR enhances `pallet_xcm::(limited_)reserve_withdraw_assets` to support transfers when reserves are other chains. This will allow complete, **bi-directional** reserve-based asset transfers user stories using `pallet-xcm`. Enables following scenarios: - transferring assets with local reserve (was previously supported iff asset used as fee also had local reserve - now it works in all cases), - transferring assets with reserve on destination, - transferring assets with reserve on remote/third-party chain (iff assets and fees have same remote reserve), - transferring assets with reserve different than the reserve of the asset to be used as fees - meaning can be used to transfer random asset with local/dest reserve while using DOT for fees on all involved chains, even if DOT local/dest reserve doesn't match asset reserve, - transferring assets with any type of local/dest reserve while using fees which can be teleported between involved chains. All of the above is done by pallet inner logic without the user having to specify which scenario/reserves/teleports/etc. The correct scenario and corresponding XCM programs are identified, and respectively, built automatically based on runtime configuration of trusted teleporters and trusted reserves. #### Current limitations: - while `fees` and "non-fee" `assets` CAN have different reserves (or fees CAN be teleported), the remaining "non-fee" `assets` CANNOT, among themselves, have different reserve locations (this is also implicitly enforced by `MAX_ASSETS_FOR_TRANSFER=2`, but this can be safely increased in the future). - `fees` and "non-fee" `assets` CANNOT have **different remote** reserves (this could also be supported in the future, but adds even more complexity while possibly not being worth it - we'll see what the future holds). Fixes https://github.com/paritytech/polkadot-sdk/issues/1584 Fixes https://github.com/paritytech/polkadot-sdk/issues/2055 --------- Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Branislav Kontur <[email protected]>
-