sawtooth-validatorΒΆ

The sawtooth-validator command controls the behavior of the validator.

A validator is the component ultimately responsible for validating batches of transactions, combining them into blocks, maintaining consensus with the network, and coordinating communication between clients, other validators, and transaction processors. Much of the actual validation is delegated to other components, such as transaction processors and the active consensus module.

Note the following options, which provide several ways to configure the validator.

  • Use the --peering option to set the peering type to dynamic or static.
    • If set to static, use the --peers option to list the URLs of all peers that the validator should connect to, using the format tcp://hostname:port. Specify multiple peer URLs in a comma-separated list.
    • If set to dynamic, any static peers will be processed first, before starting the topology buildout starting, then the URLs specified by --seeds will be used for the initial connection to the validator network.
  • Use --scheduler to set the scheduler type to serial or parallel. Note that both scheduler types result in the same deterministic results and are completely interchangeable. However, parallel processing of transactions provides a performance improvement even for fast transaction workloads by reducing the overall latency effects that occur when transactions are processed serially.
  • Use --network-auth to specify the required authorization procedure (trust or challenge) that validator connections must go through before they are allowed to participate on the network. To use network permissions, specify challenge, which requires connections to sign a challenge so their identity can be proved.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
usage: sawtooth-validator [-h] [--config-dir CONFIG_DIR] [-B BIND]
                          [-P {static,dynamic}] [-E ENDPOINT] [-s SEEDS]
                          [-p PEERS] [-v] [--scheduler {serial,parallel}]
                          [--network-auth {trust,challenge}]
                          [--opentsdb-url OPENTSDB_URL]
                          [--opentsdb-db OPENTSDB_DB]
                          [--minimum-peer-connectivity MINIMUM_PEER_CONNECTIVITY]
                          [--maximum-peer-connectivity MAXIMUM_PEER_CONNECTIVITY]
                          [-V]

Configures and starts a Sawtooth validator.

optional arguments:
  -h, --help            show this help message and exit
  --config-dir CONFIG_DIR
                        specify the configuration directory
  -B BIND, --bind BIND  set the URL for the network or validator component service endpoints with the format network:<endpoint> or component:<endpoint>. Use two --bind options to specify both endpoints.
  -P {static,dynamic}, --peering {static,dynamic}
                        determine peering type for the validator: 'static' (must use --peers to list peers) or 'dynamic' (processes any static peers first, then starts topology buildout).
  -E ENDPOINT, --endpoint ENDPOINT
                        specifies the advertised network endpoint URL
  -s SEEDS, --seeds SEEDS
                        provide URI(s) for the initial connection to the validator network, in the format tcp://<hostname>:<port>. Specify multiple URIs in a comma-separated list. Repeating the --seeds option is also accepted.
  -p PEERS, --peers PEERS
                        list static peers to attempt to connect to in the format tcp://<hostname>:<port>. Specify multiple peers in a comma-separated list. Repeating the --peers option is also accepted.
  -v, --verbose         enable more verbose output to stderr
  --scheduler {serial,parallel}
                        set scheduler type: serial or parallel
  --network-auth {trust,challenge}
                        identify type of authorization required to join validator network.
  --opentsdb-url OPENTSDB_URL
                        specify host and port for Open TSDB database                         used for metrics
  --opentsdb-db OPENTSDB_DB
                        specify name of database used for storing                         metrics
  --minimum-peer-connectivity MINIMUM_PEER_CONNECTIVITY
                        set the minimum number of peers required before                         stopping peer search
  --maximum-peer-connectivity MAXIMUM_PEER_CONNECTIVITY
                        set the maximum number of peers to accept
  -V, --version         display version information