Skip to content

Commit 93936fa

Browse files
committed
Merge branch 'tsv-disabling' into ao-disabling-statement-distribution
* tsv-disabling: (39 commits) Handling of disabled validators in backing subsystem (#1259) Switch trie cache random seed (#1935) Expose prometheus metrics for minimal-relay-chain node in collators (#1942) Do not force collators to update after enabling async backing (#1920) Pin PRDoc image to v0.0.5 until we are ready for v0.0.6 (#1947) [prdoc] Start BEEFY gadget by default for Polkadot nodes (#1945) Update bridges subtree (#1944) bump zombienet version (#1931) [FRAME] Message Queue use proper overweight limit (#1873) Cumulus: Allow aura to use initialized collation request receiver (#1911) Use prebuilt try-runtime binary in CI (#1898) Update kusama/polkadot bootnodes (#1895) Introduce XcmFeesToAccount fee manager (#1234) upgraded review bot to v2.1.0 (#1908) Trading trait and deal with metadata in Mutate trait for nonfungibles_v2 (#1561) Add Runtime Missing Crate Descriptions (#1909) Switch to the release env (#1910) Bump paritytech/review-bot from 2.0.1 to 2.1.0 (#1924) Bump actions/checkout from 4.1.0 to 4.1.1 (#1925) Start BEEFY client by default for Polkadot nodes (#1913) ...
2 parents b9a1a68 + 913232a commit 93936fa

File tree

275 files changed

+19429
-1707
lines changed

Some content is hidden

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

275 files changed

+19429
-1707
lines changed

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@ rustflags = [
3737
"-Aclippy::extra-unused-type-parameters", # stylistic
3838
"-Aclippy::default_constructed_unit_structs", # stylistic
3939
]
40+
41+
[env]
42+
# Needed for musl builds so user doesn't have to install musl-tools.
43+
CC_x86_64_unknown_linux_musl = { value = ".cargo/musl-gcc", force = true, relative = true }
44+
CXX_x86_64_unknown_linux_musl = { value = ".cargo/musl-g++", force = true, relative = true }

.cargo/musl-g++

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
# Wrapper for building with musl.
4+
#
5+
# See comments for musl-gcc in this repo.
6+
7+
g++ "$@"

.cargo/musl-gcc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
# Wrapper for building with musl.
4+
#
5+
# musl unfortunately requires a musl-enabled C compiler (musl-gcc) to be
6+
# installed, which can be kind of a pain to get installed depending on the
7+
# distro. That's not a very good user experience.
8+
#
9+
# The real musl-gcc wrapper sets the correct system include paths for linking
10+
# with musl libc library. Since this is not actually used to link any binaries
11+
# it should most likely work just fine.
12+
13+
gcc "$@"

.config/lychee.toml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Config file for lychee link checker: <https://github.com/lycheeverse/lychee>
2+
# Run with `lychee -c .config/lychee.toml ./**/*.rs ./**/*.prdoc`
3+
4+
cache = true
5+
max_cache_age = "1d"
6+
max_redirects = 10
7+
max_retries = 6
8+
9+
# Exclude localhost et.al.
10+
exclude_all_private = true
11+
12+
# Treat these codes as success condition:
13+
accept = [
14+
# Ok
15+
200,
16+
17+
# Rate limited - GitHub likes to throw this.
18+
429
19+
]
20+
21+
exclude_path = [ "./target" ]
22+
23+
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",
50+
]

.github/workflows/check-licenses.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1515
steps:
1616
- name: Checkout sources
17-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
17+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1818
- uses: actions/setup-node@v3.8.1
1919
with:
2020
node-version: "18.x"
2121
registry-url: "https://npm.pkg.github.com"
2222
scope: "@paritytech"
23-
23+
2424
- name: Check the licenses in Polkadot
2525
run: |
2626
shopt -s globstar

.github/workflows/check-links.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Check links
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "*.rs"
7+
- "*.prdoc"
8+
- ".github/workflows/check-links.yml"
9+
- ".config/lychee.toml"
10+
types: [opened, synchronize, reopened, ready_for_review]
11+
12+
permissions:
13+
packages: read
14+
15+
jobs:
16+
link-checker:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Restore lychee cache
20+
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 (7. Sep 2023)
21+
with:
22+
path: .lycheecache
23+
key: cache-lychee-${{ github.sha }}
24+
# This should restore from the most recent one:
25+
restore-keys: cache-lychee-
26+
27+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.0 (22. Sep 2023)
28+
29+
- name: Lychee link checker
30+
uses: lycheeverse/lychee-action@2ac9f030ccdea0033e2510a23a67da2a2da98492 # for v1.8.0 (15. May 2023)
31+
with:
32+
args: >-
33+
--config .config/lychee.toml
34+
--no-progress
35+
'./**/*.rs'
36+
'./**/*.prdoc'
37+
fail: true
38+
env:
39+
# To bypass GitHub rate-limit:
40+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/check-markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout sources
16-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
16+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1717

