Skip to content

Commit c28ed2f

Browse files
committed
branch catchup
1 parent 681ad2f commit c28ed2f

File tree

2 files changed

+44
-131
lines changed

2 files changed

+44
-131
lines changed

docs/local-build/create-subnet.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ btcli wallet transfer \
4646
```
4747

4848

49-
50-
5149
#### Network Rate Limit Error
5250

5351
If you see a network rate limit error, you may need to adjust the `SubtensorInitialNetworkRateLimit` chain state parameter.

docs/subnets/create-a-subnet.md

Lines changed: 44 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -4,138 +4,81 @@ title: "Create a Subnet"
44

55
# Create a Subnet
66

7-
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).
810

911
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.
1012

11-
See also:
13+
## Considerations
14+
15+
### Research existing subnets
16+
17+
Prospective subnet creators should familiarize themselves with the space of existing subnets.
1218

1319
- Real-time subnet info on [tao.app](https://www.tao.app/explorer)
1420
- LearnBittensor's [Subnet listings](https://learnbittensor.org/subnets)
1521

16-
:::tip Validating in Your Own Subnet
17-
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
1823

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.
2125

22-
## Recommended flow for deploying your subnet
26+
:::tip try it live
2327

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:
2529

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.
30+
<link rel="stylesheet" href="https://unpkg.com/@antonz/[email protected]/dist/snippet.css" />
31+
<codapi-settings url="https://bittensor-codex.com/v1">
32+
</codapi-settings>
2933

30-
:::tip Subnet Creation Limits
31-
Subnet creations are limited to **one subnet creation per 7200 blocks** (approximately one per day).
32-
:::
33-
34-
## Prerequisites
34+
```shell
35+
btcli subnet burn-cost --network finney
36+
```
3537

36-
To create a subnet, whether locally, on testchain, or on mainchain, make sure that:
38+
<codapi-snippet sandbox="python" editor="basic" init-delay="500">
39+
</codapi-snippet>
3740

38-
- 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+
```
4044

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`.
45+
<codapi-snippet sandbox="python" editor="basic" init-delay="500">
46+
</codapi-snippet>
4347
:::
4448

45-
## Creating a local subnet
49+
### A new subnet is not automatically active
4650

47-
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.
4852

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.
5155
:::
5256

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).
57+
### Validating in your own subnet
6958

70-
```bash
71-
btcli wallet faucet --wallet.name <owner-wallet-name> --subtensor.chain_endpoint ws://127.0.0.1:9946
72-
```
59+
You must meet the same [requirements for validation](../validators#requirements-for-validation) as other validators in order to set weights in your own subnet.
7360

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.
7962

80-
### Step 4. Create the subnet
63+
### Subnet creation rate limits
8164

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.
8366

84-
```bash
85-
btcli subnet create --wallet.name owner --subtensor.chain_endpoint ws://127.0.0.1:9946
86-
```
87-
88-
Output:
89-
90-
```bash
91-
>> Your balance is: τ200.000000000
92-
>> 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
9668

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.
9873

9974
## Creating a subnet on testchain
10075

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-
12976
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.
13077

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-
13578
Run the create subnet command on the testchain.
13679

13780
```bash
138-
btcli subnet create --subtensor.network test
81+
btcli subnet create --network test
13982
```
14083

14184
Output:
@@ -151,35 +94,11 @@ Output:
15194

15295
## Creating a subnet on mainchain
15396

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-
15697
:::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.
15899
:::
159100

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
183102

184103
Use the below command to create a new subnet on the mainchain.
185104

@@ -197,11 +116,7 @@ Output:
197116
✅ Registered subnetwork with netuid: 1 # Your subnet netuid will show here, save this for later.
198117
```
199118

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
205120

206121
Use the below command to check whether the subnet can be started.
207122

@@ -213,7 +128,7 @@ Where "x" is the subnet ID.
213128

214129
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.`
215130

216-
### Step 5. Start the subnet
131+
### Start the subnet
217132

218133
Use the below command to start the subnet once `check-start` returns `Emission schedule can be started.`
219134

0 commit comments

Comments
 (0)