diff --git a/.config/taplo.toml b/.config/taplo.toml
index a45204923cfff1d357da0be5346117acfaf50843..2c6ccfb2b34440686764c39ed6db1c73ed940f06 100644
--- a/.config/taplo.toml
+++ b/.config/taplo.toml
@@ -7,6 +7,7 @@ exclude = [
"polkadot/node/malus/integrationtests/**",
"polkadot/zombienet_tests/**",
"substrate/zombienet/**",
+ "target/**",
]
# global rules
diff --git a/.github/scripts/check-prdoc.py b/.github/scripts/check-prdoc.py
new file mode 100644
index 0000000000000000000000000000000000000000..42b063f2885da148033986dfa49740f2b0416460
--- /dev/null
+++ b/.github/scripts/check-prdoc.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python3
+
+'''
+Ensure that the prdoc files are valid.
+
+# Example
+
+```sh
+python3 -m pip install cargo-workspace
+python3 .github/scripts/check-prdoc.py Cargo.toml prdoc/*.prdoc
+```
+
+Produces example output:
+```pre
+🔎 Reading workspace polkadot-sdk/Cargo.toml
+📦 Checking 32 prdocs against 493 crates.
+✅ All prdocs are valid
+```
+'''
+
+import os
+import yaml
+import argparse
+import cargo_workspace
+
+def check_prdoc_crate_names(root, paths):
+ '''
+ Check that all crates of the `crates` section of each prdoc is present in the workspace.
+ '''
+
+ print(f'🔎 Reading workspace {root}.')
+ workspace = cargo_workspace.Workspace.from_path(root)
+ crate_names = [crate.name for crate in workspace.crates]
+
+ print(f'📦 Checking {len(paths)} prdocs against {len(crate_names)} crates.')
+ faulty = {}
+
+ for path in paths:
+ with open(path, 'r') as f:
+ prdoc = yaml.safe_load(f)
+
+ for crate in prdoc.get('crates', []):
+ crate = crate['name']
+ if crate in crate_names:
+ continue
+
+ faulty.setdefault(path, []).append(crate)
+
+ if len(faulty) == 0:
+ print('✅ All prdocs are valid.')
+ else:
+ print('❌ Some prdocs are invalid.')
+ for path, crates in faulty.items():
+ print(f'💥 {path} lists invalid crate: {", ".join(crates)}')
+ exit(1)
+
+def parse_args():
+ parser = argparse.ArgumentParser(description='Check prdoc files')
+ parser.add_argument('root', help='The cargo workspace manifest', metavar='root', type=str, nargs=1)
+ parser.add_argument('prdoc', help='The prdoc files', metavar='prdoc', type=str, nargs='*')
+ args = parser.parse_args()
+
+ if len(args.prdoc) == 0:
+ print('❌ Need at least one prdoc file as argument.')
+ exit(1)
+
+ return { 'root': os.path.abspath(args.root[0]), 'prdocs': args.prdoc }
+
+if __name__ == '__main__':
+ args = parse_args()
+ check_prdoc_crate_names(args['root'], args['prdocs'])
diff --git a/.github/scripts/check-workspace.py b/.github/scripts/check-workspace.py
index d200122fee9f7035dce8c811e7c24c003d9545a4..1f8f103e4e157a8c1c804a618652741193ca5a00 100644
--- a/.github/scripts/check-workspace.py
+++ b/.github/scripts/check-workspace.py
@@ -18,7 +18,7 @@ def parse_args():
parser.add_argument('workspace_dir', help='The directory to check', metavar='workspace_dir', type=str, nargs=1)
parser.add_argument('--exclude', help='Exclude crate paths from the check', metavar='exclude', type=str, nargs='*', default=[])
-
+
args = parser.parse_args()
return (args.workspace_dir[0], args.exclude)
@@ -26,7 +26,7 @@ def main(root, exclude):
workspace_crates = get_members(root, exclude)
all_crates = get_crates(root, exclude)
print(f'📦 Found {len(all_crates)} crates in total')
-
+
check_duplicates(workspace_crates)
check_missing(workspace_crates, all_crates)
check_links(all_crates)
@@ -48,14 +48,14 @@ def get_members(workspace_dir, exclude):
if not 'members' in root_manifest['workspace']:
return []
-
+
members = []
for member in root_manifest['workspace']['members']:
if member in exclude:
print(f'❌ Excluded member should not appear in the workspace {member}')
sys.exit(1)
members.append(member)
-
+
return members
# List all members of the workspace.
@@ -74,12 +74,12 @@ def get_crates(workspace_dir, exclude_crates) -> dict:
with open(path, "r") as f:
content = f.read()
manifest = toml.loads(content)
-
+
if 'workspace' in manifest:
if root != workspace_dir:
print("⏩ Excluded recursive workspace at %s" % path)
continue
-
+
# Cut off the root path and the trailing /Cargo.toml.
path = path[len(workspace_dir)+1:-11]
name = manifest['package']['name']
@@ -87,7 +87,7 @@ def get_crates(workspace_dir, exclude_crates) -> dict:
print("⏩ Excluded crate %s at %s" % (name, path))
continue
crates[name] = (path, manifest)
-
+
return crates
# Check that there are no duplicate entries in the workspace.
@@ -138,23 +138,23 @@ def check_links(all_crates):
if not 'path' in deps[dep]:
broken.append((name, dep_name, "crate must be linked via `path`"))
return
-
+
def check_crate(deps):
to_checks = ['dependencies', 'dev-dependencies', 'build-dependencies']
for to_check in to_checks:
if to_check in deps:
check_deps(deps[to_check])
-
+
# There could possibly target dependant deps:
if 'target' in manifest:
# Target dependant deps can only have one level of nesting:
for _, target in manifest['target'].items():
check_crate(target)
-
+
check_crate(manifest)
-
+
links.sort()
broken.sort()
diff --git a/.github/scripts/common/lib.sh b/.github/scripts/common/lib.sh
index bd12d9c6e6ff773f8513189a381d725243e53eb5..29dc269ffd23b1f51e1eb2b87a61544de0cbb57f 100755
--- a/.github/scripts/common/lib.sh
+++ b/.github/scripts/common/lib.sh
@@ -237,6 +237,61 @@ fetch_release_artifacts() {
popd > /dev/null
}
+# Fetch the release artifacts like binary and sigantures from S3. Assumes the ENV are set:
+# - RELEASE_ID
+# - GITHUB_TOKEN
+# - REPO in the form paritytech/polkadot
+fetch_release_artifacts_from_s3() {
+ echo "Version : $VERSION"
+ echo "Repo : $REPO"
+ echo "Binary : $BINARY"
+ OUTPUT_DIR=${OUTPUT_DIR:-"./release-artifacts/${BINARY}"}
+ echo "OUTPUT_DIR : $OUTPUT_DIR"
+
+ URL_BASE=$(get_s3_url_base $BINARY)
+ echo "URL_BASE=$URL_BASE"
+
+ URL_BINARY=$URL_BASE/$VERSION/$BINARY
+ URL_SHA=$URL_BASE/$VERSION/$BINARY.sha256
+ URL_ASC=$URL_BASE/$VERSION/$BINARY.asc
+
+ # Fetch artifacts
+ mkdir -p "$OUTPUT_DIR"
+ pushd "$OUTPUT_DIR" > /dev/null
+
+ echo "Fetching artifacts..."
+ for URL in $URL_BINARY $URL_SHA $URL_ASC; do
+ echo "Fetching %s" "$URL"
+ curl --progress-bar -LO "$URL" || echo "Missing $URL"
+ done
+
+ pwd
+ ls -al --color
+ popd > /dev/null
+
+}
+
+# Pass the name of the binary as input, it will
+# return the s3 base url
+function get_s3_url_base() {
+ name=$1
+ case $name in
+ polkadot | polkadot-execute-worker | polkadot-prepare-worker | staking-miner)
+ printf "https://releases.parity.io/polkadot"
+ ;;
+
+ polkadot-parachain)
+ printf "https://releases.parity.io/cumulus"
+ ;;
+
+ *)
+ printf "UNSUPPORTED BINARY $name"
+ exit 1
+ ;;
+ esac
+}
+
+
# Check the checksum for a given binary
function check_sha256() {
echo "Checking SHA256 for $1"
@@ -248,13 +303,11 @@ function check_sha256() {
function import_gpg_keys() {
GPG_KEYSERVER=${GPG_KEYSERVER:-"keyserver.ubuntu.com"}
SEC="9D4B2B6EB8F97156D19669A9FF0812D491B96798"
- WILL="2835EAF92072BC01D188AF2C4A092B93E97CE1E2"
EGOR="E6FC4D4782EB0FA64A4903CCDB7D3555DD3932D3"
- MARA="533C920F40E73A21EEB7E9EBF27AEA7E7594C9CF"
MORGAN="2E92A9D8B15D7891363D1AE8AF9E6C43F7F8C4CF"
echo "Importing GPG keys from $GPG_KEYSERVER in parallel"
- for key in $SEC $WILL $EGOR $MARA $MORGAN; do
+ for key in $SEC $EGOR $MORGAN; do
(
echo "Importing GPG key $key"
gpg --no-tty --quiet --keyserver $GPG_KEYSERVER --recv-keys $key
@@ -344,3 +397,40 @@ function find_runtimes() {
done
echo $JSON
}
+
+# Filter the version matches the particular pattern and return it.
+# input: version (v1.8.0 or v1.8.0-rc1)
+# output: none
+filter_version_from_input() {
+ version=$1
+ regex="(^v[0-9]+\.[0-9]+\.[0-9]+)$|(^v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+)$"
+
+ if [[ $version =~ $regex ]]; then
+ if [ -n "${BASH_REMATCH[1]}" ]; then
+ echo "${BASH_REMATCH[1]}"
+ elif [ -n "${BASH_REMATCH[2]}" ]; then
+ echo "${BASH_REMATCH[2]}"
+ fi
+ else
+ echo "Invalid version: $version"
+ exit 1
+ fi
+
+}
+
+# Check if the release_id is valid number
+# input: release_id
+# output: release_id or exit 1
+check_release_id() {
+ input=$1
+
+ release_id=$(echo "$input" | sed 's/[^0-9]//g')
+
+ if [[ $release_id =~ ^[0-9]+$ ]]; then
+ echo "$release_id"
+ else
+ echo "Invalid release_id from input: $input"
+ exit 1
+ fi
+
+}
diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml
index e1e92d288ceae235d23fa36c31d592092fe8b0ba..c32b6fcf89e06bb56cefc0517e1dcab1d1ef0f37 100644
--- a/.github/workflows/check-licenses.yml
+++ b/.github/workflows/check-licenses.yml
@@ -42,5 +42,4 @@ jobs:
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-licenses ${{ env.LICENSES }} \
- --exclude ./substrate/bin/node-template \
-- ./substrate/**/*.rs
diff --git a/.github/workflows/check-prdoc.yml b/.github/workflows/check-prdoc.yml
index 5503b61d681728b0f1b8adb5af60f9e37b8afee2..c31dee06ec54a0154efc3ad46ff24c79de4d0d7b 100644
--- a/.github/workflows/check-prdoc.yml
+++ b/.github/workflows/check-prdoc.yml
@@ -56,4 +56,12 @@ jobs:
run: |
echo "Checking for PR#${GITHUB_PR}"
echo "You can find more information about PRDoc at $PRDOC_DOC"
- $ENGINE run --rm -v $PWD:/repo $IMAGE check -n ${GITHUB_PR}
+ $ENGINE run --rm -v $PWD:/repo -e RUST_LOG=info $IMAGE check -n ${GITHUB_PR}
+
+ - name: Validate prdoc for PR#${{ github.event.pull_request.number }}
+ if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
+ run: |
+ echo "Validating PR#${GITHUB_PR}"
+ python3 --version
+ python3 -m pip install cargo-workspace==1.2.1
+ python3 .github/scripts/check-prdoc.py Cargo.toml prdoc/pr_${GITHUB_PR}.prdoc
diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml
index ecbac01cd3a5b2aaed679cfaf2ade0b04900531a..67e93ee96574de1f1e3e29f1bf6d90085865100d 100644
--- a/.github/workflows/release-50_publish-docker.yml
+++ b/.github/workflows/release-50_publish-docker.yml
@@ -36,7 +36,7 @@ on:
-H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/$OWNER/$REPO/releases | \
jq '.[] | { name: .name, id: .id }'
required: true
- type: string
+ type: number
registry:
description: Container registry
@@ -61,7 +61,6 @@ permissions:
contents: write
env:
- RELEASE_ID: ${{ inputs.release_id }}
ENGINE: docker
REGISTRY: ${{ inputs.registry }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -71,6 +70,7 @@ env:
# EVENT_ACTION: ${{ github.event.action }}
EVENT_NAME: ${{ github.event_name }}
IMAGE_TYPE: ${{ inputs.image_type }}
+ VERSION: ${{ inputs.version }}
jobs:
fetch-artifacts: # this job will be triggered for the polkadot-parachain rc and release or polkadot rc image build
@@ -95,13 +95,16 @@ jobs:
# chmod a+x $BINARY
# ls -al
- - name: Fetch rc artifacts or release artifacts based on release id
+ - name: Fetch rc artifacts or release artifacts from s3 based on version
#this step runs only if the workflow is triggered manually
if: ${{ env.EVENT_NAME == 'workflow_dispatch' }}
run: |
. ./.github/scripts/common/lib.sh
- fetch_release_artifacts
+ VERSION=$(filter_version_from_input "${{ inputs.version }}")
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
+
+ fetch_release_artifacts_from_s3
- name: Cache the artifacts
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
@@ -147,7 +150,10 @@ jobs:
if: ${{ env.IMAGE_TYPE == 'rc' }}
id: fetch_rc_refs
run: |
- release=release-${{ inputs.release_id }} && \
+ . ./.github/scripts/common/lib.sh
+
+ RELEASE_ID=$(check_release_id "${{ inputs.release_id }}")
+ release=release-$RELEASE_ID && \
echo "release=${release}" >> $GITHUB_OUTPUT
commit=$(git rev-parse --short HEAD) && \
diff --git a/.github/workflows/release-99_notif-published.yml b/.github/workflows/release-99_notif-published.yml
index b35120ca4e128beaa37047b0ac3f21b02f4da663..05c9d6a47f551860c51e318b01b495ca662e902e 100644
--- a/.github/workflows/release-99_notif-published.yml
+++ b/.github/workflows/release-99_notif-published.yml
@@ -8,22 +8,14 @@ on:
jobs:
ping_matrix:
runs-on: ubuntu-latest
+ environment: release
strategy:
matrix:
channel:
# Internal
- - name: 'RelEng: Cumulus Release Coordination'
- room: '!NAEMyPAHWOiOQHsvus:parity.io'
- pre-releases: true
- name: "RelEng: Polkadot Release Coordination"
room: '!cqAmzdIcbOFwrdrubV:parity.io'
pre-release: true
- - name: 'General: Rust, Polkadot, Substrate'
- room: '!aJymqQYtCjjqImFLSb:parity.io'
- pre-release: false
- - name: 'Team: DevOps'
- room: '!lUslSijLMgNcEKcAiE:parity.io'
- pre-release: true
# External
- name: 'Ledger <> Polkadot Coordination'
@@ -31,18 +23,15 @@ jobs:
pre-release: true
# Public
- # - name: '#KusamaValidatorLounge:polkadot.builders'
- # room: '!LhjZccBOqFNYKLdmbb:polkadot.builders'
- # pre-releases: false
- # - name: '#kusama-announcements:matrix.parity.io'
- # room: '!FMwxpQnYhRCNDRsYGI:matrix.parity.io'
- # pre-release: false
- # - name: '#polkadotvalidatorlounge:web3.foundation'
- # room: '!NZrbtteFeqYKCUGQtr:matrix.parity.io'
- # pre-release: false
- # - name: '#polkadot-announcements:matrix.parity.io'
- # room: '!UqHPWiCBGZWxrmYBkF:matrix.parity.io'
- # pre-release: false
+ - name: '#polkadotvalidatorlounge:web3.foundation'
+ room: '!NZrbtteFeqYKCUGQtr:matrix.parity.io'
+ pre-releases: false
+ - name: '#polkadot-announcements:parity.io'
+ room: '!UqHPWiCBGZWxrmYBkF:matrix.parity.io'
+ pre-releases: false
+ - name: '#kusama-announce:parity.io'
+ room: '!FMwxpQnYhRCNDRsYGI:matrix.parity.io'
+ pre-releases: false
steps:
- name: Matrix notification to ${{ matrix.channel.name }}
@@ -53,7 +42,9 @@ jobs:
access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
server: m.parity.io
message: |
- A (pre)release has been ${{github.event.action}} in **${{github.event.repository.full_name}}:**
+ @room
+
+ A new node release has been ${{github.event.action}} in **${{github.event.repository.full_name}}:**
Release version: [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
-----
diff --git a/.gitlab/pipeline/build.yml b/.gitlab/pipeline/build.yml
index 15b4869997be186c71cecbc89060b7591d71ffa3..f8de6135572565d9d16465e68aa3f0bace915cc5 100644
--- a/.gitlab/pipeline/build.yml
+++ b/.gitlab/pipeline/build.yml
@@ -91,7 +91,7 @@ build-rustdoc:
- .run-immediately
variables:
SKIP_WASM_BUILD: 1
- RUSTDOCFLAGS: ""
+ RUSTDOCFLAGS: "--default-theme=ayu --html-in-header ./docs/sdk/headers/header.html --extend-css ./docs/sdk/headers/theme.css"
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
when: on_success
@@ -337,7 +337,7 @@ build-runtimes-polkavm:
- .common-refs
- .run-immediately
script:
- - SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p minimal-runtime
+ - SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p minimal-template-runtime
- SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p westend-runtime
- SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p rococo-runtime
- SUBSTRATE_RUNTIME_TARGET=riscv cargo check -p polkadot-test-runtime
diff --git a/.gitlab/pipeline/check.yml b/.gitlab/pipeline/check.yml
index 1ed12e68c2ce19b67dd5aca03cec85702351c039..52da33550508ede16c9577346e6985d869b5e8ae 100644
--- a/.gitlab/pipeline/check.yml
+++ b/.gitlab/pipeline/check.yml
@@ -108,8 +108,10 @@ check-toml-format:
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Downloading try-runtime CLI ----------"
- curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime
+ curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x ./try-runtime
+ echo "Using try-runtime-cli version:"
+ ./try-runtime --version
echo "---------- Building ${PACKAGE} runtime ----------"
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
@@ -133,6 +135,7 @@ check-runtime-migration-westend:
WASM: "westend_runtime.compact.compressed.wasm"
URI: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
SUBCOMMAND_EXTRA_ARGS: "--no-weight-warnings"
+ allow_failure: true
check-runtime-migration-rococo:
stage: check
@@ -256,3 +259,19 @@ find-fail-ci-phrase:
echo "No $ASSERT_REGEX was found, exiting with 0";
exit 0;
fi
+
+check-core-crypto-features:
+ stage: check
+ extends:
+ - .docker-env
+ - .common-refs
+ script:
+ - pushd substrate/primitives/core
+ - ./check-features-variants.sh
+ - popd
+ - pushd substrate/primitives/application-crypto
+ - ./check-features-variants.sh
+ - popd
+ - pushd substrate/primitives/keyring
+ - ./check-features-variants.sh
+ - popd
diff --git a/.gitlab/pipeline/test.yml b/.gitlab/pipeline/test.yml
index b5e26d194896aad7839dce34460409fe9ceaa045..5c41a3e6e08fae521c41a66735ac54df51e39057 100644
--- a/.gitlab/pipeline/test.yml
+++ b/.gitlab/pipeline/test.yml
@@ -25,6 +25,7 @@ test-linux-stable:
# "upgrade_version_checks_should_work" is currently failing
- |
time cargo nextest run \
+ --filter-expr 'not deps(/polkadot-subsystem-bench/)' \
--workspace \
--locked \
--release \
@@ -48,6 +49,7 @@ test-linux-stable:
- target/nextest/default/junit.xml
reports:
junit: target/nextest/default/junit.xml
+ timeout: 90m
test-linux-oldkernel-stable:
extends: test-linux-stable
@@ -68,7 +70,7 @@ test-linux-stable-runtime-benchmarks:
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
script:
- - time cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet
+ - time cargo nextest run --filter-expr 'not deps(/polkadot-subsystem-bench/)' --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet
# can be used to run all tests
# test-linux-stable-all:
diff --git a/.gitlab/pipeline/zombienet/polkadot.yml b/.gitlab/pipeline/zombienet/polkadot.yml
index 54eb6db48cae63d9cfb08cf7da61125028904371..97572f029d0020f090a8fd16839028ac9f088cf9 100644
--- a/.gitlab/pipeline/zombienet/polkadot.yml
+++ b/.gitlab/pipeline/zombienet/polkadot.yml
@@ -158,6 +158,14 @@ zombienet-polkadot-functional-0011-async-backing-6-seconds-rate:
--local-dir="${LOCAL_DIR}/functional"
--test="0011-async-backing-6-seconds-rate.zndsl"
+zombienet-polkadot-functional-0012-elastic-scaling-mvp:
+ extends:
+ - .zombienet-polkadot-common
+ script:
+ - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
+ --local-dir="${LOCAL_DIR}/functional"
+ --test="0012-elastic-scaling-mvp.zndsl"
+
zombienet-polkadot-smoke-0001-parachains-smoke-test:
extends:
- .zombienet-polkadot-common
diff --git a/Cargo.lock b/Cargo.lock
index 1fb63b6ecf76f89ba613955a88d4d273bf60b662..7f5f7d6cbcb54a478e077f7d5d22fbc96859734d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -191,7 +191,7 @@ checksum = "c0391754c09fab4eae3404d19d0d297aa1c670c1775ab51d8a5312afeca23157"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -206,7 +206,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
"syn-solidity",
"tiny-keccak",
]
@@ -322,6 +322,20 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "aquamarine"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760"
+dependencies = [
+ "include_dir",
+ "itertools 0.10.5",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "aquamarine"
version = "0.5.0"
@@ -333,7 +347,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -730,12 +744,6 @@ dependencies = [
"nodrop",
]
-[[package]]
-name = "arrayvec"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
-
[[package]]
name = "arrayvec"
version = "0.7.4"
@@ -1050,11 +1058,11 @@ dependencies = [
"frame-support",
"frame-system",
"hex-literal",
- "pallet-asset-conversion",
"pallet-assets",
"pallet-balances",
"pallet-collator-selection",
"pallet-session",
+ "pallet-timestamp",
"pallet-xcm",
"pallet-xcm-bridge-hub-router",
"parachains-common",
@@ -1218,7 +1226,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -1235,7 +1243,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -1320,7 +1328,7 @@ dependencies = [
"ark-std 0.4.0",
"dleq_vrf",
"fflonk",
- "merlin 3.0.0",
+ "merlin",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
"ring 0.1.0",
@@ -1417,7 +1425,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -1426,9 +1434,7 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f"
dependencies = [
- "bitcoin_hashes",
- "rand",
- "rand_core 0.6.4",
+ "bitcoin_hashes 0.11.0",
"serde",
"unicode-normalization",
]
@@ -1448,12 +1454,28 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+[[package]]
+name = "bitcoin-internals"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb"
+
[[package]]
name = "bitcoin_hashes"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4"
+[[package]]
+name = "bitcoin_hashes"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b"
+dependencies = [
+ "bitcoin-internals",
+ "hex-conservative",
+]
+
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -1545,18 +1567,6 @@ dependencies = [
"constant_time_eq 0.3.0",
]
-[[package]]
-name = "block-buffer"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
-dependencies = [
- "block-padding",
- "byte-tools",
- "byteorder",
- "generic-array 0.12.4",
-]
-
[[package]]
name = "block-buffer"
version = "0.9.0"
@@ -1575,15 +1585,6 @@ dependencies = [
"generic-array 0.14.7",
]
-[[package]]
-name = "block-padding"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
-dependencies = [
- "byte-tools",
-]
-
[[package]]
name = "blocking"
version = "1.3.1"
@@ -2100,6 +2101,7 @@ dependencies = [
"pallet-bridge-messages",
"pallet-bridge-parachains",
"pallet-bridge-relayers",
+ "pallet-timestamp",
"pallet-utility",
"parachains-common",
"parachains-runtimes-test-utils",
@@ -2619,9 +2621,9 @@ dependencies = [
[[package]]
name = "clap-num"
-version = "1.0.2"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "488557e97528174edaa2ee268b23a809e0c598213a4bbcb4f34575a46fda147e"
+checksum = "0e063d263364859dc54fb064cedb7c122740cd4733644b14b176c097f51e8ab7"
dependencies = [
"num-traits",
]
@@ -2670,7 +2672,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -2839,11 +2841,10 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
[[package]]
name = "colored"
-version = "2.0.4"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6"
+checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
dependencies = [
- "is-terminal",
"lazy_static",
"windows-sys 0.48.0",
]
@@ -2871,7 +2872,7 @@ dependencies = [
"ark-std 0.4.0",
"fflonk",
"getrandom_or_panic",
- "merlin 3.0.0",
+ "merlin",
"rand_chacha 0.3.1",
]
@@ -3511,16 +3512,6 @@ dependencies = [
"subtle 2.5.0",
]
-[[package]]
-name = "crypto-mac"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e"
-dependencies = [
- "generic-array 0.14.7",
- "subtle 2.5.0",
-]
-
[[package]]
name = "ctr"
version = "0.7.0"
@@ -3873,6 +3864,7 @@ dependencies = [
"pallet-message-queue",
"parity-scale-codec",
"polkadot-parachain-primitives",
+ "polkadot-runtime-common",
"polkadot-runtime-parachains",
"rand",
"sc-client-api",
@@ -3901,7 +3893,7 @@ dependencies = [
"proc-macro-crate 3.0.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -4046,6 +4038,25 @@ dependencies = [
"sp-trie",
]
+[[package]]
+name = "cumulus-primitives-storage-weight-reclaim"
+version = "1.0.0"
+dependencies = [
+ "cumulus-primitives-core",
+ "cumulus-primitives-proof-size-hostfunction",
+ "cumulus-test-runtime",
+ "docify 0.2.7",
+ "frame-support",
+ "frame-system",
+ "log",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-io",
+ "sp-runtime",
+ "sp-std 14.0.0",
+ "sp-trie",
+]
+
[[package]]
name = "cumulus-primitives-timestamp"
version = "0.7.0"
@@ -4066,7 +4077,6 @@ dependencies = [
"frame-support",
"log",
"pallet-asset-conversion",
- "pallet-xcm-benchmarks",
"parity-scale-codec",
"polkadot-runtime-common",
"polkadot-runtime-parachains",
@@ -4146,6 +4156,7 @@ dependencies = [
"polkadot-node-subsystem-util",
"polkadot-overseer",
"polkadot-primitives",
+ "polkadot-service",
"sc-authority-discovery",
"sc-client-api",
"sc-network",
@@ -4208,6 +4219,7 @@ dependencies = [
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
"cumulus-primitives-proof-size-hostfunction",
+ "cumulus-primitives-storage-weight-reclaim",
"cumulus-test-relay-sproof-builder",
"cumulus-test-runtime",
"cumulus-test-service",
@@ -4252,6 +4264,7 @@ version = "0.1.0"
dependencies = [
"cumulus-pallet-parachain-system",
"cumulus-primitives-core",
+ "cumulus-primitives-storage-weight-reclaim",
"frame-executive",
"frame-support",
"frame-system",
@@ -4294,6 +4307,7 @@ dependencies = [
"cumulus-client-service",
"cumulus-pallet-parachain-system",
"cumulus-primitives-core",
+ "cumulus-primitives-storage-weight-reclaim",
"cumulus-relay-chain-inprocess-interface",
"cumulus-relay-chain-interface",
"cumulus-relay-chain-minimal-node",
@@ -4356,19 +4370,6 @@ dependencies = [
"url",
]
-[[package]]
-name = "curve25519-dalek"
-version = "2.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216"
-dependencies = [
- "byteorder",
- "digest 0.8.1",
- "rand_core 0.5.1",
- "subtle 2.5.0",
- "zeroize",
-]
-
[[package]]
name = "curve25519-dalek"
version = "3.2.0"
@@ -4407,7 +4408,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -4447,7 +4448,7 @@ dependencies = [
"proc-macro2",
"quote",
"scratch",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -4464,7 +4465,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -4672,7 +4673,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -4712,13 +4713,39 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
+[[package]]
+name = "docify"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1b04e6ef3d21119d3eb7b032bca17f99fe041e9c072f30f32cc0e1a2b1f3c4"
+dependencies = [
+ "docify_macros 0.1.16",
+]
+
[[package]]
name = "docify"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2"
dependencies = [
- "docify_macros",
+ "docify_macros 0.2.7",
+]
+
+[[package]]
+name = "docify_macros"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b5610df7f2acf89a1bb5d1a66ae56b1c7fcdcfe3948856fb3ace3f644d70eb7"
+dependencies = [
+ "common-path",
+ "derive-syn-parse",
+ "lazy_static",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "syn 2.0.50",
+ "termcolor",
+ "walkdir",
]
[[package]]
@@ -4733,7 +4760,7 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
- "syn 2.0.49",
+ "syn 2.0.50",
"termcolor",
"toml 0.8.8",
"walkdir",
@@ -4800,6 +4827,7 @@ dependencies = [
"digest 0.10.7",
"elliptic-curve",
"rfc6979",
+ "serdect",
"signature",
"spki",
]
@@ -4866,9 +4894,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "elliptic-curve"
-version = "0.13.5"
+version = "0.13.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b"
+checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
dependencies = [
"base16ct",
"crypto-bigint",
@@ -4879,6 +4907,7 @@ dependencies = [
"pkcs8",
"rand_core 0.6.4",
"sec1",
+ "serdect",
"subtle 2.5.0",
"zeroize",
]
@@ -4958,7 +4987,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -4969,7 +4998,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -5159,7 +5188,7 @@ dependencies = [
"fs-err",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -5172,12 +5201,6 @@ dependencies = [
"once_cell",
]
-[[package]]
-name = "fake-simd"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
-
[[package]]
name = "fallible-iterator"
version = "0.2.0"
@@ -5287,7 +5310,7 @@ dependencies = [
"ark-poly",
"ark-serialize 0.4.2",
"ark-std 0.4.0",
- "merlin 3.0.0",
+ "merlin",
]
[[package]]
@@ -5427,7 +5450,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
name = "frame"
version = "0.0.1-dev"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-executive",
"frame-support",
"frame-system",
@@ -5552,7 +5575,7 @@ dependencies = [
"quote",
"scale-info",
"sp-arithmetic",
- "syn 2.0.49",
+ "syn 2.0.50",
"trybuild",
]
@@ -5595,6 +5618,7 @@ dependencies = [
name = "frame-executive"
version = "28.0.0"
dependencies = [
+ "aquamarine 0.3.3",
"array-bytes 6.1.0",
"frame-support",
"frame-system",
@@ -5651,11 +5675,11 @@ dependencies = [
name = "frame-support"
version = "28.0.0"
dependencies = [
- "aquamarine",
+ "aquamarine 0.5.0",
"array-bytes 6.1.0",
"assert_matches",
"bitflags 1.3.2",
- "docify",
+ "docify 0.2.7",
"environmental",
"frame-metadata",
"frame-support-procedural",
@@ -5685,6 +5709,7 @@ dependencies = [
"sp-staking",
"sp-state-machine",
"sp-std 14.0.0",
+ "sp-timestamp",
"sp-tracing 16.0.0",
"sp-weights",
"static_assertions",
@@ -5707,7 +5732,7 @@ dependencies = [
"quote",
"regex",
"sp-crypto-hashing",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -5718,7 +5743,7 @@ dependencies = [
"proc-macro-crate 3.0.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -5727,7 +5752,7 @@ version = "11.0.0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -5798,7 +5823,7 @@ version = "28.0.0"
dependencies = [
"cfg-if",
"criterion 0.4.0",
- "docify",
+ "docify 0.2.7",
"frame-support",
"log",
"parity-scale-codec",
@@ -5960,7 +5985,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -6243,9 +6268,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
[[package]]
name = "handlebars"
-version = "4.3.7"
+version = "5.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d"
+checksum = "ab283476b99e66691dee3f1640fea91487a8d81f50fb5ecc75538f8f8879a1e4"
dependencies = [
"log",
"pest",
@@ -6335,6 +6360,12 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+[[package]]
+name = "hex-conservative"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30ed443af458ccb6d81c1e7e661545f94d3176752fb1df2f543b902a1e0f51e2"
+
[[package]]
name = "hex-literal"
version = "0.4.1"
@@ -6360,16 +6391,6 @@ dependencies = [
"digest 0.9.0",
]
-[[package]]
-name = "hmac"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
-dependencies = [
- "crypto-mac 0.11.0",
- "digest 0.9.0",
-]
-
[[package]]
name = "hmac"
version = "0.12.1"
@@ -6970,14 +6991,15 @@ dependencies = [
[[package]]
name = "k256"
-version = "0.13.1"
+version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc"
+checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b"
dependencies = [
"cfg-if",
"ecdsa",
"elliptic-curve",
"once_cell",
+ "serdect",
"sha2 0.10.7",
]
@@ -7057,6 +7079,7 @@ dependencies = [
"pallet-lottery",
"pallet-membership",
"pallet-message-queue",
+ "pallet-migrations",
"pallet-mixnet",
"pallet-mmr",
"pallet-multisig",
@@ -7901,7 +7924,7 @@ dependencies = [
"macro_magic_core",
"macro_magic_macros",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -7915,7 +7938,7 @@ dependencies = [
"macro_magic_core_macros",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -7926,7 +7949,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -7937,7 +7960,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3"
dependencies = [
"macro_magic_core",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -8055,18 +8078,6 @@ dependencies = [
"hash-db",
]
-[[package]]
-name = "merlin"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42"
-dependencies = [
- "byteorder",
- "keccak",
- "rand_core 0.5.1",
- "zeroize",
-]
-
[[package]]
name = "merlin"
version = "3.0.0"
@@ -8103,15 +8114,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
-name = "minimal-node"
-version = "4.0.0-dev"
+name = "minimal-template-node"
+version = "0.0.0"
dependencies = [
"clap 4.5.1",
"frame",
"futures",
"futures-timer",
"jsonrpsee",
- "minimal-runtime",
+ "minimal-template-runtime",
"sc-basic-authorship",
"sc-cli",
"sc-client-api",
@@ -8138,12 +8149,12 @@ dependencies = [
]
[[package]]
-name = "minimal-runtime"
-version = "0.1.0"
+name = "minimal-template-runtime"
+version = "0.0.0"
dependencies = [
"frame",
- "frame-support",
"pallet-balances",
+ "pallet-minimal-template",
"pallet-sudo",
"pallet-timestamp",
"pallet-transaction-payment",
@@ -8165,9 +8176,9 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.8"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
+checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
@@ -8657,50 +8668,6 @@ dependencies = [
"kitchensink-runtime",
]
-[[package]]
-name = "node-template"
-version = "4.0.0-dev"
-dependencies = [
- "clap 4.5.1",
- "frame-benchmarking",
- "frame-benchmarking-cli",
- "frame-system",
- "futures",
- "jsonrpsee",
- "node-template-runtime",
- "pallet-transaction-payment",
- "pallet-transaction-payment-rpc",
- "sc-basic-authorship",
- "sc-cli",
- "sc-client-api",
- "sc-consensus",
- "sc-consensus-aura",
- "sc-consensus-grandpa",
- "sc-executor",
- "sc-network",
- "sc-offchain",
- "sc-rpc-api",
- "sc-service",
- "sc-telemetry",
- "sc-transaction-pool",
- "sc-transaction-pool-api",
- "serde_json",
- "sp-api",
- "sp-block-builder",
- "sp-blockchain",
- "sp-consensus-aura",
- "sp-consensus-grandpa",
- "sp-core",
- "sp-inherents",
- "sp-io",
- "sp-keyring",
- "sp-runtime",
- "sp-timestamp",
- "substrate-build-script-utils",
- "substrate-frame-rpc-system",
- "try-runtime-cli",
-]
-
[[package]]
name = "node-template-release"
version = "3.0.0"
@@ -8715,45 +8682,6 @@ dependencies = [
"toml_edit 0.19.15",
]
-[[package]]
-name = "node-template-runtime"
-version = "4.0.0-dev"
-dependencies = [
- "frame-benchmarking",
- "frame-executive",
- "frame-support",
- "frame-system",
- "frame-system-benchmarking",
- "frame-system-rpc-runtime-api",
- "frame-try-runtime",
- "pallet-aura",
- "pallet-balances",
- "pallet-grandpa",
- "pallet-sudo",
- "pallet-template",
- "pallet-timestamp",
- "pallet-transaction-payment",
- "pallet-transaction-payment-rpc-runtime-api",
- "parity-scale-codec",
- "scale-info",
- "serde_json",
- "sp-api",
- "sp-block-builder",
- "sp-consensus-aura",
- "sp-consensus-grandpa",
- "sp-core",
- "sp-genesis-builder",
- "sp-inherents",
- "sp-offchain",
- "sp-runtime",
- "sp-session",
- "sp-std 14.0.0",
- "sp-storage 19.0.0",
- "sp-transaction-pool",
- "sp-version",
- "substrate-wasm-builder",
-]
-
[[package]]
name = "node-testing"
version = "3.0.0-dev"
@@ -9277,8 +9205,8 @@ dependencies = [
name = "pallet-bags-list"
version = "27.0.0"
dependencies = [
- "aquamarine",
- "docify",
+ "aquamarine 0.5.0",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-election-provider-support",
"frame-support",
@@ -9326,7 +9254,7 @@ dependencies = [
name = "pallet-balances"
version = "28.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -9563,7 +9491,7 @@ dependencies = [
name = "pallet-collective"
version = "28.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -9649,7 +9577,6 @@ dependencies = [
"tempfile",
"toml 0.8.8",
"twox-hash",
- "wat",
]
[[package]]
@@ -9696,7 +9623,7 @@ version = "18.0.0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -9943,6 +9870,26 @@ dependencies = [
"sp-std 14.0.0",
]
+[[package]]
+name = "pallet-example-single-block-migrations"
+version = "0.0.1"
+dependencies = [
+ "docify 0.2.7",
+ "frame-executive",
+ "frame-support",
+ "frame-system",
+ "frame-try-runtime",
+ "log",
+ "pallet-balances",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std 14.0.0",
+ "sp-version",
+]
+
[[package]]
name = "pallet-example-split"
version = "10.0.0"
@@ -9984,6 +9931,7 @@ dependencies = [
"pallet-example-frame-crate",
"pallet-example-kitchensink",
"pallet-example-offchain-worker",
+ "pallet-example-single-block-migrations",
"pallet-example-split",
"pallet-example-tasks",
]
@@ -9992,7 +9940,7 @@ dependencies = [
name = "pallet-fast-unstake"
version = "27.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-election-provider-support",
"frame-support",
@@ -10189,6 +10137,39 @@ dependencies = [
"sp-weights",
]
+[[package]]
+name = "pallet-migrations"
+version = "1.0.0"
+dependencies = [
+ "docify 0.1.16",
+ "frame-benchmarking",
+ "frame-executive",
+ "frame-support",
+ "frame-system",
+ "impl-trait-for-tuples",
+ "log",
+ "parity-scale-codec",
+ "pretty_assertions",
+ "scale-info",
+ "sp-api",
+ "sp-block-builder",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std 14.0.0",
+ "sp-tracing 16.0.0",
+ "sp-version",
+]
+
+[[package]]
+name = "pallet-minimal-template"
+version = "0.0.0"
+dependencies = [
+ "frame",
+ "parity-scale-codec",
+ "scale-info",
+]
+
[[package]]
name = "pallet-mixnet"
version = "0.4.0"
@@ -10464,7 +10445,7 @@ dependencies = [
name = "pallet-paged-list"
version = "0.6.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -10490,14 +10471,13 @@ dependencies = [
[[package]]
name = "pallet-parachain-template"
-version = "0.7.0"
+version = "0.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"parity-scale-codec",
"scale-info",
- "serde",
"sp-core",
"sp-io",
"sp-runtime",
@@ -10507,7 +10487,7 @@ dependencies = [
name = "pallet-parameters"
version = "0.0.1"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -10668,7 +10648,7 @@ dependencies = [
name = "pallet-safe-mode"
version = "9.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -10725,7 +10705,7 @@ dependencies = [
name = "pallet-scheduler"
version = "29.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -10871,7 +10851,7 @@ dependencies = [
"proc-macro2",
"quote",
"sp-runtime",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -10938,7 +10918,7 @@ dependencies = [
name = "pallet-sudo"
version = "28.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -10952,7 +10932,7 @@ dependencies = [
[[package]]
name = "pallet-template"
-version = "4.0.0-dev"
+version = "0.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -10962,14 +10942,13 @@ dependencies = [
"sp-core",
"sp-io",
"sp-runtime",
- "sp-std 14.0.0",
]
[[package]]
name = "pallet-timestamp"
version = "27.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -11073,7 +11052,7 @@ dependencies = [
name = "pallet-treasury"
version = "27.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -11093,7 +11072,7 @@ dependencies = [
name = "pallet-tx-pause"
version = "9.0.0"
dependencies = [
- "docify",
+ "docify 0.2.7",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -11275,7 +11254,7 @@ dependencies = [
[[package]]
name = "parachain-template-node"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"clap 4.5.1",
"color-print",
@@ -11333,7 +11312,7 @@ dependencies = [
[[package]]
name = "parachain-template-runtime"
-version = "0.7.0"
+version = "0.0.0"
dependencies = [
"cumulus-pallet-aura-ext",
"cumulus-pallet-parachain-system",
@@ -11341,6 +11320,7 @@ dependencies = [
"cumulus-pallet-xcm",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
+ "cumulus-primitives-storage-weight-reclaim",
"cumulus-primitives-utility",
"frame-benchmarking",
"frame-executive",
@@ -11433,6 +11413,7 @@ dependencies = [
"pallet-balances",
"pallet-collator-selection",
"pallet-session",
+ "pallet-timestamp",
"pallet-xcm",
"parity-scale-codec",
"polkadot-parachain-primitives",
@@ -11448,6 +11429,19 @@ dependencies = [
"substrate-wasm-builder",
]
+[[package]]
+name = "parity-bip39"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9"
+dependencies = [
+ "bitcoin_hashes 0.13.0",
+ "rand",
+ "rand_core 0.6.4",
+ "serde",
+ "unicode-normalization",
+]
+
[[package]]
name = "parity-bytes"
version = "0.1.2"
@@ -11603,19 +11597,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156"
[[package]]
-name = "paste"
-version = "1.0.14"
+name = "password-hash"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
+checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166"
+dependencies = [
+ "base64ct",
+ "rand_core 0.6.4",
+ "subtle 2.5.0",
+]
[[package]]
-name = "pbkdf2"
-version = "0.8.0"
+name = "paste"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
-dependencies = [
- "crypto-mac 0.11.0",
-]
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
[[package]]
name = "pbkdf2"
@@ -11624,6 +11620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
dependencies = [
"digest 0.10.7",
+ "password-hash",
]
[[package]]
@@ -11714,7 +11711,6 @@ dependencies = [
"staging-xcm-builder",
"staging-xcm-executor",
"substrate-wasm-builder",
- "testnet-parachains-constants",
]
[[package]]
@@ -11951,7 +11947,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -11992,7 +11988,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -12158,6 +12154,7 @@ dependencies = [
"polkadot-node-subsystem-util",
"polkadot-primitives",
"polkadot-primitives-test-helpers",
+ "polkadot-subsystem-bench",
"rand",
"sc-network",
"schnellru",
@@ -12189,6 +12186,7 @@ dependencies = [
"polkadot-node-subsystem-util",
"polkadot-primitives",
"polkadot-primitives-test-helpers",
+ "polkadot-subsystem-bench",
"rand",
"sc-network",
"schnellru",
@@ -12414,7 +12412,7 @@ dependencies = [
"kvdb",
"kvdb-memorydb",
"log",
- "merlin 3.0.0",
+ "merlin",
"parity-scale-codec",
"parking_lot 0.12.1",
"polkadot-node-jaeger",
@@ -12489,7 +12487,9 @@ dependencies = [
"polkadot-primitives",
"polkadot-primitives-test-helpers",
"polkadot-statement-table",
+ "rstest",
"sc-keystore",
+ "schnellru",
"sp-application-crypto",
"sp-core",
"sp-keyring",
@@ -12641,6 +12641,7 @@ dependencies = [
"polkadot-node-subsystem-util",
"polkadot-primitives",
"polkadot-primitives-test-helpers",
+ "rstest",
"sc-keystore",
"sp-application-crypto",
"sp-core",
@@ -12664,6 +12665,8 @@ dependencies = [
"polkadot-node-subsystem-util",
"polkadot-primitives",
"polkadot-primitives-test-helpers",
+ "rstest",
+ "schnellru",
"sp-application-crypto",
"sp-keystore",
"thiserror",
@@ -13159,6 +13162,7 @@ version = "7.0.0"
dependencies = [
"bitvec",
"hex-literal",
+ "log",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain-primitives",
@@ -13251,7 +13255,6 @@ dependencies = [
"pallet-transaction-payment",
"pallet-treasury",
"pallet-vesting",
- "pallet-xcm-benchmarks",
"parity-scale-codec",
"polkadot-primitives",
"polkadot-primitives-test-helpers",
@@ -13325,6 +13328,7 @@ dependencies = [
"polkadot-runtime-metrics",
"rand",
"rand_chacha 0.3.1",
+ "rstest",
"rustc-hex",
"sc-keystore",
"scale-info",
@@ -13356,13 +13360,28 @@ version = "0.0.1"
dependencies = [
"cumulus-pallet-aura-ext",
"cumulus-pallet-parachain-system",
- "docify",
+ "docify 0.2.7",
"frame",
+ "frame-executive",
+ "frame-support",
+ "frame-system",
"kitchensink-runtime",
+ "pallet-assets",
"pallet-aura",
+ "pallet-authorship",
+ "pallet-balances",
+ "pallet-collective",
"pallet-default-config-example",
+ "pallet-democracy",
+ "pallet-example-offchain-worker",
+ "pallet-example-single-block-migrations",
"pallet-examples",
+ "pallet-multisig",
+ "pallet-proxy",
+ "pallet-scheduler",
"pallet-timestamp",
+ "pallet-transaction-payment",
+ "pallet-utility",
"parity-scale-codec",
"sc-cli",
"sc-client-db",
@@ -13381,7 +13400,9 @@ dependencies = [
"sp-core",
"sp-io",
"sp-keyring",
+ "sp-offchain",
"sp-runtime",
+ "sp-version",
"staging-chain-spec-builder",
"staging-node-cli",
"staging-parachain-info",
@@ -13396,6 +13417,7 @@ version = "7.0.0"
dependencies = [
"assert_matches",
"async-trait",
+ "bitvec",
"env_logger 0.9.3",
"frame-benchmarking",
"frame-benchmarking-cli",
@@ -13556,6 +13578,7 @@ dependencies = [
"parity-scale-codec",
"polkadot-primitives",
"sp-core",
+ "tracing-gum",
]
[[package]]
@@ -13608,7 +13631,7 @@ dependencies = [
"sc-keystore",
"sc-network",
"sc-service",
- "schnorrkel 0.9.1",
+ "schnorrkel 0.11.4",
"serde",
"serde_yaml",
"sha1",
@@ -13813,6 +13836,28 @@ dependencies = [
"westend-runtime",
]
+[[package]]
+name = "polkavm"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a3693e5efdb2bf74e449cd25fd777a28bd7ed87e41f5d5da75eb31b4de48b94"
+dependencies = [
+ "libc",
+ "log",
+ "polkavm-assembler",
+ "polkavm-common 0.9.0",
+ "polkavm-linux-raw",
+]
+
+[[package]]
+name = "polkavm-assembler"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fa96d6d868243acc12de813dd48e756cbadcc8e13964c70d272753266deadc1"
+dependencies = [
+ "log",
+]
+
[[package]]
name = "polkavm-common"
version = "0.5.0"
@@ -13821,9 +13866,12 @@ checksum = "88b4e215c80fe876147f3d58158d5dfeae7dabdd6047e175af77095b78d0035c"
[[package]]
name = "polkavm-common"
-version = "0.8.0"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92c99f7eee94e7be43ba37eef65ad0ee8cbaf89b7c00001c3f6d2be985cb1817"
+checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92"
+dependencies = [
+ "log",
+]
[[package]]
name = "polkavm-derive"
@@ -13832,14 +13880,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6380dbe1fb03ecc74ad55d841cfc75480222d153ba69ddcb00977866cbdabdb8"
dependencies = [
"polkavm-derive-impl 0.5.0",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
name = "polkavm-derive"
-version = "0.8.0"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79fa916f7962348bd1bb1a65a83401675e6fc86c51a0fdbcf92a3108e58e6125"
+checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606"
dependencies = [
"polkavm-derive-impl-macro",
]
@@ -13853,29 +13901,29 @@ dependencies = [
"polkavm-common 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
name = "polkavm-derive-impl"
-version = "0.8.0"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c10b2654a8a10a83c260bfb93e97b262cf0017494ab94a65d389e0eda6de6c9c"
+checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c"
dependencies = [
- "polkavm-common 0.8.0",
+ "polkavm-common 0.9.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
name = "polkavm-derive-impl-macro"
-version = "0.8.0"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66"
+checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429"
dependencies = [
- "polkavm-derive-impl 0.8.0",
- "syn 2.0.49",
+ "polkavm-derive-impl 0.9.0",
+ "syn 2.0.50",
]
[[package]]
@@ -13895,19 +13943,25 @@ dependencies = [
[[package]]
name = "polkavm-linker"
-version = "0.8.2"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fdec1451cb18261d5d01de82acc15305e417fb59588cdcb3127d3dcc9672b925"
+checksum = "9c7be503e60cf56c0eb785f90aaba4b583b36bff00e93997d93fef97f9553c39"
dependencies = [
"gimli 0.28.0",
"hashbrown 0.14.3",
"log",
"object 0.32.2",
- "polkavm-common 0.8.0",
+ "polkavm-common 0.9.0",
"regalloc2 0.9.3",
"rustc-demangle",
]
+[[package]]
+name = "polkavm-linux-raw"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26e85d3456948e650dff0cfc85603915847faf893ed1e66b020bb82ef4557120"
+
[[package]]
name = "polling"
version = "2.8.0"
@@ -14080,7 +14134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62"
dependencies = [
"proc-macro2",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -14171,7 +14225,7 @@ checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -14243,7 +14297,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -14343,7 +14397,7 @@ dependencies = [
"itertools 0.11.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -14686,7 +14740,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -14764,6 +14818,12 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
+[[package]]
+name = "relative-path"
+version = "1.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc"
+
[[package]]
name = "remote-ext-tests-bags-list"
version = "1.0.0"
@@ -14851,7 +14911,7 @@ dependencies = [
"blake2 0.10.6",
"common",
"fflonk",
- "merlin 3.0.0",
+ "merlin",
]
[[package]]
@@ -15146,6 +15206,35 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "rstest"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199"
+dependencies = [
+ "futures",
+ "futures-timer",
+ "rstest_macros",
+ "rustc_version 0.4.0",
+]
+
+[[package]]
+name = "rstest_macros"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605"
+dependencies = [
+ "cfg-if",
+ "glob",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "relative-path",
+ "rustc_version 0.4.0",
+ "syn 2.0.50",
+ "unicode-ident",
+]
+
[[package]]
name = "rtnetlink"
version = "0.10.1"
@@ -15565,7 +15654,7 @@ name = "sc-chain-spec"
version = "27.0.0"
dependencies = [
"array-bytes 6.1.0",
- "docify",
+ "docify 0.2.7",
"log",
"memmap2 0.9.3",
"parity-scale-codec",
@@ -15596,7 +15685,7 @@ dependencies = [
"proc-macro-crate 3.0.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -15604,7 +15693,6 @@ name = "sc-cli"
version = "0.36.0"
dependencies = [
"array-bytes 6.1.0",
- "bip39",
"chrono",
"clap 4.5.1",
"fdlimit",
@@ -15614,6 +15702,7 @@ dependencies = [
"libp2p-identity",
"log",
"names",
+ "parity-bip39",
"parity-scale-codec",
"rand",
"regex",
@@ -16085,6 +16174,7 @@ dependencies = [
"paste",
"regex",
"sc-executor-common",
+ "sc-executor-polkavm",
"sc-executor-wasmtime",
"sc-runtime-test",
"sc-tracing",
@@ -16114,6 +16204,7 @@ dependencies = [
name = "sc-executor-common"
version = "0.29.0"
dependencies = [
+ "polkavm",
"sc-allocator",
"sp-maybe-compressed-blob",
"sp-wasm-interface 20.0.0",
@@ -16121,6 +16212,16 @@ dependencies = [
"wasm-instrument",
]
+[[package]]
+name = "sc-executor-polkavm"
+version = "0.29.0"
+dependencies = [
+ "log",
+ "polkavm",
+ "sc-executor-common",
+ "sp-wasm-interface 20.0.0",
+]
+
[[package]]
name = "sc-executor-wasmtime"
version = "0.29.0"
@@ -16568,7 +16669,6 @@ dependencies = [
"hyper",
"jsonrpsee",
"log",
- "pin-project",
"serde_json",
"substrate-prometheus-endpoint",
"tokio",
@@ -16667,6 +16767,7 @@ dependencies = [
"sc-transaction-pool",
"sc-transaction-pool-api",
"sc-utils",
+ "schnellru",
"serde",
"serde_json",
"sp-api",
@@ -16866,7 +16967,7 @@ dependencies = [
"proc-macro-crate 3.0.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -17004,22 +17105,6 @@ dependencies = [
"hashbrown 0.13.2",
]
-[[package]]
-name = "schnorrkel"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862"
-dependencies = [
- "arrayref",
- "arrayvec 0.5.2",
- "curve25519-dalek 2.1.3",
- "merlin 2.0.1",
- "rand_core 0.5.1",
- "sha2 0.8.2",
- "subtle 2.5.0",
- "zeroize",
-]
-
[[package]]
name = "schnorrkel"
version = "0.10.2"
@@ -17029,7 +17114,7 @@ dependencies = [
"arrayref",
"arrayvec 0.7.4",
"curve25519-dalek-ng",
- "merlin 3.0.0",
+ "merlin",
"rand_core 0.6.4",
"sha2 0.9.9",
"subtle-ng",
@@ -17047,7 +17132,7 @@ dependencies = [
"arrayvec 0.7.4",
"curve25519-dalek 4.1.2",
"getrandom_or_panic",
- "merlin 3.0.0",
+ "merlin",
"rand_core 0.6.4",
"serde_bytes",
"sha2 0.10.7",
@@ -17093,6 +17178,7 @@ dependencies = [
"der",
"generic-array 0.14.7",
"pkcs8",
+ "serdect",
"subtle 2.5.0",
"zeroize",
]
@@ -17250,9 +17336,9 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5"
[[package]]
name = "serde"
-version = "1.0.196"
+version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
+checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
dependencies = [
"serde_derive",
]
@@ -17277,13 +17363,13 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.196"
+version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
+checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -17308,9 +17394,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.113"
+version = "1.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"
+checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
dependencies = [
"itoa",
"ryu",
@@ -17340,9 +17426,9 @@ dependencies = [
[[package]]
name = "serde_yaml"
-version = "0.9.31"
+version = "0.9.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e"
+checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f"
dependencies = [
"indexmap 2.2.3",
"itoa",
@@ -17351,6 +17437,16 @@ dependencies = [
"unsafe-libyaml",
]
+[[package]]
+name = "serdect"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177"
+dependencies = [
+ "base16ct",
+ "serde",
+]
+
[[package]]
name = "serial_test"
version = "2.0.0"
@@ -17373,7 +17469,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -17411,18 +17507,6 @@ dependencies = [
"digest 0.10.7",
]
-[[package]]
-name = "sha2"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69"
-dependencies = [
- "block-buffer 0.7.3",
- "digest 0.8.1",
- "fake-simd",
- "opaque-debug 0.2.3",
-]
-
[[package]]
name = "sha2"
version = "0.9.9"
@@ -17657,13 +17741,13 @@ dependencies = [
"hmac 0.12.1",
"itertools 0.11.0",
"libsecp256k1",
- "merlin 3.0.0",
+ "merlin",
"no-std-net",
"nom",
"num-bigint",
"num-rational",
"num-traits",
- "pbkdf2 0.12.2",
+ "pbkdf2",
"pin-project",
"poly1305 0.8.0",
"rand",
@@ -17755,7 +17839,7 @@ dependencies = [
[[package]]
name = "snowbridge-beacon-primitives"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"byte-slice-cast",
"frame-support",
@@ -17779,7 +17863,7 @@ dependencies = [
[[package]]
name = "snowbridge-core"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"ethabi-decode",
"frame-support",
@@ -17802,7 +17886,7 @@ dependencies = [
[[package]]
name = "snowbridge-ethereum"
-version = "0.1.0"
+version = "0.3.0"
dependencies = [
"ethabi-decode",
"ethbloom",
@@ -17841,7 +17925,7 @@ dependencies = [
[[package]]
name = "snowbridge-outbound-queue-merkle-tree"
-version = "0.1.1"
+version = "0.3.0"
dependencies = [
"array-bytes 4.2.0",
"env_logger 0.9.3",
@@ -17856,7 +17940,7 @@ dependencies = [
[[package]]
name = "snowbridge-outbound-queue-runtime-api"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -17870,7 +17954,7 @@ dependencies = [
[[package]]
name = "snowbridge-pallet-ethereum-client"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"bp-runtime",
"byte-slice-cast",
@@ -17916,7 +18000,7 @@ dependencies = [
[[package]]
name = "snowbridge-pallet-inbound-queue"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"alloy-primitives",
"alloy-rlp",
@@ -17949,7 +18033,7 @@ dependencies = [
[[package]]
name = "snowbridge-pallet-inbound-queue-fixtures"
-version = "0.9.0"
+version = "0.10.0"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -17963,7 +18047,7 @@ dependencies = [
[[package]]
name = "snowbridge-pallet-outbound-queue"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"bridge-hub-common",
"ethabi-decode",
@@ -17988,7 +18072,7 @@ dependencies = [
[[package]]
name = "snowbridge-pallet-system"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"ethabi-decode",
"frame-benchmarking",
@@ -18016,7 +18100,7 @@ dependencies = [
[[package]]
name = "snowbridge-router-primitives"
-version = "0.0.0"
+version = "0.9.0"
dependencies = [
"ethabi-decode",
"frame-support",
@@ -18039,7 +18123,7 @@ dependencies = [
[[package]]
name = "snowbridge-runtime-common"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"frame-support",
"frame-system",
@@ -18055,7 +18139,7 @@ dependencies = [
[[package]]
name = "snowbridge-runtime-test-common"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"assets-common",
"bridge-hub-test-utils",
@@ -18132,7 +18216,7 @@ dependencies = [
[[package]]
name = "snowbridge-system-runtime-api"
-version = "0.0.0"
+version = "0.2.0"
dependencies = [
"parity-scale-codec",
"snowbridge-core",
@@ -18179,6 +18263,87 @@ dependencies = [
"sha-1 0.9.8",
]
+[[package]]
+name = "solochain-template-node"
+version = "0.0.0"
+dependencies = [
+ "clap 4.5.1",
+ "frame-benchmarking-cli",
+ "frame-system",
+ "futures",
+ "jsonrpsee",
+ "pallet-transaction-payment",
+ "pallet-transaction-payment-rpc",
+ "sc-basic-authorship",
+ "sc-cli",
+ "sc-client-api",
+ "sc-consensus",
+ "sc-consensus-aura",
+ "sc-consensus-grandpa",
+ "sc-executor",
+ "sc-network",
+ "sc-offchain",
+ "sc-rpc-api",
+ "sc-service",
+ "sc-telemetry",
+ "sc-transaction-pool",
+ "sc-transaction-pool-api",
+ "serde_json",
+ "solochain-template-runtime",
+ "sp-api",
+ "sp-block-builder",
+ "sp-blockchain",
+ "sp-consensus-aura",
+ "sp-consensus-grandpa",
+ "sp-core",
+ "sp-inherents",
+ "sp-io",
+ "sp-keyring",
+ "sp-runtime",
+ "sp-timestamp",
+ "substrate-build-script-utils",
+ "substrate-frame-rpc-system",
+ "try-runtime-cli",
+]
+
+[[package]]
+name = "solochain-template-runtime"
+version = "0.0.0"
+dependencies = [
+ "frame-benchmarking",
+ "frame-executive",
+ "frame-support",
+ "frame-system",
+ "frame-system-benchmarking",
+ "frame-system-rpc-runtime-api",
+ "frame-try-runtime",
+ "pallet-aura",
+ "pallet-balances",
+ "pallet-grandpa",
+ "pallet-sudo",
+ "pallet-template",
+ "pallet-timestamp",
+ "pallet-transaction-payment",
+ "pallet-transaction-payment-rpc-runtime-api",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-api",
+ "sp-block-builder",
+ "sp-consensus-aura",
+ "sp-consensus-grandpa",
+ "sp-core",
+ "sp-genesis-builder",
+ "sp-inherents",
+ "sp-offchain",
+ "sp-runtime",
+ "sp-session",
+ "sp-std 14.0.0",
+ "sp-storage 19.0.0",
+ "sp-transaction-pool",
+ "sp-version",
+ "substrate-wasm-builder",
+]
+
[[package]]
name = "sp-api"
version = "26.0.0"
@@ -18212,7 +18377,7 @@ dependencies = [
"proc-macro-crate 3.0.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -18477,7 +18642,6 @@ version = "28.0.0"
dependencies = [
"array-bytes 6.1.0",
"bandersnatch_vrfs",
- "bip39",
"bitflags 1.3.2",
"blake2 0.10.6",
"bounded-collections",
@@ -18490,10 +18654,12 @@ dependencies = [
"hash256-std-hasher",
"impl-serde",
"itertools 0.10.5",
+ "k256",
"lazy_static",
"libsecp256k1",
"log",
- "merlin 3.0.0",
+ "merlin",
+ "parity-bip39",
"parity-scale-codec",
"parking_lot 0.12.1",
"paste",
@@ -18605,7 +18771,7 @@ version = "0.0.0"
dependencies = [
"quote",
"sp-crypto-hashing",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -18623,7 +18789,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf5
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -18632,7 +18798,7 @@ version = "14.0.0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -18689,6 +18855,7 @@ dependencies = [
"libsecp256k1",
"log",
"parity-scale-codec",
+ "polkavm-derive 0.9.1",
"rustversion",
"secp256k1",
"sp-core",
@@ -18830,7 +18997,7 @@ dependencies = [
name = "sp-runtime"
version = "31.0.1"
dependencies = [
- "docify",
+ "docify 0.2.7",
"either",
"hash256-std-hasher",
"impl-trait-for-tuples",
@@ -18880,7 +19047,7 @@ dependencies = [
"bytes",
"impl-trait-for-tuples",
"parity-scale-codec",
- "polkavm-derive 0.8.0",
+ "polkavm-derive 0.9.1",
"primitive-types",
"rustversion",
"sp-core",
@@ -18906,7 +19073,7 @@ dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -18918,7 +19085,7 @@ dependencies = [
"proc-macro-crate 3.0.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -19190,7 +19357,7 @@ dependencies = [
"proc-macro2",
"quote",
"sp-version",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -19635,7 +19802,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -19648,14 +19815,14 @@ dependencies = [
[[package]]
name = "substrate-bip39"
-version = "0.4.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328"
+version = "0.4.7"
dependencies = [
- "hmac 0.11.0",
- "pbkdf2 0.8.0",
- "schnorrkel 0.9.1",
- "sha2 0.9.9",
+ "bip39",
+ "hmac 0.12.1",
+ "pbkdf2",
+ "rustc-hex",
+ "schnorrkel 0.11.4",
+ "sha2 0.10.7",
"zeroize",
]
@@ -19902,7 +20069,7 @@ dependencies = [
"console",
"filetime",
"parity-wasm",
- "polkavm-linker 0.8.2",
+ "polkavm-linker 0.9.2",
"sp-maybe-compressed-blob",
"strum 0.24.1",
"tempfile",
@@ -20033,9 +20200,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.49"
+version = "2.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496"
+checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb"
dependencies = [
"proc-macro2",
"quote",
@@ -20051,7 +20218,7 @@ dependencies = [
"paste",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -20316,7 +20483,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -20477,7 +20644,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -20684,7 +20851,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -20726,7 +20893,7 @@ dependencies = [
"proc-macro-crate 3.0.0",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
@@ -21291,7 +21458,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
"wasm-bindgen-shared",
]
@@ -21325,7 +21492,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -22320,10 +22487,12 @@ dependencies = [
"pallet-transaction-payment",
"pallet-xcm",
"parity-scale-codec",
+ "polkadot-service",
"polkadot-test-client",
"polkadot-test-runtime",
"polkadot-test-service",
"sp-consensus",
+ "sp-core",
"sp-keyring",
"sp-runtime",
"sp-state-machine",
@@ -22340,7 +22509,7 @@ dependencies = [
"proc-macro2",
"quote",
"staging-xcm",
- "syn 2.0.49",
+ "syn 2.0.50",
"trybuild",
]
@@ -22462,14 +22631,14 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
name = "zeroize"
-version = "1.6.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
+checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
dependencies = [
"zeroize_derive",
]
@@ -22482,7 +22651,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.49",
+ "syn 2.0.50",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index d09f19f280cbb0b81ac634249912357919209fbf..f256d02808a8f4475eeb4d0c7ac35d305cfe05ab 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,6 +3,7 @@ authors = ["Parity Technologies "]
edition = "2021"
repository = "https://github.com/paritytech/polkadot-sdk.git"
license = "GPL-3.0-only"
+homepage = "https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html"
[workspace]
resolver = "2"
@@ -74,9 +75,6 @@ members = [
"cumulus/pallets/solo-to-para",
"cumulus/pallets/xcm",
"cumulus/pallets/xcmp-queue",
- "cumulus/parachain-template/node",
- "cumulus/parachain-template/pallets/template",
- "cumulus/parachain-template/runtime",
"cumulus/parachains/common",
"cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo",
"cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend",
@@ -127,6 +125,7 @@ members = [
"cumulus/primitives/core",
"cumulus/primitives/parachain-inherent",
"cumulus/primitives/proof-size-hostfunction",
+ "cumulus/primitives/storage-weight-reclaim",
"cumulus/primitives/timestamp",
"cumulus/primitives/utility",
"cumulus/test/client",
@@ -218,11 +217,6 @@ members = [
"polkadot/xcm/xcm-simulator",
"polkadot/xcm/xcm-simulator/example",
"polkadot/xcm/xcm-simulator/fuzzer",
- "substrate/bin/minimal/node",
- "substrate/bin/minimal/runtime",
- "substrate/bin/node-template/node",
- "substrate/bin/node-template/pallets/template",
- "substrate/bin/node-template/runtime",
"substrate/bin/node/bench",
"substrate/bin/node/cli",
"substrate/bin/node/inspect",
@@ -255,6 +249,7 @@ members = [
"substrate/client/db",
"substrate/client/executor",
"substrate/client/executor/common",
+ "substrate/client/executor/polkavm",
"substrate/client/executor/runtime-test",
"substrate/client/executor/wasmtime",
"substrate/client/informant",
@@ -336,6 +331,7 @@ members = [
"substrate/frame/examples/frame-crate",
"substrate/frame/examples/kitchensink",
"substrate/frame/examples/offchain-worker",
+ "substrate/frame/examples/single-block-migrations",
"substrate/frame/examples/split",
"substrate/frame/examples/tasks",
"substrate/frame/executive",
@@ -350,6 +346,7 @@ members = [
"substrate/frame/membership",
"substrate/frame/merkle-mountain-range",
"substrate/frame/message-queue",
+ "substrate/frame/migrations",
"substrate/frame/mixnet",
"substrate/frame/multisig",
"substrate/frame/nft-fractionalization",
@@ -500,7 +497,20 @@ members = [
"substrate/utils/frame/rpc/system",
"substrate/utils/frame/try-runtime/cli",
"substrate/utils/prometheus",
+ "substrate/utils/substrate-bip39",
"substrate/utils/wasm-builder",
+
+ "templates/minimal/node",
+ "templates/minimal/pallets/template",
+ "templates/minimal/runtime",
+
+ "templates/solochain/node",
+ "templates/solochain/pallets/template",
+ "templates/solochain/runtime",
+
+ "templates/parachain/node",
+ "templates/parachain/pallets/template",
+ "templates/parachain/runtime",
]
default-members = ["polkadot", "substrate/bin/node/cli"]
@@ -534,9 +544,18 @@ extra-unused-type-parameters = { level = "allow", priority = 2 } # stylistic
default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic
[workspace.dependencies]
-polkavm-linker = "0.8.2"
-polkavm-derive = "0.8.0"
+polkavm = "0.9.3"
+polkavm-linker = "0.9.2"
+polkavm-derive = "0.9.1"
log = { version = "0.4.20", default-features = false }
+quote = { version = "1.0.33" }
+serde = { version = "1.0.197", default-features = false }
+serde-big-array = { version = "0.3.2" }
+serde_derive = { version = "1.0.117" }
+serde_json = { version = "1.0.114", default-features = false }
+serde_yaml = { version = "0.9" }
+syn = { version = "2.0.50" }
+thiserror = { version = "1.0.48" }
[profile.release]
# Polkadot runtime requires unwinding.
diff --git a/bridges/primitives/header-chain/Cargo.toml b/bridges/primitives/header-chain/Cargo.toml
index 828b567bb947d851e5d0f8dac03dadebf120e614..205b593365ef8216a2e501e5751303185d4f7537 100644
--- a/bridges/primitives/header-chain/Cargo.toml
+++ b/bridges/primitives/header-chain/Cargo.toml
@@ -13,7 +13,7 @@ workspace = true
codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false }
finality-grandpa = { version = "0.16.2", default-features = false }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
-serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
+serde = { features = ["alloc", "derive"], workspace = true }
# Bridge dependencies
diff --git a/bridges/primitives/messages/Cargo.toml b/bridges/primitives/messages/Cargo.toml
index 54aae4a2f76a425046860835ccd2a66cc29cf135..8aa6b4b05e5efb2427a8548e91ec5f47ab494968 100644
--- a/bridges/primitives/messages/Cargo.toml
+++ b/bridges/primitives/messages/Cargo.toml
@@ -12,7 +12,7 @@ workspace = true
[dependencies]
codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] }
scale-info = { version = "2.10.0", default-features = false, features = ["bit-vec", "derive"] }
-serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
+serde = { features = ["alloc", "derive"], workspace = true }
# Bridge dependencies
diff --git a/bridges/primitives/polkadot-core/Cargo.toml b/bridges/primitives/polkadot-core/Cargo.toml
index e667c283a07937ab88053c064fb7b8cfb380f765..c0dae684b5f2f3b7b9be096a808fc67d15dadfcf 100644
--- a/bridges/primitives/polkadot-core/Cargo.toml
+++ b/bridges/primitives/polkadot-core/Cargo.toml
@@ -13,7 +13,7 @@ workspace = true
codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] }
parity-util-mem = { version = "0.12.0", optional = true }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
-serde = { version = "1.0", optional = true, features = ["derive"] }
+serde = { optional = true, features = ["derive"], workspace = true, default-features = true }
# Bridge Dependencies
diff --git a/bridges/primitives/runtime/Cargo.toml b/bridges/primitives/runtime/Cargo.toml
index 2ea31c26d6b7d9c6c9a2e5e7f14beab9cc850a21..22206fb2c376ce53fee9dc8ff806baaef3ce7c28 100644
--- a/bridges/primitives/runtime/Cargo.toml
+++ b/bridges/primitives/runtime/Cargo.toml
@@ -16,7 +16,7 @@ impl-trait-for-tuples = "0.2.2"
log = { workspace = true }
num-traits = { version = "0.2", default-features = false }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
-serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
+serde = { features = ["alloc", "derive"], workspace = true }
# Substrate Dependencies
diff --git a/bridges/primitives/test-utils/src/lib.rs b/bridges/primitives/test-utils/src/lib.rs
index f23ddd1a10d3681900b024999aef279ea6fcb91d..1d80890779bf8310b393d585749e96f9577196a1 100644
--- a/bridges/primitives/test-utils/src/lib.rs
+++ b/bridges/primitives/test-utils/src/lib.rs
@@ -129,7 +129,7 @@ pub fn make_justification_for_header(
votes_ancestries.push(child.clone());
}
- // The header we need to use when pre-commiting is the one at the highest height
+ // The header we need to use when pre-committing is the one at the highest height
// on our chain.
let precommit_candidate = chain.last().map(|h| (h.hash(), *h.number())).unwrap();
unsigned_precommits.push(precommit_candidate);
diff --git a/bridges/snowbridge/README.md b/bridges/snowbridge/README.md
index 49b9c2eaf553780176897a770bad9579d53bfaa9..6561df401120e9c5c5d6ee2762eb1423b5d6daaf 100644
--- a/bridges/snowbridge/README.md
+++ b/bridges/snowbridge/README.md
@@ -1,32 +1,40 @@
-# Snowbridge
-[![codecov](https://codecov.io/gh/Snowfork/snowbridge/branch/main/graph/badge.svg?token=9hvgSws4rN)](https://codecov.io/gh/Snowfork/snowbridge)
+# Snowbridge ·
+[![codecov](https://codecov.io/gh/Snowfork/polkadot-sdk/branch/snowbridge/graph/badge.svg?token=9hvgSws4rN)](https://codecov.io/gh/Snowfork/polkadot-sdk)
![GitHub](https://img.shields.io/github/license/Snowfork/snowbridge)
Snowbridge is a trustless bridge between Polkadot and Ethereum. For documentation, visit https://docs.snowbridge.network.
## Components
+The Snowbridge project lives in two repositories:
+
+- [Snowfork/Polkadot-sdk](https://github.com/Snowfork/polkadot-sdk): The Snowbridge parachain and pallets live in
+a fork of the Polkadot SDK. Changes are eventually contributed back to
+[paritytech/Polkadot-sdk](https://github.com/paritytech/polkadot-sdk)
+- [Snowfork/snowbridge](https://github.com/Snowfork/snowbridge): The rest of the Snowbridge components, like contracts,
+off-chain relayer, end-to-end tests and test-net setup code.
+
### Parachain
-Polkadot parachain and our pallets. See [parachain/README.md](https://github.com/Snowfork/snowbridge/blob/main/parachain/README.md).
+Polkadot parachain and our pallets. See [README.md](https://github.com/Snowfork/polkadot-sdk/blob/snowbridge/bridges/snowbridge/README.md).
### Contracts
-Ethereum contracts and unit tests. See [contracts/README.md](https://github.com/Snowfork/snowbridge/blob/main/contracts/README.md)
+Ethereum contracts and unit tests. See [Snowfork/snowbridge/contracts/README.md](https://github.com/Snowfork/snowbridge/blob/main/contracts/README.md)
### Relayer
Off-chain relayer services for relaying messages between Polkadot and Ethereum. See
-[relayer/README.md](https://github.com/Snowfork/snowbridge/blob/main/relayer/README.md)
+[Snowfork/snowbridge/relayer/README.md](https://github.com/Snowfork/snowbridge/blob/main/relayer/README.md)
### Local Testnet
Scripts to provision a local testnet, running the above services to bridge between local deployments of Polkadot and
-Ethereum. See [web/packages/test/README.md](https://github.com/Snowfork/snowbridge/blob/main/web/packages/test/README.md).
+Ethereum. See [Snowfork/snowbridge/web/packages/test/README.md](https://github.com/Snowfork/snowbridge/blob/main/web/packages/test/README.md).
### Smoke Tests
-Integration tests for our local testnet. See [smoketest/README.md](https://github.com/Snowfork/snowbridge/blob/main/smoketest/README.md).
+Integration tests for our local testnet. See [Snowfork/snowbridge/smoketest/README.md](https://github.com/Snowfork/snowbridge/blob/main/smoketest/README.md).
## Development
@@ -83,7 +91,7 @@ direnv allow
### Upgrading the Rust toolchain
-Sometimes we would like to upgrade rust toolchain. First update `parachain/rust-toolchain.toml` as required and then
+Sometimes we would like to upgrade rust toolchain. First update `rust-toolchain.toml` as required and then
update `flake.lock` running
```sh
nix flake lock --update-input rust-overlay
diff --git a/bridges/snowbridge/pallets/ethereum-client/Cargo.toml b/bridges/snowbridge/pallets/ethereum-client/Cargo.toml
index 541ded26737b55677d7e005783ab43d7fd5193c4..c8999633c97abb00174e38e16ed5618e7baf0b59 100644
--- a/bridges/snowbridge/pallets/ethereum-client/Cargo.toml
+++ b/bridges/snowbridge/pallets/ethereum-client/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-pallet-ethereum-client"
description = "Snowbridge Ethereum Client Pallet"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
@@ -15,8 +15,8 @@ workspace = true
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-serde = { version = "1.0.196", optional = true }
-serde_json = { version = "1.0.113", optional = true }
+serde = { optional = true, workspace = true, default-features = true }
+serde_json = { optional = true, workspace = true, default-features = true }
codec = { version = "3.6.1", package = "parity-scale-codec", default-features = false, features = ["derive"] }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
ssz_rs = { version = "0.9.0", default-features = false }
@@ -45,12 +45,12 @@ pallet-timestamp = { path = "../../../../substrate/frame/timestamp", default-fea
[dev-dependencies]
rand = "0.8.5"
sp-keyring = { path = "../../../../substrate/primitives/keyring" }
-serde_json = "1.0.113"
+serde_json = { workspace = true, default-features = true }
hex-literal = "0.4.1"
pallet-timestamp = { path = "../../../../substrate/frame/timestamp" }
snowbridge-pallet-ethereum-client-fixtures = { path = "./fixtures" }
sp-io = { path = "../../../../substrate/primitives/io" }
-serde = "1.0.196"
+serde = { workspace = true, default-features = true }
[features]
default = ["std"]
diff --git a/bridges/snowbridge/pallets/inbound-queue/Cargo.toml b/bridges/snowbridge/pallets/inbound-queue/Cargo.toml
index 09653fa3b480183366113f5d90e458b03c845535..b850496cd4e14cd906565d488450b339a29f463f 100644
--- a/bridges/snowbridge/pallets/inbound-queue/Cargo.toml
+++ b/bridges/snowbridge/pallets/inbound-queue/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-pallet-inbound-queue"
description = "Snowbridge Inbound Queue Pallet"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
@@ -15,7 +15,7 @@ workspace = true
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-serde = { version = "1.0.196", optional = true }
+serde = { optional = true, workspace = true, default-features = true }
codec = { version = "3.6.1", package = "parity-scale-codec", default-features = false, features = ["derive"] }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
hex-literal = { version = "0.4.1", optional = true }
diff --git a/bridges/snowbridge/pallets/inbound-queue/fixtures/Cargo.toml b/bridges/snowbridge/pallets/inbound-queue/fixtures/Cargo.toml
index 61f1421e056773c4f078390f9c48f7b8fa0420d3..64605a42f0d383d838429eb9b82b5f6cf238ab09 100644
--- a/bridges/snowbridge/pallets/inbound-queue/fixtures/Cargo.toml
+++ b/bridges/snowbridge/pallets/inbound-queue/fixtures/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-pallet-inbound-queue-fixtures"
description = "Snowbridge Inbound Queue Test Fixtures"
-version = "0.9.0"
+version = "0.10.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
diff --git a/bridges/snowbridge/pallets/inbound-queue/src/mock.rs b/bridges/snowbridge/pallets/inbound-queue/src/mock.rs
index 110f611c6766020039bd1f73def900914da8cae2..749fb0367f332d743b01ad9d56238106ced36e72 100644
--- a/bridges/snowbridge/pallets/inbound-queue/src/mock.rs
+++ b/bridges/snowbridge/pallets/inbound-queue/src/mock.rs
@@ -3,7 +3,7 @@
use super::*;
use frame_support::{
- parameter_types,
+ derive_impl, parameter_types,
traits::{ConstU128, ConstU32, Everything},
weights::IdentityFee,
};
@@ -47,10 +47,9 @@ parameter_types! {
type Balance = u128;
+#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test {
type BaseCallFilter = Everything;
- type BlockWeights = ();
- type BlockLength = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
@@ -60,16 +59,8 @@ impl frame_system::Config for Test {
type Lookup = IdentityLookup;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
- type DbWeight = ();
- type Version = ();
type PalletInfo = PalletInfo;
type AccountData = pallet_balances::AccountData;
- type OnNewAccount = ();
- type OnKilledAccount = ();
- type SystemWeightInfo = ();
- type SS58Prefix = ();
- type OnSetCode = ();
- type MaxConsumers = frame_support::traits::ConstU32<16>;
type Nonce = u64;
type Block = Block;
}
diff --git a/bridges/snowbridge/pallets/outbound-queue/Cargo.toml b/bridges/snowbridge/pallets/outbound-queue/Cargo.toml
index 0956ac76678dca9fd57a7cc47c29cd62afc04ab7..f16a28cb1e457d9ebfb7804fa013e5b57858f79e 100644
--- a/bridges/snowbridge/pallets/outbound-queue/Cargo.toml
+++ b/bridges/snowbridge/pallets/outbound-queue/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-pallet-outbound-queue"
description = "Snowbridge Outbound Queue Pallet"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
@@ -15,7 +15,7 @@ workspace = true
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
-serde = { version = "1.0.196", features = ["alloc", "derive"], default-features = false }
+serde = { features = ["alloc", "derive"], workspace = true }
codec = { version = "3.6.1", package = "parity-scale-codec", default-features = false, features = ["derive"] }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
hex-literal = { version = "0.4.1", optional = true }
diff --git a/bridges/snowbridge/pallets/outbound-queue/merkle-tree/Cargo.toml b/bridges/snowbridge/pallets/outbound-queue/merkle-tree/Cargo.toml
index c185d5af7062045f40946fcbd3c45cb62b932216..0606e9de33056c9dffae50befcc1da5e865dca44 100644
--- a/bridges/snowbridge/pallets/outbound-queue/merkle-tree/Cargo.toml
+++ b/bridges/snowbridge/pallets/outbound-queue/merkle-tree/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-outbound-queue-merkle-tree"
description = "Snowbridge Outbound Queue Merkle Tree"
-version = "0.1.1"
+version = "0.3.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
diff --git a/bridges/snowbridge/pallets/outbound-queue/runtime-api/Cargo.toml b/bridges/snowbridge/pallets/outbound-queue/runtime-api/Cargo.toml
index 347b3bae493b7491790854be7a28f82386d2ee4b..cb68fd0a250a92e7f6a6693f3aebf1c8553308aa 100644
--- a/bridges/snowbridge/pallets/outbound-queue/runtime-api/Cargo.toml
+++ b/bridges/snowbridge/pallets/outbound-queue/runtime-api/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-outbound-queue-runtime-api"
description = "Snowbridge Outbound Queue Runtime API"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
diff --git a/bridges/snowbridge/pallets/outbound-queue/src/mock.rs b/bridges/snowbridge/pallets/outbound-queue/src/mock.rs
index dd8fee4e2ed08ec0f3090b765fa882b063a98300..6e78fb4467210e3cb5e1eb581b377cbbfeac74ad 100644
--- a/bridges/snowbridge/pallets/outbound-queue/src/mock.rs
+++ b/bridges/snowbridge/pallets/outbound-queue/src/mock.rs
@@ -3,7 +3,7 @@
use super::*;
use frame_support::{
- parameter_types,
+ derive_impl, parameter_types,
traits::{Everything, Hooks},
weights::IdentityFee,
};
@@ -37,10 +37,9 @@ parameter_types! {
pub const BlockHashCount: u64 = 250;
}
+#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test {
type BaseCallFilter = Everything;
- type BlockWeights = ();
- type BlockLength = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
@@ -50,16 +49,7 @@ impl frame_system::Config for Test {
type Lookup = IdentityLookup;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = BlockHashCount;
- type DbWeight = ();
- type Version = ();
type PalletInfo = PalletInfo;
- type AccountData = ();
- type OnNewAccount = ();
- type OnKilledAccount = ();
- type SystemWeightInfo = ();
- type SS58Prefix = ();
- type OnSetCode = ();
- type MaxConsumers = frame_support::traits::ConstU32<16>;
type Nonce = u64;
type Block = Block;
}
diff --git a/bridges/snowbridge/pallets/system/Cargo.toml b/bridges/snowbridge/pallets/system/Cargo.toml
index f6c642e7376f7f068af1fe3c2cf9b11a2c50f2cc..5ad04290de044a2c8ed13aa092f5ea033aaafb97 100644
--- a/bridges/snowbridge/pallets/system/Cargo.toml
+++ b/bridges/snowbridge/pallets/system/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-pallet-system"
description = "Snowbridge System Pallet"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
diff --git a/bridges/snowbridge/pallets/system/runtime-api/Cargo.toml b/bridges/snowbridge/pallets/system/runtime-api/Cargo.toml
index 355d2d29147f3cd84ae013363db874c9b9739b8e..eb02ae1db529730f51743e79a322e54db44fee51 100644
--- a/bridges/snowbridge/pallets/system/runtime-api/Cargo.toml
+++ b/bridges/snowbridge/pallets/system/runtime-api/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-system-runtime-api"
description = "Snowbridge System Runtime API"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
diff --git a/bridges/snowbridge/pallets/system/src/lib.rs b/bridges/snowbridge/pallets/system/src/lib.rs
index b7f38fb753d31bd67acb78174e175f90fc711175..6e5ceb5e9b1d42796567c3da5e549b2af3cfd4de 100644
--- a/bridges/snowbridge/pallets/system/src/lib.rs
+++ b/bridges/snowbridge/pallets/system/src/lib.rs
@@ -37,8 +37,6 @@
//! `force_update_channel` and extrinsics to manage agents and channels for system parachains.
#![cfg_attr(not(feature = "std"), no_std)]
-pub use pallet::*;
-
#[cfg(test)]
mod mock;
@@ -79,6 +77,8 @@ use xcm_executor::traits::ConvertLocation;
#[cfg(feature = "runtime-benchmarks")]
use frame_support::traits::OriginTrait;
+pub use pallet::*;
+
pub type BalanceOf =
<::Token as Inspect<::AccountId>>::Balance;
pub type AccountIdOf = ::AccountId;
diff --git a/bridges/snowbridge/pallets/system/src/mock.rs b/bridges/snowbridge/pallets/system/src/mock.rs
index edc3f141b0735d7439b120c51da836fb8a77bd04..de2970dd550ba75fe42de08dc4d297cd5cccdf1f 100644
--- a/bridges/snowbridge/pallets/system/src/mock.rs
+++ b/bridges/snowbridge/pallets/system/src/mock.rs
@@ -2,8 +2,8 @@
// SPDX-FileCopyrightText: 2023 Snowfork
use crate as snowbridge_system;
use frame_support::{
- parameter_types,
- traits::{tokens::fungible::Mutate, ConstU128, ConstU16, ConstU64, ConstU8},
+ derive_impl, parameter_types,
+ traits::{tokens::fungible::Mutate, ConstU128, ConstU64, ConstU8},
weights::IdentityFee,
PalletId,
};
@@ -95,11 +95,9 @@ frame_support::construct_runtime!(
}
);
+#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything;
- type BlockWeights = ();
- type BlockLength = ();
- type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
@@ -109,15 +107,8 @@ impl frame_system::Config for Test {
type Lookup = IdentityLookup;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = ConstU64<250>;
- type Version = ();
type PalletInfo = PalletInfo;
type AccountData = pallet_balances::AccountData;
- type OnNewAccount = ();
- type OnKilledAccount = ();
- type SystemWeightInfo = ();
- type SS58Prefix = ConstU16<42>;
- type OnSetCode = ();
- type MaxConsumers = frame_support::traits::ConstU32<16>;
type Nonce = u64;
type Block = Block;
}
diff --git a/bridges/snowbridge/parachain/pallets/ethereum-beacon-client/src/mock.rs b/bridges/snowbridge/parachain/pallets/ethereum-beacon-client/src/mock.rs
new file mode 100644
index 0000000000000000000000000000000000000000..77b5c1aa631db89a986837f258ee7dea45a580d0
--- /dev/null
+++ b/bridges/snowbridge/parachain/pallets/ethereum-beacon-client/src/mock.rs
@@ -0,0 +1,259 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: 2023 Snowfork
+use crate as ethereum_beacon_client;
+use frame_support::parameter_types;
+use pallet_timestamp;
+use primitives::{Fork, ForkVersions};
+use sp_core::H256;
+use sp_runtime::traits::{BlakeTwo256, IdentityLookup};
+
+#[cfg(not(feature = "beacon-spec-mainnet"))]
+pub mod minimal {
+ use super::*;
+
+ use crate::config;
+ use frame_support::derive_impl;
+ use hex_literal::hex;
+ use primitives::CompactExecutionHeader;
+ use snowbridge_core::inbound::{Log, Proof};
+ use sp_runtime::BuildStorage;
+ use std::{fs::File, path::PathBuf};
+
+ type Block = frame_system::mocking::MockBlock;
+
+ frame_support::construct_runtime!(
+ pub enum Test {
+ System: frame_system::{Pallet, Call, Storage, Event},
+ Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
+ EthereumBeaconClient: ethereum_beacon_client::{Pallet, Call, Storage, Event},
+ }
+ );
+
+ parameter_types! {
+ pub const BlockHashCount: u64 = 250;
+ pub const SS58Prefix: u8 = 42;
+ }
+
+ #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
+ impl frame_system::Config for Test {
+ type BaseCallFilter = frame_support::traits::Everything;
+ type RuntimeOrigin = RuntimeOrigin;
+ type RuntimeCall = RuntimeCall;
+ type RuntimeTask = RuntimeTask;
+ type Hash = H256;
+ type Hashing = BlakeTwo256;
+ type AccountId = u64;
+ type Lookup = IdentityLookup;
+ type RuntimeEvent = RuntimeEvent;
+ type BlockHashCount = BlockHashCount;
+ type PalletInfo = PalletInfo;
+ type SS58Prefix = SS58Prefix;
+ type Nonce = u64;
+ type Block = Block;
+ }
+
+ impl pallet_timestamp::Config for Test {
+ type Moment = u64;
+ type OnTimestampSet = ();
+ type MinimumPeriod = ();
+ type WeightInfo = ();
+ }
+
+ parameter_types! {
+ pub const ExecutionHeadersPruneThreshold: u32 = 10;
+ pub const ChainForkVersions: ForkVersions = ForkVersions{
+ genesis: Fork {
+ version: [0, 0, 0, 1], // 0x00000001
+ epoch: 0,
+ },
+ altair: Fork {
+ version: [1, 0, 0, 1], // 0x01000001
+ epoch: 0,
+ },
+ bellatrix: Fork {
+ version: [2, 0, 0, 1], // 0x02000001
+ epoch: 0,
+ },
+ capella: Fork {
+ version: [3, 0, 0, 1], // 0x03000001
+ epoch: 0,
+ },
+ };
+ }
+
+ impl ethereum_beacon_client::Config for Test {
+ type RuntimeEvent = RuntimeEvent;
+ type ForkVersions = ChainForkVersions;
+ type MaxExecutionHeadersToKeep = ExecutionHeadersPruneThreshold;
+ type WeightInfo = ();
+ }
+
+ // Build genesis storage according to the mock runtime.
+ pub fn new_tester() -> sp_io::TestExternalities {
+ let t = frame_system::GenesisConfig::::default().build_storage().unwrap();
+ let mut ext = sp_io::TestExternalities::new(t);
+ let _ = ext.execute_with(|| Timestamp::set(RuntimeOrigin::signed(1), 30_000));
+ ext
+ }
+
+ fn load_fixture(basename: &str) -> Result
+ where
+ T: for<'de> serde::Deserialize<'de>,
+ {
+ let filepath: PathBuf =
+ [env!("CARGO_MANIFEST_DIR"), "tests", "fixtures", basename].iter().collect();
+ serde_json::from_reader(File::open(filepath).unwrap())
+ }
+
+ pub fn load_execution_header_update_fixture() -> primitives::ExecutionHeaderUpdate {
+ load_fixture("execution-header-update.minimal.json").unwrap()
+ }
+
+ pub fn load_checkpoint_update_fixture(
+ ) -> primitives::CheckpointUpdate<{ config::SYNC_COMMITTEE_SIZE }> {
+ load_fixture("initial-checkpoint.minimal.json").unwrap()
+ }
+
+ pub fn load_sync_committee_update_fixture(
+ ) -> primitives::Update<{ config::SYNC_COMMITTEE_SIZE }, { config::SYNC_COMMITTEE_BITS_SIZE }> {
+ load_fixture("sync-committee-update.minimal.json").unwrap()
+ }
+
+ pub fn load_finalized_header_update_fixture(
+ ) -> primitives::Update<{ config::SYNC_COMMITTEE_SIZE }, { config::SYNC_COMMITTEE_BITS_SIZE }> {
+ load_fixture("finalized-header-update.minimal.json").unwrap()
+ }
+
+ pub fn load_next_sync_committee_update_fixture(
+ ) -> primitives::Update<{ config::SYNC_COMMITTEE_SIZE }, { config::SYNC_COMMITTEE_BITS_SIZE }> {
+ load_fixture("next-sync-committee-update.minimal.json").unwrap()
+ }
+
+ pub fn load_next_finalized_header_update_fixture(
+ ) -> primitives::Update<{ config::SYNC_COMMITTEE_SIZE }, { config::SYNC_COMMITTEE_BITS_SIZE }> {
+ load_fixture("next-finalized-header-update.minimal.json").unwrap()
+ }
+
+ pub fn get_message_verification_payload() -> (Log, Proof) {
+ (
+ Log {
+ address: hex!("ee9170abfbf9421ad6dd07f6bdec9d89f2b581e0").into(),
+ topics: vec![
+ hex!("1b11dcf133cc240f682dab2d3a8e4cd35c5da8c9cf99adac4336f8512584c5ad").into(),
+ hex!("00000000000000000000000000000000000000000000000000000000000003e8").into(),
+ hex!("0000000000000000000000000000000000000000000000000000000000000001").into(),
+ ],
+ data: hex!("0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004b000f000000000000000100d184c103f7acc340847eee82a0b909e3358bc28d440edffa1352b13227e8ee646f3ea37456dec701345772617070656420457468657210574554481235003511000000000000000000000000000000000000000000").into(),
+ },
+ Proof {
+ block_hash: hex!("05aaa60b0f27cce9e71909508527264b77ee14da7b5bf915fcc4e32715333213").into(),
+ tx_index: 0,
+ data: (vec![
+ hex!("cf0d1c1ba57d1e0edfb59786c7e30c2b7e12bd54612b00cd21c4eaeecedf44fb").to_vec(),
+ hex!("d21fc4f68ab05bc4dcb23c67008e92c4d466437cdd6ed7aad0c008944c185510").to_vec(),
+ hex!("b9890f91ca0d77aa2a4adfaf9b9e40c94cac9e638b6d9797923865872944b646").to_vec(),
+ ], vec![
+ hex!("f90131a0b601337b3aa10a671caa724eba641e759399979856141d3aea6b6b4ac59b889ba00c7d5dd48be9060221a02fb8fa213860b4c50d47046c8fa65ffaba5737d569e0a094601b62a1086cd9c9cb71a7ebff9e718f3217fd6e837efe4246733c0a196f63a06a4b0dd0aefc37b3c77828c8f07d1b7a2455ceb5dbfd3c77d7d6aeeddc2f7e8ca0d6e8e23142cdd8ec219e1f5d8b56aa18e456702b195deeaa210327284d42ade4a08a313d4c87023005d1ab631bbfe3f5de1e405d0e66d0bef3e033f1e5711b5521a0bf09a5d9a48b10ade82b8d6a5362a15921c8b5228a3487479b467db97411d82fa0f95cccae2a7c572ef3c566503e30bac2b2feb2d2f26eebf6d870dcf7f8cf59cea0d21fc4f68ab05bc4dcb23c67008e92c4d466437cdd6ed7aad0c008944c1855108080808080808080").to_vec(),
+ hex!("f851a0b9890f91ca0d77aa2a4adfaf9b9e40c94cac9e638b6d9797923865872944b646a060a634b9280e3a23fb63375e7bbdd9ab07fd379ab6a67e2312bbc112195fa358808080808080808080808080808080").to_vec(),
+ hex!("f9030820b9030402f90300018301d6e2b9010000000000000800000000000020040008000000000000000000000000400000008000000000000000000000000000000000000000000000000000000000042010000000001000000000000000000000000000000000040000000000000000000000000000000000000000000000008000000000000000002000000000000000000000000200000000000000200000000000100000000040000001000200008000000000000200000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000f901f5f87a942ffa5ecdbe006d30397c7636d3e015eee251369ff842a0c965575a00553e094ca7c5d14f02e107c258dda06867cbf9e0e69f80e71bbcc1a000000000000000000000000000000000000000000000000000000000000003e8a000000000000000000000000000000000000000000000000000000000000003e8f9011c94ee9170abfbf9421ad6dd07f6bdec9d89f2b581e0f863a01b11dcf133cc240f682dab2d3a8e4cd35c5da8c9cf99adac4336f8512584c5ada000000000000000000000000000000000000000000000000000000000000003e8a00000000000000000000000000000000000000000000000000000000000000001b8a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004b000f000000000000000100d184c103f7acc340847eee82a0b909e3358bc28d440edffa1352b13227e8ee646f3ea37456dec701345772617070656420457468657210574554481235003511000000000000000000000000000000000000000000f858948cf6147918a5cbb672703f879f385036f8793a24e1a01449abf21e49fd025f33495e77f7b1461caefdd3d4bb646424a3f445c4576a5ba0000000000000000000000000440edffa1352b13227e8ee646f3ea37456dec701").to_vec(),
+ ]),
+ }
+ )
+ }
+
+ pub fn get_message_verification_header() -> CompactExecutionHeader {
+ CompactExecutionHeader {
+ parent_hash: hex!("04a7f6ab8282203562c62f38b0ab41d32aaebe2c7ea687702b463148a6429e04")
+ .into(),
+ block_number: 55,
+ state_root: hex!("894d968712976d613519f973a317cb0781c7b039c89f27ea2b7ca193f7befdb3")
+ .into(),
+ receipts_root: hex!("cf0d1c1ba57d1e0edfb59786c7e30c2b7e12bd54612b00cd21c4eaeecedf44fb")
+ .into(),
+ }
+ }
+}
+
+#[cfg(feature = "beacon-spec-mainnet")]
+pub mod mainnet {
+ use super::*;
+ use frame_support::derive_impl;
+
+ type Block = frame_system::mocking::MockBlock;
+ use sp_runtime::BuildStorage;
+
+ frame_support::construct_runtime!(
+ pub enum Test {
+ System: frame_system::{Pallet, Call, Storage, Event},
+ Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
+ EthereumBeaconClient: ethereum_beacon_client::{Pallet, Call, Storage, Event},
+ }
+ );
+
+ parameter_types! {
+ pub const BlockHashCount: u64 = 250;
+ pub const SS58Prefix: u8 = 42;
+ }
+
+ #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
+ impl frame_system::Config for Test {
+ type BaseCallFilter = frame_support::traits::Everything;
+ type RuntimeOrigin = RuntimeOrigin;
+ type RuntimeCall = RuntimeCall;
+ type RuntimeTask = RuntimeTask;
+ type Hash = H256;
+ type Hashing = BlakeTwo256;
+ type AccountId = u64;
+ type Lookup = IdentityLookup;
+ type RuntimeEvent = RuntimeEvent;
+ type BlockHashCount = BlockHashCount;
+ type PalletInfo = PalletInfo;
+ type SS58Prefix = SS58Prefix;
+ type Nonce = u64;
+ type Block = Block;
+ }
+
+ impl pallet_timestamp::Config for Test {
+ type Moment = u64;
+ type OnTimestampSet = ();
+ type MinimumPeriod = ();
+ type WeightInfo = ();
+ }
+
+ parameter_types! {
+ pub const ChainForkVersions: ForkVersions = ForkVersions{
+ genesis: Fork {
+ version: [0, 0, 16, 32], // 0x00001020
+ epoch: 0,
+ },
+ altair: Fork {
+ version: [1, 0, 16, 32], // 0x01001020
+ epoch: 36660,
+ },
+ bellatrix: Fork {
+ version: [2, 0, 16, 32], // 0x02001020
+ epoch: 112260,
+ },
+ capella: Fork {
+ version: [3, 0, 16, 32], // 0x03001020
+ epoch: 162304,
+ },
+ };
+ pub const ExecutionHeadersPruneThreshold: u32 = 10;
+ }
+
+ impl ethereum_beacon_client::Config for Test {
+ type RuntimeEvent = RuntimeEvent;
+ type ForkVersions = ChainForkVersions;
+ type MaxExecutionHeadersToKeep = ExecutionHeadersPruneThreshold;
+ type WeightInfo = ();
+ }
+
+ // Build genesis storage according to the mock runtime.
+ pub fn new_tester() -> sp_io::TestExternalities {
+ let t = frame_system::GenesisConfig::::default().build_storage().unwrap();
+ let mut ext = sp_io::TestExternalities::new(t);
+ let _ = ext.execute_with(|| Timestamp::set(RuntimeOrigin::signed(1), 30_000));
+ ext
+ }
+}
diff --git a/bridges/snowbridge/primitives/beacon/Cargo.toml b/bridges/snowbridge/primitives/beacon/Cargo.toml
index 4f5213b3422bc9fba49f62ce63ae304d45333152..d181fa1d3945a704a3d1e1e28fea67b7dea0ee15 100644
--- a/bridges/snowbridge/primitives/beacon/Cargo.toml
+++ b/bridges/snowbridge/primitives/beacon/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-beacon-primitives"
description = "Snowbridge Beacon Primitives"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
@@ -12,7 +12,7 @@ categories = ["cryptography::cryptocurrencies"]
workspace = true
[dependencies]
-serde = { version = "1.0.196", optional = true, features = ["derive"] }
+serde = { optional = true, features = ["derive"], workspace = true, default-features = true }
hex = { version = "0.4", default-features = false }
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
diff --git a/bridges/snowbridge/primitives/core/Cargo.toml b/bridges/snowbridge/primitives/core/Cargo.toml
index 460c6c3442ec9c909013aab2b60c0f6c92c179a2..9a299ad0ae92326a6d0bb0391baf81e6e5bad663 100644
--- a/bridges/snowbridge/primitives/core/Cargo.toml
+++ b/bridges/snowbridge/primitives/core/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-core"
description = "Snowbridge Core"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
@@ -12,7 +12,7 @@ categories = ["cryptography::cryptocurrencies"]
workspace = true
[dependencies]
-serde = { version = "1.0.196", optional = true, features = ["alloc", "derive"], default-features = false }
+serde = { optional = true, features = ["alloc", "derive"], workspace = true }
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
hex-literal = { version = "0.4.1" }
diff --git a/bridges/snowbridge/primitives/ethereum/Cargo.toml b/bridges/snowbridge/primitives/ethereum/Cargo.toml
index a9e2fe654212d6b9d1fd8a26a1838708c3328bfa..9fa725a6c0565a5f42847d89149878f8997d07a0 100644
--- a/bridges/snowbridge/primitives/ethereum/Cargo.toml
+++ b/bridges/snowbridge/primitives/ethereum/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-ethereum"
description = "Snowbridge Ethereum"
-version = "0.1.0"
+version = "0.3.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
@@ -12,8 +12,8 @@ categories = ["cryptography::cryptocurrencies"]
workspace = true
[dependencies]
-serde = { version = "1.0.196", optional = true, features = ["derive"] }
-serde-big-array = { version = "0.3.2", optional = true, features = ["const-generics"] }
+serde = { optional = true, features = ["derive"], workspace = true, default-features = true }
+serde-big-array = { optional = true, features = ["const-generics"], workspace = true }
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
ethbloom = { version = "0.13.0", default-features = false }
@@ -33,7 +33,7 @@ ethabi = { package = "ethabi-decode", version = "1.0.0", default-features = fals
[dev-dependencies]
wasm-bindgen-test = "0.3.19"
rand = "0.8.5"
-serde_json = "1.0.113"
+serde_json = { workspace = true, default-features = true }
[features]
default = ["std"]
diff --git a/bridges/snowbridge/primitives/router/Cargo.toml b/bridges/snowbridge/primitives/router/Cargo.toml
index c4fc688a946c0ada710f3ec665f5ea239aee0377..ded773e0d38917b7834679b3e521dfbe9539e51b 100644
--- a/bridges/snowbridge/primitives/router/Cargo.toml
+++ b/bridges/snowbridge/primitives/router/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-router-primitives"
description = "Snowbridge Router Primitives"
-version = "0.0.0"
+version = "0.9.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
@@ -12,7 +12,7 @@ categories = ["cryptography::cryptocurrencies"]
workspace = true
[dependencies]
-serde = { version = "1.0.196", optional = true, features = ["derive"] }
+serde = { optional = true, features = ["derive"], workspace = true, default-features = true }
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
log = { workspace = true }
diff --git a/bridges/snowbridge/runtime/runtime-common/Cargo.toml b/bridges/snowbridge/runtime/runtime-common/Cargo.toml
index d4c86f8aa750134df8dfbe22a277a872e77f9175..bf5e9a8832dcf48113d5f74a92a060687da2fe4e 100644
--- a/bridges/snowbridge/runtime/runtime-common/Cargo.toml
+++ b/bridges/snowbridge/runtime/runtime-common/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-runtime-common"
description = "Snowbridge Runtime Common"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition.workspace = true
repository.workspace = true
diff --git a/bridges/snowbridge/runtime/test-common/Cargo.toml b/bridges/snowbridge/runtime/test-common/Cargo.toml
index 868f72b7b86efd8cb91513f667eefb4315684ad1..4e8b311cb97812bb94140aa02405b3a174064a8f 100644
--- a/bridges/snowbridge/runtime/test-common/Cargo.toml
+++ b/bridges/snowbridge/runtime/test-common/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "snowbridge-runtime-test-common"
description = "Snowbridge Runtime Tests"
-version = "0.0.0"
+version = "0.2.0"
authors = ["Snowfork "]
edition = "2021"
license = "Apache-2.0"
@@ -15,7 +15,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
hex-literal = { version = "0.4.1" }
log = { workspace = true }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
-serde = { version = "1.0.196", optional = true, features = ["derive"] }
+serde = { optional = true, features = ["derive"], workspace = true, default-features = true }
smallvec = "1.11.0"
# Substrate
diff --git a/bridges/snowbridge/runtime/test-common/src/lib.rs b/bridges/snowbridge/runtime/test-common/src/lib.rs
index c9bbce98e575d5e55015aa7814d8cd57a5c3a966..7455adf76170acefd50f06e8a40ef1c79028f49f 100644
--- a/bridges/snowbridge/runtime/test-common/src/lib.rs
+++ b/bridges/snowbridge/runtime/test-common/src/lib.rs
@@ -13,9 +13,9 @@ use parachains_runtimes_test_utils::{
};
use snowbridge_core::{ChannelId, ParaId};
use snowbridge_pallet_ethereum_client_fixtures::*;
-use sp_core::H160;
+use sp_core::{H160, U256};
use sp_keyring::AccountKeyring::*;
-use sp_runtime::{traits::Header, AccountId32, SaturatedConversion, Saturating};
+use sp_runtime::{traits::Header, AccountId32, DigestItem, SaturatedConversion, Saturating};
use xcm::{
latest::prelude::*,
v3::Error::{self, Barrier},
@@ -40,6 +40,7 @@ where
}
pub fn send_transfer_token_message(
+ ethereum_chain_id: u64,
assethub_parachain_id: u32,
weth_contract_address: H160,
destination_address: H160,
@@ -53,7 +54,8 @@ where
+ parachain_info::Config
+ pallet_collator_selection::Config
+ cumulus_pallet_parachain_system::Config
- + snowbridge_pallet_outbound_queue::Config,
+ + snowbridge_pallet_outbound_queue::Config
+ + pallet_timestamp::Config,
XcmConfig: xcm_executor::Config,
{
let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id));
@@ -88,7 +90,7 @@ where
WithdrawAsset(Assets::from(vec![fee.clone()])),
BuyExecution { fees: fee, weight_limit: Unlimited },
ExportMessage {
- network: Ethereum { chain_id: 11155111 },
+ network: Ethereum { chain_id: ethereum_chain_id },
destination: Here,
xcm: inner_xcm,
},
@@ -106,6 +108,7 @@ where
}
pub fn send_transfer_token_message_success(
+ ethereum_chain_id: u64,
collator_session_key: CollatorSessionKeys,
runtime_para_id: u32,
assethub_parachain_id: u32,
@@ -125,7 +128,8 @@ pub fn send_transfer_token_message_success(
+ pallet_message_queue::Config
+ cumulus_pallet_parachain_system::Config
+ snowbridge_pallet_outbound_queue::Config
- + snowbridge_pallet_system::Config,
+ + snowbridge_pallet_system::Config
+ + pallet_timestamp::Config,
XcmConfig: xcm_executor::Config,
ValidatorIdOf: From>,
::AccountId: From + AsRef<[u8]>,
@@ -147,6 +151,7 @@ pub fn send_transfer_token_message_success(
initial_fund::(assethub_parachain_id, 5_000_000_000_000);
let outcome = send_transfer_token_message::(
+ ethereum_chain_id,
assethub_parachain_id,
weth_contract_address,
destination_address,
@@ -193,13 +198,104 @@ pub fn send_transfer_token_message_success(
let digest = included_head.digest();
- //let digest = frame_system::Pallet::::digest();
let digest_items = digest.logs();
assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some());
});
}
+pub fn ethereum_outbound_queue_processes_messages_before_message_queue_works<
+ Runtime,
+ XcmConfig,
+ AllPalletsWithoutSystem,
+>(
+ ethereum_chain_id: u64,
+ collator_session_key: CollatorSessionKeys,
+ runtime_para_id: u32,
+ assethub_parachain_id: u32,
+ weth_contract_address: H160,
+ destination_address: H160,
+ fee_amount: u128,
+ snowbridge_pallet_outbound_queue: Box<
+ dyn Fn(Vec) -> Option>,
+ >,
+) where
+ Runtime: frame_system::Config
+ + pallet_balances::Config
+ + pallet_session::Config
+ + pallet_xcm::Config
+ + parachain_info::Config
+ + pallet_collator_selection::Config
+ + pallet_message_queue::Config
+ + cumulus_pallet_parachain_system::Config
+ + snowbridge_pallet_outbound_queue::Config
+ + snowbridge_pallet_system::Config
+ + pallet_timestamp::Config,
+ XcmConfig: xcm_executor::Config,
+ AllPalletsWithoutSystem:
+ OnInitialize> + OnFinalize>,
+ ValidatorIdOf: From>,
+ ::AccountId: From + AsRef<[u8]>,
+{
+ ExtBuilder::::default()
+ .with_collators(collator_session_key.collators())
+ .with_session_keys(collator_session_key.session_keys())
+ .with_para_id(runtime_para_id.into())
+ .with_tracing()
+ .build()
+ .execute_with(|| {
+ >::initialize(
+ runtime_para_id.into(),
+ assethub_parachain_id.into(),
+ )
+ .unwrap();
+
+ // fund asset hub sovereign account enough so it can pay fees
+ initial_fund::(assethub_parachain_id, 5_000_000_000_000);
+
+ let outcome = send_transfer_token_message::(
+ ethereum_chain_id,
+ assethub_parachain_id,
+ weth_contract_address,
+ destination_address,
+ fee_amount,
+ );
+
+ assert_ok!(outcome.ensure_complete());
+
+ // check events
+ let mut events = >::events()
+ .into_iter()
+ .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode()));
+ assert!(events.any(|e| matches!(
+ e,
+ snowbridge_pallet_outbound_queue::Event::MessageQueued { .. }
+ )));
+
+ let next_block_number: U256 = >::block_number()
+ .saturating_add(BlockNumberFor::::from(1u32))
+ .into();
+
+ let included_head =
+ RuntimeHelper::::run_to_block_with_finalize(
+ next_block_number.as_u32(),
+ );
+ let digest = included_head.digest();
+ let digest_items = digest.logs();
+
+ let mut found_outbound_digest = false;
+ for digest_item in digest_items {
+ match digest_item {
+ DigestItem::Other(_) => found_outbound_digest = true,
+ _ => {},
+ }
+ }
+
+ assert_eq!(found_outbound_digest, true);
+ });
+}
+
pub fn send_unpaid_transfer_token_message(
+ ethereum_chain_id: u64,
collator_session_key: CollatorSessionKeys,
runtime_para_id: u32,
assethub_parachain_id: u32,
@@ -213,7 +309,8 @@ pub fn send_unpaid_transfer_token_message(
+ parachain_info::Config
+ pallet_collator_selection::Config
+ cumulus_pallet_parachain_system::Config
- + snowbridge_pallet_outbound_queue::Config,
+ + snowbridge_pallet_outbound_queue::Config
+ + pallet_timestamp::Config,
XcmConfig: xcm_executor::Config,
ValidatorIdOf: From>,
{
@@ -262,7 +359,7 @@ pub fn send_unpaid_transfer_token_message(
let xcm = Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
ExportMessage {
- network: Ethereum { chain_id: 11155111 },
+ network: Ethereum { chain_id: ethereum_chain_id },
destination: Here,
xcm: inner_xcm,
},
@@ -284,6 +381,7 @@ pub fn send_unpaid_transfer_token_message(
#[allow(clippy::too_many_arguments)]
pub fn send_transfer_token_message_failure(
+ ethereum_chain_id: u64,
collator_session_key: CollatorSessionKeys,
runtime_para_id: u32,
assethub_parachain_id: u32,
@@ -301,7 +399,8 @@ pub fn send_transfer_token_message_failure(
+ pallet_collator_selection::Config
+ cumulus_pallet_parachain_system::Config
+ snowbridge_pallet_outbound_queue::Config
- + snowbridge_pallet_system::Config,
+ + snowbridge_pallet_system::Config
+ + pallet_timestamp::Config,
XcmConfig: xcm_executor::Config,
ValidatorIdOf: From>,
{
@@ -322,6 +421,7 @@ pub fn send_transfer_token_message_failure(
initial_fund::(assethub_parachain_id, initial_amount);
let outcome = send_transfer_token_message::(
+ ethereum_chain_id,
assethub_parachain_id,
weth_contract_address,
destination_address,
@@ -349,7 +449,8 @@ pub fn ethereum_extrinsic(
+ cumulus_pallet_parachain_system::Config
+ snowbridge_pallet_outbound_queue::Config
+ snowbridge_pallet_system::Config
- + snowbridge_pallet_ethereum_client::Config,
+ + snowbridge_pallet_ethereum_client::Config
+ + pallet_timestamp::Config,
ValidatorIdOf: From>,
::RuntimeCall:
From>,
@@ -430,7 +531,8 @@ pub fn ethereum_to_polkadot_message_extrinsics_work(
+ cumulus_pallet_parachain_system::Config
+ snowbridge_pallet_outbound_queue::Config
+ snowbridge_pallet_system::Config
- + snowbridge_pallet_ethereum_client::Config,
+ + snowbridge_pallet_ethereum_client::Config
+ + pallet_timestamp::Config,
ValidatorIdOf: From>,
::RuntimeCall:
From>,
diff --git a/bridges/snowbridge/scripts/contribute-upstream.sh b/bridges/snowbridge/scripts/contribute-upstream.sh
new file mode 100755
index 0000000000000000000000000000000000000000..32005b770ecf44cb9af18c61f830243ed5287e68
--- /dev/null
+++ b/bridges/snowbridge/scripts/contribute-upstream.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+# A script to cleanup the Snowfork fork of the polkadot-sdk to contribute it upstream back to parity/polkadot-sdk
+# ./bridges/snowbridge/scripts/contribute-upstream.sh
+
+# show CLI help
+function show_help() {
+ set +x
+ echo " "
+ echo Error: $1
+ echo "Usage:"
+ echo " ./bridges/snowbridge/scripts/contribute-upstream.sh Exit with code 0 if pallets code is well decoupled from the other code in the repo"
+ exit 1
+}
+
+if [[ -z "$1" ]]; then
+ echo "Please provide a branch name you would like your upstream branch to be named"
+ exit 1
+fi
+
+branch_name=$1
+
+set -eux
+
+# let's avoid any restrictions on where this script can be called for - snowbridge repo may be
+# plugged into any other repo folder. So the script (and other stuff that needs to be removed)
+# may be located either in call dir, or one of it subdirs.
+SNOWBRIDGE_FOLDER="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../"
+
+# Get the current Git branch name
+current_branch=$(git rev-parse --abbrev-ref HEAD)
+
+if [ "$current_branch" = "$branch_name" ] || git branch | grep -q "$branch_name"; then
+ echo "Already on requested branch or branch exists, not creating."
+else
+ git branch "$branch_name"
+fi
+
+git checkout "$branch_name"
+
+# remove everything we think is not required for our needs
+rm -rf rust-toolchain.toml
+rm -rf codecov.yml
+rm -rf $SNOWBRIDGE_FOLDER/.cargo
+rm -rf $SNOWBRIDGE_FOLDER/.github
+rm -rf $SNOWBRIDGE_FOLDER/SECURITY.md
+rm -rf $SNOWBRIDGE_FOLDER/.gitignore
+rm -rf $SNOWBRIDGE_FOLDER/rustfmt.toml
+rm -rf $SNOWBRIDGE_FOLDER/templates
+rm -rf $SNOWBRIDGE_FOLDER/pallets/ethereum-client/fuzz
+
+pushd $SNOWBRIDGE_FOLDER
+
+# let's test if everything we need compiles
+cargo check -p snowbridge-pallet-ethereum-client
+cargo check -p snowbridge-pallet-ethereum-client --features runtime-benchmarks
+cargo check -p snowbridge-pallet-ethereum-client --features try-runtime
+cargo check -p snowbridge-pallet-inbound-queue
+cargo check -p snowbridge-pallet-inbound-queue --features runtime-benchmarks
+cargo check -p snowbridge-pallet-inbound-queue --features try-runtime
+cargo check -p snowbridge-pallet-outbound-queue
+cargo check -p snowbridge-pallet-outbound-queue --features runtime-benchmarks
+cargo check -p snowbridge-pallet-outbound-queue --features try-runtime
+cargo check -p snowbridge-pallet-system
+cargo check -p snowbridge-pallet-system --features runtime-benchmarks
+cargo check -p snowbridge-pallet-system --features try-runtime
+
+# we're removing lock file after all checks are done. Otherwise we may use different
+# Substrate/Polkadot/Cumulus commits and our checks will fail
+rm -f $SNOWBRIDGE_FOLDER/Cargo.toml
+rm -f $SNOWBRIDGE_FOLDER/Cargo.lock
+
+popd
+
+# Replace Parity's CI files, that we have overwritten in our fork, to run our own CI
+rm -rf .github
+git remote -v | grep -w parity || git remote add parity https://github.com/paritytech/polkadot-sdk
+git fetch parity master
+git checkout parity/master -- .github
+git add -- .github
+
+echo "OK"
diff --git a/bridges/snowbridge/scripts/verify-pallets-build.sh b/bridges/snowbridge/scripts/verify-pallets-build.sh
deleted file mode 100755
index a62f48c84d4fd34731c20365a20097e086aa2c99..0000000000000000000000000000000000000000
--- a/bridges/snowbridge/scripts/verify-pallets-build.sh
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/bash
-
-# A script to remove everything from snowbridge repository/subtree, except:
-#
-# - parachain
-# - readme
-# - license
-
-set -eu
-
-# show CLI help
-function show_help() {
- set +x
- echo " "
- echo Error: $1
- echo "Usage:"
- echo " ./scripts/verify-pallets-build.sh Exit with code 0 if pallets code is well decoupled from the other code in the repo"
- echo "Options:"
- echo " --no-revert Leaves only runtime code on exit"
- echo " --ignore-git-state Ignores git actual state"
- exit 1
-}
-
-# parse CLI args
-NO_REVERT=
-IGNORE_GIT_STATE=
-for i in "$@"
-do
- case $i in
- --no-revert)
- NO_REVERT=true
- shift
- ;;
- --ignore-git-state)
- IGNORE_GIT_STATE=true
- shift
- ;;
- *)
- show_help "Unknown option: $i"
- ;;
- esac
-done
-
-# the script is able to work only on clean git copy, unless we want to ignore this check
-[[ ! -z "${IGNORE_GIT_STATE}" ]] || [[ -z "$(git status --porcelain)" ]] || { echo >&2 "The git copy must be clean"; exit 1; }
-
-# let's avoid any restrictions on where this script can be called for - snowbridge repo may be
-# plugged into any other repo folder. So the script (and other stuff that needs to be removed)
-# may be located either in call dir, or one of it subdirs.
-SNOWBRIDGE_FOLDER="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."
-
-# remove everything we think is not required for our needs
-rm -rf $SNOWBRIDGE_FOLDER/.cargo
-rm -rf $SNOWBRIDGE_FOLDER/.github
-rm -rf $SNOWBRIDGE_FOLDER/contracts
-rm -rf $SNOWBRIDGE_FOLDER/codecov.yml
-rm -rf $SNOWBRIDGE_FOLDER/docs
-rm -rf $SNOWBRIDGE_FOLDER/hooks
-rm -rf $SNOWBRIDGE_FOLDER/relayer
-rm -rf $SNOWBRIDGE_FOLDER/scripts
-rm -rf $SNOWBRIDGE_FOLDER/SECURITY.md
-rm -rf $SNOWBRIDGE_FOLDER/smoketest
-rm -rf $SNOWBRIDGE_FOLDER/web
-rm -rf $SNOWBRIDGE_FOLDER/.envrc-example
-rm -rf $SNOWBRIDGE_FOLDER/.gitbook.yaml
-rm -rf $SNOWBRIDGE_FOLDER/.gitignore
-rm -rf $SNOWBRIDGE_FOLDER/.gitmodules
-rm -rf $SNOWBRIDGE_FOLDER/_typos.toml
-rm -rf $SNOWBRIDGE_FOLDER/_codecov.yml
-rm -rf $SNOWBRIDGE_FOLDER/flake.lock
-rm -rf $SNOWBRIDGE_FOLDER/flake.nix
-rm -rf $SNOWBRIDGE_FOLDER/go.work
-rm -rf $SNOWBRIDGE_FOLDER/go.work.sum
-rm -rf $SNOWBRIDGE_FOLDER/polkadot-sdk
-rm -rf $SNOWBRIDGE_FOLDER/rust-toolchain.toml
-rm -rf $SNOWBRIDGE_FOLDER/parachain/rustfmt.toml
-rm -rf $SNOWBRIDGE_FOLDER/parachain/.gitignore
-rm -rf $SNOWBRIDGE_FOLDER/parachain/templates
-rm -rf $SNOWBRIDGE_FOLDER/parachain/.cargo
-rm -rf $SNOWBRIDGE_FOLDER/parachain/.config
-rm -rf $SNOWBRIDGE_FOLDER/parachain/pallets/ethereum-client/fuzz
-
-cd bridges/snowbridge/parachain
-
-# fix polkadot-sdk paths in Cargo.toml files
-find "." -name 'Cargo.toml' | while read -r file; do
- replace=$(printf '../../' )
- if [[ "$(uname)" = "Darwin" ]] || [[ "$(uname)" = *BSD ]]; then
- sed -i '' "s|polkadot-sdk/|$replace|g" "$file"
- else
- sed -i "s|polkadot-sdk/|$replace|g" "$file"
- fi
-done
-
-# let's test if everything we need compiles
-cargo check -p snowbridge-pallet-ethereum-client
-cargo check -p snowbridge-pallet-ethereum-client --features runtime-benchmarks
-cargo check -p snowbridge-pallet-ethereum-client --features try-runtime
-cargo check -p snowbridge-pallet-inbound-queue
-cargo check -p snowbridge-pallet-inbound-queue --features runtime-benchmarks
-cargo check -p snowbridge-pallet-inbound-queue --features try-runtime
-cargo check -p snowbridge-pallet-outbound-queue
-cargo check -p snowbridge-pallet-outbound-queue --features runtime-benchmarks
-cargo check -p snowbridge-pallet-outbound-queue --features try-runtime
-cargo check -p snowbridge-pallet-system
-cargo check -p snowbridge-pallet-system --features runtime-benchmarks
-cargo check -p snowbridge-pallet-system --features try-runtime
-
-cd -
-
-# we're removing lock file after all checks are done. Otherwise we may use different
-# Substrate/Polkadot/Cumulus commits and our checks will fail
-rm -f $SNOWBRIDGE_FOLDER/parachain/Cargo.toml
-rm -f $SNOWBRIDGE_FOLDER/parachain/Cargo.lock
-
-echo "OK"
diff --git a/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh b/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh
index 84764cdaca38c6bd19eb964c6e8d4fd54c4379c4..479ab833abfc38dd978c7b7d3abdd4c1fe37ad64 100755
--- a/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh
+++ b/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# import common functions
-source "${BASH_SOURCE%/*}/../../utils/bridges.sh"
+source "$FRAMEWORK_PATH/utils/bridges.sh"
# Expected sovereign accounts.
#
@@ -319,6 +319,7 @@ case "$1" in
$XCM_VERSION
;;
reserve-transfer-assets-from-asset-hub-rococo-local)
+ amount=$2
ensure_polkadot_js_api
# send ROCs to Alice account on AHW
limited_reserve_transfer_assets \
@@ -326,11 +327,12 @@ case "$1" in
"//Alice" \
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Westend" }, { "Parachain": 1000 } ] } } }')" \
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
- "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": 5000000000000 } } ] }')" \
+ "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": '$amount' } } ] }')" \
0 \
"Unlimited"
;;
withdraw-reserve-assets-from-asset-hub-rococo-local)
+ amount=$2
ensure_polkadot_js_api
# send back only 100000000000 wrappedWNDs to Alice account on AHW
limited_reserve_transfer_assets \
@@ -338,11 +340,12 @@ case "$1" in
"//Alice" \
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Westend" }, { "Parachain": 1000 } ] } } }')" \
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
- "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Westend" } } } }, "fun": { "Fungible": 3000000000000 } } ] }')" \
+ "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Westend" } } } }, "fun": { "Fungible": '$amount' } } ] }')" \
0 \
"Unlimited"
;;
reserve-transfer-assets-from-asset-hub-westend-local)
+ amount=$2
ensure_polkadot_js_api
# send WNDs to Alice account on AHR
limited_reserve_transfer_assets \
@@ -350,11 +353,12 @@ case "$1" in
"//Alice" \
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Rococo" }, { "Parachain": 1000 } ] } } }')" \
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
- "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": 5000000000000 } } ] }')" \
+ "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": '$amount' } } ] }')" \
0 \
"Unlimited"
;;
withdraw-reserve-assets-from-asset-hub-westend-local)
+ amount=$2
ensure_polkadot_js_api
# send back only 100000000000 wrappedROCs to Alice account on AHR
limited_reserve_transfer_assets \
@@ -362,7 +366,7 @@ case "$1" in
"//Alice" \
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Rococo" }, { "Parachain": 1000 } ] } } }')" \
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
- "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Rococo" } } } }, "fun": { "Fungible": 3000000000000 } } ] }')" \
+ "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Rococo" } } } }, "fun": { "Fungible": '$amount' } } ] }')" \
0 \
"Unlimited"
;;
diff --git a/bridges/testing/environments/rococo-westend/helper.sh b/bridges/testing/environments/rococo-westend/helper.sh
index 211a5b53b3d99ebef0e8c6a34cda48321badca9d..0a13ded213f5d3a0920cb466fc974c129e9ad79a 100755
--- a/bridges/testing/environments/rococo-westend/helper.sh
+++ b/bridges/testing/environments/rococo-westend/helper.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-$POLKADOT_SDK_PATH/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh "$@"
+$ENV_PATH/bridges_rococo_westend.sh "$@"
diff --git a/bridges/testing/environments/rococo-westend/rococo-init.zndsl b/bridges/testing/environments/rococo-westend/rococo-init.zndsl
index 145f2df73a6ec4b4179b12f0edbad5a6b95a7cba..c913e4db31f49184eb8214fda4d525c3594b358b 100644
--- a/bridges/testing/environments/rococo-westend/rococo-init.zndsl
+++ b/bridges/testing/environments/rococo-westend/rococo-init.zndsl
@@ -1,8 +1,8 @@
-Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
+Description: Check if the HRMP channel between Rococo BH and Rococo AH was opened successfully
Network: ./bridge_hub_rococo_local_network.toml
Creds: config
# ensure that initialization has completed
-asset-hub-rococo-collator1: js-script ../../js-helpers/wait-hrmp-channel-opened.js with "1013" within 300 seconds
+asset-hub-rococo-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/wait-hrmp-channel-opened.js with "1013" within 300 seconds
diff --git a/bridges/testing/environments/rococo-westend/rococo.zndsl b/bridges/testing/environments/rococo-westend/rococo.zndsl
index bd8681af2196814405a7d96e55882f00cbc0dc02..5b49c7c632fa4dd0ce77134858a2f697acbfff16 100644
--- a/bridges/testing/environments/rococo-westend/rococo.zndsl
+++ b/bridges/testing/environments/rococo-westend/rococo.zndsl
@@ -1,7 +1,7 @@
-Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
+Description: Check if the with-Westend GRANPDA pallet was initialized at Rococo BH
Network: ./bridge_hub_rococo_local_network.toml
Creds: config
# relay is already started - let's wait until with-Westend GRANPDA pallet is initialized at Rococo
-bridge-hub-rococo-collator1: js-script ../../js-helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds
+bridge-hub-rococo-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds
diff --git a/bridges/testing/environments/rococo-westend/spawn.sh b/bridges/testing/environments/rococo-westend/spawn.sh
index 5a0d65ce65dba1e5649920a419b7e9fa3da00367..cbd0b1bc623ab77876ed5ce3beefd7ab72db2d37 100755
--- a/bridges/testing/environments/rococo-westend/spawn.sh
+++ b/bridges/testing/environments/rococo-westend/spawn.sh
@@ -4,7 +4,7 @@ set -e
trap "trap - SIGTERM && kill -9 -$$" SIGINT SIGTERM EXIT
-source "${BASH_SOURCE%/*}/../../utils/zombienet.sh"
+source "$FRAMEWORK_PATH/utils/zombienet.sh"
# whether to init the chains (open HRMP channels, set XCM version, create reserve assets, etc)
init=0
diff --git a/bridges/testing/environments/rococo-westend/start_relayer.sh b/bridges/testing/environments/rococo-westend/start_relayer.sh
index c57d4f1a437493afd627efb989cba50222a3653c..7ddd312d395aa8733d2afea59277b48721c8a36b 100755
--- a/bridges/testing/environments/rococo-westend/start_relayer.sh
+++ b/bridges/testing/environments/rococo-westend/start_relayer.sh
@@ -2,8 +2,8 @@
set -e
-source "${BASH_SOURCE%/*}/../../utils/common.sh"
-source "${BASH_SOURCE%/*}/../../utils/zombienet.sh"
+source "$FRAMEWORK_PATH/utils/common.sh"
+source "$FRAMEWORK_PATH/utils/zombienet.sh"
rococo_dir=$1
westend_dir=$2
diff --git a/bridges/testing/environments/rococo-westend/westend-init.zndsl b/bridges/testing/environments/rococo-westend/westend-init.zndsl
index 2f8e665d592d587f3e88b45b8e5dcfa1e05780cc..0f5428eed3b01c042f8aad3b3df51c3a800a9b72 100644
--- a/bridges/testing/environments/rococo-westend/westend-init.zndsl
+++ b/bridges/testing/environments/rococo-westend/westend-init.zndsl
@@ -1,7 +1,7 @@
-Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
+Description: Check if the HRMP channel between Westend BH and Westend AH was opened successfully
Network: ./bridge_hub_westend_local_network.toml
Creds: config
# ensure that initialization has completed
-asset-hub-westend-collator1: js-script ../../js-helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds
+asset-hub-westend-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/wait-hrmp-channel-opened.js with "1002" within 600 seconds
diff --git a/bridges/testing/environments/rococo-westend/westend.zndsl b/bridges/testing/environments/rococo-westend/westend.zndsl
index c75ae579d27ab6eb979d6a0b88ab481940eb0e76..07968838852f7c0a00131db3080c460c07d08206 100644
--- a/bridges/testing/environments/rococo-westend/westend.zndsl
+++ b/bridges/testing/environments/rococo-westend/westend.zndsl
@@ -1,6 +1,6 @@
-Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
+Description: Check if the with-Rococo GRANPDA pallet was initialized at Westend BH
Network: ./bridge_hub_westend_local_network.toml
Creds: config
# relay is already started - let's wait until with-Rococo GRANPDA pallet is initialized at Westend
-bridge-hub-westend-collator1: js-script ../../js-helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds
+bridge-hub-westend-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds
diff --git a/bridges/testing/js-helpers/best-finalized-header-at-bridged-chain.js b/bridges/testing/framework/js-helpers/best-finalized-header-at-bridged-chain.js
similarity index 100%
rename from bridges/testing/js-helpers/best-finalized-header-at-bridged-chain.js
rename to bridges/testing/framework/js-helpers/best-finalized-header-at-bridged-chain.js
diff --git a/bridges/testing/js-helpers/chains/rococo-at-westend.js b/bridges/testing/framework/js-helpers/chains/rococo-at-westend.js
similarity index 100%
rename from bridges/testing/js-helpers/chains/rococo-at-westend.js
rename to bridges/testing/framework/js-helpers/chains/rococo-at-westend.js
diff --git a/bridges/testing/js-helpers/chains/westend-at-rococo.js b/bridges/testing/framework/js-helpers/chains/westend-at-rococo.js
similarity index 100%
rename from bridges/testing/js-helpers/chains/westend-at-rococo.js
rename to bridges/testing/framework/js-helpers/chains/westend-at-rococo.js
diff --git a/bridges/testing/js-helpers/native-assets-balance-increased.js b/bridges/testing/framework/js-helpers/native-assets-balance-increased.js
similarity index 82%
rename from bridges/testing/js-helpers/native-assets-balance-increased.js
rename to bridges/testing/framework/js-helpers/native-assets-balance-increased.js
index a35c753d97326d7b200c33844e9c5b8be22dfebc..749c3e2fec32ac0af4d244c53cb4ac1c6237817a 100644
--- a/bridges/testing/js-helpers/native-assets-balance-increased.js
+++ b/bridges/testing/framework/js-helpers/native-assets-balance-increased.js
@@ -3,12 +3,13 @@ async function run(nodeName, networkInfo, args) {
const api = await zombie.connect(wsUri, userDefinedTypes);
const accountAddress = args[0];
+ const expectedIncrease = BigInt(args[1]);
const initialAccountData = await api.query.system.account(accountAddress);
const initialAccountBalance = initialAccountData.data['free'];
while (true) {
const accountData = await api.query.system.account(accountAddress);
const accountBalance = accountData.data['free'];
- if (accountBalance > initialAccountBalance) {
+ if (accountBalance > initialAccountBalance + expectedIncrease) {
return accountBalance;
}
@@ -17,4 +18,4 @@ async function run(nodeName, networkInfo, args) {
}
}
-module.exports = { run }
+module.exports = {run}
diff --git a/bridges/testing/js-helpers/only-mandatory-headers-synced-when-idle.js b/bridges/testing/framework/js-helpers/only-mandatory-headers-synced-when-idle.js
similarity index 100%
rename from bridges/testing/js-helpers/only-mandatory-headers-synced-when-idle.js
rename to bridges/testing/framework/js-helpers/only-mandatory-headers-synced-when-idle.js
diff --git a/bridges/testing/js-helpers/only-required-headers-synced-when-idle.js b/bridges/testing/framework/js-helpers/only-required-headers-synced-when-idle.js
similarity index 100%
rename from bridges/testing/js-helpers/only-required-headers-synced-when-idle.js
rename to bridges/testing/framework/js-helpers/only-required-headers-synced-when-idle.js
diff --git a/bridges/testing/js-helpers/relayer-rewards.js b/bridges/testing/framework/js-helpers/relayer-rewards.js
similarity index 100%
rename from bridges/testing/js-helpers/relayer-rewards.js
rename to bridges/testing/framework/js-helpers/relayer-rewards.js
diff --git a/bridges/testing/js-helpers/utils.js b/bridges/testing/framework/js-helpers/utils.js
similarity index 100%
rename from bridges/testing/js-helpers/utils.js
rename to bridges/testing/framework/js-helpers/utils.js
diff --git a/bridges/testing/js-helpers/wait-hrmp-channel-opened.js b/bridges/testing/framework/js-helpers/wait-hrmp-channel-opened.js
similarity index 100%
rename from bridges/testing/js-helpers/wait-hrmp-channel-opened.js
rename to bridges/testing/framework/js-helpers/wait-hrmp-channel-opened.js
diff --git a/bridges/testing/js-helpers/wrapped-assets-balance.js b/bridges/testing/framework/js-helpers/wrapped-assets-balance.js
similarity index 100%
rename from bridges/testing/js-helpers/wrapped-assets-balance.js
rename to bridges/testing/framework/js-helpers/wrapped-assets-balance.js
diff --git a/bridges/testing/utils/bridges.sh b/bridges/testing/framework/utils/bridges.sh
similarity index 98%
rename from bridges/testing/utils/bridges.sh
rename to bridges/testing/framework/utils/bridges.sh
index cfde5dfd26b720e5eba20b0b0b3685e665163e3f..7c8399461584a85e4e8eedf5f347d9d74725f1c9 100755
--- a/bridges/testing/utils/bridges.sh
+++ b/bridges/testing/framework/utils/bridges.sh
@@ -41,8 +41,8 @@ function ensure_polkadot_js_api() {
echo ""
echo ""
echo "-------------------"
- echo "Installing (nodejs) sub module: $(dirname "$0")/generate_hex_encoded_call"
- pushd $(dirname "$0")/generate_hex_encoded_call
+ echo "Installing (nodejs) sub module: ${BASH_SOURCE%/*}/generate_hex_encoded_call"
+ pushd ${BASH_SOURCE%/*}/generate_hex_encoded_call
npm install
popd
fi
diff --git a/bridges/testing/utils/common.sh b/bridges/testing/framework/utils/common.sh
similarity index 100%
rename from bridges/testing/utils/common.sh
rename to bridges/testing/framework/utils/common.sh
diff --git a/bridges/testing/utils/generate_hex_encoded_call/index.js b/bridges/testing/framework/utils/generate_hex_encoded_call/index.js
similarity index 100%
rename from bridges/testing/utils/generate_hex_encoded_call/index.js
rename to bridges/testing/framework/utils/generate_hex_encoded_call/index.js
diff --git a/bridges/testing/utils/generate_hex_encoded_call/package-lock.json b/bridges/testing/framework/utils/generate_hex_encoded_call/package-lock.json
similarity index 100%
rename from bridges/testing/utils/generate_hex_encoded_call/package-lock.json
rename to bridges/testing/framework/utils/generate_hex_encoded_call/package-lock.json
diff --git a/bridges/testing/utils/generate_hex_encoded_call/package.json b/bridges/testing/framework/utils/generate_hex_encoded_call/package.json
similarity index 100%
rename from bridges/testing/utils/generate_hex_encoded_call/package.json
rename to bridges/testing/framework/utils/generate_hex_encoded_call/package.json
diff --git a/bridges/testing/utils/zombienet.sh b/bridges/testing/framework/utils/zombienet.sh
similarity index 100%
rename from bridges/testing/utils/zombienet.sh
rename to bridges/testing/framework/utils/zombienet.sh
diff --git a/bridges/testing/run-new-test.sh b/bridges/testing/run-new-test.sh
index 2ed2a412b8a7467d84624a47805a4d31e4d4d1a1..7c84a69aa47de84439091cb7b908233d02238175 100755
--- a/bridges/testing/run-new-test.sh
+++ b/bridges/testing/run-new-test.sh
@@ -21,6 +21,7 @@ do
done
export POLKADOT_SDK_PATH=`realpath ${BASH_SOURCE%/*}/../..`
+export FRAMEWORK_PATH=`realpath ${BASH_SOURCE%/*}/framework`
# set path to binaries
if [ "$ZOMBIENET_DOCKER_PATHS" -eq 1 ]; then
diff --git a/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl b/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl
index 203c95b73eb2d3743610b84828fd12402f2399d4..a58520ccea65b50dd0db1f67a72f6f8a4c5cdb38 100644
--- a/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl
+++ b/bridges/testing/tests/0001-asset-transfer/roc-reaches-westend.zndsl
@@ -1,12 +1,12 @@
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
-Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
+Network: {{ENV_PATH}}/bridge_hub_westend_local_network.toml
Creds: config
-# send ROC to //Alice from Rococo AH to Westend AH
-asset-hub-westend-collator1: run ../../environments/rococo-westend/helper.sh with "reserve-transfer-assets-from-asset-hub-rococo-local" within 120 seconds
+# send 5 ROC to //Alice from Rococo AH to Westend AH
+asset-hub-westend-collator1: run {{ENV_PATH}}/helper.sh with "reserve-transfer-assets-from-asset-hub-rococo-local 5000000000000" within 120 seconds
-# check that //Alice received the ROC on Westend AH
-asset-hub-westend-collator1: js-script ../../js-helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Rococo" within 300 seconds
+# check that //Alice received at least 4.8 ROC on Westend AH
+asset-hub-westend-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,4800000000000,Rococo" within 300 seconds
# check that the relayer //Charlie is rewarded by Westend AH
-bridge-hub-westend-collator1: js-script ../../js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726F,ThisChain,0" within 30 seconds
+bridge-hub-westend-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726F,ThisChain,0" within 30 seconds
diff --git a/bridges/testing/tests/0001-asset-transfer/run.sh b/bridges/testing/tests/0001-asset-transfer/run.sh
index 8a053ee72097417eabb8f5a4f14aba90eb172a14..a7bb122919b40187c49e89c489d2271d646bff40 100755
--- a/bridges/testing/tests/0001-asset-transfer/run.sh
+++ b/bridges/testing/tests/0001-asset-transfer/run.sh
@@ -2,17 +2,19 @@
set -e
-source "${BASH_SOURCE%/*}/../../utils/common.sh"
-source "${BASH_SOURCE%/*}/../../utils/zombienet.sh"
+source "${BASH_SOURCE%/*}/../../framework/utils/common.sh"
+source "${BASH_SOURCE%/*}/../../framework/utils/zombienet.sh"
-${BASH_SOURCE%/*}/../../environments/rococo-westend/spawn.sh --init --start-relayer &
+export ENV_PATH=`realpath ${BASH_SOURCE%/*}/../../environments/rococo-westend`
+
+$ENV_PATH/spawn.sh --init --start-relayer &
env_pid=$!
-ensure_process_file $env_pid $TEST_DIR/rococo.env 400
+ensure_process_file $env_pid $TEST_DIR/rococo.env 600
rococo_dir=`cat $TEST_DIR/rococo.env`
echo
-ensure_process_file $env_pid $TEST_DIR/westend.env 180
+ensure_process_file $env_pid $TEST_DIR/westend.env 300
westend_dir=`cat $TEST_DIR/westend.env`
echo
diff --git a/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl b/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl
index bbd95db9cfda88396657d0744ef84a4dd4d92180..fedb78cc2103555a1d15c446dd2f08fca94643e1 100644
--- a/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl
+++ b/bridges/testing/tests/0001-asset-transfer/wnd-reaches-rococo.zndsl
@@ -1,12 +1,12 @@
Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back
-Network: ../../environments/rococo-westend/bridge_hub_rococo_local_network.toml
+Network: {{ENV_PATH}}/bridge_hub_rococo_local_network.toml
Creds: config
-# send WND to //Alice from Westend AH to Rococo AH
-asset-hub-rococo-collator1: run ../../environments/rococo-westend/helper.sh with "reserve-transfer-assets-from-asset-hub-westend-local" within 120 seconds
+# send 5 WND to //Alice from Westend AH to Rococo AH
+asset-hub-rococo-collator1: run {{ENV_PATH}}/helper.sh with "reserve-transfer-assets-from-asset-hub-westend-local 5000000000000" within 120 seconds
-# check that //Alice received the WND on Rococo AH
-asset-hub-rococo-collator1: js-script ../../js-helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Westend" within 300 seconds
+# check that //Alice received at least 4.8 WND on Rococo AH
+asset-hub-rococo-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,4800000000000,Westend" within 300 seconds
# check that the relayer //Charlie is rewarded by Rococo AH
-bridge-hub-rococo-collator1: js-script ../../js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,ThisChain,0" within 30 seconds
+bridge-hub-rococo-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,ThisChain,0" within 30 seconds
diff --git a/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl b/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl
index 4c0a4675234e614f6569653aa14263dac3ac3e03..68b888b6858e86b8fe846b887bc101e221b2f21d 100644
--- a/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl
+++ b/bridges/testing/tests/0001-asset-transfer/wroc-reaches-rococo.zndsl
@@ -1,10 +1,10 @@
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
-Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
+Network: {{ENV_PATH}}/bridge_hub_westend_local_network.toml
Creds: config
-# send wROC back to Alice from Westend AH to Rococo AH
-asset-hub-rococo-collator1: run ../../environments/rococo-westend/helper.sh with "withdraw-reserve-assets-from-asset-hub-westend-local" within 120 seconds
+# send 3 wROC back to Alice from Westend AH to Rococo AH
+asset-hub-rococo-collator1: run {{ENV_PATH}}/helper.sh with "withdraw-reserve-assets-from-asset-hub-westend-local 3000000000000" within 120 seconds
-# check that //Alice received the wROC on Rococo AH
+# check that //Alice received at least 2.8 wROC on Rococo AH
# (we wait until //Alice account increases here - there are no other transactions that may increase it)
-asset-hub-rococo-collator1: js-script ../../js-helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 300 seconds
+asset-hub-rococo-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,2800000000000" within 300 seconds
diff --git a/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl b/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl
index 3acded97d5cc9cd0c2177f47fae7d362058eb85a..1a8a161819542e281094aed0681d52167aaea8e6 100644
--- a/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl
+++ b/bridges/testing/tests/0001-asset-transfer/wwnd-reaches-westend.zndsl
@@ -1,10 +1,10 @@
Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back
-Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
+Network: {{ENV_PATH}}/bridge_hub_westend_local_network.toml
Creds: config
-# send wWND back to Alice from Rococo AH to Westend AH
-asset-hub-westend-collator1: run ../../environments/rococo-westend/helper.sh with "withdraw-reserve-assets-from-asset-hub-rococo-local" within 120 seconds
+# send 3 wWND back to Alice from Rococo AH to Westend AH
+asset-hub-westend-collator1: run {{ENV_PATH}}/helper.sh with "withdraw-reserve-assets-from-asset-hub-rococo-local 3000000000000" within 120 seconds
-# check that //Alice received the wWND on Westend AH
+# check that //Alice received at least 2.8 wWND on Westend AH
# (we wait until //Alice account increases here - there are no other transactions that may increase it)
-asset-hub-westend-collator1: js-script ../../js-helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 300 seconds
+asset-hub-westend-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,2800000000000" within 300 seconds
diff --git a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl
index 82a1a103b14a7a175dff9f352517efc9269d7e36..6e381f5377329430c0d7a8723f9ea9081556bfeb 100644
--- a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl
+++ b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/rococo-to-westend.zndsl
@@ -1,8 +1,8 @@
Description: While relayer is idle, we only sync mandatory Rococo (and a single Rococo BH) headers to Westend BH.
-Network: ../../environments/rococo-westend/bridge_hub_westend_local_network.toml
+Network: {{ENV_PATH}}/bridge_hub_westend_local_network.toml
Creds: config
# ensure that relayer is only syncing mandatory headers while idle. This includes both headers that were
# generated while relay was offline and those in the next 100 seconds while script is active.
-bridge-hub-westend-collator1: js-script ../../js-helpers/only-mandatory-headers-synced-when-idle.js with "300,rococo-at-westend" within 600 seconds
+bridge-hub-westend-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/only-mandatory-headers-synced-when-idle.js with "300,rococo-at-westend" within 600 seconds
diff --git a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/run.sh b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/run.sh
index 423f4a1bcc0f2a2cceb06c4d1855b168063ec990..7d5b8d9273664b0861e8ffe1c528e9e1718c4df4 100755
--- a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/run.sh
+++ b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/run.sh
@@ -2,19 +2,19 @@
set -e
-source "${BASH_SOURCE%/*}/../../utils/common.sh"
-source "${BASH_SOURCE%/*}/../../utils/zombienet.sh"
+source "${BASH_SOURCE%/*}/../../framework/utils/common.sh"
+source "${BASH_SOURCE%/*}/../../framework/utils/zombienet.sh"
-# We use `--relayer-delay` in order to sleep some time before starting relayer.
-# We want to sleep for at least 1 session, which is expected to be 60 seconds for test environment.
-${BASH_SOURCE%/*}/../../environments/rococo-westend/spawn.sh &
+export ENV_PATH=`realpath ${BASH_SOURCE%/*}/../../environments/rococo-westend`
+
+$ENV_PATH/spawn.sh &
env_pid=$!
-ensure_process_file $env_pid $TEST_DIR/rococo.env 400
+ensure_process_file $env_pid $TEST_DIR/rococo.env 600
rococo_dir=`cat $TEST_DIR/rococo.env`
echo
-ensure_process_file $env_pid $TEST_DIR/westend.env 180
+ensure_process_file $env_pid $TEST_DIR/westend.env 300
westend_dir=`cat $TEST_DIR/westend.env`
echo
diff --git a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl
index 865813246252ae7911addd603903b6b2a43bab73..b4b3e43679162feb8c3c5253f3f963d950f31d55 100644
--- a/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl
+++ b/bridges/testing/tests/0002-mandatory-headers-synced-while-idle/westend-to-rococo.zndsl
@@ -1,7 +1,7 @@
Description: While relayer is idle, we only sync mandatory Westend (and a single Westend BH) headers to Rococo BH.
-Network: ../../environments/rococo-westend/bridge_hub_rococo_local_network.toml
+Network: {{ENV_PATH}}/bridge_hub_rococo_local_network.toml
Creds: config
# ensure that relayer is only syncing mandatory headers while idle. This includes both headers that were
# generated while relay was offline and those in the next 100 seconds while script is active.
-bridge-hub-rococo-collator1: js-script ../../js-helpers/only-mandatory-headers-synced-when-idle.js with "300,westend-at-rococo" within 600 seconds
+bridge-hub-rococo-collator1: js-script {{FRAMEWORK_PATH}}/js-helpers/only-mandatory-headers-synced-when-idle.js with "300,westend-at-rococo" within 600 seconds
diff --git a/cumulus/client/cli/src/lib.rs b/cumulus/client/cli/src/lib.rs
index 1807b8a1718e8b5c800b3bf27b58e0f39cd2948a..a7b2eb19de88a5c585ec3f6dfe5ad46ef0399b88 100644
--- a/cumulus/client/cli/src/lib.rs
+++ b/cumulus/client/cli/src/lib.rs
@@ -30,7 +30,7 @@ use codec::Encode;
use sc_chain_spec::ChainSpec;
use sc_client_api::HeaderBackend;
use sc_service::{
- config::{PrometheusConfig, TelemetryEndpoints},
+ config::{PrometheusConfig, RpcBatchRequestConfig, TelemetryEndpoints},
BasePath, TransactionPoolOptions,
};
use sp_core::hexdisplay::HexDisplay;
@@ -443,6 +443,14 @@ impl sc_cli::CliConfiguration for NormalizedRunCmd {
Ok(self.base.rpc_max_subscriptions_per_connection)
}
+ fn rpc_buffer_capacity_per_connection(&self) -> sc_cli::Result {
+ Ok(self.base.rpc_message_buffer_capacity_per_connection)
+ }
+
+ fn rpc_batch_config(&self) -> sc_cli::Result {
+ self.base.rpc_batch_config()
+ }
+
fn transaction_pool(&self, is_dev: bool) -> sc_cli::Result {
self.base.transaction_pool(is_dev)
}
diff --git a/cumulus/client/consensus/aura/src/collators/basic.rs b/cumulus/client/consensus/aura/src/collators/basic.rs
index 8740b06005d65d53747dacdb6499370962ffe0a4..52b83254951f0e0ba0fd9ad5420d7faca2402066 100644
--- a/cumulus/client/consensus/aura/src/collators/basic.rs
+++ b/cumulus/client/consensus/aura/src/collators/basic.rs
@@ -33,12 +33,12 @@ use cumulus_relay_chain_interface::RelayChainInterface;
use polkadot_node_primitives::CollationResult;
use polkadot_overseer::Handle as OverseerHandle;
-use polkadot_primitives::{CollatorPair, Id as ParaId};
+use polkadot_primitives::{CollatorPair, Id as ParaId, ValidationCode};
use futures::{channel::mpsc::Receiver, prelude::*};
use sc_client_api::{backend::AuxStore, BlockBackend, BlockOf};
use sc_consensus::BlockImport;
-use sp_api::ProvideRuntimeApi;
+use sp_api::{CallApiAt, ProvideRuntimeApi};
use sp_application_crypto::AppPublic;
use sp_blockchain::HeaderBackend;
use sp_consensus::SyncOracle;
@@ -47,6 +47,7 @@ use sp_core::crypto::Pair;
use sp_inherents::CreateInherentDataProviders;
use sp_keystore::KeystorePtr;
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Member};
+use sp_state_machine::Backend as _;
use std::{convert::TryFrom, sync::Arc, time::Duration};
use crate::collator as collator_util;
@@ -100,6 +101,7 @@ where
+ AuxStore
+ HeaderBackend
+ BlockBackend
+ + CallApiAt
+ Send
+ Sync
+ 'static,
@@ -172,6 +174,22 @@ where
continue
}
+ let Ok(Some(code)) =
+ params.para_client.state_at(parent_hash).map_err(drop).and_then(|s| {
+ s.storage(&sp_core::storage::well_known_keys::CODE).map_err(drop)
+ })
+ else {
+ continue;
+ };
+
+ super::check_validation_code_or_log(
+ &ValidationCode::from(code).hash(),
+ params.para_id,
+ ¶ms.relay_client,
+ *request.relay_parent(),
+ )
+ .await;
+
let relay_parent_header =
match params.relay_client.header(RBlockId::hash(*request.relay_parent())).await {
Err(e) => reject_with_error!(e),
diff --git a/cumulus/client/consensus/aura/src/collators/lookahead.rs b/cumulus/client/consensus/aura/src/collators/lookahead.rs
index a9f33173d832ab96edd0ada3f123647fb9a967d6..161f10d55a193de35a2585e1a1f5725f30e19bf7 100644
--- a/cumulus/client/consensus/aura/src/collators/lookahead.rs
+++ b/cumulus/client/consensus/aura/src/collators/lookahead.rs
@@ -290,10 +290,7 @@ where
// If the longest chain has space, build upon that. Otherwise, don't
// build at all.
potential_parents.sort_by_key(|a| a.depth);
- let initial_parent = match potential_parents.pop() {
- None => continue,
- Some(p) => p,
- };
+ let Some(initial_parent) = potential_parents.pop() else { continue };
// Build in a loop until not allowed. Note that the authorities can change
// at any block, so we need to re-claim our slot every time.
@@ -301,6 +298,10 @@ where
let mut parent_header = initial_parent.header;
let overseer_handle = &mut params.overseer_handle;
+ // We mainly call this to inform users at genesis if there is a mismatch with the
+ // on-chain data.
+ collator.collator_service().check_block_status(parent_hash, &parent_header);
+
// This needs to change to support elastic scaling, but for continuously
// scheduled chains this ensures that the backlog will grow steadily.
for n_built in 0..2 {
@@ -353,6 +354,14 @@ where
Some(v) => v,
};
+ super::check_validation_code_or_log(
+ &validation_code_hash,
+ params.para_id,
+ ¶ms.relay_client,
+ relay_parent,
+ )
+ .await;
+
match collator
.collate(
&parent_header,
diff --git a/cumulus/client/consensus/aura/src/collators/mod.rs b/cumulus/client/consensus/aura/src/collators/mod.rs
index 4c7b759daf736f69de48b586b082a7d01534d7e3..6e0067d0cedb602face8943737f99f3cb1a201a3 100644
--- a/cumulus/client/consensus/aura/src/collators/mod.rs
+++ b/cumulus/client/consensus/aura/src/collators/mod.rs
@@ -20,5 +20,60 @@
//! included parachain block, as well as the [`lookahead`] collator, which prospectively
//! builds on parachain blocks which have not yet been included in the relay chain.
+use cumulus_relay_chain_interface::RelayChainInterface;
+use polkadot_primitives::{
+ Hash as RHash, Id as ParaId, OccupiedCoreAssumption, ValidationCodeHash,
+};
+
pub mod basic;
pub mod lookahead;
+
+/// Check the `local_validation_code_hash` against the validation code hash in the relay chain
+/// state.
+///
+/// If the code hashes do not match, it prints a warning.
+async fn check_validation_code_or_log(
+ local_validation_code_hash: &ValidationCodeHash,
+ para_id: ParaId,
+ relay_client: &impl RelayChainInterface,
+ relay_parent: RHash,
+) {
+ let state_validation_code_hash = match relay_client
+ .validation_code_hash(relay_parent, para_id, OccupiedCoreAssumption::Included)
+ .await
+ {
+ Ok(hash) => hash,
+ Err(error) => {
+ tracing::debug!(
+ target: super::LOG_TARGET,
+ %error,
+ ?relay_parent,
+ %para_id,
+ "Failed to fetch validation code hash",
+ );
+ return
+ },
+ };
+
+ match state_validation_code_hash {
+ Some(state) =>
+ if state != *local_validation_code_hash {
+ tracing::warn!(
+ target: super::LOG_TARGET,
+ %para_id,
+ ?relay_parent,
+ ?local_validation_code_hash,
+ relay_validation_code_hash = ?state,
+ "Parachain code doesn't match validation code stored in the relay chain state",
+ );
+ },
+ None => {
+ tracing::warn!(
+ target: super::LOG_TARGET,
+ %para_id,
+ ?relay_parent,
+ "Could not find validation code for parachain in the relay chain state.",
+ );
+ },
+ }
+}
diff --git a/cumulus/client/consensus/aura/src/lib.rs b/cumulus/client/consensus/aura/src/lib.rs
index 8e4bc658e44bfdc173f3fdb66518da883edcb05b..ed6f5bdd4d6984350c5f59a3753618c3a038f323 100644
--- a/cumulus/client/consensus/aura/src/lib.rs
+++ b/cumulus/client/consensus/aura/src/lib.rs
@@ -54,7 +54,10 @@ use std::{
mod import_queue;
pub use import_queue::{build_verifier, import_queue, BuildVerifierParams, ImportQueueParams};
-pub use sc_consensus_aura::{slot_duration, AuraVerifier, BuildAuraWorkerParams, SlotProportion};
+pub use sc_consensus_aura::{
+ slot_duration, standalone::slot_duration_at, AuraVerifier, BuildAuraWorkerParams,
+ SlotProportion,
+};
pub use sc_consensus_slots::InherentDataProviderExt;
pub mod collator;
diff --git a/cumulus/client/consensus/common/src/tests.rs b/cumulus/client/consensus/common/src/tests.rs
index 597d1ab2acc2cff42d3230898c1129a7ba63b6f3..bfb95ae388ae3cd31f5035a9c6195631adbb8809 100644
--- a/cumulus/client/consensus/common/src/tests.rs
+++ b/cumulus/client/consensus/common/src/tests.rs
@@ -136,6 +136,15 @@ impl RelayChainInterface for Relaychain {
Ok(Some(PersistedValidationData { parent_head, ..Default::default() }))
}
+ async fn validation_code_hash(
+ &self,
+ _: PHash,
+ _: ParaId,
+ _: OccupiedCoreAssumption,
+ ) -> RelayChainResult