Skip to content

Commit

Permalink
rename recover_cells_and_proofs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Aug 15, 2024
1 parent d8b124a commit 2419258
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bindings/c/src/recover_cells_and_kzg_proofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(crate) fn _recover_cells_and_proofs(
// Computation
//
let (recovered_cells, recovered_proofs) = ctx
.recover_cells_and_proofs(cell_indices.to_vec(), cells)
.recover_cells_and_kzg_proofs(cell_indices.to_vec(), cells)
.map_err(|err| CResult::with_error(&format!("{:?}", err)))?;
let recovered_cells_unboxed = recovered_cells.map(|cell| cell.to_vec());

Expand Down
2 changes: 1 addition & 1 deletion bindings/java/rust_code/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ fn recover_cells_and_kzg_proofs<'local>(
.map(|cell| slice_to_array_ref(cell, "cell"))
.collect::<Result<_, _>>()?;

let (recovered_cells, recovered_proofs) = ctx.recover_cells_and_proofs(cell_ids, cells)?;
let (recovered_cells, recovered_proofs) = ctx.recover_cells_and_kzg_proofs(cell_ids, cells)?;
let recovered_cells = recovered_cells.map(|cell| *cell);
cells_and_proofs_to_jobject(env, &recovered_cells, &recovered_proofs).map_err(Error::from)
}
Expand Down
4 changes: 2 additions & 2 deletions eip7594/benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ pub fn bench_recover_cells_and_compute_kzg_proofs(c: &mut Criterion) {
let ctx = DASContext::with_threads(&trusted_setup, num_threads);
c.bench_function(
&format!(
"worse-case recover_cells_and_compute_proofs - NUM_THREADS: {}",
"worse-case recover_cells_and_kzg_proofs - NUM_THREADS: {}",
num_threads
),
|b| {
b.iter(|| {
ctx.recover_cells_and_proofs(
ctx.recover_cells_and_kzg_proofs(
half_cell_indices.to_vec(),
half_cells.to_vec(),
)
Expand Down
2 changes: 1 addition & 1 deletion eip7594/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl DASContext {
///
// Note: The fact that we recover the polynomial for the bit-reversed version of the blob
// is irrelevant.
pub fn recover_cells_and_proofs(
pub fn recover_cells_and_kzg_proofs(
&self,
cell_indices: Vec<CellIndex>,
cells: Vec<CellRef>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ mod serde_ {

const TEST_DIR: &str = "../test_vectors/recover_cells_and_kzg_proofs";
#[test]
fn test_recover_cells_and_proofs() {
fn test_recover_cells_and_kzg_proofs() {
let test_files = collect_test_files(TEST_DIR).unwrap();

let ctx = rust_eth_kzg::DASContext::default();
Expand All @@ -102,7 +102,7 @@ fn test_recover_cells_and_proofs() {
}
};

match ctx.recover_cells_and_proofs(test.input_cell_indices, input_cells) {
match ctx.recover_cells_and_kzg_proofs(test.input_cell_indices, input_cells) {
Ok((cells, proofs)) => {
let expected_proofs_and_cells = test.proofs_and_cells.unwrap();

Expand Down

0 comments on commit 2419258

Please sign in to comment.