Skip to content

Commit

Permalink
Auto format doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ytvchsy authored Dec 12, 2024
1 parent 8abf2ae commit b60933a
Show file tree
Hide file tree
Showing 32 changed files with 1,824 additions and 1,067 deletions.
4 changes: 2 additions & 2 deletions docs/.vuepress/navbar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export const enNavbar = navbar([
"dbc-chain-params",
"generate-new-account",
"join-dbc-network",
"dbc-ai-public-chain-pos_en",
"dbc-ai-public-chain-pos_en",
"staking-dbc-and-voting",
"fast-track",
"common-questions",
"dbc-chain-upgrade",
"dbc-chain-upgrade",
],
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/navbar/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export const koNavbar = navbar([
"dbc-chain-params",
"generate-new-account",
"join-dbc-network",
"dbc-ai-public-chain-pos_en",
"dbc-ai-public-chain-pos_en",
"staking-dbc-and-voting",
"fast-track",
"common-questions",
"dbc-chain-upgrade",
"dbc-chain-upgrade",
],
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/navbar/kr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export const enNavbar = navbar([
"dbc-chain-params",
"generate-new-account",
"join-dbc-network",
"dbc-ai-public-chain-pos_en",
"dbc-ai-public-chain-pos_en",
"staking-dbc-and-voting",
"fast-track",
"common-questions",
"dbc-chain-upgrade",
"dbc-chain-upgrade",
],
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/navbar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ export const zhNavbar = navbar([
"dbc-chain-params",
"generate-new-account",
"join-dbc-network",
"dbc-ai-public-chain-pos",
"dbc-ai-public-chain-pos",
"run-archive-node",
"staking-dbc-and-voting",
"fast-track",
"council-proposal",
"common-questions",
"dbc-chain-upgrade",
"dbc-chain-upgrade",
],
},
{
Expand Down
20 changes: 10 additions & 10 deletions docs/.vuepress/sidebar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ export const enSidebar = sidebar({

"/en/dbc-aipublicchain/": [
{
text: "DBC AI PublicChain",
prefix: "/en/dbc-aipublicchain/",
children: [
{
text: "AI container build",
prefix: "/dbc-aipublicchain/",
children: ["docker_build"],
},
],
},
text: "DBC AI PublicChain",
prefix: "/en/dbc-aipublicchain/",
children: [
{
text: "AI container build",
prefix: "/dbc-aipublicchain/",
children: ["docker_build"],
},
],
},
],
"/en/staking-model/": [
{
Expand Down
20 changes: 10 additions & 10 deletions docs/.vuepress/sidebar/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ export const koSidebar = sidebar({

"/kr/dbc-aipublicchain/": [
{
text: "DBC AI PublicChain",
prefix: "/kr/dbc-aipublicchain/",
children: [
{
text: "AI container build",
prefix: "/dbc-aipublicchain/",
children: ["docker_build"],
},
],
},
text: "DBC AI PublicChain",
prefix: "/kr/dbc-aipublicchain/",
children: [
{
text: "AI container build",
prefix: "/dbc-aipublicchain/",
children: ["docker_build"],
},
],
},
],
"/kr/staking-model/": [
{
Expand Down
6 changes: 3 additions & 3 deletions docs/.vuepress/sidebar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const zhSidebar = sidebar({
prefix: "/dbc-aipublicchain/",
children: [
{
text: "AI容器制作",
prefix: "/dbc-aipublicchain/",
children: ["docker_build"],
text: "AI容器制作",
prefix: "/dbc-aipublicchain/",
children: ["docker_build"],
},
],
},
Expand Down
1 change: 0 additions & 1 deletion docs/dbc-introduction/dbc-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
深脑链是全球第一个人工智能公链,经过7年的研发,公链测试网2024年8月上线。任何去中心化人工智能项目都可以基于深脑链构建,可以帮助项目节省90%的研发时间,深脑链6S一个区块,TPS>1000,支持AI模型去中心运行,
支持项目方发行自己的Token和运行智能合约。AI项目方只需要发行自己的TOKEN,拿出Token奖励DBC的GPU矿工就可以免费使用GPU。


## DBC 的代币分配

![DBC代币分配方案](./assets/dbc-applications.assets/dbc_token.png)
Expand Down
25 changes: 13 additions & 12 deletions docs/en/install-update-dbc-node/dbc-client-api/http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,9 @@ http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal
],
"additional": {},
// Generated by the node_id and node_private_key of the bare metal node
"wallet":"ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce":"5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign":"3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
"wallet": "ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce": "5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign": "3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
}
```

Expand Down Expand Up @@ -1030,6 +1030,7 @@ http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal
```

When the "peer_nodes_list" array in the request body contains the node_id of the bare metal node, you can also query the specified bare metal server based on the `uuid` entered when adding the bare metal server.

- Use `http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal/<node_id>` to query related information about the bare metal server with the specified `node_id`.
- Use `http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal/<uuid>` to query related information about the bare metal server with the specified `uuid`.

Expand Down Expand Up @@ -1077,9 +1078,9 @@ http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal/add
]
},
// Generated by the node_id and node_private_key of the bare metal node
"wallet":"ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce":"5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign":"3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
"wallet": "ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce": "5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign": "3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
}
```

Expand Down Expand Up @@ -1125,9 +1126,9 @@ http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal/delete
]
},
// Generated by the node_id and node_private_key of the bare metal node
"wallet":"ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce":"5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign":"3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
"wallet": "ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce": "5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign": "3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
}
```

Expand Down Expand Up @@ -1172,9 +1173,9 @@ The node_id in the URL is the node_id corresponding to the bare metal server. Pl
"ipmi_port": 623
},
// Generated by the node_id and node_private_key of the bare metal node
"wallet":"ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce":"5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign":"3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
"wallet": "ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce": "5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign": "3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal/add
]
},
// Generated by the node_id and node_private_key of the bare metal node
"wallet":"ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce":"5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign":"3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
"wallet": "ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce": "5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign": "3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
}
```

Expand Down Expand Up @@ -120,9 +120,9 @@ http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal
],
"additional": {},
// Generated by the node_id and node_private_key of the bare metal node
"wallet":"ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce":"5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign":"3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
"wallet": "ccd9a2118ba3c95cd458302601f15281edc39d72dcf11a07527893d97ac1a573",
"nonce": "5tYLiAF9vVP8bRqSfV9DfZnizsDNY7dNeEWrSUAY8f1LKiZqBu8zaVs",
"sign": "3c680ba745af6695981fe2b30aedf6861749f570d9a6fe949930caf4613c225d4a674c33ec3d4af26c20caf871dd0f3a7cb4e0c045f12c211a345781054fc282"
}
```

Expand Down Expand Up @@ -152,6 +152,7 @@ http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal
```

When the "peer_nodes_list" array in the request body contains the node_id of the bare metal node, you can also query the specified bare metal server based on the `uuid` entered when adding the bare metal server.

- Use `http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal/<node_id>` to query related information about the bare metal server with the specified `node_id`.
- Use `http://{{dbc_client_ip}}:{{dbc_client_port}}/api/v1/bare_metal/<uuid>` to query related information about the bare metal server with the specified `uuid`.

Expand Down Expand Up @@ -209,16 +210,20 @@ In the cloud Internet cafe scene, after a GPU machine is connected to the chain
Correspondingly, to use DeepLink remote control, it is necessary to obtain the device code and device verification code of the DeepLink software running on the GPU machine (hereinafter collectively referred to as DeepLink device information). To this end, we add an interface to query DeepLink device information through the dbc node.

To ensure security, it is recommended that the GPU machine in the cloud Internet cafe scenario has a different device verification code each time it is turned on. To ensure that the bare metal node of dbc can obtain the device information and changes of DeepLink, it is necessary to start a LAN TCP service on the bare metal node of dbc to establish a connection with DeepLink. The following configuration can be added to the bare metal node configuration file of dbc `dbc_baremetal_node/conf/core.conf`:

```conf
deeplink_listen_ip=0.0.0.0
deeplink_listen_port=5003
```

At the same time, in the DeepLink configuration file `%appdata%\DeepLink\config.ini`, add the LAN TCP service that the bare metal node of dbc just started Service, for example:

```ini
[dbc]
bare_metal_ip=192.168.1.159
bare_metal_port=5003
```

After this setting, DeepLink will automatically connect to the bare metal node of dbc at startup and synchronize the device information of DeepLink.

:::tip Note!
Expand All @@ -234,6 +239,7 @@ In addition, you need to modify `http_ip=127.0.0.1` in the configuration file `d
When the GPU machine and the bare metal node of dbc are in the same network, you can directly use the HTTP service of the bare metal node to get/set device information, and the request at this time does not need `session_id` and `session_id_sign` parameters. When the renter queries the device information through the HTTP service of the client node, it must have `session_id` and `session_id_sign` parameters.

The specific usage process is as follows:

1. After the GPU machine is powered on, query the DeepLink device information.

- request method:POST
Expand All @@ -254,9 +260,9 @@ http://{{dbc_baremetal_ip}}:{{dbc_baremetal_port}}/api/v1/deeplink
],
"additional": {},
// Generated by the node_id and node_private_key of the GPU machine
"wallet":"fcf2cd8b99958606d260ca00c5ac00c88c242bcf8eb38e7cc3f29e9719a73f39",
"nonce":"3bxrsXVW2z2ELH7G9RvF7BMUQkEGkBfQhd8YD5r8somf3UdNWcEYAFa",
"sign":"e096764ac7462220bc9b8fa223b81cfb9a501eaea9ea355c0d561b6fe61cb729abed61e5d8488178856e198d9cde51c37e2aac8886cb5e7b674591b1eca8108f"
"wallet": "fcf2cd8b99958606d260ca00c5ac00c88c242bcf8eb38e7cc3f29e9719a73f39",
"nonce": "3bxrsXVW2z2ELH7G9RvF7BMUQkEGkBfQhd8YD5r8somf3UdNWcEYAFa",
"sign": "e096764ac7462220bc9b8fa223b81cfb9a501eaea9ea355c0d561b6fe61cb729abed61e5d8488178856e198d9cde51c37e2aac8886cb5e7b674591b1eca8108f"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ systemctl mask libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd
- virsh connect qemu+tcp://localhost:16509/system
- If there is no output error, it means the startup is successful


## Install the DBC node program

- **Note**: need to switch to dbc user installation
Expand Down Expand Up @@ -300,12 +299,12 @@ https://github.com/DeepBrainChain/DBC-DOC/blob/master/chain_ops/machine_online_e
- Set the miner's monitoring server address:add configuration "miner_monitor_server=ip:port" in conf/core.conf
- Set the renter's monitoring server address:https://deepbrainchain.github.io/DBC-Wiki/en/install-and-update-dbc/dbc-monitor/http-monitor-api.html
## Listen to DBC broadcast
## Listen to DBC broadcast
> Miners can start the virtual machine for their own use when the machine is idle, but they need to shut down the virtual machine in use within 10 seconds when the user rents it, so that they will not be reported and punished by the user. The UDP broadcast related messages are as follows:
+ The dbc node will broadcast the device node_id and its corresponding status in the intranet
+ Broadcast address: UDP broadcast 255.255.255.255 port 55555
+ Broadcast content: { "node_id": "xxx", "status": "renting" }
{ "node_id": "xxx", "status": "empty" }
+ Encryption method: base64 encryption
- The dbc node will broadcast the device node_id and its corresponding status in the intranet
- Broadcast address: UDP broadcast 255.255.255.255 port 55555
- Broadcast content: { "node_id": "xxx", "status": "renting" }
{ "node_id": "xxx", "status": "empty" }
- Encryption method: base64 encryption
4 changes: 1 addition & 3 deletions docs/en/staking-model/dbc-ai-public-chain-pos_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sudo mkdir dbc-chain-mainnet && cd dbc-chain-mainnet

wget https://github.com/DeepBrainChain/DeepBrainChain-MainChain/releases/download/v4.0/dbc-chain-4.tar.gz -O dbc_chain_linux_x64.tar.gz

tar xf dbc_chain_linux_x64.tar.gz
tar xf dbc_chain_linux_x64.tar.gz
```

### Way 2: Compiling from source code
Expand Down Expand Up @@ -94,8 +94,6 @@ Run the following command on the machine where you are running the verifier node
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9983
```
## 6. Setting the bond amount
- Open [https://www.dbcwallet.io/?rpc=wss://info1.dbcwallet.io#/accounts](https://www.dbcwallet.io/?rpc=wss://info1.dbcwallet.io#/ accounts) You will be able to see your balance:
Expand Down
5 changes: 3 additions & 2 deletions docs/en/staking-model/dbc-chain-upgrade.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# DBC-Chain verification node upgrade

# DBC-Chain verification node upgrade

> Note:In order to maintain the stability of block production and prevent the penalty mechanism from being triggered due to excessive node offline during the upgrade process, it is recommended that you stop participating in the super node election before upgrading the node, and then continue to participate in the election after the upgrade is completed.
> Note: It is best to use ubuntu22.04 and above for the system
## 1. Get the new dbc-chain binary

### Method 1: Use precompiled version
Expand Down Expand Up @@ -86,6 +86,7 @@ tail -f dbc_node.log
```
## 4. Use script to assist automatic restart
```shell
cat <<EOF > start.sh
#!/usr/bin/env sh
Expand Down
1 change: 0 additions & 1 deletion docs/en/staking-model/generate-new-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Secret phrase `final huge obscure action vacuum public banner autumn remove clos

> Install `subkey` and other flags, please reference:[https://substrate.dev/docs/en/knowledgebase/integrate/subkey](https://substrate.dev/docs/en/knowledgebase/integrate/subkey)

## How to convert `secret phrase` to `private key`

Some operations on the chain sometimes need to be signed with a private key. When the mnemonic phrase is saved, you can use subkey to convert the mnemonic phrase into a private key.
Expand Down
5 changes: 2 additions & 3 deletions docs/en/staking-model/run-archive-node_en.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# How to run a synchronization node?


## 1. Configure environment

### 1.1 Use precompiled version

```bash
sudo mkdir dbc-chain-mainnet && cd dbc-chain-mainnet
wget https://github.com/DeepBrainChain/DeepBrainChain-MainChain/releases/download/v3.3/dbc_chain_linux_x64.tar.gz -O dbc_chain_linux_x64.tar.gz
tar xf dbc_chain_linux_x64.tar.gz
tar xf dbc_chain_linux_x64.tar.gz
```

### 1.2 Manual compilation
Expand Down Expand Up @@ -54,7 +53,7 @@ cargo build --release
> ```
>
> When encountering the phenomenon of 0 peers during synchronization, you need to specify bootnodes for synchronization. Old users can find it by querying the previous synchronization node logs. New users can try to specify
> ```` --bootnodes /ip4/122.99.183.53/tcp/3308/p2p/12D3KooWDx4pgzT2RAPF12QkmiBZy6BUsTtPt7JgiYxgFm6Z5Hc5````
> ` --bootnodes /ip4/122.99.183.53/tcp/3308/p2p/12D3KooWDx4pgzT2RAPF12QkmiBZy6BUsTtPt7JgiYxgFm6Z5Hc5`
## 3. Runtime Error Solution
Expand Down
Loading

0 comments on commit b60933a

Please sign in to comment.