Skip to content

Commit

Permalink
Upgrade to ChainX v4.0.0 (#605)
Browse files Browse the repository at this point in the history
* Remove VestingAccount

* Fix chain specs

* Update rust-toolchain

* Update make test and benchmark

* Update CI

* Run `make format` and `make clippy`

* Update CI

* Quick fix

* Support try-runtime

* Remove pallet-randomness-collective-flip

* Migrate elections-phragmen
(paritytech/substrate#7040)

* Migrate PalletVersion to StorageVersion
(paritytech/substrate#9165)

* Migrate pallet-babe epoch config
(paritytech/substrate#8072)

* Migrate frame-system AccountInfo to AccountInfoWithTripleRefCount
(paritytech/substrate#8221)

* Migrate prefix `GrandpaFinality` -> `Grandpa`

* Migrate prefix `Instance1Collective` -> `Council`

* Migrate prefix `Instance2Collective` -> `TechnicalCommittee`

* Migrate prefix `Instance1Membership` -> `TechnicalMembership`

* Migrate pallet-tips prefix from `Treasury` -> `Tips`

* Migrate pallet-bounties prefix from `Treasury` -> `Bounties`

* Migrate prefix from `PhragmenElection` -> `Elections`

* Revert `dev` spec_name

* Confirm migrations order

* Use ChainX substrate patch for system migration

* Run `make format`

* Reset spec_name `dev` -> `chainx`

* Add migrations.rs for mainnet and testnet

* Bump ChainX version to `4.0.0`

* Bump ChainX version to `4.0.0`

* Update governance parameters for dev and malan

* Update malan chainspec

* Quick fix

* Quick fix

* Update generate_keys.sh

* Adjust malan parameters

* Update malan chainspec

* Update malan chainspec

* Update malan chainspec

* Rename malan testnet name

* Add bootnodes url

* Run `make format`

* Regenerate weights

* Disable pre_release.yml CI

* Regenerate benchmark weights

* Run `make clippy`

* Run `make format`

Co-authored-by: icodezjb <icodezjb@users.noreply.github.com>
  • Loading branch information
icodezjb and icodezjb authored Feb 25, 2022
1 parent 818a699 commit 74083a0
Show file tree
Hide file tree
Showing 73 changed files with 40,818 additions and 22,780 deletions.
136 changes: 31 additions & 105 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: ci

on: [push, pull_request]
name: CI

on:
push:
branches:
- master
- develop-2022
pull_request:
branches:
- master
- develop-2022

env:
CARGO_INCREMENTAL: 0
Expand All @@ -10,112 +18,30 @@ env:
RUSTUP_MAX_RETRIES: 10

jobs:
rustfmt:
name: Rustfmt
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# NOTE: Do not forget to also update the toolchain in Dockerfile when updating the toolchain here.
toolchain: [nightly-2021-06-29]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt

- name: Format
run: cargo fmt -- --check

test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
toolchain: [nightly-2021-06-29]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: wasm32-unknown-unknown
profile: minimal
override: true

- if: matrix.os == 'ubuntu-latest'
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Test
run: cargo test --workspace -- --test-threads 1

- name: Compile
run: cargo test --no-run

clippy:
name: Clippy
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
toolchain: [nightly-2021-06-29]

Checks:
name: Fmt-Clippy-Test-Benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: wasm32-unknown-unknown
profile: minimal
override: true
components: rust-src, clippy
- uses: Swatinem/rust-cache@v1.3.0

- name: Clippy
run: cargo clippy
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-11-07
components: rustfmt, rust-src, clippy
target: wasm32-unknown-unknown
override: true

runtime_benchmarks:
name: Runtime Benchmarks
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
toolchain: [nightly-2021-06-29]
- name: 1-Format
run: cargo fmt --all -- --check

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: 2-Clippy
run: make clippy

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: 3-Test
run: make test

- name: Runtime benchmarks
run: cargo test --no-run --features runtime-benchmarks
- name: 4-Benchmark
run: make benchmark
2 changes: 1 addition & 1 deletion .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
- 'pre-v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Pre-release

Expand Down
Loading

0 comments on commit 74083a0

Please sign in to comment.