Commit 5a44c59 1 parent 8bafeda commit 5a44c59 Copy full SHA for 5a44c59
File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
use constants:: { BYTES_PER_BLOB , BYTES_PER_CELL , BYTES_PER_COMMITMENT } ;
2
- use prover:: ProverContext ;
3
- use trusted_setup:: TrustedSetup ;
4
- use verifier:: VerifierContext ;
2
+ pub use prover:: ProverContext ;
3
+ pub use trusted_setup:: TrustedSetup ;
4
+ pub use verifier:: VerifierContext ;
5
5
6
6
pub mod constants;
7
7
pub mod prover;
@@ -43,6 +43,17 @@ impl Default for PeerDASContext {
43
43
}
44
44
45
45
impl PeerDASContext {
46
+ pub fn with_threads ( trusted_setup : & TrustedSetup , num_threads : usize ) -> Self {
47
+ let thread_pool = std:: sync:: Arc :: new ( rayon:: ThreadPoolBuilder :: new ( )
48
+ . num_threads ( num_threads)
49
+ . build ( )
50
+ . unwrap ( ) ) ;
51
+ PeerDASContext {
52
+ prover_ctx : ProverContext :: from_threads_pool ( trusted_setup, thread_pool. clone ( ) ) ,
53
+ verifier_ctx : VerifierContext :: from_thread_pool ( trusted_setup, thread_pool) ,
54
+ }
55
+ }
56
+
46
57
pub fn prover_ctx ( & self ) -> & ProverContext {
47
58
& self . prover_ctx
48
59
}
You can’t perform that action at this time.
0 commit comments