Skip to content

Commit 2d946a9

Browse files
committed
finish blockchain cli
1 parent bbb3cef commit 2d946a9

File tree

8 files changed

+4154
-8
lines changed

8 files changed

+4154
-8
lines changed

docs/nodes/usage/mvc-cli/blockchain.md

+1,047-1
Large diffs are not rendered by default.

docs/nodes/usage/mvc-cli/control.md

+152-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,152 @@
1-
# Control Group
1+
# Control
2+
3+
Control the startup and shutdown of nodes and monitoring information.
4+
5+
You can use `mvc-cli help command` to view the usage of specific commands. The JsonRpc call method is in the example.
6+
7+
## Commands
8+
9+
```text
10+
== Control ==
11+
activezmqnotifications
12+
getinfo
13+
getmemoryinfo
14+
help ( "command" )
15+
stop
16+
uptime
17+
```
18+
19+
## activezmqnotifications
20+
21+
获取当前节点的ZMQ通知状态,开放哪些端口,以及对应的地址等信息。
22+
23+
```text
24+
activezmqnotifications
25+
Get the active zmq notifications and their addresses
26+
27+
Result:
28+
[ (array) active zmq notifications
29+
{
30+
"notification": "xxxx", (string) name of zmq notification
31+
"address": "xxxx" (string) address of zmq notification
32+
}, ...
33+
]
34+
35+
Examples:
36+
> mvc-cli activezmqnotifications
37+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "activezmqnotifications", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9882/
38+
```
39+
40+
## getinfo
41+
42+
> Deprecated
43+
44+
获取当前节点的信息,包括版本、区块高度、连接数等。
45+
46+
```text
47+
getinfo
48+
49+
DEPRECATED. Returns an object containing various state info.
50+
51+
Result:
52+
{
53+
"version": xxxxx, (numeric) the server version
54+
"protocolversion": xxxxx, (numeric) the protocol version
55+
"walletversion": xxxxx, (numeric) the wallet version
56+
"balance": xxxxxxx, (numeric) the total mvc balance of the wallet
57+
"blocks": xxxxxx, (numeric) the current number of blocks processed in the server
58+
"timeoffset": xxxxx, (numeric) the time offset
59+
"connections": xxxxx, (numeric) the number of connections
60+
"proxy": "host:port", (string, optional) the proxy used by the server
61+
"difficulty": xxxxxx, (numeric) the current difficulty
62+
"testnet": true|false, (boolean) if the server is using testnet or not
63+
"keypoololdest": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool
64+
"keypoolsize": xxxx, (numeric) how many new keys are pre-generated
65+
"unlocked_until": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked
66+
"paytxfee": x.xxxx, (numeric) the transaction fee set in SPACE/kB
67+
"relayfee": x.xxxx, (numeric) minimum relay fee for non-free transactions in SPACE/kB
68+
"errors": "...", (string) any error messages
69+
"maxblocksize": xxxxx, (numeric) The absolute maximum block size we will accept from any source
70+
"maxminedblocksize": xxxxx (numeric) The maximum block size we will mine
71+
"maxstackmemoryusagepolicy": xxxxx, (numeric) Policy value of max stack memory usage
72+
"maxStackMemoryUsageConsensus": xxxxx, (numeric) Consensus value of max stack memory usage
73+
}
74+
75+
Examples:
76+
> mvc-cli getinfo
77+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9882/
78+
```
79+
80+
## getmemoryinfo
81+
82+
获取当前节点的内存池使用情况。
83+
84+
```text
85+
getmemoryinfo
86+
Returns an object containing information about memory usage.
87+
88+
Result:
89+
{
90+
"locked": { (json object) Information about locked memory manager
91+
"used": xxxxx, (numeric) Number of bytes used
92+
"free": xxxxx, (numeric) Number of bytes available in current arenas
93+
"total": xxxxxxx, (numeric) Total number of bytes managed
94+
"locked": xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.
95+
"chunks_used": xxxxx, (numeric) Number allocated chunks
96+
"chunks_free": xxxxx, (numeric) Number unused chunks
97+
}
98+
}
99+
100+
Examples:
101+
> mvc-cli getmemoryinfo
102+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9882/
103+
```
104+
105+
## help
106+
107+
获取帮助信息。
108+
109+
```text
110+
help ( "command" )
111+
112+
List all commands, or get help for a specified command.
113+
114+
Arguments:
115+
1. "command" (string, optional) The command to get help on
116+
117+
Result:
118+
"text" (string) The help text
119+
120+
Examples:
121+
122+
> mvc-cli help
123+
> mvc-cli help "getmemoryinfo"
124+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "help", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9882/
125+
```
126+
127+
## stop
128+
129+
停止当前节点。
130+
131+
```text
132+
stop
133+
134+
Stop MVC server.
135+
```
136+
137+
## uptime
138+
139+
获取当前节点的运行时间。
140+
141+
```text
142+
uptime
143+
144+
Returns the total uptime of the server.
145+
146+
Result:
147+
ttt (numeric) The number of seconds that the server has been running
148+
149+
Examples:
150+
> mvc-cli uptime
151+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "uptime", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9882/
152+
```
+73-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,73 @@
1-
# Generating Group
1+
# Generating
2+
3+
Try mining with the node.
4+
5+
> Not recommended for production, please refer to the mining guide if you are mining on the mainnet
6+
7+
You can use `mvc-cli help command` to view the usage of specific commands. The JsonRpc call method is in the example.
8+
9+
## Commands
10+
11+
```text
12+
== Generating ==
13+
generate nblocks ( maxtries )
14+
generatetoaddress nblocks address (maxtries)
15+
```
16+
17+
## generate
18+
19+
尝试在节点上挖矿,生成指定数量的区块。
20+
21+
参数:
22+
23+
- `nblocks` (numeric, required) 要生成的区块数量。
24+
- `maxtries` (numeric, optional) 最大尝试次数(默认为1000000)。
25+
26+
```text
27+
generate nblocks ( maxtries )
28+
29+
Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.
30+
31+
Arguments:
32+
1. nblocks (numeric, required) How many blocks are generated immediately.
33+
2. maxtries (numeric, optional) How many iterations to try (default = 1000000).
34+
35+
Result:
36+
[ blockhashes ] (array) hashes of blocks generated
37+
38+
Examples:
39+
40+
Generate 11 blocks
41+
> mvc-cli generate 11
42+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "generate", "params": [11] }' -H 'content-type: text/plain;' http://127.0.0.1:9882/
43+
```
44+
45+
## generatetoaddress
46+
47+
尝试在节点上挖矿,生成指定数量的区块,并将奖励发送到指定地址。
48+
49+
参数:
50+
51+
- `nblocks` (numeric, required) 要生成的区块数量。
52+
- `address` (string, required) 奖励发送到的地址。
53+
- `maxtries` (numeric, optional) 最大尝试次数(默认为1000000)。
54+
55+
```text
56+
generatetoaddress nblocks address (maxtries)
57+
58+
Mine blocks immediately to a specified address (before the RPC call returns)
59+
60+
Arguments:
61+
1. nblocks (numeric, required) How many blocks are generated immediately.
62+
2. address (string, required) The address to send the newly generated mvc to.
63+
3. maxtries (numeric, optional) How many iterations to try (default = 1000000).
64+
65+
Result:
66+
[ blockhashes ] (array) hashes of blocks generated
67+
68+
Examples:
69+
70+
Generate 11 blocks to myaddress
71+
> mvc-cli generatetoaddress 11 "myaddress"
72+
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "generatetoaddress", "params": [11, "myaddress"] }' -H 'content-type: text/plain;' http://127.0.0.1:9882/
73+
```

0 commit comments

Comments
 (0)