Skip to content

Commit 141d0ad

Browse files
authored
Merge pull request #1494 from input-output-hk/djo/1492/mithril-db-crate
Extract persistence related code to a new shared crate
2 parents f31f1ec + 535ba5a commit 141d0ad

File tree

75 files changed

+318
-225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+318
-225
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,8 @@ jobs:
701701
run: |
702702
# Force `--lib` to avoid a collision between the client lib and the client cli binary who share
703703
# the same name (we only want to document those anyway)
704-
cargo doc --no-deps --lib -p mithril-stm -p mithril-common -p mithril-aggregator \
705-
-p mithril-signer -p mithril-client -p mithril-client-cli \
704+
cargo doc --no-deps --lib -p mithril-stm -p mithril-common -p mithril-persistence \
705+
-p mithril-aggregator -p mithril-signer -p mithril-client -p mithril-client-cli \
706706
--all-features --message-format=json \
707707
| clippy-sarif | tee rust-cargo-doc-results.sarif | sarif-fmt
708708

Cargo.lock

Lines changed: 29 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ members = [
1111
"mithril-client-cli",
1212
"mithril-client-wasm",
1313
"mithril-common",
14+
"mithril-persistence",
1415
"mithril-relay",
1516
"mithril-signer",
1617
"mithril-stm",

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
COMPONENTS = mithril-common mithril-stm mithril-aggregator mithril-client mithril-client-cli mithril-signer demo/protocol-demo mithril-test-lab/mithril-end-to-end
1+
COMPONENTS = mithril-common mithril-persistence mithril-stm mithril-aggregator mithril-client mithril-client-cli mithril-signer demo/protocol-demo mithril-test-lab/mithril-end-to-end
22
GOALS := $(or $(MAKECMDGOALS),all)
33

44
.PHONY: $(GOALS) $(COMPONENTS)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ This repository consists of the following parts:
6363
* [**Mithril client WASM**](./mithril-client-wasm): the WASM compatible library used for retrieving the certified artifacts produced by the **Mithril network**.
6464

6565
* [**Mithril common**](./mithril-common): this is the **common** library that is used by the **Mithril network** nodes.
66+
67+
* [**Mithril persistence**](./mithril-persistence): the **persistence** library that is used by the **Mithril network** nodes.
6668

6769
* [**Mithril STM**](./mithril-stm): the **core** library that implements **Mithril** protocol cryptographic engine.
6870

docs/website/root/manual/developer-docs/references.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ To learn more about the **Mithril protocol**, please refer to the [about Mithril
2727
| Dependency | Description | Source repository | Rust documentation | REST API
2828
|------------|-------------|:-----------------:|:------------------:|:------------:|
2929
| **Mithril common** | The **common** library used by **Mithril network** nodes. | [:arrow_upper_right:](https://github.com/input-output-hk/mithril/tree/main/mithril-common) | [:arrow_upper_right:](https://mithril.network/rust-doc/mithril_common/index.html) | -
30+
| **Mithril persistence** | The **persistence** library used by **Mithril network** nodes. | [:arrow_upper_right:](https://github.com/input-output-hk/mithril/tree/main/mithril-persistence) | [:arrow_upper_right:](https://mithril.network/rust-doc/mithril_persistence/index.html) | -
3031
| **Mithril STM** | The **core** library that implements the cryptographic engine for the **Mithril** protocol. | [:arrow_upper_right:](https://github.com/input-output-hk/mithril/tree/main/mithril-stm) | [:arrow_upper_right:](https://mithril.network/rust-doc/mithril_stm/index.html) | -
3132
| **Mithril aggregator** | The node within the **Mithril network** responsible for collecting individual signatures from the **Mithril signers** and aggregating them into a multi-signature. This capability enables the **Mithril aggregator** to provide certified snapshots of the **Cardano** blockchain. | [:arrow_upper_right:](https://github.com/input-output-hk/mithril/tree/main/mithril-aggregator) | [:arrow_upper_right:](https://mithril.network/rust-doc/mithril_aggregator/index.html) | [:arrow_upper_right:](/doc/aggregator-api)
3233
| **Mithril client CLI** | The node within the **Mithril network** responsible for restoring the **Cardano** blockchain on an empty node from a certified snapshot. | [:arrow_upper_right:](https://github.com/input-output-hk/mithril/tree/main/mithril-client-cli) | [:arrow_upper_right:](https://mithril.network/rust-doc/mithril_client_cli/index.html) | -

flake.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
mithril-client-cli = buildPackage ./mithril-client-cli/Cargo.toml mithril.cargoArtifacts {};
109109
mithril-aggregator = buildPackage ./mithril-aggregator/Cargo.toml mithril.cargoArtifacts {};
110110
mithril-signer = buildPackage ./mithril-signer/Cargo.toml mithril.cargoArtifacts {};
111+
mithril-persistence = buildPackage ./mithril-persistence/Cargo.toml mithril.cargoArtifacts {};
111112
mithrildemo = buildPackage ./demo/protocol-demo/Cargo.toml mithril.cargoArtifacts {};
112113
mithril-end-to-end = buildPackage ./mithril-test-lab/mithril-end-to-end/Cargo.toml null {};
113114
};

mithril-aggregator/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.4.35"
3+
version = "0.4.36"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }
@@ -19,6 +19,7 @@ config = "0.13.4"
1919
flate2 = "1.0.28"
2020
hex = "0.4.3"
2121
mithril-common = { path = "../mithril-common", features = ["full"] }
22+
mithril-persistence = { path = "../mithril-persistence" }
2223
openssl = { version = "0.10.63", features = ["vendored"], optional = true }
2324
openssl-probe = { version = "0.1.5", optional = true }
2425
reqwest = { version = "0.11.23", features = ["json"] }

mithril-aggregator/src/commands/tools_command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use anyhow::Context;
22
use clap::{Parser, Subcommand};
33
use config::{builder::DefaultState, ConfigBuilder};
4-
use mithril_common::sqlite::vacuum_database;
54
use mithril_common::StdResult;
5+
use mithril_persistence::sqlite::vacuum_database;
66
use slog_scope::debug;
77
use std::sync::Arc;
88

0 commit comments

Comments
 (0)