Skip to content

Commit c9249b9

Browse files
committed
Merge branch 'development' into add-proxy-pallet
2 parents efc4cb1 + a354d02 commit c9249b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+895
-702
lines changed

.github/PULL_REQUEST_TEMPLATE/add-feature.md

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

.github/PULL_REQUEST_TEMPLATE/fix-bug.md

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

.github/pull_request_template.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Description
2+
<!--
3+
Please provide a brief description of the changes introduced by this pull request.
4+
-->
5+
6+
7+
## Related Issue(s)
8+
9+
- Closes #[issue number]
10+
11+
## Type of Change
12+
<!--
13+
Please check the relevant options:
14+
-->
15+
16+
- [ ] Bug fix (non-breaking change which fixes an issue)
17+
- [ ] New feature (non-breaking change which adds functionality)
18+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
19+
- [ ] Documentation update
20+
- [ ] Other (please describe):
21+
22+
## Breaking Change
23+
24+
If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.
25+
26+
## Checklist
27+
28+
<!--
29+
Please ensure the following tasks are completed before requesting a review:
30+
-->
31+
32+
- [ ] I have performed a self-review of my own code
33+
- [ ] I have commented my code, particularly in hard-to-understand areas
34+
- [ ] I have run `cargo fmt` and `cargo clippy` to ensure my code is formatted and linted correctly
35+
- [ ] I have made corresponding changes to the documentation
36+
- [ ] My changes generate no new warnings
37+
- [ ] I have added tests that prove my fix is effective or that my feature works
38+
- [ ] New and existing unit tests pass locally with my changes
39+
- [ ] Any dependent changes have been merged and published in downstream modules
40+
41+
## Screenshots (if applicable)
42+
43+
Please include any relevant screenshots or GIFs that demonstrate the changes made.
44+
45+
## Additional Notes
46+
47+
Please provide any additional information or context that may be helpful for reviewers.

README.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
This repository contains Bittensor's substrate-chain. Subtensor contains the trusted logic which:
1616

1717
1. Runs Bittensor's [consensus mechanism](./docs/consensus.md);
18-
2. Advertises neuron information, IPs, etc.; and
18+
2. Advertises neuron information, IPs, etc., and
1919
3. Facilitates value transfer via TAO.
2020

2121
## System Requirements
@@ -42,31 +42,50 @@ Requirements:
4242
* Subtensor needs access to the public internet
4343
* Subtensor runs on ipv4
4444
* Subtensor listens on the following ports:
45-
1) 9944 - Websocket. This port is used by bittensor. It only accepts connections from localhost. Make sure this port is firewalled off from the public domain.
46-
2) 9933 - RPC. This port is opened, but not used.
47-
3) 30333 - p2p socket. This port accepts connections from other subtensor nodes. Make sure your firewall(s) allow incoming traffic to this port.
45+
1) 9944 - Websocket. This port is used by bittensor. It only accepts connections from localhost. Make sure this port is firewalled off from the public domain.
46+
2) 9933 - RPC. This port is opened, but not used.
47+
3) 30333 - p2p socket. This port accepts connections from other subtensor nodes. Make sure your firewall(s) allow incoming traffic to this port.
4848
* It is assumed your default outgoing traffic policy is ACCEPT. If not, make sure outbound traffic to port 30333 is allowed.
4949

