mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
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:
@@ -23,7 +23,7 @@ pub use rust_eth_kzg::{
|
|||||||
constants::{BYTES_PER_CELL, CELLS_PER_EXT_BLOB},
|
constants::{BYTES_PER_CELL, CELLS_PER_EXT_BLOB},
|
||||||
Cell, CellIndex as CellID, CellRef, TrustedSetup as PeerDASTrustedSetup,
|
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
|
/// Disables the fixed-base multi-scalar multiplication optimization for computing
|
||||||
/// cell KZG proofs, because `rust-eth-kzg` already handles the precomputation.
|
/// cell KZG proofs, because `rust-eth-kzg` already handles the precomputation.
|
||||||
@@ -269,6 +269,7 @@ impl Kzg {
|
|||||||
.push((cell, *proof, *commitment));
|
.push((cell, *proof, *commitment));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let span = Span::current();
|
||||||
column_groups
|
column_groups
|
||||||
.into_par_iter()
|
.into_par_iter()
|
||||||
.map(|(column_index, column_data)| {
|
.map(|(column_index, column_data)| {
|
||||||
@@ -286,6 +287,7 @@ impl Kzg {
|
|||||||
// This is safe from span explosion as we have at most 128 chunks,
|
// This is safe from span explosion as we have at most 128 chunks,
|
||||||
// i.e. the number of column indices.
|
// i.e. the number of column indices.
|
||||||
let _span = tracing::debug_span!(
|
let _span = tracing::debug_span!(
|
||||||
|
parent: span.clone(),
|
||||||
"verify_cell_proof_chunk",
|
"verify_cell_proof_chunk",
|
||||||
cells = cells.len(),
|
cells = cells.len(),
|
||||||
column_index,
|
column_index,
|
||||||
|
|||||||
Reference in New Issue
Block a user