- Nov 21, 2024
-
-
Bastian Köcher authored
Move spawning of the slot-based collator into the `run` function. Also the tasks are being spawned as blocking task and not just as normal tasks. --------- Co-authored-by: GitHub Action <[email protected]>
-
Alexandru Vasile authored
The `GossipEngine::poll_next` implementation polls both the `notification_service` and the `sync_event_stream`. If both polls produce valid data to be processed (`Poll::Ready(Some(..))`), then the sync event is ignored when we receive `NotificationEvent::NotificationStreamOpened` and the role cannot be deduced. This PR ensures both events are processed gracefully. While at it, I have added a warning to the sync engine related to `notification_service` producing `Poll::Ready(None)`. This effectively ensures that `SyncEvents` propagate to the network potentially fixing any state mismatch. For more context: https://github.com/paritytech/polkadot-sdk/issues/6507 cc @paritytech/sdk-node --------- Signed-off-by: Alexandru Vasile <[email protected]>
-
Alexander Theißen authored
The eth RPC tests fail sometimes because they run into a connect timeout because the node takes a long time to start. This bumps the connect timeout from 30 to 120 seconds. Locally they take around 40s for me. As a drive by I also remove a apparently duplicated nextest config. --------- Co-authored-by: ordian <[email protected]>
-
gupnik authored
https://github.com/paritytech/polkadot-sdk/pull/3970 updated the treasury pallet to support relay chain block number provider. However, it added a constraint to the BlockNumberProvider to have the same block number type as frame_system: ```rust type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>; ``` This PR removes that constraint as suggested by @gui1117
-
- Nov 20, 2024
-
-
Xavier Lau authored
Part of: - #6202. --------- Signed-off-by: Xavier Lau <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
-
Branislav Kontur authored
This PR includes: - Refactored integrity tests to support standalone deployment of `pallet-bridge-messages`. - Refactored the `open_and_close_bridge_works` test case to support multiple scenarios, such as: 1. A local chain opening a bridge. 2. Sibling parachains opening a bridge. 3. The relay chain opening a bridge. - Previously, we added instance support for `pallet-bridge-relayer` but overlooked updating the `DeliveryConfirmationPaymentsAdapter`. --------- Co-authored-by: GitHub Action <[email protected]>
-
Bastian Köcher authored
The default trie cache size before was set to `64MiB`, which is quite low to achieve real speed ups. `1GiB` should be a reasonable number as the requirements for validators/collators/full nodes are much higher when it comes to minimum memory requirements. Also the cache will not use `1GiB` from the start and fills over time. The setting can be changed by setting `--trie-cache-size BYTE_SIZE`. --------- Co-authored-by: GitHub Action <[email protected]>
-
Alexandre R. Baldé authored
# Description https://github.com/paritytech/polkadot-sdk/pull/4613 introduced events for `pallet_conviction_voting::{vote, remove_vote, remove_other_vote}`. However: 1. it did not include `unlock` 2. the pallet's unit tests were missing an update ## Integration N/A ## Review Notes This is as https://github.com/paritytech/polkadot-sdk/pull/6261 was, so it is a trivial change.
-
- Nov 19, 2024
-
-
Liu-Cheng Xu authored
This PR is the second part of the pure state sync refactoring, encapsulating `StateSyncMetadata` as a separate entity. Now it's pretty straightforward what changes are needed for the persistent state sync as observed in the struct `StateSync`: - `state`: redirect directly to the DB layer instead of being accumulated in the memory. - `metadata`: handle the state sync metadata on disk whenever the state is forwarded to the DB, resume an ongoing state sync on a restart, etc. --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]>
-
Liu-Cheng Xu authored
This is part 2 of https://github.com/paritytech/polkadot-sdk/issues/5406#issuecomment-2325064863, properly handling the block gap generated during fast sync. Although #5406 remains unresolved due to the known issues in #5663, I decided to open up this PR earlier than later to speed up the overall progress. I've tested the fast sync locally with this PR, and it appears to be functioning well. (I was doing a fast sync from a discontinued archive node locally, thus the issue highlighted in https://github.com/paritytech/polkadot-sdk/pull/5663#discussion_r1752124039 was bypassed exactly.) Once the edge cases in #5663 are addressed, we can move forward by removing the body attribute from the LightState block request and complete the work on #5406. The changes in this PR are incremental, so reviewing commit by commit should provide the best clarity. cc @dmitry-markin --------- Co-authored-by: Bastian Köcher <[email protected]>
-
Bastian Köcher authored
This pull request forward all the logging directives given to the node via `RUST_LOG` or `-l` to the workers, instead of only forwarding `RUST_LOG`. --------- Co-authored-by: GitHub Action <[email protected]>
-
Kazunobu Ndong authored
# Description Migrates pallet-democracy benchmarks to benchmark v2 syntax This is Part of https://github.com/paritytech/polkadot-sdk/issues/6202 --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]>
-
Maciej authored
Aims to implement Stage 3 of Validator Disbling as outlined here: https://github.com/paritytech/polkadot-sdk/issues/4359 Features: - [x] New Disabling Strategy (Staking level) - [x] Re-enabling logic (Session level) - [x] More generic disabling decision output - [x] New Disabling Events Testing & Security: - [x] Unit tests - [x] Mock tests - [x] Try-runtime checks - [x] Try-runtime tested on westend snap - [x] Try-runtime CI tests - [ ] Re-enabling Zombienet Test (?) - [ ] SRLabs Audit Closes #4745 Closes #2418 --------- Co-authored-by: ordian <[email protected]> Co-authored-by: Ankan <[email protected]> Co-authored-by: Tsvetomir Dimitrov <[email protected]>
-
tmpolaczyk authored
Fix prometheus metrics not shutting down if there are open connections. I fixed the same issue in the past but it broke again after a dependecy upgrade. See also: https://github.com/paritytech/polkadot-sdk/pull/1637
-
Ermal Kaleci authored
Enhance the `delegate_call` function to accept an `address` target parameter instead of a `code_hash`. This allows direct identification of the target contract using the provided address. Additionally, introduce parameters for specifying a customizable `ref_time` limit and `proof_size` limit, thereby improving flexibility and control during contract interactions. --------- Co-authored-by: Alexander Theißen <[email protected]>
-
Tobi Demeco authored
# Description Opening another PR because I added a test to check for my fix pushed in #6486 and realized that for some reason I completely forgot how to code and did not fix the underlying issue, since out-of-bounds indexing could still happen even with the check I added. This one should fix that and, as an added bonus, has a simple test used as an integrity check to make sure future changes don't accidently revert this fix. Now `sp-trie` should definitely not panic when faced with bad `CompactProof`s. Sorry about that
😅 This, like #6486, is related to issue #6485 ## Integration No changes have to be done downstream, and as such the version bump should be minor. --------- Co-authored-by: Bastian Köcher <[email protected]> -
Michal Kucharczyk authored
This PR refactors `TransactionPool` API to use `async_trait`, replacing the` Pin<Box<...>>` pattern. This should improve readability and maintainability. The change is not altering any functionality. --------- Co-authored-by: GitHub Action <[email protected]>
-
- Nov 18, 2024
-
-
Bastian Köcher authored
Co-authored-by: GitHub Action <[email protected]>
-
Tsvetomir Dimitrov authored
Since async backing parameters runtime api is released on all networks the code in backing subsystem can be simplified by removing the usages of `ProspectiveParachainsMode` and keeping only the branches of the code under `ProspectiveParachainsMode::Enabled`. The PR does that and reworks the tests in mod.rs to use async backing. It's a preparation for https://github.com/paritytech/polkadot-sdk/issues/5079 --------- Co-authored-by: Alin Dima <[email protected]> Co-authored-by: command-bot <>
-
Alexander Samusev authored
PR to implements workflow stopper - a custom solution to stop all workflows if one of a required jobs failed. Previously we had the same solution in GitLab and it saved a lot of compute. Because GitHub doesn't have one united pipeline and instead it has multiple workflows something like this has to be implemented. cc https://github.com/paritytech/ci_cd/issues/939
-
Liu-Cheng Xu authored
This pure refactoring of state sync is preparing for https://github.com/paritytech/polkadot-sdk/issues/4. As the rough plan in https://github.com/paritytech/polkadot-sdk/issues/4#issuecomment-2439588876, there will be two PRs for the state sync refactoring. This first PR focuses on isolating the function `process_state_key_values()` as the central point for storing received state data in memory. This function will later be adapted to forward the state data directly to the DB layer for persistent sync. A follow-up PR will handle the encapsulation of `StateSyncMetadata` to support this persistent storage. Although there are many commits in this PR, each commit is small and intentionally incremental to facilitate a smoother review, please review them commit by commit. Each commit should represent an equivalent rewrite of the existing logic, with one exception https://github.com/paritytech/polkadot-sdk/commit/bb447b2d, which has a slight deviation from the original but is correct IMHO. Please give this commit special attention during the review.
-
thiolliere authored
Co-authored-by: Bastian Köcher <[email protected]>
-
Joseph Zhao authored
Part of #6202 --------- Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Giuseppe Re <[email protected]>
-
- Nov 15, 2024
-
-
clangenb authored
Migrates pallet-nomination-pool-benchmarking to benchmarking syntax v2. Part of: * #6202 --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Giuseppe Re <[email protected]>
-
Tobi Demeco authored
# Description This PR is a simple fix consisting of adding a check to the process of decoding nodes of a storage proof to avoid panicking when receiving badly-constructed proofs, returning an error instead. This would close #6485 ## Integration No changes have to be done downstream, and as such the version bump should be minor. --------- Co-authored-by: Bastian Köcher <[email protected]>
-
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 <[email protected]> -
PG Herveou authored
This PR update the pallet to use the EVM 18 decimal balance in contracts call and host functions instead of the native balance. It also updates the js example to add the piggy-bank solidity contract that expose the problem --------- Co-authored-by: GitHub Action <[email protected]>
-
- Nov 14, 2024
-
-
NingLin-P authored
# Description When using `TypeWithDefault<u32, ..>` as the default nonce provider to overcome the [replay attack](https://wiki.polkadot.network/docs/transaction-attacks#replay-attack) issue, it fails to compile due to `TypeWithDefault<u32, ..>: TryFrom<u64>` is not satisfied (which is required by trait `BaseArithmetic`). This is because the blanket implementation `TryFrom<U> for T where U: Into<T>` only impl `TryFrom<u16>` and `TryFrom<u8>` for `u32` since `u32` only impl `Into` for `u16` and `u8` but not `u64`. This PR fixes the issue by adding `TryFrom<u16/u32/u64/u128>` and `From<u8/u16/u32/u64/u128>` impl (using macro) for `TypeWithDefault<u8/u16/u32/u64/u128, ..>` and removing the blanket impl (otherwise the compiler will complain about conflicting impl), such that `TypeWithDefault<u8/u16/u32/u64/u128, ..>: AtLeast8/16/32Bit` is satisfied. ## Integration This PR adds support to more types to be used with `TypeWithDefault`, existing code that used `u64` with `TypeWithDefault` should not be affected, an unit test is added to ensure that. ## Review Notes This PR simply makes `TypeWithDefault<u8/u16/u32/u64/u128, ..>: AtLeast8/16/32Bit` satisfied --------- Signed-off-by: linning <[email protected]>
-
PG Herveou authored
Set the logs_bloom in the transaction receipt --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Cyrill Leutwiler <[email protected]>
-
Viraj Bhartiya authored
# Description Created a workflow to search for README.docify.md in the repo, and run cargo build --features generate-readme in the dir of the file (assuming it is related to a crate). If the git diff shows some output for the README.md, then the file update wasn't pushed on the branch, and the workflow fails. Closes #6331 ## Integration Downstream projects that want to adopt this README checking workflow should: 1. Copy the `.github/workflows/readme-check.yml` file to their repository 2. Ensure any `README.docify.md` files in their project follow the expected format 3. Implement the `generate-readme` feature flag in their Cargo.toml if not already present ## Review Notes This PR adds a GitHub Actions workflow that automatically verifies README.md files are up-to-date with their corresponding README.docify.md sources. Key implementation details: - The workflow runs on both PRs and pushes to main - It finds all `README.docify.md` files recursively in the repository - For each file found: - Builds the project with `--features generate-readme` in that directory - Checks if the README.md has any uncommitted changes - Fails if any README.md is out of sync --------- Co-authored-by: Alexander Samusev <[email protected]> Co-authored-by: Iulian Barbu <[email protected]>
-
georgepisaltu authored
Follow up to https://github.com/paritytech/polkadot-sdk/pull/3685 Partially fixes https://github.com/paritytech/polkadot-sdk/issues/6403 The main PR introduced bare support for the new extension version byte as well as extension weights and benchmarking. This PR: - Removes the redundant extension version byte from the signed v4 extrinsic, previously unused and defaulted to 0. - Adds the extension version byte to the inherited implication passed to `General` transactions. - Whitelists the `pallet_authorship::Author`, `frame_system::Digest` and `pallet_transaction_payment::NextFeeMultiplier` storage items as they are read multiple times by extensions for each transaction, but are hot in memory and currently overestimate the weight. - Whitelists the benchmark caller for `CheckEra` and `CheckGenesis` as the reads are performed for every transaction and overestimate the weight. - Updates the umbrella frame weight...
-
thiolliere authored
Found by @ggwpez Fix staking benchmark, error was introduced when migrating to v2: https://github.com/paritytech/polkadot-sdk/pull/6025 --------- Co-authored-by: GitHub Action <[email protected]>
-
- Nov 13, 2024
-
-
Branislav Kontur authored
Closes: https://github.com/paritytech/polkadot-sdk/issues/6449
-
Andrei Eres authored
# Description Add support to run networking protocol benchmarks with litep2p backend. Now we can compare the work of both libp2p and litep2p backends for notifications and request-response protocols. Next step: extract worker initialization from the benchmark loop. ### Example run on local machine <img width="916" alt="image" src="https://github.com/user-attachments/assets/6bb9f90a-76a4-417e-b9d3-db27aa8a356f"> ## Integration Does not affect downstream projects. ## Review Notes https://github.com/paritytech/polkadot-sdk/blob/d4d95025 /substrate/client/network/src/litep2p/service.rs#L510-L520 This method should be implemented to run request benchmarks. --------- Co-authored-by: GitHub Action <[email protected]>
-
Stephane Gurgenidze authored
## Issue [[#3421] backing: improve session buffering for runtime information](https://github.com/paritytech/polkadot-sdk/issues/3421) ## Description In the current implementation of the backing module, certain pieces of information, which remain unchanged throughout a session, are fetched multiple times via runtime API calls. The goal of this task was to introduce a local cache to store such session-stable information and perform the runtime API call only once per session. This PR implements caching specifically for the validators list, node features, executor parameters, minimum backing votes threshold, and validator-to-group mapping, which were previously fetched from the runtime or computed each time `PerRelayParentState` was built. Now, this information is cached and reused within the session. ## TODO * [X] Create a separate struct for per-session caches; * [X] Cache validators list; * [X] Cache node features; * [X] Cache executor parameters; * [X] Cache minimum backing votes threshold; * [X] Cache validator-to-group mapping; * [X] Update tests to reflect these changes; * [X] Add prdoc. ## For the next PR Cache validator groups and any other session-stable data (if present).
-
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 <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]>
-
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 <[email protected]> Co-authored-by: clangenb <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
-
Giuseppe Re authored
- [x] Removing `without_storage_info` and adding bounds on the stored types for pallet `society` - issue https://github.com/paritytech/polkadot-sdk/issues/6289 - [x] Migrating to benchmarking V2 - https://github.com/paritytech/polkadot-sdk/issues/6202 --------- Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Muharem <[email protected]>
-
Michał Gil authored
# Description Part of https://github.com/paritytech/polkadot-sdk/issues/3326 Removes all pallet::getter occurrences from pallet-staking and replaces them with explicit implementations. Adds tests to verify that retrieval of affected entities works as expected so via storage::getter. ## Review Notes 1. Traits added to the `derive` attribute are used in tests (either directly or indirectly). 2. The getters had to be placed in a separate impl block since the other one is annotated with `#[pallet::call]` and that requires `#[pallet::call_index(0)]` annotation on each function in that block. So I thought it's better to separate them. --------- Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
-
thiolliere authored
[Tx ext stage 2: 1/4] Add `TransactionSource` as argument in `TransactionExtension::validate` (#6323) ## Meta This PR is part of 4 PR: * https://github.com/paritytech/polkadot-sdk/pull/6323 * https://github.com/paritytech/polkadot-sdk/pull/6324 * https://github.com/paritytech/polkadot-sdk/pull/6325 * https://github.com/paritytech/polkadot-sdk/pull/6326 ## Description One goal of transaction extension is to get rid or unsigned transactions. But unsigned transaction validation has access to the `TransactionSource`. The source is used for unsigned transactions that the node trust and don't want to pay upfront. Instead of using transaction source we could do: the transaction is valid if it is signed by the block author, conceptually it should work, but it doesn't look so easy. This PR add `TransactionSource` to the validate function for transaction extensions
-