sawnet

The sawnet command is used to interact with an entire network of Sawtooth nodes.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
usage: sawnet [-h] [-v] [-V] {compare-chains} ...

Inspect status of a sawtooth network

optional arguments:
  -h, --help        show this help message and exit
  -v, --verbose     enable more verbose output
  -V, --version     display version information

subcommands:
  {compare-chains}
    compare-chains  Compare chains from different nodes.

sawnet compare-chains

The sawnet compare-chains subcommand compares chains across the specified nodes.

 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
40
41
42
43
44
45
46
usage: sawnet compare-chains [-h] [-v] [-V] [--users USERNAME[:PASSWORD]]
                             [--table] [--tree]
                             urls [urls ...]

Compute and display information about how the chains at different nodes differ.

positional arguments:
  urls                  The URLs of the validator's REST APIs of interest,
                        separated by commas or spaces. (no default)

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         enable more verbose output
  -V, --version         display version information
  --users USERNAME[:PASSWORD]
                        Specify the users to authorize requests, in the same
                        order as the URLs, separate by commas. Passing empty
                        strings between commas is supported.
  --table               Print out a fork table for all nodes since the common
                        ancestor.
  --tree                Print out a fork tree for all nodes since the common
                        ancestor.

By default, prints a table of summary data and a table of per-node data with
the following fields. Pass --tree for a fork graph.

COMMON ANCESTOR
    The most recent block that all chains have in common.

COMMON HEIGHT
    Let min_height := the minimum height of any chain across all nodes passed
    in. COMMON HEIGHT = min_height.

HEAD
    The block id of the most recent block on a given chain.

HEIGHT
    The block number of the most recent block on a given chain.

LAG
    Let max_height := the maximum height of any chain across all nodes passed
    in. LAG = max_height - HEIGHT for a given chain.

DIVERG
    Let common_ancestor_height := the height of the COMMON ANCESTOR.
    DIVERG = HEIGHT - common_ancestor_height