Skip to content

Commit

Permalink
Merge pull request #2289 from input-output-hk/jpraynaud/2214-client-l…
Browse files Browse the repository at this point in the history
…ibrary-cardano-database-restore

feat: client library for incremental Cardano database
  • Loading branch information
jpraynaud authored Feb 19, 2025
2 parents 875d090 + c318e5b commit 01e15ab
Show file tree
Hide file tree
Showing 44 changed files with 4,422 additions and 782 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ As a minor extension, we have adopted a slightly different versioning convention

- End support for **macOS x64 pre-built binaries** for the client CLI.

- **UNSTABLE** Cardano database incremental certification:

- Implement the client library for the the signed entity type `CardanoDatabase` (download and prove snapshot).

- Crates versions:

| Crate | Version |
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/client-snapshot/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "client-snapshot"
description = "Mithril client snapshot example"
version = "0.1.24"
version = "0.1.25"
authors = ["[email protected]", "[email protected]"]
documentation = "https://mithril.network/doc"
edition = "2021"
Expand Down
1 change: 1 addition & 0 deletions examples/client-snapshot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ impl FeedbackReceiver for IndicatifFeedbackReceiver {
}
*certificate_validation_pb = None;
}
_ => panic!("Unexpected event: {:?}", event),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion mithril-client-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-client-cli"
version = "0.11.0"
version = "0.11.1"
description = "A Mithril Client"
authors = { workspace = true }
edition = { workspace = true }
Expand Down
6 changes: 5 additions & 1 deletion mithril-client-cli/src/utils/feedback_receiver.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use async_trait::async_trait;
use indicatif::{ProgressBar, ProgressDrawTarget, ProgressState, ProgressStyle};
use slog::Logger;
use slog::{warn, Logger};
use std::fmt::Write;
use tokio::sync::RwLock;

Expand Down Expand Up @@ -111,6 +111,10 @@ impl FeedbackReceiver for IndicatifFeedbackReceiver {
}
*certificate_validation_pb = None;
}
_ => {
// TODO: Handle other events from Cardano database client and remove this catchall
warn!(self.logger, "Unhandled event"; "event" => ?event);
}
}
}
}
2 changes: 1 addition & 1 deletion mithril-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-client"
version = "0.11.2"
version = "0.11.3"
description = "Mithril client library"
authors = { workspace = true }
edition = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions mithril-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ CARGO = cargo
all: test build

build:
${CARGO} build --release --features full
${CARGO} build --release --features full,unstable

test:
${CARGO} test --features full
${CARGO} test --features full,unstable

check:
${CARGO} check --release --all-features --all-targets
Expand Down
2 changes: 1 addition & 1 deletion mithril-client/src/aggregator_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ impl AggregatorRequest {
}

/// API that defines a client for the Aggregator
#[cfg_attr(test, mockall::automock)]
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
#[cfg_attr(not(target_family = "wasm"), async_trait)]
pub trait AggregatorClient: Sync + Send {
Expand Down Expand Up @@ -423,7 +424,6 @@ impl AggregatorHTTPClient {
}
}

#[cfg_attr(test, mockall::automock)]
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
#[cfg_attr(not(target_family = "wasm"), async_trait)]
impl AggregatorClient for AggregatorHTTPClient {
Expand Down
249 changes: 0 additions & 249 deletions mithril-client/src/cardano_database_client.rs

This file was deleted.

Loading

0 comments on commit 01e15ab

Please sign in to comment.