1818
- uses: actions/setup-node@v3.8.1
1919
with:

.github/workflows/check-prdoc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [labeled, opened, synchronize, unlabeled]
66

77
env:
8-
IMAGE: paritytech/prdoc:latest
8+
IMAGE: paritytech/prdoc:v0.0.5
99
API_BASE: https://api.github.com/repos
1010
REPO: ${{ github.repository }}
1111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -40,7 +40,7 @@ jobs:
4040
4141
- name: Checkout repo
4242
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
43-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
43+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
4444

4545
- name: PRdoc check for PR#${{ github.event.pull_request.number }}
4646
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}

.github/workflows/fmt-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
container:
1717
image: paritytech/ci-unified:bullseye-1.70.0-2023-05-23-v20230706
1818
steps:
19-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
19+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2020

2121
- name: Cargo fmt
2222
run: cargo +nightly fmt --all -- --check

.github/workflows/release-50_publish-docker.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
steps:
8181
- name: Checkout sources
82-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
82+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
8383

8484
#TODO: this step will be needed when automated triggering will work
8585
#this step runs only if the workflow is triggered automatically when new release is published
@@ -114,10 +114,11 @@ jobs:
114114
if: ${{ inputs.binary == 'polkadot-parachain' || inputs.image_type == 'rc' }}
115115
runs-on: ubuntu-latest
116116
needs: fetch-artifacts
117+
environment: release
117118

118119
steps:
119120
- name: Checkout sources
120-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
121+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
121122

122123
- name: Get artifacts from cache
123124
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
@@ -237,9 +238,10 @@ jobs:
237238
if: ${{ inputs.binary == 'polkadot' && inputs.image_type == 'release' }}
238239
runs-on: ubuntu-latest
239240
needs: fetch-latest-debian-package-version
241+
environment: release
240242
steps:
241243
- name: Checkout sources
242-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
244+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
243245

244246
- name: Set up Docker Buildx
245247
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0

.github/workflows/review-bot.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
name: Review PR
1+
name: Review Bot
22
on:
3-
pull_request_target:
3+
workflow_run:
4+
workflows:
5+
- Review-Trigger
46
types:
5-
- opened
6-
- reopened
7-
- synchronize
8-
- review_requested
9-
- review_request_removed
10-
- ready_for_review
11-
pull_request_review:
7+
- completed
128

139
permissions:
1410
contents: read
@@ -17,15 +13,21 @@ jobs:
1713
review-approvals:
1814
runs-on: ubuntu-latest
1915
steps:
16+
- name: Extract content of artifact
17+
id: number
18+
uses: Bullrich/extract-text-from-artifact@v1.0.0
19+
with:
20+
artifact-name: pr_number
2021
- name: Generate token
2122
id: team_token
2223
uses: tibdex/github-app-token@v1
2324
with:
2425
app_id: ${{ secrets.REVIEW_APP_ID }}
2526
private_key: ${{ secrets.REVIEW_APP_KEY }}
2627
- name: "Evaluates PR reviews and assigns reviewers"
27-
uses: paritytech/review-bot@v2.0.1
28+
uses: paritytech/review-bot@v2.1.0
2829
with:
2930
repo-token: ${{ secrets.GITHUB_TOKEN }}
3031
team-token: ${{ steps.team_token.outputs.token }}
3132
checks-token: ${{ steps.team_token.outputs.token }}
33+
pr-number: ${{ steps.number.outputs.content }}

