2
2
3
3
This document contains tutorials demonstrating how to accomplish common tasks using CLI.
4
4
5
+ - Please configure the CLI before using (see [ CLI Configuration] ( #cli-configuration ) section).
6
+ - If write requests to the Ledger needs to be sent, please make sure that you have
7
+ an Account created on the Ledger with an appropriate role (see [ Getting Account] ( #getting-account ) section in [ how-to.md] ( how-to.md ) ).
8
+ - Sending read requests to the Ledger doesn't require an Account (Ledger is public for reads).
9
+ - A full list of all CLI commands can be found there: [ cli-help] ( cli-help.md ) .
10
+ - After the CLI is configured and Account with an appropriate role is created,
11
+ the following instructions can be used for every actor (see [ Use Case Diagrams] ( use_cases ) ):
12
+ - [ Trustee] ( #trustee-instructions )
13
+ - create and approve new accounts
14
+ - approve X509 root certificates
15
+ - publish X509 certificates
16
+ - [ CA] ( #ca-instructions )
17
+ - propose X509 root certificates
18
+ - [ Vendor] ( #vendor-instructions )
19
+ - publish device model info
20
+ - publish X509 certificates
21
+ - [ Test House] ( #test-house-instructions )
22
+ - publish compliance test results
23
+ - publish X509 certificates
24
+ - [ ZB Certification Center] ( #certification-center-instructions )
25
+ - certify or revoke certification of device models
26
+ - publish X509 certificates
27
+ - [ Node Admin] ( #node-admin-instructions-setting-up-a-new-validator-node )
28
+ - add a new Validator node
29
+ - publish X509 certificates
30
+
5
31
### CLI Configuration
6
32
7
33
CLI configuration file can be created or updated by executing of the command: ` zblcli config <key> [value] ` .
@@ -14,15 +40,27 @@ Here is the list of supported settings:
14
40
* trace <bool > - Print out full stack trace on errors.
15
41
* broadcast-mode <mode > - Write transaction broadcast mode to use (one of: ` sync ` , ` async ` , ` block ` . ` block ` is default).
16
42
43
+ In order to connect the CLI to the ZB Ledger Demo Pool, the following parameters should be used:
44
+
45
+ * ` zblcli config chain-id zblchain `
46
+ * ` zblcli config output json ` - Output format (text/json).
47
+ * ` zblcli config indent true ` - Add indent to JSON response.
48
+ * ` zblcli config trust-node false ` - Verify proofs for node responses.
49
+ * ` zblcli config node <ip address> ` - Address of a node to connect.
50
+ Choose one of the listed in ` persistent_peers.txt ` file.
51
+ Example: ` tcp://18.157.114.34:26657 ` .
52
+
53
+
17
54
### Getting Account
18
55
Ledger is public for read which means that anyone can read from the Ledger without a need to have
19
56
an Account but it is private for write.
20
57
In order to send write transactions to the ledger you need:
21
- - Have a private/public key pair.
22
- - Have an Account created on the ledger via ` ACCOUNT ` transaction (see [ Use Case Txn Auth] ( use_cases_txn_auth.puml ) ).
23
- - The Account stores the public part of the key
24
- - The Account has an associated role. The role is used for authorization policies (see [ Auth Map] ( auth_map.md ) ).
25
- - Sign every transaction by the private key.
58
+
59
+ - Have a private/public key pair.
60
+ - Have an Account created on the ledger via ` ACCOUNT ` transaction (see [ Use Case Txn Auth] ( use_cases/use_cases_txn_auth.puml ) ).
61
+ - The Account stores the public part of the key
62
+ - The Account has an associated role. The role is used for authorization policies.
63
+ - Sign every transaction by the private key.
26
64
27
65
Here is steps for getting an account:
28
66
* Generate keys and local account: ` zblcli keys add <name> ` .
@@ -37,12 +75,27 @@ Example:
37
75
* ` zblcli tx authz assign-role --address=cosmos1sug8cquqnn5jddkqt4ud6hcr290sn4wh96x5tv --role="NodeAdmin" --from trustee `
38
76
* ` zblcli query authnext account --address=cosmos1sug8cquqnn5jddkqt4ud6hcr290sn4wh96x5tv `
39
77
40
- ### Setting up a new Validator Node
78
+ ### Trustee Instructions
79
+
80
+ ### CA instructions
81
+
82
+ ### Vendor Instructions
83
+
84
+ ### Test House Instructions
85
+
86
+ ### Certification Center Instructions
87
+
88
+
89
+
90
+ ### Node Admin instructions (Setting up a new Validator Node)
41
91
42
92
Validators are responsible for committing of new blocks to the ledger.
43
93
Here are steps for setting up a new validator node.
44
94
45
- * Firstly you have to posses an account with ` NodeAdmin ` role on the ledger. See [ Getting Account] ( getting-account ) :
95
+ A more detailed instruction on how to add a validator node to the current ZB Ledger pool
96
+ can be found here: [ running-node.md] ( running-node.md ) .
97
+
98
+ * Firstly you have to posses an account with ` NodeAdmin ` role on the ledger. See [ Getting Account] ( #getting-account ) :
46
99
47
100
* Initialize the node and create the necessary config files:
48
101
* Init Node: ` zbld init <node name> --chain-id <chain id> ` .
0 commit comments