Skip to content

Commit d89ebb1

Browse files
committed
fix peer node cmd preamble/postscript
This CR updates the preamble and postscript associated with peer node cmd doc. FAB-16218 #done Change-Id: I9e56b1f71f0845240e11083518f79c93084fa5d4 Signed-off-by: senthil <cendhu@gmail.com>
1 parent 153548a commit d89ebb1

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed

docs/source/commands/peernode.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# peer node
22

3-
The `peer node` command allows an administrator to start a peer node.
3+
The `peer node` command allows an administrator to start a peer node,
4+
reset all channels in a peer to the genesis block, or rollback a
5+
channel to a given block number.
46

57
## Syntax
68

7-
The `peer node` command has the following subcommand:
9+
The `peer node` command has the following subcommands:
810

911
* start
12+
* reset
13+
* rollback
1014

1115
## peer node start
1216
```
@@ -60,4 +64,22 @@ starts a peer node in chaincode development mode. Normally chaincode containers
6064
and maintained by peer. However in chaincode development mode, chaincode is built and started by the user. This mode is useful during chaincode development phase for iterative development.
6165
See more information on development mode in the [chaincode tutorial](../chaincode4ade.html).
6266

67+
### peer node reset example
68+
69+
```
70+
peer node reset
71+
```
72+
73+
resets all channels in the peer to the genesis block, i.e., the first block in the channel. The command also records the pre-reset height of each channel in the file system. Note that the peer process should be stopped while executing this command. If the peer process is running, this command detects that and returns an error instead of performing the reset. When the peer is started after performing the reset, the peer will fetch the blocks for each channel which were removed by the reset command (either from other peers or orderers) and commit the blocks up to the pre-reset height. Until all channels reach the pre-reset height, the peer will not endorse any transactions.
74+
75+
### peer node rollback example
76+
77+
The following command:
78+
79+
```
80+
peer node rollback -c ch1 -b 150
81+
```
82+
83+
rolls back the channel ch1 to block number 150. The command also records the pre-rolled back height of channel ch1 in the file system. Note that the peer should be stopped while executing this command. If the peer process is running, this command detects that and returns an error instead of performing the rollback. When the peer is started after performing the rollback, the peer will fetch the blocks for channel ch1 which were removed by the rollback command (either from other peers or orderers) and commit the blocks up to the pre-rolled back height. Until the channel ch1 reaches the pre-rolled back height, the peer will not endorse any transaction for any channel.
84+
6385
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.

docs/wrappers/peer_node_postscript.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,22 @@ starts a peer node in chaincode development mode. Normally chaincode containers
1212
and maintained by peer. However in chaincode development mode, chaincode is built and started by the user. This mode is useful during chaincode development phase for iterative development.
1313
See more information on development mode in the [chaincode tutorial](../chaincode4ade.html).
1414

15+
### peer node reset example
16+
17+
```
18+
peer node reset
19+
```
20+
21+
resets all channels in the peer to the genesis block, i.e., the first block in the channel. The command also records the pre-reset height of each channel in the file system. Note that the peer process should be stopped while executing this command. If the peer process is running, this command detects that and returns an error instead of performing the reset. When the peer is started after performing the reset, the peer will fetch the blocks for each channel which were removed by the reset command (either from other peers or orderers) and commit the blocks up to the pre-reset height. Until all channels reach the pre-reset height, the peer will not endorse any transactions.
22+
23+
### peer node rollback example
24+
25+
The following command:
26+
27+
```
28+
peer node rollback -c ch1 -b 150
29+
```
30+
31+
rolls back the channel ch1 to block number 150. The command also records the pre-rolled back height of channel ch1 in the file system. Note that the peer should be stopped while executing this command. If the peer process is running, this command detects that and returns an error instead of performing the rollback. When the peer is started after performing the rollback, the peer will fetch the blocks for channel ch1 which were removed by the rollback command (either from other peers or orderers) and commit the blocks up to the pre-rolled back height. Until the channel ch1 reaches the pre-rolled back height, the peer will not endorse any transaction for any channel.
32+
1533
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.

docs/wrappers/peer_node_preamble.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# peer node
22

3-
The `peer node` command allows an administrator to start a peer node.
3+
The `peer node` command allows an administrator to start a peer node,
4+
reset all channels in a peer to the genesis block, or rollback a
5+
channel to a given block number.
46

57
## Syntax
68

7-
The `peer node` command has the following subcommand:
9+
The `peer node` command has the following subcommands:
810

911
* start
12+
* reset
13+
* rollback

0 commit comments

Comments
 (0)