Skip to content

Commit 025ce3c

Browse files
committed
Update current documentation
1 parent 5afc6fc commit 025ce3c

File tree

4 files changed

+100
-18
lines changed

4 files changed

+100
-18
lines changed

docs/website/versioned_docs/version-maintained/glossary.md

+6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ A Cardano node is a node that runs in a [Cardano network](#cardano-network). The
2424

2525
A Cardano key pair is an asymmetric key pair used to identify a [stake pool operator](#stake-pool-operator-spo) on the [Cardano network](#cardano-network).
2626

27+
## Cardano transaction
28+
29+
A Cardano transaction proof is a cryptographic proof that a sub-set of Cardano transactions is included in the Cardano transactions set. It is generated upon request from a [Mithril client](#mithril-client) and is signed by a [certificate](#certificate).
30+
31+
A Cardano transactions set commitment represents, in a succinct way, the Cardano transactions set that was signed by Mithril at a given [Beacon](#beacon).
32+
2733
## Certificate
2834

2935
The Mithril aggregator combines the produced [multi-signature](#multi-signature) and some metadata into a Mithril certificate that will be later used by the [Mithril client](#mithril-client) to verify the authenticity of a [snapshot](#snapshot). The certificates are chained so that the [stake distribution](#stake-distribution) used to create the signatures is verifiably genuine.

docs/website/versioned_docs/version-maintained/manual/developer-docs/nodes/mithril-client-library-wasm.md

+31
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Mithril client library WASM can be used by Javascript developers to use the Mith
1414
It is responsible for handling the different types of data certified by Mithril, and available through a Mithril aggregator:
1515
- [**Snapshot**](../../../glossary.md#snapshot): list and get.
1616
- [**Mithril stake distribution**](../../../glossary.md#stake-distribution): list and get.
17+
- [**Cardano transaction**](../../../glossary.md#cardano-transaction): list & get commitments, get proofs
1718
- [**Certificate**](../../../glossary.md#certificate): list, get, and chain validation.
1819

1920
:::
@@ -113,6 +114,36 @@ let valid_stake_distribution_message = await client.verify_message_match_certifi
113114
console.log("valid_stake_distribution_message:", valid_stake_distribution_message);
114115
```
115116

117+
If the aggregator signs **CardanoTransactions**, you can add the code below to the previous example:
118+
119+
:::tip
120+
121+
You can verify that the aggregator signs **CardanoTransactions** by running the command below:
122+
123+
```bash
124+
wget -q -O - YOUR_AGGREGATOR_ENDPOINT | jq '.capabilities.signed_entity_types | contains(["CardanoTransactions"])'
125+
```
126+
127+
For example with the aggregator on `testing-sanchonet` Mithril network:
128+
129+
```bash
130+
wget -q -O - https://aggregator.testing-sanchonet.api.mithril.network/aggregator | jq '.capabilities.signed_entity_types | contains(["CardanoTransactions"])'
131+
```
132+
133+
:::
134+
135+
```js
136+
const proof = await client.unstable.get_cardano_transaction_proofs(["CARDANO_TRANSACTION_HASH_1", "CARDANO_TRANSACTION_HASH_2"]);
137+
console.log("Proof tx hash", proof.transactions_hashes);
138+
console.log("Proof certificate hash", proof.certificate_hash);
139+
140+
let proof_certificate = await client.verify_certificate_chain(proof.certificate_hash);
141+
console.log("verify_certificate_chain OK, last_certificate_from_chain:", proof_certificate);
142+
143+
let valid_cardano_transaction_proof = await client.unstable.verify_cardano_transaction_proof_then_compute_message(proof, proof_certificate);
144+
console.log("valid_cardano_transaction_proof:", valid_cardano_transaction_proof);
145+
```
146+
116147
:::tip
117148

118149
You can read the complete [Rust developer documentation](https://mithril.network/rust-doc/mithril_client_wasm/index.html).

docs/website/versioned_docs/version-maintained/manual/developer-docs/nodes/mithril-client.md

+59-14
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ Mithril client is responsible for restoring the **Cardano** blockchain on an emp
1515

1616
:::tip
1717

18-
* For more information about the **Mithril network**, please see the [architecture](../../../mithril/mithril-network/architecture.md) overview.
18+
* For more information about the **Mithril network**, please see
19+
the [architecture](../../../mithril/mithril-network/architecture.md) overview.
1920

20-
* For more information about the **Mithril client** node, please see [this overview](../../../mithril/mithril-network/client.md).
21+
* For more information about the **Mithril client** node, please
22+
see [this overview](../../../mithril/mithril-network/client.md).
2123

2224
* Check out the [`Bootstrap a Cardano node`](../../getting-started/bootstrap-cardano-node.md) guide.
2325

@@ -29,7 +31,6 @@ Mithril client is responsible for restoring the **Cardano** blockchain on an emp
2931

3032
:::
3133

32-
3334
## Resources
3435

3536
| Node | Source repository | Rust documentation | Docker packages |
@@ -38,7 +39,8 @@ Mithril client is responsible for restoring the **Cardano** blockchain on an emp
3839

3940
## Pre-requisites
4041

41-
* Install the latest stable version of the [correctly configured](https://www.rust-lang.org/learn/get-started) Rust toolchain.
42+
* Install the latest stable version of the [correctly configured](https://www.rust-lang.org/learn/get-started) Rust
43+
toolchain.
4244

4345
* Install OpenSSL development libraries. For example, on Ubuntu/Debian/Mint, run `apt install libssl-dev`
4446

@@ -64,7 +66,7 @@ Switch to the desired branch/tag:
6466
git checkout **YOUR_BUILD_BRANCH_OR_TAG**
6567
```
6668

67-
Change the directory:
69+
Change the directory:
6870

6971
```bash
7072
cd mithril/mithril-client-cli
@@ -119,14 +121,15 @@ Display the help menu:
119121
You should see:
120122

121123
```bash
122-
This program shows, downloads, and verifies certified blockchain artifacts.
124+
This program shows, downloads and verifies certified blockchain artifacts.
123125

124-
Usage: mithril-client-cli [OPTIONS] <COMMAND>
126+
Usage: mithril-client [OPTIONS] <COMMAND>
125127

126128
Commands:
127-
snapshot Snapshot commands
128-
mithril-stake-distribution Mithril stake distribution management (alias: msd)
129-
help Print this message or the help for the given subcommand(s)
129+
snapshot Snapshot management
130+
mithril-stake-distribution Mithril Stake Distribution management (alias: msd)
131+
cardano-transaction [unstable] Cardano transactions management (alias: ctx)
132+
help Print this message or the help of the given subcommand(s)
130133

131134
Options:
132135
--run-mode <RUN_MODE>
@@ -136,17 +139,18 @@ Options:
136139
--config-directory <CONFIG_DIRECTORY>
137140
Directory where configuration file is located [default: ./config]
138141
--aggregator-endpoint <AGGREGATOR_ENDPOINT>
139-
Override configuration Aggregator endpoint URL
142+
Override configuration Aggregator endpoint URL [env: AGGREGATOR_ENDPOINT=]
140143
--log-format-json
141144
Enable JSON output for logs displayed according to verbosity level
142145
--log-output <LOG_OUTPUT>
143146
Redirect the logs to a file
147+
--unstable
148+
Enable unstable commands (such as Cardano Transactions)
144149
-h, --help
145150
Print help
146151
-V, --version
147152
Print version
148153

149-
150154
```
151155

152156
Run in release mode with the default configuration:
@@ -196,7 +200,8 @@ If you wish to delve deeper and access several levels of logs from the Mithril c
196200

197201
### Registry image
198202

199-
A list of available images on the registry can be found [here](https://github.com/input-output-hk/mithril/pkgs/container/mithril-client).
203+
A list of available images on the registry can be
204+
found [here](https://github.com/input-output-hk/mithril/pkgs/container/mithril-client).
200205

201206
To prepare the environment variables, retrieve the values from the above **Mithril networks** table.
202207

@@ -246,6 +251,15 @@ mithril_client mithril-stake-distribution list
246251

247252
# 6- Download and verify the given Mithril stake distribution
248253
mithril_client mithril-stake-distribution download $MITHRIL_STAKE_DISTRIBUTION_ARTIFACT_HASH
254+
255+
# 7- List Cardano transaction commitments
256+
mithril_client --unstable cardano-transaction commitment list
257+
258+
# 8- Show detailed information about a Cardano transaction commitment
259+
mithril_client --unstable cardano-transaction commitment show $CARDANO_TRANSACTION_COMMITMENT_HASH
260+
261+
# 9- Certify that given list of transactions hashes are included in the Cardano transactions set
262+
mithril_client --unstable cardano-transaction certify $TRANSACTION_HASH_1,$TRANSACTION_HASH_2
249263
```
250264

251265
### Local image
@@ -283,11 +297,21 @@ Here are the subcommands available:
283297
| **help** | Prints this message or the help for the given subcommand(s)|
284298
| **list** | Lists available Mithril stake distributions|
285299

300+
### Cardano transactions
301+
302+
| Subcommand | Performed action |
303+
|------------|------------------|
304+
| **certify** | Certifies that given list of transactions hashes are included in the Cardano transactions set|
305+
| **commitment list** | Lists available Cardano transactions commitments|
306+
| **commitment show** | Shows information about a Cardano transactions commitment|
307+
| **help** | Prints this message or the help for the given subcommand(s)|
308+
286309
## Configuration parameters
287310

288311
The configuration parameters can be set in either of the following ways:
289312

290-
1. In a configuration file, depending on the `--run-mode` parameter. If the runtime mode is `testnet`, the file is located in `./conf/testnet.json`.
313+
1. In a configuration file, depending on the `--run-mode` parameter. If the runtime mode is `testnet`, the file is
314+
located in `./conf/testnet.json`.
291315

292316
2. The value can be overridden by an environment variable with the parameter name in uppercase.
293317

@@ -296,6 +320,7 @@ Here is a list of the available parameters:
296320
| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory |
297321
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
298322
| `verbose` | `--verbose` | `-v` | `VERBOSE` | Verbosity level | - | Parsed from the number of occurrences: `-v` for `Warning`, `-vv` for `Info`, `-vvv` for `Debug` and `-vvvv` for `Trace` | :heavy_check_mark: |
323+
| `unstable` | `--unstable` | - | - | Enable unstable commands | - | - | - |
299324
| `run_mode` | `--run-mode` | - | `RUN_MODE` | Runtime mode | `dev` | - | :heavy_check_mark: |
300325
| `network` | - | - | `NETWORK` | Cardano network | - | `testnet` or `mainnet` or `devnet` | :heavy_check_mark: |
301326
| `aggregator_endpoint` | `--aggregator-endpoint` | - | `AGGREGATOR_ENDPOINT` | Aggregator node endpoint | - | `https://aggregator.pre-release-preview.api.mithril.network/aggregator` | :heavy_check_mark: |
@@ -336,3 +361,23 @@ Here is a list of the available parameters:
336361
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
337362
| `artifact_hash` | `--artifact-hash` | - | - | Hash of the Mithril stake distribution artifact or `latest` for the latest artifact | - | - | :heavy_check_mark: |
338363
| `download_dir` | `--download-dir` | - | - | Directory where the Mithril stake distribution will be downloaded | . | - | - |
364+
365+
`cardano-transaction commitment show` command:
366+
367+
| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory |
368+
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
369+
| `hash` | `--hash` | - | `HASH` | Cardano transaction commitment hash or `latest` for the latest Cardano transaction commitment | - | - | :heavy_check_mark: |
370+
| `json` | `--json` | - | - | Enable JSON output for command results | - | - | - |
371+
372+
`cardano-transaction commitment list` command:
373+
374+
| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory |
375+
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
376+
| `json` | `--json` | - | - | Enable JSON output for command results | - | - | - |
377+
378+
`cardano-transaction certify` command:
379+
380+
| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory |
381+
|-----------|---------------------|:---------------------:|----------------------|-------------|---------------|---------|:---------:|
382+
| `transactions_hashes` | `--transactions_hashes` | - | `TRANSACTIONS_HASHES` | Cardano transactions hashes separated by commas | - | - | :heavy_check_mark: |
383+
| `json` | `--json` | - | - | Enable JSON output for progress logs | - | - | - |

docs/website/versioned_docs/version-maintained/manual/getting-started/SPO-on-boarding-guide.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ Each **Mithril network** has its own configuration, which can be found in the [C
4747

4848
## Step 2: Get Mithril ready for `mainnet`
4949

50-
:::info
50+
:::warning
5151

52-
This step is **optional**, but **strongly recommended**.
52+
This step is **mandatory**. You must complete it before moving forward to **Step 3**.
5353

5454
:::
5555

56-
To get ready for `mainnet`, you should:
56+
To get ready for `mainnet`, you need to:
5757
- Be an active SPO on the Cardano `preprod` network for at least one epoch or five days.
5858
- Set up a **Mithril signer** node on Mithril's `release-preprod` network by following the [**Run a Mithril signer node (SPO)**](run-signer-node.md) guide.
5959
- You **must** run the **Production** deployment model.
@@ -68,7 +68,7 @@ Each **Mithril network** has its own configuration, which can be found in the [C
6868

6969
:::warning
7070

71-
This step is **mandatory**. It is **strongly recommended** to complete **Step 2** beforehand.
71+
This step is **mandatory**. You must have completed **Step 2** before.
7272

7373
:::
7474

0 commit comments

Comments
 (0)