File tree Expand file tree Collapse file tree 6 files changed +14
-12
lines changed
crates/proof-compression/src Expand file tree Collapse file tree 6 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ where
124124 }
125125
126126 fn prove (
127- ctx : & Self :: Context ,
127+ ctx : Self :: Context ,
128128 proving_assembly : Self :: ProvingAssembly ,
129129 aux_config : Self :: AuxConfig ,
130130 precomputation : & Self :: Precomputation ,
@@ -142,7 +142,7 @@ where
142142 }
143143
144144 fn prove_from_witnesses (
145- _ctx : & Self :: Context ,
145+ ctx : Self :: Context ,
146146 witness : Self :: ExternalWitnessData ,
147147 aux_config : Self :: AuxConfig ,
148148 precomputation : & Self :: Precomputation ,
@@ -175,6 +175,7 @@ where
175175 cache_strategy,
176176 )
177177 . context ( "failed to generate gpu compression proof" ) ?;
178+ drop ( ctx) ;
178179 let proof = gpu_proof. into ( ) ;
179180
180181 Ok ( proof)
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ impl SnarkWrapperProofSystem for FflonkSnarkWrapper {
9696 }
9797
9898 fn prove (
99- _ctx : & Self :: Context ,
99+ ctx : Self :: Context ,
100100 mut proving_assembly : Self :: ProvingAssembly ,
101101 precomputation : & Self :: Precomputation ,
102102 finalization_hint : & Self :: FinalizationHint ,
@@ -117,11 +117,12 @@ impl SnarkWrapperProofSystem for FflonkSnarkWrapper {
117117 )
118118 . map_err ( |e| anyhow:: anyhow!( "Failed to create proof for FflonkSnarkWrapper: {:?}" , e) ) ?;
119119 println ! ( "fflonk proving takes {} s" , start. elapsed( ) . as_secs( ) ) ;
120+ drop ( ctx) ;
120121 Ok ( proof)
121122 }
122123
123124 fn prove_from_witnesses (
124- _: & Self :: Context ,
125+ _: Self :: Context ,
125126 _: Self :: ExternalWitnessData ,
126127 _: & Self :: Precomputation ,
127128 _: & Self :: FinalizationHint ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ pub trait CompressionProofSystem:
5050 ) -> Self :: ProvingAssembly ;
5151
5252 fn prove (
53- _: & Self :: Context ,
53+ _: Self :: Context ,
5454 _: Self :: ProvingAssembly ,
5555 _: Self :: AuxConfig ,
5656 _: & Self :: Precomputation ,
@@ -59,7 +59,7 @@ pub trait CompressionProofSystem:
5959 ) -> anyhow:: Result < Self :: Proof > ;
6060
6161 fn prove_from_witnesses (
62- _: & Self :: Context ,
62+ _: Self :: Context ,
6363 _: Self :: ExternalWitnessData ,
6464 _: Self :: AuxConfig ,
6565 _: & Self :: Precomputation ,
@@ -89,14 +89,14 @@ pub trait SnarkWrapperProofSystem: ProofSystemDefinition {
8989 fn load_compact_raw_crs < R : std:: io:: Read > ( src : R ) -> anyhow:: Result < Self :: CRS > ;
9090 fn synthesize_for_proving ( circuit : Self :: Circuit ) -> Self :: ProvingAssembly ;
9191 fn prove (
92- _: & Self :: Context ,
92+ _: Self :: Context ,
9393 _: Self :: ProvingAssembly ,
9494 _: & Self :: Precomputation ,
9595 _: & Self :: FinalizationHint ,
9696 ) -> anyhow:: Result < Self :: Proof > ;
9797
9898 fn prove_from_witnesses (
99- _: & Self :: Context ,
99+ _: Self :: Context ,
100100 _: Self :: ExternalWitnessData ,
101101 _: & Self :: Precomputation ,
102102 _: & Self :: FinalizationHint ,
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ impl SnarkWrapperProofSystem for PlonkSnarkWrapper {
244244 }
245245
246246 fn prove (
247- _: & Self :: Context ,
247+ _: Self :: Context ,
248248 _: Self :: ProvingAssembly ,
249249 _: & Self :: Precomputation ,
250250 _: & Self :: FinalizationHint ,
@@ -254,7 +254,7 @@ impl SnarkWrapperProofSystem for PlonkSnarkWrapper {
254254 }
255255
256256 fn prove_from_witnesses (
257- _: & Self :: Context ,
257+ _: Self :: Context ,
258258 _: Vec < Self :: FieldElement , Self :: Allocator > ,
259259 _: & Self :: Precomputation ,
260260 _: & Self :: FinalizationHint ,
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ pub trait CompressionStep: CompressionProofSystem {
7979 let aux_config =
8080 <Self as CompressionProofSystem >:: aux_config_from_assembly ( & proving_assembly) ;
8181 let proof = <Self as CompressionProofSystem >:: prove (
82- & ctx,
82+ ctx,
8383 proving_assembly,
8484 aux_config,
8585 precomputation,
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ pub trait SnarkWrapperStep: SnarkWrapperProofSystem {
8686 let precomputation = & setup_data_cache. precomputation ;
8787
8888 let proof = <Self as SnarkWrapperProofSystem >:: prove (
89- & ctx,
89+ ctx,
9090 proving_assembly,
9191 precomputation,
9292 finalization_hint,
You can’t perform that action at this time.
0 commit comments