Skip to content

Commit e894540

Browse files
committed
chore: remove previous overarching note on safety
1 parent 4b57ae1 commit e894540

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

bindings/c/src/lib.rs

+1-21
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,7 @@ pub use eip7594::constants::{
2424
use eip7594::prover::ProverContext as eip7594_ProverContext;
2525
use eip7594::verifier::{VerifierContext as eip7594_VerifierContext, VerifierError};
2626

27-
/*
28-
29-
A note on safety and API:
30-
31-
- It is also the callers responsibility to ensure that pointers are properly aligned. We do not check that *ctx PeerDASContext
32-
points to a PeerDASContext, we simply deref.
33-
34-
- TODO(put this above every function) It is the callers responsibility to ensure that pointers to pointers point to the same type of data.
35-
- We could make this our responsibility, but then we would need to pass in all sizes for every element in the 2d array.
36-
37-
- It is the callers responsibility to ensure that the pointers that get passed in point to the minimum number of bytes required, to dereference them safely.
38-
- If the pointers, point to region of memory that is less than the minimum number of bytes required, then this method will read from random memory.
39-
- If the pointers point to a region of memory that is more than the minimum number of bytes required, then this method will essentially truncate the memory region.
40-
41-
- For a particular instance, the length of the some parameters like blobs will always be the same.
42-
This means we do not need to pass the length in as a parameter, but we do so, so that we can check the users expectations on
43-
the expected length.
44-
45-
The alternative is to have the code calling the FFI API to check the length of the blob before calling this method.
46-
However this is not ideal, because every language called via the FFI API will need to repeat the same checks.
47-
*/
27+
// TODO: Add this into eip7594 spec tests
4828

4929
/// The context that will be used to create and verify proofs.
5030
pub struct PeerDASContext {

0 commit comments

Comments
 (0)