@@ -21,36 +21,28 @@ pub use eip7594::constants::{
21
21
BYTES_PER_BLOB , BYTES_PER_CELL , BYTES_PER_COMMITMENT , BYTES_PER_FIELD_ELEMENT ,
22
22
CELLS_PER_EXT_BLOB , FIELD_ELEMENTS_PER_BLOB ,
23
23
} ;
24
- use eip7594:: prover:: ProverContext as eip7594_ProverContext;
25
- use eip7594:: verifier:: { VerifierContext as eip7594_VerifierContext, VerifierError } ;
24
+ use eip7594:: verifier:: VerifierError ;
26
25
27
- // TODO: Add this into eip7594 spec tests
28
-
29
- /// The context that will be used to create and verify proofs.
26
+ // This is a wrapper around the PeerDASContext from the eip7594 library.
27
+ // We need to wrap it as some bindgen tools cannot pick up items
28
+ // not defined in this file.
29
+ #[ derive( Default ) ]
30
30
pub struct PeerDASContext {
31
- prover_ctx : eip7594_ProverContext ,
32
- verifier_ctx : eip7594_VerifierContext ,
33
- }
34
-
35
- impl Default for PeerDASContext {
36
- fn default ( ) -> Self {
37
- PeerDASContext {
38
- prover_ctx : eip7594_ProverContext:: new ( ) ,
39
- verifier_ctx : eip7594_VerifierContext:: new ( ) ,
40
- }
41
- }
31
+ inner : eip7594:: PeerDASContext ,
42
32
}
43
33
44
34
impl PeerDASContext {
45
- pub fn prover_ctx ( & self ) -> & eip7594_ProverContext {
46
- & self . prover_ctx
35
+ pub fn prover_ctx ( & self ) -> & eip7594 :: prover :: ProverContext {
36
+ self . inner . prover_ctx ( )
47
37
}
48
38
49
- pub fn verifier_ctx ( & self ) -> & eip7594_VerifierContext {
50
- & self . verifier_ctx
39
+ pub fn verifier_ctx ( & self ) -> & eip7594 :: verifier :: VerifierContext {
40
+ & self . inner . verifier_ctx
51
41
}
52
42
}
53
43
44
+ // TODO: Add this into eip7594 spec tests
45
+
54
46
/// Create a new PeerDASContext and return a pointer to it.
55
47
///
56
48
/// # Memory faults
0 commit comments