Skip to content

Commit afdbf61

Browse files
authored
Merge pull request #3254 from input-output-hk/jpraynaud/3146-snark-friendly-protocol-message
feat: SNARK-friendly protocol message
2 parents e0ad33f + 781f2ef commit afdbf61

23 files changed

Lines changed: 1755 additions & 36 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ As a minor extension, we have adopted a slightly different versioning convention
1515

1616
- Implemented new message id format for the DMQ message to follow specification of the [CIP-0137](https://cips.cardano.org/cip/CIP-0137).
1717

18+
- **UNSTABLE**:
19+
- Support for SNARK-friendly rigid protocol message openable in recursive circuit.
20+
1821
| Crate | Version |
1922
| ----- | ------- |
2023
| N/A | `-` |

Cargo.lock

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

internal/cardano-node/mithril-cardano-node-internal-database/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ anyhow = { workspace = true }
1515
async-trait = { workspace = true }
1616
digest = { workspace = true }
1717
hex = { workspace = true }
18-
mithril-common = { path = "../../../mithril-common", version = "0.6.71" }
18+
mithril-common = { path = "../../../mithril-common", version = "0.6.72" }
1919
serde = { workspace = true }
2020
serde_json = { workspace = true }
2121
sha2 = "0.10.9"

internal/mithril-aggregator-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ include = ["**/*.rs", "Cargo.toml", "README.md"]
1313
[dependencies]
1414
anyhow = { workspace = true }
1515
async-trait = { workspace = true }
16-
mithril-common = { path = "../../mithril-common", version = "0.6.71" }
16+
mithril-common = { path = "../../mithril-common", version = "0.6.72" }
1717
reqwest = { workspace = true }
1818
semver = { workspace = true }
1919
serde = { workspace = true }

internal/mithril-aggregator-discovery/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include = ["**/*.rs", "Cargo.toml", "README.md", ".gitignore"]
1414
anyhow = { workspace = true }
1515
async-trait = { workspace = true }
1616
mithril-aggregator-client = { path = "../mithril-aggregator-client", version = "0.1" }
17-
mithril-common = { path = "../../mithril-common", version = "0.6.71" }
17+
mithril-common = { path = "../../mithril-common", version = "0.6.72" }
1818
rand = { version = "0.10.1" }
1919
reqwest = { workspace = true }
2020
serde = { workspace = true }

internal/mithril-era/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-era"
3-
version = "0.1.8"
3+
version = "0.1.9"
44
authors.workspace = true
55
documentation.workspace = true
66
edition.workspace = true

internal/mithril-era/src/era_checker.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
use std::sync::RwLock;
22

3+
use mithril_common::StdResult;
34
use mithril_common::api_version::ApiVersionDiscriminantSource;
45
use mithril_common::entities::{Epoch, SupportedEra};
6+
use mithril_common::signable_builder::SignableBuilderServiceEraFetcher;
57

68
struct SupportedEraStamp {
79
era: SupportedEra,
@@ -53,6 +55,13 @@ impl ApiVersionDiscriminantSource for EraChecker {
5355
}
5456
}
5557

58+
#[async_trait::async_trait]
59+
impl SignableBuilderServiceEraFetcher for EraChecker {
60+
async fn compute_current_era(&self) -> StdResult<SupportedEra> {
61+
Ok(self.current_era())
62+
}
63+
}
64+
5665
#[cfg(test)]
5766
mod tests {
5867
use mithril_common::test::double::Dummy;

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.8.50"
3+
version = "0.8.51"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-aggregator/src/dependency_injection/builder/protocol/signables.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,17 @@ impl DependenciesBuilder {
4848
&self.configuration.db_directory(),
4949
self.root_logger(),
5050
));
51+
#[cfg(feature = "future_snark")]
52+
let era_fetcher = self.get_era_checker().await?;
5153
let signable_builders_dependencies = SignableBuilderServiceDependencies::new(
5254
mithril_stake_distribution_builder,
5355
immutable_signable_builder,
5456
cardano_transactions_builder,
5557
cardano_blocks_transactions_builder,
5658
cardano_stake_distribution_builder,
5759
cardano_database_signable_builder,
60+
#[cfg(feature = "future_snark")]
61+
era_fetcher,
5862
);
5963
let signable_builder_service = Arc::new(MithrilSignableBuilderService::new(
6064
seed_signable_builder,

mithril-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ flate2 = { version = "1.1.9", optional = true }
6969
flume = { version = "0.12.0", optional = true }
7070
futures = "0.3.32"
7171
mithril-aggregator-client = { path = "../internal/mithril-aggregator-client", version = "0.1.11" }
72-
mithril-common = { path = "../mithril-common", version = "0.6.71", default-features = false }
72+
mithril-common = { path = "../mithril-common", version = "0.6.72", default-features = false }
7373
reqwest = { workspace = true, default-features = false, features = ["charset", "http2", "stream", "system-proxy"] }
7474
serde = { workspace = true }
7575
serde_json = { workspace = true }

0 commit comments

Comments
 (0)