Skip to content

runtime-api: remove redundant version checks#7610

Merged
sw10pa merged 13 commits intomasterfrom
sw10pa/remove-runtime-api-version-checks
Mar 19, 2025
Merged

runtime-api: remove redundant version checks#7610
sw10pa merged 13 commits intomasterfrom
sw10pa/remove-runtime-api-version-checks

Conversation

@sw10pa
Copy link
Copy Markdown
Contributor

@sw10pa sw10pa commented Feb 18, 2025

Issue

Description

This PR removes unnecessary runtime API version checks from subsystem-util/src/runtime for APIs supported by Polkadot (the most recent network to upgrade). Specifically, it applies to the DisabledValidators, MinimumBackingVotes and NodeFeatures APIs.

@sw10pa sw10pa requested review from alindima and tdimitrov February 18, 2025 15:01
@sw10pa sw10pa self-assigned this Feb 18, 2025
@sw10pa sw10pa added T4-runtime_API This PR/Issue is related to runtime APIs. T0-node This PR/Issue is related to the topic “node”. labels Feb 18, 2025
@sw10pa sw10pa marked this pull request as ready for review February 18, 2025 15:22
@sw10pa sw10pa requested review from bkchr and tdimitrov March 17, 2025 15:50
@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/13918493083
Failed job name: check-try-runtime

@sw10pa sw10pa added this pull request to the merge queue Mar 19, 2025
Copy link
Copy Markdown
Contributor

@tdimitrov tdimitrov left a comment

Choose a reason for hiding this comment

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

🚀

