diff --git a/docs/website/versioned_docs/version-maintained/compiled-binaries.mdx b/docs/website/versioned_docs/version-maintained/compiled-binaries.mdx index 5d5f75981e9..dbd5b43a4bf 100644 --- a/docs/website/versioned_docs/version-maintained/compiled-binaries.mdx +++ b/docs/website/versioned_docs/version-maintained/compiled-binaries.mdx @@ -25,16 +25,7 @@ You can also install the **{props.node}** binary for other distributions: :::info -The Linux binaries target `glibc`, and have a minimum requirement of `glibc 2.31` (compatible with `Ubuntu 20.04` -or `Debian Bullseye`). - -::: - -:::warning - -From March 2025 onwards, released Linux binaries will have their minimum required `glibc` version raised to `2.35` -(compatible with `Ubuntu 22.04` or `Debian 12 - Bookworm`). - -If you are using a system with an older version of `glibc`, you will need to compile the binaries from source. +The Linux binaries target `glibc`, and have a minimum requirement of `glibc 2.35` (compatible with `Ubuntu 22.04` +or `Debian 12 - Bookworm`). ::: diff --git a/docs/website/versioned_docs/version-maintained/glossary.md b/docs/website/versioned_docs/version-maintained/glossary.md index 6aeedf1ae8c..d7f58321c6b 100644 --- a/docs/website/versioned_docs/version-maintained/glossary.md +++ b/docs/website/versioned_docs/version-maintained/glossary.md @@ -10,6 +10,10 @@ Below is a comprehensive list of definitions for some common terms used in the M A beacon represents a point of the blockchain for which a [Mithril certificate](#certificate) is created. It embeds the [epoch](#epoch) of the [Cardano network](#cardano-network) that is targeted, and either the block number or the [immutable file number](#immutable-file-number). +## Cardano database + +A Cardano database snapshot is a signed archive of the blockchain state that can be used by [Mithril clients](#mithril-client) to restore a [Cardano full node](#cardano-node). It is uniquely identified by its fingerprint or digest which is part of the message signed by the [Mithril network](#mithril-network). + ## Cardano network The Cardano network is a proof-of-stake blockchain platform that supports the ada cryptocurrency. @@ -88,10 +92,6 @@ The Mithril multi-signature is an aggregate of [individual signatures](#individu > More information is available on the [protocol page](./mithril/advanced/mithril-protocol/protocol.md). -## Snapshot - -A Mithril snapshot is a signed archive of the blockchain state that can be used by [Mithril clients](#mithril-client) to restore a [Cardano full node](#cardano-node). It is uniquely identified by its fingerprint or digest which is part of the message signed by the [Mithril network](#mithril-network). - ## Stake distribution The Cardano stake distribution is the list of all the [stake pool operators'](#stake-pool-operator-spo) pool Id addresses and their associated share of the total stake of the [Cardano network](#cardano-network). diff --git a/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client-library-wasm.md b/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client-library-wasm.md index 9101a9278b7..629c1d5d0ad 100644 --- a/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client-library-wasm.md +++ b/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client-library-wasm.md @@ -10,10 +10,10 @@ Mithril client library WASM can be used by Javascript developers to use the Mith It is responsible for handling the different types of data certified by Mithril and available through a Mithril aggregator: -- [**Snapshot**](../../../glossary.md#snapshot): list and get -- [**Mithril stake distribution**](../../../glossary.md#stake-distribution): list and get - [**Cardano transaction**](../../../glossary.md#cardano-transaction): list and get snapshots, get proofs - [**Cardano stake distribution**](../../../glossary.md#stake-distribution): list, get and get by epoch +- [**Cardano database**](../../../glossary.md#cardano-database): list and get +- [**Mithril stake distribution**](../../../glossary.md#stake-distribution): list and get - [**Certificate**](../../../glossary.md#certificate): list, get, and chain validation. ::: diff --git a/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client-library.md b/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client-library.md index 0342695d43e..8f214408b20 100644 --- a/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client-library.md +++ b/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client-library.md @@ -10,10 +10,10 @@ Mithril client library can be used by Rust developers to use the Mithril network It is responsible for handling the different types of data certified by Mithril and available through a Mithril aggregator: -- [**Snapshot**](../../../glossary.md#snapshot): list, get, download the tarball, and record statistics -- [**Mithril stake distribution**](../../../glossary.md#stake-distribution): list and get - [**Cardano transaction**](../../../glossary.md#cardano-transaction): list and get snapshots, get proofs - [**Cardano stake distribution**](../../../glossary.md#stake-distribution): list, get, and get by epoch +- [**Cardano database**](../../../glossary.md#cardano-database): list, get, download the tarball, and record statistics +- [**Mithril stake distribution**](../../../glossary.md#stake-distribution): list and get - [**Certificate**](../../../glossary.md#certificate): list, get, and chain validation. ::: @@ -64,7 +64,138 @@ Mithril client is an asynchronous library. You will need a runtime to execute yo ## Using the Mithril client library -Below is a basic example of how to use most of the functions exposed by the Mithril client library: +### Cardano transactions + +Here is a basic example of the code targetting the `release-preprod` network aggregator: + +```rust title="/src/main.rs" +use mithril_client::{ClientBuilder, MessageBuilder, MithrilResult}; + +#[tokio::main] +async fn main() -> MithrilResult<()> { + const AGGREGATOR_ENDPOINT: &str = + "https://aggregator.release-preprod.api.mithril.network/aggregator"; + const GENESIS_VERIFICATION_KEY: &str = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d"; + let client = + ClientBuilder::aggregator(AGGREGATOR_ENDPOINT, GENESIS_VERIFICATION_KEY).build()?; + + let transactions_hashes = [ + "f9b5221b3ead45d46c0ecae6bee18a0746c5694d0285281cca1b651bce5f49a5", + "7769e8b78cc86890660ff5451c110b0a0d0413c8b8ebb17a64e017b4cd881777", + ]; + let cardano_transaction_proof = client + .cardano_transaction() + .get_proofs(&transactions_hashes) + .await + .unwrap(); + + let verified_transactions = cardano_transaction_proof.verify().unwrap(); + + let certificate = client + .certificate() + .verify_chain(&cardano_transaction_proof.certificate_hash) + .await + .unwrap(); + + let message = MessageBuilder::new() + .compute_cardano_transactions_proofs_message(&certificate, &verified_transactions); + assert!(certificate.match_message(&message)); + + println!( + r###"Cardano transactions with hashes "'{}'" have been successfully certified by Mithril."###, + verified_transactions.certified_transactions().join(","), + ); + if !cardano_transaction_proof + .non_certified_transactions + .is_empty() + { + println!( + r###"No proof could be computed for Cardano transactions with hashes "'{}'". + + Mithril may not have signed those transactions yet, please try again later."###, + cardano_transaction_proof + .non_certified_transactions + .join(","), + ); + } + + Ok(()) +} +``` + +:::info + +An full example is available in the [Mithril repository](https://github.com/input-output-hk/mithril/tree/main/examples/client-cardano-transaction/src/main.rs). To run it, execute the following command: + +```bash +cargo run -p client-cardano-transaction +``` + +or directly from the example crate directory: + +```bash +cargo run +``` + +::: + +### Cardano stake distribution + +Here is a basic example of the code targetting the `release-preprod` network aggregator: + +```rust title="/src/main.rs" +use mithril_client::{ClientBuilder, MessageBuilder, MithrilResult}; + +#[tokio::main] +async fn main() -> MithrilResult<()> { + const AGGREGATOR_ENDPOINT: &str = + "https://aggregator.release-preprod.api.mithril.network/aggregator"; + const GENESIS_VERIFICATION_KEY: &str = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d"; + let client = + ClientBuilder::aggregator(AGGREGATOR_ENDPOINT, GENESIS_VERIFICATION_KEY).build()?; + + let cardano_stake_distributions = client.cardano_stake_distribution().list().await?; + let last_epoch = cardano_stake_distributions.first().unwrap().epoch; + + let cardano_stake_distribution = client + .cardano_stake_distribution() + .get_by_epoch(last_epoch) + .await? + .unwrap(); + + let certificate = client + .certificate() + .verify_chain(&cardano_stake_distribution.certificate_hash) + .await?; + + let message = MessageBuilder::new() + .compute_cardano_stake_distribution_message(&certificate, &cardano_stake_distribution)?; + + assert!(certificate.match_message(&message)); + + Ok(()) +} +``` + +:::info + +An full example is available in the [Mithril repository](https://github.com/input-output-hk/mithril/tree/main/examples/client-cardano-stake-distribution/src/main.rs). To run it, execute the following command: + +```bash +cargo run -p client-cardano-stake-distribution +``` + +or directly from the example crate directory: + +```bash +cargo run +``` + +::: + +### Cardano database + +Here is a basic example of the code targetting the `release-preprod` network aggregator: ```rust title="/src/main.rs" use mithril_client::{ClientBuilder, MessageBuilder}; @@ -72,12 +203,15 @@ use std::path::Path; #[tokio::main] async fn main() -> mithril_client::MithrilResult<()> { - let client = ClientBuilder::aggregator("YOUR_AGGREGATOR_ENDPOINT", "YOUR_GENESIS_VERIFICATION_KEY").build()?; - - let snapshots = client.snapshot().list().await?; + const AGGREGATOR_ENDPOINT: &str = + "https://aggregator.release-preprod.api.mithril.network/aggregator"; + const GENESIS_VERIFICATION_KEY: &str = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d"; + let client = + ClientBuilder::aggregator(AGGREGATOR_ENDPOINT, GENESIS_VERIFICATION_KEY).build()?; + let snapshots = client.cardano_database().list().await?; let last_digest = snapshots.first().unwrap().digest.as_ref(); - let snapshot = client.snapshot().get(last_digest).await?.unwrap(); + let snapshot = client.cardano_database().get(last_digest).await?.unwrap(); let certificate = client .certificate() @@ -85,13 +219,13 @@ async fn main() -> mithril_client::MithrilResult<()> { .await?; // Note: the directory must already exist, and the user running this code must have read/write access to it. - let target_directory = Path::new("YOUR_TARGET_DIRECTORY"); + let target_directory = Path::new("."); client - .snapshot() + .cardano_database() .download_unpack(&snapshot, target_directory) .await?; - if let Err(e) = client.snapshot().add_statistics(&snapshot).await { + if let Err(e) = client.cardano_database().add_statistics(&snapshot).await { println!("Could not increment snapshot download statistics: {:?}", e); } @@ -108,10 +242,10 @@ async fn main() -> mithril_client::MithrilResult<()> { Snapshot download and certificate chain validation can take quite some time, even with a fast computer and network. We have implemented a feedback mechanism for them; more details are available in the [feedback sub-module](https://mithril.network/rust-doc/mithril_client/feedback/index.html). -An example of implementation with the crate [indicatif](https://crates.io/crates/indicatif) is available in the [Mithril repository](https://github.com/input-output-hk/mithril/tree/main/examples/client-snapshot/src/main.rs). To run it, execute the following command: +An example of implementation with the crate [indicatif](https://crates.io/crates/indicatif) is available in the [Mithril repository](https://github.com/input-output-hk/mithril/tree/main/examples/client-cardano-database/src/main.rs). To run it, execute the following command: ```bash -cargo run -p client-snapshot +cargo run -p client-cardano-database ``` or directly from the example crate directory: @@ -122,39 +256,99 @@ cargo run ::: -Here is a working example of the code using the configuration parameters of the `release-preprod` network: +### Cardano database v2 + +:::danger + +This feature is still unstable. + +To use it, you need to add the `unstable` feature in your project's `Cargo.toml` file. + +``` +mithril-client = { version = "0.11.X", features = ["fs", "unstable"] } +``` + +::: + +Below is a basic example using the new `CardanoDatabase` functions. Make sure the target aggregator signs `CardanoDatabase` incremental snapshot. + +:::tip + +You can verify that the aggregator signs **CardanoDatabase** by running the command below: + +```bash +wget -q -O - YOUR_AGGREGATOR_ENDPOINT | jq '.capabilities.signed_entity_types | contains(["CardanoDatabase"])' +``` + +For example, with the aggregator on the `testing-preview` Mithril network: + +```bash +wget -q -O - https://aggregator.testing-preview.api.mithril.network/aggregator | jq '.capabilities.signed_entity_types | contains(["CardanoDatabase"])' +``` + +::: ```rust title="/src/main.rs" -use mithril_client::{ClientBuilder, MessageBuilder}; +use mithril_client::{ + cardano_database_client::{DownloadUnpackOptions, ImmutableFileRange}, + ClientBuilder, MessageBuilder, +}; use std::path::Path; #[tokio::main] async fn main() -> mithril_client::MithrilResult<()> { - let client = ClientBuilder::aggregator("https://aggregator.release-preprod.api.mithril.network/aggregator", "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d").build()?; + const AGGREGATOR_ENDPOINT: &str = + "https://aggregator.testing-preview.api.mithril.network/aggregator"; + const GENESIS_VERIFICATION_KEY: &str = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d"; + let client = + ClientBuilder::aggregator(AGGREGATOR_ENDPOINT, GENESIS_VERIFICATION_KEY).build()?; - let snapshots = client.snapshot().list().await?; + let snapshots = client.cardano_database_v2().list().await?; - let last_digest = snapshots.first().unwrap().digest.as_ref(); - let snapshot = client.snapshot().get(last_digest).await?.unwrap(); + let latest_hash = snapshots.first().unwrap().hash.as_ref(); + let snapshot = client + .cardano_database_v2() + .get(latest_hash) + .await? + .unwrap(); let certificate = client .certificate() .verify_chain(&snapshot.certificate_hash) .await?; + let immutable_file_range = ImmutableFileRange::From(15000); + let download_unpack_options = DownloadUnpackOptions { + allow_override: true, + include_ancillary: false, + ..DownloadUnpackOptions::default() + }; + // Note: the directory must already exist, and the user running this code must have read/write access to it. let target_directory = Path::new("."); client - .snapshot() - .download_unpack(&snapshot, target_directory) + .cardano_database_v2() + .download_unpack( + &snapshot, + &immutable_file_range, + target_directory, + download_unpack_options, + ) .await?; - if let Err(e) = client.snapshot().add_statistics(&snapshot).await { - println!("Could not increment snapshot download statistics: {:?}", e); - } + let merkle_proof = client + .cardano_database_v2() + .compute_merkle_proof( + &certificate, + &snapshot, + &immutable_file_range, + target_directory, + ) + .await?; + merkle_proof.verify()?; let message = MessageBuilder::new() - .compute_snapshot_message(&certificate, target_directory) + .compute_cardano_database_message(&certificate, &merkle_proof) .await?; assert!(certificate.match_message(&message)); @@ -162,6 +356,22 @@ async fn main() -> mithril_client::MithrilResult<()> { } ``` +:::info + +An full example is available in the [Mithril repository](https://github.com/input-output-hk/mithril/tree/main/examples/client-cardano-database-v2/src/main.rs). To run it, execute the following command: + +```bash +cargo run -p client-cardano-database-v2 +``` + +or directly from the example crate directory: + +```bash +cargo run +``` + +::: + :::tip You can read the complete [developer documentation](https://mithril.network/rust-doc/mithril_client/index.html). diff --git a/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client.md b/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client.md index 29c2b2a1d0d..21124a8cc4d 100644 --- a/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client.md +++ b/docs/website/versioned_docs/version-maintained/manual/develop/nodes/mithril-client.md @@ -213,7 +213,7 @@ Display the help menu: You should see: ```bash -This program shows, downloads, and verifies certified blockchain artifacts. +This program shows, downloads and verifies certified blockchain artifacts. Usage: mithril-client [OPTIONS] @@ -222,6 +222,7 @@ Commands: mithril-stake-distribution Mithril stake distribution management (alias: msd) cardano-transaction Cardano transactions management (alias: ctx) cardano-stake-distribution Cardano stake distribution management (alias: csd) + cardano-db-v2 [unstable] Cardano db v2 management (alias: cdbv2) help Print this message or the help of the given subcommand(s) Options: @@ -511,6 +512,15 @@ Here are the subcommands available: | **help** | Prints this message or the help for the given subcommand(s) | | **list** | Lists available Cardano stake distributions | +### Cardano DB V2 (`unstable`, will replace `Cardano DB` in the future) + +| Subcommand | Performed action | +| ----------------- | ----------------------------------------------------------- | +| **download** | Downloads and restores a cardano-db v2 snapshot | +| **help** | Prints this message or the help for the given subcommand(s) | +| **snapshot list** | Lists available cardano-db v2 snapshots | +| **snapshot show** | Shows information about a cardano-db v2 snapshot | + ## Configuration parameters The configuration parameters can be set in either of the following ways: @@ -598,3 +608,28 @@ Here is a list of the available parameters: | ------------------- | --------------------- | :------------------: | -------------------- | -------------------------------------------------------------------------------------------- | ------------- | ------- | :----------------: | | `unique_identifier` | `--unique-identifier` | - | - | Epoch or hash of the Cardano stake distribution artifact or `latest` for the latest artifact | - | - | :heavy_check_mark: | | `download_dir` | `--download-dir` | - | - | Directory where the Cardano stake distribution will be downloaded | . | - | - | + +`cardano-db-v2 snapshot show` command: + +| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory | +| --------- | ------------------- | :------------------: | -------------------- | -------------------------------------------------------- | ------------- | ------- | :----------------: | +| `hash` | `--hash` | - | - | Cardano DB snapshot hash or `latest` for the latest hash | - | - | :heavy_check_mark: | +| `json` | `--json` | - | - | Enable JSON output for command results | - | - | - | + +`cardano-db-v2 snapshot list` command: + +| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory | +| --------- | ------------------- | :------------------: | -------------------- | -------------------------------------- | ------------- | ------- | :-------: | +| `json` | `--json` | - | - | Enable JSON output for command results | - | - | - | + +`cardano-db-v2 download` command: + +| Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory | +| ------------------- | --------------------- | :------------------: | -------------------- | -------------------------------------------------------------- | ------------- | ------- | :----------------: | +| `hash` | `--hash` | - | - | Cardano DB snapshot hash or `latest` for the latest hash | - | - | :heavy_check_mark: | +| `start` | `--start` | - | - | The first immutable file number to download | . | - | - | +| `end` | `--end` | - | - | The last immutable file number to download | . | - | - | +| `include_ancillary` | `--include-ancillary` | - | - | Include ancillary files in the download | . | - | - | +| `allow_override` | `--allow-override` | - | - | Allow existing files in the download directory to be overridde | . | - | - | +| `download_dir` | `--download-dir` | - | - | Directory where the Cardano DB will be downloaded | . | - | - | +| `json` | `--json` | - | - | Enable JSON output for progress logs | - | - | - | diff --git a/docs/website/versioned_docs/version-maintained/manual/develop/run-mithril-devnet.md b/docs/website/versioned_docs/version-maintained/manual/develop/run-mithril-devnet.md index 1664be3fc1f..0bca118b99c 100644 --- a/docs/website/versioned_docs/version-maintained/manual/develop/run-mithril-devnet.md +++ b/docs/website/versioned_docs/version-maintained/manual/develop/run-mithril-devnet.md @@ -107,7 +107,7 @@ You should see the following information displayed: >> Artifacts Directory[env::ARTIFACTS_DIR]: artifacts >> Cardano Full nodes [env::NUM_FULL_NODES]: 1 >> Cardano SPO nodes [env::NUM_POOL_NODES]: 2 ->> Cardano Node Version [env::CARDANO_NODE_VERSION]: 10.1.4 +>> Cardano Node Version [env::CARDANO_NODE_VERSION]: 10.2.1 >> Cardano Network Magic [env::NETWORK_MAGIC]: 42 >> Cardano Hard Fork Babbage At Epoch [env::HARD_FORK_BABBAGE_AT_EPOCH]: 0 >> Cardano Hard Fork Conway At Epoch [env::HARD_FORK_CONWAY_AT_EPOCH]: 0 @@ -126,7 +126,7 @@ generated genesis with: 3 genesis keys, 2 non-delegating UTxO keys, 2 stake pool >> Start Cardano network cardano-cli 10.1.1.0 - linux-x86_64 - ghc-8.10 git rev 01bda2e2cb0a70cd95067d696dbb44665f1d680a -cardano-node 10.1.4 - linux-x86_64 - ghc-8.10 +cardano-node 10.2.1 - linux-x86_64 - ghc-8.10 git rev 01bda2e2cb0a70cd95067d696dbb44665f1d680a >> Starting Cardano node 'node-full1' >> Starting Cardano node 'node-pool1' @@ -191,7 +191,7 @@ Signer 2 pool1y3pxhtqytcwy3mmnawqf2ej0x9sz5frkkwkz6scfqmzyyw8u38v Certified Po >> Bootstrap the Genesis certificate {"msg":"Started","v":0,"name":"mithril-aggregator","level":20,"time":"2024-11-14T10:29:07.953666896Z","hostname":"c993b6b764f2","pid":1,"node_version":"0.5.110+e2fa1e0","run_mode":"dev"} {Genesis bootstrap for test only! -"msg":"BOOTSTRAP GENESIS command","v":0,"name":"mithril-aggregator","level":20,"time":"2024-11-14T10:29:07.95394937Z","hostname":"c993b6b764f2","pid":1,"config":"Configuration { environment: Production, cardano_cli_path: \"/app/bin/cardano-cli\", cardano_node_socket_path: \"/data/ipc/node.sock\", cardano_node_version: \"10.1.4\", network_magic: Some(42), network: \"devnet\", chain_observer_type: Pallas, protocol_parameters: ProtocolParameters { k: 5, m: 100, phi_f: 0.65 }, snapshot_uploader_type: Local, snapshot_bucket_name: None, snapshot_use_cdn_domain: false, server_ip: \"0.0.0.0\", server_port: 8080, run_interval: 1000, db_directory: \"/data/db\", snapshot_directory: \".\", data_stores_directory: \"/data/mithril/aggregator/stores\", genesis_verification_key: \"5b33322c3235332c3138362c3230312c3137372c31312c3131372c3133352c3138372c3136372c3138312c3138382c32322c35392c3230362c3130352c3233312c3135302c3231352c33302c37382c3231322c37362c31362c3235322c3138302c37322c3133342c3133372c3234372c3136312c36385d\", reset_digests_cache: false, disable_digests_cache: false, store_retention_limit: None, era_reader_adapter_type: Bootstrap, era_reader_adapter_params: None, signed_entity_types: None, snapshot_compression_algorithm: Zstandard, zstandard_parameters: None, cexplorer_pools_url: None, signer_importer_run_interval: 720, allow_unparsable_block: false, cardano_transactions_prover_cache_pool_size: 10, cardano_transactions_database_connection_pool_size: 10, cardano_transactions_signing_config: CardanoTransactionsSigningConfig { security_parameter: BlockNumber(3000), step: BlockNumber(120) }, cardano_transactions_prover_max_hashes_allowed_by_request: 100, cardano_transactions_block_streamer_max_roll_forwards_per_poll: 10000, enable_metrics_server: false, metrics_server_ip: \"0.0.0.0\", metrics_server_port: 9090, persist_usage_report_interval_in_seconds: 10 }"} +"msg":"BOOTSTRAP GENESIS command","v":0,"name":"mithril-aggregator","level":20,"time":"2024-11-14T10:29:07.95394937Z","hostname":"c993b6b764f2","pid":1,"config":"Configuration { environment: Production, cardano_cli_path: \"/app/bin/cardano-cli\", cardano_node_socket_path: \"/data/ipc/node.sock\", cardano_node_version: \"10.2.1\", network_magic: Some(42), network: \"devnet\", chain_observer_type: Pallas, protocol_parameters: ProtocolParameters { k: 5, m: 100, phi_f: 0.65 }, snapshot_uploader_type: Local, snapshot_bucket_name: None, snapshot_use_cdn_domain: false, server_ip: \"0.0.0.0\", server_port: 8080, run_interval: 1000, db_directory: \"/data/db\", snapshot_directory: \".\", data_stores_directory: \"/data/mithril/aggregator/stores\", genesis_verification_key: \"5b33322c3235332c3138362c3230312c3137372c31312c3131372c3133352c3138372c3136372c3138312c3138382c32322c35392c3230362c3130352c3233312c3135302c3231352c33302c37382c3231322c37362c31362c3235322c3138302c37322c3133342c3133372c3234372c3136312c36385d\", reset_digests_cache: false, disable_digests_cache: false, store_retention_limit: None, era_reader_adapter_type: Bootstrap, era_reader_adapter_params: None, signed_entity_types: None, snapshot_compression_algorithm: Zstandard, zstandard_parameters: None, cexplorer_pools_url: None, signer_importer_run_interval: 720, allow_unparsable_block: false, cardano_transactions_prover_cache_pool_size: 10, cardano_transactions_database_connection_pool_size: 10, cardano_transactions_signing_config: CardanoTransactionsSigningConfig { security_parameter: BlockNumber(3000), step: BlockNumber(120) }, cardano_transactions_prover_max_hashes_allowed_by_request: 100, cardano_transactions_block_streamer_max_roll_forwards_per_poll: 10000, enable_metrics_server: false, metrics_server_ip: \"0.0.0.0\", metrics_server_port: 9090, persist_usage_report_interval_in_seconds: 10 }"} {"msg":"Opening SQLite connection","v":0,"name":"mithril-aggregator","level":20,"time":"2024-11-14T10:29:07.954098066Z","hostname":"c993b6b764f2","pid":1,"src":"ConnectionBuilder","path":"/data/mithril/aggregator/stores/aggregator.sqlite3"} {"msg":"Enabling SQLite Write Ahead Log journal mode","v":0,"name":"mithril-aggregator","level":20,"time":"2024-11-14T10:29:07.954185725Z","hostname":"c993b6b764f2","pid":1,"src":"ConnectionBuilder"} {"msg":"Enabling SQLite foreign key support","v":0,"name":"mithril-aggregator","level":20,"time":"2024-11-14T10:29:07.954483371Z","hostname":"c993b6b764f2","pid":1,"src":"ConnectionBuilder"} @@ -332,7 +332,7 @@ The networks will be queried every second and will display: "http://0.0.0.0:8080/aggregator/artifact/snapshot/4c7b06dd2bef1416391b92a46dae7d2f606ced2954b628f844b021ba5b52b15f/download" ], "compression_algorithm": "zstandard", - "cardano_node_version": "10.1.4" + "cardano_node_version": "10.2.1" }, { "digest": "b98b25f505401e967df1012a4c13385290db15d157d0292e9f8290bd9933a66e", @@ -349,7 +349,7 @@ The networks will be queried every second and will display: "http://0.0.0.0:8080/aggregator/artifact/snapshot/b98b25f505401e967df1012a4c13385290db15d157d0292e9f8290bd9933a66e/download" ], "compression_algorithm": "zstandard", - "cardano_node_version": "10.1.4" + "cardano_node_version": "10.2.1" } ] @@ -564,7 +564,7 @@ You will see more information about the snapshot: +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Size | 2323485648 | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Cardano node version | 10.1.4 | +| Cardano node version | 10.2.1 | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Location | https://storage.googleapis.com/cdn.aggregator.testing-preview.api.mithril.network/preview-e539-i10787.db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667.tar.zst | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -592,9 +592,9 @@ You will see that the certificate chain is validated to ensure the issued certif 5/5 - Verifying the cardano db signature… Cardano db 'db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667' has been unpacked and successfully checked against Mithril multi-signature contained in the certificate. - Files in the directory '/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db' can be used to run a Cardano node with version >= 10.1.4. + Files in the directory '/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db' can be used to run a Cardano node with version >= 10.2.1. If you are using Cardano Docker image, you can restore a Cardano Node with: - docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db",target=/data/db/ -e NETWORK=preview ghcr.io/intersectmbo/cardano-node:10.1.4 + docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db",target=/data/db/ -e NETWORK=preview ghcr.io/intersectmbo/cardano-node:10.2.1 ``` diff --git a/docs/website/versioned_docs/version-maintained/manual/getting-started/bootstrap-cardano-node.md b/docs/website/versioned_docs/version-maintained/manual/getting-started/bootstrap-cardano-node.md index 1cc7832ba93..54a97e9c396 100644 --- a/docs/website/versioned_docs/version-maintained/manual/getting-started/bootstrap-cardano-node.md +++ b/docs/website/versioned_docs/version-maintained/manual/getting-started/bootstrap-cardano-node.md @@ -429,7 +429,7 @@ You will see more information about the snapshot: +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Size | 2323485648 | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Cardano node version | 10.1.4 | +| Cardano node version | 10.2.1 | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Location | https://storage.googleapis.com/cdn.aggregator.testing-preview.api.mithril.network/preview-e539-i10787.db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667.tar.zst | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -457,11 +457,11 @@ You will see that the selected snapshot archive has been downloaded locally unpa 5/5 - Verifying the cardano db signature… Cardano db 'db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667' has been unpacked and successfully checked against Mithril multi-signature contained in the certificate. - Files in the directory '/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db' can be used to run a Cardano node with version >= 10.1.4. + Files in the directory '/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db' can be used to run a Cardano node with version >= 10.2.1. If you are using a Cardano Docker image, you can restore a Cardano node with: - docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db",target=/data/db/ -e NETWORK=preview ghcr.io/intersectmbo/cardano-node:10.1.4 + docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="/home/mithril/data/testnet/db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667/db",target=/data/db/ -e NETWORK=preview ghcr.io/intersectmbo/cardano-node:10.2.1 ``` ### Step 5: Launch a Cardano node from the restored Cardano DB snapshot @@ -469,7 +469,7 @@ Cardano db 'db5f50a060d4b813125c4263b700ecc96e5d8c8710f0430e5c80d2f0fa79b667' ha Launch an empty Cardano node and make it live in minutes! ```bash -docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="$(pwd)/data/testnet/$SNAPSHOT_DIGEST/db",target=/data/db/ -e NETWORK=$CARDANO_NETWORK ghcr.io/intersectmbo/cardano-node:10.1.4 +docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind,source="$(pwd)/data/testnet/$SNAPSHOT_DIGEST/db",target=/data/db/ -e NETWORK=$CARDANO_NETWORK ghcr.io/intersectmbo/cardano-node:10.2.1 ``` You will see the Cardano node start by validating the files ingested from the snapshot archive. Then, it will synchronize with the other network nodes and start adding blocks: