Skip to content

Commit 42f7dfa

Browse files
authored
Merge pull request #678 from opentensor/devnet-ready
Devnet ready To Devnet
2 parents 50fa9ad + a452e87 commit 42f7dfa

File tree

13 files changed

+1192
-656
lines changed

13 files changed

+1192
-656
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 70 additions & 69 deletions
Large diffs are not rendered by default.

justfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,8 @@ lint:
4747
@echo "Running cargo clippy with automatic fixes on potentially dirty code..."
4848
just clippy-fix
4949
@echo "Running cargo clippy..."
50-
just clippy
50+
just clippy
51+
52+
production:
53+
@echo "Running cargo build with metadata-hash generation..."
54+
cargo +{{RUSTV}} build --profile production --features="runtime-benchmarks metadata-hash"

node/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ sp-io = { workspace = true }
5454
sp-timestamp = { workspace = true }
5555
sp-inherents = { workspace = true }
5656
sp-keyring = { workspace = true }
57+
frame-metadata-hash-extension = { workspace = true }
5758
frame-system = { workspace = true }
5859
pallet-transaction-payment = { workspace = true }
5960
pallet-commitments = { path = "../pallets/commitments" }

node/src/benchmarking.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ pub fn create_benchmark_extrinsic(
136136
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
137137
pallet_subtensor::SubtensorSignedExtension::<runtime::Runtime>::new(),
138138
pallet_commitments::CommitmentsSignedExtension::<runtime::Runtime>::new(),
139+
frame_metadata_hash_extension::CheckMetadataHash::<runtime::Runtime>::new(true),
139140
);
140141

141142
let raw_payload = runtime::SignedPayload::from_raw(
@@ -152,6 +153,7 @@ pub fn create_benchmark_extrinsic(
152153
(),
153154
(),
154155
(),
156+
None,
155157
),
156158
);
157159
let signature = raw_payload.using_encoded(|e| sender.sign(e));

pallets/subtensor/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ mod registration;
4444
mod root;
4545
mod serving;
4646
mod staking;
47-
mod swap;
47+
mod swap_coldkey;
4848
mod swap_hotkey;
4949
mod uids;
5050
mod utils;
@@ -726,7 +726,7 @@ pub mod pallet {
726726
#[pallet::storage] // --- MAP ( netuid ) --> last_mechanism_step_block
727727
pub type LastMechansimStepBlock<T> =
728728
StorageMap<_, Identity, u16, u64, ValueQuery, DefaultLastMechanismStepBlock<T>>;
729-
#[pallet::storage] // --- MAP ( netuid ) --> subnet_owner
729+
#[pallet::storage] // --- MAP ( netuid ) --> (cold) subnet_owner
730730
pub type SubnetOwner<T: Config> =
731731
StorageMap<_, Identity, u16, T::AccountId, ValueQuery, DefaultSubnetOwner<T>>;
732732
#[pallet::storage] // --- MAP ( netuid ) --> subnet_locked
@@ -801,10 +801,10 @@ pub mod pallet {
801801
#[pallet::storage] // --- ITEM ( tx_rate_limit )
802802
pub type TxDelegateTakeRateLimit<T> =
803803
StorageValue<_, u64, ValueQuery, DefaultTxDelegateTakeRateLimit<T>>;
804-
#[pallet::storage] // --- MAP ( key ) --> last_block
804+
#[pallet::storage] // --- MAP ( hotkey ) --> last_block
805805
pub type LastTxBlock<T: Config> =
806806
StorageMap<_, Identity, T::AccountId, u64, ValueQuery, DefaultLastTxBlock<T>>;
807-
#[pallet::storage] // --- MAP ( key ) --> last_block
807+
#[pallet::storage] // --- MAP ( hotkey ) --> last_block
808808
pub type LastTxBlockDelegateTake<T: Config> =
809809
StorageMap<_, Identity, T::AccountId, u64, ValueQuery, DefaultLastTxBlock<T>>;
810810

0 commit comments

Comments
 (0)