Merged via the queue into master with commit 45492e3 Mar 19, 2025
253 of 257 checks passed
@sw10pa sw10pa deleted the sw10pa/remove-runtime-api-version-checks branch March 19, 2025 08:09
@github-project-automation github-project-automation bot moved this from Backlog to Completed in parachains team board Mar 19, 2025
EgorPopelyaev added a commit to EgorPopelyaev/polkadot-sdk that referenced this pull request Mar 19, 2025
* Cumulus: Remove some old scripts (paritytech#7946)

* Updating readmes (paritytech#7950)

README for all templates still points to polkadot.network.
update them to:

1. point to [docs.polkadot.com](http://docs.polkadot.com/)
2. point to official polkadot discord and @substratedevs in TG for
support

* Upgrade link-checker cache to v4 (paritytech#7874)

Link-checker broke once more.

To get it green, cache action needs to upgrade to v4

* runtime-api: remove redundant version checks (paritytech#7610)

## Issue
- [[paritytech#1940] Cleanup boilerplate code when DisabledValidators runtime api
call is
released](paritytech#1940)
- Includes other runtime APIs, such as `MinimumBackingVotes` and
`NodeFeatures`, that are already supported by Polkadot.

## Description
This PR removes unnecessary runtime API version checks from
`subsystem-util/src/runtime` for APIs supported by Polkadot (the most
recent network to upgrade). Specifically, it applies to the
`DisabledValidators`, `MinimumBackingVotes` and `NodeFeatures` APIs.

---------

Co-authored-by: Bastian Köcher <[email protected]>

* Bump openssl from 0.10.64 to 0.10.70 (paritytech#7442)

Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.64
to 0.10.70.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sfackler/rust-openssl/releases">openssl's
releases</a>.</em></p>
<blockquote>
<h2>openssl v0.10.70</h2>
<h2>What's Changed</h2>
<ul>
<li>Attempt to fix CI by pinning to the Ubuntu 22.04 image by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2357">sfackler/rust-openssl#2357</a></li>
<li>Remove EC_METHOD and EC_GROUP_new for LibreSSL 4.1 by <a
href="https://github.com/botovq"><code>@​botovq</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2356">sfackler/rust-openssl#2356</a></li>
<li>Test against 3.4.0 final release by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2359">sfackler/rust-openssl#2359</a></li>
<li>Expose <code>SslMethod::{dtls_client,dtls_server}</code> by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2358">sfackler/rust-openssl#2358</a></li>
<li>Fix lifetimes in ssl::select_next_proto by <a
href="https://github.com/sfackler"><code>@​sfackler</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2360">sfackler/rust-openssl#2360</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.69...openssl-v0.10.70">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.69...openssl-v0.10.70</a></p>
<h2>openssl v0.10.69</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps): Update <code>openssl-macro</code> to version
<code>0.1.1</code> by <a
href="https://github.com/caspermeijn"><code>@​caspermeijn</code></a> in
<a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2324">sfackler/rust-openssl#2324</a></li>
<li>Enable set_alpn_select_callback for BoringSSL by <a
href="https://github.com/ViktoriiaKovalova"><code>@​ViktoriiaKovalova</code></a>
in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2327">sfackler/rust-openssl#2327</a></li>
<li>Switch the test to use prime256v1 based key by <a
href="https://github.com/dcermak"><code>@​dcermak</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2330">sfackler/rust-openssl#2330</a></li>
<li>Expose EVP_DigestSqueeze from Hasher by <a
href="https://github.com/initsecret"><code>@​initsecret</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2275">sfackler/rust-openssl#2275</a></li>
<li>Expose SSL_CTX_load_verify_locations by <a
href="https://github.com/sfackler"><code>@​sfackler</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2353">sfackler/rust-openssl#2353</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/caspermeijn"><code>@​caspermeijn</code></a>
made their first contribution in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2324">sfackler/rust-openssl#2324</a></li>
<li><a
href="https://github.com/ViktoriiaKovalova"><code>@​ViktoriiaKovalova</code></a>
made their first contribution in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2327">sfackler/rust-openssl#2327</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.69">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.69</a></p>
<h2>openssl-v0.10.68</h2>
<h2>What's Changed</h2>
<ul>
<li>fixes <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2317">#2317</a>
-- restore compatibility with our MSRV and release openssl 0.9.68 by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2318">sfackler/rust-openssl#2318</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.67...openssl-v0.10.68">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.67...openssl-v0.10.68</a></p>
<h2>openssl-v0.10.67</h2>
<h2>What's Changed</h2>
<ul>
<li>Added a utility function to ensure we never have an issue with
0-length slices from pointers again by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2268">sfackler/rust-openssl#2268</a></li>
<li>Fix CI for the latest rustc by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2271">sfackler/rust-openssl#2271</a></li>
<li>Add binding for EVP_DigestSqueeze by <a
href="https://github.com/initsecret"><code>@​initsecret</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2270">sfackler/rust-openssl#2270</a></li>
<li>libressl 4.0: const correctness for X509_LOOKUP_METHOD by <a
href="https://github.com/botovq"><code>@​botovq</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2276">sfackler/rust-openssl#2276</a></li>
<li>Bump hex dev-dependency version by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2277">sfackler/rust-openssl#2277</a></li>
<li>Raise bindgen version by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2278">sfackler/rust-openssl#2278</a></li>
<li>Ensure Rsa::check_key doesn't leave errors on the stack by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2279">sfackler/rust-openssl#2279</a></li>
<li>Update some docs to use the corresponds macro by <a
href="https://github.com/rushilmehra"><code>@​rushilmehra</code></a> in
<a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2282">sfackler/rust-openssl#2282</a></li>
<li>Don't leave errors on the stack in
<code>MdCtxRef::digest_verify_final</code> by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2283">sfackler/rust-openssl#2283</a></li>
<li>Adjustments for LibreSSL 4 by <a
href="https://github.com/botovq"><code>@​botovq</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2287">sfackler/rust-openssl#2287</a></li>
<li>Explicit rustfmt config by <a
href="https://github.com/kornelski"><code>@​kornelski</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2285">sfackler/rust-openssl#2285</a></li>
<li>add basic EVP_KDF bindings by <a
href="https://github.com/reaperhulk"><code>@​reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2289">sfackler/rust-openssl#2289</a></li>
<li>add ossl3 thread pool bindings by <a
href="https://github.com/reaperhulk"><code>@​reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2293">sfackler/rust-openssl#2293</a></li>
<li>add argon2id support for ossl 3.2+ by <a
href="https://github.com/reaperhulk"><code>@​reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2290">sfackler/rust-openssl#2290</a></li>
<li>fix 3.2.0 thread support and simplify by <a
href="https://github.com/reaperhulk"><code>@​reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2294">sfackler/rust-openssl#2294</a></li>
<li>add libctx arg to argon2id by <a
href="https://github.com/reaperhulk"><code>@​reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2295">sfackler/rust-openssl#2295</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/a4d399b0f1a3694cb2d1728edf74d318a3cac890"><code>a4d399b</code></a>
Release openssl v0.10.70</li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/c9a33e286023f92b869c5f157b349be15985a799"><code>c9a33e2</code></a>
Release openssl-sys v0.9.105</li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/f014afb230de4d77bc79dea60e7e58c2f47b60f2"><code>f014afb</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2360">#2360</a>
from sfackler/fix-alpn-lifetimes</li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/8e6e30bbf7e7627845b801f83a3810d6ffc1f157"><code>8e6e30b</code></a>
Fix lifetimes in ssl::select_next_proto</li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/1aff2801ca1dd756a0566a4d4fa9a00967280114"><code>1aff280</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2358">#2358</a>
from alex/expose-dlts</li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/16ca5b278b99bb667321b4d88da230ee8f820e08"><code>16ca5b2</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2359">#2359</a>
from sfackler/alex-patch-1</li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/4c9fbb0c18e8a3ac1de9671d7828862b49c1cb87"><code>4c9fbb0</code></a>
Test against 3.4.0 final release</li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/5ecb31d3fd252c54dbae5e0b5b7ad495b26ac339"><code>5ecb31d</code></a>
Update openssl/src/ssl/mod.rs</li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/4830f5bb93dafeeeddf32bf41dda83e2560f3d49"><code>4830f5b</code></a>
Expose <code>SslMethod::{dtls_client,dtls_server}</code></li>
<li><a
href="https://github.com/sfackler/rust-openssl/commit/bab03c4093ef626c9564354ae7c2484f4f9ad6a9"><code>bab03c4</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2356">#2356</a>
from botovq/rm-ec-method</li>
<li>Additional commits viewable in <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.64...openssl-v0.10.70">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=openssl&package-manager=cargo&previous-version=0.10.64&new-version=0.10.70)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR 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)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/paritytech/polkadot-sdk/network/alerts).

</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bastian Köcher <[email protected]>

* Refactor backport flow

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: seemantaggarwal <[email protected]>
Co-authored-by: Sebastian Kunert <[email protected]>
Co-authored-by: Stephane Gurgenidze <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ordian added a commit that referenced this pull request Apr 28, 2025
* master: (26 commits)
  Snowbridge V2 (#7402)
  [AHM] Revert multi-block election, slashing and staking client pallets (#7939)
  docs: update local ci execution instruction (#8003)
  Upgrade deps to eliminate ancient dependencies (#7999)
  Removed `pallet:getter` from XCM pallets (#7916)
  Add digest processor xcm emulator (#7915)
  Fix: [Referenda Tracks] Resolve representation issues that are breaking PJS apps (#7671)
  Improve XCMP weight metering (#7963)
  bump version of zombienet-sdk (#7964)
  rpc-v2/archive: Rename archive call method result to value (#7885)
  Bump parachains runtime api to 13 (#7981)
  `bp-runtime`: make macro expansion not rely on `sp-std` in scope. (#7978)
  [CI/CD] Refactor backports flow so that it can determine automatically where to do a backport based on labels (#7976)
  Treasury: update expire date on payout (#7958) (#7959)
  `fatxpool`: report_invalid: do not ban Future/Stale txs from re-entering the view (#7777)
  Fix XCM Barrier Rejection Handling to Return Incomplete with Weight (#7843)
  Bump openssl from 0.10.64 to 0.10.70 (#7442)
  runtime-api: remove redundant version checks (#7610)
  Upgrade link-checker cache to v4 (#7874)
  Updating readmes (#7950)
  ...
Copy link
Copy Markdown
Member

@eskimor eskimor left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”. T4-runtime_API This PR/Issue is related to runtime APIs.

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

Cleanup boilerplate code when DisabledValidators runtime api call is released

6 participants