Skip to content

Commit

Permalink
refactor: blake2b use associated types (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevjue authored Jan 2, 2024
1 parent c4dd8dd commit 59e489d
Show file tree
Hide file tree
Showing 14 changed files with 372 additions and 164 deletions.
12 changes: 8 additions & 4 deletions curta/src/chip/memory/get.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use log::debug;
use log::trace;
use serde::{Deserialize, Serialize};

use super::instruction::MemoryOutput;
Expand Down Expand Up @@ -63,9 +63,13 @@ impl<F: Field> Instruction<F> for GetInstruction<F> {
entry.multiplicity -= F::ONE;

if let Some(memory_output) = &self.memory_output {
debug!(
trace!(
"memory get - row: {:?}, mem label: {}, index: {:?}, multiplicity: {:?}, ts: {:?}",
row_index, memory_output.label, index, entry.multiplicity, write_ts
row_index,
memory_output.label,
index,
entry.multiplicity,
write_ts
);
}

Expand Down Expand Up @@ -115,7 +119,7 @@ impl<F: Field> Instruction<F> for GetInstruction<F> {
let value = entry.value.to_vec();

if self.memory_output.is_some() {
debug!(
trace!(
"memory get - row: {:?}, mem label: {}, index: {:?}, multiplicity: {:?}, ts: {:?}",
row_index,
label.unwrap(),
Expand Down
6 changes: 3 additions & 3 deletions curta/src/chip/memory/set.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use log::debug;
use log::trace;
use serde::{Deserialize, Serialize};

use super::instruction::{MemoryOutput, MemorySliceIndex};
Expand Down Expand Up @@ -54,7 +54,7 @@ impl<F: Field> Instruction<F> for SetInstruction<F> {
None => None,
};

debug!(
trace!(
"memory set - row: {:?}, mem label: {:?}, index: {:?}, multiplicity: {:?}, ts: {:?}",
row_index,
memory_output.label,
Expand Down Expand Up @@ -135,7 +135,7 @@ impl<F: Field> Instruction<F> for SetInstruction<F> {
None => None,
};

debug!(
trace!(
"memory set - row: {:?}, mem label: {}, index: {:?}, multiplicity: {:?}, ts: {:?}",
row_index,
memory_output.label,
Expand Down
Loading

0 comments on commit 59e489d

Please sign in to comment.