Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into ao-past-session-slashing-companion
Browse files Browse the repository at this point in the history
* master: (75 commits)
  Add Foreign Assets to Statemint (#2540)
  Bump casey from 0.3.3 to 0.4.0 (#2619)
  Companion for substrate#14188 (Add genesis config to Glutton pallet) (#2612)
  Use default for test relay runtimes (#2616)
  use `WasmExecutionMethod::default()` (#2622)
  Bump Swatinem/rust-cache from 2.3.0 to 2.4.0 (#2617)
  Do not assume `AssetId`s are `Copy` (companion for substrate#14158) (#2586)
  NFT Fractionalization on Westmint (#2600)
  Try-runtime proper return types (#2615)
  Nfts on Statemint (#2595)
  Update substrate/polkadot + needed changes to compile (#2613)
  Chainspecs: Fix bootnode address (#2611)
  Bump Swatinem/rust-cache from 2.2.1 to 2.3.0 (#2582)
  Bump ruby/setup-ruby from 1.148.0 to 1.149.0 (#2581)
  update WasmExecutionMethod (#2599)
  Switch to `relay_dispatch_queue_remaining_capacity` (#2608)
  Update syn (#2605)
  Update README.md (#2603)
  [Feature] XCM-Emulator (#2447)
  Removed Cargo.lock from subtreee (#2604)
  ...
  • Loading branch information
ordian committed May 23, 2023
2 parents d217533 + 415dd81 commit e43ce93
Show file tree
Hide file tree
Showing 456 changed files with 47,729 additions and 8,255 deletions.
32 changes: 32 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# An auto defined `clippy` feature was introduced,
# but it was found to clash with user defined features,
# so was renamed to `cargo-clippy`.
#
# If you want standard clippy run:
# RUSTFLAGS= cargo clippy
[target.'cfg(feature = "cargo-clippy")']
rustflags = [
"-Aclippy::all",
"-Dclippy::correctness",
"-Aclippy::if-same-then-else",
"-Aclippy::clone-double-ref",
"-Dclippy::complexity",
"-Aclippy::zero-prefixed-literal", # 00_1000_000
"-Aclippy::type_complexity", # raison d'etre
"-Aclippy::nonminimal-bool", # maybe
"-Aclippy::borrowed-box", # Reasonable to fix this one
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
"-Aclippy::unnecessary_cast", # Types may change
"-Aclippy::identity-op", # One case where we do 0 +
"-Aclippy::useless_conversion", # Types may change
"-Aclippy::unit_arg", # styalistic.
"-Aclippy::option-map-unit-fn", # styalistic
"-Aclippy::bind_instead_of_map", # styalistic
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
"-Aclippy::eq_op", # In tests we test equality.
"-Aclippy::while_immutable_condition", # false positives
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
]
10 changes: 9 additions & 1 deletion .github/pr-custom-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ rules:
check_type: changed_files
condition:
include: .*
# excluding files from 'Runtime files' and 'CI files' rules
# excluding files from 'Runtime files' and 'CI files' rules and `Bridges subtree files`
exclude: ^parachains/runtimes/assets/(statemine|statemint)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$|^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
min_approvals: 2
teams:
- core-devs

# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo)
- name: Bridges subtree files
check_type: changed_files
condition: ^bridges/.*
min_approvals: 1
teams:
- bridges-core

- name: CI files
check_type: changed_files
condition:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: rustup show

- name: Rust cache
uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1
uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 # v2.4.0

- name: Build rustdocs
run: SKIP_WASM_BUILD=1 cargo doc --all --no-deps
Expand Down
24 changes: 3 additions & 21 deletions .github/workflows/fmt-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,10 @@ jobs:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
container:
image: paritytech/ci-linux:production
steps:
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # v1.0.7
with:
profile: minimal
toolchain: nightly
override: true
components: clippy, rustfmt

- name: Cache Dependencies & Build Outputs
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Cargo fmt
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.3
with:
command: fmt
args: --all -- --check
run: cargo +nightly fmt --all -- --check
4 changes: 2 additions & 2 deletions .github/workflows/release-30_create-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
path: cumulus
ref: ${{ github.event.inputs.ref2 }}

- uses: ruby/setup-ruby@6cecb48364174b0952995175c55f9bf5527e6682 # v1.147.0
- uses: ruby/setup-ruby@7d546f4868fb108ed378764d873683f920672ae2 # v1.149.0
with:
ruby-version: 3.0.0

Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2

- uses: ruby/setup-ruby@6cecb48364174b0952995175c55f9bf5527e6682 # v1.147.0
- uses: ruby/setup-ruby@7d546f4868fb108ed378764d873683f920672ae2 # v1.149.0
with:
ruby-version: 3.0.0

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ polkadot_argument_parsing
**/chains/
*.iml
.env
bin
**/._*
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ variables:
CI_IMAGE: "paritytech/ci-linux:production"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.43"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.50"
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.29"
BUILDAH_COMMAND: "buildah --storage-driver overlay2"

Expand Down
88 changes: 88 additions & 0 deletions BRIDGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Using Parity Bridges Common dependency (`git subtree`).

In `./bridges` sub-directory you can find a `git subtree` imported version of:
[parity-bridges-common](https://github.com/paritytech/parity-bridges-common/) repository.

(For regular Cumulus contributor 1. is relevant) \
(For Cumulus maintainer 1. and 2. are relevant) \
(For Bridges team 1. and 2. and 3. are relevant)

# 1. How to fix broken Bridges code?

To fix Bridges code simply create a commit in current (`Cumulus`) repo. Best if
the commit is isolated to changes in `./bridges` sub-directory, because it makes
it easier to import that change back to upstream repo.

(Any changes to `bridges` subtree require Bridges team approve and they should manage backport to Bridges repo)


# 2. How to pull latest Bridges code to the `bridges` subtree
(in practice)
```
cd <cumulus-git-repo-dir>
# this will update new git branches from bridges repo
# there could be unresolved conflicts, but dont worry,
# lots of them are caused because of removed unneeded files with patch step,
./scripts/bridges_update_subtree.sh fetch
# so, after fetch and before solving conflicts just run patch,
# this will remove unneeded files and checks if subtree modules compiles
./scripts/bridges_update_subtree.sh patch
# if there are conflicts, this could help,
# this removes locally deleted files at least (move changes to git stash for commit)
./scripts/bridges_update_subtree.sh merge
# (optional) when conflicts resolved, you can check build again - should pass
# also important: this updates global Cargo.lock
./scripts/bridges_update_subtree.sh patch
# add changes to the commit, first command `fetch` starts merge,
# so after all conflicts are solved and patch passes and compiles,
# then we need to finish merge with:
git merge --continue
````

# 3. How to pull latest Bridges code or contribute back?
(in theory)

Note that it's totally fine to ping the **Bridges Team** to do that for you. The point
of adding the code as `git subtree` is to **reduce maintenance cost** for Cumulus/Polkadot
developers.

If you still would like to either update the code to match latest code from the repo
or create an upstream PR read below. The following commands should be run in the
current (`polkadot`) repo.

1. Add Bridges repo as a local remote:
```
$ git remote add -f bridges [email protected]:paritytech/parity-bridges-common.git
```

If you plan to contribute back, consider forking the repository on Github and adding
your personal fork as a remote as well.
```
$ git remote add -f my-bridges [email protected]:tomusdrw/parity-bridges-common.git
```

2. To update Bridges:
```
$ git fetch bridges master
$ git subtree pull --prefix=bridges bridges master --squash
````

We use `--squash` to avoid adding individual commits and rather squashing them
all into one.

3. Clean unneeded files here:
```
./bridges/scripts/verify-pallets-build.sh --ignore-git-state --no-revert
```

4. Contributing back to Bridges (creating upstream PR)
```
$ git subtree push --prefix=bridges my-bridges master
```
This command will push changes to your personal fork of Bridges repo, from where
you can simply create a PR to the main repo.
Loading

0 comments on commit e43ce93

Please sign in to comment.