Fixed orphaned verify_cell_proof_chunk span. (#8026)

Fixed orphaned kzg verify cell proof chunk spans. See screenshot:

<img width="1898" height="574" alt="image" src="https://github.com/user-attachments/assets/d60d8768-f995-407d-b7af-59722429e175" />

The parent span needs to be passed explicitly to the chunk verification span as parent, as rayon runs the function in a separate thread.


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
Jimmy Chen
2025-09-11 07:02:27 +10:00
committed by GitHub
parent 2ecbb7f90b
commit 02d519e957

View File

@@ -23,7 +23,7 @@ pub use rust_eth_kzg::{
constants::{BYTES_PER_CELL, CELLS_PER_EXT_BLOB},
Cell, CellIndex as CellID, CellRef, TrustedSetup as PeerDASTrustedSetup,
};
use tracing::instrument;
use tracing::{instrument, Span};
/// Disables the fixed-base multi-scalar multiplication optimization for computing
/// cell KZG proofs, because `rust-eth-kzg` already handles the precomputation.
@@ -269,6 +269,7 @@ impl Kzg {
.push((cell, *proof, *commitment));
}
let span = Span::current();
column_groups
.into_par_iter()
.map(|(column_index, column_data)| {
@@ -286,6 +287,7 @@ impl Kzg {
// This is safe from span explosion as we have at most 128 chunks,
// i.e. the number of column indices.
let _span = tracing::debug_span!(
parent: span.clone(),
"verify_cell_proof_chunk",
cells = cells.len(),
column_index,