Skip to content

Commit 4b47cf9

Browse files
committed
Add aggregate verification keys in fake_keys
1 parent 78d78a1 commit 4b47cf9

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

mithril-common/src/test_utils/fake_keys.rs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,32 @@ pub const fn operational_certificate<'a>() -> [&'a str; 2] {
332332
]
333333
}
334334

335+
/// A list of pre json hex encoded [MithrilStm:StmAggrVerificationKey](struct@mithril_stm::stm::StmAggrVerificationKey)
336+
pub const fn aggregate_verification_key<'a>() -> [&'a str; 3] {
337+
[
338+
"7b226d745f636f6d6d69746d656e74223a7b22726f6f74223a5b3134302c31332c3135352c3134312c3136332c\
339+
372c38362c3232372c34372c31392c3138302c3132372c3139362c3130382c3137312c3135382c3134302c37372\
340+
c3137352c3135392c3133362c3139332c3130382c34322c3134322c3234342c38352c3131362c3235322c313536\
341+
2c3233352c35305d2c226e725f6c6561766573223a312c22686173686572223a6e756c6c7d2c22746f74616c5f7\
342+
374616b65223a313030393439373433323536397d",
343+
"7b226d745f636f6d6d69746d656e74223a7b22726f6f74223a5b37332c37342c3232392c3235302c3132322c32\
344+
32362c38392c33372c3233312c3234352c3130362c3138332c3132372c332c39392c3137372c3231372c36352c3\
345+
135322c3133352c33322c36372c3232332c33352c3134312c35312c342c3132352c3230332c33382c3139362c32\
346+
31325d2c226e725f6c6561766573223a32342c22686173686572223a6e756c6c7d2c22746f74616c5f7374616b6\
347+
5223a35323337353137363336353838327d",
348+
"7b226d745f636f6d6d69746d656e74223a7b22726f6f74223a5b39382c3234312c3132322c37382c3230322c33\
349+
2c3230322c37322c36372c3231352c3139302c3135322c3130332c3135392c39372c35352c32362c3232312c313\
350+
7372c38352c3233392c3132372c39322c35332c3131332c3235322c39302c39372c39352c3133342c3233342c36\
351+
375d2c226e725f6c6561766573223a36342c22686173686572223a6e756c6c7d2c22746f74616c5f7374616b652\
352+
23a313236393036323837373536363033367d",
353+
]
354+
}
355+
335356
#[cfg(test)]
336357
mod test {
337358
use super::*;
338359
use kes_summed_ed25519::kes::Sum6KesSig;
339-
use mithril_stm::stm::{StmAggrSig, StmSig, StmVerificationKeyPoP};
360+
use mithril_stm::stm::{StmAggrSig, StmAggrVerificationKey, StmSig, StmVerificationKeyPoP};
340361
use serde::{de::DeserializeOwned, Serialize};
341362
use std::any::type_name;
342363

@@ -433,4 +454,11 @@ mod test {
433454
fn assert_encoded_operational_certificate_are_still_matching_concrete_type() {
434455
assert_can_deserialize_using_key_decode_hex::<OpCert>(&operational_certificate());
435456
}
457+
458+
#[test]
459+
fn assert_encoded_aggregate_verification_key_are_still_matching_concrete_type() {
460+
assert_can_deserialize_using_key_decode_hex::<StmAggrVerificationKey<D>>(
461+
&aggregate_verification_key(),
462+
);
463+
}
436464
}

0 commit comments

Comments
 (0)