Skip to content

Commit e015693

Browse files
authored
Merge pull request #296 from filecoin-project/fatman13-patch1
docs: add en client config docs
2 parents c2a9a40 + 608002c commit e015693

File tree

2 files changed

+185
-22
lines changed

2 files changed

+185
-22
lines changed
+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Market Client Configurations
2+
3+
A typical configuration of `market-client` is as follows...
4+
5+
```
6+
7+
Simultaneous Transfers For Retrieval = 20
8+
Simultaneous Transfers For Storage = 20
9+
10+
[Default MarketAddress]
11+
Addr = "t3qkgm5h7nmusacfggd744w7fdj45rn6iyl7n6s6lr34t4qlfebiphmm3vxtwc4a4acqi4nv3pqk6h7ddqqz5q"
12+
Account = ""
13+
14+
[API]
15+
ListenAddress = "/ip4/127.0.0.1/tcp/41231/ws"
16+
RemoteListenAddress = ""
17+
Secret = ""
18+
Timeout = "30s"
19+
20+
[Libp2p]
21+
ListenAddresses = ["/ip4/0.0.0.0/tcp/34123", "/ip6/::/tcp/0"]
22+
AnnounceAddresses = []
23+
NoAnnounceAddresses = []
24+
PrivateKey = ""
25+
26+
[Node]
27+
Url = "/ip4/192.168.200.106/tcp/3453"
28+
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYWRtaW4iLCJwZXJtIjoiYWRtaW4iLCJleHQiOiIifQ.0fylyMSNjp8dkTrCLYkFQSjO9FokDKXrl5dqGpMDaOE"
29+
30+
[Messager]
31+
Url = ""
32+
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYWRtaW4iLCJwZXJtIjoiYWRtaW4iLCJleHQiOiIifQ.0fylyMSNjp8dkTrCLYkFQSjO9FokDKXrl5dqGpMDaOE"
33+
34+
[Signer]
35+
Type = ""
36+
Url = ""
37+
Token = ""
38+
39+
```
40+
41+
Among them, it can be divided into three parts: 1) client network configuration, 2) configuration of Venus chain service components and 3) other configurations
42+
43+
## Market Client network configuration
44+
45+
This part of the configuration determines the interface between the `market client` and external actors
46+
47+
### [API]
48+
49+
This section defines the external interface of `market-client`
50+
51+
```
52+
[API]
53+
# market-client provides the address where the service listens
54+
# String type, required, default: "/ip4/127.0.0.1/tcp/41235"
55+
ListenAddress = "/ip4/127.0.0.1/tcp/41235"
56+
57+
# reserved text
58+
RemoteListenAddress = ""
59+
60+
# key used for encrypted communication
61+
# String type, optional, automatically generated none is supplied
62+
Secret = "878f9c1f88c6f68ee7be17e5f0848c9312897b5d22ff7d89ca386ed0a583da3c"
63+
64+
# reserved text
65+
Timeout = "30s"
66+
```
67+
68+
### [Libp2p]
69+
70+
The communication address used for P2P network
71+
72+
```
73+
[Libp2p]
74+
# Listening network address
75+
# string array, required, default: ["/ip4/0.0.0.0/tcp/58418", "/ip6/::/tcp/0"]
76+
ListenAddresses = ["/ip4/0.0.0.0/tcp/58418", "/ip6/::/tcp/0"]
77+
78+
# reserved text
79+
AnnounceAddresses = []
80+
81+
# reserved text
82+
NoAnnounceAddresses = []
83+
84+
# Private key for p2p encrypted communication
85+
# string, optional, automatically generated if none is supplied
86+
PrivateKey = "08011240ae580daabbe087007d2b4db4e880af10d582215d2272669a94c49c854f36f99c35"
87+
```
88+
89+
90+
91+
## Venus Chain Service Configuration
92+
93+
When the `market-client` is connected to the `venus components`, the API of the related component needs to be configured.
94+
95+
### [Node]
96+
97+
Venus chain service access configuration
98+
99+
```
100+
[Node]
101+
# Entrance of the chain service
102+
# String type, mandatory, can also be configured directly through the --node-url flag of the command line
103+
Url = "/ip4/192.168.200.128/tcp/3453"
104+
105+
# Authentication token of Venus series components
106+
# String type, mandatory, can also be configured directly through the --auth-token flag of the command line
107+
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsInBlcm0iOiJhZG1pbiIsImV4dCI6IiJ9.PuzEy1TlAjjNiSUu_tbHi2XPUritDLm9Xf5UW3MHRe8"
108+
109+
```
110+
111+
112+
### [Messager]
113+
114+
`venus-messager` service access configuration
115+
116+
```
117+
[Messager]
118+
# Message service entry
119+
# String type, mandatory, can also be configured directly through the --messager-url flag on the command line
120+
Url = "/ip4/192.168.200.128/tcp/39812/"
121+
122+
# Authentication token of venus series components
123+
# String type, mandatory, can also be configured directly through the --auth-token flag of the command line
124+
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsInBlcm0iOiJhZG1pbiIsImV4dCI6IiJ9.PuzEy1TlAjjNiSUu_tbHi2XPUritDLm9Xf5UW3MHRe8"
125+
```
126+
127+
128+
### [Signer]
129+
130+
The Venus component that provide signing services
131+
Only signature services of `wallet` type can be used in `market-client`
132+
133+
```
134+
[Signer]
135+
# Type of signature service component
136+
# String type can only be "wallet"
137+
Type = "wallet"
138+
139+
# Signature service entry
140+
# String type, mandatory, can also be configured directly through the --signer-url flag on the command line
141+
Url = "/ip4/192.168.200.128/tcp/5678/"
142+
143+
# wallet token for authentication
144+
# string type, mandatory
145+
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsInBlcm0iOiJhZG1pbiIsImV4dCI6IiJ9.PuzEy1TlAjjNiSUu_tbHi2XPUritDLm9Xf5UW3MHRe8"
146+
```
147+
148+
149+
## Other configuration
150+
151+
```
152+
# Get the maximum number of retrieval request for simultaneous transfers
153+
# Integer type Default: 20
154+
Simultaneous Transfers For Retrieval = 20
155+
156+
# Store the maximum number of simultaneous transfers of storage deals
157+
# Integer type Default: 20
158+
Simultaneous Transfers For Storage = 20
159+
160+
# The default address of the current market-client
161+
# String type, optional, can also be configured directly through the --addr flag of the command line
162+
DefaultMarketAddress = "t3qkgm5h7nmusacfggd744w7fdj45rn6iyl7n6s6lr34t4qlfebiphmm3vxtwc4a4acqi4nv3pqk6h7ddqqz5q:username"
163+
```

