Skip to content

Commit e0ad33f

Browse files
authored
Merge pull request #3249 from input-output-hk/damrobi/msnark/2944-trusted-setup-validation
feat(stm): Trusted setup validation
2 parents 945c12f + c5f412c commit e0ad33f

5 files changed

Lines changed: 474 additions & 3 deletions

File tree

Cargo.lock

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

mithril-stm/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.10.16 (05-07-2026)
9+
10+
### Changed
11+
12+
- Added a system to handle the downloading and verification of the SRS and to store it locally.
13+
814
## 0.10.15 (05-07-2026)
915

1016
### Changed

mithril-stm/Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-stm"
3-
version = "0.10.15"
3+
version = "0.10.16"
44
edition = { workspace = true }
55
authors = { workspace = true }
66
homepage = { workspace = true }
@@ -30,7 +30,13 @@ future_snark = [
3030
"dep:rand",
3131
"dep:sha2",
3232
"dep:rand_chacha",
33+
"dep:reqwest",
34+
"rustls", # Temporarily activate rustls before it is activated in the caller
3335
]
36+
# TLS backend for the SRS download client (used by `future_snark`).
37+
# Exactly one of these must be enabled together with `future_snark`.
38+
native-tls = ["reqwest?/native-tls"]
39+
rustls = ["reqwest?/rustls"]
3440
num-integer-backend = ["dep:num-bigint", "dep:num-integer", "dep:num-rational", "dep:num-traits"]
3541
rug-backend = ["rug/default"]
3642

@@ -55,6 +61,7 @@ rand = { version = "0.10.1", optional = true }
5561
rand_chacha = { workspace = true, optional = true }
5662
rand_core = { workspace = true, features = ["std"] }
5763
rayon = { workspace = true }
64+
reqwest = { workspace = true, default-features = false, features = ["blocking"], optional = true }
5865
serde = { workspace = true }
5966
sha2 = { version = "0.10.9", optional = true }
6067
subtle = "2.6.1"
@@ -77,6 +84,7 @@ rug = { version = "1.29.0", optional = true }
7784
[dev-dependencies]
7885
blake2b_simd = "1.0.3"
7986
criterion = { version = "0.8.2", features = ["html_reports"] }
87+
httpmock = "0.8.3"
8088
num-bigint = "0.4.6"
8189
num-rational = "0.4.2"
8290
proptest = "1.11.0"

mithril-stm/src/circuits/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,22 @@
77

88
pub mod halo2;
99
pub mod halo2_ivc;
10+
pub mod trusted_setup;
1011

1112
#[cfg(test)]
1213
pub(crate) mod test_utils;
1314

1415
pub(crate) use halo2::witness::{
1516
CircuitInstance, CircuitMerkleTreeLeaf, CircuitWitness, MerklePath,
1617
};
18+
19+
/// Constant holding the current path of the cached values related to the circuits
20+
const MITHRIL_CIRCUIT_CACHE_FOLDER: &str = "mithril-circuit";
21+
22+
#[cfg(all(
23+
feature = "future_snark",
24+
not(any(feature = "rustls", feature = "native-tls"))
25+
))]
26+
compile_error!(
27+
"Enabling `future_snark` requires exactly one of the `rustls` or `native-tls` features."
28+
);

0 commit comments

Comments
 (0)