Skip to content

Commit a954ca5

Browse files
committed
Merge branch 'master' into tsv-disabling
2 parents f2d4c48 + f3073d8 commit a954ca5

File tree

1,026 files changed

+21539
-50657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,026 files changed

+21539
-50657
lines changed

.cargo/config.toml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
22
rustdocflags = [
3-
"-Dwarnings",
4-
"-Arustdoc::redundant_explicit_links", # stylistic
3+
"-Dwarnings",
4+
"-Arustdoc::redundant_explicit_links", # stylistic
55
]
66

77
# An auto defined `clippy` feature was introduced,
@@ -12,30 +12,30 @@ rustdocflags = [
1212
# RUSTFLAGS= cargo clippy
1313
[target.'cfg(feature = "cargo-clippy")']
1414
rustflags = [
15-
"-Aclippy::all",
16-
"-Dclippy::correctness",
17-
"-Aclippy::if-same-then-else",
18-
"-Asuspicious_double_ref_op",
19-
"-Dclippy::complexity",
20-
"-Aclippy::zero-prefixed-literal", # 00_1000_000
21-
"-Aclippy::type_complexity", # raison d'etre
22-
"-Aclippy::nonminimal-bool", # maybe
23-
"-Aclippy::borrowed-box", # Reasonable to fix this one
24-
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
25-
"-Aclippy::unnecessary_cast", # Types may change
26-
"-Aclippy::identity-op", # One case where we do 0 +
27-
"-Aclippy::useless_conversion", # Types may change
28-
"-Aclippy::unit_arg", # styalistic.
29-
"-Aclippy::option-map-unit-fn", # styalistic
30-
"-Aclippy::bind_instead_of_map", # styalistic
31-
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
32-
"-Aclippy::eq_op", # In tests we test equality.
33-
"-Aclippy::while_immutable_condition", # false positives
34-
"-Aclippy::needless_option_as_deref", # false positives
35-
"-Aclippy::derivable_impls", # false positives
36-
"-Aclippy::stable_sort_primitive", # prefer stable sort
37-
"-Aclippy::extra-unused-type-parameters", # stylistic
38-
"-Aclippy::default_constructed_unit_structs", # stylistic
15+
"-Aclippy::all",
16+
"-Dclippy::correctness",
17+
"-Aclippy::if-same-then-else",
18+
"-Asuspicious_double_ref_op",
19+
"-Dclippy::complexity",
20+
"-Aclippy::zero-prefixed-literal", # 00_1000_000
21+
"-Aclippy::type_complexity", # raison d'etre
22+
"-Aclippy::nonminimal-bool", # maybe
23+
"-Aclippy::borrowed-box", # Reasonable to fix this one
24+
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
25+
"-Aclippy::unnecessary_cast", # Types may change
26+
"-Aclippy::identity-op", # One case where we do 0 +
27+
"-Aclippy::useless_conversion", # Types may change
28+
"-Aclippy::unit_arg", # styalistic.
29+
"-Aclippy::option-map-unit-fn", # styalistic
30+
"-Aclippy::bind_instead_of_map", # styalistic
31+
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
32+
"-Aclippy::eq_op", # In tests we test equality.
33+
"-Aclippy::while_immutable_condition", # false positives
34+
"-Aclippy::needless_option_as_deref", # false positives
35+
"-Aclippy::derivable_impls", # false positives
36+
"-Aclippy::stable_sort_primitive", # prefer stable sort
37+
"-Aclippy::extra-unused-type-parameters", # stylistic
38+
"-Aclippy::default_constructed_unit_structs", # stylistic
3939
]
4040

4141
[env]

.config/lychee.toml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,36 @@ accept = [
1515
200,
1616

1717
# Rate limited - GitHub likes to throw this.
18-
429
18+
429,
1919
]
2020

21-
exclude_path = [ "./target" ]
21+
exclude_path = ["./target"]
2222

2323
exclude = [
24-
# Place holders (no need to fix these):
25-
"http://visitme/",
26-
"https://visitme/",
27-
28-
# TODO <https://github.com/paritytech/polkadot-sdk/issues/134>
29-
"https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs",
30-
"https://docs.substrate.io/rustdocs/latest/sp_api/macro.decl_runtime_apis.html",
31-
"https://github.com/ipfs/js-ipfs-bitswap/blob/",
32-
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
33-
"https://github.com/paritytech/substrate/frame/fast-unstake",
34-
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
35-
"https://polkadot.network/the-path-of-a-parachain-block/",
36-
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
37-
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html",
38-
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html#-6.-practical-results",
39-
"https://research.web3.foundation/en/latest/polkadot/networking/3-avail-valid.html#topology",
40-
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
41-
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html",
42-
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#inflation-model",
43-
"https://research.web3.foundation/en/latest/polkadot/slashing/npos.html",
44-
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
45-
"https://rpc.polkadot.io/",
46-
"https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html",
47-
"https://w3f.github.io/parachain-implementers-guide/node/index.html",
48-
"https://w3f.github.io/parachain-implementers-guide/protocol-chain-selection.html",
49-
"https://w3f.github.io/parachain-implementers-guide/runtime/session_info.html",
24+
# Place holders (no need to fix these):
25+
"http://visitme/",
26+
"https://visitme/",
27+
28+
# TODO <https://github.com/paritytech/polkadot-sdk/issues/134>
29+
"https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs",
30+
"https://docs.substrate.io/rustdocs/latest/sp_api/macro.decl_runtime_apis.html",
31+
"https://github.com/ipfs/js-ipfs-bitswap/blob/",
32+
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
33+
"https://github.com/paritytech/substrate/frame/fast-unstake",
34+
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
35+
"https://polkadot.network/the-path-of-a-parachain-block/",
36+
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
37+
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
38+
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
39+
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html",
40+
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html#-6.-practical-results",
41+
"https://research.web3.foundation/en/latest/polkadot/networking/3-avail-valid.html#topology",
42+
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html",
43+
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#inflation-model",
44+
"https://research.web3.foundation/en/latest/polkadot/slashing/npos.html",
45+
"https://rpc.polkadot.io/",
46+
"https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html",
47+
"https://w3f.github.io/parachain-implementers-guide/node/index.html",
48+
"https://w3f.github.io/parachain-implementers-guide/protocol-chain-selection.html",
49+
"https://w3f.github.io/parachain-implementers-guide/runtime/session_info.html",
5050
]

.config/taplo.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# all options https://taplo.tamasfe.dev/configuration/formatter-options.html
2+
3+
# ignore zombienet as they do some deliberate custom toml stuff
4+
exclude = [
5+
"cumulus/zombienet/**",
6+
"polkadot/node/malus/integrationtests/**",
7+
"polkadot/zombienet_tests/**",
8+
"substrate/zombienet/**",
9+
]
10+
11+
# global rules
12+
[formatting]
13+
reorder_arrays = true
14+
inline_table_expand = false
15+
array_auto_expand = false
16+
array_auto_collapse = false
17+
indent_string = " " # tab
18+
19+
# don't re-order order-dependent deb package metadata
20+
[[rule]]
21+
include = ["polkadot/Cargo.toml"]
22+
keys = ["package.metadata.deb"]
23+
24+
[rule.formatting]
25+
reorder_arrays = false
26+
27+
# don't re-order order-dependent rustflags
28+
[[rule]]
29+
include = [".cargo/config.toml"]
30+
keys = ["build", "target.'cfg(feature = \"cargo-clippy\")'"]
31+
32+
[rule.formatting]
33+
reorder_arrays = false

.config/zepter.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,15 @@ workflows:
1919
'--left-side-outside-workspace=ignore',
2020
# Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used.
2121
'--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking',
22-
# Actually modify the files and not just report the issues:
22+
# Auxillary flags:
2323
'--offline',
2424
'--locked',
2525
'--show-path',
2626
'--quiet',
2727
]
28-
# Format the features into canonical format:
29-
- ['format', 'features', '--offline', '--locked', '--quiet']
3028
# Same as `check`, but with the `--fix` flag.
3129
default:
3230
- [ $check.0, '--fix' ]
33-
- [ $check.1, '--fix' ]
3431

