/// Returns a transcript without empty or default data so that it can be used
/// for tests whose aim is to detect changes in the serialization of the
/// transcript.
Returns a transcript without empty or default data so that it can be used
for tests whose aim is to detect changes in the serialization of the
transcript.
Returns a transcript without empty or default data so that it can be used for tests whose aim is to detect changes in the serialization of the transcript .
fn transcript_without_empty_or_default_data() -> NiDkgTranscript {
    use ic_crypto_internal_types::curves::bls12_381::{G1, G2};
    use ic_crypto_internal_types::sign::threshold_sig::ni_dkg::ni_dkg_groth20_bls12_381::{
        EncryptedShares, PublicCoefficientsBytes, Transcript, NUM_CHUNKS,
    };
    use ic_crypto_internal_types::sign::threshold_sig::ni_dkg::CspNiDkgTranscript;
    use ic_crypto_internal_types::sign::threshold_sig::public_key::bls12_381::PublicKeyBytes;
    let encrypted_shares = EncryptedShares {
        rand_r: [G1([1; G1::SIZE]); NUM_CHUNKS],
        rand_s: [G1([12; G1::SIZE]); NUM_CHUNKS],
        rand_z: [G2([123; G2::SIZE]); NUM_CHUNKS],
        ciphertext_chunks: vec![[G1([234; G1::SIZE]); NUM_CHUNKS]],
    };
    NiDkgTranscript {
        dkg_id: NiDkgId {
            start_block_height: Height::new(0),
            dealer_subnet: SUBNET_1,
            dkg_tag: NiDkgTag::LowThreshold,
            target_subnet: NiDkgTargetSubnet::Remote(NiDkgTargetId::new([42; 32])),
        },
        threshold: NiDkgThreshold::new(NumberOfNodes::new(1)).unwrap(),
        committee: NiDkgReceivers::new(set_of(&[NODE_1])).expect("could not create committee"),
        registry_version: REG_V1,
        internal_csp_transcript: CspNiDkgTranscript::Groth20_Bls12_381(Transcript {
            public_coefficients: PublicCoefficientsBytes {
                coefficients: vec![PublicKeyBytes([42; PublicKeyBytes::SIZE])],
            },
            receiver_data: map_of(vec![(43, encrypted_shares)]),
        }),
    }
}
fn transcript_without_empty_or_default_data ( ) -> NiDkgTranscript { use ic_crypto_internal_types :: curves :: bls12_381 :: { G1 , G2 } ; use ic_crypto_internal_types :: sign :: threshold_sig :: ni_dkg :: ni_dkg_groth20_bls12_381 :: { EncryptedShares , PublicCoefficientsBytes , Transcript , NUM_CHUNKS , } ; use ic_crypto_internal_types :: sign :: threshold_sig :: ni_dkg :: CspNiDkgTranscript ; use ic_crypto_internal_types :: sign :: threshold_sig :: public_key :: bls12_381 :: PublicKeyBytes ; let encrypted_shares = EncryptedShares { rand_r : [ G1 ( [ 1 ; G1 :: SIZE ] ) ; NUM_CHUNKS ] , rand_s : [ G1 ( [ 12 ; G1 :: SIZE ] ) ; NUM_CHUNKS ] , rand_z : [ G2 ( [ 123 ; G2 :: SIZE ] ) ; NUM_CHUNKS ] , ciphertext_chunks : vec ! [ [ G1 ( [ 234 G1 SIZE ] ) NUM_CHUNKS ] ] , } ; NiDkgTranscript { dkg_id : NiDkgId { start_block_height : Height :: new ( 0 ) , dealer_subnet : SUBNET_1 , dkg_tag : NiDkgTag :: LowThreshold , target_subnet : NiDkgTargetSubnet :: Remote ( NiDkgTargetId :: new ( [ 42 ; 32 ] ) ) , } , threshold : NiDkgThreshold :: new ( NumberOfNodes :: new ( 1 ) ) . unwrap ( ) , committee : NiDkgReceivers :: new ( set_of ( & [ NODE_1 ] ) ) . expect ( " " ) , registry_version : REG_V1 , internal_csp_transcript : CspNiDkgTranscript :: Groth20_Bls12_381 ( Transcript { public_coefficients : PublicCoefficientsBytes { coefficients : vec ! [ PublicKeyBytes ( [ 42 PublicKeyBytes SIZE ] ) ] , } , receiver_data : map_of ( vec ! [ ( 43 encrypted_shares ) ] ) , } ) , } }
Returns a transcript without empty or default data so that it can be used
for tests whose aim is to detect changes in the serialization of the
transcript.
Returns a transcript without empty or default data so that it can be used for tests whose aim is to detect changes in the serialization of the transcript .