Skip to content

Commit e6dcad3

Browse files
committed
Add 'skip_signer_certification' feature
So we can smoothly migrate the Signers first and then the Aggregator on the preview network, also the Signer certification is not needed in the protocol demo.
1 parent 391dfdf commit e6dcad3

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

demo/protocol-demo/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ serde = { version = "1.0", features = ["derive"] }
1616
serde_json = "1.0"
1717

1818
[features]
19+
default = ["skip_signer_certification"]
1920
portable = ["mithril-common/portable"]
21+
skip_signer_certification = ["mithril-common/skip_signer_certification"]

mithril-aggregator/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,7 @@ slog-term = "2.9.0"
3939
tempfile = "3.3.0"
4040

4141
[features]
42+
default = ["skip_signer_certification"] # TODO: remove 'skip_signer_certification' from default features to activate full signer certification
4243
portable = ["mithril-common/portable"]
44+
skip_signer_certification = ["mithril-common/skip_signer_certification"]
4345

mithril-common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ slog-scope = "4.4.0"
4343

4444
[features]
4545
portable = ["mithril/portable"]
46+
skip_signer_certification = []

mithril-common/src/crypto_helper/cardano/key_certification.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ impl KeyRegWrapper {
183183
let cert = OpCert::from_file(opcert_path)?;
184184

185185
cert.validate().map_err(|_| RegisterError::InvalidOpCert)?;
186+
187+
#[cfg(feature = "skip_signer_certification")]
188+
println!("WARNING: Signer certification is skipped!!!");
189+
#[cfg(feature = "skip_signer_certification")]
186190
kes_sig
187191
.verify(kes_period, &cert.kes_vk, &pk.to_bytes())
188192
.map_err(|_| RegisterError::KesSignatureInvalid)?;

mithril-signer/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ mockall = "0.11.0"
3333
slog-term = "2.9.0"
3434

3535
[features]
36+
default = ["skip_signer_certification"] # TODO: remove 'skip_signer_certification' from default features to activate full signer certification
3637
portable = ["mithril-common/portable"]
38+
skip_signer_certification = ["mithril-common/skip_signer_certification"]

0 commit comments

Comments
 (0)