diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8ac80636..6d665019 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,10 +1,10 @@
-# Subtensor Contributor Guide
+# Jungochain Contributor Guide
## Lifecycle of a Pull Request
-1. Individuals wishing to contribute to subtensor should develop their change/feature/fix in a
- [Pull Request](https://github.com/opentensor/subtensor/compare) (PR) targeting the `devnet-ready`
- branch of the subtensor GitHub repository. It is recommended to start your pull request as a
+1. Individuals wishing to contribute to jungochain should develop their change/feature/fix in a
+ [Pull Request](https://github.com/opentensor/jungochain/compare) (PR) targeting the `devnet-ready`
+ branch of the jungochain GitHub repository. It is recommended to start your pull request as a
draft initially until you are ready to have other developers actively look at it. Any
changes to pallet/runtime code should be accompanied by integration and/or unit tests fully
testing all the edge cases of this functionality, if applicable.
diff --git a/Cargo.lock b/Cargo.lock
index 4814175e..e42cb5f9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3950,6 +3950,192 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "jungochain"
+version = "0.1.0"
+dependencies = [
+ "jungochain-node",
+ "jungochain-runtime",
+ "proc-macro2",
+ "quote",
+ "rayon",
+ "subtensor-linting",
+ "syn 2.0.79",
+ "walkdir",
+]
+
+[[package]]
+name = "jungochain-custom-rpc"
+version = "0.1.0"
+dependencies = [
+ "jsonrpsee",
+ "jungochain-custom-rpc-runtime-api",
+ "pallet-jungochain",
+ "parity-scale-codec",
+ "serde",
+ "sp-api",
+ "sp-blockchain",
+ "sp-rpc",
+ "sp-runtime",
+]
+
+[[package]]
+name = "jungochain-custom-rpc-runtime-api"
+version = "0.0.2"
+dependencies = [
+ "frame-support",
+ "pallet-jungochain",
+ "serde",
+ "sp-api",
+]
+
+[[package]]
+name = "jungochain-node"
+version = "0.1.0-dev"
+dependencies = [
+ "async-trait",
+ "clap",
+ "fc-api",
+ "fc-consensus",
+ "fc-db",
+ "fc-mapping-sync",
+ "fc-rpc",
+ "fc-rpc-core",
+ "fc-storage",
+ "fp-dynamic-fee",
+ "fp-rpc",
+ "frame-benchmarking",
+ "frame-benchmarking-cli",
+ "frame-metadata-hash-extension",
+ "frame-system",
+ "frame-system-rpc-runtime-api",
+ "futures",
+ "jsonrpsee",
+ "jungochain-custom-rpc",
+ "jungochain-custom-rpc-runtime-api",
+ "jungochain-runtime",
+ "memmap2 0.9.5",
+ "pallet-commitments",
+ "pallet-transaction-payment",
+ "pallet-transaction-payment-rpc",
+ "pallet-transaction-payment-rpc-runtime-api",
+ "parity-scale-codec",
+ "sc-basic-authorship",
+ "sc-chain-spec",
+ "sc-chain-spec-derive",
+ "sc-cli",
+ "sc-client-api",
+ "sc-consensus",
+ "sc-consensus-aura",
+ "sc-consensus-grandpa",
+ "sc-consensus-grandpa-rpc",
+ "sc-consensus-manual-seal",
+ "sc-consensus-slots",
+ "sc-executor",
+ "sc-keystore",
+ "sc-network",
+ "sc-network-sync",
+ "sc-offchain",
+ "sc-rpc",
+ "sc-rpc-api",
+ "sc-service",
+ "sc-telemetry",
+ "sc-transaction-pool",
+ "sc-transaction-pool-api",
+ "serde",
+ "serde_json",
+ "sp-api",
+ "sp-block-builder",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-consensus-aura",
+ "sp-consensus-grandpa",
+ "sp-core",
+ "sp-inherents",
+ "sp-io",
+ "sp-keyring",
+ "sp-offchain",
+ "sp-runtime",
+ "sp-session",
+ "sp-timestamp",
+ "sp-transaction-pool",
+ "substrate-build-script-utils",
+ "substrate-frame-rpc-system",
+ "substrate-prometheus-endpoint",
+]
+
+[[package]]
+name = "jungochain-runtime"
+version = "0.1.0-dev"
+dependencies = [
+ "ed25519-dalek",
+ "fp-account",
+ "fp-evm",
+ "fp-rpc",
+ "fp-self-contained",
+ "frame-benchmarking",
+ "frame-executive",
+ "frame-metadata",
+ "frame-metadata-hash-extension",
+ "frame-support",
+ "frame-system",
+ "frame-system-benchmarking",
+ "frame-system-rpc-runtime-api",
+ "frame-try-runtime",
+ "jungochain-custom-rpc-runtime-api",
+ "log",
+ "pallet-admin-utils",
+ "pallet-aura",
+ "pallet-balances",
+ "pallet-base-fee",
+ "pallet-collective",
+ "pallet-commitments",
+ "pallet-dynamic-fee",
+ "pallet-ethereum",
+ "pallet-evm",
+ "pallet-evm-chain-id",
+ "pallet-evm-precompile-modexp",
+ "pallet-evm-precompile-sha3fips",
+ "pallet-evm-precompile-simple",
+ "pallet-grandpa",
+ "pallet-hotfix-sufficients",
+ "pallet-insecure-randomness-collective-flip",
+ "pallet-jungochain",
+ "pallet-membership",
+ "pallet-multisig",
+ "pallet-preimage",
+ "pallet-proxy",
+ "pallet-registry",
+ "pallet-safe-mode",
+ "pallet-scheduler",
+ "pallet-sudo",
+ "pallet-timestamp",
+ "pallet-transaction-payment",
+ "pallet-transaction-payment-rpc-runtime-api",
+ "pallet-utility",
+ "parity-scale-codec",
+ "scale-info",
+ "serde_json",
+ "smallvec",
+ "sp-api",
+ "sp-block-builder",
+ "sp-consensus-aura",
+ "sp-core",
+ "sp-genesis-builder",
+ "sp-inherents",
+ "sp-io",
+ "sp-offchain",
+ "sp-runtime",
+ "sp-session",
+ "sp-std",
+ "sp-storage",
+ "sp-tracing",
+ "sp-transaction-pool",
+ "sp-version",
+ "substrate-wasm-builder",
+ "subtensor-macros",
+]
+
[[package]]
name = "k256"
version = "0.13.4"
@@ -5309,153 +5495,6 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c"
-[[package]]
-name = "node-subtensor"
-version = "4.0.0-dev"
-dependencies = [
- "async-trait",
- "clap",
- "fc-api",
- "fc-consensus",
- "fc-db",
- "fc-mapping-sync",
- "fc-rpc",
- "fc-rpc-core",
- "fc-storage",
- "fp-dynamic-fee",
- "fp-rpc",
- "frame-benchmarking",
- "frame-benchmarking-cli",
- "frame-metadata-hash-extension",
- "frame-system",
- "frame-system-rpc-runtime-api",
- "futures",
- "jsonrpsee",
- "memmap2 0.9.5",
- "node-subtensor-runtime",
- "pallet-commitments",
- "pallet-transaction-payment",
- "pallet-transaction-payment-rpc",
- "pallet-transaction-payment-rpc-runtime-api",
- "parity-scale-codec",
- "sc-basic-authorship",
- "sc-chain-spec",
- "sc-chain-spec-derive",
- "sc-cli",
- "sc-client-api",
- "sc-consensus",
- "sc-consensus-aura",
- "sc-consensus-grandpa",
- "sc-consensus-grandpa-rpc",
- "sc-consensus-manual-seal",
- "sc-consensus-slots",
- "sc-executor",
- "sc-keystore",
- "sc-network",
- "sc-network-sync",
- "sc-offchain",
- "sc-rpc",
- "sc-rpc-api",
- "sc-service",
- "sc-telemetry",
- "sc-transaction-pool",
- "sc-transaction-pool-api",
- "serde",
- "serde_json",
- "sp-api",
- "sp-block-builder",
- "sp-blockchain",
- "sp-consensus",
- "sp-consensus-aura",
- "sp-consensus-grandpa",
- "sp-core",
- "sp-inherents",
- "sp-io",
- "sp-keyring",
- "sp-offchain",
- "sp-runtime",
- "sp-session",
- "sp-timestamp",
- "sp-transaction-pool",
- "substrate-build-script-utils",
- "substrate-frame-rpc-system",
- "substrate-prometheus-endpoint",
- "subtensor-custom-rpc",
- "subtensor-custom-rpc-runtime-api",
-]
-
-[[package]]
-name = "node-subtensor-runtime"
-version = "4.0.0-dev"
-dependencies = [
- "ed25519-dalek",
- "fp-account",
- "fp-evm",
- "fp-rpc",
- "fp-self-contained",
- "frame-benchmarking",
- "frame-executive",
- "frame-metadata",
- "frame-metadata-hash-extension",
- "frame-support",
- "frame-system",
- "frame-system-benchmarking",
- "frame-system-rpc-runtime-api",
- "frame-try-runtime",
- "log",
- "pallet-admin-utils",
- "pallet-aura",
- "pallet-balances",
- "pallet-base-fee",
- "pallet-collective",
- "pallet-commitments",
- "pallet-dynamic-fee",
- "pallet-ethereum",
- "pallet-evm",
- "pallet-evm-chain-id",
- "pallet-evm-precompile-modexp",
- "pallet-evm-precompile-sha3fips",
- "pallet-evm-precompile-simple",
- "pallet-grandpa",
- "pallet-hotfix-sufficients",
- "pallet-insecure-randomness-collective-flip",
- "pallet-membership",
- "pallet-multisig",
- "pallet-preimage",
- "pallet-proxy",
- "pallet-registry",
- "pallet-safe-mode",
- "pallet-scheduler",
- "pallet-subtensor",
- "pallet-sudo",
- "pallet-timestamp",
- "pallet-transaction-payment",
- "pallet-transaction-payment-rpc-runtime-api",
- "pallet-utility",
- "parity-scale-codec",
- "scale-info",
- "serde_json",
- "smallvec",
- "sp-api",
- "sp-block-builder",
- "sp-consensus-aura",
- "sp-core",
- "sp-genesis-builder",
- "sp-inherents",
- "sp-io",
- "sp-offchain",
- "sp-runtime",
- "sp-session",
- "sp-std",
- "sp-storage",
- "sp-tracing",
- "sp-transaction-pool",
- "sp-version",
- "substrate-wasm-builder",
- "subtensor-custom-rpc-runtime-api",
- "subtensor-macros",
-]
-
[[package]]
name = "nohash-hasher"
version = "0.2.0"
@@ -5758,15 +5797,15 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "pallet-admin-utils"
-version = "4.0.0-dev"
+version = "0.1.0-dev"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"log",
"pallet-balances",
+ "pallet-jungochain",
"pallet-scheduler",
- "pallet-subtensor",
"parity-scale-codec",
"scale-info",
"sp-consensus-aura",
@@ -6022,6 +6061,44 @@ dependencies = [
"sp-runtime",
]
+[[package]]
+name = "pallet-jungochain"
+version = "0.1.0-dev"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "hex",
+ "hex-literal",
+ "log",
+ "ndarray",
+ "num-traits",
+ "pallet-balances",
+ "pallet-collective",
+ "pallet-membership",
+ "pallet-preimage",
+ "pallet-scheduler",
+ "pallet-transaction-payment",
+ "pallet-utility",
+ "parity-scale-codec",
+ "parity-util-mem",
+ "rand",
+ "scale-info",
+ "serde",
+ "serde-tuple-vec-map",
+ "serde_bytes",
+ "serde_json",
+ "serde_with",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+ "sp-tracing",
+ "sp-version",
+ "substrate-fixed",
+ "subtensor-macros",
+]
+
[[package]]
name = "pallet-membership"
version = "38.0.0"
@@ -6156,44 +6233,6 @@ dependencies = [
"sp-trie",
]
-[[package]]
-name = "pallet-subtensor"
-version = "4.0.0-dev"
-dependencies = [
- "frame-benchmarking",
- "frame-support",
- "frame-system",
- "hex",
- "hex-literal",
- "log",
- "ndarray",
- "num-traits",
- "pallet-balances",
- "pallet-collective",
- "pallet-membership",
- "pallet-preimage",
- "pallet-scheduler",
- "pallet-transaction-payment",
- "pallet-utility",
- "parity-scale-codec",
- "parity-util-mem",
- "rand",
- "scale-info",
- "serde",
- "serde-tuple-vec-map",
- "serde_bytes",
- "serde_json",
- "serde_with",
- "sp-core",
- "sp-io",
- "sp-runtime",
- "sp-std",
- "sp-tracing",
- "sp-version",
- "substrate-fixed",
- "subtensor-macros",
-]
-
[[package]]
name = "pallet-sudo"
version = "38.0.0"
@@ -10440,45 +10479,6 @@ dependencies = [
"wasm-opt",
]
-[[package]]
-name = "subtensor"
-version = "0.1.0"
-dependencies = [
- "node-subtensor",
- "node-subtensor-runtime",
- "proc-macro2",
- "quote",
- "rayon",
- "subtensor-linting",
- "syn 2.0.79",
- "walkdir",
-]
-
-[[package]]
-name = "subtensor-custom-rpc"
-version = "0.0.2"
-dependencies = [
- "jsonrpsee",
- "pallet-subtensor",
- "parity-scale-codec",
- "serde",
- "sp-api",
- "sp-blockchain",
- "sp-rpc",
- "sp-runtime",
- "subtensor-custom-rpc-runtime-api",
-]
-
-[[package]]
-name = "subtensor-custom-rpc-runtime-api"
-version = "0.0.2"
-dependencies = [
- "frame-support",
- "pallet-subtensor",
- "serde",
- "sp-api",
-]
-
[[package]]
name = "subtensor-linting"
version = "0.1.0"
diff --git a/Cargo.toml b/Cargo.toml
index 8f3e35e0..d62b755b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,31 +1,31 @@
[package]
-name = "subtensor"
-version = "0.1.0"
-description = "Implementation of the bittensor blockchain"
-authors = ["Substrate DevHub "]
-homepage = "https://substrate.io/"
-edition = "2021"
-license = "Unlicense"
-publish = false
-repository = "https://github.com/opentensor/subtensor"
+name = "jungochain"
+version = "0.1.0"
+description = "Implementation of the jungoai blockchain"
+authors = ["Substrate DevHub "] # TODO
+homepage = "https://jungoai.xyz/"
+edition = "2021"
+license = "Unlicense"
+publish = false
+repository = "https://github.com/" # TODO
[dependencies]
-node-subtensor = { path = "node", version = "4.0.0-dev" }
-node-subtensor-runtime = { path = "runtime", version = "4.0.0-dev" }
+jungochain-node = { path = "node", version = "0.1.0-dev" }
+jungochain-runtime = { path = "runtime", version = "0.1.0-dev" }
[build-dependencies]
-subtensor-linting = { path = "support/linting", version = "0.1.0" }
-syn.workspace = true
-quote.workspace = true
-proc-macro2.workspace = true
-walkdir.workspace = true
+subtensor-linting = { path = "support/linting", version = "0.1.0" }
+syn.workspace = true
+quote.workspace = true
+proc-macro2.workspace = true
+walkdir.workspace = true
rayon = "1.10"
[workspace]
members = [
"node",
"pallets/commitments",
- "pallets/subtensor",
+ "pallets/jungochain",
"pallets/admin-utils",
"pallets/collective",
"pallets/registry",
@@ -39,11 +39,11 @@ exclude = ["support/procedural-fork"]
resolver = "2"
[workspace.lints.clippy]
-indexing-slicing = "deny"
+indexing-slicing = "deny"
arithmetic-side-effects = "deny"
-type_complexity = "allow"
-unwrap-used = "deny"
-manual_inspect = "allow"
+type_complexity = "allow"
+unwrap-used = "deny"
+manual_inspect = "allow"
[workspace.dependencies]
async-trait = "0.1"
@@ -206,11 +206,11 @@ codegen-units = 1
[features]
default = []
try-runtime = [
- "node-subtensor/try-runtime",
- "node-subtensor-runtime/try-runtime",
+ "jungochain-node/try-runtime",
+ "jungochain-runtime/try-runtime",
]
runtime-benchmarks = [
- "node-subtensor/runtime-benchmarks",
- "node-subtensor-runtime/runtime-benchmarks",
+ "jungochain-node/runtime-benchmarks",
+ "jungochain-runtime/runtime-benchmarks",
]
-metadata-hash = ["node-subtensor-runtime/metadata-hash"]
+metadata-hash = ["jungochain-runtime/metadata-hash"]
diff --git a/docs/consensus.md b/docs/consensus.md
index 881b465b..662daa5d 100644
--- a/docs/consensus.md
+++ b/docs/consensus.md
@@ -67,12 +67,12 @@ $$B_{ij}^{(t)} = \alpha\cdot\Delta B_{ij} + (1-\alpha)\cdot B_{ij}^{(t-1)}\tag{6
#### Reward distribution
-Emission ratio $\xi$ decides the ratio of emission for validation rewards, and $1-\xi$ the ratio for server incentive, typically $\xi=0.5$.
+Emission ratio $\xi$ decides the ratio of emission for validation rewards, and $1-\xi$ the ratio for server incentive, typically $\xi=0.5$.
$$E_i = \xi \cdot D_i + (1-\xi) \cdot I_i\tag{7}$$
Subnet server incentive $I_j = R_j / \sum_k R_k$ is normalized server rank $R_j = \sum_i S_i \cdot \overline{W_{ij}}$ (sum of consensus-clipped weighted stake).
-Validation reward $D_i = \sum_j B_{ij} \cdot I_j$ is the subnet validator's EMA bond with server $j$ multiplied with server $j$ incentive.
+Validation reward $D_i = \sum_j B_{ij} \cdot I_j$ is the subnet validator's EMA bond with server $j$ multiplied with server $j$ incentive.
#### Mathematical definitions
@@ -96,8 +96,8 @@ Validation reward $D_i = \sum_j B_{ij} \cdot I_j$ is the subnet validator's EMA
| Emission | $E_i = \xi \cdot D_i + (1-\xi) \cdot I_i$ | Emission for node $i$. |
-#### Subtensor epoch
-Subtensor blockchain nodes calculate consensus and rewards during each subnet [`epoch`](../pallets/subtensor/src/epoch.rs) with associated code excerpts as follows.
+#### Jungochain epoch
+Jungochain blockchain nodes calculate consensus and rewards during each subnet [`epoch`](../pallets/jungochain/src/epoch.rs) with associated code excerpts as follows.
```rust
let mut weights: Vec> = Self::get_weights( netuid ); // Weight
let preranks: Vec = matmul( &weights, &active_stake ); // Server prerank
@@ -136,9 +136,9 @@ Similarly, the specific emission contour plot for $S_H=0.7$, highlights the cont
A compound plot then combines all the highlighted $S_H=E_H$ contours from individual contour plots (e.g. $S_H=0.6$ and $S_H=0.7$), to show the overall retention profile. Generally, the higher the honest stake, the higher the honest utility requirement to retain stake proportion under adversarial weight setting.
Retention graphs like these comprehensively capture consensus guarantees across all primary conditions, and we utilize these to analyze the effect of consensus hyperparameters.
-Subtensor integration tests run Monte Carlo simulations of large realistic networks under adversarial conditions, and constructs retention profiles to confirm consensus guarantees of the actual blockchain implementation.
+Jungochain integration tests run Monte Carlo simulations of large realistic networks under adversarial conditions, and constructs retention profiles to confirm consensus guarantees of the actual blockchain implementation.
-Retention profiles are reproducible by running [`_map_consensus_guarantees`](../pallets/subtensor/tests/epoch.rs) (decorate with `#[test]`).
+Retention profiles are reproducible by running [`_map_consensus_guarantees`](../pallets/jungochain/tests/epoch.rs) (decorate with `#[test]`).
```bash
RUST_BACKTRACE=1 SKIP_WASM_BUILD=1 cargo test -- _map_consensus_guarantees --exact --nocapture > consensus.txt
```
@@ -197,4 +197,4 @@ We expect that more emission going to validators will improve security guarantee
We set validation reward ratio at $\xi=0$, $0.25$, and $0.5$ and respectively observe 82%, 78%, 73% honest utility requirement for 60% honest stake preservation.
-This means that network security improves as the validation reward ratio is increased, although a significant server incentive ratio still needs to be maintained to ensure overall high utility.
\ No newline at end of file
+This means that network security improves as the validation reward ratio is increased, although a significant server incentive ratio still needs to be maintained to ensure overall high utility.
diff --git a/node/Cargo.toml b/node/Cargo.toml
index 679de639..a35d857d 100644
--- a/node/Cargo.toml
+++ b/node/Cargo.toml
@@ -1,13 +1,13 @@
[package]
-name = "node-subtensor"
-version = "4.0.0-dev"
-description = "A fresh FRAME-based Substrate node, ready for hacking."
-authors = ["Substrate DevHub "]
-homepage = "https://substrate.io/"
+name = "jungochain-node"
+version = "0.1.0-dev"
+description = "Jungochain node"
+authors = [""] # TODO
+homepage = "https://jungoai.xyz/"
edition = "2021"
license = "Unlicense"
publish = false
-repository = "https://github.com/opentensor/subtensor"
+repository = "https://github.com/jungoai/jungochain"
build = "build.rs"
[lints]
@@ -17,7 +17,7 @@ workspace = true
targets = ["x86_64-unknown-linux-gnu"]
[[bin]]
-name = "node-subtensor"
+name = "jungochain-node"
[dependencies]
async-trait = { workspace = true }
@@ -64,7 +64,7 @@ frame-system = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-commitments = { path = "../pallets/commitments" }
-# These dependencies are used for the subtensor's RPCs
+# These dependencies are used for the jungochain's RPCs
jsonrpsee = { workspace = true, features = ["server"] }
sc-rpc = { workspace = true }
sp-api = { workspace = true }
@@ -98,16 +98,16 @@ fp-rpc = { workspace = true }
fc-mapping-sync = { workspace = true }
# Local Dependencies
-node-subtensor-runtime = { path = "../runtime" }
-subtensor-custom-rpc = { path = "../pallets/subtensor/rpc" }
-subtensor-custom-rpc-runtime-api = { path = "../pallets/subtensor/runtime-api" }
+jungochain-runtime = { path = "../runtime" }
+jungochain-custom-rpc = { path = "../pallets/jungochain/rpc" }
+jungochain-custom-rpc-runtime-api = { path = "../pallets/jungochain/runtime-api" }
[build-dependencies]
substrate-build-script-utils = { workspace = true }
[features]
default = ["rocksdb", "sql", "txpool"]
-fast-blocks = ["node-subtensor-runtime/fast-blocks"]
+fast-blocks = ["jungochain-runtime/fast-blocks"]
sql = ["fc-db/sql", "fc-mapping-sync/sql"]
rocksdb = [
"sc-service/rocksdb",
@@ -119,7 +119,7 @@ txpool = ["fc-rpc/txpool", "fc-rpc-core/txpool"]
# Dependencies that are only required if runtime benchmarking should be build.
runtime-benchmarks = [
- "node-subtensor-runtime/runtime-benchmarks",
+ "jungochain-runtime/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-system/runtime-benchmarks",
@@ -128,17 +128,17 @@ runtime-benchmarks = [
"pallet-commitments/runtime-benchmarks",
]
pow-faucet = [
- "node-subtensor-runtime/pow-faucet"
+ "jungochain-runtime/pow-faucet"
]
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
# in the near future.
try-runtime = [
- "node-subtensor-runtime/try-runtime",
+ "jungochain-runtime/try-runtime",
"frame-system/try-runtime",
"pallet-transaction-payment/try-runtime",
"sp-runtime/try-runtime",
"pallet-commitments/try-runtime",
]
-metadata-hash = ["node-subtensor-runtime/metadata-hash"]
+metadata-hash = ["jungochain-runtime/metadata-hash"]
diff --git a/node/src/benchmarking.rs b/node/src/benchmarking.rs
index cee1cb4a..7423cc7c 100644
--- a/node/src/benchmarking.rs
+++ b/node/src/benchmarking.rs
@@ -4,9 +4,9 @@
use crate::client::FullClient;
-use node_subtensor_runtime as runtime;
-use node_subtensor_runtime::check_nonce;
-use node_subtensor_runtime::pallet_subtensor;
+use jungochain_runtime as runtime;
+use jungochain_runtime::check_nonce;
+use jungochain_runtime::pallet_jungochain;
use runtime::{AccountId, Balance, BalancesCall, SystemCall};
use sc_cli::Result;
use sc_client_api::BlockBackend;
@@ -134,7 +134,7 @@ pub fn create_benchmark_extrinsic(
check_nonce::CheckNonce::::from(nonce),
frame_system::CheckWeight::::new(),
pallet_transaction_payment::ChargeTransactionPayment::::from(0),
- pallet_subtensor::SubtensorSignedExtension::::new(),
+ pallet_jungochain::JungochainSignedExtension::::new(),
pallet_commitments::CommitmentsSignedExtension::::new(),
frame_metadata_hash_extension::CheckMetadataHash::::new(true),
);
diff --git a/node/src/chain_spec/finney.rs b/node/src/chain_spec/finney.rs
index 640d52f2..819e2d3f 100644
--- a/node/src/chain_spec/finney.rs
+++ b/node/src/chain_spec/finney.rs
@@ -199,7 +199,7 @@ fn finney_genesis(
.collect::>(),
},
"sudo": { "key": Some(::from_ss58check("5FCM3DBXWiGcwYYQtT8z4ZD93TqYpYxjaAfgv6aMStV1FTCT").unwrap()) },
- "subtensorModule": {
+ "jungochainModule": {
"stakes": stakes,
"balancesIssuance": balances_issuance,
}
diff --git a/node/src/chain_spec/mod.rs b/node/src/chain_spec/mod.rs
index a64fbb70..0ff9ff88 100644
--- a/node/src/chain_spec/mod.rs
+++ b/node/src/chain_spec/mod.rs
@@ -6,7 +6,7 @@ pub mod finney;
pub mod localnet;
pub mod testnet;
-use node_subtensor_runtime::{AccountId, Block, Signature, WASM_BINARY};
+use jungochain_runtime::{AccountId, Block, Signature, WASM_BINARY};
use sc_chain_spec_derive::ChainSpecExtension;
use sc_service::ChainType;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
diff --git a/node/src/client.rs b/node/src/client.rs
index dd7dfda4..7587649c 100644
--- a/node/src/client.rs
+++ b/node/src/client.rs
@@ -1,4 +1,4 @@
-use node_subtensor_runtime::{opaque::Block, RuntimeApi};
+use jungochain_runtime::{opaque::Block, RuntimeApi};
use sc_executor::WasmExecutor;
/// Full backend.
diff --git a/node/src/command.rs b/node/src/command.rs
index 7b6d6982..d2504ce8 100644
--- a/node/src/command.rs
+++ b/node/src/command.rs
@@ -7,7 +7,7 @@ use crate::{
use fc_db::{kv::frontier_database_dir, DatabaseSource};
use futures::TryFutureExt;
-use node_subtensor_runtime::Block;
+use jungochain_runtime::Block;
use sc_cli::SubstrateCli;
use sc_service::{
config::{ExecutorConfiguration, RpcConfiguration},
@@ -16,7 +16,7 @@ use sc_service::{
impl SubstrateCli for Cli {
fn impl_name() -> String {
- "Subtensor Node".into()
+ "Jungochain Node".into()
}
fn impl_version() -> String {
@@ -162,7 +162,7 @@ pub fn run() -> sc_cli::Result<()> {
use frame_benchmarking_cli::{
BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE,
};
- use node_subtensor_runtime::EXISTENTIAL_DEPOSIT;
+ use jungochain_runtime::EXISTENTIAL_DEPOSIT;
use sc_service::PartialComponents;
use sp_keyring::Sr25519Keyring;
use sp_runtime::traits::HashingFor;
diff --git a/node/src/ethereum.rs b/node/src/ethereum.rs
index 07363538..07bb51af 100644
--- a/node/src/ethereum.rs
+++ b/node/src/ethereum.rs
@@ -11,7 +11,7 @@ use fp_rpc::ConvertTransaction;
use futures::future;
use futures::StreamExt;
use jsonrpsee::RpcModule;
-use node_subtensor_runtime::opaque::Block;
+use jungochain_runtime::opaque::Block;
use sc_client_api::client::BlockchainEvents;
use sc_network_sync::SyncingService;
use sc_rpc::SubscriptionTaskExecutor;
diff --git a/node/src/rpc.rs b/node/src/rpc.rs
index 3b4729c7..a8089045 100644
--- a/node/src/rpc.rs
+++ b/node/src/rpc.rs
@@ -13,8 +13,8 @@ pub use fc_rpc::EthBlockDataCacheTask;
pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};
use fc_storage::StorageOverride;
use jsonrpsee::RpcModule;
-use node_subtensor_runtime::opaque::Block;
-use node_subtensor_runtime::Hash;
+use jungochain_runtime::opaque::Block;
+use jungochain_runtime::Hash;
use sc_consensus_manual_seal::EngineCommand;
use sc_network::service::traits::NetworkService;
use sc_network_sync::SyncingService;
@@ -111,10 +111,10 @@ where
CIDP: CreateInherentDataProviders + Send + Clone + 'static,
CT: fp_rpc::ConvertTransaction<::Extrinsic> + Send + Sync + Clone + 'static,
{
+ use jungochain_custom_rpc::{JungochainCustom, JungochainCustomApiServer};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use sc_consensus_manual_seal::rpc::{ManualSeal, ManualSealApiServer};
use substrate_frame_rpc_system::{System, SystemApiServer};
- use subtensor_custom_rpc::{SubtensorCustom, SubtensorCustomApiServer};
let mut module = RpcModule::new(());
let FullDeps {
@@ -125,7 +125,7 @@ where
} = deps;
// Custom RPC methods for Paratensor
- module.merge(SubtensorCustom::new(client.clone()).into_rpc())?;
+ module.merge(JungochainCustom::new(client.clone()).into_rpc())?;
module.merge(System::new(client.clone(), pool.clone()).into_rpc())?;
module.merge(TransactionPayment::new(client).into_rpc())?;
diff --git a/node/src/service.rs b/node/src/service.rs
index 22e16794..e6b69a49 100644
--- a/node/src/service.rs
+++ b/node/src/service.rs
@@ -1,7 +1,7 @@
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
use futures::{channel::mpsc, future, FutureExt};
-use node_subtensor_runtime::{opaque::Block, RuntimeApi, TransactionConverter};
+use jungochain_runtime::{opaque::Block, RuntimeApi, TransactionConverter};
use sc_client_api::{Backend as BackendT, BlockBackend};
use sc_consensus::{BasicQueue, BoxBlockImport};
use sc_consensus_grandpa::BlockNumberOps;
@@ -669,7 +669,7 @@ fn run_manual_seal_authorship(
) -> Result<(), sp_inherents::Error> {
TIMESTAMP.with(|x| {
let mut x_ref = x.borrow_mut();
- *x_ref = x_ref.saturating_add(node_subtensor_runtime::SLOT_DURATION);
+ *x_ref = x_ref.saturating_add(jungochain_runtime::SLOT_DURATION);
inherent_data.put_data(sp_timestamp::INHERENT_IDENTIFIER, &*x.borrow())
})
}
diff --git a/node/tests/chain_spec.rs b/node/tests/chain_spec.rs
index 42665c47..04678e4e 100644
--- a/node/tests/chain_spec.rs
+++ b/node/tests/chain_spec.rs
@@ -2,7 +2,7 @@ use sp_core::sr25519;
// use sp_consensus_aura::sr25519::AuthorityId as AuraId;
// use sp_consensus_grandpa::AuthorityId as GrandpaId;
-use node_subtensor::chain_spec::*;
+use jungochain_node::chain_spec::*;
#[test]
fn test_get_from_seed() {
diff --git a/pallets/admin-utils/Cargo.toml b/pallets/admin-utils/Cargo.toml
index c67c0091..c557d760 100644
--- a/pallets/admin-utils/Cargo.toml
+++ b/pallets/admin-utils/Cargo.toml
@@ -1,13 +1,13 @@
[package]
name = "pallet-admin-utils"
-version = "4.0.0-dev"
+version = "0.1.0-dev"
description = "FRAME pallet for extending admin utilities."
-authors = ["Bittensor Nucleus Team"]
-homepage = "https://bittensor.com"
+authors = [""] # TODO
+homepage = "https://jungoai.xyz"
edition = "2021"
license = "Unlicense"
publish = false
-repository = "https://github.com/opentensor/subtensor"
+repository = "https://github.com/jungoai/jungochain"
[lints]
workspace = true
@@ -26,7 +26,7 @@ frame-support = { workspace = true }
frame-system = { workspace = true }
sp-runtime = { workspace = true }
log = { workspace = true }
-pallet-subtensor = { version = "4.0.0-dev", default-features = false, path = "../subtensor" }
+pallet-jungochain = { version = "0.1.0-dev", default-features = false, path = "../jungochain" }
sp-weights = { workspace = true }
substrate-fixed = { workspace = true }
@@ -48,7 +48,7 @@ std = [
"frame-support/std",
"frame-system/std",
"scale-info/std",
- "pallet-subtensor/std",
+ "pallet-jungochain/std",
"sp-consensus-aura/std",
"pallet-balances/std",
"pallet-scheduler/std",
@@ -67,7 +67,7 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
- "pallet-subtensor/runtime-benchmarks",
+ "pallet-jungochain/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
]
try-runtime = [
@@ -76,5 +76,5 @@ try-runtime = [
"pallet-balances/try-runtime",
"pallet-scheduler/try-runtime",
"sp-runtime/try-runtime",
- "pallet-subtensor/try-runtime"
+ "pallet-jungochain/try-runtime"
]
diff --git a/pallets/admin-utils/scripts/benchmark.sh b/pallets/admin-utils/scripts/benchmark.sh
index 82d417ff..12b51185 100755
--- a/pallets/admin-utils/scripts/benchmark.sh
+++ b/pallets/admin-utils/scripts/benchmark.sh
@@ -1,5 +1,5 @@
cargo build --profile production --features runtime-benchmarks
-./target/production/node-subtensor benchmark pallet \
+./target/production/jungochain-node benchmark pallet \
--chain=local \
--pallet=pallet_admin_utils \
--extrinsic="*" \
diff --git a/pallets/admin-utils/src/benchmarking.rs b/pallets/admin-utils/src/benchmarking.rs
index 65ccf629..d4ef936e 100644
--- a/pallets/admin-utils/src/benchmarking.rs
+++ b/pallets/admin-utils/src/benchmarking.rs
@@ -47,7 +47,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_max_difficulty() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 10000u64/*max_difficulty*/)/*sudo_set_max_difficulty*/;
@@ -55,7 +55,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_min_difficulty() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 1000u64/*min_difficulty*/)/*sudo_set_min_difficulty*/;
@@ -63,7 +63,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_weights_set_rate_limit() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 3u64/*rate_limit*/)/*sudo_set_weights_set_rate_limit*/;
@@ -71,7 +71,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_weights_version_key() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 1u64/*version_key*/)/*sudo_set_weights_version_key*/;
@@ -79,7 +79,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_bonds_moving_average() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 100u64/*bonds_moving_average*/)/*sudo_set_bonds_moving_average*/;
@@ -87,7 +87,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_max_allowed_validators() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 10u16/*max_allowed_validators*/)/*sudo_set_max_allowed_validators*/;
@@ -95,7 +95,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_difficulty() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 1200000u64/*difficulty*/)/*sudo_set_difficulty*/;
@@ -103,7 +103,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_adjustment_interval() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 12u16/*adjustment_interval*/)/*sudo_set_adjustment_interval*/;
@@ -111,7 +111,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_target_registrations_per_interval() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 300u16/*target_registrations*/)/*sudo_set_target_registrations_per_interval*/;
@@ -119,7 +119,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_activity_cutoff() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 300u16/*activity_cutoff*/)/*sudo_set_activity_cutoff*/;
@@ -127,7 +127,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_rho() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 300u16/*rho*/)/*sudo_set_rho*/;
@@ -135,7 +135,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_kappa() {
- pallet_subtensor::Pallet::::init_new_network(
+ pallet_jungochain::Pallet::::init_new_network(
1u16, /*netuid*/
1u16, /*sudo_tempo*/
);
@@ -146,7 +146,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_max_allowed_uids() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 4097u16/*max_allowed_uids*/)/*sudo_set_max_allowed_uids*/;
@@ -154,7 +154,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_min_allowed_weights() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 10u16/*max_allowed_uids*/)/*sudo_set_min_allowed_weights*/;
@@ -162,7 +162,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_immunity_period() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 100u16/*immunity_period*/)/*sudo_set_immunity_period*/;
@@ -170,7 +170,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_max_weight_limit() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 100u16/*max_weight_limit*/)/*sudo_set_max_weight_limit*/;
@@ -178,7 +178,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_max_registrations_per_block() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 100u16/*max_registrations*/)/*sudo_set_max_registrations_per_block*/;
@@ -186,7 +186,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_max_burn() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 10u64/*max_burn*/)/*sudo_set_max_burn*/;
@@ -194,7 +194,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_min_burn() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 10u64/*min_burn*/)/*sudo_set_min_burn*/;
@@ -202,7 +202,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_network_registration_allowed() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, true/*registration_allowed*/)/*sudo_set_network_registration_allowed*/;
@@ -215,13 +215,13 @@ mod benchmarks {
let tempo: u16 = 15;
let modality: u16 = 0;
- pallet_subtensor::Pallet::::init_new_network(netuid, tempo);
+ pallet_jungochain::Pallet::::init_new_network(netuid, tempo);
}: sudo_set_tempo(RawOrigin::>::Root, netuid, tempo)
*/
#[benchmark]
fn sudo_set_tempo() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 1u16/*tempo*/)/*sudo_set_tempo*/;
@@ -229,7 +229,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_commit_reveal_weights_interval() {
- pallet_subtensor::Pallet::::init_new_network(
+ pallet_jungochain::Pallet::::init_new_network(
1u16, /*netuid*/
1u16, /*sudo_tempo*/
);
@@ -240,7 +240,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_commit_reveal_weights_enabled() {
- pallet_subtensor::Pallet::::init_new_network(
+ pallet_jungochain::Pallet::::init_new_network(
1u16, /*netuid*/
1u16, /*sudo_tempo*/
);
@@ -251,7 +251,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_hotkey_emission_tempo() {
- pallet_subtensor::Pallet::::init_new_network(
+ pallet_jungochain::Pallet::::init_new_network(
1u16, /*netuid*/
1u16, /*sudo_tempo*/
);
@@ -262,7 +262,7 @@ mod benchmarks {
#[benchmark]
fn sudo_set_network_max_stake() {
- pallet_subtensor::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
+ pallet_jungochain::Pallet::::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
#[extrinsic_call]
_(RawOrigin::Root, 1u16/*netuid*/, 1_000_000_000_000_000u64/*max_stake*/)/*sudo_set_network_max_stake*/;
diff --git a/pallets/admin-utils/src/lib.rs b/pallets/admin-utils/src/lib.rs
index 85c7ef62..613ef8ab 100644
--- a/pallets/admin-utils/src/lib.rs
+++ b/pallets/admin-utils/src/lib.rs
@@ -26,7 +26,7 @@ pub mod pallet {
/// Configure the pallet by specifying the parameters and types on which it depends.
#[pallet::config]
- pub trait Config: frame_system::Config + pallet_subtensor::pallet::Config {
+ pub trait Config: frame_system::Config + pallet_jungochain::pallet::Config {
/// Because this pallet emits events, it depends on the runtime's definition of an event.
type RuntimeEvent: From> + IsType<::RuntimeEvent>;
@@ -88,31 +88,31 @@ pub mod pallet {
/// The extrinsic sets the default take for the network.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the default take.
+ /// The extrinsic will call the Jungochain pallet to set the default take.
#[pallet::call_index(1)]
#[pallet::weight(T::WeightInfo::sudo_set_default_take())]
pub fn sudo_set_default_take(origin: OriginFor, default_take: u16) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_max_delegate_take(default_take);
+ pallet_jungochain::Pallet::::set_max_delegate_take(default_take);
log::debug!("DefaultTakeSet( default_take: {:?} ) ", default_take);
Ok(())
}
/// The extrinsic sets the transaction rate limit for the network.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the transaction rate limit.
+ /// The extrinsic will call the Jungochain pallet to set the transaction rate limit.
#[pallet::call_index(2)]
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
pub fn sudo_set_tx_rate_limit(origin: OriginFor, tx_rate_limit: u64) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_tx_rate_limit(tx_rate_limit);
+ pallet_jungochain::Pallet::::set_tx_rate_limit(tx_rate_limit);
log::debug!("TxRateLimitSet( tx_rate_limit: {:?} ) ", tx_rate_limit);
Ok(())
}
/// The extrinsic sets the serving rate limit for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the serving rate limit.
+ /// The extrinsic will call the Jungochain pallet to set the serving rate limit.
#[pallet::call_index(3)]
#[pallet::weight(T::WeightInfo::sudo_set_serving_rate_limit())]
pub fn sudo_set_serving_rate_limit(
@@ -120,9 +120,9 @@ pub mod pallet {
netuid: u16,
serving_rate_limit: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
- pallet_subtensor::Pallet::::set_serving_rate_limit(netuid, serving_rate_limit);
+ pallet_jungochain::Pallet::::set_serving_rate_limit(netuid, serving_rate_limit);
log::debug!(
"ServingRateLimitSet( serving_rate_limit: {:?} ) ",
serving_rate_limit
@@ -132,7 +132,7 @@ pub mod pallet {
/// The extrinsic sets the minimum difficulty for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the minimum difficulty.
+ /// The extrinsic will call the Jungochain pallet to set the minimum difficulty.
#[pallet::call_index(4)]
#[pallet::weight(T::WeightInfo::sudo_set_min_difficulty())]
pub fn sudo_set_min_difficulty(
@@ -140,13 +140,13 @@ pub mod pallet {
netuid: u16,
min_difficulty: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_min_difficulty(netuid, min_difficulty);
+ pallet_jungochain::Pallet::::set_min_difficulty(netuid, min_difficulty);
log::debug!(
"MinDifficultySet( netuid: {:?} min_difficulty: {:?} ) ",
netuid,
@@ -157,7 +157,7 @@ pub mod pallet {
/// The extrinsic sets the maximum difficulty for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the maximum difficulty.
+ /// The extrinsic will call the Jungochain pallet to set the maximum difficulty.
#[pallet::call_index(5)]
#[pallet::weight(T::WeightInfo::sudo_set_max_difficulty())]
pub fn sudo_set_max_difficulty(
@@ -165,13 +165,13 @@ pub mod pallet {
netuid: u16,
max_difficulty: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_max_difficulty(netuid, max_difficulty);
+ pallet_jungochain::Pallet::::set_max_difficulty(netuid, max_difficulty);
log::debug!(
"MaxDifficultySet( netuid: {:?} max_difficulty: {:?} ) ",
netuid,
@@ -182,7 +182,7 @@ pub mod pallet {
/// The extrinsic sets the weights version key for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the weights version key.
+ /// The extrinsic will call the Jungochain pallet to set the weights version key.
#[pallet::call_index(6)]
#[pallet::weight(T::WeightInfo::sudo_set_weights_version_key())]
pub fn sudo_set_weights_version_key(
@@ -190,13 +190,13 @@ pub mod pallet {
netuid: u16,
weights_version_key: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_weights_version_key(netuid, weights_version_key);
+ pallet_jungochain::Pallet::::set_weights_version_key(netuid, weights_version_key);
log::debug!(
"WeightsVersionKeySet( netuid: {:?} weights_version_key: {:?} ) ",
netuid,
@@ -207,7 +207,7 @@ pub mod pallet {
/// The extrinsic sets the weights set rate limit for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the weights set rate limit.
+ /// The extrinsic will call the Jungochain pallet to set the weights set rate limit.
#[pallet::call_index(7)]
#[pallet::weight(T::WeightInfo::sudo_set_weights_set_rate_limit())]
pub fn sudo_set_weights_set_rate_limit(
@@ -215,13 +215,13 @@ pub mod pallet {
netuid: u16,
weights_set_rate_limit: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_weights_set_rate_limit(
+ pallet_jungochain::Pallet::::set_weights_set_rate_limit(
netuid,
weights_set_rate_limit,
);
@@ -235,7 +235,7 @@ pub mod pallet {
/// The extrinsic sets the adjustment interval for a subnet.
/// It is only callable by the root account, not changeable by the subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the adjustment interval.
+ /// The extrinsic will call the Jungochain pallet to set the adjustment interval.
#[pallet::call_index(8)]
#[pallet::weight(T::WeightInfo::sudo_set_adjustment_interval())]
pub fn sudo_set_adjustment_interval(
@@ -246,10 +246,10 @@ pub mod pallet {
ensure_root(origin)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_adjustment_interval(netuid, adjustment_interval);
+ pallet_jungochain::Pallet::::set_adjustment_interval(netuid, adjustment_interval);
log::debug!(
"AdjustmentIntervalSet( netuid: {:?} adjustment_interval: {:?} ) ",
netuid,
@@ -260,7 +260,7 @@ pub mod pallet {
/// The extrinsic sets the adjustment alpha for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the adjustment alpha.
+ /// The extrinsic will call the Jungochain pallet to set the adjustment alpha.
#[pallet::call_index(9)]
#[pallet::weight((
Weight::from_parts(14_000_000, 0)
@@ -274,13 +274,13 @@ pub mod pallet {
netuid: u16,
adjustment_alpha: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_adjustment_alpha(netuid, adjustment_alpha);
+ pallet_jungochain::Pallet::::set_adjustment_alpha(netuid, adjustment_alpha);
log::debug!(
"AdjustmentAlphaSet( adjustment_alpha: {:?} ) ",
adjustment_alpha
@@ -290,7 +290,7 @@ pub mod pallet {
/// The extrinsic sets the adjustment beta for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the adjustment beta.
+ /// The extrinsic will call the Jungochain pallet to set the adjustment beta.
#[pallet::call_index(12)]
#[pallet::weight(T::WeightInfo::sudo_set_max_weight_limit())]
pub fn sudo_set_max_weight_limit(
@@ -298,13 +298,13 @@ pub mod pallet {
netuid: u16,
max_weight_limit: u16,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_max_weight_limit(netuid, max_weight_limit);
+ pallet_jungochain::Pallet::::set_max_weight_limit(netuid, max_weight_limit);
log::debug!(
"MaxWeightLimitSet( netuid: {:?} max_weight_limit: {:?} ) ",
netuid,
@@ -315,7 +315,7 @@ pub mod pallet {
/// The extrinsic sets the immunity period for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the immunity period.
+ /// The extrinsic will call the Jungochain pallet to set the immunity period.
#[pallet::call_index(13)]
#[pallet::weight(T::WeightInfo::sudo_set_immunity_period())]
pub fn sudo_set_immunity_period(
@@ -323,13 +323,13 @@ pub mod pallet {
netuid: u16,
immunity_period: u16,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_immunity_period(netuid, immunity_period);
+ pallet_jungochain::Pallet::::set_immunity_period(netuid, immunity_period);
log::debug!(
"ImmunityPeriodSet( netuid: {:?} immunity_period: {:?} ) ",
netuid,
@@ -340,7 +340,7 @@ pub mod pallet {
/// The extrinsic sets the minimum allowed weights for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the minimum allowed weights.
+ /// The extrinsic will call the Jungochain pallet to set the minimum allowed weights.
#[pallet::call_index(14)]
#[pallet::weight(T::WeightInfo::sudo_set_min_allowed_weights())]
pub fn sudo_set_min_allowed_weights(
@@ -348,13 +348,13 @@ pub mod pallet {
netuid: u16,
min_allowed_weights: u16,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_min_allowed_weights(netuid, min_allowed_weights);
+ pallet_jungochain::Pallet::::set_min_allowed_weights(netuid, min_allowed_weights);
log::debug!(
"MinAllowedWeightSet( netuid: {:?} min_allowed_weights: {:?} ) ",
netuid,
@@ -365,7 +365,7 @@ pub mod pallet {
/// The extrinsic sets the maximum allowed UIDs for a subnet.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the maximum allowed UIDs for a subnet.
+ /// The extrinsic will call the Jungochain pallet to set the maximum allowed UIDs for a subnet.
#[pallet::call_index(15)]
#[pallet::weight(T::WeightInfo::sudo_set_max_allowed_uids())]
pub fn sudo_set_max_allowed_uids(
@@ -375,14 +375,14 @@ pub mod pallet {
) -> DispatchResult {
ensure_root(origin)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
ensure!(
- pallet_subtensor::Pallet::::get_subnetwork_n(netuid) < max_allowed_uids,
+ pallet_jungochain::Pallet::::get_subnetwork_n(netuid) < max_allowed_uids,
Error::::MaxAllowedUIdsLessThanCurrentUIds
);
- pallet_subtensor::Pallet::::set_max_allowed_uids(netuid, max_allowed_uids);
+ pallet_jungochain::Pallet::::set_max_allowed_uids(netuid, max_allowed_uids);
log::debug!(
"MaxAllowedUidsSet( netuid: {:?} max_allowed_uids: {:?} ) ",
netuid,
@@ -393,41 +393,41 @@ pub mod pallet {
/// The extrinsic sets the kappa for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the kappa.
+ /// The extrinsic will call the Jungochain pallet to set the kappa.
#[pallet::call_index(16)]
#[pallet::weight(T::WeightInfo::sudo_set_kappa())]
pub fn sudo_set_kappa(origin: OriginFor, netuid: u16, kappa: u16) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_kappa(netuid, kappa);
+ pallet_jungochain::Pallet::::set_kappa(netuid, kappa);
log::debug!("KappaSet( netuid: {:?} kappa: {:?} ) ", netuid, kappa);
Ok(())
}
/// The extrinsic sets the rho for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the rho.
+ /// The extrinsic will call the Jungochain pallet to set the rho.
#[pallet::call_index(17)]
#[pallet::weight(T::WeightInfo::sudo_set_rho())]
pub fn sudo_set_rho(origin: OriginFor, netuid: u16, rho: u16) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_rho(netuid, rho);
+ pallet_jungochain::Pallet::::set_rho(netuid, rho);
log::debug!("RhoSet( netuid: {:?} rho: {:?} ) ", netuid, rho);
Ok(())
}
/// The extrinsic sets the activity cutoff for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the activity cutoff.
+ /// The extrinsic will call the Jungochain pallet to set the activity cutoff.
#[pallet::call_index(18)]
#[pallet::weight(T::WeightInfo::sudo_set_activity_cutoff())]
pub fn sudo_set_activity_cutoff(
@@ -435,13 +435,13 @@ pub mod pallet {
netuid: u16,
activity_cutoff: u16,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_activity_cutoff(netuid, activity_cutoff);
+ pallet_jungochain::Pallet::::set_activity_cutoff(netuid, activity_cutoff);
log::debug!(
"ActivityCutoffSet( netuid: {:?} activity_cutoff: {:?} ) ",
netuid,
@@ -452,7 +452,7 @@ pub mod pallet {
/// The extrinsic sets the network registration allowed for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the network registration allowed.
+ /// The extrinsic will call the Jungochain pallet to set the network registration allowed.
#[pallet::call_index(19)]
#[pallet::weight((
Weight::from_parts(4_000_000, 0)
@@ -466,9 +466,9 @@ pub mod pallet {
netuid: u16,
registration_allowed: bool,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
- pallet_subtensor::Pallet::::set_network_registration_allowed(
+ pallet_jungochain::Pallet::::set_network_registration_allowed(
netuid,
registration_allowed,
);
@@ -481,7 +481,7 @@ pub mod pallet {
/// The extrinsic sets the network PoW registration allowed for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the network PoW registration allowed.
+ /// The extrinsic will call the Jungochain pallet to set the network PoW registration allowed.
#[pallet::call_index(20)]
#[pallet::weight((
Weight::from_parts(14_000_000, 0)
@@ -494,9 +494,9 @@ pub mod pallet {
netuid: u16,
registration_allowed: bool,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
- pallet_subtensor::Pallet::::set_network_pow_registration_allowed(
+ pallet_jungochain::Pallet::::set_network_pow_registration_allowed(
netuid,
registration_allowed,
);
@@ -509,7 +509,7 @@ pub mod pallet {
/// The extrinsic sets the target registrations per interval for a subnet.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the target registrations per interval.
+ /// The extrinsic will call the Jungochain pallet to set the target registrations per interval.
#[pallet::call_index(21)]
#[pallet::weight(T::WeightInfo::sudo_set_target_registrations_per_interval())]
pub fn sudo_set_target_registrations_per_interval(
@@ -520,10 +520,10 @@ pub mod pallet {
ensure_root(origin)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_target_registrations_per_interval(
+ pallet_jungochain::Pallet::::set_target_registrations_per_interval(
netuid,
target_registrations_per_interval,
);
@@ -537,7 +537,7 @@ pub mod pallet {
/// The extrinsic sets the minimum burn for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the minimum burn.
+ /// The extrinsic will call the Jungochain pallet to set the minimum burn.
#[pallet::call_index(22)]
#[pallet::weight(T::WeightInfo::sudo_set_min_burn())]
pub fn sudo_set_min_burn(
@@ -545,13 +545,13 @@ pub mod pallet {
netuid: u16,
min_burn: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_min_burn(netuid, min_burn);
+ pallet_jungochain::Pallet::::set_min_burn(netuid, min_burn);
log::debug!(
"MinBurnSet( netuid: {:?} min_burn: {:?} ) ",
netuid,
@@ -562,7 +562,7 @@ pub mod pallet {
/// The extrinsic sets the maximum burn for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the maximum burn.
+ /// The extrinsic will call the Jungochain pallet to set the maximum burn.
#[pallet::call_index(23)]
#[pallet::weight(T::WeightInfo::sudo_set_max_burn())]
pub fn sudo_set_max_burn(
@@ -570,13 +570,13 @@ pub mod pallet {
netuid: u16,
max_burn: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_max_burn(netuid, max_burn);
+ pallet_jungochain::Pallet::::set_max_burn(netuid, max_burn);
log::debug!(
"MaxBurnSet( netuid: {:?} max_burn: {:?} ) ",
netuid,
@@ -587,7 +587,7 @@ pub mod pallet {
/// The extrinsic sets the difficulty for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the difficulty.
+ /// The extrinsic will call the Jungochain pallet to set the difficulty.
#[pallet::call_index(24)]
#[pallet::weight(T::WeightInfo::sudo_set_difficulty())]
pub fn sudo_set_difficulty(
@@ -595,12 +595,12 @@ pub mod pallet {
netuid: u16,
difficulty: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_difficulty(netuid, difficulty);
+ pallet_jungochain::Pallet::::set_difficulty(netuid, difficulty);
log::debug!(
"DifficultySet( netuid: {:?} difficulty: {:?} ) ",
netuid,
@@ -611,7 +611,7 @@ pub mod pallet {
/// The extrinsic sets the maximum allowed validators for a subnet.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the maximum allowed validators.
+ /// The extrinsic will call the Jungochain pallet to set the maximum allowed validators.
#[pallet::call_index(25)]
#[pallet::weight(T::WeightInfo::sudo_set_max_allowed_validators())]
pub fn sudo_set_max_allowed_validators(
@@ -621,16 +621,16 @@ pub mod pallet {
) -> DispatchResult {
ensure_root(origin)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
ensure!(
max_allowed_validators
- <= pallet_subtensor::Pallet::::get_max_allowed_uids(netuid),
+ <= pallet_jungochain::Pallet::::get_max_allowed_uids(netuid),
Error::::MaxValidatorsLargerThanMaxUIds
);
- pallet_subtensor::Pallet::::set_max_allowed_validators(
+ pallet_jungochain::Pallet::::set_max_allowed_validators(
netuid,
max_allowed_validators,
);
@@ -644,7 +644,7 @@ pub mod pallet {
/// The extrinsic sets the bonds moving average for a subnet.
/// It is only callable by the root account or subnet owner.
- /// The extrinsic will call the Subtensor pallet to set the bonds moving average.
+ /// The extrinsic will call the Jungochain pallet to set the bonds moving average.
#[pallet::call_index(26)]
#[pallet::weight(T::WeightInfo::sudo_set_bonds_moving_average())]
pub fn sudo_set_bonds_moving_average(
@@ -652,13 +652,13 @@ pub mod pallet {
netuid: u16,
bonds_moving_average: u64,
) -> DispatchResult {
- pallet_subtensor::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
+ pallet_jungochain::Pallet::::ensure_subnet_owner_or_root(origin, netuid)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_bonds_moving_average(netuid, bonds_moving_average);
+ pallet_jungochain::Pallet::::set_bonds_moving_average(netuid, bonds_moving_average);
log::debug!(
"BondsMovingAverageSet( netuid: {:?} bonds_moving_average: {:?} ) ",
netuid,
@@ -669,7 +669,7 @@ pub mod pallet {
/// The extrinsic sets the maximum registrations per block for a subnet.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the maximum registrations per block.
+ /// The extrinsic will call the Jungochain pallet to set the maximum registrations per block.
#[pallet::call_index(27)]
#[pallet::weight(T::WeightInfo::sudo_set_max_registrations_per_block())]
pub fn sudo_set_max_registrations_per_block(
@@ -680,10 +680,10 @@ pub mod pallet {
ensure_root(origin)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_max_registrations_per_block(
+ pallet_jungochain::Pallet::::set_max_registrations_per_block(
netuid,
max_registrations_per_block,
);
@@ -697,7 +697,7 @@ pub mod pallet {
/// The extrinsic sets the subnet owner cut for a subnet.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the subnet owner cut.
+ /// The extrinsic will call the Jungochain pallet to set the subnet owner cut.
#[pallet::call_index(28)]
#[pallet::weight((
Weight::from_parts(14_000_000, 0)
@@ -710,7 +710,7 @@ pub mod pallet {
subnet_owner_cut: u16,
) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_subnet_owner_cut(subnet_owner_cut);
+ pallet_jungochain::Pallet::::set_subnet_owner_cut(subnet_owner_cut);
log::debug!(
"SubnetOwnerCut( subnet_owner_cut: {:?} ) ",
subnet_owner_cut
@@ -720,7 +720,7 @@ pub mod pallet {
/// The extrinsic sets the network rate limit for the network.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the network rate limit.
+ /// The extrinsic will call the Jungochain pallet to set the network rate limit.
#[pallet::call_index(29)]
#[pallet::weight((
Weight::from_parts(14_000_000, 0)
@@ -733,30 +733,30 @@ pub mod pallet {
rate_limit: u64,
) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_network_rate_limit(rate_limit);
+ pallet_jungochain::Pallet::::set_network_rate_limit(rate_limit);
log::debug!("NetworkRateLimit( rate_limit: {:?} ) ", rate_limit);
Ok(())
}
/// The extrinsic sets the tempo for a subnet.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the tempo.
+ /// The extrinsic will call the Jungochain pallet to set the tempo.
#[pallet::call_index(30)]
#[pallet::weight(T::WeightInfo::sudo_set_tempo())]
pub fn sudo_set_tempo(origin: OriginFor, netuid: u16, tempo: u16) -> DispatchResult {
ensure_root(origin)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_tempo(netuid, tempo);
+ pallet_jungochain::Pallet::::set_tempo(netuid, tempo);
log::debug!("TempoSet( netuid: {:?} tempo: {:?} ) ", netuid, tempo);
Ok(())
}
/// The extrinsic sets the total issuance for the network.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the issuance for the network.
+ /// The extrinsic will call the Jungochain pallet to set the issuance for the network.
#[pallet::call_index(33)]
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
pub fn sudo_set_total_issuance(
@@ -765,14 +765,14 @@ pub mod pallet {
) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_total_issuance(total_issuance);
+ pallet_jungochain::Pallet::::set_total_issuance(total_issuance);
Ok(())
}
/// The extrinsic sets the immunity period for the network.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the immunity period for the network.
+ /// The extrinsic will call the Jungochain pallet to set the immunity period for the network.
#[pallet::call_index(35)]
#[pallet::weight((
Weight::from_parts(14_000_000, 0)
@@ -786,7 +786,7 @@ pub mod pallet {
) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_network_immunity_period(immunity_period);
+ pallet_jungochain::Pallet::::set_network_immunity_period(immunity_period);
log::debug!("NetworkImmunityPeriod( period: {:?} ) ", immunity_period);
@@ -795,7 +795,7 @@ pub mod pallet {
/// The extrinsic sets the min lock cost for the network.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the min lock cost for the network.
+ /// The extrinsic will call the Jungochain pallet to set the min lock cost for the network.
#[pallet::call_index(36)]
#[pallet::weight((
Weight::from_parts(14_000_000, 0)
@@ -809,7 +809,7 @@ pub mod pallet {
) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_network_min_lock(lock_cost);
+ pallet_jungochain::Pallet::::set_network_min_lock(lock_cost);
log::debug!("NetworkMinLockCost( lock_cost: {:?} ) ", lock_cost);
@@ -818,7 +818,7 @@ pub mod pallet {
/// The extrinsic sets the subnet limit for the network.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the subnet limit.
+ /// The extrinsic will call the Jungochain pallet to set the subnet limit.
#[pallet::call_index(37)]
#[pallet::weight((
Weight::from_parts(14_000_000, 0)
@@ -828,7 +828,7 @@ pub mod pallet {
))]
pub fn sudo_set_subnet_limit(origin: OriginFor, max_subnets: u16) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_max_subnets(max_subnets);
+ pallet_jungochain::Pallet::::set_max_subnets(max_subnets);
log::debug!("SubnetLimit( max_subnets: {:?} ) ", max_subnets);
@@ -837,7 +837,7 @@ pub mod pallet {
/// The extrinsic sets the lock reduction interval for the network.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the lock reduction interval.
+ /// The extrinsic will call the Jungochain pallet to set the lock reduction interval.
#[pallet::call_index(38)]
#[pallet::weight((
Weight::from_parts(14_000_000, 0)
@@ -851,7 +851,7 @@ pub mod pallet {
) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_lock_reduction_interval(interval);
+ pallet_jungochain::Pallet::::set_lock_reduction_interval(interval);
log::debug!("NetworkLockReductionInterval( interval: {:?} ) ", interval);
@@ -860,7 +860,7 @@ pub mod pallet {
/// The extrinsic sets the recycled RAO for a subnet.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the recycled RAO.
+ /// The extrinsic will call the Jungochain pallet to set the recycled RAO.
#[pallet::call_index(39)]
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
pub fn sudo_set_rao_recycled(
@@ -870,27 +870,27 @@ pub mod pallet {
) -> DispatchResult {
ensure_root(origin)?;
ensure!(
- pallet_subtensor::Pallet::::if_subnet_exist(netuid),
+ pallet_jungochain::Pallet::::if_subnet_exist(netuid),
Error::::SubnetDoesNotExist
);
- pallet_subtensor::Pallet::::set_rao_recycled(netuid, rao_recycled);
+ pallet_jungochain::Pallet::::set_rao_recycled(netuid, rao_recycled);
Ok(())
}
/// The extrinsic sets the weights min stake.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the weights min stake.
+ /// The extrinsic will call the Jungochain pallet to set the weights min stake.
#[pallet::call_index(42)]
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
pub fn sudo_set_weights_min_stake(origin: OriginFor, min_stake: u64) -> DispatchResult {
ensure_root(origin)?;
- pallet_subtensor::Pallet::::set_weights_min_stake(min_stake);
+ pallet_jungochain::Pallet::::set_weights_min_stake(min_stake);
Ok(())
}
/// The extrinsic sets the minimum stake required for nominators.
/// It is only callable by the root account.
- /// The extrinsic will call the Subtensor pallet to set the minimum stake required for nominators.
+ /// The extrinsic will call the Jungochain pallet to set the minimum stake required for nominators.
#[pallet::call_index(43)]
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
pub fn sudo_set_nominator_min_required_stake(
@@ -899,12 +899,12 @@ pub mod pallet {
min_stake: u64,
) -> DispatchResult {
ensure_root(origin)?;
- let prev_min_stake = pallet_subtensor::Pallet::::get_nominator_min_required_stake();
+ let prev_min_stake = pallet_jungochain::Pallet::