docs/zh/market-client配置解释.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Market Client 配置解释
22

3-
market-client 的一份典型的配置如下
3+
`market-client` 的一份典型的配置如下
44

55
```
66
@@ -38,14 +38,14 @@ SimultaneousTransfersForStorage = 20
3838
3939
```
4040

41-
其中,可以分成三个部分: client 网络配置,venus 服务组件的配置和 其他配置
41+
其中,可以分成三个部分: `client` 网络配置,`venus` 服务组件的配置和 其他配置
4242

4343
## Market Client 网络配置
4444

45-
这部分的配置决定了venus client 和外界交互的接口
45+
这部分的配置决定了 `venus client` 和外界交互的接口
4646

4747
### [API]
48-
market-client 对外提供服务的接口
48+
`market-client` 对外提供服务的接口
4949

5050
```
5151
[API]
@@ -57,10 +57,10 @@ ListenAddress = "/ip4/127.0.0.1/tcp/41235"
5757
RemoteListenAddress = ""
5858
5959
# 密钥用于加密通信
60-
#字符串类型 可选项没有则自动生成
60+
# 字符串类型,可选项没有则自动生成
6161
Secret = "878f9c1f88c6f68ee7be17e5f0848c9312897b5d22ff7d89ca386ed0a583da3c"
6262
63-
#保留字段
63+
# 保留字段
6464
Timeout = "30s"
6565
```
6666

@@ -70,7 +70,7 @@ Timeout = "30s"
7070
```
7171
[Libp2p]
7272
# 监听的网络地址
73-
# 字符串数组 必选 默认为:["/ip4/0.0.0.0/tcp/58418", "/ip6/::/tcp/0"]
73+
# 字符串数组,必选,默认为:["/ip4/0.0.0.0/tcp/58418", "/ip6/::/tcp/0"]
7474
ListenAddresses = ["/ip4/0.0.0.0/tcp/58418", "/ip6/::/tcp/0"]
7575
7676
# 保留字段
@@ -80,64 +80,64 @@ AnnounceAddresses = []
8080
NoAnnounceAddresses = []
8181
8282
# 用于p2p加密通信的私钥
83-
# 字符串 可选(没设置则自动生成
83+
# 字符串,可选,没设置则自动生成
8484
PrivateKey = "08011240ae580daabbe087007d2b4db4e880af10d582215d2272669a94c49c854f36f99c35"
8585
```
8686

