Skip to content

Commit 5222486

Browse files
author
Clément Turmel
committed
docs: add documentation about recursive search of immutables directory
1 parent 22d3ec3 commit 5222486

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

docs/website/root/manual/develop/nodes/mithril-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ Here is a list of the available parameters:
616616
| -------------------------- | ---------------------------- | :------------------: | -------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------- | ------- | :----------------: |
617617
| `backend` | `--backend` | `-b` | - | Backend to use, either: `v1` (default, full database restoration only) or `v2` (full or partial database restoration) | `v2` | - | - |
618618
| `digest` | - | - | - | Digest of the Cardano db snapshot to verify or `latest` for the latest artifact | - | - | :heavy_check_mark: |
619-
| `db_dir` | `--db-dir` | - | - | Directory from where the immutable will be verified | - | - | - |
619+
| `db_dir` | `--db-dir` | - | - | Directory from where the immutable will be verified. It will recursively search for immutable directory. | - | - | - |
620620
| `genesis_verification_key` | `--genesis-verification-key` | - | `GENESIS_VERIFICATION_KEY` | Genesis verification key to check the certificate chain | - | - | - |
621621
| `run_mode` | `--run-mode` | - | `RUN_MODE` | Run Mode | `dev` | - | - |
622622
| `verbose` | `--verbose` | `-v` | - | Verbosity level (-v=warning, -vv=info, -vvv=debug, -vvvv=trace) | `0` | - | - |

internal/cardano-node/mithril-cardano-node-internal-database/src/entities/immutable_file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl ImmutableFile {
133133
Ok(hasher.finalize())
134134
}
135135

136-
/// List all [`ImmutableFile`] in a given directory.
136+
/// List all [`ImmutableFile`] in a given directory by recursively searching a immutable directory.
137137
pub fn list_all_in_dir(dir: &Path) -> Result<Vec<ImmutableFile>, ImmutableFileListingError> {
138138
let immutable_dir = find_immutables_dir(dir).ok_or(
139139
ImmutableFileListingError::MissingImmutableFolder(dir.to_path_buf()),
@@ -169,7 +169,7 @@ impl ImmutableFile {
169169
}
170170
}
171171

172-
/// Check if at least one immutable file exists in the given directory
172+
/// Check if at least one immutable file exists in the given directory by recursively searching a immutable directory
173173
pub fn at_least_one_immutable_files_exist_in_dir(
174174
dir: &Path,
175175
) -> Result<(), ImmutableFileListingError> {

mithril-client-cli/src/commands/cardano_db/verify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct CardanoDbVerifyCommand {
3131
/// Use the `list` command to get that information.
3232
digest: String,
3333

34-
/// Directory from where the immutable will be verified.
34+
/// Directory from where the immutable will be verified. It will recursively search for immutable directory.
3535
#[clap(long)]
3636
db_dir: Option<PathBuf>,
3737

mithril-client/src/cardano_database_client/proving.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ impl InternalArtifactProver {
4444
}
4545

4646
/// Compute the Merkle proof of membership for the given immutable file range.
47+
///
48+
/// It will recursively search for immutables directory inside the provided `database_dir`.
4749
pub async fn compute_merkle_proof(
4850
&self,
4951
certificate: &CertificateMessage,

0 commit comments

Comments
 (0)