Skip to content

Commit

Permalink
Fix/original staking (#322)
Browse files Browse the repository at this point in the history
### Description
Use the original Staking pallet. See [note
#3](#300)

### Types of Changes
<!--- What types of changes does your code introduce? -->
- [ ] Tech Debt (Code improvements)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Dependency upgrade (A change in substrate or any 3rd party crate
version)

### Migrations and Hooks
<!--- Check the following box with an x if the following applies: -->
- [ ] This change requires a runtime migration.
- [ ] Modifies `on_initialize`
- [ ] Modifies `on_finalize`

### Checklist
<!--- All boxes need to be checked. Follow this checklist before
requiring PR review -->
- [x] Change has been tested locally.
- [ ] Change adds / updates tests.
- [ ] Changelog doc updated.
  • Loading branch information
MRamanenkau authored May 3, 2024
1 parent c181722 commit c2a9d50
Show file tree
Hide file tree
Showing 22 changed files with 139 additions and 15,974 deletions.
52 changes: 24 additions & 28 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,38 +55,34 @@ jobs:
- name: Run dev chain
run: |
timeout --preserve-status 30s ./target/release/cere --dev
# Disabled for one release to apply missing migrations
# https://github.com/Cerebellum-Network/blockchain-node/pull/300
# - name: Check Build for Benchmarking
# run: >
# pushd node &&
# cargo check --features=runtime-benchmarks --release
- name: Check Build for Benchmarking
run: >
pushd node &&
cargo check --features=runtime-benchmarks --release
- name: Check Build for Try-Runtime
run: |
cargo check --features=try-runtime --release
# Disabled for one release to apply missing migrations
# https://github.com/Cerebellum-Network/blockchain-node/pull/300
# clippy:
# name: Run Clippy
# needs: format
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
# - name: Install linux dependencies
# run: sudo apt update && sudo apt install -y cargo clang libssl-dev llvm libudev-dev protobuf-compiler
# - name: Install nightly toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: nightly-2023-05-23
# override: true
# target: wasm32-unknown-unknown
# components: clippy
# - name: Rust Cache
# uses: Swatinem/rust-cache@v2
# - name: Check with Clippy
# run: |
# cargo clippy --no-deps --all-targets --features runtime-benchmarks,try-runtime --workspace -- --deny warnings
clippy:
name: Run Clippy
needs: format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install linux dependencies
run: sudo apt update && sudo apt install -y cargo clang libssl-dev llvm libudev-dev protobuf-compiler
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-03-12
override: true
target: wasm32-unknown-unknown
components: clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Check with Clippy
run: |
cargo clippy --no-deps --all-targets --features runtime-benchmarks,try-runtime --workspace -- --deny warnings
tests:
name: Run tests
Expand Down
75 changes: 67 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ members = [
"pallets/ddc-staking",
"pallets/erc20",
"pallets/erc721",
"pallets/staking",
"primitives",
"runtime/cere",
"runtime/cere-dev",
Expand Down Expand Up @@ -84,14 +83,14 @@ pallet-nomination-pools = { git = "https://github.com/paritytech/substrate.git",
pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-offences = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-preimage = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-proxy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-recovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false, features = ["historical"] }
pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
# pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-staking = { path = "pallets/staking", default-features = false }
pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ First, complete the [basic Rust setup instructions](./docs/rust-setup.md).
Use the following command to build the node without launching it:

```sh
cargo +nightly-2023-05-23 build --release
cargo +nightly-2024-03-12 build --release
```

## Run
Expand Down
73 changes: 0 additions & 73 deletions pallets/staking/Cargo.toml

This file was deleted.

Loading

0 comments on commit c2a9d50

Please sign in to comment.