8787

8888

8989
## venus 组件服务配置
9090

91-
当market-client接入venus组件使用时,需要配置相关组件的API
91+
`market-client` 接入 `venus` 组件使用时,需要配置相关组件的 `API`
9292

9393
### [Node]
9494
venus链服务接入配置
9595
```
9696
[Node]
9797
# 链服务的入口
98-
# 字符串类型 必选(也可以直接通过命令行的--node-url flag 进行配置
98+
# 字符串类型,必选,也可以直接通过命令行的--node-url flag 进行配置
9999
Url = "/ip4/192.168.200.128/tcp/3453"
100100
101101
# venus 系列组件的鉴权token
102-
# 字符串类型 必选(也可以直接通过命令行的 --auth-token flag 进行配置
102+
# 字符串类型,必选,也可以直接通过命令行的 --auth-token flag 进行配置
103103
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsInBlcm0iOiJhZG1pbiIsImV4dCI6IiJ9.PuzEy1TlAjjNiSUu_tbHi2XPUritDLm9Xf5UW3MHRe8"
104104
105105
```
106106

107107

108108
### [Messager]
109109

110-
venus 消息服务接入配置
110+
`venus` 消息服务接入配置
111111

112112
```
113113
[Messager]
114114
# 消息服务入口
115-
# 字符串类型 必选(也可以直接通过命令行的 --messager-url flag 进行配置
115+
# 字符串类型,必选,也可以直接通过命令行的 --messager-url flag 进行配置
116116
Url = "/ip4/192.168.200.128/tcp/39812/"
117117
118118
# venus 系列组件的鉴权token
119-
# 字符串类型 必选(也可以直接通过命令行的 --auth-token flag 进行配置
119+
# 字符串类型,必选,也可以直接通过命令行的 --auth-token flag 进行配置
120120
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsInBlcm0iOiJhZG1pbiIsImV4dCI6IiJ9.PuzEy1TlAjjNiSUu_tbHi2XPUritDLm9Xf5UW3MHRe8"
121121
```
122122

123123

124124
### [Signer]
125125

126-
venus 提供签名服务的组件
127-
在 market-client 只能使用 wallet 类型的签名服务
126+
`venus` 提供签名服务的组件
127+
`market-client` 只能使用 `wallet` 类型的签名服务
128128

129129
```
130130
[Signer]
131131
# 签名服务组件的类型
132-
# 字符串类型 只能是"wallet"
132+
# 字符串类型只能是"wallet"
133133
Type = "wallet"
134134
135135
# 签名服务入口
136-
# 字符串类型 必选(也可以直接通过命令行的 --signer-url flag 进行配置
136+
# 字符串类型,必选,也可以直接通过命令行的 --signer-url flag 进行配置
137137
Url = "/ip4/192.168.200.128/tcp/5678/"
138138
139139
# wallet 用于鉴权的token
140-
# 字符串类型 必选
140+
# 字符串类型必选
141141
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsInBlcm0iOiJhZG1pbiIsImV4dCI6IiJ9.PuzEy1TlAjjNiSUu_tbHi2XPUritDLm9Xf5UW3MHRe8"
142142
```
143143

@@ -146,14 +146,14 @@ Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsIn
146146

147147
```
148148
# 获取数据订单进行同时传输的最大数量
149-
# 整数类型 默认:20
149+
# 整数类型默认:20
150150
SimultaneousTransfersForRetrieval = 20
151151
152152
# 存储订单同时进行传输的最大数量
153-
# 整数类型 默认:20
153+
# 整数类型默认:20
154154
SimultaneousTransfersForStorage = 20
155155
156156
# 当前market-client的默认地址
157-
# 字符串类型 可选 (也可以直接通过命令行的 --addr flag 进行配置
157+
# 字符串类型,可选,也可以直接通过命令行的 --addr flag 进行配置
158158
DefaultMarketAddress = "t3qkgm5h7nmusacfggd744w7fdj45rn6iyl7n6s6lr34t4qlfebiphmm3vxtwc4a4acqi4nv3pqk6h7ddqqz5q:username"
159159
```

0 commit comments

Comments
 (0)