3532
# Will be displayed when any workflow fails:
3633
help:

.github/review-bot.yml

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
rules:
22
- name: CI files
3+
countAuthor: true
34
condition:
4-
include:
5+
include:
56
- ^\.gitlab-ci\.yml
67
- ^docker/.*
78
- ^\.github/.*
89
- ^\.gitlab/.*
910
- ^\.config/nextest.toml
1011
- ^\.cargo/.*
11-
exclude:
12+
exclude:
1213
- ^\.gitlab/pipeline/zombienet.*
13-
minApprovals: 2
14-
type: basic
15-
teams:
16-
- ci
17-
- release-engineering
14+
type: "or"
15+
reviewers:
16+
- minApprovals: 2
17+
teams:
18+
- ci
19+
- minApprovals: 2
20+
teams:
21+
- core-devs
1822

1923
- name: Audit rules
2024
type: basic
2125
condition:
22-
include:
23-
- ^polkadot/runtime\/(kusama|polkadot|common)\/.*
26+
include:
27+
- ^polkadot/runtime/common/.*
2428
- ^polkadot/primitives/src\/.+\.rs$
2529
- ^substrate/primitives/.*
2630
- ^substrate/frame/.*
27-
exclude:
28-
- ^polkadot/runtime\/(kusama|polkadot)\/src\/weights\/.+\.rs$
31+
exclude:
2932
- ^substrate\/frame\/.+\.md$
3033
minApprovals: 1
3134
allowedToSkipRule:
@@ -41,13 +44,8 @@ rules:
4144
- .*
4245
# excluding files from 'Runtime files' and 'CI files' rules
4346
exclude:
44-
- ^polkadot/runtime/(kusama|polkadot)/src/[^/]+\.rs$
45-
- ^cumulus/parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$
46-
- ^cumulus/parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$
47-
- ^cumulus/parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$
4847
- ^cumulus/parachains/common/src/[^/]+\.rs$
4948
- ^substrate/frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
50-
- ^polkadot/runtime/(kusama|polkadot)/src/[^/]+\.rs$
5149
- ^\.gitlab-ci\.yml
5250
- ^docker/.*
5351
- ^\.github/.*
@@ -59,39 +57,20 @@ rules:
5957
teams:
6058
- core-devs
6159

