You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page describes the procedures for creating a new Bittensor subnet.
7
+
This page describes the procedures for creating a new Bittensor subnet on test chain or main chain.
8
+
9
+
You should first try [Creating a Subnet on a locally deployed chain](../local-build/create-subnet).
8
10
9
11
Creating a subnet is a major undertaking. You should read up on [Understanding Subnets](understanding-subnets) and research existing subnets before planning to create one.
10
12
11
-
See also:
13
+
## Considerations
14
+
15
+
### Research existing subnets
16
+
17
+
Prospective subnet creators should familiarize themselves with the space of existing subnets.
12
18
13
19
- Real-time subnet info on [tao.app](https://www.tao.app/explorer)
Ensure that you meet the [minimum requirements for validation](../validators#requirements-for-validation), or you will not be able to set weights in your own subnet.
22
+
### Burn cost
18
23
19
-
One option for subnet owners is to ask one of the root network (subnet 0) validators to parent your validator hotkey as a childkey of theirs. This will lend their stake to your validator, and can help you ensure that your validator maintains a sufficient stake to effectively participate in consensus as well as resist deregistration. See the [Child Hotkeys](./child-hotkeys) documentation for more detail.
20
-
:::
24
+
The burn cost for subnet creation is dynamic; it lowers gradually and doubles every time a subnet is created.
21
25
22
-
## Recommended flow for deploying your subnet
26
+
:::tip try it live
23
27
24
-
Before you deploy your first subnet on the mainchain, we strongly recommend that you follow the below order:
28
+
Check the burn cost to create a subnet on Bittensor main network and test network:
25
29
26
-
1.**Local first**: Create a subnet on your local, and develop and test your incentive mechanism on the local subnet.
27
-
2.**Testchain next**: After you are satisfied with it, create a subnet on the Bittensor testchain, and test and debug your incentive mechanism on this testchain subnet.
28
-
3.**Mainchain last**: After completing the above steps, create a subnet on the Bittensor mainchain.
- You [installed Bittensor](../getting-started/installation.md).
39
-
- You have already [created a wallet or know how to create one](../getting-started/wallets.md#creating-a-local-wallet).
41
+
```shell
42
+
btcli subnet burn-cost --network test
43
+
```
40
44
41
-
:::tip Registering vs creating vs purchasing a slot
42
-
In Bittensor, when we say "registering your keys in a subnet", it means purchasing a UID slot in the subnet, and you will then either validate or mine on this UID. This step is also referred to as **purchasing a slot**. On the other hand, "creating a subnet" will create a subnet and give you its `netuid`.
You must also run a local Bittensor blockchain to create and run a local subnet. Running a local blockchain is sometimes synonymously referred to as **running on staging**. Running a local blockchain spins up two authority nodes locally, not connected to any other Bittensor blockchain nodes either on testchain or mainchain.
51
+
To allow subnet owners to fully set up their subnets and to prevent extraction of emissions to subnet participants before the subnet is contributing to the network, new subnets are inactive and cannot be started for 7 \* 7200 blocks (roughly one week) after they are registered. During this time, you can register and activate validators and invite miners into the subnet.
48
52
49
-
:::warning Do not run a public subtensor node for a local subnet
50
-
Running a local blockchain is **different**from running a public subtensor node. While a local blockchain node is not connected to any other Bittensor nodes, a public subtensor node will connect to the Bittensor network, testchain, or mainchain depending on how you run the subtensor node and sync with the network, giving you your own access point to the Bittensor network. **To create a local subnet, do not run a public subtensor; instead, only run a local blockchain.**
53
+
:::info
54
+
The subnet and its participants will receive **no emissions**during the time that the subnet is inactive.
51
55
:::
52
56
53
-
### Step 1. Install and run a local blockchain node
54
-
55
-
Follow the [Bittensor Subnet Template document](https://github.com/opentensor/bittensor-subnet-template/blob/main/docs/running_on_staging.md) and run the below specified steps:
56
-
57
-
- From and including [Step 1 Installing substrate dependencies](https://github.com/opentensor/bittensor-subnet-template/blob/main/docs/running_on_staging.md#1-install-substrate-dependencies).
58
-
- To and including [Step 5 Initialize](https://github.com/opentensor/bittensor-subnet-template/blob/main/docs/running_on_staging.md#5-initialize).
59
-
60
-
The above steps will install and run a local blockchain node. Furthermore, when built with the `--features pow-faucet` flag, as instructed in the above **Step 5. Initialize**, the local blockchain node will provide the faucet feature, which you can use to mint test tokens.
61
-
62
-
### Step 2. Create wallet
63
-
64
-
If you have not already done so, create Bittensor wallet(s) using the steps described in the [Create Wallet](../getting-started/wallets.md) guide.
65
-
66
-
### Step 3. Mint tokens from the faucet
67
-
68
-
You will need tokens to register the subnet (which you will create below) on your local blockchain. Run the following command to mint faucet tokens (fake TAO).
You must meet the same [requirements for validation](../validators#requirements-for-validation) as other validators in order to set weights in your own subnet.
73
60
74
-
Output:
75
-
76
-
```bash
77
-
>> Balance: τ0.000000000 ➡ τ100.000000000
78
-
```
61
+
One option for subnet owners is to ask one of the root network (subnet 0) validators to parent your validator hotkey as a childkey of theirs. This will lend their stake to your validator, and can help you ensure that your validator maintains a sufficient stake to effectively participate in consensus as well as resist deregistration. See the [Child Hotkeys](./child-hotkeys) documentation for more detail.
79
62
80
-
### Step 4. Create the subnet
63
+
### Subnet creation rate limits
81
64
82
-
Run the below command to create a new subnet on your local chain. The cost will be exactly τ100.000000000 for the first subnet you create.
65
+
Subnet creations are limited to **one subnet creation per 7200 blocks** (approximately one per day). The cost to register a new subnet is also dynamic. For these reason, picking the right time to create your subnet requires planning.
>> Do you want to register a subnet for τ100.000000000? [y/n]:
93
-
>> Enter password to unlock key: [YOUR_PASSWORD]
94
-
>> ✅ Registered subnetwork with netuid: 1
95
-
```
67
+
## Prerequisites
96
68
97
-
The local chain will now have registered a default `netuid` of 1. A second registration will create `netuid` 2, and so on, until you reach the subnet limit of 8. If you create the 9th subnet, the subnet with the least staked TAO will be replaced with the newly created subnet, thereby maintaining the total subnet count to 8.
69
+
-[Install the most recent version of BTCLI](../getting-started/install-btcli).
70
+
-[Created a wallet](../getting-started/wallets.md#creating-a-local-wallet).
71
+
- To create a subnet on test chain, your wallet must have sufficient test net TAO. Inquire in [Discord](https://discord.com/channels/799672011265015819/1107738550373454028/threads/1331693251589312553) to obtain TAO on Bittensor test network.
72
+
- To create a subnet on main network (finney) requires a substantial investment of TAO, depending on current registration cost for new subnets.
98
73
99
74
## Creating a subnet on testchain
100
75
101
-
You do not need to run a local blockchain node to create a testchain subnet. Instead, your subnet will connect to the Bittensor testchain.
102
-
103
-
Creating a subnet on the testchain is competitive. Though you will only use the faucet TAO tokens for the testchain, the cost to create a subnet is determined by the rate at which new subnets are registered onto the testchain.
104
-
105
-
By default, you must have at least 100 test TAO in your owner wallet to create a subnet. However, the exact amount will fluctuate based on demand. Follow the below steps.
106
-
107
-
### Step 1. Create wallet
108
-
109
-
If you have not already done so, create Bittensor wallet(s) using the steps described in the [Create Wallet](../getting-started/wallets.md) guide.
110
-
111
-
### Step 2. Get the current price
112
-
113
-
```bash
114
-
btcli subnet burn-cost --subtensor.network test
115
-
```
116
-
117
-
Output:
118
-
119
-
```bash
120
-
>> Subnet lock cost: τ100.000000000
121
-
```
122
-
123
-
### Step 3. Get faucet tokens
124
-
125
-
The faucet is disabled on the testchain. Hence, if you don't have sufficient faucet tokens, ask the [Bittensor Discord community](https://discord.com/channels/799672011265015819/1107738550373454028/threads/1331693251589312553) for faucet tokens.
126
-
127
-
### Step 4. Create the subnet
128
-
129
76
Create your new subnet on the testchain using the test TAO you received from the previous step. This will create a new subnet on the testchain and give you its owner permissions.
130
77
131
-
:::tip Your test TAO is returned when the subnet is deregistered
132
-
Subnet creation (subnet registration) on the testchain costs test TAO. You will get this test TAO back when the subnet is deregistered.
133
-
:::
134
-
135
78
Run the create subnet command on the testchain.
136
79
137
80
```bash
138
-
btcli subnet create --subtensor.network test
81
+
btcli subnet create --network test
139
82
```
140
83
141
84
Output:
@@ -151,35 +94,11 @@ Output:
151
94
152
95
## Creating a subnet on mainchain
153
96
154
-
You do not need to run a local blockchain node to create a subnet on the mainchain. Instead, your subnet will connect to the Bittensor mainchain. Follow the below steps.
155
-
156
97
:::caution Alert: Minimum required TAO
157
-
Creating a subnet on the mainnet is competitive, and the cost is determined by the rate at which new networks are registered onto the chain. By default, you must have at least 100 TAO in your owner wallet to create a subnet on the mainchain. However, the exact amount will fluctuate based on demand.
98
+
Creating a subnet on the mainnet is competitive, and the cost is determined by the rate at which new networks are registered onto the chain.
158
99
:::
159
100
160
-
### Step 1. Create wallet
161
-
162
-
If you have not already done so, create Bittensor wallet(s) using the steps described in the [Create Wallet](../getting-started/wallets.md) guide.
163
-
164
-
### Step 2. Get the current price
165
-
166
-
The code below shows how to get the current price of creating a subnet on the mainchain (when the `--subtensor.network` option is not used, then the `btcli` will default to the `mainchain`).
167
-
168
-
```bash
169
-
btcli subnet burn-cost
170
-
```
171
-
172
-
Output:
173
-
174
-
```bash
175
-
>> Subnet lock cost: τ100.000000000
176
-
```
177
-
178
-
### Step 3. Create the subnet
179
-
180
-
:::tip Your TAO is returned when the subnet is deregistered
181
-
Subnet creation (subnet registration) on the mainchain costs real TAO. You will get this TAO back when the subnet is deregistered.
182
-
:::
101
+
### Create the subnet
183
102
184
103
Use the below command to create a new subnet on the mainchain.
185
104
@@ -197,11 +116,7 @@ Output:
197
116
✅ Registered subnetwork with netuid: 1 # Your subnet netuid will show here, save this for later.
198
117
```
199
118
200
-
:::info A New Subnet is not Automatically Active
201
-
To allow subnet owners to fully set up their subnets and to prevent extraction of emissions to subnet participants before the subnet is contributing to the network, new subnets are inactive and cannot be started for 7 \* 7200 blocks (roughly one week) after they are registered. During this time, you can register and activate validators and invite miners into the subnet. **Be advised that the subnet and its participants will receive NO EMISSIONS during the time that the subnet is inactive.**
202
-
:::
203
-
204
-
### Step 4. Check to see if you can start the subnet
119
+
### Check to see if you can start the subnet
205
120
206
121
Use the below command to check whether the subnet can be started.
207
122
@@ -213,7 +128,7 @@ Where "x" is the subnet ID.
213
128
214
129
The output will provide you with the block registered and the block at which the subnet can be started, with "blocks remaining" and an estimated time. When this time has passed, the `check-start` command will return `Emission schedule can be started.`
215
130
216
-
### Step 5. Start the subnet
131
+
### Start the subnet
217
132
218
133
Use the below command to start the subnet once `check-start` returns `Emission schedule can be started.`
0 commit comments