Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit b85e362

Browse files
committed
Merge branch 'bridge-next-gen' into transact-from-eth-to-sub
2 parents 0ea24a4 + 3f495e5 commit b85e362

File tree

1,173 files changed

+61067
-24539
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,173 files changed

+61067
-24539
lines changed

.github/workflows/parachain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
RUST_BACKTRACE: 1
2525
RUSTFLAGS: -C debuginfo=1
2626
SKIP_WASM_BUILD: 1
27-
RUST_NIGHTLY_VERSION: nightly-2023-12-28
27+
RUST_NIGHTLY_VERSION: nightly-2024-02-08
2828
steps:
2929
- uses: actions/checkout@v2
3030
with:
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
name: Release - Publish draft
2+
3+
on:
4+
push:
5+
tags:
6+
# Catches v1.2.3 and v1.2.3-rc1
7+
- v[0-9]+.[0-9]+.[0-9]+*
8+
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: Current release/rc version
13+
14+
jobs:
15+
get-rust-versions:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
rustc-stable: ${{ steps.get-rust-versions.outputs.stable }}
19+
steps:
20+
- id: get-rust-versions
21+
run: |
22+
RUST_STABLE_VERSION=$(curl -sS https://raw.githubusercontent.com/paritytech/scripts/master/dockerfiles/ci-unified/Dockerfile | grep -oP 'ARG RUST_STABLE_VERSION=\K[^ ]+')
23+
echo "stable=$RUST_STABLE_VERSION" >> $GITHUB_OUTPUT
24+
25+
build-runtimes:
26+
uses: "./.github/workflows/srtool.yml"
27+
with:
28+
excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template"
29+
30+
publish-release-draft:
31+
runs-on: ubuntu-latest
32+
needs: [get-rust-versions, build-runtimes]
33+
outputs:
34+
release_url: ${{ steps.create-release.outputs.html_url }}
35+
asset_upload_url: ${{ steps.create-release.outputs.upload_url }}
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
39+
40+
- name: Prepare tooling
41+
run: |
42+
URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.4/tera-cli_linux_amd64.deb
43+
wget $URL -O tera.deb
44+
sudo dpkg -i tera.deb
45+
tera --version
46+
47+
- name: Download artifacts
48+
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
49+
50+
- name: Prepare draft
51+
id: draft
52+
env:
53+
RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }}
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
ASSET_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/asset-hub-rococo-runtime/asset-hub-rococo-srtool-digest.json
56+
ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json
57+
BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-runtime/bridge-hub-rococo-srtool-digest.json
58+
BRIDGE_HUB_WESTEND_DIGEST: ${{ github.workspace}}/bridge-hub-westend-runtime/bridge-hub-westend-srtool-digest.json
59+
COLLECTIVES_WESTEND_DIGEST: ${{ github.workspace}}/collectives-westend-runtime/collectives-westend-srtool-digest.json
60+
CONTRACTS_ROCOCO_DIGEST: ${{ github.workspace}}/contracts-rococo-runtime/contracts-rococo-srtool-digest.json
61+
CORETIME_ROCOCO_DIGEST: ${{ github.workspace}}/coretime-rococo-runtime/coretime-rococo-srtool-digest.json
62+
CORETIME_WESTEND_DIGEST: ${{ github.workspace}}/coretime-westend-runtime/coretime-westend-srtool-digest.json
63+
GLUTTON_WESTEND_DIGEST: ${{ github.workspace}}/glutton-westend-runtime/glutton-westend-srtool-digest.json
64+
PEOPLE_ROCOCO_DIGEST: ${{ github.workspace}}/people-rococo-runtime/people-rococo-srtool-digest.json
65+
PEOPLE_WESTEND_DIGEST: ${{ github.workspace}}/people-westend-runtime/people-westend-srtool-digest.json
66+
ROCOCO_DIGEST: ${{ github.workspace}}/rococo-runtime/rococo-srtool-digest.json
67+
WESTEND_DIGEST: ${{ github.workspace}}/westend-runtime/westend-srtool-digest.json
68+
run: |
69+
. ./.github/scripts/common/lib.sh
70+
71+
export REF1=$(get_latest_release_tag)
72+
if [[ -z "${{ inputs.version }}" ]]; then
73+
export REF2="${{ github.ref }}"
74+
else
75+
export REF2="${{ inputs.version }}"
76+
fi
77+
echo "REL_TAG=$REF2" >> $GITHUB_ENV
78+
export VERSION=$(echo "$REF2" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/')
79+
80+
./scripts/release/build-changelogs.sh
81+
82+
echo "Checking the folder state"
83+
pwd
84+
ls -la scripts/release
85+
86+
- name: Archive artifact context.json
87+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
88+
with:
89+
name: release-notes-context
90+
path: |
91+
scripts/release/context.json
92+
**/*-srtool-digest.json
93+
94+
- name: Create draft release
95+
id: create-release
96+
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
with:
100+
tag_name: ${{ env.REL_TAG }}
101+
release_name: Polkadot ${{ env.REL_TAG }}
102+
body_path: ${{ github.workspace}}/scripts/release/RELEASE_DRAFT.md
103+
draft: true
104+
105+
publish-runtimes:
106+
needs: [ build-runtimes, publish-release-draft ]
107+
continue-on-error: true
108+
runs-on: ubuntu-latest
109+
strategy:
110+
matrix: ${{ fromJSON(needs.build-runtimes.outputs.published_runtimes) }}
111+
112+
steps:
113+
- name: Checkout sources
114+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
115+
116+
- name: Download artifacts
117+
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
118+
119+
- name: Get runtime info
120+
env:
121+
JSON: release-notes-context/${{ matrix.chain }}-runtime/${{ matrix.chain }}-srtool-digest.json
122+
run: |
123+
>>$GITHUB_ENV echo ASSET=$(find ${{ matrix.chain }}-runtime -name '*.compact.compressed.wasm')
124+
>>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion)
125+
126+
- name: Upload compressed ${{ matrix.chain }} v${{ env.SPEC }} wasm
127+
if: ${{ matrix.chain != 'rococo-parachain' }}
128+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2
129+
env:
130+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131+
with:
132+
upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }}
133+
asset_path: ${{ env.ASSET }}
134+
asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm
135+
asset_content_type: application/wasm
136+
137+
post_to_matrix:
138+
runs-on: ubuntu-latest
139+
needs: publish-release-draft
140+
strategy:
141+
matrix:
142+
channel:
143+
- name: "Team: RelEng Internal"
144+
room: '!GvAyzgCDgaVrvibaAF:parity.io'
145+
146+
steps:
147+
- name: Send Matrix message to ${{ matrix.channel.name }}
148+
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
149+
with:
150+
room_id: ${{ matrix.channel.room }}
151+
access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
152+
server: m.parity.io
153+
message: |
154+
**New version of polkadot tagged**: ${{ github.ref }}<br/>
155+
Draft release created: ${{ needs.publish-release-draft.outputs.release_url }}

.gitlab-ci.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,19 +119,26 @@ default:
119119
#
120120
.forklift-cache:
121121
before_script:
122-
- 'curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o forklift -L "${CI_API_V4_URL}/projects/676/packages/generic/forklift/${FL_FORKLIFT_VERSION}/forklift_${FL_FORKLIFT_VERSION}_linux_amd64"'
123-
- chmod +x forklift
124122
- mkdir ~/.forklift
125123
- cp $FL_FORKLIFT_CONFIG ~/.forklift/config.toml
126-
- shopt -s expand_aliases
127-
- export PATH=$PATH:$(pwd)
128-
- |
124+
- >
129125
if [ "$FORKLIFT_BYPASS" != "true" ]; then
130-
echo "FORKLIFT_BYPASS not set, creating alias cargo='forklift cargo'"
131-
alias cargo="forklift cargo"
126+
echo "FORKLIFT_BYPASS not set";
127+
if command -v forklift >/dev/null 2>&1; then
128+
echo "forklift already exists";
129+
forklift version
130+
else
131+
echo "forklift does not exist, downloading";
132+
curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o forklift -L "${CI_API_V4_URL}/projects/676/packages/generic/forklift/${FL_FORKLIFT_VERSION}/forklift_${FL_FORKLIFT_VERSION}_linux_amd64";
133+
chmod +x forklift;
134+
export PATH=$PATH:$(pwd);
135+
echo ${FL_FORKLIFT_VERSION};
136+
fi
137+
echo "Creating alias cargo='forklift cargo'";
138+
shopt -s expand_aliases;
139+
alias cargo="forklift cargo";
132140
fi
133141
#
134-
- echo "FL_FORKLIFT_VERSION ${FL_FORKLIFT_VERSION}"
135142

136143
.common-refs:
137144
rules:

.gitlab/pipeline/build.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,40 +91,39 @@ build-rustdoc:
9191
- .run-immediately
9292
variables:
9393
SKIP_WASM_BUILD: 1
94-
RUSTDOCFLAGS: "--default-theme=ayu --html-in-header ./docs/sdk/headers/header.html --extend-css ./docs/sdk/headers/theme.css"
94+
RUSTDOCFLAGS: "-Dwarnings --default-theme=ayu --html-in-header ./docs/sdk/assets/header.html --extend-css ./docs/sdk/assets/theme.css --html-after-content ./docs/sdk/assets/after-content.html"
9595
artifacts:
9696
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
9797
when: on_success
9898
expire_in: 1 days
9999
paths:
100100
- ./crate-docs/
101101
script:
102-
# FIXME: it fails with `RUSTDOCFLAGS="-Dwarnings"` and `--all-features`
103-
- time cargo doc --features try-runtime,experimental --workspace --no-deps
102+
- time cargo doc --all-features --workspace --no-deps
104103
- rm -f ./target/doc/.lock
105104
- mv ./target/doc ./crate-docs
106105
# Inject Simple Analytics (https://www.simpleanalytics.com/) privacy preserving tracker into
107106
# all .html files
108-
- |
107+
- >
109108
inject_simple_analytics() {
110-
local path="$1"
111-
local script_content="<script async defer src=\"https://apisa.parity.io/latest.js\"></script><noscript><img src=\"https://apisa.parity.io/latest.js\" alt=\"\" referrerpolicy=\"no-referrer-when-downgrade\" /></noscript>"
109+
local path="$1";
110+
local script_content="<script async defer src=\"https://apisa.parity.io/latest.js\"></script><noscript><img src=\"https://apisa.parity.io/latest.js\" alt=\"\" referrerpolicy=\"no-referrer-when-downgrade\" /></noscript>";
112111
113112
# Function that inject script into the head of an html file using sed.
114113
process_file() {
115-
local file="$1"
116-
echo "Adding Simple Analytics script to $file"
117-
sed -i "s|</head>|$script_content</head>|" "$file"
118-
}
119-
export -f process_file
120-
# xargs runs process_file in seperate shells without access to outer variables.
121-
# to make script_content available inside process_file, export it as an env var here.
122-
export script_content
114+
local file="$1";
115+
echo "Adding Simple Analytics script to $file";
116+
sed -i "s|</head>|$script_content</head>|" "$file";
117+
};
118+
export -f process_file;
119+
# xargs runs process_file in separate shells without access to outer variables.
120+
# make script_content available inside process_file, export it as an env var here.
121+
export script_content;
123122
124123
# Modify .html files in parallel using xargs, otherwise it can take a long time.
125-
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {}
126-
}
127-
inject_simple_analytics "./crate-docs"
124+
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {};
125+
};
126+
inject_simple_analytics "./crate-docs";
128127
- echo "<meta http-equiv=refresh content=0;url=polkadot_sdk_docs/index.html>" > ./crate-docs/index.html
129128

130129
build-implementers-guide:

.gitlab/pipeline/check.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ cargo-clippy:
77
variables:
88
RUSTFLAGS: "-D warnings"
99
script:
10-
- SKIP_WASM_BUILD=1 cargo clippy --all-targets --locked --workspace
11-
- SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --workspace
10+
- SKIP_WASM_BUILD=1 cargo clippy --all-targets --locked --workspace --quiet
11+
- SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --workspace --quiet
1212

1313
check-try-runtime:
1414
stage: check
@@ -104,23 +104,20 @@ check-toml-format:
104104
- .docker-env
105105
- .test-pr-refs
106106
script:
107-
- |
108-
export RUST_LOG=remote-ext=debug,runtime=debug
109-
110-
echo "---------- Downloading try-runtime CLI ----------"
111-
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime
112-
chmod +x ./try-runtime
113-
echo "Using try-runtime-cli version:"
114-
./try-runtime --version
115-
116-
echo "---------- Building ${PACKAGE} runtime ----------"
117-
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
118-
119-
echo "---------- Executing on-runtime-upgrade for ${NETWORK} ----------"
107+
- export RUST_LOG=remote-ext=debug,runtime=debug
108+
- echo "---------- Downloading try-runtime CLI ----------"
109+
- curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime
110+
- chmod +x ./try-runtime
111+
- echo "Using try-runtime-cli version:"
112+
- ./try-runtime --version
113+
- echo "---------- Building ${PACKAGE} runtime ----------"
114+
- time cargo build --release --locked -p "$PACKAGE" --features try-runtime
115+
- echo "---------- Executing on-runtime-upgrade for ${NETWORK} ----------"
116+
- >
120117
time ./try-runtime ${COMMAND_EXTRA_ARGS} \
121-
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
122-
on-runtime-upgrade --disable-spec-version-check --checks=all ${SUBCOMMAND_EXTRA_ARGS} live --uri ${URI}
123-
sleep 5
118+
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
119+
on-runtime-upgrade --disable-spec-version-check --checks=all ${SUBCOMMAND_EXTRA_ARGS} live --uri ${URI}
120+
- sleep 5
124121

125122
# Check runtime migrations for Parity managed relay chains
126123
check-runtime-migration-westend:

.gitlab/pipeline/publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ trigger_workflow:
113113
artifacts: true
114114
script:
115115
- echo "Triggering workflow"
116-
- |
116+
- >
117117
for benchmark in $(ls charts/*.json); do
118-
export bencmark_name=$(basename $benchmark)
119-
echo "Benchmark: $bencmark_name"
120-
export benchmark_dir=$(echo $bencmark_name | sed 's/\.json//')
118+
export benchmark_name=$(basename $benchmark);
119+
echo "Benchmark: $benchmark_name";
120+
export benchmark_dir=$(echo $benchmark_name | sed 's/\.json//');
121121
curl -q -X POST \
122122
-H "Accept: application/vnd.github.v3+json" \
123123
-H "Authorization: token $GITHUB_TOKEN" \
124-
https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/actions/workflows/subsystem-benchmarks.yml/dispatches \
125-
-d '{"ref":"refs/heads/master","inputs":{"benchmark-data-dir-path":"'$benchmark_dir'","output-file-path":"'$bencmark_name'"}}'
126-
sleep 300
124+
https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/actions/workflows/subsystem-benchmarks.yml/dispatches \
125+
-d "{\"ref\":\"refs/heads/master\",\"inputs\":{\"benchmark-data-dir-path\":\"$benchmark_dir\",\"output-file-path\":\"$benchmark_name\"}}";
126+
sleep 300;
127127
done
128128
allow_failure: true
129129

.gitlab/pipeline/test.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ test-linux-stable:
2323
- echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}"
2424
# add experimental to features after https://github.com/paritytech/substrate/pull/14502 is merged
2525
# "upgrade_version_checks_should_work" is currently failing
26-
- |
26+
- >
2727
time cargo nextest run \
28-
--filter-expr 'not deps(/polkadot-subsystem-bench/)' \
2928
--workspace \
3029
--locked \
3130
--release \
@@ -35,7 +34,7 @@ test-linux-stable:
3534
# Upload tests results to Elasticsearch
3635
- echo "Upload test results to Elasticsearch"
3736
- cat target/nextest/default/junit.xml | xq . > target/nextest/default/junit.json
38-
- |
37+
- >
3938
curl -v -XPOST --http1.1 \
4039
-u ${ELASTIC_USERNAME}:${ELASTIC_PASSWORD} \
4140
https://elasticsearch.parity-build.parity.io/unit-tests/_doc/${CI_JOB_ID} \
@@ -70,7 +69,7 @@ test-linux-stable-runtime-benchmarks:
7069
# but still want to have debug assertions.
7170
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
7271
script:
73-
- time cargo nextest run --filter-expr 'not deps(/polkadot-subsystem-bench/)' --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet
72+
- time cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet
7473

7574
# can be used to run all tests
7675
# test-linux-stable-all:
@@ -88,7 +87,7 @@ test-linux-stable-runtime-benchmarks:
8887
# script:
8988
# # Build all but only execute 'runtime' tests.
9089
# - echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}"
91-
# - |
90+
# - >
9291
# time cargo nextest run \
9392
# --workspace \
9493
# --locked \
@@ -323,7 +322,24 @@ quick-benchmarks:
323322
WASM_BUILD_NO_COLOR: 1
324323
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
325324
script:
326-
- time cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks -- benchmark pallet --execution wasm --wasm-execution compiled --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1
325+
- time cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks --quiet -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet
326+
327+
quick-benchmarks-omni:
328+
stage: test
329+
extends:
330+
- .docker-env
331+
- .common-refs
332+
- .run-immediately
333+
variables:
334+
# Enable debug assertions since we are running optimized builds for testing
335+
# but still want to have debug assertions.
336+
RUSTFLAGS: "-C debug-assertions"
337+
RUST_BACKTRACE: "full"
338+
WASM_BUILD_NO_COLOR: 1
339+
WASM_BUILD_RUSTFLAGS: "-C debug-assertions"
340+
script:
341+
- time cargo build --locked --quiet --release -p asset-hub-westend-runtime --features runtime-benchmarks
342+
- time cargo run --locked --release -p frame-omni-bencher --quiet -- v1 benchmark pallet --runtime target/release/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.compact.compressed.wasm --all --steps 2 --repeat 1 --quiet
327343

328344
test-frame-examples-compile-to-wasm:
329345
# into one job

0 commit comments

Comments
 (0)