50+
---
51+
52+
## For Subnet Development
53+
54+
If you are developing and testing subnet incentive mechanism, you will need to run a local subtensor node. Follow the detailed step-by-step instructions provided in the document [Running subtensor locally](./docs/running-subtensor-locally.md) to run either a lite node or an archive node. Also see the [**Subtensor Nodes** section in Bittensor Developer Documentation](https://docs.bittensor.com/subtensor-nodes).
55+
56+
### Lite node vs Archive node
57+
58+
For an explanation of lite node, archive node and how you can run your local subtensor node in these modes, see [Lite node vs archive node](https://docs.bittensor.com/subtensor-nodes#lite-node-vs-archive-node) section on [Bittensor Developer Docs](https://docs.bittensor.com/).
59+
60+
---
61+
62+
## For Subtensor Development
63+
5064
### Installation
5165
First, complete the [basic Rust setup instructions](./docs/rust-setup.md).
5266

53-
### Run
67+
**Build and Run**
5468

5569
Use Rust's native `cargo` command to build and launch the template node:
5670

5771
```sh
5872
cargo run --release -- --dev
5973
```
6074

61-
### Build
75+
**Build only**
6276

63-
The `cargo run` command will perform an initial build. Use the following command to build the node
77+
The above `cargo run` command will perform an initial build and launch the node. Use the following command to build the node
6478
without launching it:
6579

6680
```sh
6781
cargo build --release
6882
```
6983

84+
<!--
85+
86+
/** When I ran "cargo doc" it gave me a bunch of errors. And when I did "cargo doc --open" it gave same bunch of errors, and did not open. Also, I don't think the binary is "subtensor". It is "node-subtensor". We should uncomment this section after testing and validating and fixing this section.
87+
*/
88+
7089
### Embedded Docs
7190
7291
Once the project has been built, the following command can be used to explore all parameters and
@@ -75,10 +94,11 @@ subcommands:
7594
```sh
7695
./target/release/subtensor -h
7796
```
97+
-->
7898

79-
## Run
99+
## Other ways to launch the node
80100

81-
The provided `cargo run` command will launch a temporary node and its state will be discarded after
101+
The above `cargo run` command will launch a temporary node and its state will be discarded after
82102
you terminate the process. After the project has been built, there are other ways to launch the
83103
node.
84104

@@ -148,7 +168,7 @@ Running code coverage
148168
bash scripts/code-coverage.sh
149169
```
150170

151-
> Note; above requires `cargo-tarpaulin` is installed to the host, eg. `cargo install cargo-tarpaulin`
171+
> Note: They above requires `cargo-tarpaulin` is installed to the host, eg. `cargo install cargo-tarpaulin`
152172
> Development chain means that the state of our chain will be in a tmp folder while the nodes are
153173
> running. Also, **alice** account will be authority and sudo account as declared in the
154174
> [genesis state](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs#L49).
@@ -158,10 +178,10 @@ bash scripts/code-coverage.sh
158178
> - Alice//stash
159179
> - Bob//stash
160180
161-
In case of being interested in maintaining the chain' state between runs a base path must be added
181+
If we want to maintain the chain state between runs, a base path must be added
162182
so the db can be stored in the provided folder instead of a temporal one. We could use this folder
163183
to store different chain databases, as a different folder will be created per different chain that
164-
is ran. The following commands shows how to use a newly created folder as our db base path.
184+
is ran. The following commands show how to use a newly created folder as our db base path:
165185

166186
```bash
167187
# Create a folder to use as the db base path
@@ -179,7 +199,7 @@ ls ./my-chain-state/chains/dev
179199
#> db keystore network
180200
```
181201

182-
### Connect with Polkadot-JS Apps Front-end
202+
**Connect with Polkadot-JS Apps Front-end**
183203

184204
Once the node template is running locally, you can connect it with **Polkadot-JS Apps** front-end
185205
to interact with your chain. [Click
@@ -196,7 +216,7 @@ If you want to see the multi-node consensus algorithm in action, refer to our
196216
A Substrate project such as this consists of a number of components that are spread across a few
197217
directories.
198218

199-
### Node
219+
### Node Capabilities
200220

201221
A blockchain node is an application that allows users to participate in a blockchain network.
202222
Substrate-based blockchain nodes expose a number of capabilities:
@@ -210,7 +230,9 @@ Substrate-based blockchain nodes expose a number of capabilities:
210230
[Web3 Foundation research](https://research.web3.foundation/en/latest/polkadot/NPoS/index.html).
211231
- RPC Server: A remote procedure call (RPC) server is used to interact with Substrate nodes.
212232

213-
There are several files in the `node` directory - take special note of the following:
233+
**Directory structure**
234+
235+
There are several files in the [`node`](./node/) directory. Make a note of the following important files:
214236

215237
- [`chain_spec.rs`](./node/src/chain_spec.rs): A
216238
[chain specification](https://docs.substrate.io/main-docs/build/chain-spec/) is a
@@ -228,11 +250,13 @@ There are several files in the `node` directory - take special note of the follo
228250
and other [consensus mechanisms](https://docs.substrate.io/main-docs/fundamentals/consensus/#default-consensus-models)
229251
such as Aura for block authoring and GRANDPA for finality.
230252

253+
### CLI help
254+
231255
After the node has been [built](#build), refer to the embedded documentation to learn more about the
232256
capabilities and configuration parameters that it exposes:
233257

234258
```shell
235-
./target/release/node-template --help
259+
./target/release/node-subtensor --help
236260
```
237261

238262
### Runtime
@@ -278,6 +302,7 @@ A FRAME pallet is compromised of a number of blockchain primitives:
278302
- Config: The `Config` configuration interface is used to define the types and parameters upon
279303
which a FRAME pallet depends.
280304

305+
<!--
281306
### Run in Docker
282307
283308
First, install [Docker](https://docs.docker.com/get-docker/) and
@@ -304,9 +329,9 @@ by appending your own. A few useful ones are as follow.
304329
# Check whether the code is compilable
305330
./scripts/docker_run.sh cargo check
306331
```
332+
-->
307333

308-
309-
## 6. License
334+
## License
310335
The MIT License (MIT)
311336
Copyright © 2021 Yuma Rao
312337

@@ -317,5 +342,5 @@ The above copyright notice and this permission notice shall be included in all c
317342
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
318343

319344

320-
## 7. Acknowledgments
345+
## Acknowledgments
321346
**parralax**

0 commit comments

Comments
 (0)