Skip to content

Commit

Permalink
Update documentation for new flags and commands/subcommands structures
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorBenson committed Apr 16, 2024
1 parent 5dea665 commit f032c80
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 18 deletions.
41 changes: 34 additions & 7 deletions docs/Scripts/mithril-client.md
@@ -1,10 +1,37 @@
`mithril-client.sh` is a script to manage the Mithril client, a tool used to set up the Mithril client environment and manage downloading Mithril snapshots and stake distributions. The main features include:

- **environment** - Creates a new `mithril.env` file with all the necessary environment variables for the Mithril client.
- **snapshot** - Download, list all or show a specific available Mithril snapshot.
- **cardano-db** - Download, list all or show a specific available Mithril snapshot.
- **stake-distribution** - Download or list available Mithril stake distributions.
- **-u** - Skip script update check.

## Usage

```bash
Usage: bash [-u] <command> <subcommand> [<sub arg>]
A script to run Cardano Mithril Client

-u Skip script update check overriding UPDATE_CHECK value in env (must be first argument to script)

Commands:
environment Manage mithril environment file
setup Setup mithril environment file
override Override default variable in the mithril environment file
update Update mithril environment file
cardano-db Interact with Cardano DB
download Download Cardano DB from Mithril snapshot
snapshot Interact with Mithril snapshots
list List available Mithril snapshots
json List availble Mithril snapshots in JSON format
show Show details of a Mithril snapshot
json Show details of a Mithril snapshot in JSON format
stake-distribution Interact with Mithril stake distributions
download Download latest stake distribution
list List available stake distributions
json Output latest Mithril snapshot in JSON format

```

## Preparing a Relay or Block Producer Node

To prepare a relay or block producer node, you should follow these steps:
Expand All @@ -18,7 +45,7 @@ To prepare a relay or block producer node, you should follow these steps:
2. **Download the latest Mithril snapshot:** Once the environment file is set up, you can download the latest Mithril snapshot by running the script with the `snapshot download` command. This snapshot contains the latest state of the Cardano blockchain db from a Mithril Aggregator.

```bash
./mithril-client.sh snapshot download
./mithril-client.sh cardano-db download
```

## Investigating Available Snapshots
Expand All @@ -28,16 +55,16 @@ You can investigate the available snapshots by using the `snapshot list` and `sn
- **List all available Mithril snapshots:** You can list all available Mithril snapshots by running the script with the `snapshot list` command. Add `json` at the end to get the output in JSON format.

```bash
./mithril-client.sh snapshot list
./mithril-client.sh snapshot list json
./mithril-client.sh cardano-dbsnapshot list
./mithril-client.sh cardano-dbsnapshot list json
```

- **Show details of a specific Mithril snapshot:** You can show details of a specific Mithril snapshot by running the script with the `snapshot show <DIGEST>` command, where `<DIGEST>` is the digest of the snapshot. Add `json` at the end to get the output in JSON format.

```bash
./mithril-client.sh snapshot show <DIGEST>
./mithril-client.sh snapshot show <DIGEST> json
./mithril-client.sh snapshot show json <DIGEST>
./mithril-client.sh cardano-dbsnapshot show <DIGEST>
./mithril-client.sh cardano-dbsnapshot show <DIGEST> json
./mithril-client.sh cardano-dbsnapshot show json <DIGEST>
```

## Managing Stake Distributions
Expand Down
11 changes: 6 additions & 5 deletions docs/Scripts/mithril-relay.md
Expand Up @@ -7,12 +7,13 @@ loadbalancer. It provides functionalities such as:
## Usage

```bash
Usage: mithril-relay.sh [-d] [-l]
bash [-d] [-l] [-u] [-h]
A script to setup Cardano Mithril relays

Options:
-d Install squid and configure as a relay
-l Install nginx and configure as a load balancer
-h Show this help text
-d Install squid and configure as a relay
-l Install nginx and configure as a load balancer
-u Skip update check
-h Show this help text
```

# Description
Expand Down
17 changes: 11 additions & 6 deletions docs/Scripts/mithril-signer.md
Expand Up @@ -5,12 +5,17 @@ environment file to contain variables specific to the Mithril Signer.
## Usage

```bash
Usage: mithril-signer.sh [-d] [-u]

Options:
-d Deploy mithril-signer as a systemd service
-u Update mithril environment file
-h Show this help text
Usage: bash [-d] [-D] [-e] [-k] [-r] [-s] [-u] [-h]
A script to setup, run and verify Cardano Mithril Signer

-d Deploy mithril-signer as a systemd service
-D Run mithril-signer as a daemon
-e Update mithril environment file
-k Stop signer using SIGINT
-r Verify signer registration
-s Verify signer signature
-u Skip update check
-h Show this help text
```

# Description
Expand Down

0 comments on commit f032c80

Please sign in to comment.