Skip to content

Commit

Permalink
Merge branch 'open-web3-stack:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
hqwangningbo authored Nov 25, 2023
2 parents ae28667 + ae4afc6 commit dcf07d5
Show file tree
Hide file tree
Showing 161 changed files with 4,057 additions and 5,684 deletions.
51 changes: 51 additions & 0 deletions .config/zepter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Configuration for the Zepter CLI to ensure correct feature configuration in the Rust workspace.
# <https://crates.io/crates/zepter>

version:
# File format for parsing it:
format: 1
# Minimum version of the binary that is expected to work. This is just for printing a nice error
# message when someone tries to use an older version.
binary: 0.15.0

# The examples in this file assume crate `A` to have a dependency on crate `B`.
workflows:
# Check that everything is good without modifying anything:
check:
- [
'lint',
# Check that `A` activates the features of `B`.
'propagate-feature',
# These are the features to check:
'--features=try-runtime,runtime-benchmarks,std',
# Ignore the features of dependencies that are exclusively used as dev or build.
'--dep-kinds=normal:check,dev:ignore,build:ignore',
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
'--left-side-feature-missing=ignore',
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
'--left-side-outside-workspace=ignore',
# Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used.
'--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking',
# Show the paths of failed crates to have them clickable in the terminal: 
'--show-path',
# Aux
'--offline',
'--locked',
'--quiet',
]
# Format the features into canonical format:
- ['format', 'features', '--offline', '--locked', '--quiet']
# Same as `check`, but actually fix the issues instead of just reporting them:
default:
- [ $check.0, '--fix' ]
- [ $check.1, '--fix' ]

# Will be displayed when any workflow fails:
help:
text: |
ORML uses the Zepter CLI to detect abnormalities in the feature configuration.
It looks like at least one check failed; please see the console output. You can try to automatically address them by running `zepter`.
Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you.
links:
- "https://github.com/open-web3-stack/open-runtime-module-library/pull/964"
- "https://github.com/ggwpez/zepter"
14 changes: 4 additions & 10 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,21 @@ on:
env:
TARPAULIN_VERSION: 0.19.1

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Coverage Report
runs-on: [self-hosted]
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2022-10-30
components: rustfmt
target: wasm32-unknown-unknown
- name: Generate code coverage
run: |
wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-${{ env.TARPAULIN_VERSION }}-travis.tar.gz
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/master.yml.disabled

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/publish_packages.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Open a release PR
on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
type: string

jobs:
make-release-pr:
permissions:
id-token: write # Enable OIDC
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-release
- uses: chainguard-dev/actions/setup-gitsign@main
- uses: cargo-bins/release-pr@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ inputs.version }}
crate-release-all: true
24 changes: 9 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,19 @@ on:
paths-ignore:
- '**/README.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cancel:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build:
runs-on: [self-hosted]
env:
SCCACHE_CACHE_SIZE: "50G"
needs: cancel
SCCACHE_CACHE_SIZE: "60G"
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2022-10-30
components: rustfmt
target: wasm32-unknown-unknown
- name: Install Wasm toolchain
run: rustup target add wasm32-unknown-unknown
- name: Check format
Expand All @@ -49,5 +39,9 @@ jobs:
run: cargo clippy -- -D warnings
- name: Check for Wasm
run: make dev-check
- name: Install Zepter
run: cargo install zepter --version 0.15.0 --locked -q -f --no-default-features && zepter --version
- name: Check Rust features
run: make dev-features-check
- name: Run tests
run: make dev-test
155 changes: 77 additions & 78 deletions Cargo.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ members = [
"asset-registry",
"auction",
"authority",
"bencher",
"bencher/test",
"benchmarking",
"currencies",
"gradually-update",
"oracle",
"oracle/rpc",
"oracle/rpc/runtime-api",
"oracle/runtime-api",
"tokens",
"tokens/rpc",
"tokens/rpc/runtime-api",
"tokens/runtime-api",
"traits",
"utilities",
"vesting",
Expand All @@ -24,84 +20,87 @@ members = [
"xcm-support",
"unknown-tokens",
"build-script-utils",
"weight-gen",
"weight-meter",
"payments"
"payments",
"parameters",
]

exclude = ["bencher/test"]

resolver = "2"

[profile.dev]
split-debuginfo = "unpacked"

[patch.'https://github.com/paritytech/substrate']
frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
frame-support = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
frame-system = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-session = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sc-executor = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sc-utils = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-api = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-core = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-io = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-session = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-staking = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-std = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-storage = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-trie = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-version = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
sp-weights = { git = "https://github.com/paritytech//substrate", rev = "18bb7c7c841b101c19a8d1881b893ae8e37de460" }
[workspace.dependencies]
log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.189" }
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["max-encoded-len"] }