.github/workflows/review-trigger.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Review-Trigger
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- review_requested
10+
- review_request_removed
11+
- ready_for_review
12+
pull_request_review:
13+
14+
jobs:
15+
trigger-review-bot:
16+
runs-on: ubuntu-latest
17+
name: trigger review bot
18+
steps:
19+
- name: Get PR number
20+
env:
21+
PR_NUMBER: ${{ github.event.pull_request.number }}
22+
run: |
23+
echo "Saving PR number: $PR_NUMBER"
24+
mkdir -p ./pr
25+
echo $PR_NUMBER > ./pr/pr_number
26+
- uses: actions/upload-artifact@v3
27+
name: Save PR number
28+
with:
29+
name: pr_number
30+
path: pr/
31+
retention-days: 5

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.env*
66
.idea
77
.local
8+
.lycheecache
89
.vscode
910
.wasm-binaries
1011
*.adoc

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ variables:
3030
RUSTY_CACHIER_COMPRESSION_METHOD: zstd
3131
NEXTEST_FAILURE_OUTPUT: immediate-final
3232
NEXTEST_SUCCESS_OUTPUT: final
33-
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.69"
33+
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.71"
3434
DOCKER_IMAGES_VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}"
3535

3636
default:

.gitlab/pipeline/check.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ cargo-fmt-manifest:
3030
- cargo install zepter --locked --version 0.11.0 -q -f --no-default-features && zepter --version
3131
- echo "👉 Hello developer! If you see this CI check failing then it means that one of the your changes in a Cargo.toml file introduced ill-formatted or unsorted features. Please take a look at 'docs/STYLE_GUIDE.md#manifest-formatting' to find out more."
3232
- zepter format features --check
33-
allow_failure: true # Experimental
3433

3534
# FIXME
3635
.cargo-deny-licenses:
@@ -113,12 +112,16 @@ test-rust-feature-propagation:
113112
script:
114113
- |
115114
export RUST_LOG=remote-ext=debug,runtime=debug
116-
echo "---------- Installing try-runtime-cli ----------"
117-
time cargo install --locked --git https://github.com/paritytech/try-runtime-cli --tag v0.3.0
115+
116+
echo "---------- Downloading try-runtime CLI ----------"
117+
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime
118+
chmod +x ./try-runtime
119+
118120
echo "---------- Building ${PACKAGE} runtime ----------"
119121
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
122+
120123
echo "---------- Executing `on-runtime-upgrade` for ${NETWORK} ----------"
121-
time try-runtime \
124+
time ./try-runtime \
122125
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
123126
on-runtime-upgrade --checks=pre-and-post ${EXTRA_ARGS} live --uri ${URI}
124127

.gitlab/pipeline/short-benchmarks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ short-benchmark-asset-hub-kusama:
5959
variables:
6060
RUNTIME_CHAIN: asset-hub-kusama-dev
6161

62+
short-benchmark-asset-hub-rococo:
63+
<<: *short-bench-cumulus
64+
variables:
65+
RUNTIME_CHAIN: asset-hub-rococo-dev
66+
6267
short-benchmark-asset-hub-westend:
6368
<<: *short-bench-cumulus
6469
variables:

.gitlab/pipeline/test.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ test-rustdoc:
183183
SKIP_WASM_BUILD: 1
184184
script:
185185
- time cargo doc --workspace --all-features --no-deps
186-
allow_failure: true
187186

188187
cargo-check-all-benches:
189188
stage: test
@@ -504,3 +503,23 @@ cargo-hfuzz:
504503
- cargo hfuzz build
505504
- for target in $(cargo read-manifest | jq -r '.targets | .[] | .name'); do
506505
cargo hfuzz run "$target" || { printf "fuzzing failure for %s\n" "$target"; exit 1; }; done
506+
507+
# cf https://github.com/paritytech/polkadot-sdk/issues/1652
508+
test-syscalls:
509+
stage: test
510+
extends:
511+
- .docker-env
512+
- .common-refs
513+
- .run-immediately
514+
variables:
515+
SKIP_WASM_BUILD: 1
516+
script:
517+
- cargo build --locked --profile production --target x86_64-unknown-linux-musl --bin polkadot-execute-worker --bin polkadot-prepare-worker
518+
- cd polkadot/scripts/list-syscalls
519+
- ./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-execute-worker --only-used-syscalls | diff -u execute-worker-syscalls -
520+
- ./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-prepare-worker --only-used-syscalls | diff -u prepare-worker-syscalls -
521+
after_script:
522+
- if [[ "$CI_JOB_STATUS" == "failed" ]]; then
523+
printf "The x86_64 syscalls used by the worker binaries have changed. Please review if this is expected and update polkadot/scripts/list-syscalls/*-worker-syscalls as needed.\n";
524+
fi
525+
allow_failure: true # TODO: remove this once we have an idea how often the syscall lists will change

0 commit comments

Comments
 (0)