Skip to content

Commit

Permalink
Merge branch 'devnet-ready' into encrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
andreea-popescu-reef authored Sep 9, 2024
2 parents 162453e + fe5f5aa commit 96b4982
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 60 deletions.
53 changes: 2 additions & 51 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,57 +254,8 @@ jobs:
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo test --workspace
run: cargo test --workspace

# runs cargo test --workspace --features=runtime-benchmarks
cargo-test-benchmarks:
name: cargo test w/benchmarks
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
include:
- os: ubuntu-latest
# - os: macos-latest
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/rust-cache@v2.2.1
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo test --workspace --features=runtime-benchmarks
run: cargo test --workspace --features=runtime-benchmarks
- name: cargo test --workspace --all-features
run: cargo test --workspace --all-features

# ensures cargo fix has no trivial changes that can be applied
cargo-fix:
Expand Down
6 changes: 6 additions & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ pub enum ProxyType {
Registration,
Transfer,
SmallTransfer,
RootWeights,
}
// Transfers below SMALL_TRANSFER_LIMIT are considered small transfers
pub const SMALL_TRANSFER_LIMIT: Balance = 500_000_000; // 0.5 TAO
Expand Down Expand Up @@ -673,6 +674,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
| RuntimeCall::SubtensorModule(pallet_subtensor::Call::root_register { .. })
| RuntimeCall::SubtensorModule(pallet_subtensor::Call::burned_register { .. })
| RuntimeCall::Triumvirate(..)
| RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_root_weights { .. })
),
ProxyType::Triumvirate => matches!(
c,
Expand All @@ -695,6 +697,10 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::SubtensorModule(pallet_subtensor::Call::burned_register { .. })
| RuntimeCall::SubtensorModule(pallet_subtensor::Call::register { .. })
),
ProxyType::RootWeights => matches!(
c,
RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_root_weights { .. })
),
}
}
fn is_superset(&self, o: &Self) -> bool {
Expand Down
18 changes: 9 additions & 9 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
#!/bin/bash
set -ex
cd support/macros
cargo publish
cargo publish --token $1
cd ../..
cd pallets/commitments
cargo publish
cargo publish --token $1
cd ..
cd collective
cargo publish
cargo publish --token $1
cd ..
cd registry
cargo publish
cargo publish --token $1
cd ..
cd subtensor
cargo publish
cargo publish --token $1
cd runtime-api
cargo publish
cargo publish --token $1
cd ../..
cd admin-utils
cargo publish
cargo publish --token $1
cd ../..
cd runtime
cargo publish
cargo publish --token $1
cd ..
cd node
cargo publish
cargo publish --token $1
echo "published successfully."

0 comments on commit 96b4982

Please sign in to comment.