Skip to content

Commit fe4ea5f

Browse files
committed
Merge branch 'master' into ao-statement-distribution-reenabling-prep
* master: improve MockValidationDataInherentDataProvider to support async backing (#4442) Bump `proc-macro-crate` to the latest version (#4409) [ci] Run check-runtime-migration in GHA (#4441) prospective-parachains rework (#4035) [ci] Add forklift to GHA ARC (#4372) `CheckWeight` SE: Check for extrinsic length + proof size combined (#4326) Add generate and verify logic for `AncestryProof` (#4430) Rococo AH: undeploy trie migration (#4414) Remove `substrate-frame-cli` (#4403) migrations: `take()`should consume read and write operation weight (#4302) `remote-externalities`: store block header in snapshot (#4349) xcm-emlator: Use `BlockNumberFor` instead of `parachains_common::BlockNumber=u32` (#4434) Remove `pallet::getter` usage from authority-discovery pallet (#4091) Remove pallet::getter usage from pallet-contracts-mock-network (#4417) Add docs to request_core_count (#4423)
2 parents 7c4fd62 + 594c3ed commit fe4ea5f

File tree

89 files changed

+5194
-4326
lines changed

Some content is hidden

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

89 files changed

+5194
-4326
lines changed

.config/lychee.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ exclude = [
3232
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
3333
"https://github.com/paritytech/substrate/frame/fast-unstake",
3434
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
35+
"https://polkadot-try-runtime-node.parity-chains.parity.io/",
3536
"https://polkadot.network/the-path-of-a-parachain-block/",
3637
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
3738
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",

.forklift/config.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[compression]
2+
type = "zstd"
3+
4+
[compression.zstd]
5+
compressionLevel = 3
6+
7+
[general]
8+
jobNameVariable = "CI_JOB_NAME"
9+
jobsBlackList = []
10+
logLevel = "warn"
11+
threadsCount = 6
12+
13+
[metrics]
14+
enabled = true
15+
pushEndpoint = "placeholder"
16+
17+
[metrics.extraLabels]
18+
environment = "production"
19+
job_name = "$CI_JOB_NAME"
20+
project_name = "$CI_PROJECT_PATH"
21+
22+
[storage]
23+
type = "s3"
24+
25+
[storage.s3]
26+
accessKeyId = "placeholder"
27+
bucketName = "placeholder"
28+
concurrency = 10
29+
endpointUrl = "placeholder"
30+
secretAccessKey = "placeholder"
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: check-runtime-migration
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
merge_group:
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
env:
12+
FORKLIFT_storage_s3_bucketName: ${{ secrets.FORKLIFT_storage_s3_bucketName }}
13+
FORKLIFT_storage_s3_accessKeyId: ${{ secrets.FORKLIFT_storage_s3_accessKeyId }}
14+
FORKLIFT_storage_s3_secretAccessKey: ${{ secrets.FORKLIFT_storage_s3_secretAccessKey }}
15+
FORKLIFT_storage_s3_endpointUrl: ${{ secrets.FORKLIFT_storage_s3_endpointUrl }}
16+
FORKLIFT_metrics_pushEndpoint: ${{ secrets.FORKLIFT_metrics_pushEndpoint }}
17+
18+
jobs:
19+
set-image:
20+
# GitHub Actions allows using 'env' in a container context.
21+
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
22+
# This workaround sets the container image for each job using 'set-image' job output.
23+
runs-on: ubuntu-latest
24+
outputs:
25+
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
- id: set_image
30+
run: cat .github/env >> $GITHUB_OUTPUT
31+
# rococo and westend are disabled for now (no access to parity-chains.parity.io)
32+
check-runtime-migration:
33+
runs-on: arc-runners-polkadot-sdk-beefy
34+
timeout-minutes: 30
35+
needs: [set-image]
36+
container:
37+
image: ${{ needs.set-image.outputs.IMAGE }}
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
network: [
42+
# westend,
43+
# rococo,
44+
asset-hub-westend,
45+
asset-hub-rococo,
46+
bridge-hub-westend,
47+
bridge-hub-rococo,
48+
contracts-rococo,
49+
collectives-westend,
50+
coretime-rococo,
51+
]
52+
include:
53+
# - network: westend
54+
# package: westend-runtime
55+
# wasm: westend_runtime.compact.compressed.wasm
56+
# uri: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
57+
# subcommand_extra_args: "--no-weight-warnings"
58+
# command_extra_args: ""
59+
# - network: rococo
60+
# package: rococo-runtime
61+
# wasm: rococo_runtime.compact.compressed.wasm
62+
# uri: "wss://rococo-try-runtime-node.parity-chains.parity.io:443"
63+
# subcommand_extra_args: "--no-weight-warnings"
64+
# command_extra_args: ""
65+
- network: asset-hub-westend
66+
package: asset-hub-westend-runtime
67+
wasm: asset_hub_westend_runtime.compact.compressed.wasm
68+
uri: "wss://westend-asset-hub-rpc.polkadot.io:443"
69+
subcommand_extra_args: ""
70+
command_extra_args: ""
71+
- network: "asset-hub-rococo"
72+
package: "asset-hub-rococo-runtime"
73+
wasm: "asset_hub_rococo_runtime.compact.compressed.wasm"
74+
uri: "wss://rococo-asset-hub-rpc.polkadot.io:443"
75+
subcommand_extra_args: ""
76+
command_extra_args: ""
77+
- network: "bridge-hub-westend"
78+
package: "bridge-hub-westend-runtime"
79+
wasm: "bridge_hub_westend_runtime.compact.compressed.wasm"
80+
uri: "wss://westend-bridge-hub-rpc.polkadot.io:443"
81+
- network: "bridge-hub-rococo"
82+
package: "bridge-hub-rococo-runtime"
83+
wasm: "bridge_hub_rococo_runtime.compact.compressed.wasm"
84+
uri: "wss://rococo-bridge-hub-rpc.polkadot.io:443"
85+
- network: "contracts-rococo"
86+
package: "contracts-rococo-runtime"
87+
wasm: "contracts_rococo_runtime.compact.compressed.wasm"
88+
uri: "wss://rococo-contracts-rpc.polkadot.io:443"
89+
- network: "collectives-westend"
90+
package: "collectives-westend-runtime"
91+
wasm: "collectives_westend_runtime.compact.compressed.wasm"
92+
uri: "wss://westend-collectives-rpc.polkadot.io:443"
93+
command_extra_args: "--disable-spec-name-check"
94+
- network: "coretime-rococo"
95+
package: "coretime-rococo-runtime"
96+
wasm: "coretime_rococo_runtime.compact.compressed.wasm"
97+
uri: "wss://rococo-coretime-rpc.polkadot.io:443"
98+
steps:
99+
- name: Checkout
100+
uses: actions/checkout@v4
101+
- name: script
102+
run: |
103+
echo "Running ${{ matrix.network }} runtime migration check"
104+
export RUST_LOG=remote-ext=debug,runtime=debug
105+
106+
echo "---------- Downloading try-runtime CLI ----------"
107+
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime
108+
chmod +x ./try-runtime
109+
echo "Using try-runtime-cli version:"
110+
./try-runtime --version
111+
112+
echo "---------- Building ${{ matrix.package }} runtime ----------"
113+
time forklift cargo build --release --locked -p ${{ matrix.package }} --features try-runtime
114+
115+
echo "---------- Executing on-runtime-upgrade for ${{ matrix.network }} ----------"
116+
time ./try-runtime ${{ matrix.command_extra_args }} \
117+
--runtime ./target/release/wbuild/${{ matrix.package }}/${{ matrix.wasm }} \
118+
on-runtime-upgrade --disable-spec-version-check --checks=all ${{ matrix.subcommand_extra_args }} live --uri ${{ matrix.uri }}
119+
sleep 5

.github/workflows/quick-checks.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
# GitHub Actions allows using 'env' in a container context.
1515
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
1616
# This workaround sets the container image for each job using 'set-image' job output.
17-
runs-on: arc-runners-polkadot-sdk-default
17+
runs-on: arc-runners-polkadot-sdk
1818
timeout-minutes: 10
1919
outputs:
2020
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
@@ -24,7 +24,7 @@ jobs:
2424
- id: set_image
2525
run: cat .github/env >> $GITHUB_OUTPUT
2626
fmt:
27-
runs-on: arc-runners-polkadot-sdk-default
27+
runs-on: arc-runners-polkadot-sdk
2828
timeout-minutes: 10
2929
needs: [set-image]
3030
container:
@@ -34,7 +34,7 @@ jobs:
3434
- name: Cargo fmt
3535
run: cargo +nightly fmt --all -- --check
3636
check-dependency-rules:
37-
runs-on: arc-runners-polkadot-sdk-default
37+
runs-on: arc-runners-polkadot-sdk
3838
timeout-minutes: 10
3939
needs: [set-image]
4040
container:
@@ -46,8 +46,7 @@ jobs:
4646
cd substrate/
4747
../.gitlab/ensure-deps.sh
4848
check-rust-feature-propagation:
49-
runs-on: arc-runners-polkadot-sdk-default
50-
# runs-on: ubuntu-latest
49+
runs-on: arc-runners-polkadot-sdk
5150
timeout-minutes: 10
5251
needs: [set-image]
5352
container:
@@ -57,8 +56,7 @@ jobs:
5756
- name: run zepter
5857
run: zepter run check
5958
test-rust-features:
60-
runs-on: arc-runners-polkadot-sdk-default
61-
# runs-on: ubuntu-latest
59+
runs-on: arc-runners-polkadot-sdk
6260
timeout-minutes: 10
6361
needs: [set-image]
6462
container:
@@ -68,7 +66,7 @@ jobs:
6866
- name: run rust features
6967
run: bash .gitlab/rust-features.sh .
7068
check-toml-format:
71-
runs-on: arc-runners-polkadot-sdk-default
69+
runs-on: arc-runners-polkadot-sdk
7270
timeout-minutes: 10
7371
needs: [set-image]
7472
container:

.github/workflows/test-github-actions.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
merge_group:
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
env:
12+
FORKLIFT_storage_s3_bucketName: ${{ secrets.FORKLIFT_storage_s3_bucketName }}
13+
FORKLIFT_storage_s3_accessKeyId: ${{ secrets.FORKLIFT_storage_s3_accessKeyId }}
14+
FORKLIFT_storage_s3_secretAccessKey: ${{ secrets.FORKLIFT_storage_s3_secretAccessKey }}
15+
FORKLIFT_storage_s3_endpointUrl: ${{ secrets.FORKLIFT_storage_s3_endpointUrl }}
16+
FORKLIFT_metrics_pushEndpoint: ${{ secrets.FORKLIFT_metrics_pushEndpoint }}
17+
18+
jobs:
19+
set-image:
20+
# GitHub Actions allows using 'env' in a container context.
21+
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
22+
# This workaround sets the container image for each job using 'set-image' job output.
23+
runs-on: ubuntu-latest
24+
outputs:
25+
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
- id: set_image
30+
run: cat .github/env >> $GITHUB_OUTPUT
31+
test-linux-stable-int:
32+
runs-on: arc-runners-polkadot-sdk-beefy
33+
timeout-minutes: 30
34+
needs: [set-image]
35+
container:
36+
image: ${{ needs.set-image.outputs.IMAGE }}
37+
env:
38+
RUSTFLAGS: "-C debug-assertions -D warnings"
39+
RUST_BACKTRACE: 1
40+
WASM_BUILD_NO_COLOR: 1
41+
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
42+
# Ensure we run the UI tests.
43+
RUN_UI_TESTS: 1
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
- name: script
48+
run: WASM_BUILD_NO_COLOR=1 time forklift cargo test -p staging-node-cli --release --locked -- --ignored
49+
quick-benchmarks:
50+
runs-on: arc-runners-polkadot-sdk-beefy
51+
timeout-minutes: 30
52+
needs: [set-image]
53+
container:
54+
image: ${{ needs.set-image.outputs.IMAGE }}
55+
env:
56+
RUSTFLAGS: "-C debug-assertions -D warnings"
57+
RUST_BACKTRACE: "full"
58+
WASM_BUILD_NO_COLOR: 1
59+
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
- name: script
64+
run: time forklift cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet
65+
# cf https://github.com/paritytech/polkadot-sdk/issues/1652
66+
test-syscalls:
67+
runs-on: arc-runners-polkadot-sdk-beefy
68+
timeout-minutes: 30
69+
needs: [set-image]
70+
container:
71+
image: ${{ needs.set-image.outputs.IMAGE }}
72+
continue-on-error: true # this rarely triggers in practice
73+
env:
74+
SKIP_WASM_BUILD: 1
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
- name: script
79+
run: |
80+
forklift cargo build --locked --profile production --target x86_64-unknown-linux-musl --bin polkadot-execute-worker --bin polkadot-prepare-worker
81+
cd polkadot/scripts/list-syscalls
82+
./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-execute-worker --only-used-syscalls | diff -u execute-worker-syscalls -
83+
./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-prepare-worker --only-used-syscalls | diff -u prepare-worker-syscalls -
84+
# todo:
85+
# after_script:
86+
# - if [[ "$CI_JOB_STATUS" == "failed" ]]; then
87+
# 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";
88+
# fi
89+
cargo-check-all-benches:
90+
runs-on: arc-runners-polkadot-sdk-beefy
91+
timeout-minutes: 30
92+
needs: [set-image]
93+
container:
94+
image: ${{ needs.set-image.outputs.IMAGE }}
95+
env:
96+
SKIP_WASM_BUILD: 1
97+
steps:
98+
- name: Checkout
99+
uses: actions/checkout@v4
100+
- name: script
101+
run: time forklift cargo check --all --benches

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ default:
120120
.forklift-cache:
121121
before_script:
122122
- mkdir ~/.forklift
123-
- cp $FL_FORKLIFT_CONFIG ~/.forklift/config.toml
123+
- cp .forklift/config.toml ~/.forklift/config.toml
124124
- >
125125
if [ "$FORKLIFT_BYPASS" != "true" ]; then
126126
echo "FORKLIFT_BYPASS not set";

0 commit comments

Comments
 (0)