Skip to content

Commit 75dfb67

Browse files
authored
Merge pull request #1290 from input-output-hk/jpraynaud/1254-fix-build-stm-wasm
Fix `mithril-stm` WASM build
2 parents e1c36ba + df47efe commit 75dfb67

File tree

6 files changed

+34
-4
lines changed

6 files changed

+34
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-stm/CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,44 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

8+
## 0.3.7 (10-10-2023)
9+
10+
### Added
11+
12+
- Implemented a build script that automatically detects that WASM is not targeted, and automatically activates the feature `batch-verify-aggregates` (which enables batch verification of signatures).
13+
714
## 0.3.0 (10-08-2023)
15+
816
### Added
17+
918
- Added `Coreverifier` struct and its functionalities to cover signature procedure for a full node.
1019
- Adapted existing functionality to inherit from a more generic structure `Coreverifier`.
1120
- Added tests for core verification.
1221

1322
## 0.2.5 (15-03-2023)
23+
1424
### Added
25+
1526
- Included helper functions for unsafe code
1627
- Added tests for batch verification
28+
1729
## 0.2.1 (04-01-2023)
30+
1831
### Added
32+
1933
- Batch verification for `StmAggrSig`.
2034

2135
## 0.2.0 (16-12-2022)
36+
2237
### Changed
38+
2339
- Adapted the `Signature` struct, so that it does not contain the verification key and
24-
the stake, as these values are not required.
40+
the stake, as these values are not required.
2541

2642
## 0.1.0 (05-12-2022)
27-
Initial release.
43+
44+
Initial release.

mithril-stm/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-stm"
3-
version = "0.3.6"
3+
version = "0.3.7"
44
edition = { workspace = true }
55
authors = { workspace = true }
66
documentation = { workspace = true }

mithril-stm/build.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use std::env;
2+
3+
fn main() {
4+
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
5+
let target_no_batch_verify_aggregates =
6+
target_arch.eq("wasm32") || env::var("STM_TEST_NO_BATCH_VERIFY_AGGREGATES").is_ok();
7+
8+
if !target_no_batch_verify_aggregates {
9+
println!("cargo:rustc-cfg=feature=\"batch-verify-aggregates\"");
10+
}
11+
}

mithril-stm/src/multi_sig.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ impl Signature {
404404
}
405405

406406
/// Batch verify several sets of signatures with their corresponding verification keys.
407+
#[cfg(feature = "batch-verify-aggregates")]
407408
pub fn batch_verify_aggregates(
408409
msgs: &[Vec<u8>],
409410
vks: &[VerificationKey],

mithril-stm/src/stm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ impl<D: Clone + Digest + FixedOutput + Send + Sync> StmAggrSig<D> {
789789
}
790790

791791
/// Batch verify a set of signatures, with different messages and avks.
792+
#[cfg(feature = "batch-verify-aggregates")]
792793
pub fn batch_verify(
793794
stm_signatures: &[Self],
794795
msgs: &[Vec<u8>],

0 commit comments

Comments
 (0)