---
# System prepended metadata

title: ckzg aghhhh

---

So lighthouse is working without any issues on devnet8 when the  [`verify_blob_kzg_proof`](https://github.com/pawanjay176/c-kzg-4844/blob/465edc3d3f26b8bfeaad5f4a87e21a70bf859278/bindings/rust/src/bindings/mod.rs#L350-L355)  is defined like this
```rust
pub fn verify_blob_kzg_proof(
    blob: Box<Blob>,
    commitment_bytes: Bytes48,
    proof_bytes: Bytes48,
    kzg_settings: &KZGSettings,
) -> Result<bool, Error> {
...
}
```

The underlying ffi function requires a const pointer to Blob so the function simply uses the `Box::as_ref` method to coerce it into a reference.

In Lighthouse, we have an ssz blob which has a vector as the underlying storage for the blob. We use the [`ssz_blob_to_crypto_blob`](https://github.com/pawanjay176/lighthouse/blob/8f31752e6d55a64968828f0916563f7bdfccc1c8/beacon_node/beacon_chain/src/kzg_utils.rs#L6-L10) function which 
returns a Boxed blob in the ckzg format and we pass this Blob to the c-kzg library. Everything works fine now.

Now I made this change where instead of the ckzg library requiring `Box<Blob>` as an argument, we just pass a reference to the `Blob` in the `verify_blob_kzg_proof` function
```rust
pub fn verify_blob_kzg_proof(
    blob: &Blob,
    commitment_bytes: Bytes48,
    proof_bytes: Bytes48,
    kzg_settings: &KZGSettings,
) -> Result<bool, Error> {
...
}
```
On the lighthouse side, I just generated the same `Box<Blob>` like earlier and passed it to the ckzg functions using `Box::as_ref`. So the only thing that changed imo is where we are deferencing the `Blob`. 

Earlier, we were doing it in the `c_kzg::verify_blob_kzg_proof` function, now we are doing it in lighthouse. But this change makes lighthouse crash on the devnet with the status access violation. I have no idea why. Anyone have any ideas? i'd be forever grateful lol :pray:

These are the underlying changes to ckzg and lighthouse that make lighthouse crash:

lighthouse changes https://github.com/pawanjay176/lighthouse/commit/94298dbbdefb5b1c1b987142905e45ff1368dcc6

c-kzg changes
https://github.com/pawanjay176/c-kzg-4844/commit/92ffb29939987d544ff1ce1f3fec732c75ffe2af