62-
# cumulus
63-
- name: Runtime files cumulus
64-
countAuthor: true
65-
condition:
66-
include:
67-
- ^cumulus/parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$
68-
- ^cumulus/parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$
69-
- ^cumulus/parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$
70-
- ^cumulus/parachains/common/src/[^/]+\.rs$
71-
type: and-distinct
72-
reviewers:
73-
- minApprovals: 1
74-
teams:
75-
- locks-review
76-
- minApprovals: 1
77-
teams:
78-
- polkadot-review
79-
8060
# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo)
8161
- name: Bridges subtree files
8262
type: basic
83-
condition:
63+
condition:
8464
include:
8565
- ^bridges/.*
8666
minApprovals: 1
8767
teams:
8868
- bridges-core
8969

9070
# substrate
91-
9271
- name: FRAME coders substrate
9372
condition:
94-
include:
73+
include:
9574
- ^substrate/frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
9675
type: "and"
9776
reviewers:
@@ -104,8 +83,9 @@ rules:
10483

10584
# Protection of THIS file
10685
- name: Review Bot
86+
countAuthor: true
10787
condition:
108-
include:
88+
include:
10989
- review-bot\.yml
11090
type: "and"
11191
reviewers:
@@ -115,9 +95,6 @@ rules:
11595
- minApprovals: 1
11696
teams:
11797
- locks-review
118-
- minApprovals: 1
119-
teams:
120-
- ci
12198

12299
preventReviewRequests:
123100
teams:

.github/scripts/common/lib.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,41 @@ function check_gpg() {
264264
echo "Checking GPG Signature for $1"
265265
gpg --no-tty --verify -q $1.asc $1
266266
}
267+
268+
# GITHUB_REF will typically be like:
269+
# - refs/heads/release-v1.2.3
270+
# - refs/heads/release-polkadot-v1.2.3-rc2
271+
# This function extracts the version
272+
function get_version_from_ghref() {
273+
GITHUB_REF=$1
274+
stripped=${GITHUB_REF#refs/heads/release-}
275+
re="v([0-9]+\.[0-9]+\.[0-9]+)"
276+
if [[ $stripped =~ $re ]]; then
277+
echo ${BASH_REMATCH[0]};
278+
return 0
279+
else
280+
return 1
281+
fi
282+
}
283+
284+
# Get latest rc tag based on the release version and product
285+
function get_latest_rc_tag() {
286+
version=$1
287+
product=$2
288+
289+
if [[ "$product" == "polkadot" ]]; then
290+
last_rc=$(git tag -l "$version-rc*" | sort -V | tail -n 1)
291+
elif [[ "$product" == "polkadot-parachain" ]]; then
292+
last_rc=$(git tag -l "polkadot-parachains-$version-rc*" | sort -V | tail -n 1)
293+
fi
294+
echo "${last_rc}"
295+
}
296+
297+
# Increment rc tag number based on the value of a suffix of the current rc tag
298+
function increment_rc_tag() {
299+
last_rc=$1
300+
301+
suffix=$(echo "$last_rc" | grep -Eo '[0-9]+$')
302+
((suffix++))
303+
echo $suffix
304+
}

.github/workflows/check-licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99

1010
jobs:
1111
check-licenses:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-latest
1313
env:
1414
LICENSES: "'Apache-2.0' 'GPL-3.0-only' 'GPL-3.0-or-later WITH Classpath-exception-2.0'"
1515
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)