- Mar 18, 2024
-
-
There is a problem in the way we update `authorithy-discovery` next keys and because of that nodes that enter the active set would be noticed at the start of the session they become active, instead of the start of the previous session as it was intended. This is problematic because: 1. The node itself advertises its addresses on the DHT only when it notices it should become active on around ~10m loop, so in this case it would notice after it becomes active. 2. The other nodes won't be able to detect the new nodes addresses at the beginning of the session, so it won't added them to the reserved set. With 1 + 2, we end-up in a situation where the the new node won't be able to properly connect to its peers because it won't be in its peers reserved set. Now, the nodes accept by default`MIN_GOSSIP_PEERS: usize = 25` connections to nodes that are not in the reserved set, but given Kusama size(> 1000 nodes) you could easily have more than`25` new nodes entering the active set or simply the nodes don't have slots anymore because, they already have connections to peers not in the active set. In the end what the node would notice is 0 backing rewards because it wasn't directly connected to the peers in its backing group. ## Root-cause The flow is like this: 1. At BAD_SESSION - 1, in `rotate_session` new nodes are added to QueuedKeys https://github.com/paritytech/polkadot-sdk/blob/02e1a7f476d7d7c67153e975ab9a1bdc02ffea12/substrate/frame/session/src/lib.rs#L609 ``` <QueuedKeys<T>>::put(queued_amalgamated.clone()); <QueuedChanged<T>>::put(next_changed); ``` 2. AuthorityDiscovery::on_new_session is called with `changed` being the value of `<QueuedChanged<T>>:` at BAD_SESSION - **2** because it was saved before being updated https://github.com/paritytech/polkadot-sdk/blob/02e1a7f476d7d7c67153e975ab9a1bdc02ffea12/substrate/frame/session/src/lib.rs#L613 3. At BAD_SESSION - 1, `AuthorityDiscovery::on_new_session` doesn't updated its next_keys because `changed` was false. 4. For the entire durations of `BAD_SESSION - 1` everyone calling runtime api `authorities`(should return past, present and future authorities) won't discover the nodes that should become active . 5. At the beginning of BAD_SESSION, all nodes discover the new nodes are authorities, but it is already too late because reserved_nodes are updated only at the beginning of the session by the `gossip-support`. See above why this bad. ## Fix Update next keys with the queued_validators at every session, not matter the value of `changed` this is the same way babe pallet correctly does it. https://github.com/paritytech/polkadot-sdk/blob/02e1a7f476d7d7c67153e975ab9a1bdc02ffea12/substrate/frame/babe/src/lib.rs#L655 ## Notes - The issue doesn't reproduce with proof-authorities changes like `versi` because `changed` would always be true and `AuthorityDiscovery` correctly updates its next_keys every time. - Confirmed at session `37651` on kusama that this is exactly what it happens by looking at blocks with polkadot.js. ## TODO - [ ] Move versi on proof of stake and properly test before and after fix to confirm there is no other issue. --------- Signed-off-by: Alexandru Gheorghe <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> (cherry picked from commit 8d0cd4ff ) Signed-off-by: Alexandru Gheorghe <[email protected]>
-
- Mar 11, 2024
-
-
Morgan Adamiec authored
-
Morgan Adamiec authored
-
Morgan Adamiec authored
-
Branislav Kontur authored
Backport of https://github.com/paritytech/polkadot-sdk/pull/3564 Expected patches for (1.8.0): - penpal-runtime `0.16.1`
-
- Mar 01, 2024
-
-
Ignacio Palacios authored
Backport of https://github.com/paritytech/polkadot-sdk/pull/3340 It was backported to `v1.7.0` but changes didn't make it to `v1.8.0`
-
- Feb 26, 2024
-
-
Morgan Adamiec authored
-
Morgan Adamiec authored
-
Branislav Kontur authored
-
Branislav Kontur authored
Co-authored-by: Francisco Aguirre <[email protected]>
-
Branislav Kontur authored
Co-authored-by: Francisco Aguirre <[email protected]>
-
Branislav Kontur authored
-
Branislav Kontur authored
-
Branislav Kontur authored
-
EgorPopelyaev authored
-
EgorPopelyaev authored
Merge branch 'release-polkadot-v1.8.0' of https://github.com/paritytech/polkadot-sdk into release-polkadot-v1.8.0
-
eskimor authored
First step into elastic scaling: Having a para be on multiple cores, will not get it more throughput yet, but it will no longer brick it. This is a backport PR, as this would benefit the Coretime launch on Kusama. --------- Signed-off-by: Andrei Sandu <[email protected]> Signed-off-by: alindima <[email protected]> Co-authored-by: Andrei Sandu <[email protected]> Co-authored-by: alindima <[email protected]> Co-authored-by: eskimor <[email protected]>
-
PG Herveou authored
Add a `ApiVersion` constant to the pallet-contracts Config to communicate with developers the current state of the host functions exposed by the pallet
-
Alexandru Gheorghe authored
cherry picked from master commit b9c792a4 --------- Add more debug logs to understand if statement-distribution is in a bad state, should be useful for debugging https://github.com/paritytech/polkadot-sdk/issues/3314 on production networks. Additionally, increase the number of parallel requests should make, since I notice that requests take around 100ms on kusama, and the 5 parallel request was picked mostly random, no reason why we can do more than that. Signed-off-by: Alexandru Gheorghe <[email protected]> Co-authored-by: ordian <[email protected]>
-
- Feb 22, 2024
-
-
EgorPopelyaev authored
-
Adrian Catangiu authored
As part of BEEFY worker/voter initialization the task waits for certain chain and backend conditions to be fulfilled: - BEEFY consensus enabled on-chain & GRANDPA best finalized higher than on-chain BEEFY genesis block, - backend has synced headers for BEEFY mandatory blocks between best BEEFY and best GRANDPA. During this waiting time, any messages gossiped on the BEEFY topic for current chain get enqueued in the gossip engine, leading to RAM bloating and output warning/error messages when the wait time is non-negligible (like during a clean sync). This PR adds logic to pump the gossip engine while waiting for other things to make sure gossiped messages get consumed (practically discarded until worker is fully initialized). Also raises the warning threshold for enqueued messages from 10k to 100k. This is in line with the other gossip protocols on the node. Fixes https://github.com/paritytech/polkadot-sdk/issues/3390 --------- Signed-off-by: Adrian Catangiu <[email protected]>
-
EgorPopelyaev authored
-
Egor_P authored
This PR adds two more public channels in matrix where should the release announcements go
-
EgorPopelyaev authored
-
- Feb 21, 2024
-
-
EgorPopelyaev authored
-
Dastan authored
closes #2844 - adds `list-pallets` option which prints all unique available pallets for benchmarking ```bash ./target/release/node benchmark pallet --list=pallets ``` - adds `all` option which runs benchmarks for all available pallets and extrinsics (equivalent to `--pallet * --extrinsic *`) ```bash ./target/release/node benchmark pallet --all ``` - use the `list=pallets` syntax in `run_all_benchmarks.sh` script cc ggwpez --------- Co-authored-by: Bastian Köcher <[email protected]>
-
Clara van Staden authored
- Adds a test to check the correct digest for Snowbridge outbound messages. For the correct digest to be in the block, the the MessageQueue pallet should be configured after the EthereumOutbound queue pallet. The added test fails if the EthereumOutbound is configured after the MessageQueue pallet. - Adds a helper method `run_to_block_with_finalize` to simulate the block finalizing. The existing `run_to_block` method does not finalize and so it cannot successfully test this condition. Closes: https://github.com/paritytech/polkadot-sdk/issues/3208 --------- Co-authored-by: claravanstaden <Cats 4 life!>
-
Egor_P authored
This PR should fix the issue with the failing GHA which sends notifications to the different matrix channels, when the new release is published
-
-
Alexander Theißen authored
This PR is fixing a bug in the sync mechanism between wasmi and pallet-contracts. This bug leads to essentially double charging all the gas that was used during the execution of the host function. When the `call` host function is used for recursion this will lead to a quadratic amount of gas consumption with regard to the nesting depth.We also took the chance to refactor the code in question and improve the rust docs. The bug was caused by not updating `GasMeter::executor_consumed` (previously `engine_consumed`) when leaving the host function. This lead to the value being stale (too low) when entering another host function. --------- Co-authored-by: PG Herveou <[email protected]>
-
- Feb 20, 2024
-
-
girazoki authored
I dont think this bound is required by anything else and it allows now to use this struct with runtimes that have 20 bytes accounts --------- Co-authored-by: Bastian Köcher <[email protected]>
-
Oliver Tale-Yazdi authored
Did not realize that https://github.com/paritytech/polkadot-sdk/pull/3370 was indeed breaking. cc @muraca --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]>
-
dependabot[bot] authored
Bumps the known_good_semver group with 5 updates: | Package | From | To | | --- | --- | --- | | [serde](https://github.com/serde-rs/serde) | `1.0.196` | `1.0.197` | | [serde_json](https://github.com/serde-rs/json) | `1.0.113` | `1.0.114` | | [syn](https://github.com/dtolnay/syn) | `2.0.49` | `2.0.50` | | [serde_yaml](https://github.com/dtolnay/serde-yaml) | `0.9.31` | `0.9.32` | | [serde_derive](https://github.com/serde-rs/serde) | `1.0.196` | `1.0.197` | Updates `serde` from 1.0.196 to 1.0.197 <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.197</h2> <ul> <li>Fix unused_imports warnings when compiled by rustc 1.78</li> <li>Optimize code size of some Display impls (<a href="https://redirect.github.com/serde-rs/serde/issues/2697">#2697</a>, thanks <a href="https://github.com/nyurik"><code>@nyurik</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/serde/commit/5fa711d75d91173aafc6019e03cf8af6ac9ba7b2"><code>5fa711d</code></a> Release 1.0.197</li> <li><a href="https://github.com/serde-rs/serde/commit/f5d8ae423aa195d3423029ff5a618266cc8ff9a5"><code>f5d8ae4</code></a> Resolve prelude redundant import warnings</li> <li><a href="https://github.com/serde-rs/serde/commit/1d54973b928bd8708a4ad2d90fca1203367ff580"><code>1d54973</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2697">#2697</a> from nyurik/format-str</li> <li><a href="https://github.com/serde-rs/serde/commit/b8fafefd8588f84af54329945fab701ec414281d"><code>b8fafef</code></a> A few minor <code>write_str</code> optimizations and inlining</li> <li><a href="https://github.com/serde-rs/serde/commit/c42ebb8839fbd92dbda6729e8363c8d683f26306"><code>c42ebb8</code></a> Update ui test suite to nightly-2024-02-12</li> <li><a href="https://github.com/serde-rs/serde/commit/9e680620b595724a6abfb8e785155d02482f911a"><code>9e68062</code></a> Ignore incompatible_msrv clippy lint for conditionally compiled code</li> <li><a href="https://github.com/serde-rs/serde/commit/846f865de2e94408e0edc6a2c6863c063cd234be"><code>846f865</code></a> Ignore dead_code warnings in test</li> <li>See full diff in <a href="https://github.com/serde-rs/serde/compare/v1.0.196...v1.0.197">compare view</a></li> </ul> </details> <br /> Updates `serde_json` from 1.0.113 to 1.0.114 <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>v1.0.114</h2> <ul> <li>Fix unused_imports warnings when compiled by rustc 1.78</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/json/commit/e1b3a6d8a161ff5ec4865b487d148c17d0188e3e"><code>e1b3a6d</code></a> Release 1.0.114</li> <li><a href="https://github.com/serde-rs/json/commit/6fb70262e894168ac631b2232a1b7b3a7781ebe5"><code>6fb7026</code></a> Work around prelude redundant import warnings</li> <li><a href="https://github.com/serde-rs/json/commit/34a04c5f7febdf80e05743e38d5cb1880a83b6f6"><code>34a04c5</code></a> Ignore incompatible_msrv clippy false positives in test</li> <li><a href="https://github.com/serde-rs/json/commit/ca05f69943e18d70c2219ea41fcb67f2849b7eed"><code>ca05f69</code></a> Remove unused Float::is_sign_negative trait method</li> <li>See full diff in <a href="https://github.com/serde-rs/json/compare/v1.0.113...v1.0.114">compare view</a></li> </ul> </details> <br /> Updates `syn` from 2.0.49 to 2.0.50 <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.50</h2> <ul> <li>Fix unused_imports warnings when compiled by rustc 1.78</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/syn/commit/0dae01509e1dfc1734b0e8097c16338b56503242"><code>0dae015</code></a> Release 2.0.50</li> <li><a href="https://github.com/dtolnay/syn/commit/2b493c34211a605a84eb5f1618e49818f8b654e6"><code>2b493c3</code></a> Update location of Pat variant aliases</li> <li><a href="https://github.com/dtolnay/syn/commit/07a435df6739d47d54e933970eddfc6764bd519d"><code>07a435d</code></a> Fix doc links now that crate::* is no longer imported</li> <li><a href="https://github.com/dtolnay/syn/commit/713f932b85698b1b2d561cc98e5b6f9643c9afde"><code>713f932</code></a> Eliminate glob imports</li> <li><a href="https://github.com/dtolnay/syn/commit/6eb82a997589cf9c5b2bb36716443a19c4440c5e"><code>6eb82a9</code></a> Eliminate glob imports from codegen</li> <li><a href="https://github.com/dtolnay/syn/commit/896a7306ee36a4c7dc96e1bf61e247e53df47179"><code>896a730</code></a> Eliminate glob imports from examples</li> <li><a href="https://github.com/dtolnay/syn/commit/866c80ce2f39e8e2e723bb5440fdd58e4e1de3b6"><code>866c80c</code></a> Update test suite to nightly-2024-02-18</li> <li><a href="https://github.com/dtolnay/syn/commit/d4b499e3907295a7173fbc6f8ca34388583795f6"><code>d4b499e</code></a> Update test suite to nightly-2024-02-17</li> <li><a href="https://github.com/dtolnay/syn/commit/38956e60405920fdf856a0128a804460913c8c0c"><code>38956e6</code></a> Update test suite to nightly-2024-02-16</li> <li>See full diff in <a href="https://github.com/dtolnay/syn/compare/2.0.49...2.0.50">compare view</a></li> </ul> </details> <br /> Updates `serde_yaml` from 0.9.31 to 0.9.32 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/serde-yaml/releases">serde_yaml's releases</a>.</em></p> <blockquote> <h2>0.9.32</h2> <ul> <li>Fix unused_imports warnings when compiled by rustc 1.78</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/serde-yaml/commit/ea57d8cdeb6b2d0060aaeec6c934d0f494722765"><code>ea57d8c</code></a> Release 0.9.32</li> <li><a href="https://github.com/dtolnay/serde-yaml/commit/a52b7ac3f42aad7f587409d2e431ed2fe5db7b31"><code>a52b7ac</code></a> Resolve prelude redundant import warnings</li> <li><a href="https://github.com/dtolnay/serde-yaml/commit/9e0b8d337b1c19fe250454da3bce9fc12b6cd634"><code>9e0b8d3</code></a> Replace curly quotes with ascii straight quotes</li> <li>See full diff in <a href="https://github.com/dtolnay/serde-yaml/compare/0.9.31...0.9.32">compare view</a></li> </ul> </details> <br /> Updates `serde_derive` from 1.0.196 to 1.0.197 <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.197</h2> <ul> <li>Fix unused_imports warnings when compiled by rustc 1.78</li> <li>Optimize code size of some Display impls (<a href="https://redirect.github.com/serde-rs/serde/issues/2697">#2697</a>, thanks <a href="https://github.com/nyurik"><code>@nyurik</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/serde/commit/5fa711d75d91173aafc6019e03cf8af6ac9ba7b2"><code>5fa711d</code></a> Release 1.0.197</li> <li><a href="https://github.com/serde-rs/serde/commit/f5d8ae423aa195d3423029ff5a618266cc8ff9a5"><code>f5d8ae4</code></a> Resolve prelude redundant import warnings</li> <li><a href="https://github.com/serde-rs/serde/commit/1d54973b928bd8708a4ad2d90fca1203367ff580"><code>1d54973</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2697">#2697</a> from nyurik/format-str</li> <li><a href="https://github.com/serde-rs/serde/commit/b8fafefd8588f84af54329945fab701ec414281d"><code>b8fafef</code></a> A few minor <code>write_str</code> optimizations and inlining</li> <li><a href="https://github.com/serde-rs/serde/commit/c42ebb8839fbd92dbda6729e8363c8d683f26306"><code>c42ebb8</code></a> Update ui test suite to nightly-2024-02-12</li> <li><a href="https://github.com/serde-rs/serde/commit/9e680620b595724a6abfb8e785155d02482f911a"><code>9e68062</code></a> Ignore incompatible_msrv clippy lint for conditionally compiled code</li> <li><a href="https://github.com/serde-rs/serde/commit/846f865de2e94408e0edc6a2c6863c063cd234be"><code>846f865</code></a> Ignore dead_code warnings in test</li> <li>See full diff in <a href="https://github.com/serde-rs/serde/compare/v1.0.196...v1.0.197 ">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
Branislav Kontur authored
-
Niklas Adolfsson authored
The rationale behind this, is that it may be useful for some users actually disable RPC batch requests or limit them by length instead of the total size bytes of the batch. This PR adds two new CLI options: ``` --rpc-disable-batch-requests - disable batch requests on the server --rpc-max-batch-request-len <LEN> - limit batches to LEN on the server. ```
-
Branislav Kontur authored
Externalize received fees checks from `receive_reserve_asset_deposited_from_different_consensus_works` (#3409) Backport of patch-fix: https://github.com/paritytech/polkadot-sdk/pull/3404
-
PG Herveou authored
Remove `#[unstable]` on `call_v2`, `instantiate_v2`, `lock_delegate_dependency` and `unlock_delegate_dependency`. See ink! integrations: - call_v2: https://github.com/paritytech/ink/pull/2077 - instantiate_v2: <TODO> - lock/unlock dependency: https://github.com/paritytech/ink/pull/2076
-
Oliver Tale-Yazdi authored
Lifting some more dependencies to the workspace. Just using the most-often updated ones for now. It can be reproduced locally. ```sh # First you can check if there would be semver incompatible bumps (looks good in this case): $ zepter transpose dependency lift-to-workspace --ignore-errors syn quote thiserror "regex:^serde.*" # Then apply the changes: $ zepter transpose dependency lift-to-workspace --version-resolver=highest syn quote thiserror "regex:^serde.*" --fix # And format the changes: $ taplo format --config .config/taplo.toml ``` --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]>
-
Bastian Köcher authored
This spams logs in `Debug` with no useful information.
-
girazoki authored
Implements the `ConversionToAssetBalance` trait to asset-rate by doing `1/rate*(balance)`.
-