@@ -149,7 +149,7 @@ mod test_dkg_full {
149149 let server_aggregate =
150150 AggregatedTranscript :: from_transcripts ( transcripts) . unwrap ( ) ;
151151 assert ! ( server_aggregate
152- . aggregate
152+ . aggregate( )
153153 . verify_aggregation( dkg, transcripts)
154154 . unwrap( ) ) ;
155155
@@ -161,7 +161,7 @@ mod test_dkg_full {
161161 . get_validator ( & validator_keypair. public_key ( ) )
162162 . unwrap ( ) ;
163163 server_aggregate
164- . aggregate
164+ . aggregate ( )
165165 . create_decryption_share_simple (
166166 ciphertext_header,
167167 aad,
@@ -207,13 +207,13 @@ mod test_dkg_full {
207207 let local_aggregate =
208208 AggregatedTranscript :: from_transcripts ( & transcripts) . unwrap ( ) ;
209209 assert ! ( local_aggregate
210- . aggregate
210+ . aggregate( )
211211 . verify_aggregation( & dkg, & transcripts)
212212 . unwrap( ) ) ;
213213 let ciphertext = ferveo_tdec:: encrypt :: < E > (
214214 SecretBox :: new ( MSG . into ( ) ) ,
215215 AAD ,
216- & local_aggregate. public_key ,
216+ & local_aggregate. public_key ( ) ,
217217 rng,
218218 )
219219 . unwrap ( ) ;
@@ -259,13 +259,13 @@ mod test_dkg_full {
259259 let local_aggregate =
260260 AggregatedTranscript :: from_transcripts ( & transcripts) . unwrap ( ) ;
261261 assert ! ( local_aggregate
262- . aggregate
262+ . aggregate( )
263263 . verify_aggregation( & dkg, & transcripts)
264264 . unwrap( ) ) ;
265265 let ciphertext = ferveo_tdec:: encrypt :: < E > (
266266 SecretBox :: new ( MSG . into ( ) ) ,
267267 AAD ,
268- & local_aggregate. public_key ,
268+ & local_aggregate. public_key ( ) ,
269269 rng,
270270 )
271271 . unwrap ( ) ;
@@ -299,7 +299,7 @@ mod test_dkg_full {
299299 . get_validator ( & validator_keypair. public_key ( ) )
300300 . unwrap ( ) ;
301301 local_aggregate
302- . aggregate
302+ . aggregate ( )
303303 . create_decryption_share_precomputed (
304304 & ciphertext. header ( ) . unwrap ( ) ,
305305 AAD ,
@@ -344,13 +344,13 @@ mod test_dkg_full {
344344 let local_aggregate =
345345 AggregatedTranscript :: from_transcripts ( & transcripts) . unwrap ( ) ;
346346 assert ! ( local_aggregate
347- . aggregate
347+ . aggregate( )
348348 . verify_aggregation( & dkg, & transcripts)
349349 . unwrap( ) ) ;
350350 let ciphertext = ferveo_tdec:: encrypt :: < E > (
351351 SecretBox :: new ( MSG . into ( ) ) ,
352352 AAD ,
353- & local_aggregate. public_key ,
353+ & local_aggregate. public_key ( ) ,
354354 rng,
355355 )
356356 . unwrap ( ) ;
@@ -365,7 +365,7 @@ mod test_dkg_full {
365365 ) ;
366366
367367 izip ! (
368- & local_aggregate. aggregate. shares,
368+ & local_aggregate. aggregate( ) . shares,
369369 & validator_keypairs,
370370 & decryption_shares,
371371 )
@@ -386,7 +386,7 @@ mod test_dkg_full {
386386 let mut with_bad_decryption_share = decryption_share. clone ( ) ;
387387 with_bad_decryption_share. decryption_share = TargetField :: zero ( ) ;
388388 assert ! ( !with_bad_decryption_share. verify(
389- & local_aggregate. aggregate. shares[ 0 ] ,
389+ & local_aggregate. aggregate( ) . shares[ 0 ] ,
390390 & validator_keypairs[ 0 ] . public_key( ) . encryption_key,
391391 & ciphertext,
392392 ) ) ;
@@ -395,7 +395,7 @@ mod test_dkg_full {
395395 let mut with_bad_checksum = decryption_share;
396396 with_bad_checksum. validator_checksum . checksum = G1Affine :: zero ( ) ;
397397 assert ! ( !with_bad_checksum. verify(
398- & local_aggregate. aggregate. shares[ 0 ] ,
398+ & local_aggregate. aggregate( ) . shares[ 0 ] ,
399399 & validator_keypairs[ 0 ] . public_key( ) . encryption_key,
400400 & ciphertext,
401401 ) ) ;
@@ -427,13 +427,13 @@ mod test_dkg_full {
427427 let local_aggregate =
428428 AggregatedTranscript :: from_transcripts ( & transcripts) . unwrap ( ) ;
429429 assert ! ( local_aggregate
430- . aggregate
430+ . aggregate( )
431431 . verify_aggregation( & dkg, & transcripts)
432432 . unwrap( ) ) ;
433433 let ciphertext = ferveo_tdec:: encrypt :: < E > (
434434 SecretBox :: new ( MSG . into ( ) ) ,
435435 AAD ,
436- & local_aggregate. public_key ,
436+ & local_aggregate. public_key ( ) ,
437437 rng,
438438 )
439439 . unwrap ( ) ;
@@ -535,7 +535,7 @@ mod test_dkg_full {
535535 let decryption_share =
536536 AggregatedTranscript :: from_transcripts ( & transcripts)
537537 . unwrap ( )
538- . aggregate
538+ . aggregate ( )
539539 . create_decryption_share_simple (
540540 & ciphertext. header ( ) . unwrap ( ) ,
541541 AAD ,
@@ -619,15 +619,15 @@ mod test_dkg_full {
619619 let local_aggregate =
620620 AggregatedTranscript :: from_transcripts ( & transcripts) . unwrap ( ) ;
621621 assert ! ( local_aggregate
622- . aggregate
622+ . aggregate( )
623623 . verify_aggregation( & dkg, & transcripts)
624624 . unwrap( ) ) ;
625625
626626 // Ciphertext created from the aggregate public key
627627 let ciphertext = ferveo_tdec:: encrypt :: < E > (
628628 SecretBox :: new ( MSG . into ( ) ) ,
629629 AAD ,
630- & local_aggregate. public_key ,
630+ & local_aggregate. public_key ( ) ,
631631 rng,
632632 )
633633 . unwrap ( ) ;
@@ -665,12 +665,12 @@ mod test_dkg_full {
665665 // Participants distribute UpdateTranscripts and update their shares
666666 // accordingly. The result is a new, joint AggregatedTranscript.
667667 let new_aggregate = local_aggregate
668- . aggregate
668+ . aggregate ( )
669669 . refresh ( & update_transcripts, & validator_map)
670670 . unwrap ( ) ;
671671
672672 // TODO: Assert new aggregate is different than original, including coefficients
673- assert_ne ! ( local_aggregate. aggregate, new_aggregate) ;
673+ assert_ne ! ( local_aggregate. aggregate( ) , & new_aggregate) ;
674674
675675 // TODO: Show that all participants obtain the same new aggregate transcript.
676676
@@ -736,15 +736,15 @@ mod test_dkg_full {
736736 let local_aggregate =
737737 AggregatedTranscript :: from_transcripts ( & transcripts) . unwrap ( ) ;
738738 assert ! ( local_aggregate
739- . aggregate
739+ . aggregate( )
740740 . verify_aggregation( & dkg, & transcripts)
741741 . unwrap( ) ) ;
742742
743743 // Ciphertext created from the aggregate public key
744744 let ciphertext = ferveo_tdec:: encrypt :: < E > (
745745 SecretBox :: new ( MSG . into ( ) ) ,
746746 AAD ,
747- & local_aggregate. public_key ,
747+ & local_aggregate. public_key ( ) ,
748748 rng,
749749 )
750750 . unwrap ( ) ;
@@ -797,7 +797,7 @@ mod test_dkg_full {
797797 // We're doing this for testing purposes, but in practice, this is done
798798 // by the departing participant when using the high-level API.
799799 let share_commitments = get_share_commitments_from_poly_commitments :: < E > (
800- & local_aggregate. aggregate . coeffs ,
800+ & local_aggregate. aggregate ( ) . coeffs ,
801801 & dkg. domain ,
802802 ) ;
803803 let share_commitment = ShareCommitment :: < E > (
@@ -821,13 +821,13 @@ mod test_dkg_full {
821821 ) ;
822822
823823 let aggregate_after_handover = local_aggregate
824- . aggregate
824+ . aggregate ( )
825825 . finalize_handover ( & handover_transcript, departing_keypair)
826826 . unwrap ( ) ;
827827
828828 // If we use a different keypair, we should get an error
829829 let error = local_aggregate
830- . aggregate
830+ . aggregate ( )
831831 . finalize_handover (
832832 & handover_transcript,
833833 & incoming_validator_keypair,
@@ -839,22 +839,23 @@ mod test_dkg_full {
839839 ) ;
840840
841841 // New aggregate is different than original...
842- assert_ne ! ( local_aggregate. aggregate, aggregate_after_handover) ;
842+ assert_ne ! ( local_aggregate. aggregate( ) , & aggregate_after_handover) ;
843843
844844 // ...but let's look a bit deeper:
845845 // - Polynomial coefficients are the same, which makes sense since the private shares are not changing
846846 assert_eq ! (
847- local_aggregate. aggregate. coeffs,
847+ local_aggregate. aggregate( ) . coeffs,
848848 aggregate_after_handover. coeffs
849849 ) ;
850850 // - The shares vector is different ...
851851 assert_ne ! (
852- local_aggregate. aggregate. shares,
852+ local_aggregate. aggregate( ) . shares,
853853 aggregate_after_handover. shares
854854 ) ;
855855 // ... but actually they only differ at the handover index
856856 for i in 0 ..shares_num {
857- let share_before = local_aggregate. aggregate . shares . get ( i as usize ) ;
857+ let share_before =
858+ local_aggregate. aggregate ( ) . shares . get ( i as usize ) ;
858859 let share_after = aggregate_after_handover. shares . get ( i as usize ) ;
859860 if i == handover_slot_index {
860861 assert_ne ! ( share_before, share_after) ;
0 commit comments