Skip to content

Commit 6000266

Browse files
authored
Merge pull request #550 from opentensor/sam-add-freeze-layout-devnet
[devnet companion] prevent accidental changes to storage structs
2 parents 1a0d09f + 68ab335 commit 6000266

File tree

40 files changed

+564
-111
lines changed

40 files changed

+564
-111
lines changed

.cargo-husky/hooks/prepare-commit-msg

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/check-rust.yml

Lines changed: 5 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
strategy:
7272
matrix:
7373
rust-branch:
74-
- nightly-2024-03-05
74+
- stable
7575
rust-target:
7676
- x86_64-unknown-linux-gnu
7777
# - x86_64-apple-darwin
@@ -119,55 +119,7 @@ jobs:
119119
strategy:
120120
matrix:
121121
rust-branch:
122-
- nightly-2024-03-05
123-
rust-target:
124-
- x86_64-unknown-linux-gnu
125-
# - x86_64-apple-darwin
126-
os:
127-
- ubuntu-latest
128-
# - macos-latest
129-
include:
130-
- os: ubuntu-latest
131-
# - os: macos-latest
132-
env:
133-
RELEASE_NAME: development
134-
# RUSTFLAGS: -A warnings
135-
RUSTV: ${{ matrix.rust-branch }}
136-
RUST_BACKTRACE: full
137-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
138-
SKIP_WASM_BUILD: 1
139-
TARGET: ${{ matrix.rust-target }}
140-
steps:
141-
- name: Check-out repository under $GITHUB_WORKSPACE
142-
uses: actions/checkout@v2
143-
144-
- name: Install dependencies
145-
run: |
146-
sudo apt-get update &&
147-
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
148-
149-
- name: Install Rust ${{ matrix.rust-branch }}
150-
uses: actions-rs/[email protected]
151-
with:
152-
toolchain: ${{ matrix.rust-branch }}
153-
components: rustfmt, clippy
154-
profile: minimal
155-
156-
- name: Utilize Shared Rust Cache
157-
uses: Swatinem/[email protected]
158-
with:
159-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
160-
161-
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
162-
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
163-
164-
cargo-clippy-all-features:
165-
name: cargo clippy --all-features
166-
runs-on: SubtensorCI
167-
strategy:
168-
matrix:
169-
rust-branch:
170-
- nightly-2024-03-05
122+
- stable
171123
rust-target:
172124
- x86_64-unknown-linux-gnu
173125
# - x86_64-apple-darwin
@@ -208,15 +160,14 @@ jobs:
208160

209161
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
210162
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
211-
212163
# runs cargo test --workspace
213164
cargo-test:
214165
name: cargo test
215166
runs-on: SubtensorCI
216167
strategy:
217168
matrix:
218169
rust-branch:
219-
- nightly-2024-03-05
170+
- stable
220171
rust-target:
221172
- x86_64-unknown-linux-gnu
222173
# - x86_64-apple-darwin
@@ -265,7 +216,7 @@ jobs:
265216
strategy:
266217
matrix:
267218
rust-branch:
268-
- nightly-2024-03-05
219+
- stable
269220
rust-target:
270221
- x86_64-unknown-linux-gnu
271222
# - x86_64-apple-darwin
@@ -314,7 +265,7 @@ jobs:
314265
strategy:
315266
matrix:
316267
rust-branch:
317-
- nightly-2024-03-05
268+
- stable
318269
rust-target:
319270
- x86_64-unknown-linux-gnu
320271
# - x86_64-apple-darwin

.github/workflows/devnet-labels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Tested on Devnet
22
on:
33
pull_request:
44
types: [opened, labeled, unlabeled, synchronize]
5+
branches: [main]
56
jobs:
67
check-labels:
78
runs-on: ubuntu-latest

.github/workflows/testnet-labels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Tested on Testnet
22
on:
33
pull_request:
44
types: [opened, labeled, unlabeled, synchronize]
5+
branches: [main]
56
jobs:
67
check-labels:
78
runs-on: ubuntu-latest

CITATION.cft

Whitespace-only changes.

Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ members = [
44
"pallets/commitments",
55
"pallets/subtensor",
66
"runtime",
7+
"support/macros",
78
]
89
resolver = "2"
910

@@ -36,6 +37,8 @@ serde_with = { version = "=2.0.0", default-features = false }
3637
smallvec = "1.13.2"
3738
litep2p = { git = "https://github.com/paritytech/litep2p", branch = "master" }
3839

40+
subtensor-macros = { path = "support/macros" }
41+
3942
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.10.0", default-features = false }
4043
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.10.0" }
4144
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.10.0", default-features = false }

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ COPY ./raw_testspec.json /subtensor/raw_testspec.json
4545
COPY ./node /subtensor/node
4646
COPY ./pallets /subtensor/pallets
4747
COPY ./runtime /subtensor/runtime
48+
COPY ./support /subtensor/support
4849

49-
# Update to nightly toolchain
50+
# Copy our toolchain
5051
COPY rust-toolchain.toml /subtensor/
5152
RUN /subtensor/scripts/init.sh
5253

node/src/rpc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub struct FullDeps<C, P, B> {
4242
/// Grandpa block import setup.
4343
pub grandpa: GrandpaDeps<B>,
4444
/// Backend used by the node.
45-
pub backend: Arc<B>,
45+
pub _backend: Arc<B>,
4646
}
4747

4848
/// Instantiate all full RPC extensions.
@@ -74,7 +74,7 @@ where
7474
pool,
7575
deny_unsafe,
7676
grandpa,
77-
backend: _,
77+
_backend: _,
7878
} = deps;
7979

8080
// Custom RPC methods for Paratensor

node/src/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
266266
subscription_executor: subscription_executor.clone(),
267267
finality_provider: finality_proof_provider.clone(),
268268
},
269-
backend: rpc_backend.clone(),
269+
_backend: rpc_backend.clone(),
270270
};
271271
crate::rpc::create_full(deps).map_err(Into::into)
272272
},

0 commit comments

Comments
 (0)