Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from master #87

Merged
merged 31 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ce1c9a4
parachain-system: Do not take `self` for `last_relay_block_number` (#…
bkchr Dec 15, 2023
ddd5434
fix zombienet test (#2719)
pepoviola Dec 15, 2023
ffb2125
[NPoS] Remove better solution threshold for unsigned submissions (#2694)
Ank4n Dec 15, 2023
e5b2ada
`chain-spec-builder`: Improve output path example (#2693)
liamaharon Dec 16, 2023
64d52f2
Publicly expose inaccessible `pallet_uniques` state (#2727)
Szegoo Dec 16, 2023
a250652
Bump async-trait from 0.1.73 to 0.1.74 (#2730)
dependabot[bot] Dec 18, 2023
d941784
Relaxed clippy fixes/nits (#2661)
bkontur Dec 18, 2023
792e374
Bridges subtree update (#2736)
bkontur Dec 18, 2023
ebe2aad
BEEFY: expect_validator_set() small fix (#2737)
serban300 Dec 18, 2023
f93f461
[ci] Fix node-bench-regression-guard job (#2732)
alvicsam Dec 18, 2023
526c81b
subsystem benchmarks: add cpu profiling (#2734)
AndreiEres Dec 19, 2023
657fc2a
Bump dyn-clone from 1.0.13 to 1.0.16 (#2748)
dependabot[bot] Dec 19, 2023
81156d0
Bump actions/setup-node from 4.0.0 to 4.0.1 (#2746)
dependabot[bot] Dec 19, 2023
0b74812
`UnionOf` types for merged `fungible` and `fungibles` implementations…
muharem Dec 19, 2023
166ae5a
[NFTs] Fix consumers issue (#2653)
jsidorenko Dec 19, 2023
2e70dd3
Rococo/Westend Coretime Runtime
joepetrowski Dec 19, 2023
d192401
Ref docs: runtime vs contracts (#2609)
juangirini Dec 19, 2023
7c79741
SDK docs ref cli (#2741)
juangirini Dec 19, 2023
84d6342
pallet-uniques/nfts: Small optimizations (#2754)
bkchr Dec 19, 2023
5ce0451
pallet-asset-conversion: Swap Credit (#1677)
muharem Dec 19, 2023
8efaabd
Add srtool GHA (#2755)
EgorPopelyaev Dec 19, 2023
421af26
Update schnorrkel to 0.11.4 (#2524)
andresilva Dec 19, 2023
c9f9b4b
Fix bridges scripts to test Rococo <> Westend bridge locally (#2752)
svyatonik Dec 20, 2023
d32f66f
Bump chrono from 0.4.27 to 0.4.31 (#2761)
dependabot[bot] Dec 20, 2023
4f832ea
pallet-asset-conversion: Decoupling Native Currency Dependancy (#2031)
muharem Dec 20, 2023
b51904d
use a single source for simple-mermaid dependency (#2760)
andresilva Dec 20, 2023
280aa0b
Add Authorize Upgrade Pattern to Frame System (#2682)
joepetrowski Dec 20, 2023
d68868f
Fix clippy lints behind feature gates and add new CI step all feature…
seadanda Dec 20, 2023
d84e135
Fix Coretime Master (#2765)
joepetrowski Dec 20, 2023
3089458
Merge branch 'master' into snowbridge
Dec 21, 2023
c8f2fad
update from master
Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/scripts/common/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,40 @@ function increment_rc_tag() {
((suffix++))
echo $suffix
}

function relative_parent() {
echo "$1" | sed -E 's/(.*)\/(.*)\/\.\./\1/g'
}

# Find all the runtimes, it returns the result as JSON object, compatible to be
# used as Github Workflow Matrix. This call is exposed by the `scan` command and can be used as:
# podman run --rm -it -v /.../fellowship-runtimes:/build docker.io/chevdor/srtool:1.70.0-0.11.1 scan
function find_runtimes() {
libs=($(git grep -I -r --cached --max-depth 20 --files-with-matches 'construct_runtime!' -- '*lib.rs'))
re=".*-runtime$"
JSON=$(jq --null-input '{ "include": [] }')

# EXCLUDED_RUNTIMES is a space separated list of runtime names (without the -runtime postfix)
# EXCLUDED_RUNTIMES=${EXCLUDED_RUNTIMES:-"substrate-test"}
IFS=' ' read -r -a exclusions <<< "$EXCLUDED_RUNTIMES"

for lib in "${libs[@]}"; do
crate_dir=$(dirname "$lib")
cargo_toml="$crate_dir/../Cargo.toml"

name=$(toml get -r $cargo_toml 'package.name')
chain=${name//-runtime/}

if [[ "$name" =~ $re ]] && ! [[ ${exclusions[@]} =~ $chain ]]; then
lib_dir=$(dirname "$lib")
runtime_dir=$(relative_parent "$lib_dir/..")
ITEM=$(jq --null-input \
--arg chain "$chain" \
--arg name "$name" \
--arg runtime_dir "$runtime_dir" \
'{ "chain": $chain, "crate": $name, "runtime_dir": $runtime_dir }')
JSON=$(echo $JSON | jq ".include += [$ITEM]")
fi
done
echo $JSON
}
2 changes: 1 addition & 1 deletion .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@v4.0.0
- uses: actions/setup-node@v4.0.1
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@v4.0.0
- uses: actions/setup-node@v4.0.1
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
Expand Down
135 changes: 135 additions & 0 deletions .github/workflows/srtool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Srtool build

env:
SUBWASM_VERSION: 0.20.0
TOML_CLI_VERSION: 0.2.4

on:
push:
tags:
- "*"
branches:
- release-v[0-9]+.[0-9]+.[0-9]+*
- release-cumulus-v[0-9]+*
- release-polkadot-v[0-9]+*

schedule:
- cron: "00 02 * * 1" # 2AM weekly on monday

workflow_dispatch:

jobs:
find-runtimes:
name: Scan repo paritytech/polkadot-sdk
outputs:
runtime: ${{ steps.get_runtimes_list.outputs.runtime }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0

- name: Install tooling
run: |
URL=https://github.com/chevdor/toml-cli/releases/download/v${{ env.TOML_CLI_VERSION }}/toml_linux_amd64_v${{ env.TOML_CLI_VERSION }}.deb
curl -L $URL --output toml.deb
sudo dpkg -i toml.deb
toml --version; jq --version

- name: Scan runtimes
env:
EXCLUDED_RUNTIMES: "substrate-test"
run: |
. ./.github/scripts/common/lib.sh

echo "Github workspace: ${{ github.workspace }}"
echo "Current folder: $(pwd)"; ls -al
ls -al

MATRIX=$(find_runtimes | tee runtimes_list.json)
echo $MATRIX

- name: Get runtimes list
id: get_runtimes_list
run: |
ls -al
MATRIX=$(cat runtimes_list.json)
echo $MATRIX
echo "runtime=$MATRIX" >> $GITHUB_OUTPUT

srtool:
runs-on: ubuntu-latest
needs:
- find-runtimes
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.find-runtimes.outputs.runtime) }}

steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.9.1
with:
chain: ${{ matrix.chain }}
runtime_dir: ${{ matrix.runtime_dir }}

- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json
cat ${{ matrix.chain }}-srtool-digest.json
echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}"
echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}"

# it takes a while to build the runtime, so let's save the artifact as soon as we have it
- name: Archive Artifacts for ${{ matrix.chain }}
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: ${{ matrix.chain }}-runtime
path: |
${{ steps.srtool_build.outputs.wasm }}
${{ steps.srtool_build.outputs.wasm_compressed }}
${{ matrix.chain }}-srtool-digest.json

# We now get extra information thanks to subwasm
- name: Install subwasm
run: |
wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb
sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb
subwasm --version

- name: Show Runtime information
shell: bash
run: |
subwasm info ${{ steps.srtool_build.outputs.wasm }}
subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }}
subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-info.json
subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.chain }}-compressed-info.json

- name: Extract the metadata
shell: bash
run: |
subwasm meta ${{ steps.srtool_build.outputs.wasm }}
subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-metadata.json

- name: Check the metadata diff
shell: bash
# the following subwasm call will error for chains that are not known and/or live, that includes shell for instance
run: |
subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} || \
echo "Subwasm call failed, check the logs. This is likely because ${{ matrix.chain }} is not known by subwasm" | \
tee ${{ matrix.chain }}-diff.txt

- name: Archive Subwasm results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: ${{ matrix.chain }}-runtime
path: |
${{ matrix.chain }}-info.json
${{ matrix.chain }}-compressed-info.json
${{ matrix.chain }}-metadata.json
${{ matrix.chain }}-diff.txt
10 changes: 10 additions & 0 deletions .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ build-test-parachain:

# DAG: build-runtime-assets -> build-runtime-collectives -> build-runtime-bridge-hubs
# DAG: build-runtime-assets -> build-runtime-collectives -> build-runtime-contracts
# DAG: build-runtime-assets -> build-runtime-coretime
# DAG: build-runtime-assets -> build-runtime-starters -> build-runtime-testing
build-runtime-assets:
<<: *build-runtime-template
Expand All @@ -235,6 +236,15 @@ build-runtime-collectives:
- job: build-runtime-assets
artifacts: false

build-runtime-coretime:
<<: *build-runtime-template
variables:
RUNTIME_PATH: "cumulus/parachains/runtimes/coretime"
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
needs:
- job: build-runtime-assets
artifacts: false

build-runtime-bridge-hubs:
<<: *build-runtime-template
variables:
Expand Down
14 changes: 14 additions & 0 deletions .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cargo-clippy:
RUSTFLAGS: "-D warnings"
script:
- SKIP_WASM_BUILD=1 cargo clippy --all-targets --locked --workspace
- SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --workspace

check-try-runtime:
stage: check
Expand Down Expand Up @@ -223,6 +224,19 @@ check-runtime-migration-collectives-westend:
URI: "wss://westend-collectives-rpc.polkadot.io:443"
COMMAND_EXTRA_ARGS: "--disable-spec-name-check"

# Check runtime migrations for Parity managed coretime chain
check-runtime-migration-coretime-rococo:
stage: check
extends:
- .docker-env
- .test-pr-refs
- .check-runtime-migration
variables:
NETWORK: "coretime-rococo"
PACKAGE: "coretime-rococo-runtime"
WASM: "coretime_rococo_runtime.compact.compressed.wasm"
URI: "wss://rococo-coretime-rpc.polkadot.io:443"

find-fail-ci-phrase:
stage: check
variables:
Expand Down
10 changes: 10 additions & 0 deletions .gitlab/pipeline/short-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ short-benchmark-collectives-westend:
variables:
RUNTIME_CHAIN: collectives-westend-dev

short-benchmark-coretime-rococo:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: coretime-rococo-dev

short-benchmark-coretime-westend:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: coretime-westend-dev

short-benchmark-glutton-westend:
<<: *short-bench-cumulus
variables:
Expand Down
9 changes: 8 additions & 1 deletion .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,15 @@ node-bench-regression-guard:
artifacts: true
variables:
CI_IMAGE: "paritytech/node-bench-regression-guard:latest"
# current git limit is 20, set to 100 to avoid failures (gitlab removes old artifacts)
GIT_DEPTH: 100
GIT_STRATEGY: fetch
before_script: [""]
script:
- if [ $(ls -la artifacts/benches/ | grep master | wc -l) == 0 ]; then
echo "Couldn't find master artifacts, consider increasing GIT_LIMIT variable";
exit 1;
fi
- echo "------- IMPORTANT -------"
- echo "node-bench-regression-guard depends on the results of a cargo-check-benches job"
- echo "In case of this job failure, check your pipeline's cargo-check-benches"
Expand Down Expand Up @@ -520,6 +527,6 @@ test-syscalls:
- ./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-prepare-worker --only-used-syscalls | diff -u prepare-worker-syscalls -
after_script:
- if [[ "$CI_JOB_STATUS" == "failed" ]]; then
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";
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";
fi
allow_failure: false # this rarely triggers in practice
Loading
Loading