Skip to content

Commit 27b0c52

Browse files
icodezjbgguoss
authored andcommitted
Upgrade to ChainX v4.0.0 (#605)
* 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 <[email protected]>
1 parent c2785a0 commit 27b0c52

File tree

73 files changed

+40818
-22780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+40818
-22780
lines changed

.github/workflows/ci.yaml

Lines changed: 31 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
name: ci
2-
3-
on: [push, pull_request]
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop-2022
8+
pull_request:
9+
branches:
10+
- master
11+
- develop-2022
412

513
env:
614
CARGO_INCREMENTAL: 0
@@ -10,112 +18,30 @@ env:
1018
RUSTUP_MAX_RETRIES: 10
1119

1220
jobs:
13-
rustfmt:
14-
name: Rustfmt
15-
runs-on: ${{ matrix.os }}
16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
os: [ubuntu-latest]
20-
# NOTE: Do not forget to also update the toolchain in Dockerfile when updating the toolchain here.
21-
toolchain: [nightly-2021-06-29]
22-
23-
steps:
24-
- name: Checkout repository
25-
uses: actions/checkout@v2
26-
27-
- name: Install Rust toolchain
28-
uses: actions-rs/toolchain@v1
29-
with:
30-
toolchain: ${{ matrix.toolchain }}
31-
components: rustfmt
32-
33-
- name: Format
34-
run: cargo fmt -- --check
35-
36-
test:
37-
name: Test
38-
runs-on: ${{ matrix.os }}
39-
strategy:
40-
fail-fast: false
41-
matrix:
42-
os: [ubuntu-latest]
43-
toolchain: [nightly-2021-06-29]
44-
45-
steps:
46-
- name: Checkout repository
47-
uses: actions/checkout@v2
48-
49-
- name: Install Rust toolchain
50-
uses: actions-rs/toolchain@v1
51-
with:
52-
toolchain: ${{ matrix.toolchain }}
53-
target: wasm32-unknown-unknown
54-
profile: minimal
55-
override: true
56-
57-
- if: matrix.os == 'ubuntu-latest'
58-
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
59-
60-
- uses: actions/cache@v2
61-
with:
62-
path: |
63-
~/.cargo/registry
64-
~/.cargo/git
65-
target
66-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
67-
68-
- name: Test
69-
run: cargo test --workspace -- --test-threads 1
70-
71-
- name: Compile
72-
run: cargo test --no-run
73-
74-
clippy:
75-
name: Clippy
76-
runs-on: ${{ matrix.os }}
77-
strategy:
78-
fail-fast: false
79-
matrix:
80-
os: [ubuntu-latest]
81-
toolchain: [nightly-2021-06-29]
82-
21+
Checks:
22+
name: Fmt-Clippy-Test-Benchmark
23+
runs-on: ubuntu-latest
8324
steps:
84-
- name: Checkout repository
85-
uses: actions/checkout@v2
25+
- uses: actions/checkout@v2
8626

87-
- name: Install Rust toolchain
88-
uses: actions-rs/toolchain@v1
89-
with:
90-
toolchain: ${{ matrix.toolchain }}
91-
target: wasm32-unknown-unknown
92-
profile: minimal
93-
override: true
94-
components: rust-src, clippy
27+
- uses: Swatinem/[email protected]
9528

96-
- name: Clippy
97-
run: cargo clippy
29+
- uses: actions-rs/toolchain@v1
30+
with:
31+
profile: minimal
32+
toolchain: nightly-2021-11-07
33+
components: rustfmt, rust-src, clippy
34+
target: wasm32-unknown-unknown
35+
override: true
9836

99-
runtime_benchmarks:
100-
name: Runtime Benchmarks
101-
runs-on: ${{ matrix.os }}
102-
strategy:
103-
fail-fast: false
104-
matrix:
105-
os: [ubuntu-latest]
106-
toolchain: [nightly-2021-06-29]
37+
- name: 1-Format
38+
run: cargo fmt --all -- --check
10739

108-
steps:
109-
- name: Checkout repository
110-
uses: actions/checkout@v2
40+
- name: 2-Clippy
41+
run: make clippy
11142

112-
- name: Install Rust toolchain
113-
uses: actions-rs/toolchain@v1
114-
with:
115-
toolchain: ${{ matrix.toolchain }}
116-
target: wasm32-unknown-unknown
117-
profile: minimal
118-
override: true
43+
- name: 3-Test
44+
run: make test
11945

120-
- name: Runtime benchmarks
121-
run: cargo test --no-run --features runtime-benchmarks
46+
- name: 4-Benchmark
47+
run: make benchmark

.github/workflows/pre_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ on:
22
push:
33
# Sequence of patterns matched against refs/tags
44
tags:
5-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
5+
- 'pre-v*' # Push events to matching v*, i.e. v1.0, v20.15.10
66

77
name: Create Pre-release
88

0 commit comments

Comments
 (0)