@@ -419,31 +419,6 @@ where
419419 }
420420}
421421
422- /// Define type aliases for the given ring suite.
423- #[ macro_export]
424- macro_rules! ring_suite_types {
425- ( $suite: ident) => {
426- #[ allow( dead_code) ]
427- pub type PcsParams = $crate:: ring:: PcsParams <$suite>;
428- #[ allow( dead_code) ]
429- pub type RingContext = $crate:: ring:: RingContext <$suite>;
430- #[ allow( dead_code) ]
431- pub type RingProverKey = $crate:: ring:: RingProverKey <$suite>;
432- #[ allow( dead_code) ]
433- pub type RingVerifierKey = $crate:: ring:: RingVerifierKey <$suite>;
434- #[ allow( dead_code) ]
435- pub type RingCommitment = $crate:: ring:: RingCommitment <$suite>;
436- #[ allow( dead_code) ]
437- pub type RingProver = $crate:: ring:: RingProver <$suite>;
438- #[ allow( dead_code) ]
439- pub type RingVerifier = $crate:: ring:: RingVerifier <$suite>;
440- #[ allow( dead_code) ]
441- pub type RingProof = $crate:: ring:: Proof <$suite>;
442- #[ allow( dead_code) ]
443- pub type RingVerifierKeyBuilder = $crate:: ring:: RingVerifierKeyBuilder <$suite>;
444- } ;
445- }
446-
447422/// Information required for incremental ring construction.
448423///
449424/// Basically the SRS in Lagrangian form plus G1 generator used in the monomial form.
@@ -548,16 +523,16 @@ where
548523 if avail_slots < pks. len ( ) {
549524 return Err ( avail_slots) ;
550525 }
551- let pks = TEMapping :: to_te_slice ( pks) ;
552- // Currently ring_proof backend panics if `srs_loader` fails.
553- // As it stands, this workaround prevents it (but requires a clone).
526+ // Currently `ring-proof` backend panics if `srs_loader` fails.
527+ // This workaround makes loader failures a bit less harsh.
554528 let segment = srs_loader
555529 . load ( self . partial . curr_keys ..self . partial . curr_keys + pks. len ( ) )
556530 . ok_or ( usize:: MAX ) ?;
557531 let srs_loader = |range : Range < usize > | {
558532 debug_assert_eq ! ( segment. len( ) , range. len( ) ) ;
559533 Ok ( segment. clone ( ) )
560534 } ;
535+ let pks = TEMapping :: to_te_slice ( pks) ;
561536 self . partial . append ( & pks, srs_loader) ;
562537 Ok ( ( ) )
563538 }
@@ -568,6 +543,31 @@ where
568543 }
569544}
570545
546+ /// Define type aliases for the given ring suite.
547+ #[ macro_export]
548+ macro_rules! ring_suite_types {
549+ ( $suite: ident) => {
550+ #[ allow( dead_code) ]
551+ pub type PcsParams = $crate:: ring:: PcsParams <$suite>;
552+ #[ allow( dead_code) ]
553+ pub type RingContext = $crate:: ring:: RingContext <$suite>;
554+ #[ allow( dead_code) ]
555+ pub type RingProverKey = $crate:: ring:: RingProverKey <$suite>;
556+ #[ allow( dead_code) ]
557+ pub type RingVerifierKey = $crate:: ring:: RingVerifierKey <$suite>;
558+ #[ allow( dead_code) ]
559+ pub type RingCommitment = $crate:: ring:: RingCommitment <$suite>;
560+ #[ allow( dead_code) ]
561+ pub type RingProver = $crate:: ring:: RingProver <$suite>;
562+ #[ allow( dead_code) ]
563+ pub type RingVerifier = $crate:: ring:: RingVerifier <$suite>;
564+ #[ allow( dead_code) ]
565+ pub type RingProof = $crate:: ring:: Proof <$suite>;
566+ #[ allow( dead_code) ]
567+ pub type RingVerifierKeyBuilder = $crate:: ring:: RingVerifierKeyBuilder <$suite>;
568+ } ;
569+ }
570+
571571#[ cfg( test) ]
572572pub ( crate ) mod testing {
573573 use super :: * ;
0 commit comments