Skip to content

Commit 04dbeca

Browse files
committed
📝 docs(README.md): update links and descriptions for Standard Pallets and Custom Pallets sections
🔧 chore(README.md): fix formatting and remove unnecessary whitespace 🚀 feat(README.md): add instructions for starting a node and connecting with Polkadot-JS Apps front-end 📝 docs(learning-path.md): update learning path with new links and instructions ✨ feat(learning-path.md): add instructions to build the `hypha-/hashed-substrate` project 🔧 chore(learning-path.md): fix formatting and indentation issues 📝 docs(learning-path.md): update instructions for setting identity and interacting with pallets ✨ feat(learning-path.md): add section for Rust Developer Deeper Training ✨ feat(learning-path.md): add section for Substrate UI Developer Deeper Training 🔧 chore(learning-path.md): fix formatting and indentation issues 📝 docs(learning-path.md): add tools and tips section with useful links 📝 docs(zombienet.md): update requirements section to include Minikube and Dockerhub account 📝 docs(zombienet.md): add instructions to deploy network examples within Zombienet repo directory 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 docs(zombienet.md): update zombienet manifest to use correct Docker image for parachain 📝 📦 chore(Cargo.toml): update publish and repository URLs for fund-admin-records, fund-admin, gated-marketplace, and rbac pallets to reflect the correct repository locations
1 parent 8cbb1a0 commit 04dbeca

File tree

11 files changed

+95
-53
lines changed

11 files changed

+95
-53
lines changed

‎README.md‎

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,65 @@
33
### [Open Hashed Chain on polkadot.js.org](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fn1.hashed.systems#/explorer)
44

55
## Features
6+
67
### Standard Pallets
8+
79
#### [Identity](https://wiki.polkadot.network/docs/learn-identity)
10+
811
Hashed Chain provides a naming system that allows participants to add information, such as social media accounts, web domains, email addresses, etc. to their on-chain account and subsequently ask for verification of this information by registrars.
912

1013
#### [Indices](https://wiki.polkadot.network/docs/learn-accounts#indices)
14+
1115
An index is a short and easy-to-remember version of an address. Claiming an index requires a deposit that is released when the index is cleared.
1216

1317
#### [Social Recovery]()
18+
1419
The Recovery pallet is an M-of-N social recovery tool for users to gain access to their accounts if the private key or other authentication mechanism is lost. Through this pallet, a user is able to make calls on-behalf-of another account which they have recovered. The recovery process is protected by trusted "friends" whom the original account owner chooses. A threshold (M) out of N friends are needed to give another account access to the recoverable account.
1520

1621
#### [Uniques (NFTs)](https://github.com/paritytech/substrate/tree/master/frame/uniques)
22+
1723
A simple, secure module for dealing with non-fungible assets.
1824

1925
#### [Treasury](https://wiki.polkadot.network/docs/learn-treasury)
26+
2027
The Treasury pallet provides a "pot" of funds that can be managed by stakeholders in the system and a structure for making spending proposals from this pot.
2128

2229
> Roadmap: Integrate support for native multisig BTC in the treasury via PSBT and output descriptors
2330
2431
#### [Society](https://wiki.polkadot.network/docs/maintain-guides-society-kusama)
32+
2533
The Society module is an economic game which incentivizes users to participate and maintain a membership society.
2634

27-
#### [Bounties](https://wiki.polkadot.network/docs/learn-treasury#bounties-spending)
35+
#### [Bounties](https://wiki.polkadot.network/docs/learn-treasury#bounties-spending)
36+
2837
Bounties Spending proposals aim to delegate the curation activity of spending proposals to experts called Curators: They can be defined as addresses with agency over a portion of the Treasury with the goal of fixing a bug or vulnerability, developing a strategy, or monitoring a set of tasks related to a specific topic: all for the benefit of the whole ecosystem.
2938

3039
## Custom Pallets
31-
#### [Fruniques (FRactional UNIQUES)](https://github.com/hashed-io/hashed-substrate/tree/main/pallets/fruniques)
40+
41+
#### [Fruniques (FRactional UNIQUES)](https://github.com/hashed-io/hashed-pallets/tree/main/pallets/fruniques)
42+
3243
A Frunique is a type of Non-Fungible Token (NFT). Fruniques allow token holders to lock any set of fungible and/or non-fungible tokens into a new NFT backed by the tokens. The source/parent asset(s) can be unlocked if and only if all of its child fruniques are held by the same account. Any Frunique may be transformed to become 1..n new Fruniques or a fungible token.
3344