[patch.'https://github.com/paritytech/cumulus']
cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "1b2003d48f753be96471c5f96c4a2307592db49f" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "1b2003d48f753be96471c5f96c4a2307592db49f" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "1b2003d48f753be96471c5f96c4a2307592db49f" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "1b2003d48f753be96471c5f96c4a2307592db49f" }
parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "1b2003d48f753be96471c5f96c4a2307592db49f" }
cumulus-pallet-dmp-queue = { version = "0.4.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.4.0", default-features = false }
cumulus-pallet-xcm = { version = "0.4.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.4.0", default-features = false }
cumulus-primitives-core = { version = "0.4.0", default-features = false }
frame-benchmarking = { version = "25.0.0", default-features = false }
frame-support = { version = "25.0.0", default-features = false }
frame-system = { version = "25.0.0", default-features = false }
pallet-authority-discovery = { version = "25.0.0", default-features = false }
pallet-authorship = { version = "25.0.0", default-features = false }
pallet-babe = { version = "25.0.0", default-features = false }
pallet-balances = { version = "25.0.0", default-features = false }
pallet-elections-phragmen = { version = "26.0.0", default-features = false }
pallet-message-queue = { version = "28.0.0", default-features = false }
pallet-preimage = { version = "25.0.0", default-features = false }
pallet-root-testing = { version = "1.0.0", default-features = false }
pallet-scheduler = { version = "26.0.0", default-features = false }
pallet-session = { version = "25.0.0", default-features = false }
pallet-staking = { version = "25.0.0", default-features = false }
pallet-timestamp = { version = "24.0.0", default-features = false }
pallet-transaction-payment = { version = "25.0.0", default-features = false }
pallet-treasury = { version = "24.0.0", default-features = false }
pallet-vesting = { version = "25.0.0", default-features = false }
pallet-xcm = { version = "4.0.0", default-features = false }
parachain-info = { package = "staging-parachain-info", version = "0.4.0", default-features = false }
polkadot-core-primitives = { version = "4.0.0", default-features = false }
polkadot-parachain-primitives = { version = "3.0.0", default-features = false }
polkadot-primitives = { version = "4.0.0", default-features = false }
polkadot-runtime-common = { version = "4.0.0", default-features = false }
polkadot-runtime-parachains = { version = "4.0.0", default-features = false }
sp-api = { version = "23.0.0", default-features = false }
sp-application-crypto = { version = "27.0.0", default-features = false }
sp-arithmetic = { version = "20.0.0", default-features = false }
sp-authority-discovery = { version = "23.0.0", default-features = false }
sp-blockchain = { version = "25.0.0", default-features = false }
sp-consensus = { version = "0.29.0", default-features = false }
sp-consensus-slots = { version = "0.29.0", default-features = false }
sp-core = { version = "25.0.0", default-features = false }
sp-debug-derive = { version = "12.0.0", default-features = false }
sp-externalities = { version = "0.23.0", default-features = false }
sp-inherents = { version = "23.0.0", default-features = false }
sp-io = { version = "27.0.0", default-features = false }
sp-keystore = { version = "0.31.0", default-features = false }
sp-maybe-compressed-blob = { version = "9.0.0", default-features = false }
sp-npos-elections = { version = "23.0.0", default-features = false }
sp-panic-handler = { version = "12.0.0", default-features = false }
sp-runtime = { version = "28.0.0", default-features = false }
sp-runtime-interface = { version = "21.0.0", default-features = false }
sp-session = { version = "24.0.0", default-features = false }
sp-staking = { version = "23.0.0", default-features = false }
sp-state-machine = { version = "0.32.0", default-features = false }
sp-std = { version = "12.0.0", default-features = false }
sp-storage = { version = "17.0.0", default-features = false }
sp-timestamp = { version = "23.0.0", default-features = false }
sp-tracing = { version = "14.0.0", default-features = false }
sp-trie = { version = "26.0.0", default-features = false }
sp-version = { version = "26.0.0", default-features = false }
sp-wasm-interface = { version = "18.0.0", default-features = false }
sp-weights = { version = "24.0.0", default-features = false }
xcm = { package = "staging-xcm", version = "4.0.0", default-features = false }
xcm-builder = { package = "staging-xcm-builder", version = "4.0.0", default-features = false }
xcm-executor = { package = "staging-xcm-executor", version = "4.0.0", default-features = false }

[patch.'https://github.com/paritytech/polkadot']
pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
xcm = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "8deef133d3ca1bdea8c6267c4a66ecabb903a18b" }
sc-client-api = { version = "25.0.0" }
sc-client-db = { version = "0.32.0" }
sc-executor = { version = "0.29.0" }
sc-executor-common = { version = "0.26.0" }
sc-utils = { version = "11.0.0" }
xcm-simulator = { version = "4.0.0" }
Loading

0 comments on commit dcf07d5

Please sign in to comment.