Skip to content

Commit ffcb326

Browse files
committed
Merge remote-tracking branch 'origin/master' into oty-bencher-stability
2 parents 36e8144 + 298bf2c commit ffcb326

File tree

1,541 files changed

+34897
-14109
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,541 files changed

+34897
-14109
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.github/scripts/common/lib.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,9 @@ function get_s3_url_base() {
355355
frame-omni-bencher)
356356
printf "https://releases.parity.io/frame-omni-bencher"
357357
;;
358+
eth-rpc)
359+
printf "https://releases.parity.io/eth-rpc"
360+
;;
358361
*)
359362
printf "UNSUPPORTED BINARY $name"
360363
exit 1

.github/scripts/release/release_lib.sh

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ commit_with_message() {
2929
# input: none
3030
# output: list of filtered runtimes
3131
get_filtered_runtimes_list() {
32-
grep_filters=("runtime.*" "test|template|starters|substrate")
32+
grep_filters=("runtime.*" "test|template|starters|substrate|docs")
3333

3434
git grep spec_version: | grep .rs: | grep -e "${grep_filters[0]}" | grep "lib.rs" | grep -vE "${grep_filters[1]}" | cut -d: -f1
3535
}
@@ -91,13 +91,20 @@ function get_spec_version() {
9191
reorder_prdocs() {
9292
VERSION="$1"
9393

94-
printf "[+] ℹ️ Reordering prdocs:"
94+
printf "[+] ℹ️ Reordering prdocs:\n"
9595

9696
VERSION=$(sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/' <<< "$VERSION") #getting reed of the 'v' prefix
97-
mkdir -p "prdoc/$VERSION"
98-
mv prdoc/pr_*.prdoc prdoc/$VERSION
99-
git add -A
100-
commit_with_message "Reordering prdocs for the release $VERSION"
97+
98+
# Check if there are any prdoc files to move
99+
if ls prdoc/pr_*.prdoc 1> /dev/null 2>&1; then
100+
mkdir -p "prdoc/$VERSION"
101+
mv prdoc/pr_*.prdoc prdoc/$VERSION
102+
git add -A
103+
commit_with_message "Reordering prdocs for the release $VERSION"
104+
echo "✅ Successfully reordered prdocs"
105+
else
106+
echo "⚠️ No prdoc files found to reorder"
107+
fi
101108
}
102109

103110
# Bump the binary version of the polkadot-parachain binary with the
@@ -204,3 +211,50 @@ function get_s3_url_base() {
204211
;;
205212
esac
206213
}
214+
215+
# Bump spec_version in a runtime file based on release type
216+
# For patch release: bump last 3 digits (patch part) by 1
217+
# For new stable release: bump middle part (minor) by 1, reset patch to 0
218+
#
219+
# input:
220+
# - file: path to the runtime file
221+
# - is_patch_release: "true" for patch release, "false" for new stable
222+
# output: prints the new spec_version, modifies file in place
223+
bump_spec_version() {
224+
local file=$1
225+
local is_patch_release=$2
226+
227+
# Extract current spec_version from file (format: X_YYY_ZZZ)
228+
local current_spec=$(grep -oP 'spec_version:\s*\K[0-9]+_[0-9]+_[0-9]+' "$file" | head -1)
229+
230+
if [ -z "$current_spec" ]; then
231+
echo "⚠️ Warning: Could not find spec_version in $file"
232+
return 1
233+
fi
234+
235+
# Parse the spec_version (format: X_YYY_ZZZ)
236+
local major=$(echo "$current_spec" | cut -d'_' -f1)
237+
local minor=$(echo "$current_spec" | cut -d'_' -f2)
238+
local patch=$(echo "$current_spec" | cut -d'_' -f3)
239+
240+
# Remove leading zeros for arithmetic
241+
minor=$((10#$minor))
242+
patch=$((10#$patch))
243+
244+
if [ "$is_patch_release" = "true" ]; then
245+
# Patch release: bump patch part by 1
246+
patch=$((patch + 1))
247+
else
248+
# New stable release: bump minor by 1, reset patch to 0
249+
minor=$((minor + 1))
250+
patch=0
251+
fi
252+
253+
# Format back to X_YYY_ZZZ format (with proper zero padding)
254+
local new_spec=$(printf "%d_%03d_%03d" "$major" "$minor" "$patch")
255+
256+
# Replace in file
257+
sed -ri "s/spec_version: ${current_spec},/spec_version: ${new_spec},/" "$file"
258+
259+
echo "$new_spec"
260+
}

.github/workflows/check-licenses.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- name: Checkout sources
2727
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
28-
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
28+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
2929
with:
3030
node-version: "18.x"
3131
registry-url: "https://npm.pkg.github.com"
@@ -63,7 +63,7 @@ jobs:
6363
steps:
6464
- name: Checkout sources
6565
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
66-
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
66+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
6767
with:
6868
node-version: "18.x"
6969
registry-url: "https://npm.pkg.github.com"

.github/workflows/check-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
timeout-minutes: 10
2727
steps:
2828
- name: Restore lychee cache
29-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
29+
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
3030
with:
3131
path: .lycheecache
3232
key: cache-lychee-${{ github.sha }}

.github/workflows/check-runtime-compatibility.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
forklift cargo build --release --locked -p ${{ matrix.package }} --features on-chain-release-build -q
7373
7474
- name: Setup Node.js
75-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
75+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
7676
with:
7777
node-version: "24.x"
7878
registry-url: "https://npm.pkg.github.com"

.github/workflows/check-runtime-migration.yml

Lines changed: 91 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,93 @@ jobs:
2525
needs: isdraft
2626
uses: ./.github/workflows/reusable-preflight.yml
2727

28+
# Prepare snapshots for all networks. Runs before the actual migration checks.
29+
# For scheduled runs: always create fresh snapshots.
30+
# For PRs: use cached snapshots if available, create if not.
31+
prepare-snapshots:
32+
runs-on: ubuntu-latest
33+
needs: [preflight]
34+
if: ${{ needs.preflight.outputs.changes_rust }}
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
network:
39+
[
40+
westend,
41+
asset-hub-westend,
42+
bridge-hub-westend,
43+
collectives-westend,
44+
coretime-westend,
45+
]
46+
include:
47+
- network: westend
48+
uri: "wss://try-runtime-westend.polkadot.io:443"
49+
- network: asset-hub-westend
50+
uri: "wss://westend-asset-hub-rpc.polkadot.io:443"
51+
- network: bridge-hub-westend
52+
uri: "wss://westend-bridge-hub-rpc.polkadot.io:443"
53+
- network: collectives-westend
54+
uri: "wss://westend-collectives-rpc.polkadot.io:443"
55+
- network: coretime-westend
56+
uri: "wss://westend-coretime-rpc.polkadot.io:443"
57+
steps:
58+
- name: Check if snapshot exists in cache
59+
id: cache-restore
60+
if: ${{ github.event_name != 'schedule' }}
61+
uses: actions/cache/restore@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
62+
with:
63+
lookup-only: true
64+
path: snapshot.raw
65+
key: try-runtime-snapshot-${{ matrix.network }}-
66+
fail-on-cache-miss: false
67+
68+
- name: Download CLI
69+
if: ${{ steps.cache-restore.outputs.cache-matched-key == '' }}
70+
run: |
71+
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.10.1/try-runtime-x86_64-unknown-linux-musl -o try-runtime
72+
chmod +x ./try-runtime
73+
./try-runtime --version
74+
75+
- name: Generate snapshot for ${{ matrix.network }}
76+
if: ${{ steps.cache-restore.outputs.cache-matched-key == '' }}
77+
run: |
78+
echo "Generating snapshot for ${{ matrix.network }}..."
79+
for i in {1..10}; do
80+
echo "Snapshot creation attempt $i/10"
81+
if ./try-runtime create-snapshot --uri ${{ matrix.uri }} -- snapshot.raw; then
82+
if [ -f "snapshot.raw" ] && [ -s "snapshot.raw" ]; then
83+
echo "Snapshot created successfully"
84+
break
85+
fi
86+
fi
87+
echo "Snapshot creation failed, attempt $i/10"
88+
rm -f snapshot.raw
89+
if [ $i -eq 10 ]; then
90+
echo "All snapshot creation attempts failed"
91+
exit 1
92+
fi
93+
sleep 10
94+
done
95+
96+
- name: Get Date
97+
id: get-date
98+
if: ${{ steps.cache-restore.outputs.cache-matched-key == '' }}
99+
run: |
100+
echo "today=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
101+
102+
- name: Save snapshot to cache
103+
if: ${{ steps.cache-restore.outputs.cache-matched-key == '' }}
104+
uses: actions/cache/save@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
105+
with:
106+
path: snapshot.raw
107+
key: try-runtime-snapshot-${{ matrix.network }}-${{ steps.get-date.outputs.today }}
108+
28109
# More info can be found here: https://github.com/paritytech/polkadot/pull/5865
29110
check-runtime-migration:
30111
runs-on: ${{ needs.preflight.outputs.RUNNER }}
31-
if: ${{ needs.preflight.outputs.changes_rust }}
32-
# We need to set this to rather long to allow the snapshot to be created, but the average time
33-
# should be much lower.
112+
if: ${{ needs.preflight.outputs.changes_rust && github.event_name != 'schedule' }}
34113
timeout-minutes: 120
35-
needs: [preflight]
114+
needs: [preflight, prepare-snapshots]
36115
container:
37116
image: ${{ needs.preflight.outputs.IMAGE }}
38117
strategy:
@@ -50,78 +129,55 @@ jobs:
50129
- network: westend
51130
package: westend-runtime
52131
wasm: westend_runtime.compact.compressed.wasm
53-
uri: "wss://try-runtime-westend.polkadot.io:443"
54132
subcommand_extra_args: "--no-weight-warnings --blocktime 6000"
55133
command_extra_args: ""
56134
- network: asset-hub-westend
57135
package: asset-hub-westend-runtime
58136
wasm: asset_hub_westend_runtime.compact.compressed.wasm
59-
uri: "wss://westend-asset-hub-rpc.polkadot.io:443"
60137
subcommand_extra_args: " --blocktime 6000"
61138
command_extra_args: ""
62139
- network: bridge-hub-westend
63140
package: bridge-hub-westend-runtime
64141
wasm: bridge_hub_westend_runtime.compact.compressed.wasm
65-
uri: "wss://westend-bridge-hub-rpc.polkadot.io:443"
66142
subcommand_extra_args: " --blocktime 6000"
143+
command_extra_args: ""
67144
- network: collectives-westend
68145
package: collectives-westend-runtime
69146
wasm: collectives_westend_runtime.compact.compressed.wasm
70-
uri: "wss://westend-collectives-rpc.polkadot.io:443"
71147
command_extra_args: "--disable-spec-name-check"
72148
subcommand_extra_args: " --blocktime 6000"
73149
- network: coretime-westend
74150
package: coretime-westend-runtime
75151
wasm: coretime_westend_runtime.compact.compressed.wasm
76-
uri: "wss://westend-coretime-rpc.polkadot.io:443"
77152
subcommand_extra_args: " --blocktime 6000"
153+
command_extra_args: ""
78154
steps:
79155
- name: Checkout
80156
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
81157

82158
- name: Download CLI
83159
run: |
84-
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.8.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime
160+
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.10.1/try-runtime-x86_64-unknown-linux-musl -o try-runtime
85161
chmod +x ./try-runtime
86162
echo "Using try-runtime-cli version:"
87163
./try-runtime --version
88164
89-
- name: Get Date
90-
id: get-date
91-
run: |
92-
echo "today=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
93-
shell: bash
94-
95-
- name: Download Snapshot
96-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
165+
- name: Restore snapshot from cache
166+
uses: actions/cache/restore@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
97167
with:
98168
path: snapshot.raw
99-
key: try-runtime-snapshot-${{ matrix.network }}-${{ steps.get-date.outputs.today }}
100-
save-always: true
101-
102-
- name: Create Snapshot If Stale
103-
if: ${{ hashFiles('snapshot.raw') == '' }}
104-
run: |
105-
echo "Creating new snapshot for today (${{ steps.get-date.outputs.today }})"
106-
./try-runtime create-snapshot --uri ${{ matrix.uri }} snapshot.raw
169+
key: try-runtime-snapshot-${{ matrix.network }}-
170+
fail-on-cache-miss: true
107171

108172
- name: Build Runtime
109-
if: ${{ github.event_name != 'schedule' }}
110173
id: required1
111174
run: |
112175
echo "---------- Building ${{ matrix.package }} runtime ----------"
113176
forklift cargo build --release --locked -p ${{ matrix.package }} --features try-runtime -q
114177
115178
- name: Run Check
116-
if: ${{ github.event_name != 'schedule' }}
117179
id: required2
118180
run: |
119-
# Disable the check for asset-hub-westend temporarily due to frequent failures.
120-
if [ "${{ matrix.network }}" = "asset-hub-westend" ]; then
121-
echo "Skipping runtime migration check for asset-hub-westend due to frequent failures."
122-
exit 0
123-
fi
124-
125181
echo "Running ${{ matrix.network }} runtime migration check"
126182
export RUST_LOG=remote-ext=debug,runtime=debug
127183
@@ -132,7 +188,7 @@ jobs:
132188
sleep 5
133189
134190
- name: Stop all workflows if failed
135-
if: ${{ failure() && github.event_name != 'schedule' && (steps.required1.conclusion == 'failure' || steps.required2.conclusion == 'failure') }}
191+
if: ${{ failure() && (steps.required1.conclusion == 'failure' || steps.required2.conclusion == 'failure') }}
136192
uses: ./.github/actions/workflow-stopper
137193
with:
138194
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}

.github/workflows/checks-quick.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
- name: Checkout sources
116116
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
117117
- name: Setup Node.js
118-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
118+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
119119
with:
120120
node-version: "18.x"
121121
registry-url: "https://npm.pkg.github.com"

.github/workflows/release-20_build-rc.yml

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

4141
validate-inputs:
4242
needs: [check-synchronization]
43-
if: ${{ needs.check-synchronization.outputs.checks_passed }} == 'true'
43+
if: needs.check-synchronization.outputs.checks_passed == 'true'
4444
runs-on: ubuntu-latest
4545
outputs:
4646
release_tag: ${{ steps.validate_inputs.outputs.release_tag }}

0 commit comments

Comments
 (0)