3445
Fruniques are compatible with the `Uniques` pallet referenced above.
3546

3647
## Quick Start
3748

3849
### Rust Setup
50+
3951
First, complete the [basic Rust setup instructions](./docs/rust-setup.md).
4052

4153
```bash
42-
git clone https://github.com/hashed-io/hashed-substrate.git
54+
git clone https://github.com/hashed-io/hashed-pallets.git
4355
cd hashed-substrate
44-
cargo build --release
56+
cargo build --release
4557

4658
./target/release/hashed --chain ./hashed-chaos-spec-raw.json --name MyNode --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --bootnodes /ip4/206.221.189.10/tcp/30333/p2p/12D3KooWL7R8De1mPmCj3zA2pMEJXzbDrJVeEJf2SudV21EK9LxU
4759
```
4860

4961
![hashed-chain-arch](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/hashed-io/hashed-substrate/main/docs/hashed-chain-arch.iuml)
5062

5163
## Starting a node
64+
5265
### Rust Setup
5366

5467
First, complete the [basic Rust setup instructions](./docs/rust-setup.md).
@@ -109,13 +122,14 @@ RUST_BACKTRACE=1 ./target/release/hashed -ldebug --dev
109122
> running. Also, **alice** account will be authority and sudo account as declared in the
110123
> [genesis state](https://github.com/substrate-developer-hub/substrate-hashed/blob/main/node/src/chain_spec.rs#L49).
111124
> At the same time the following accounts will be pre-funded:
125+
>
112126
> - Alice
113-
> - Bob
127+
> - Bob
114128
> - Alice//stash
115129
> - Bob//stash
116130
117131
In case of being interested in maintaining the chain' state between runs a base path must be added
118-
so the db can be stored in the provided folder instead of a temporal one. We could use this folder
132+
so the db can be stored in the provided folder instead of a temporal one. We could use this folder
119133
to store different chain databases, as a different folder will be created per different chain that
120134
is ran. The following commands shows how to use a newly created folder as our db base path.
121135

@@ -135,7 +149,6 @@ $ ls ./my-chain-state/chains/dev
135149
db keystore network
136150
```
137151

138-
139152
### Connect with Polkadot-JS Apps Front-end
140153

141154
Once the node template is running locally, you can connect it with **Polkadot-JS Apps** front-end

‎docs/learning-path.md‎

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,74 @@
11
## Substrate Training Path
2+
23
### Substrate Tutorial #1
4+
35
The full binary executable is compiled from source and includes a default setup with Alice, Bob and other keys preconfigured with funds and sudo rights. This tutorial is the simplest and most informative way to ensure you have your environment ready to work on Substrate projects.
46
https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/
57

6-
### Build the `hypha-/hashed-substrate` project
8+
### Build the `hypha-/hashed-substrate` project
9+
710
Hashed project
11+
812
```bash
9-
git clone https://github.com/hashed-io/hashed-substrate
13+
git clone https://github.com/hashed-io/hashed-pallets
1014
cd hashed-substrate
1115
cargo build --release
1216
```
17+
1318
Hypha project
19+
1420
```bash
1521
git clone https://github.com/hypha-dao/hypha-substrate
1622
cd hypha-substrate
1723
cargo build --release
1824
```
1925

20-
Connect the Front End template from the tutorial step above to the running `hypha/hashed` node.
26+
Connect the Front End template from the tutorial step above to the running `hypha/hashed` node.
2127

2228
The only difference between the tutorial and the `hypha/hashed` node, in terms of setup instructions, are that the executable name will be `hypha/hashed` instead of `node-template`. That'll make sense after the tutorial. The `hypha/hashed` node will have more functionality than the `node-template`.
2329

24-
### Set Identity
25-
Use the pallet explorer on either the Front End template or https://polkadot.js.org to explore your node.
30+
### Set Identity
31+
32+
Use the pallet explorer on either the Front End template or https://polkadot.js.org to explore your node.
2633

2734
The instructions here should work on your local node using Alice and Bob: https://wiki.polkadot.network/docs/learn-identity
2835

2936
### Interact with Identity Pallet - CLI
30-
Pre-requisites: `polkadot-js-api`: https://github.com/polkadot-js/tools/
37+
38+
Pre-requisites: `polkadot-js-api`: https://github.com/polkadot-js/tools/
3139

3240
You can read the notes and copy/paste the commands from:
33-
https://github.com/hashed-io/hashed-substrate/blob/main/docs/identity.md
41+
https://github.com/hashed-io/hashed-pallets/blob/main/docs/identity.md
3442

3543
### Interact with Uniques/NFT Pallet - CLI
44+
3645
You can read the notes and copy/paste the commands from:
37-
https://github.com/hashed-io/hashed-substrate/blob/main/docs/uniques.md
46+
https://github.com/hashed-io/hashed-pallets/blob/main/docs/uniques.md
47+
48+
### Rust Developer Deeper Training
3849

39-
### Rust Developer Deeper Training
4050
Now that you have an idea for the environment, dive deeper into both the Rust training and Substrate training. As opposed to do them consecutively, I recommend starting both of the trainings and switch back and forth between the two as you progress.
4151

42-
1. [Rustlings](https://github.com/rust-lang/rustlings)
43-
- Good for interactive learners
44-
- Use watch mode and just follow the instructions
52+
1. [Rustlings](https://github.com/rust-lang/rustlings)
53+
- Good for interactive learners
54+
- Use watch mode and just follow the instructions
4555
2. [Parity Substrate Tutorials](https://docs.substrate.io/tutorials/v3/)
46-
- No particular order
47-
- Some may be out-dated; don't get stuck on a versioning issue, just skip ahead.
48-
### Substrate UI Developer Deeper Training
56+
- No particular order
57+
- Some may be out-dated; don't get stuck on a versioning issue, just skip ahead.
58+
59+
### Substrate UI Developer Deeper Training
60+
4961
1. Build a Custom UI for one of the pallets using one of the available UI templates/toolkits:
50-
- [polkadot{.js} Web Application](https://github.com/polkadot-js/apps)
51-
- [React Native Library from Parity](https://github.com/paritytech/react-native-substrate-sign)
52-
- [PolkaWallet Flutter SDK](https://github.com/polkawallet-io/sdk)
53-
- [Front End template](https://github.com/substrate-developer-hub/substrate-front-end-template) from Parity
54-
55-
2. Review tooling for data caching and query
56-
-[Useful API sidecar](https://github.com/paritytech/substrate-api-sidecar) from Parity
57-
-[Awesome Substrate tools section](https://substrate.io/ecosystem/resources/awesome-substrate/#tools)
58-
62+
63+
- [polkadot{.js} Web Application](https://github.com/polkadot-js/apps)
64+
- [React Native Library from Parity](https://github.com/paritytech/react-native-substrate-sign)
65+
- [PolkaWallet Flutter SDK](https://github.com/polkawallet-io/sdk)
66+
- [Front End template](https://github.com/substrate-developer-hub/substrate-front-end-template) from Parity
67+
68+
2. Review tooling for data caching and query -[Useful API sidecar](https://github.com/paritytech/substrate-api-sidecar) from Parity -[Awesome Substrate tools section](https://substrate.io/ecosystem/resources/awesome-substrate/#tools)
69+
5970
### Tools and Tips
71+
6072
- [polkadot{.js}](https://github.com/polkadot-js)
6173
- CLI tool: [`polkadot-js-api`](https://github.com/polkadot-js/tools/)
6274
- [Awesome Substrate](https://github.com/substrate-developer-hub/awesome-substrate)

‎docs/zombienet/zombienet.md‎

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- [Cannot exec into a container in a completed pod](#cannot-exec-into-a-container-in-a-completed-pod)
1313

1414
## Requirements
15+
1516
- Docker
1617
- Dockerhub account
1718
- Minikube
@@ -28,10 +29,12 @@ minikube start
2829
```
2930

3031
Within the Zombienet repo directory, make sure that the tool is deploying the network examples correctly.
32+
3133
```bash
3234
cd zombienet
3335
node dist/cli.js spawn ./examples/0001-small-network.toml
3436
```
37+
3538
If the process results in a Timeout error, refer to the [troubleshooting guide](#timeout-errors) taking into consideration the image that zombienet failed to pull.
3639

3740
After some intermediate tables, a successful deployment should print a `Network launched 🚀🚀` table. Note that the polkadotjs endpoints are specified in the `Direct link` rows. Both the relay and parachain should be running at this point.
@@ -40,6 +43,7 @@ After some intermediate tables, a successful deployment should print a `Network
4043
By pressing `ctr+c` all the processes should stop.
4144

4245
The zombienet manifest that was deployed is a simple relaychain to parachain connection, in which the rococo chain has 2 nodes (alice and bob nodes), while the connected parachain (100) is a template with only one collator:
46+
4347
```toml
4448
[relaychain]
4549
default_image = "docker.io/paritypr/polkadot-debug:master"
@@ -64,12 +68,15 @@ id = 100
6468
image = "docker.io/paritypr/colander:master"
6569
command = "adder-collator"
6670
```
67-
The `command = "adder-collator"` specifies the node executable (similar to `./target/release/hashed-parachain`).
6871

69-
## Creating a zombienet-valid dockerfile
72+
The `command = "adder-collator"` specifies the node executable (similar to `./target/release/hashed-parachain`).
73+
74+
## Creating a zombienet-valid dockerfile
75+
7076
The next section will be performed under the parachain repository instead of the zombienet one.
7177

7278
Now that all the tools are functional, the next step is to create a docker image that replaces the parachain template (the file exists in this repository under the name of `collator.Dockerfile`):
79+
7380
```docker
7481
FROM paritytech/ci-linux:production
7582
@@ -78,7 +85,7 @@ RUN mkdir /cfg
7885
7986
WORKDIR /var/www
8087
81-
RUN git clone https://github.com/hashed-io/hashed-substrate.git
88+
RUN git clone https://github.com/hashed-io/hashed-pallets.git
8289
8390
WORKDIR /var/www/hashed-substrate
8491
# change to main or develop
@@ -95,7 +102,8 @@ RUN /usr/local/bin/hashed-parachain --version
95102
ENTRYPOINT [ "hashed-parachain" ]
96103
```
97104

98-
Build and publish the docker image using the `collator.Dockerfile`, it is recommended to change the tag and name:
105+
Build and publish the docker image using the `collator.Dockerfile`, it is recommended to change the tag and name:
106+
99107
```bash
100108
# change abhashed/test-collator to a desired tag/dockerhub-name. Building the image will take a while.
101109
docker build -t abhashed/test-collator -f collator.Dockerfile .
@@ -104,7 +112,9 @@ docker push abhashed/test-collator
104112
```
105113

106114
## Creating the zombienet manifest
115+
107116
Based on the example provided by zombienet, a simple deployment was declared using a compatible `polkadot` image (in this case, v0.9.27), while the parachain nodes will be instanced from the custom docker image (this file exists in this repo under the name `k8-manifests/zombienet-local.toml`).
117+
108118
```toml
109119
[relaychain]
110120
default_image = "docker.io/parity/polkadot:v0.9.27"
@@ -123,7 +133,7 @@ chain = "rococo-local"
123133

124134
[[parachains]]
125135
# it can be any number, doesn't need be aligned to the parachain_id declared on the chainspec
126-
id = 2000
136+
id = 2000
127137
cumulus_based = true
128138

129139
[parachains.collator]
@@ -145,13 +155,16 @@ node dist/cli.js spawn ../hashed-substrate/k8-manifests/zombienet-local.toml
145155
The process should display an almost identical process from the testing deployment.
146156

147157
## Updating the parachain image
158+
148159
If there's a change that needs to be locally tested, it is recommended to rebuild and publish the docker image and [download the update on minikube](#timeout-errors).
149160

150161
## Troubleshooting
151162

152163
### Timeout errors
164+
153165
![Timeout error](timeout-err.png "Timeout error")
154166
If an image takes too long to download, it will result in a timeout error. It is recommended to pull the required images beforehand.
167+
155168
```bash
156169
# Enter to the minikube container through ssh
157170
minikube ssh
@@ -162,30 +175,35 @@ docker@minikube:~$ exit
162175
# Retry the zombienet deployment process
163176
node dist/cli.js spawn ./examples/md5.toml
164177
```
165-
It is also recommended to check if the image is published by the same name and tag.
178+
179+
It is also recommended to check if the image is published by the same name and tag.
166180

167181
### Cannot exec into a container in a completed pod
168182

169183
![Completed pod error](completed-pod-err.png "Task failed successfully")
170184

171185
This error usually implies there's at least one misconfiguration on the parachain image, the following examples were found:
186+
172187
- Zombienet tried to create a file in a directory that doesn't exist.
173188
- The parachain executable (e.g. `./target/release/hashed-parachain`) wasn't found in the provided `command = <executable>` path.
174189
- Zombienet tried to replace the `para_id` in the chain spec, but it wasn't found.
175190
- Any other issue that might cause the container to end unexpectedly.
176191

177192
In order to discover the exact issue, the following steps are recommended:
193+
178194
1. Zombienet produces intermediate pods for each step. Identify the last pod that was instanced successfully before the error logs appeared (e.g. `temp-1`, `temp-2`, etc).
179-
![Before error](before-completed-pod-err.png "Before the error")
195+
![Before error](before-completed-pod-err.png "Before the error")
180196
2. Prepare another terminal with the command for getting the logs for the temporal pod (e.g `kubectl logs -f temp-2 -n <namespace>`), the namespace will be pasted when available on later steps.
181-
3. In the first terminal, run the zombienet spawn command again, the first table will have the generated namespace, copy the string.
182-
![Namespace](zombienet-namespace.png "Namespace")
197+
3. In the first terminal, run the zombienet spawn command again, the first table will have the generated namespace, copy the string.
198+
![Namespace](zombienet-namespace.png "Namespace")
183199
4. Paste the string in the namespace option on the second terminal to complete the command (e.g `kubectl logs -f temp-2 -n zombie-8445ff441ef788f160070687bb33f3a0`), and run the command when the first terminal initializes the desired container, in this case, temp-2.
184-
5. The output should contain an error description.
200+
5. The output should contain an error description.
201+
185202
```
186203
❯ kubectl logs -f temp-2 -n zombie-943cbea55d3294c8968afeca7dcf8bd3
187204
Defaulted container "temp-2" out of: temp-2, transfer-files-container (init)
188205
Error: Input("Error parsing spec file: unknown field `para_id` at line 113 column 1")
189206
copy files has finished
190207
```
191-
In this specific case, the para_id field was not recognized by the chain, which means the `#[serde(rename_all = "camelCase")]` line in the `collator/src/chain_spec/mod.rs` was renaming para_id as paraId, causing conflicts in the zombienet internal processes. Removing that line was enough to fix the error.
208+
209+
In this specific case, the para_id field was not recognized by the chain, which means the `#[serde(rename_all = "camelCase")]` line in the `collator/src/chain_spec/mod.rs` was renaming para_id as paraId, causing conflicts in the zombienet internal processes. Removing that line was enough to fix the error.

‎pallets/afloat/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ homepage = "https://hashed.io"
77
edition = "2021"
88
license = "MIT"
99
publish = false
10-
repository = "https://github.com/hashed-io/hashed-substrate"
10+
repository = "https://github.com/hashed-io/hashed-pallets"
1111

1212
[package.metadata.docs.rs]
1313
targets = ["x86_64-unknown-linux-gnu"]

‎pallets/bitcoin-vaults/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ homepage = "https://hashed.io"
77
edition = "2021"
88
license = "MIT"
99
publish = false
10-
repository = "https://github.com/hashed-io/hashed-substrate"
10+
repository = "https://github.com/hashed-io/hashed-pallets"
1111

1212
[package.metadata.docs.rs]
1313
targets = ["x86_64-unknown-linux-gnu"]

‎pallets/confidential-docs/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ homepage = "https://hashed.io"
77
edition = "2021"
88
license = "Unlicense"
99
publish = false
10-
repository = "https://github.com/hashed-io/hashed-substrate"
10+
repository = "https://github.com/hashed-io/hashed-pallets"
1111

1212
[package.metadata.docs.rs]
1313
targets = ["x86_64-unknown-linux-gnu"]

‎pallets/fruniques/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ homepage = "https://hashed.io"
77
edition = "2021"
88
license = "MIT"
99
publish = false
10-
repository = "https://github.com/hashed-io/hashed-substrate"
10+
repository = "https://github.com/hashed-io/hashed-pallets"
1111

1212
[package.metadata.docs.rs]
1313
targets = ["x86_64-unknown-linux-gnu"]

‎pallets/fund-admin-records/Cargo.toml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ authors = ["Hashed <https://github.com/hashed-io"]
66
homepage = "https://hashed.io"
77
edition = "2021"
88
license = "Unlicense"
9-
publish = false
10-
repository = "https://github.com/hashed-io/hashed-substrate"
9+
publish = true
10+
repository = "https://github.com/hashed-io/hashed-pallets"
1111

1212
[package.metadata.docs.rs]
1313
targets = ["x86_64-unknown-linux-gnu"]
@@ -40,6 +40,5 @@ std = [
4040
"frame-benchmarking/std",
4141
"pallet-timestamp/std"
4242
]
43-
4443
runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
4544
try-runtime = ["frame-support/try-runtime"]

0 commit comments

Comments
 (0)