- Nov 15, 2024
-
-
Alexandru Vasile authored
This PR updates the litep2p backend to version 0.8.1 from 0.8.0. - Check the [litep2p updates forum post](https://forum.polkadot.network/t/litep2p-network-backend-updates/9973/3) for performance dashboards. - Check [litep2p release notes](https://github.com/paritytech/litep2p/pull/288) The v0.8.1 release includes key fixes that enhance the stability and performance of the litep2p library. The focus is on long-running stability and improvements to polling mechanisms. ### Long Running Stability Improvements This issue caused long-running nodes to reject all incoming connections, impacting overall stability. Addressed a bug in the connection limits functionality that incorrectly tracked connections due for rejection. This issue caused an artificial increase in inbound peers, which were not being properly removed from the connection limit count. This fix ensures more accurate tracking and management of peer connections [#286](https://github.com/paritytech/litep2p/pull/286). ### Polling implementation fixes This release provides multiple fixes to the polling mechanism, improving how connections and events are processed: - Resolved an overflow issue in TransportContext’s polling index for streams, preventing potential crashes ([#283](https://github.com/paritytech/litep2p/pull/283)). - Fixed a delay in the manager’s poll_next function that prevented immediate polling of newly added futures ([#287](https://github.com/paritytech/litep2p/pull/287)). - Corrected an issue where the listener did not return Poll::Ready(None) when it was closed, ensuring proper signal handling ([#285](https://github.com/paritytech/litep2p/pull/285)). ### Fixed - manager: Fix connection limits tracking of rejected connections ([#286](https://github.com/paritytech/litep2p/pull/286)) - transport: Fix waking up on filtered events from `poll_next` ([#287](https://github.com/paritytech/litep2p/pull/287)) - transports: Fix missing Poll::Ready(None) event from listener ([#285](https://github.com/paritytech/litep2p/pull/285)) - manager: Avoid overflow on stream implementation for `TransportContext` ([#283](https://github.com/paritytech/litep2p/pull/283)) - manager: Log when polling returns Ready(None) ([#284](https://github.com/paritytech/litep2p/pull/284)) ### Testing Done Started kusama nodes running side by side with a higher number of inbound and outbound connections (500). We previously tested with peers bounded at 50. This testing filtered out the fixes included in the latest release. With this high connection testing setup, litep2p outperforms libp2p in almost every domain, from performance to the warnings / errors encountered while operating the nodes. TLDR: this is the version we need to test on kusama validators next - Litep2p Repo | Count | Level | Triage report -|-|-|- polkadot-sdk | 409 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Peer disconnected with inflight after backoffs. Banned, disconnecting. ) litep2p | 128 | warn | Refusing to add known address that corresponds to a different peer ID litep2p | 54 | warn | inbound identify substream opened for peer who doesn't exist polkadot-sdk | 7 | error |
Called `on_validated_block_announce` with a bad peer ID .* polkadot-sdk | 1 | warn | Error while dialing .*: .* polkadot-sdk | 1 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Invalid justification. Banned, disconnecting. ) - Libp2p Repo | Count | Level | Triage report -|-|-|- polkadot-sdk | 1023 | warn | Ignored block \(#.* -- .*\) announcement from .* because all validation slots are occupied. polkadot-sdk | 472 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Unsupported protocol. Banned, disconnecting. ) polkadot-sdk | 379 | error | Called `on_validated_block_announce` with a bad peer ID .* polkadot-sdk | 163 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Invalid justification. Banned, disconnecting. ) polkadot-sdk | 116 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Peer disconnected with inflight after backoffs. Banned, disconnecting. ) polkadot-sdk | 83 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Same block request multiple times. Banned, disconnecting. ) polkadot-sdk | 4 | warn | Re-finalized block #.* \(.*\) in the canonical chain, current best finalized is #.* polkadot-sdk | 2 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Genesis mismatch. Banned, disconnecting. ) polkadot-sdk | 2 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Not requested block data. Banned, disconnecting. ) polkadot-sdk | 2 | warn | Can't listen on .* because: .* polkadot-sdk | 1 | warn | Error while dialing .*: .* --------- Signed-off-by:Alexandru Vasile <alexandru.vasile@parity.io>
-
- Nov 13, 2024
-
-
Kazunobu Ndong authored
## Issue #4859 ## Description This PR removes `libp2p` types in authority-discovery, and replace them with network backend agnostic types from `sc-network-types`. The `sc-network` interface is therefore updated accordingly. --------- Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <> Co-authored-by:
Dmitry Markin <dmitry@markin.tech> Co-authored-by:
Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
-
Bastian Köcher authored
When using multiple instances of the same pallet, each instance was executed with the components of all instances. While actually each instance should only be executed with the components generated for the particular instance. The problem here was that in the runtime only the pallet-name was used to determine if a certain pallet should be benchmarked. When using instances, the pallet name is the same for both of these instances. The solution is to also take the instance name into account. The fix requires to change the `Benchmark` runtime api to also take the `instance`. The node side is written in a backwards compatible way to also support runtimes which do not yet support the `instance` parameter. --------- Co-authored-by:
GitHub Action <action@github.com> Co-authored-by:
clangenb <37865735+clangenb@users.noreply.github.com> Co-authored-by:
Adrian Catangiu <adrian@parity.io>
-
- Nov 12, 2024
-
-
PG Herveou authored
- Breaking down the integration-test into multiple tests - Fix tx hash to use expected keccak-256 - Add option to ethers.js example to connect to westend and use a private key --------- Co-authored-by:
GitHub Action <action@github.com>
-
Francisco Aguirre authored
Added `ExecuteWithOrigin` instruction according to the old XCM RFC 38: https://github.com/polkadot-fellows/xcm-format/pull/38. This instruction allows you to descend or clear while going back again. ## TODO - [x] Implementation - [x] Unit tests - [x] Integration tests - [x] Benchmarks - [x] PRDoc ## Future work Modify `WithComputedOrigin` barrier to allow, for example, fees to be paid with a descendant origin using this instruction. --------- Signed-off-by:
Adrian Catangiu <adrian@parity.io> Co-authored-by:
Adrian Catangiu <adrian@parity.io> Co-authored-by:
Andrii <ndk@parity.io> Co-authored-by:
Branislav Kontur <bkontur@gmail.com> Co-authored-by:
Joseph Zhao <65984904+programskillforverification@users.noreply.github.com> Co-authored-by:
Nazar Mokrynskyi <nazar@mokrynskyi.com> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: command-bot <>
-
Jeeyong Um authored
# Description Resolves #6193 This PR introduces `ConstUint` as a replacement for existing constant getter types like `ConstU8`, `ConstU16`, etc., providing a more flexible and unified approach. ## Integration This update is backward compatible, so developers can choose to adopt `ConstUint` in new implementations or continue using the existing types as needed. ## Review Notes `ConstUint` is a convenient alternative to `ConstU8`, `ConstU16`, and similar types, particularly useful for configuring `DefaultConfig` in pallets. It enables configuring the underlying integer for a specific type without the need to update all dependent types, offering enhanced flexibility in type management. # Checklist * [x] My PR includes a detailed description as outlined in the "Description" and its two subsections above. * [ ] My PR follows the [labeling requirements]( https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process ) of this project (at minimum one label for `T` required) * External contributors: ask maintainers to put the right label on your PR. * [ ] 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)
-
PG Herveou authored
- Fix bare_eth_transact so that it estimate more precisely the transaction fee - Add some context to the build.rs to make it easier to troubleshoot errors - Add TransactionBuilder for the RPC tests. - Improve error message, proxy rpc error from the node and handle reverted error message - Add logs in ReceiptInfo --------- Co-authored-by:
GitHub Action <action@github.com>
-
- Nov 07, 2024
-
-
Andrei Eres authored
# Description Implemented benchmarks for Notifications and RequestResponse protocols with libp2p implementation. These benchmarks allow us to monitor regressions and implement fixes before they are observed in real chain. In the future, they can be used for targeted optimizations of litep2p compared to libp2p. Part of https://github.com/paritytech/polkadot-sdk/issues/5220 Next steps: - Add benchmarks for litep2p implementation - Optimize load to get better results - Add benchmarks to CI to catch regressions ## Integration Benchmarks don't affect downstream projects. --------- Co-authored-by:
alvicsam <alvicsam@gmail.com> Co-authored-by:
GitHub Action <action@github.com>
-
Andrei Eres authored
Fixes https://github.com/paritytech/polkadot-sdk/issues/5530 This PR introduces the removal of backing jobs that have been back pressured for longer than `allowedAncestryLen`, as these candidates are no longer viable. It is reasonable to expect a result for a backing job execution within `allowedAncestryLen` blocks. Therefore, we set the job TTL as a relay block number and synchronize the validation host by sending activated leaves. --------- Co-authored-by:
Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by:
Branislav Kontur <bkontur@gmail.com>
-
dependabot[bot] authored
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.30 to 0.3.31. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/futures-rs/releases">futures's releases</a>.</em></p> <blockquote> <h2>0.3.31</h2> <ul> <li>Fix use after free of task in <code>FuturesUnordered</code> when dropped future panics (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2886">#2886</a>)</li> <li>Fix soundness bug in <code>task::waker_ref</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2830">#2830</a>) This is a breaking change but allowed because it is soundness bug fix.</li> <li>Fix bugs in <code>AsyncBufRead::read_line</code> and <code>AsyncBufReadExt::lines</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li> <li>Fix parsing issue in <code>select!</code>/<code>select_biased!</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2832">#2832</a>) This is technically a breaking change as it will now reject a very odd undocumented syntax that was previously accidentally accepted.</li> <li>Work around issue due to upstream <code>Waker::will_wake</code> change (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li> <li>Add <code>stream::Iter::{get_ref,get_mut,into_inner}</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li> <li>Add <code>future::AlwaysReady</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2825">#2825</a>)</li> <li>Relax trait bound on non-constructor methods of <code>io::{BufReader,BufWriter}</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2848">#2848</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md">futures's changelog</a>.</em></p> <blockquote> <h1>0.3.31 - 2024-10-05</h1> <ul> <li>Fix use after free of task in <code>FuturesUnordered</code> when dropped future panics (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2886">#2886</a>)</li> <li>Fix soundness bug in <code>task::waker_ref</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2830">#2830</a>) This is a breaking change but allowed because it is soundness bug fix.</li> <li>Fix bugs in <code>AsyncBufRead::read_line</code> and <code>AsyncBufReadExt::lines</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li> <li>Fix parsing issue in <code>select!</code>/<code>select_biased!</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2832">#2832</a>) This is technically a breaking change as it will now reject a very odd undocumented syntax that was previously accidentally accepted.</li> <li>Work around issue due to upstream <code>Waker::will_wake</code> change (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li> <li>Add <code>stream::Iter::{get_ref,get_mut,into_inner}</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li> <li>Add <code>future::AlwaysReady</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2825">#2825</a>)</li> <li>Relax trait bound on non-constructor methods of <code>io::{BufReader,BufWriter}</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2848">#2848</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rust-lang/futures-rs/commit/1e052816b09890925cfdfcbe8d390cdaae5e4c38"><code>1e05281</code></a> Release 0.3.31</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/8a8b085a8c1a7396173a104c67e0cf2f5b74fc74"><code>8a8b085</code></a> Fix clippy::uninit_vec warning</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/f3fb74df310d070d91df7995c942f223cba6720a"><code>f3fb74d</code></a> Document how <code>BoxFuture</code>s / <code>BoxStream</code>s are often made (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2887">#2887</a>)</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/f00e7afb467e5f9b3c81724cc3cac1f0687fff7c"><code>f00e7af</code></a> Fix use after free of task in FuturesUnordered when dropped future panics (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2">#2</a>...</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/33c46b3dc65e151e0e794636ad62872330733557"><code>33c46b3</code></a> ci: Work around sanitizer issue on latest Linux kernel</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/7bf5a72826c0daed633ec48e8ddaecd8a32f0d11"><code>7bf5a72</code></a> Fix issues with <code>AsyncBufRead::read_line</code> and <code>AsyncBufReadExt::lines</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/87afaf3973e8652228f7ccaadd04e7b0e456c63d"><code>87afaf3</code></a> Use <code>#[inline(always)]</code> on <code>clone_arc_raw</code> (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/549b90b1793a044bcade67b81a3d7eabd95f3971"><code>549b90b</code></a> Add accessors for the inner of stream::Iter (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/07b004ac7e0d72e09ff652f234d00e4f26a5f558"><code>07b004a</code></a> Add missing symbols (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2883">#2883</a>)</li> <li><a href="https://github.com/rust-lang/futures-rs/commit/86dc069fa278d4197de91eb6e038e0ec64857684"><code>86dc069</code></a> Various fixes too make the CI green (<a href="https://redirect.github.com/rust-lang/futures-rs/issues/2885">#2885</a>)</li> <li>Additional commits viewable in <a href="https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31">compare view</a></li> </ul> </details> <br /> [](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>
-
- Nov 06, 2024
-
-
Francisco Aguirre authored
# Context This PR aims to introduce XCMv5, for now it's in progress and will be updated over time. This branch will serve as a milestone branch for merging in all features we want to add to XCM, roughly outlined [here](https://github.com/polkadot-fellows/xcm-format/issues/60). More features could be added. ## TODO - [x] Migrate foreign assets from v3 to v4 - [x] Setup v5 skeleton - [x] Remove XCMv2 - [x] https://github.com/paritytech/polkadot-sdk/pull/5390 - [x] https://github.com/paritytech/polkadot-sdk/pull/5585 - [x] https://github.com/paritytech/polkadot-sdk/pull/5420 - [x] https://github.com/paritytech/polkadot-sdk/pull/5876 - [x] https://github.com/paritytech/polkadot-sdk/pull/5971 - [x] https://github.com/paritytech/polkadot-sdk/pull/6148 - [x] https://github.com/paritytech/polkadot-sdk/pull/6228 Fixes #3434 Fixes https://github.com/paritytech/polkadot-sdk/issues/4190 Fixes https://github.com/paritytech/polkadot-sdk/issues/5209 Fixes https://github.com/paritytech/polkadot-sdk/issues/5241 Fixes https://github.com/paritytech/polkadot-sdk/issues/4284 --------- Signed-off-by:
Adrian Catangiu <adrian@parity.io> Co-authored-by:
Adrian Catangiu <adrian@parity.io> Co-authored-by:
Andrii <ndk@parity.io> Co-authored-by:
Branislav Kontur <bkontur@gmail.com> Co-authored-by:
Joseph Zhao <65984904+programskillforverification@users.noreply.github.com> Co-authored-by:
Nazar Mokrynskyi <nazar@mokrynskyi.com> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: command-bot <> Co-authored-by:
GitHub Action <action@github.com> Co-authored-by:
Serban Iorga <serban@parity.io>
-
Bastian Köcher authored
The tests used the same paths. When run on CI, each test is run in its own process and thus, this "serial_test" crate wasn't used. The tests are now using their own thread local tempdir, which ensures that the tests are working when running in parallel in the same program or when being run individually.
-
- Nov 05, 2024
-
-
PG Herveou authored
make the eth-rpc proxy /health and /health/readiness from the proxied substrate chain see #4802 --------- Co-authored-by:
GitHub Action <action@github.com>
-
dependabot[bot] authored
Bumps the known_good_semver group with 2 updates in the / directory: [serde](https://github.com/serde-rs/serde) and [syn](https://github.com/dtolnay/syn). Updates `serde` from 1.0.210 to 1.0.214 <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.214</h2> <ul> <li>Implement IntoDeserializer for all Deserializers in serde::de::value module (<a href="https://redirect.github.com/serde-rs/serde/issues/2568">#2568</a>, thanks <a href="https://github.com/Mingun"><code>@Mingun</code></a>)</li> </ul> <h2>v1.0.213</h2> <ul> <li>Fix support for macro-generated <code>with</code> attributes inside a newtype struct (<a href="https://redirect.github.com/serde-rs/serde/issues/2847">#2847</a>)</li> </ul> <h2>v1.0.212</h2> <ul> <li>Fix hygiene of macro-generated local variable accesses in serde(with) wrappers (<a href="https://redirect.github.com/serde-rs/serde/issues/2845">#2845</a>)</li> </ul> <h2>v1.0.211</h2> <ul> <li>Improve error reporting about mismatched signature in <code>with</code> and <code>default</code> attributes (<a href="https://redirect.github.com/serde-rs/serde/issues/2558">#2558</a>, thanks <a href="https://github.com/Mingun"><code>@Mingun</code></a>)</li> <li>Show variant aliases in error message when variant deserialization fails (<a href="https://redirect.github.com/serde-rs/serde/issues/2566">#2566</a>, thanks <a href="https://github.com/Mingun"><code>@Mingun</code></a>)</li> <li>Improve binary size of untagged enum and internally tagged enum deserialization by about 12% (<a href="https://redirect.github.com/serde-rs/serde/issues/2821">#2821</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/serde/commit/418062165f9fe395461db9f61569c3142c584854"><code>4180621</code></a> Release 1.0.214</li> <li><a href="https://github.com/serde-rs/serde/commit/210373b3b65a2eaf9754c158b43da0429807359c"><code>210373b</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2568">#2568</a> from Mingun/into_deserializer-for-deserializers</li> <li><a href="https://github.com/serde-rs/serde/commit/9cda0157331ca09dec16cd8a0b57bd8eb24f8442"><code>9cda015</code></a> Implement IntoDeserializer for all Deserializers in serde::de::value module</li> <li><a href="https://github.com/serde-rs/serde/commit/58a8d229315553c4ae0a8d7eee8e382fbae4b4bf"><code>58a8d22</code></a> Release 1.0.213</li> <li><a href="https://github.com/serde-rs/serde/commit/ef0ed22593a17a5af5ebe48d3b6ef7c3de1b116a"><code>ef0ed22</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2847">#2847</a> from dtolnay/newtypewith</li> <li><a href="https://github.com/serde-rs/serde/commit/79925ac3947483013ba8136e43bc0449b99bd10c"><code>79925ac</code></a> Ignore dead_code warning in regression test</li> <li><a href="https://github.com/serde-rs/serde/commit/b60e4092ec83c70e8c7d39574778349b2c5d9f05"><code>b60e409</code></a> Hygiene for macro-generated newtype struct deserialization with 'with' attr</li> <li><a href="https://github.com/serde-rs/serde/commit/fdc36e5c06def28b33d3154f0517969d90b744d8"><code>fdc36e5</code></a> Add regression test for issue 2846</li> <li><a href="https://github.com/serde-rs/serde/commit/49e11ce1bae9fbb9128c9144c4e1051daf7a29ed"><code>49e11ce</code></a> Ignore trivially_copy_pass_by_ref pedantic clippy lint in test</li> <li><a href="https://github.com/serde-rs/serde/commit/7ae1b5f8f39d7a80daaddcc04565f995427bfc41"><code>7ae1b5f</code></a> Release 1.0.212</li> <li>Additional commits viewable in <a href="https://github.com/serde-rs/serde/compare/v1.0.210...v1.0.214">compare view</a></li> </ul> </details> <br /> Updates `serde_derive` from 1.0.210 to 1.0.214 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/serde-rs/serde/releases">serde_derive's releases</a>.</em></p> <blockquote> <h2>v1.0.214</h2> <ul> <li>Implement IntoDeserializer for all Deserializers in serde::de::value module (<a href="https://redirect.github.com/serde-rs/serde/issues/2568">#2568</a>, thanks <a href="https://github.com/Mingun"><code>@Mingun</code></a>)</li> </ul> <h2>v1.0.213</h2> <ul> <li>Fix support for macro-generated <code>with</code> attributes inside a newtype struct (<a href="https://redirect.github.com/serde-rs/serde/issues/2847">#2847</a>)</li> </ul> <h2>v1.0.212</h2> <ul> <li>Fix hygiene of macro-generated local variable accesses in serde(with) wrappers (<a href="https://redirect.github.com/serde-rs/serde/issues/2845">#2845</a>)</li> </ul> <h2>v1.0.211</h2> <ul> <li>Improve error reporting about mismatched signature in <code>with</code> and <code>default</code> attributes (<a href="https://redirect.github.com/serde-rs/serde/issues/2558">#2558</a>, thanks <a href="https://github.com/Mingun"><code>@Mingun</code></a>)</li> <li>Show variant aliases in error message when variant deserialization fails (<a href="https://redirect.github.com/serde-rs/serde/issues/2566">#2566</a>, thanks <a href="https://github.com/Mingun"><code>@Mingun</code></a>)</li> <li>Improve binary size of untagged enum and internally tagged enum deserialization by about 12% (<a href="https://redirect.github.com/serde-rs/serde/issues/2821">#2821</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/serde/commit/418062165f9fe395461db9f61569c3142c584854"><code>4180621</code></a> Release 1.0.214</li> <li><a href="https://github.com/serde-rs/serde/commit/210373b3b65a2eaf9754c158b43da0429807359c"><code>210373b</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2568">#2568</a> from Mingun/into_deserializer-for-deserializers</li> <li><a href="https://github.com/serde-rs/serde/commit/9cda0157331ca09dec16cd8a0b57bd8eb24f8442"><code>9cda015</code></a> Implement IntoDeserializer for all Deserializers in serde::de::value module</li> <li><a href="https://github.com/serde-rs/serde/commit/58a8d229315553c4ae0a8d7eee8e382fbae4b4bf"><code>58a8d22</code></a> Release 1.0.213</li> <li><a href="https://github.com/serde-rs/serde/commit/ef0ed22593a17a5af5ebe48d3b6ef7c3de1b116a"><code>ef0ed22</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2847">#2847</a> from dtolnay/newtypewith</li> <li><a href="https://github.com/serde-rs/serde/commit/79925ac3947483013ba8136e43bc0449b99bd10c"><code>79925ac</code></a> Ignore dead_code warning in regression test</li> <li><a href="https://github.com/serde-rs/serde/commit/b60e4092ec83c70e8c7d39574778349b2c5d9f05"><code>b60e409</code></a> Hygiene for macro-generated newtype struct deserialization with 'with' attr</li> <li><a href="https://github.com/serde-rs/serde/commit/fdc36e5c06def28b33d3154f0517969d90b744d8"><code>fdc36e5</code></a> Add regression test for issue 2846</li> <li><a href="https://github.com/serde-rs/serde/commit/49e11ce1bae9fbb9128c9144c4e1051daf7a29ed"><code>49e11ce</code></a> Ignore trivially_copy_pass_by_ref pedantic clippy lint in test</li> <li><a href="https://github.com/serde-rs/serde/commit/7ae1b5f8f39d7a80daaddcc04565f995427bfc41"><code>7ae1b5f</code></a> Release 1.0.212</li> <li>Additional commits viewable in <a href="https://github.com/serde-rs/serde/compare/v1.0.210...v1.0.214">compare view</a></li> </ul> </details> <br /> Updates `syn` from 2.0.82 to 2.0.87 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/syn/releases">syn's releases</a>.</em></p> <blockquote> <h2>2.0.87</h2> <ul> <li>Add <a href="https://docs.rs/syn/2/syn/buffer/struct.Cursor.html#method.any_group"><code>Cursor::any_group</code></a> (<a href="https://redirect.github.com/dtolnay/syn/issues/1777">#1777</a>)</li> <li>Add <a href="https://docs.rs/syn/2/syn/enum.Expr.html#method.peek"><code>Expr::peek</code></a> (<a href="https://redirect.github.com/dtolnay/syn/issues/1778">#1778</a>)</li> <li>Improve syntax support for enum discriminant expressions in non-"full" mode (<a href="https://redirect.github.com/dtolnay/syn/issues/1779">#1779</a>)</li> </ul> <h2>2.0.86</h2> <ul> <li>Support peeking the end of a parse stream (<a href="https://redirect.github.com/dtolnay/syn/issues/1689">#1689</a>)</li> <li>Allow <code>parse_quote!</code> to produce Vec<Attribute> (<a href="https://redirect.github.com/dtolnay/syn/issues/1775">#1775</a>)</li> </ul> <h2>2.0.85</h2> <ul> <li>Preserve extern static unsafety in ForeignItem::Verbatim (<a href="https://redirect.github.com/dtolnay/syn/issues/1773">#1773</a>)</li> </ul> <h2>2.0.84</h2> <ul> <li>Parse safe and explicitly unsafe extern items (<a href="https://redirect.github.com/dtolnay/syn/issues/1768">#1768</a>, <a href="https://redirect.github.com/rust-lang/rust/issues/123743">rust-lang/rust#123743</a>, <a href="https://redirect.github.com/rust-lang/rfcs/pull/3484">rust-lang/rfcs#3484</a>)</li> <li>Parse self captures: <code>impl Sized + use<Self></code> (<a href="https://redirect.github.com/dtolnay/syn/issues/1772">#1772</a>)</li> </ul> <h2>2.0.83</h2> <ul> <li>Documentation improvements</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/syn/commit/a777cff00528f270b43f40b0a58c5c26fc85a2bd"><code>a777cff</code></a> Release 2.0.87</li> <li><a href="https://github.com/dtolnay/syn/commit/1f103d4c175ab62b27537a6907c4b77b6aed6ae7"><code>1f103d4</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1779">#1779</a> from dtolnay/scan</li> <li><a href="https://github.com/dtolnay/syn/commit/0986a66e1764ed37a4931dde8c509412474636fe"><code>0986a66</code></a> Ignore enum_glob_use pedantic clippy lint</li> <li><a href="https://github.com/dtolnay/syn/commit/ca97c7d82d9837c1b49c085a546a481cf879e619"><code>ca97c7d</code></a> Translate expr scanner to table driven</li> <li><a href="https://github.com/dtolnay/syn/commit/8039cb37a02cbf080f48416651141d4c77c05075"><code>8039cb3</code></a> Test that every expr can be scanned</li> <li><a href="https://github.com/dtolnay/syn/commit/0132c447fe045431906945178bea219816d5e55f"><code>0132c44</code></a> Make scan_expr compilable from integration test</li> <li><a href="https://github.com/dtolnay/syn/commit/7c102c3c8b3dc076c03cbe842266a2b140be6323"><code>7c102c3</code></a> Extract non-full expr scanner to module</li> <li><a href="https://github.com/dtolnay/syn/commit/ceaf4d693b2af783874b9aa4d50bb208b84a2609"><code>ceaf4d6</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1778">#1778</a> from dtolnay/exprpeek</li> <li><a href="https://github.com/dtolnay/syn/commit/a890e9da22b463b05c06696d4cc767c6cb9d3114"><code>a890e9d</code></a> Expose can_begin_expr as Expr::peek</li> <li><a href="https://github.com/dtolnay/syn/commit/12f068ce0889c41e3bd21662e8a0adfaa07d01d9"><code>12f068c</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1777">#1777</a> from dtolnay/anygroup</li> <li>Additional commits viewable in <a href="https://github.com/dtolnay/syn/compare/2.0.82...2.0.87">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] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Bastian Köcher <info@kchr.de> Co-authored-by:
Guillaume Thiolliere <gui.thiolliere@gmail.com>
-
Alexandru Vasile authored
This PR updates litep2p to the latest release. - `KademliaEvent::PutRecordSucess` is renamed to fix word typo - `KademliaEvent::GetProvidersSuccess` and `KademliaEvent::IncomingProvider` are needed for bootnodes on DHT work and will be utilized later ### Added - kad: Providers part 8: unit, e2e, and `libp2p` conformance tests ([#258](https://github.com/paritytech/litep2p/pull/258)) - kad: Providers part 7: better types and public API, public addresses & known providers ([#246](https://github.com/paritytech/litep2p/pull/246)) - kad: Providers part 6: stop providing ([#245](https://github.com/paritytech/litep2p/pull/245)) - kad: Providers part 5: `GET_PROVIDERS` query ([#236](https://github.com/paritytech/litep2p/pull/236)) - kad: Providers part 4: refresh local providers ([#235](https://github.com/paritytech/litep2p/pull/235)) - kad: Providers part 3: publish provider records (start providing) ([#234](https://github.com/paritytech/litep2p/pull/234)) ### Changed - transport_service: Improve connection stability by downgrading connections on substream inactivity ([#260](https://github.com/paritytech/litep2p/pull/260)) - transport: Abort canceled dial attempts for TCP, WebSocket and Quic ([#255](https://github.com/paritytech/litep2p/pull/255)) - kad/executor: Add timeout for writting frames ([#277](https://github.com/paritytech/litep2p/pull/277)) - kad: Avoid cloning the `KademliaMessage` and use reference for `RoutingTable::closest` ([#233](https://github.com/paritytech/litep2p/pull/233)) - peer_state: Robust state machine transitions ([#251](https://github.com/paritytech/litep2p/pull/251)) - address_store: Improve address tracking and add eviction algorithm ([#250](https://github.com/paritytech/litep2p/pull/250)) - kad: Remove unused serde cfg ([#262](https://github.com/paritytech/litep2p/pull/262)) - req-resp: Refactor to move functionality to dedicated methods ([#244](https://github.com/paritytech/litep2p/pull/244)) - transport_service: Improve logs and move code from tokio::select macro ([#254](https://github.com/paritytech/litep2p/pull/254)) ### Fixed - tcp/websocket/quic: Fix cancel memory leak ([#272](https://github.com/paritytech/litep2p/pull/272)) - transport: Fix pending dials memory leak ([#271](https://github.com/paritytech/litep2p/pull/271)) - ping: Fix memory leak of unremoved `pending_opens` ([#274](https://github.com/paritytech/litep2p/pull/274)) - identify: Fix memory leak of unused `pending_opens` ([#273](https://github.com/paritytech/litep2p/pull/273)) - kad: Fix not retrieving local records ([#221](https://github.com/paritytech/litep2p/pull/221)) See release changelog for more details: https://github.com/paritytech/litep2p/releases/tag/v0.8.0 cc @paritytech/networking --------- Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by:
Dmitry Markin <dmitry@markin.tech>
-
- Nov 04, 2024
-
-
Andrei Sandu authored
Part of https://github.com/paritytech/polkadot-sdk/issues/5047 On top of https://github.com/paritytech/polkadot-sdk/pull/5679 --------- Signed-off-by:
Andrei Sandu <andrei-mihail@parity.io> Co-authored-by:
GitHub Action <action@github.com>
-
Iulian Barbu authored
# Description Closes #5940 ## Integration Node devs that rely on templates' nodes binaries for minimal or parachain would need to follow the updated templates' README.mds again to find how to build the nodes' binaries. ## Review Notes Conditional compilation of virtual workspaces would compile the `members` list as if we passed `--workspace` flag to `cargo build` , except when adding a `default-members` list which will be used for any cargo command executed in the virtual workspace root. To build the full members list needs passing `--workspace` flag. Other options investigated: - feature guard the `node` crate by defining a feature in the `node` crate, but it feels too complex since all code needs to be feature guarded. I haven't tried it but technically speaking it might work. I think though it looks awkward and my opinion is that the alternative is better. - defining features in the virtual workspace's Cargo.toml doesn't work (thought that I might create a feature that will have a dependency on the `node` crate and then not passing the feature to cargo build results in ignoring the `node` crate) - skipping compilation by using an environment variable, read in the build script, that will exit compilation abruptly if not set, but I couldn't make it work. - exclude the crate from the members list and build it specifically by passing `--package minimal-template-node` flag to the `cargo build` command. This has the disadvantage of not allowing IDEs based on rust analyzer to index/compile the node crate. My conclusion is that any option would require two commands to build the template, one with the node and one without, and both must be included in the README or templates usage documentation. If it comes which ones to pick I am in favor of the `default-members` option, which requires minimal intervention and expresses how cargo commands are executed on top of the workspace members, and what's left out from regular usage. ### Testing Testing was conducted as described bellow: - [x] zombienet with `minimal-template-node` , `parachain-template-node` and `polkadot-omni-node`. Things work as expected. - [x] no chopsticks testing was conducted - feels a bit out of scope for OmniNode related docs and overall testing when promoting it over the templates' nodes. - [x] testing the changes for the sync templates workflow (ignore the added comment from the Cargo.tomls, it was removed here on this branch: [99bff3e2](https://github.com/paritytech/polkadot-sdk/pull/5954/commits/99bff3e2 )): [minimal](https://github.com/paritytech-stg/polkadot-sdk-minimal-template/pull/22/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R9), [parachain](https://github.com/paritytech-stg/polkadot-sdk-parachain-template/pull/19/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R9), [solochain](https://github.com/paritytech-stg/polkadot-sdk-solochain-template/pull/17/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R9). The links correspond to PRs opened by a bot after manually starting the sync-templates workflow on `paritytech-stg` org to test the end result of the `Cargo.toml` changes. --------- Signed-off-by:
Iulian Barbu <iulian.barbu@parity.io> Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com>
-
Alin Dima authored
Part of https://github.com/paritytech/polkadot-sdk/issues/5047 Plus some cleanups --------- Signed-off-by:
Andrei Sandu <andrei-mihail@parity.io> Co-authored-by:
Andrei Sandu <andrei-mihail@parity.io> Co-authored-by:
Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by:
GitHub Action <action@github.com>
-
- Oct 31, 2024
-
-
Andrei Sandu authored
Part of https://github.com/paritytech/polkadot-sdk/issues/5047 On top of https://github.com/paritytech/polkadot-sdk/pull/5679 --------- Signed-off-by:
Andrei Sandu <andrei-mihail@parity.io> Co-authored-by:
GitHub Action <action@github.com>
-
- Oct 30, 2024
-
-
PG Herveou authored
Add metrics for eth-rpc --------- Co-authored-by:
GitHub Action <action@github.com> Co-authored-by:
Alexander Theißen <alex.theissen@me.com>
-
Sebastian Kunert authored
# Benchmark Overhead Command for Parachains This implements the `benchmark overhead` command for parachains. Full context is available at: https://github.com/paritytech/polkadot-sdk/issues/5303. Previous attempt was this https://github.com/paritytech/polkadot-sdk/pull/5283, but here we have integration into frame-omni-bencher and improved tooling. ## Changes Overview Users are now able to use `frame-omni-bencher` to generate `extrinsic_weight.rs` and `block_weight.rs` files for their runtime. The core logic for generating these remains untouched; this PR provides mostly machinery to make it work for parachains at all. Similar to the pallet benchmarks, we gain the option to benchmark based on just a runtime: ``` frame-omni-bencher v1 benchmark overhead --runtime {{runtime}} ``` or with a spec: ``` frame-omni-bencher v1 benchmark overhead --chain {{spec}} --genesis-builder spec ``` In this case, the genesis state is generated from the runtime presets. However, it is also possible to use `--chain` and genesis builder `spec` to generate the genesis state from the chain spec. Additionally, we use metadata to perform some checks based on the pallets the runtime exposes: - If we see the `ParaInherent` pallet, we assume that we are dealing with a relay chain. This means that we don't need proof recording during import (since there is no storage weight). - If we detect the `ParachainSystem` pallet, we assume that we are dealing with a parachain and take corresponding actions like patching a para id into the genesis state. On the inherent side, I am currently supplying the standard inherents every parachain needs. In the current state, `frame-omni-bencher` supports all system chains. In follow-up PRs, we could add additional inherents to increase compatibility. Since we are building a block during the benchmark, we also need to build an extrinsic. By default, I am leveraging subxt to build the xt dynamically. If a chain is not compatible with the `SubstrateConfig` that comes with `subxt`, it can provide a custom extrinsic builder to benchmarking-cli. This requires either a custom bencher implementation or an integration into the parachains node. Also cumulus-test-runtime has been migrated to provide genesis configs. ## Chain Compatibility The current version here is compatible with the system chains and common substrate chains. The way to go for others would be to customize the frame-omni-bencher by providing a custom extrinsicbuilder. I did an example implementation that works for mythical: https://github.com/skunert/mythical-bencher ## Follow-Ups - After #6040 is finished, we should integrate this here to make the tooling truly useful. In the current form, the state is fairly small and not representative. ## How to Review I recommend starting from [here](https://github.com/paritytech/polkadot-sdk/pull/5891/files#diff-50830ff756b3ac3403b7739d66c9e3a5185dbea550669ca71b28d19c7a2a54ecR264), this method is the main entry point for omni-bencher and `polkadot` binary. TBD: - [x] PRDoc --------- Co-authored-by:
Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
-
- Oct 29, 2024
-
-
Alexander Theißen authored
This removes the need to use a custom toolchain to build the contract test fixtures. Instead, we supply a custom target and use the currently in use upstream toolchain. --------- Co-authored-by:
Jan Bujak <jan@parity.io> Co-authored-by:
Cyrill Leutwiler <cyrill@parity.io> Co-authored-by: command-bot <>
-
georgepisaltu authored
This PR refactors `pallet-identity` to decouple usernames from identities. Main changes in this PR: - Separate usernames from identities in storage, allowing for correct deposit accounting - Introduce the option for username authorities to put up a deposit to issue a username - Allow authorities to remove usernames by declaring the intent to do so, then removing the username after the grace period expires - Refactor the authority storage to be keyed by suffix rather than owner account. - Introduce the concept of a system provider for a username, different from a governance allocation, allowing for usernames set by the system and not a specific authority - Implement multi-block migration to enable all of the changes described above --------- Signed-off-by:
georgepisaltu <george.pisaltu@parity.io> Co-authored-by:
Ankan <10196091+Ank4n@users.noreply.github.com>
-
Kian Paimani authored
A step towards https://github.com/paritytech/polkadot-sdk/issues/4782 In order to nail down the right preludes in `polkadot-sdk-frame`, we need to migrate a number of pallets to be written with it. Moreover, migrating our pallets to this simpler patter will encourage the ecosystem to also follow along. If this PR is approved and has no unwanted negative consequences, I will make a tracking issue to migrate all pallets to this umbrella crate. TODO: - [x] fix frame benchmarking template. Can we detect the umbrella crate in there and have an `if else`? cc @ggwpez - [x] Migrate benchmarking to v2 @re-gius a good candidate for you, you can open a PR against my branch. - [x] tracking issue with follow-ups --------- Co-authored-by:
Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by:
Giuseppe Re <giuseppe.re@parity.io> Co-authored-by:
Dónal Murray <donal.murray@parity.io> Co-authored-by:
Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
- Oct 28, 2024
-
-
PG Herveou authored
Redo of https://github.com/paritytech/polkadot-sdk/pull/5953 --------- Co-authored-by:
Alexander Theißen <alex.theissen@me.com> Co-authored-by:
GitHub Action <action@github.com>
-
- Oct 25, 2024
-
-
Shoyu Vanilla (Flint) authored
Closes #4896
-
Michal Kucharczyk authored
This PR adds `build_struct_json_patch` which helps to generate a JSON used for preset. Here is doc and example: https://github.com/paritytech/polkadot-sdk/blob/d868b858/substrate/frame/support/src/generate_genesis_config.rs#L168-L266 And real-world usage: https://github.com/paritytech/polkadot-sdk/blob/d868b858 /cumulus/parachains/runtimes/assets/asset-hub-rococo/src/genesis_config_presets.rs#L37-L61 Closes #5700 --------- Co-authored-by:
Sebastian Kunert <skunert49@gmail.com>
-
- Oct 23, 2024
-
-
Kian Paimani authored
provides low-level documentation on how the omni-node is meant to work. This is meant to act as reusable material for other teams (e.g. Papermoon and W3F) to use and integrate into the high level Polkadot documentation. Broadly speaking, for omni-node to have great rust-docs, we need to focus on the following crates, all of which got a bit of love in this PR: 1. `sp-genesis-builder` 2. `polkadot-omni-node` 3. `polkadot-omni-node-lib` 4. `frame-omni-bencher` On top of this, we have now: * `polkadot_sdk_docs::guides` contains two new steps demonstrating the most basic version of composing your pallet, putting it into a runtime, and putting that runtime into omni-node * `polkadot_sdk_docs::reference_docs::omni_node` to explain in more detail how omni-node differs from the old-school node. * `polkadot_sdk_docs::reference_docs::frame_weight_benchmarking` to finally have a minimal reference about weights and benchmarking. * It provides tests for some of the steps in https://github.com/paritytech/polkadot-sdk/issues/5568 closes https://github.com/paritytech/polkadot-sdk/issues/5568 closes https://github.com/paritytech/polkadot-sdk/issues/4781 Next steps - [x] Ensure the README of the parachain template is up-to-date. @iulianbarbu - [ ] Readme for `polkadot-omni-node` and similar is updated. For now, use `cargo-readme` and copy over the rust-docs. To build the branch locally and run this: https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/meta_contributing/index.html#how-to-develop-locally --------- Co-authored-by:
Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by:
Sebastian Kunert <skunert49@gmail.com> Co-authored-by:
Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
-
PG Herveou authored
Add pallet-revive to Westend runtime, and configure the runtime to accept Ethereum signed transaction
-
- Oct 22, 2024
-
-
PG Herveou authored
This PR introduces the necessary changes to pallet-revive for integrating with our Ethereum JSON-RPC. The RPC proxy itself will be added in a follow up. ## Changes - A new pallet::call `Call::eth_transact`. This is used as a wrapper to accept unsigned Ethereum transaction, valid call will be routed to `Call::call` or `Call::instantiate_with_code` - A custom UncheckedExtrinsic struct, that wraps the generic one usually and add the ability to check eth_transact calls sent from an Ethereum JSON-RPC proxy. - Generated types and traits to support implementing a JSON-RPC Ethereum proxy. ## Flow Overview: - A user submits a transaction via MetaMask or another Ethereum-compatible wallet. - The proxy dry run the transaction and add metadata to the call (gas limit in Weight, storage deposit limit, and length of bytecode and constructor input for contract instantiation) - The raw transaction, along with the additional metadata, is submitted to the node as an unsigned extrinsic. - On the runtime, our custom UncheckedExtrinsic define a custom Checkable implementation that converts the unsigned extrinsics into checked one - It recovers the signer - validates the payload, and injects signed extensions, allowing the system to increment the nonce and charge the appropriate fees. - re-route the call to pallet-revive::Call::call or pallet-revive::Call::instantiateWithCode ## Dependencies - https://github.com/koute/polkavm/pull/188 ## Follow up PRs - #5926 - #6147 (previously #5953) - #5502 --------- Co-authored-by:
Alexander Theißen <alex.theissen@me.com> Co-authored-by:
Cyrill Leutwiler <cyrill@parity.io>
-
- Oct 21, 2024
-
-
dependabot[bot] authored
Bumps [prost-build](https://github.com/tokio-rs/prost) from 0.12.4 to 0.13.2. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/prost/blob/master/CHANGELOG.md">prost-build's changelog</a>.</em></p> <blockquote> <h1>Prost version 0.13.2</h1> <p><em>PROST!</em> is a <a href="https://developers.google.com/protocol-buffers/">Protocol Buffers</a> implementation for the <a href="https://www.rust-lang.org/">Rust Language</a>. <code>prost</code> generates simple, idiomatic Rust code from <code>proto2</code> and <code>proto3</code> files.</p> <h2>Features</h2> <ul> <li>prost-build: Add protoc executable path to Config (<a href="https://redirect.github.com/tokio-rs/prost/issues/1126">#1126</a>)</li> <li>prost-build: Extract file descriptor loading from compile_protos() (<a href="https://redirect.github.com/tokio-rs/prost/issues/1067">#1067</a>)</li> </ul> <h2>Bug Fixes</h2> <ul> <li>prost-types: Fix date-time parsing (<a href="https://redirect.github.com/tokio-rs/prost/issues/1096">#1096</a>)</li> <li>prost-types: '+' is not a numeric digit (<a href="https://redirect.github.com/tokio-rs/prost/issues/1104">#1104</a>)</li> <li>prost-types: Converting DateTime to Timestamp is fallible (<a href="https://redirect.github.com/tokio-rs/prost/issues/1095">#1095</a>)</li> <li>prost-types: Parse timestamp with long second fraction (<a href="https://redirect.github.com/tokio-rs/prost/issues/1106">#1106</a>)</li> <li>prost-types: Format negative fractional duration (<a href="https://redirect.github.com/tokio-rs/prost/issues/1110">#1110</a>)</li> <li>prost-types: Allow unknown local time offset (<a href="https://redirect.github.com/tokio-rs/prost/issues/1109">#1109</a>)</li> </ul> <h2>Styling</h2> <ul> <li>Remove use of legacy numeric constants (<a href="https://redirect.github.com/tokio-rs/prost/issues/1089">#1089</a>)</li> <li>Move encoding functions into separate modules (<a href="https://redirect.github.com/tokio-rs/prost/issues/1111">#1111</a>)</li> <li>Remove needless borrow (<a href="https://redirect.github.com/tokio-rs/prost/issues/1122">#1122</a>)</li> </ul> <h2>Testing</h2> <ul> <li>Add tests for public interface of DecodeError (<a href="https://redirect.github.com/tokio-rs/prost/issues/1120">#1120</a>)</li> <li>Add <code>parse_date</code> fuzzing target (<a href="https://redirect.github.com/tokio-rs/prost/issues/1127">#1127</a>)</li> <li>Fix build without std (<a href="https://redirect.github.com/tokio-rs/prost/issues/1134">#1134</a>)</li> <li>Change some proptest to kani proofs (<a href="https://redirect.github.com/tokio-rs/prost/issues/1133">#1133</a>)</li> <li>Add <code>parse_duration</code> fuzzing target (<a href="https://redirect.github.com/tokio-rs/prost/issues/1129">#1129</a>)</li> <li>fuzz: Fix building of fuzzing targets (<a href="https://redirect.github.com/tokio-rs/prost/issues/1107">#1107</a>)</li> <li>fuzz: Add fuzz targets to workspace (<a href="https://redirect.github.com/tokio-rs/prost/issues/1117">#1117</a>)</li> </ul> <h2>Miscellaneous Tasks</h2> <ul> <li>Move old protobuf benchmark into prost (<a href="https://redirect.github.com/tokio-rs/prost/issues/1100">#1100</a>)</li> <li>Remove allow clippy::derive_partial_eq_without_eq (<a href="https://redirect.github.com/tokio-rs/prost/issues/1115">#1115</a>)</li> <li>Run <code>cargo test</code> without <code>all-targets</code> (<a href="https://redirect.github.com/tokio-rs/prost/issues/1118">#1118</a>)</li> <li>dependabot: Add github actions (<a href="https://redirect.github.com/tokio-rs/prost/issues/1121">#1121</a>)</li> <li>Update to cargo clippy version 1.80 (<a href="https://redirect.github.com/tokio-rs/prost/issues/1128">#1128</a>)</li> </ul> <h2>Build</h2> <ul> <li>Use <code>proc-macro</code> in Cargo.toml (<a href="https://redirect.github.com/tokio-rs/prost/issues/1102">#1102</a>)</li> <li>Ignore missing features in <code>tests</code> crates (<a href="https://redirect.github.com/tokio-rs/prost/issues/1101">#1101</a>)</li> <li>Use separated build directory for protobuf (<a href="https://redirect.github.com/tokio-rs/prost/issues/1103">#1103</a>)</li> <li>protobuf: Don't install unused test proto (<a href="https://redirect.github.com/tokio-rs/prost/issues/1116">#1116</a>)</li> <li>protobuf: Use crate <code>cmake</code> (<a href="https://redirect.github.com/tokio-rs/prost/issues/1137">#1137</a>)</li> <li>deps: Update devcontainer to Debian Bookworm release (<a href="https://redirect.github.com/tokio-rs/prost/issues/1114">#1114</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tokio-rs/prost/commit/57e794203106db483e5115e7e67502ef6f2c7ad8"><code>57e7942</code></a> chore: Release version 0.13.2 (<a href="https://redirect.github.com/tokio-rs/prost/issues/1139">#1139</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/8424775d78b13239df3cf3fe888236770a0cd839"><code>8424775</code></a> build(protobuf): Use crate <code>cmake</code> (<a href="https://redirect.github.com/tokio-rs/prost/issues/1137">#1137</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/21208abf667313866f79d3d1438310c4dc20bdff"><code>21208ab</code></a> build(deps): bump model-checking/kani-github-action from 0.32 to 1.1 (<a href="https://redirect.github.com/tokio-rs/prost/issues/1125">#1125</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/0c79864443621f20d92f9acc78a6ab0e7821dab0"><code>0c79864</code></a> tests(fuzz): Add <code>parse_duration</code> fuzzing target (<a href="https://redirect.github.com/tokio-rs/prost/issues/1129">#1129</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/52046b943fdf6f79461725027245f890c7b4f514"><code>52046b9</code></a> tests: Change some proptest to kani proofs (<a href="https://redirect.github.com/tokio-rs/prost/issues/1133">#1133</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/ee59dd5a9fe0935ad50e6ddbea5d23e3c6419468"><code>ee59dd5</code></a> tests: Fix build without std (<a href="https://redirect.github.com/tokio-rs/prost/issues/1134">#1134</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/e773f5f6d38f74d0efff876011a2fd0d002aed4c"><code>e773f5f</code></a> feat(prost-build): Add protoc executable path to Config (<a href="https://redirect.github.com/tokio-rs/prost/issues/1126">#1126</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/753bd92a85a3aa305d9d96b5c6363dc58d6356e6"><code>753bd92</code></a> ci(clippy): Update to cargo clippy version 1.80 (<a href="https://redirect.github.com/tokio-rs/prost/issues/1128">#1128</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/df3e58e5d113a0dcf8b6735a5d04cde2d74e5df3"><code>df3e58e</code></a> tests(fuzz): Add <code>parse_date</code> fuzzing target (<a href="https://redirect.github.com/tokio-rs/prost/issues/1127">#1127</a>)</li> <li><a href="https://github.com/tokio-rs/prost/commit/409b93214ed8d98fbb364031ccf330ce4e7caa32"><code>409b932</code></a> style: Remove needless borrow (<a href="https://redirect.github.com/tokio-rs/prost/issues/1122">#1122</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tokio-rs/prost/compare/v0.12.4...v0.13.2">compare view</a></li> </ul> </details> <br /> [](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> Co-authored-by:
Bastian Köcher <git@kchr.de>
-
dependabot[bot] authored
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.61 to 1.0.64. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/thiserror/releases">thiserror's releases</a>.</em></p> <blockquote> <h2>1.0.64</h2> <ul> <li>Exclude derived impls from coverage instrumentation (<a href="https://redirect.github.com/dtolnay/thiserror/issues/322">#322</a>, thanks <a href="https://github.com/oxalica"><code>@oxalica</code></a>)</li> </ul> <h2>1.0.63</h2> <ul> <li>Documentation improvements</li> </ul> <h2>1.0.62</h2> <ul> <li>Support referring to nested tuple struct fields inside <code>#[error("…", …)]</code> attribute (<a href="https://redirect.github.com/dtolnay/thiserror/issues/309">#309</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/thiserror/commit/84484bc75c20d63ec63299354b463407f3d59f68"><code>84484bc</code></a> Release 1.0.64</li> <li><a href="https://github.com/dtolnay/thiserror/commit/023f036de4515542d0c55aa5c580bc9352a077d1"><code>023f036</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/thiserror/issues/322">#322</a> from oxalica/feat/mark-auto-derived</li> <li><a href="https://github.com/dtolnay/thiserror/commit/ae1f47e3e5d6705b6b12997bd036fd97303d71d7"><code>ae1f47e</code></a> Mark #[automatically_derived] for generated impls</li> <li><a href="https://github.com/dtolnay/thiserror/commit/ab5b5e375b26971850b134abc7bbfe8a67da0fe3"><code>ab5b5e3</code></a> Upload CI Cargo.lock for reproducing failures</li> <li><a href="https://github.com/dtolnay/thiserror/commit/00b3c1405e5df26f9c6408e5fd43f52fa12e8e07"><code>00b3c14</code></a> Work around new dead code warning in test</li> <li><a href="https://github.com/dtolnay/thiserror/commit/915c75e8a3b679588e6eac03dccbba5d38c764a8"><code>915c75e</code></a> Release 1.0.63</li> <li><a href="https://github.com/dtolnay/thiserror/commit/3d5ec25464d2d71f09f480666e240d3446a44a19"><code>3d5ec25</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/thiserror/issues/312">#312</a> from dtolnay/backtracedoc</li> <li><a href="https://github.com/dtolnay/thiserror/commit/de8a1e54d420514250d9d4081d41723192cf0dfa"><code>de8a1e5</code></a> Update documentation of #[from] and #[backtrace] attributes</li> <li><a href="https://github.com/dtolnay/thiserror/commit/0bf6e3dd781409b62cbcf0816ffa1bb970d24833"><code>0bf6e3d</code></a> Release 1.0.62</li> <li><a href="https://github.com/dtolnay/thiserror/commit/497793283934d9e514d903a14278af6babbfbb65"><code>4977932</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/thiserror/issues/310">#310</a> from dtolnay/nestedtuple</li> <li>Additional commits viewable in <a href="https://github.com/dtolnay/thiserror/compare/1.0.61...1.0.64">compare view</a></li> </ul> </details> <br /> [](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>
-
dependabot[bot] authored
Bumps the known_good_semver group with 3 updates in the / directory: [impl-serde](https://github.com/paritytech/parity-common), [serde_json](https://github.com/serde-rs/json) and [syn](https://github.com/dtolnay/syn). Updates `impl-serde` from 0.4.0 to 0.5.0 <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/paritytech/parity-common/commit/63c5afbf8e0e903439d3c127c59b0e4a7991000b"><code>63c5afb</code></a> Bump versions (<a href="https://redirect.github.com/paritytech/parity-common/issues/860">#860</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/0db43ee6a258f02894bbc873be08126331691012"><code>0db43ee</code></a> Remove From [u8; n] impl for uint types (<a href="https://redirect.github.com/paritytech/parity-common/issues/859">#859</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/701148e9afc7aa03a0eb2b66ce0309875810a1c3"><code>701148e</code></a> Update syn to 2 (<a href="https://redirect.github.com/paritytech/parity-common/issues/855">#855</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/2f1866d2e1b6d1a09b82396404c9e9e5c79fbae4"><code>2f1866d</code></a> Upgrade rocksdb to 0.22 (<a href="https://redirect.github.com/paritytech/parity-common/issues/853">#853</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/9ff9316a53d03e14c267aa6dcc45c478bfb2b12a"><code>9ff9316</code></a> fix compile errors with new Rust (<a href="https://redirect.github.com/paritytech/parity-common/issues/854">#854</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/757e2bdd02fd7515545b8fe52226ff36e3cee14e"><code>757e2bd</code></a> primitive-types: add repository URL to Cargo.toml (<a href="https://redirect.github.com/paritytech/parity-common/issues/844">#844</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/d5e9c1d5b52e7a43f843855a0f4fbc319929a681"><code>d5e9c1d</code></a> Add more comment (<a href="https://redirect.github.com/paritytech/parity-common/issues/827">#827</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/dbf46bada7e1e796899b24155fa0fc9b7d2f3ab6"><code>dbf46ba</code></a> Release 0.2.0 (<a href="https://redirect.github.com/paritytech/parity-common/issues/825">#825</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/314bda627a590de8e43a4611e6e8a3a33cc3f1a3"><code>314bda6</code></a> build(deps): bump Swatinem/rust-cache from 2.7.2 to 2.7.3 (<a href="https://redirect.github.com/paritytech/parity-common/issues/824">#824</a>)</li> <li><a href="https://github.com/paritytech/parity-common/commit/2241f644e02e6e91072a7087eb056ffb0085c711"><code>2241f64</code></a> build(deps): bump Swatinem/rust-cache from 2.7.1 to 2.7.2 (<a href="https://redirect.github.com/paritytech/parity-common/issues/823">#823</a>)</li> <li>Additional commits viewable in <a href="https://github.com/paritytech/parity-common/compare/impl-serde-v0.4.0...impl-serde-v0.5.0">compare view</a></li> </ul> </details> <br /> Updates `serde_json` from 1.0.128 to 1.0.132 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p> <blockquote> <h2>1.0.132</h2> <ul> <li>Improve binary size and compile time for JSON array and JSON object deserialization by about 50% (<a href="https://redirect.github.com/serde-rs/json/issues/1205">#1205</a>)</li> <li>Improve performance of JSON array and JSON object deserialization by about 8% (<a href="https://redirect.github.com/serde-rs/json/issues/1206">#1206</a>)</li> </ul> <h2>1.0.131</h2> <ul> <li>Implement Deserializer and IntoDeserializer for <code>Map<String, Value></code> and <code>&Map<String, Value></code> (<a href="https://redirect.github.com/serde-rs/json/issues/1135">#1135</a>, thanks <a href="https://github.com/swlynch99"><code>@swlynch99</code></a>)</li> </ul> <h2>1.0.130</h2> <ul> <li>Support converting and deserializing <code>Number</code> from i128 and u128 (<a href="https://redirect.github.com/serde-rs/json/issues/1141">#1141</a>, thanks <a href="https://github.com/druide"><code>@druide</code></a>)</li> </ul> <h2>1.0.129</h2> <ul> <li>Add <a href="https://docs.rs/serde_json/1/serde_json/struct.Map.html#method.sort_keys"><code>serde_json::Map::sort_keys</code></a> and <a href="https://docs.rs/serde_json/1/serde_json/enum.Value.html#method.sort_all_objects"><code>serde_json::Value::sort_all_objects</code></a> (<a href="https://redirect.github.com/serde-rs/json/issues/1199">#1199</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/json/commit/86d933cfd7b5665270e66296694468286794ae44"><code>86d933c</code></a> Release 1.0.132</li> <li><a href="https://github.com/serde-rs/json/commit/f45b422a3ba435722753a2ad7ad32e2a7e2d0596"><code>f45b422</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/json/issues/1206">#1206</a> from dtolnay/hasnext</li> <li><a href="https://github.com/serde-rs/json/commit/f2082d2a04b3b5d72503ac89e2182a5833bb2a1e"><code>f2082d2</code></a> Clearer order of comparisons</li> <li><a href="https://github.com/serde-rs/json/commit/0f54a1a0df5045aee4a2d2f8656c365d835095e5"><code>0f54a1a</code></a> Handle early return sooner on eof in seq or map</li> <li><a href="https://github.com/serde-rs/json/commit/2a4cb44f7cc591a4542cbb1a73ca5bdc8a02c0d7"><code>2a4cb44</code></a> Rearrange 'match peek'</li> <li><a href="https://github.com/serde-rs/json/commit/4cb90ce66de2e0b52572d40ab518ad6d634e43d1"><code>4cb90ce</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/json/issues/1205">#1205</a> from dtolnay/hasnext</li> <li><a href="https://github.com/serde-rs/json/commit/b71ccd2d8f6aabaa0ac6cb889f8e18989038d968"><code>b71ccd2</code></a> Reduce duplicative instantiation of logic in SeqAccess and MapAccess</li> <li><a href="https://github.com/serde-rs/json/commit/a810ba985095ecd5bb3f8741f0e6d71e36975cb6"><code>a810ba9</code></a> Release 1.0.131</li> <li><a href="https://github.com/serde-rs/json/commit/0d084c50380a91b0b83ee96eb5e8ae04de7baaf5"><code>0d084c5</code></a> Touch up PR 1135</li> <li><a href="https://github.com/serde-rs/json/commit/b4954a95613fcf5b5b9e830582c0ba5f24a0dd60"><code>b4954a9</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/json/issues/1135">#1135</a> from swlynch99/map-deserializer</li> <li>Additional commits viewable in <a href="https://github.com/serde-rs/json/compare/1.0.128...1.0.132">compare view</a></li> </ul> </details> <br /> Updates `syn` from 2.0.79 to 2.0.82 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/syn/releases">syn's releases</a>.</em></p> <blockquote> <h2>2.0.82</h2> <ul> <li>Provide <code>Parse</code> impls for PreciseCapture and CapturedParam (<a href="https://redirect.github.com/dtolnay/syn/issues/1757">#1757</a>, <a href="https://redirect.github.com/dtolnay/syn/issues/1758">#1758</a>)</li> <li>Support parsing <code>unsafe</code> attributes (<a href="https://redirect.github.com/dtolnay/syn/issues/1759">#1759</a>)</li> <li>Add Fold and VisitMut methods for Vec<Attribute> (<a href="https://redirect.github.com/dtolnay/syn/issues/1762">#1762</a>)</li> </ul> <h2>2.0.81</h2> <ul> <li>Add TypeParamBound::PreciseCapture to represent precise capture syntax <code>impl Trait + use<'a, T></code> (<a href="https://redirect.github.com/dtolnay/syn/issues/1752">#1752</a>, <a href="https://redirect.github.com/dtolnay/syn/issues/1753">#1753</a>, <a href="https://redirect.github.com/dtolnay/syn/issues/1754">#1754</a>)</li> </ul> <h2>2.0.80</h2> <ul> <li>Add <code>Expr::RawAddr</code> (<a href="https://redirect.github.com/dtolnay/syn/issues/1743">#1743</a>)</li> <li>Reject precise captures and ~const in inappropriate syntax positions (<a href="https://redirect.github.com/dtolnay/syn/issues/1747">#1747</a>)</li> <li>Reject trait bound containing only precise capture (<a href="https://redirect.github.com/dtolnay/syn/issues/1748">#1748</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/syn/commit/76092cf236bba9311d953887fff5c3391420803e"><code>76092cf</code></a> Release 2.0.82</li> <li><a href="https://github.com/dtolnay/syn/commit/937dbcb95c875f4d1d39fabb032ac318ad58ace5"><code>937dbcb</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1762">#1762</a> from dtolnay/vecattr</li> <li><a href="https://github.com/dtolnay/syn/commit/386ae9da289a83402ad8c6e8493b667e6876153d"><code>386ae9d</code></a> Add Fold and VisitMut methods for Vec<Attribute></li> <li><a href="https://github.com/dtolnay/syn/commit/4c7f82e6fc334400420ad93df489d863050c28f0"><code>4c7f82e</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1759">#1759</a> from dtolnay/unsafeattr</li> <li><a href="https://github.com/dtolnay/syn/commit/a45af00fdfbaf0e686f0b7e45259caf4ac3fcadc"><code>a45af00</code></a> Parse unsafe attributes</li> <li><a href="https://github.com/dtolnay/syn/commit/e011ba794aba6aaa0d5c96368bf6cf686581ee96"><code>e011ba7</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1758">#1758</a> from dtolnay/precisecapture</li> <li><a href="https://github.com/dtolnay/syn/commit/c25900d5f4949fb04890f8507d9b1dd5be18de5a"><code>c25900d</code></a> Implement Parse for CapturedParam</li> <li><a href="https://github.com/dtolnay/syn/commit/fc22fcea08252e34738e5adc2c605da379bebed5"><code>fc22fce</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1757">#1757</a> from dtolnay/precisecapture</li> <li><a href="https://github.com/dtolnay/syn/commit/3a45d69b8bd51c4f0608303fe4068840b064b8b6"><code>3a45d69</code></a> Implement Parse for PreciseCapture</li> <li><a href="https://github.com/dtolnay/syn/commit/c9bdfacf92c578b9af50f6528fc9f73e79d013bd"><code>c9bdfac</code></a> Tweak parsing logic for TypeParamBound</li> <li>Additional commits viewable in <a href="https://github.com/dtolnay/syn/compare/2.0.79...2.0.82">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] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Oct 20, 2024
-
-
thiolliere authored
* The compilation now panics if the optional compile-time environment variable `RUNTIME_METADATA_HASH` contains an invalid value. * The weight for the `CheckMetadataHash` transaction extension is more accurate as it is almost compile-time.
-
- Oct 18, 2024
-
-
georgepisaltu authored
Original PR https://github.com/paritytech/polkadot-sdk/pull/2280 reverted in https://github.com/paritytech/polkadot-sdk/pull/3665 This PR reintroduces the reverted functionality with additional changes, related effort [here](https://github.com/paritytech/polkadot-sdk/pull/3623). Description is copied over from the original PR First part of [Extrinsic Horizon](https://github.com/paritytech/polkadot-sdk/issues/2415) Introduces a new trait `TransactionExtension` to replace `SignedExtension`. Introduce the idea of transactions which obey the runtime's extensions and have according Extension data (né Extra data) yet do not have hard-coded signatures. Deprecate the terminology of "Unsigned" when used for transactions/extrinsics owing to there now being "proper" unsigned transactions which obey the extension framework and "old-style" unsigned which do not. Instead we have __*General*__ for the former and __*Bare*__ for the latter. (Ultimately, the latter will be phased out as a type of transaction, and Bare will only be used for Inherents.) Types of extrinsic are now therefore: - Bare (no hardcoded signature, no Extra data; used to be known as "Unsigned") - Bare transactions (deprecated): Gossiped, validated with `ValidateUnsigned` (deprecated) and the `_bare_compat` bits of `TransactionExtension` (deprecated). - Inherents: Not gossiped, validated with `ProvideInherent`. - Extended (Extra data): Gossiped, validated via `TransactionExtension`. - Signed transactions (with a hardcoded signature) in extrinsic v4. - General transactions (without a hardcoded signature) in extrinsic v5. `TransactionExtension` differs from `SignedExtension` because: - A signature on the underlying transaction may validly not be present. - It may alter the origin during validation. - `pre_dispatch` is renamed to `prepare` and need not contain the checks present in `validate`. - `validate` and `prepare` is passed an `Origin` rather than a `AccountId`. - `validate` may pass arbitrary information into `prepare` via a new user-specifiable type `Val`. - `AdditionalSigned`/`additional_signed` is renamed to `Implicit`/`implicit`. It is encoded *for the entire transaction* and passed in to each extension as a new argument to `validate`. This facilitates the ability of extensions to acts as underlying crypto. There is a new `DispatchTransaction` trait which contains only default function impls and is impl'ed for any `TransactionExtension` impler. It provides several utility functions which reduce some of the tedium from using `TransactionExtension` (indeed, none of its regular functions should now need to be called directly). Three transaction version discriminator ("versions") are now permissible (RFC [here](https://github.com/polkadot-fellows/RFCs/pull/84)) in extrinsic version 5: - 0b00000100 or 0b00000101: Bare (used to be called "Unsigned"): contains Signature or Extra (extension data). After bare transactions are no longer supported, this will strictly identify an Inherents only. Available in both extrinsic versions 4 and 5. - 0b10000100: Old-school "Signed" Transaction: contains Signature, Extra (extension data) and an extension version byte, introduced as part of [RFC99](https://github.com/polkadot-fellows/RFCs/blob/main/text/0099-transaction-extension-version.md). Still available as part of extrinsic v4. - 0b01000101: New-school "General" Transaction: contains Extra (extension data) and an extension version byte, as per RFC99, but no Signature. Only available in extrinsic v5. For the New-school General Transaction, it becomes trivial for authors to publish extensions to the mechanism for authorizing an Origin, e.g. through new kinds of key-signing schemes, ZK proofs, pallet state, mutations over pre-authenticated origins or any combination of the above. `UncheckedExtrinsic` still maintains encode/decode backwards compatibility with extrinsic version 4, where the first byte was encoded as: - 0b00000100 - Unsigned transactions - 0b10000100 - Old-school Signed transactions, without the extension version byte Now, `UncheckedExtrinsic` contains a `Preamble` and the actual call. The `Preamble` describes the type of extrinsic as follows: ```rust /// A "header" for extrinsics leading up to the call itself. Determines the type of extrinsic and /// holds any necessary specialized data. #[derive(Eq, PartialEq, Clone)] pub enum Preamble<Address, Signature, Extension> { /// An extrinsic without a signature or any extension. This means it's either an inherent or /// an old-school "Unsigned" (we don't use that terminology any more since it's confusable with /// the general transaction which is without a signature but does have an extension). /// /// NOTE: In the future, once we remove `ValidateUnsigned`, this will only serve Inherent /// extrinsics and thus can be renamed to `Inherent`. Bare(ExtrinsicVersion), /// An old-school transaction extrinsic which includes a signature of some hard-coded crypto. /// Available only on extrinsic version 4. Signed(Address, Signature, ExtensionVersion, Extension), /// A new-school transaction extrinsic which does not include a signature by default. The /// origin authorization, through signatures or other means, is performed by the transaction /// extension in this extrinsic. Available starting with extrinsic version 5. General(ExtensionVersion, Extension), } ``` ## Code Migration ### NOW: Getting it to build Wrap your `SignedExtension`s in `AsTransactionExtension`. This should be accompanied by renaming your aggregate type in line with the new terminology. E.g. Before: ```rust /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( /* snip */ MySpecialSignedExtension, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>; ``` After: ```rust /// The extension to the basic transaction logic. pub type TxExtension = ( /* snip */ AsTransactionExtension<MySpecialSignedExtension>, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, TxExtension>; ``` You'll also need to alter any transaction building logic to add a `.into()` to make the conversion happen. E.g. Before: ```rust fn construct_extrinsic( /* snip */ ) -> UncheckedExtrinsic { let extra: SignedExtra = ( /* snip */ MySpecialSignedExtension::new(/* snip */), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); UncheckedExtrinsic::new_signed( /* snip */ Signature::Sr25519(signature), extra, ) } ``` After: ```rust fn construct_extrinsic( /* snip */ ) -> UncheckedExtrinsic { let tx_ext: TxExtension = ( /* snip */ MySpecialSignedExtension::new(/* snip */).into(), ); let payload = SignedPayload::new(call.clone(), tx_ext.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); UncheckedExtrinsic::new_signed( /* snip */ Signature::Sr25519(signature), tx_ext, ) } ``` ### SOON: Migrating to `TransactionExtension` Most `SignedExtension`s can be trivially converted to become a `TransactionExtension`. There are a few things to know. - Instead of a single trait like `SignedExtension`, you should now implement two traits individually: `TransactionExtensionBase` and `TransactionExtension`. - Weights are now a thing and must be provided via the new function `fn weight`. #### `TransactionExtensionBase` This trait takes care of anything which is not dependent on types specific to your runtime, most notably `Call`. - `AdditionalSigned`/`additional_signed` is renamed to `Implicit`/`implicit`. - Weight must be returned by implementing the `weight` function. If your extension is associated with a pallet, you'll probably want to do this via the pallet's existing benchmarking infrastructure. #### `TransactionExtension` Generally: - `pre_dispatch` is now `prepare` and you *should not reexecute the `validate` functionality in there*! - You don't get an account ID any more; you get an origin instead. If you need to presume an account ID, then you can use the trait function `AsSystemOriginSigner::as_system_origin_signer`. - You get an additional ticket, similar to `Pre`, called `Val`. This defines data which is passed from `validate` into `prepare`. This is important since you should not be duplicating logic from `validate` to `prepare`, you need a way of passing your working from the former into the latter. This is it. - This trait takes a `Call` type parameter. `Call` is the runtime call type which used to be an associated type; you can just move it to become a type parameter for your trait impl. - There's no `AccountId` associated type any more. Just remove it. Regarding `validate`: - You get three new parameters in `validate`; all can be ignored when migrating from `SignedExtension`. - `validate` returns a tuple on success; the second item in the tuple is the new ticket type `Self::Val` which gets passed in to `prepare`. If you use any information extracted during `validate` (off-chain and on-chain, non-mutating) in `prepare` (on-chain, mutating) then you can pass it through with this. For the tuple's last item, just return the `origin` argument. Regarding `prepare`: - This is renamed from `pre_dispatch`, but there is one change: - FUNCTIONALITY TO VALIDATE THE TRANSACTION NEED NOT BE DUPLICATED FROM `validate`!! - (This is different to `SignedExtension` which was required to run the same checks in `pre_dispatch` as in `validate`.) Regarding `post_dispatch`: - Since there are no unsigned transactions handled by `TransactionExtension`, `Pre` is always defined, so the first parameter is `Self::Pre` rather than `Option<Self::Pre>`. If you make use of `SignedExtension::validate_unsigned` or `SignedExtension::pre_dispatch_unsigned`, then: - Just use the regular versions of these functions instead. - Have your logic execute in the case that the `origin` is `None`. - Ensure your transaction creation logic creates a General Transaction rather than a Bare Transaction; this means having to include all `TransactionExtension`s' data. - `ValidateUnsigned` can still be used (for now) if you need to be able to construct transactions which contain none of the extension data, however these will be phased out in stage 2 of the Transactions Horizon, so you should consider moving to an extension-centric design. --------- Signed-off-by:
georgepisaltu <george.pisaltu@parity.io> Co-authored-by:
Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by:
Branislav Kontur <bkontur@gmail.com>
-
- Oct 17, 2024
-
-
Joseph Zhao authored
Closes #5705 --------- Co-authored-by:
Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by:
Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
-
- Oct 16, 2024
-
-
dependabot[bot] authored
Bumps [platforms](https://github.com/rustsec/rustsec) from 3.0.2 to 3.4.1. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/rustsec/rustsec/commits">compare view</a></li> </ul> </details> <br /> [](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> Co-authored-by:
Bastian Köcher <git@kchr.de>
-
- Oct 15, 2024
-
-
dependabot[bot] authored
Bumps [tokio-test](https://github.com/tokio-rs/tokio) from 0.4.3 to 0.4.4. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tokio-rs/tokio/commit/3d0d0fd2af9192ca5cf2836451e96dffab68216a"><code>3d0d0fd</code></a> chore: prepare tokio-test v0.4.4 (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6400">#6400</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/7cfb1007969e3fcb28b03854f3126caeca93932e"><code>7cfb100</code></a> chore: prepare tokio-stream v0.1.15 (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6401">#6401</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/e37bd6385430620f850a644d58945ace541afb6e"><code>e37bd63</code></a> io: implement <code>try_new</code> and <code>try_with_interest</code> for <code>AsyncFd</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6345">#6345</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/c9e75785c84a441199992ed38e49aeba2f061a24"><code>c9e7578</code></a> sync: remove <code>'static</code> bound on <code>impl Sink for PollSender</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6397">#6397</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/3141ed62287043b5400e24ac930b002dc7d11d92"><code>3141ed6</code></a> sync: update watch channel docs (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6395">#6395</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/ea1cfbdb97f524a1ae465c0f5454dd6690dd5e6e"><code>ea1cfbd</code></a> sync: reorder const_new before new_with (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6392">#6392</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/fb2dc97468fead3c1d318f209a65648e11ade55d"><code>fb2dc97</code></a> readme: update commit message guidelines (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6393">#6393</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/a3d2548789d22d4bf193a4614f229944270e912c"><code>a3d2548</code></a> sync: implement <code>Clone</code> for <code>watch::Sender</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6388">#6388</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/b4ab6472de9a0708873c5f14f3b8de03b149a1c5"><code>b4ab647</code></a> signal: fix typo in argument name (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6389">#6389</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/3133af42e123b9469dad292ae3a090da915d23c5"><code>3133af4</code></a> runtime: make the <code>enter</code> example deterministic (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6351">#6351</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-test-0.4.3...tokio-test-0.4.4">compare view</a></li> </ul> </details> <br /> [](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> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Sebastian Kunert <skunert49@gmail.com>
-
Michal Kucharczyk authored
### Fork-Aware Transaction Pool Implementation This PR introduces a fork-aware transaction pool (fatxpool) enhancing transaction management by maintaining the valid state of txpool for different forks. ### High-level overview The high level overview was added to [`sc_transaction_pool::fork_aware_txpool`](https://github.com/paritytech/polkadot-sdk/blob/3ad0a1b7/substrate/client/transaction-pool/src/fork_aware_txpool/mod.rs#L21) module. Use: ``` cargo doc --document-private-items -p sc-transaction-pool --open ``` to build the doc. It should give a good overview and nice entry point into the new pool's mechanics. <details> <summary>Quick overview (documentation excerpt)</summary> #### View For every fork, a view is created. The view is a persisted state of the transaction pool computed and updated at the tip of the fork. The view is built around the existing `ValidatedPool` structure. A view is created on every new best block notification. To create a view, one of the existing views is chosen and cloned. When the chain progresses, the view is kept in the cache (`retracted_views`) to allow building blocks upon intermediary blocks in the fork. The views are deleted on finalization: views lower than the finalized block are removed. The views are updated with the transactions from the mempool—all transactions are sent to the newly created views. A maintain process is also executed for the newly created views—basically resubmitting and pruning transactions from the appropriate tree route. ##### View store View store is the helper structure that acts as a container for all the views. It provides some convenient methods. ##### Submitting transactions Every transaction is submitted to every view at the tips of the forks. Retracted views are not updated. Every transaction also goes into the mempool. ##### Internal mempool Shortly, the main purpose of an internal mempool is to prevent a transaction from being lost. That could happen when a transaction is invalid on one fork and could be valid on another. It also allows the txpool to accept transactions when no blocks have been reported yet. The mempool removes its transactions when they get finalized. Transactions are also periodically verified on every finalized event and removed from the mempool if no longer valid. #### Events Transaction events from multiple views are merged and filtered to avoid duplicated events. `Ready` / `Future` / `Inblock` events are originated in the Views and are de-duplicated and forwarded to external listeners. `Finalized` events are originated in fork-aware-txpool logic. `Invalid` events requires special care and can be originated in both view and fork-aware-txpool logic. #### Light maintain Sometime transaction pool does not have enough time to prepare fully maintained view with all retracted transactions being revalidated. To avoid providing empty ready transaction set to block builder (what would result in empty block) the light maintain was implemented. It simply removes the imported transactions from ready iterator. #### Revalidation Revalidation is performed for every view. The revalidation process is started after a trigger is executed. The revalidation work is terminated just after a new best block / finalized event is notified to the transaction pool. The revalidation result is applied to the newly created view which is built upon the revalidated view. Additionally, parts of the mempool are also revalidated to make sure that no transactions are stuck in the mempool. #### Logs The most important log allowing to understand the state of the txpool is: ``` maintain: txs:(0, 92) views:[2;[(327, 76, 0), (326, 68, 0)]] event:Finalized { hash: 0x8...f, tree_route: [] } took:3.463522ms ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ unwatched txs in mempool ────┘ │ │ │ │ │ │ │ │ │ │ watched txs in mempool ───────┘ │ │ │ │ │ │ │ │ │ views ───────────────┘ │ │ │ │ │ │ │ │ 1st view block # ──────────┘ │ │ │ │ │ │ │ number of ready tx ───────┘ │ │ │ │ │ │ numer of future tx ─────┘ │ │ │ │ │ 2nd view block # ──────┘ │ │ │ │ number of ready tx ──────────┘ │ │ │ number of future tx ───────┘ │ │ event ────────┘ │ duration ──────────────────────────────────────────────────┘ ``` It is logged after the maintenance is done. The `debug` level enables per-transaction logging, allowing to keep track of all transaction-related actions that happened in txpool. </details> ### Integration notes For teams having a custom node, the new txpool needs to be instantiated, typically in `service.rs` file, here is an example: https://github.com/paritytech/polkadot-sdk/blob/9c547ff3 /cumulus/polkadot-omni-node/lib/src/common/spec.rs#L152-L161 To enable new transaction pool the following cli arg shall be specified: `--pool-type=fork-aware`. If it works, there shall be information printed in the log: ``` 2024-09-20 21:28:17.528 INFO main txpool: [Parachain] creating ForkAware txpool. ```` For debugging the following debugs shall be enabled: ``` "-lbasic-authorship=debug", "-ltxpool=debug", ``` *note:* trace for txpool enables per-transaction logging. ### Future work The current implementation seems to be stable, however further improvements are required. Here is the umbrella issue for future work: - https://github.com/paritytech/polkadot-sdk/issues/5472 Partially fixes: #1202 --------- Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Sebastian Kunert <skunert49@gmail.com> Co-authored-by:
Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
-
Ayevbeosa Iyamu authored
Added error logs in pallet-xcm to help in debugging, fixes #2408 ## TODO - [x] change `log::error` to `tracing::error` format for `xcm-executor` - [x] check existing logs, e.g. this one can be extended with more info `tracing::error!(target: "xcm::reanchor", ?error, "Failed reanchoring with error");` - [x] use `tracing` instead of `log` for `pallet-xcm/src/lib.rs` --------- Co-authored-by:
Ayevbeosa Iyamu <aiyamu@vatebra.com> Co-authored-by:
Adrian Catangiu <adrian@parity.io> Co-authored-by:
Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by:
Branislav Kontur <bkontur@gmail.com> Co-authored-by:
Bastian Köcher <git@kchr.de>
-