Skip to content

Commit 227ff93

Browse files
committed
Merge branch 'master' into ao-send-parent-head-data
* master: (65 commits) collator protocol changes for elastic scaling (validator side) (#3302) Contracts use polkavm workspace deps (#3715) Add elastic scaling support in ParaInherent BenchBuilder (#3690) Removes `as [disambiguation_path]` from `derive_impl` usage (#3652) fix(paseo-spec): New Paseo Bootnodes (#3674) Improve Penpal runtime + emulated tests (#3543) Staking ledger bonding fixes (#3639) DescribeAllTerminal for HashedDescription (#3349) Increase timeout for assertions (#3680) Add subsystems regression tests to CI (#3527) Always print connectivity report (#3677) Revert "FRAME: Create `TransactionExtension` as a replacement for `SignedExtension` (#2280)" (#3665) authority-discovery: Add log for debugging DHT authority records (#3668) Construct Runtime v2 (#1378) Support for `keyring` in runtimes (#2044) Add api-name in `cannot query the runtime API version` warning (#3653) Add a PolkaVM-based executor (#3458) Adds default config for assets pallet (#3637) Bump handlebars from 4.3.7 to 5.1.0 (#3248) [Collator Selection] Fix weight refund for `set_candidacy_bond` (#3643) ...
2 parents 6109444 + 02e1a7f commit 227ff93

File tree

585 files changed

+13146
-7779
lines changed

Some content is hidden

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

585 files changed

+13146
-7779
lines changed

.github/scripts/check-workspace.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ def parse_args():
1818

1919
parser.add_argument('workspace_dir', help='The directory to check', metavar='workspace_dir', type=str, nargs=1)
2020
parser.add_argument('--exclude', help='Exclude crate paths from the check', metavar='exclude', type=str, nargs='*', default=[])
21-
21+
2222
args = parser.parse_args()
2323
return (args.workspace_dir[0], args.exclude)
2424

2525
def main(root, exclude):
2626
workspace_crates = get_members(root, exclude)
2727
all_crates = get_crates(root, exclude)
2828
print(f'📦 Found {len(all_crates)} crates in total')
29-
29+
3030
check_duplicates(workspace_crates)
3131
check_missing(workspace_crates, all_crates)
3232
check_links(all_crates)
@@ -48,14 +48,14 @@ def get_members(workspace_dir, exclude):
4848

4949
if not 'members' in root_manifest['workspace']:
5050
return []
51-
51+
5252
members = []
5353
for member in root_manifest['workspace']['members']:
5454
if member in exclude:
5555
print(f'❌ Excluded member should not appear in the workspace {member}')
5656
sys.exit(1)
5757
members.append(member)
58-
58+
5959
return members
6060

6161
# List all members of the workspace.
@@ -74,20 +74,20 @@ def get_crates(workspace_dir, exclude_crates) -> dict:
7474
with open(path, "r") as f:
7575
content = f.read()
7676
manifest = toml.loads(content)
77-
77+
7878
if 'workspace' in manifest:
7979
if root != workspace_dir:
8080
print("⏩ Excluded recursive workspace at %s" % path)
8181
continue
82-
82+
8383
# Cut off the root path and the trailing /Cargo.toml.
8484
path = path[len(workspace_dir)+1:-11]
8585
name = manifest['package']['name']
8686
if path in exclude_crates:
8787
print("⏩ Excluded crate %s at %s" % (name, path))
8888
continue
8989
crates[name] = (path, manifest)
90-
90+
9191
return crates
9292

9393
# Check that there are no duplicate entries in the workspace.
@@ -138,23 +138,23 @@ def check_deps(deps):
138138
if not 'path' in deps[dep]:
139139
broken.append((name, dep_name, "crate must be linked via `path`"))
140140
return
141-
141+
142142
def check_crate(deps):
143143
to_checks = ['dependencies', 'dev-dependencies', 'build-dependencies']
144144

145145
for to_check in to_checks:
146146
if to_check in deps:
147147
check_deps(deps[to_check])
148-
148+
149149
# There could possibly target dependant deps:
150150
if 'target' in manifest:
151151
# Target dependant deps can only have one level of nesting:
152152
for _, target in manifest['target'].items():
153153
check_crate(target)
154-
154+
155155
check_crate(manifest)
156156

157-
157+
158158

159159
links.sort()
160160
broken.sort()

.github/scripts/common/lib.sh

Lines changed: 93 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,61 @@ fetch_release_artifacts() {
237237
popd > /dev/null
238238
}
239239

240+
# Fetch the release artifacts like binary and sigantures from S3. Assumes the ENV are set:
241+
# - RELEASE_ID
242+
# - GITHUB_TOKEN
243+
# - REPO in the form paritytech/polkadot
244+
fetch_release_artifacts_from_s3() {
245+
echo "Version : $VERSION"
246+
echo "Repo : $REPO"
247+
echo "Binary : $BINARY"
248+
OUTPUT_DIR=${OUTPUT_DIR:-"./release-artifacts/${BINARY}"}
249+
echo "OUTPUT_DIR : $OUTPUT_DIR"
250+
251+
URL_BASE=$(get_s3_url_base $BINARY)
252+
echo "URL_BASE=$URL_BASE"
253+
254+
URL_BINARY=$URL_BASE/$VERSION/$BINARY
255+
URL_SHA=$URL_BASE/$VERSION/$BINARY.sha256
256+
URL_ASC=$URL_BASE/$VERSION/$BINARY.asc
257+
258+
# Fetch artifacts
259+
mkdir -p "$OUTPUT_DIR"
260+
pushd "$OUTPUT_DIR" > /dev/null
261+
262+
echo "Fetching artifacts..."
263+
for URL in $URL_BINARY $URL_SHA $URL_ASC; do
264+
echo "Fetching %s" "$URL"
265+
curl --progress-bar -LO "$URL" || echo "Missing $URL"
266+
done
267+
268+
pwd
269+
ls -al --color
270+
popd > /dev/null
271+
272+
}
273+
274+
# Pass the name of the binary as input, it will
275+
# return the s3 base url
276+
function get_s3_url_base() {
277+
name=$1
278+
case $name in
279+
polkadot | polkadot-execute-worker | polkadot-prepare-worker | staking-miner)
280+
printf "https://releases.parity.io/polkadot"
281+
;;
282+
283+
polkadot-parachain)
284+
printf "https://releases.parity.io/cumulus"
285+
;;
286+
287+
*)
288+
printf "UNSUPPORTED BINARY $name"
289+
exit 1
290+
;;
291+
esac
292+
}
293+
294+
240295
# Check the checksum for a given binary
241296
function check_sha256() {
242297
echo "Checking SHA256 for $1"
@@ -248,13 +303,11 @@ function check_sha256() {
248303
function import_gpg_keys() {
249304
GPG_KEYSERVER=${GPG_KEYSERVER:-"keyserver.ubuntu.com"}
250305
SEC="9D4B2B6EB8F97156D19669A9FF0812D491B96798"
251-
WILL="2835EAF92072BC01D188AF2C4A092B93E97CE1E2"
252306
EGOR="E6FC4D4782EB0FA64A4903CCDB7D3555DD3932D3"
253-
MARA="533C920F40E73A21EEB7E9EBF27AEA7E7594C9CF"
254307
MORGAN="2E92A9D8B15D7891363D1AE8AF9E6C43F7F8C4CF"
255308

256309
echo "Importing GPG keys from $GPG_KEYSERVER in parallel"
257-
for key in $SEC $WILL $EGOR $MARA $MORGAN; do
310+
for key in $SEC $EGOR $MORGAN; do
258311
(
259312
echo "Importing GPG key $key"
260313
gpg --no-tty --quiet --keyserver $GPG_KEYSERVER --recv-keys $key
@@ -344,3 +397,40 @@ function find_runtimes() {
344397
done
345398
echo $JSON
346399
}
400+
401+
# Filter the version matches the particular pattern and return it.
402+
# input: version (v1.8.0 or v1.8.0-rc1)
403+
# output: none
404+
filter_version_from_input() {
405+
version=$1
406+
regex="(^v[0-9]+\.[0-9]+\.[0-9]+)$|(^v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+)$"
407+
408+
if [[ $version =~ $regex ]]; then
409+
if [ -n "${BASH_REMATCH[1]}" ]; then
410+
echo "${BASH_REMATCH[1]}"
411+
elif [ -n "${BASH_REMATCH[2]}" ]; then
412+
echo "${BASH_REMATCH[2]}"
413+
fi
414+
else
415+
echo "Invalid version: $version"
416+
exit 1
417+
fi
418+
419+
}
420+
421+
# Check if the release_id is valid number
422+
# input: release_id
423+
# output: release_id or exit 1
424+
check_release_id() {
425+
input=$1
426+
427+
release_id=$(echo "$input" | sed 's/[^0-9]//g')
428+
429+
if [[ $release_id =~ ^[0-9]+$ ]]; then
430+
echo "$release_id"
431+
else
432+
echo "Invalid release_id from input: $input"
433+
exit 1
434+
fi
435+
436+
}

.github/workflows/check-licenses.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ jobs:
4242
shopt -s globstar
4343
npx @paritytech/license-scanner scan \
4444
--ensure-licenses ${{ env.LICENSES }} \
45-
--exclude ./substrate/bin/node-template \
4645
-- ./substrate/**/*.rs

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ on:
3636
-H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/$OWNER/$REPO/releases | \
3737
jq '.[] | { name: .name, id: .id }'
3838
required: true
39-
type: string
39+
type: number
4040

4141
registry:
4242
description: Container registry
@@ -61,7 +61,6 @@ permissions:
6161
contents: write
6262

6363
env:
64-
RELEASE_ID: ${{ inputs.release_id }}
6564
ENGINE: docker
6665
REGISTRY: ${{ inputs.registry }}
6766
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -71,6 +70,7 @@ env:
7170
# EVENT_ACTION: ${{ github.event.action }}
7271
EVENT_NAME: ${{ github.event_name }}
7372
IMAGE_TYPE: ${{ inputs.image_type }}
73+
VERSION: ${{ inputs.version }}
7474

7575
jobs:
7676
fetch-artifacts: # this job will be triggered for the polkadot-parachain rc and release or polkadot rc image build
@@ -95,13 +95,16 @@ jobs:
9595
# chmod a+x $BINARY
9696
# ls -al
9797

98-
- name: Fetch rc artifacts or release artifacts based on release id
98+
- name: Fetch rc artifacts or release artifacts from s3 based on version
9999
#this step runs only if the workflow is triggered manually
100100
if: ${{ env.EVENT_NAME == 'workflow_dispatch' }}
101101
run: |
102102
. ./.github/scripts/common/lib.sh
103103
104-
fetch_release_artifacts
104+
VERSION=$(filter_version_from_input "${{ inputs.version }}")
105+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
106+
107+
fetch_release_artifacts_from_s3
105108
106109
- name: Cache the artifacts
107110
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
@@ -147,7 +150,10 @@ jobs:
147150
if: ${{ env.IMAGE_TYPE == 'rc' }}
148151
id: fetch_rc_refs
149152
run: |
150-
release=release-${{ inputs.release_id }} && \
153+
. ./.github/scripts/common/lib.sh
154+
155+
RELEASE_ID=$(check_release_id "${{ inputs.release_id }}")
156+
release=release-$RELEASE_ID && \
151157
echo "release=${release}" >> $GITHUB_OUTPUT
152158
153159
commit=$(git rev-parse --short HEAD) && \

.github/workflows/release-99_notif-published.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ jobs:
1616
- name: "RelEng: Polkadot Release Coordination"
1717
room: '!cqAmzdIcbOFwrdrubV:parity.io'
1818
pre-release: true
19-
- name: 'General: Rust, Polkadot, Substrate'
20-
room: '!aJymqQYtCjjqImFLSb:parity.io'
21-
pre-release: false
22-
- name: 'Team: DevOps'
23-
room: '!lUslSijLMgNcEKcAiE:parity.io'
24-
pre-release: true
2519

2620
# External
2721
- name: 'Ledger <> Polkadot Coordination'
@@ -48,7 +42,9 @@ jobs:
4842
access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
4943
server: m.parity.io
5044
message: |
51-
A (pre)release has been ${{github.event.action}} in **${{github.event.repository.full_name}}:**<br/>
45+
@room
46+
47+
A new node release has been ${{github.event.action}} in **${{github.event.repository.full_name}}:**<br/>
5248
Release version: [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
5349
5450
-----

.gitlab/pipeline/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ build-runtimes-polkavm:
337337
- .common-refs
338338
- .run-immediately
339339
script:
340-
- SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p minimal-runtime
340+
- SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p minimal-template-runtime
341341
- SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p westend-runtime
342342
- SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p rococo-runtime
343343
- SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p polkadot-test-runtime

.gitlab/pipeline/check.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,19 @@ find-fail-ci-phrase:
259259
echo "No $ASSERT_REGEX was found, exiting with 0";
260260
exit 0;
261261
fi
262+
263+
check-core-crypto-features:
264+
stage: check
265+
extends:
266+
- .docker-env
267+
- .common-refs
268+
script:
269+
- pushd substrate/primitives/core
270+
- ./check-features-variants.sh
271+
- popd
272+
- pushd substrate/primitives/application-crypto
273+
- ./check-features-variants.sh
274+
- popd
275+
- pushd substrate/primitives/keyring
276+
- ./check-features-variants.sh
277+
- popd

.gitlab/pipeline/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,3 +494,15 @@ test-syscalls:
494494
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";
495495
fi
496496
allow_failure: false # this rarely triggers in practice
497+
498+
subsystem-regression-tests:
499+
stage: test
500+
extends:
501+
- .docker-env
502+
- .common-refs
503+
- .run-immediately
504+
script:
505+
- cargo test --profile=testnet -p polkadot-availability-recovery --test availability-recovery-regression-bench --features subsystem-benchmarks
506+
tags:
507+
- benchmark
508+
allow_failure: true

0 commit comments

Comments
 (0)