Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

REPLACED BY #6991 - allow ranked collective members below mininum required rank to vote but with zero weight #3461

Conversation

abdbee
Copy link

@abdbee abdbee commented Feb 23, 2024

Note, due to a small mishap that required me to rewrite this branch's history and force-push, this PR has now been replaced by #6991

This PR adjusts the ranked_collective pallet to allow ranked collective members below the minimum required rank to vote. But this vote doesn't affect the outcome of a poll because it carries zero weight (0 voting power).

Currently, a vote by members below the minimum rank results in a RankTooLow error. This PR removes this error and allows such members to vote successfully. This means Tally.bare_ayes increases by one for such members, but no changes are made to Ayes/Nays

@abdbee abdbee requested a review from a team as a code owner February 23, 2024 14:10
@@ -625,7 +623,7 @@ pub mod pallet {
None => pays = Pays::No,
}
let min_rank = T::MinRankOfClass::convert(class);
let votes = Self::rank_to_votes(record.rank, min_rank)?;
let votes = Self::rank_to_votes(record.rank, min_rank).unwrap_or(0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked again the code and this would basically break support.

We probably should extend Tally with some sort of out_of_rank_ayes or whatever. Then the UI can combine bare_ayes and out_of_rank_ayes to show some total number of ayes.

Maybe @ggwpez has a better idea.

Copy link
Author

@abdbee abdbee Dec 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI @bkchr , I extended Tally to include both out_of_rank_ayes and out_of_rank_nays. thought it'd be a good idea to include out_of_rank_nays too, so that it reflects both sides.

072f002

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another problem, as I just realized. This is based on the assumption that VoteWeight::convert never returns 0. Which is not guaranteed.

So, we probably need to change Voting as well to take an Option<Votes> or you have some better idea.

lexnv and others added 28 commits November 5, 2024 09:22
paritytech#6298)

This PR's main goal is to add public listen addresses to the DHT
authorities records. This change improves the discoverability of
validators that did not provide the `--public-addresses` flag.

This PR populates the authority DHT records with public listen addresses
if any.

The change effectively ensures that addresses are added to the DHT
record in following order:
 1. Public addresses provided by CLI `--public-addresses`
 2. Maximum of 4 public (global) listen addresses (if any)
3. Any external addresses discovered from the network (ie from
`/identify` protocol)


While at it, this PR adds the following constraints on the number of
addresses:
- Total number of addresses cached is bounded at 16 (increased from 10).
- A maximum number of 32 addresses are published to DHT records
(previously unbounded).
  - A maximum of 4 global listen addresses are utilized.
      
This PR also removes the following warning:
`WARNING: No public address specified, validator node may not be
reachable.`

### Next Steps
- [ ] deploy and monitor in versi network

Closes: paritytech#6280
Part of: paritytech#5266

cc @paritytech/networking

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: Dmitry Markin <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
…h#6221)

Replace `GlobalConsensusEthereumConvertsFor` with
`EthereumLocationsConverterFor` that allows `Location` to `AccountId`
conversion for the Ethereum network root as before, but also for
Ethereum contracts and accounts.

The new converter only matches explicit `parents: 2` Ethereum locations,
meaning it should be used only on/by parachains.
Remove references of now defunct Wococo network.

The XCM `NetworkId::Wococo` will also be removed with [XCMv5
PR](paritytech#4826)
Part of:
* paritytech#6202

---------

Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Giuseppe Re <[email protected]>
closes paritytech#5791.

This is not strictly necessary but serves as a defensive check.

The staking pallet exposes
[apis](https://paritytech.github.io/polkadot-sdk/master/sp_staking/trait.StakingUnchecked.html#tymethod.virtual_bond)
that other runtime pallets (pallet-delegated-staking) can use to create
virtual stakers. However, there’s no way for pallet-staking to ensure
that the staker is truly keyless. If the caller (this is a trusted
caller so this would only happen due to a bug) registers an account with
a private key as a virtual_staker, these accounts could later interact
directly with pallet-staking dispatchables (such as
[bond_extra](https://paritytech.github.io/polkadot-sdk/master/pallet_staking/dispatchables/fn.bond_extra.html))
and bypass any locking mechanism. The check above ensures this scenario
can never occur by performing an integrity check.

---------

Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: command-bot <>
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
([paritytech#258](paritytech/litep2p#258))
- kad: Providers part 7: better types and public API, public addresses &
known providers ([paritytech#246](paritytech/litep2p#246))
- kad: Providers part 6: stop providing
([paritytech#245](paritytech/litep2p#245))
- kad: Providers part 5: `GET_PROVIDERS` query
([paritytech#236](paritytech/litep2p#236))
- kad: Providers part 4: refresh local providers
([paritytech#235](paritytech/litep2p#235))
- kad: Providers part 3: publish provider records (start providing)
([paritytech#234](paritytech/litep2p#234))

### Changed

- transport_service: Improve connection stability by downgrading
connections on substream inactivity
([paritytech#260](paritytech/litep2p#260))
- transport: Abort canceled dial attempts for TCP, WebSocket and Quic
([paritytech#255](paritytech/litep2p#255))
- kad/executor: Add timeout for writting frames
([paritytech#277](paritytech/litep2p#277))
- kad: Avoid cloning the `KademliaMessage` and use reference for
`RoutingTable::closest`
([paritytech#233](paritytech/litep2p#233))
- peer_state: Robust state machine transitions
([paritytech#251](paritytech/litep2p#251))
- address_store: Improve address tracking and add eviction algorithm
([paritytech#250](paritytech/litep2p#250))
- kad: Remove unused serde cfg
([paritytech#262](paritytech/litep2p#262))
- req-resp: Refactor to move functionality to dedicated methods
([paritytech#244](paritytech/litep2p#244))
- transport_service: Improve logs and move code from tokio::select macro
([#254](paritytech/litep2p#254))

### Fixed

- tcp/websocket/quic: Fix cancel memory leak
([paritytech#272](paritytech/litep2p#272))
- transport: Fix pending dials memory leak
([paritytech#271](paritytech/litep2p#271))
- ping: Fix memory leak of unremoved `pending_opens`
([paritytech#274](paritytech/litep2p#274))
- identify: Fix memory leak of unused `pending_opens`
([paritytech#273](paritytech/litep2p#273))
- kad: Fix not retrieving local records
([paritytech#221](paritytech/litep2p#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 <[email protected]>
Co-authored-by: Dmitry Markin <[email protected]>
…paritytech#6169)

Resolves paritytech#5930

`spend_local` from `treasury` pallet and associated types are
deprecated. `spend_local` was being used before with native currency in
the treasury.

This PR provides a documentation on how to migrate to the `spend` call
instead.

### Migration

#### For users who were using only `spend_local` before

To replace `spend_local` functionality configure `Paymaster` pallet
configuration to be `PayFromAccount` and configure `AssetKind` to be
`()` and use `spend` call instead.
This way `spend` call will function as deprecated `spend_local`.

Example:
```
impl pallet_treasury::Config for Runtime {
    ..
    type AssetKind = ();
    type Paymaster = PayFromAccount<Self::Currency, TreasuryAccount>;
    // convert balance 1:1 ratio with native currency
    type BalanceConverter = UnityAssetBalanceConversion;
    ..
}
```

#### For users who were already using `spend` with all other assets,
except the native asset

Use `NativeOrWithId` type for `AssetKind` and have a `UnionOf` for
native and non-native assets, then use that with `PayAssetFromAccount`.

Example from `kitchensink-runtime`:
```
// Union of native currency and assets
pub type NativeAndAssets =
    UnionOf<Balances, Assets, NativeFromLeft, NativeOrWithId<u32>, AccountId>;

impl pallet_treasury::Config for Runtime {
    ..
    type AssetKind = NativeOrWithId<u32>;
    type Paymaster = PayAssetFromAccount<NativeAndAssets, TreasuryAccount>;
    type BalanceConverter = AssetRate;
    ..
}

// AssetRate pallet configuration
impl pallet_asset_rate::Config for Runtime {
    ..
    type Currency = Balances;
    type AssetKind = NativeOrWithId<u32>;
    ..
}
```

---------

Co-authored-by: DavidK <[email protected]>
Co-authored-by: Muharem <[email protected]>
For marking `Check SemVer` required
…aritytech#6339)

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-&quot;full&quot; 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&lt;Attribute&gt; (<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&lt;Self&gt;</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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
This PR contains adjustments to the release pipelines. 
- RC Automation and Branchoff pipelines now use the PGPKMS key generated
by the release team to sign related commits directly in the Github flow
- RC Automation does not use old tagging action. Instead, it creates a
tag and pushes it using git
- RC binary is going to be done on the larger github runners setup in
the` paritytech-release` org

Closes: paritytech/release-engineering#233
make the eth-rpc proxy /health and /health/readiness from the proxied
substrate chain
see paritytech#4802

---------

Co-authored-by: GitHub Action <[email protected]>
We were not passing through the `RUSTUP_TOOLCHAIN` variable to the
`build.rs` script of our fixtures. This means that setting the toolchain
like `cargo +1.81 build` had no effect on the fixture build. It would
always fall back to the default toolchain.

---------

Co-authored-by: GitHub Action <[email protected]>
Part of:

- paritytech#6202.

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Giuseppe Re <[email protected]>
I've broken this test with
paritytech#5883 and this is the
fix.

The benchmark is now updated to use proper core index and session index
for the generated candidates.

TODO:
- [ ] <del> PRDoc </del>

---------

Signed-off-by: Andrei Sandu <[email protected]>
…>` or `String` depending on use case (paritytech#5693)

# Description

As described in paritytech#4001
`RuntimeVersion` was not encoded consistently using serde. Turned out it
was a remnant of old times and no longer actually needed. As such I
removed it completely in this PR and replaced with `Cow<'static, str>`
for spec/impl names and `String` for error cases.

Fixes paritytech#4001.

## Integration

For downstream projects the upgrade will primarily consist of following
two changes:
```diff
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
-	spec_name: create_runtime_str!("statemine"),
-	impl_name: create_runtime_str!("statemine"),
+	spec_name: alloc::borrow::Cow::Borrowed("statemine"),
+	impl_name: alloc::borrow::Cow::Borrowed("statemine"),
```
```diff
		fn dispatch_benchmark(
			config: frame_benchmarking::BenchmarkConfig
-		) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
+		) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
```

SCALE encoding/decoding remains the same as before, but serde encoding
in runtime has changed from bytes to string (it was like this in `std`
environment already), which most projects shouldn't have issues with. I
consider the impact of serde encoding here low due to the type only
being used in runtime version struct and mostly limited to runtime
internals, where serde encoding/decoding of this data structure is quite
unlikely (though we did hit exactly this edge-case ourselves
:sweat_smile:).

## Review Notes

Most of the changes are trivial and mechanical, the only non-trivial
change is in
`substrate/primitives/version/proc-macro/src/decl_runtime_version.rs`
where macro call expectation in `sp_version::runtime_version`
implementation was replaced with function call expectation.

# 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)

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
)

There was no good example of what is patch and full genesis config file.
Some explanation and example were added to the `chain-spec-builder` doc.

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Iulian Barbu <[email protected]>
…#6255)

Resolves paritytech#5929

Migrates `ChildBountyDescriptions` to be indexed instead of unique child
bounty id unique per all child bounties in the pallet to be unique per
every parent bounty.

Migrates `(ParentBounty, ChildBounty)` keys inside `ChildBounties`
storage item to use new `ChildBounty` ids starting from `0`.

@paritytech/frame-coders

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: DavidK <[email protected]>
Co-authored-by: muharem <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
…mmand (paritytech#6016)

Previously, when receiving the `SetReservedPeers { reserved }` all peers
not in the `reserved` set were removed.

This is incorrect, the intention of `SetReservedPeers` is to change the
active set of reserved peers and disconnect previously reserved peers
not in the new set.

While at it, have added a few other improvements to make the peerset
more robust:
- `SetReservedPeers`: does not disconnect all peers
- `SetReservedPeers`: if a reserved peer is no longer reserved, the
peerset tries to move the peers to the regular set if the slots allow
this move. This ensures the (now regular) peer counts towards slot
allocation.
- every 1 seconds: If we don't have enough connect peers, add the
reserved peers to the list that the peerstore ignores. Reserved peers
are already connected and the peerstore might return otherwise a
reserved peer


### Next Steps

- [x] More testing

cc @paritytech/networking

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: Dmitry Markin <[email protected]>
Co-authored-by: Michal Kucharczyk <[email protected]>
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.
…aritytech#6337)

# Description

Prior to this PR, the metadata for runtime APIs was entirely based on
that generated by `decl_runtime_apis`. It therefore didn't take into
account that `impl_runtime_apis` might implement older versions of APIs
than what has been declared.

This PR filters the returned runtime API metadata to only include
methods actually implemented, and also avoids including methods labelled
with `changed_in` (which the previous code was atempting to do already
but not successfully, owing to the attr being removed prior to the
check).

We also change all version related things to be `u32`s (rather than
VERSION being `u32` and `api_version`s being `u64`) for consistency /
ease of comparison.

A test is added which works with both the `enable-staging-api` feature
in api/tests enabled or disabled, to check all of this.

---------

Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
A quick fix to the step that generates a temporary token used in the
pipeline
…aritytech#6011)

Part of paritytech#5047

TODO:

- [x] prdoc
- [x] fix/add tests

---------

Signed-off-by: Andrei Sandu <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
…ment (paritytech#4012)

closes paritytech#1890 

### Overview 

Introduces similar checker struct to `CheckTraitDecls` in
`decl_runtime_apis!` - `CheckTraitImpls`. Overrides
`visit::visit_type_path` to detect usage of `Self` as a type argument
within the scope of `impl_runtime_apis!`.

**Note**: only prevents the usage of `Self` as a type argument in an
angle bracket `<>`, as it is the only use case that fails to compile.
For example, the code
[below](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs#L1002)
compiles fine:

```rs
impl BridgeMessagesConfig<WithBridgeHubRococoMessagesInstance> for Runtime {
  fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
	  let bench_lane_id = <Self as BridgeMessagesConfig<WithBridgeHubRococoMessagesInstance>>::bench_lane_id();
	  // ...
```

### Result

Given a block of code like this:

```rs
impl_runtime_apis! {
	impl apis::Core<Block> for Runtime {
		fn initialize_block(header: &HeaderFor<Self>) -> ExtrinsicInclusionMode {
			let _: HeaderFor<Self> = header.clone();
			RuntimeExecutive::initialize_block(header)
		}
		// ...
         }
// ...
```

<details open>

<summary>Output:</summary>

```bash
$ cargo build --release -p minimal-template-node
  error: `Self` can not be used as type argument in the scope of `impl_runtime_apis!`. Use `Runtime` instead.
     --> /polkadot-sdk/templates/minimal/runtime/src/lib.rs:133:11
      |
  133 |             let _: HeaderFor<Self> = header.clone();
      |                    ^^^^^^^^^^^^^^^

  error: `Self` can not be used as type argument in the scope of `impl_runtime_apis!`. Use `Runtime` instead.
     --> /polkadot-sdk/templates/minimal/runtime/src/lib.rs:132:32
      |
  132 |         fn initialize_block(header: &HeaderFor<Self>) -> ExtrinsicInclusionMode {
```

</details>

---------

Co-authored-by: Pavlo Khrystenko <[email protected]>
Co-authored-by: Pavlo Khrystenko <[email protected]>
Co-authored-by: Alexandru Vasile <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Relax requirements for `assign_core` so that it accepts updates for the
last scheduled entry.

Fixes paritytech#6102

---------

Co-authored-by: eskimor <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
# 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](polkadot-fellows/xcm-format#60).
More features could be added.

## TODO
- [x] Migrate foreign assets from v3 to v4
- [x] Setup v5 skeleton
- [x] Remove XCMv2
- [x] paritytech#5390
- [x] paritytech#5585
- [x] paritytech#5420
- [x] paritytech#5876
- [x] paritytech#5971
- [x] paritytech#6148
- [x] paritytech#6228

Fixes paritytech#3434 
Fixes paritytech#4190
Fixes paritytech#5209
Fixes paritytech#5241
Fixes paritytech#4284

---------

Signed-off-by: Adrian Catangiu <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Andrii <[email protected]>
Co-authored-by: Branislav Kontur <[email protected]>
Co-authored-by: Joseph Zhao <[email protected]>
Co-authored-by: Nazar Mokrynskyi <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Serban Iorga <[email protected]>
… the pool (paritytech#6357)

closes paritytech#6358

Adds the following runtime api to pallet-nomination-pools.
`pool_accounts(pool_id)`: Returns `(bonded_account, reward_account)`
associated with the `pool_id`.

cc: @rossbulat

---------

Co-authored-by: command-bot <>
Co-authored-by: Branislav Kontur <[email protected]>
xermicus and others added 23 commits December 18, 2024 13:02
This PR implements the ref_time_left API method. Solidity knows only a
single "gas" dimension; Solidity contracts will use this to query the
gas left.

---------

Signed-off-by: xermicus <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Co-authored-by: command-bot <>
)

This PR contains a small number of fixes that have been made to the
release pipeline:
- Fixes docker image publishing for polkadot
- Fixes docker owner in one of the jobs for the polakdot container
- Fixes a description of one of the inputs
Move `RelayChainDataFetcher` to its own module and rename it to
`RelayChainDataCache`. Also move the `core_selector` function to the
`slot_based` module.

Related issue: paritytech#6495
…aritytech#6920)

Call data, return data and code sizes can never exceed `u32::MAX`; they
are also not generic. Hence we know that they are guaranteed to always
fit into a 64bit register and `revive` can just zero extend them into a
256bit integer value. Which is slightly more efficient than passing them
on the stack.

---------

Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: xermicus <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: Alexander Theißen <[email protected]>
This PR implements the gas limit API, returning the maximum ref_time per
block. Solidity contracts only know a single weight dimension and can
use this method to get the block ref_time limit.

---------

Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: xermicus <[email protected]>
Co-authored-by: command-bot <>
Update to the latest polkavm version, containing a linker fix I need for
revive.

---------

Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: xermicus <[email protected]>
Co-authored-by: command-bot <>
- Fixed failing docs.rs build for `pallet-revive-uapi` by fixing a wring
attribute in the manifest (we were using `default-target` instead of
`targets`)
- Removed the macros defining host functions because the cfg attributes
introduced in paritytech#6866 won't work on them
- Added an docs.rs specific attribute so that the `unstable-hostfn`
feature tag will show up on the functions that are guarded behind it.

---------

Co-authored-by: command-bot <>
Linked to issue paritytech#590 
I moved the mod, tests, mock and benchmarking to their own seperate file
to reduce the bloat inside purchase.rs

---------

Co-authored-by: Guillaume Thiolliere <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
…#6746)

# Description

Linked to issue paritytech#590.
I moved the tests and benchmarking to their own seperate file to reduce
the bloat inside auctions.rs

Co-authored-by: Shawn Tabrizi <[email protected]>
Linked to issue paritytech#590 
Extracted code from mod.rs to new tests, mock and benchmarking files
This PR implements the EVM gas price syscall API method. Currently this
is a compile time constant in revive, but in the EVM it is an opcode.
Thus we should provide an opcode for this in the pallet.

---------

Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: xermicus <[email protected]>
Co-authored-by: command-bot <>
…to benchmarking to bench v2 syntax (paritytech#6577)

[polkadot-runtime-parachains] migrate disputes and disputes/slashing to
benchmarking to bench v2 syntax

Part of:
* paritytech#6202

---------

Co-authored-by: Giuseppe Re <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
This PR implements the base fee syscall API method. Currently this is
implemented as a compile time constant in the revive compiler, returning
0. However, since this is an opocde, if we ever need to implement it for
compatibility reasons with
[EIP-1559](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md),
it would break already deployed contracts. Thus we provide a syscall
method instead.

---------

Signed-off-by: xermicus <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Co-authored-by: command-bot <>
…h#6928)

This PR includes backport of the regular version bumps and `prdocs`
reordering from the `stable2412` branch back ro master

---------

Co-authored-by: ParityReleases <[email protected]>
Co-authored-by: command-bot <>
It doesn't make sense to only reorder the features array.

For example:

This makes it hard for me to compare the dependencies and features,
especially some crates have a really really long dependencies list.
```toml​
[dependencies]
c = "*"
a = "*"
b = "*"

[features]
std = [
  "a",
  "b",
  "c",
]
```

This makes my life easier.
```toml​
[dependencies]
a = "*"
b = "*"
c = "*"

[features]
std = [
  "a",
  "b",
  "c",
]
```

---------

Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: command-bot <>
Corrected WebsSocket to WebSocket

Co-authored-by: Bastian Köcher <[email protected]>
There was the chance that a `WarpProof` was bigger than the maximum warp
sync proof size. This could have happened when inserting the last
justification, which then may pushed the total proof size above the
maximum. The solution is simply to ensure that the last justfication
also fits into the limits.

Close: paritytech#6957

---------

Co-authored-by: command-bot <>
… to wait two sale boundaries (paritytech#4273)

When calling the reserve extrinsic after sales have started, the
assignment will be reserved, but two sale period boundaries must pass
before the core is actually assigned.

Since this can take between 28 and 56 days on production networks, a new
extrinsic is introduced to shorten the timeline.

This essentially performs three actions:
1. Reserve it (applies after two sale boundaries)
2. Add it to the Workplan for the next sale period
3. Add it to the Workplan for the rest of the current sale period from
the next timeslice to be commmitted.

The caller must ensure that a core is first added, with most relay chain
implementations having a delay of two session boundaries until it comes
into effect.

Alternatively the extrinsic can be called on a core whose workload can
be clobbered from now until the reservation kicks in (the sale period
after the next). Any workplan entries for that core at other timeslices
should be first removed by the caller.

---------

Co-authored-by: command-bot <>
Make pallet-recovery supports `BlockNumberProvider`.

Part of paritytech#6297.

---

Polkadot address: 156HGo9setPcU2qhFMVWLkcmtCEGySLwNqa3DaEiYSWtte4Y

---------

Co-authored-by: Guillaume Thiolliere <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
@abdbee abdbee force-pushed the issue-3210-members-below-min-vote-with-zero-weight branch from 33032b3 to 1b40ef7 Compare December 23, 2024 22:48
@abdbee abdbee requested review from a team as code owners December 23, 2024 22:48
@abdbee abdbee changed the title allow ranked collective members below mininum required rank to vote but with zero weight REPLACED BY #6991 - allow ranked collective members below mininum required rank to vote but with zero weight Dec 23, 2024
@abdbee abdbee closed this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.