Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Move MemoryQueueStateWitnesses definition to circuit_encodings
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov committed Aug 13, 2024
1 parent 07b81bd commit d7fd754
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions circuit_encodings/src/memory_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,7 @@ impl<F: SmallField> CircuitEquivalentReflection<F> for MemoryQuery {
}
}
}

use zkevm_circuits::base_structures::memory_query::MemoryQueryWitness;
pub type MemoryQueueStateWitnesses<F> =
Vec<(MemoryQueryWitness<F>, [F; FULL_SPONGE_QUEUE_STATE_WIDTH])>;
8 changes: 3 additions & 5 deletions src/witness/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ use crate::witness::artifacts::DecommitmentArtifactsForMainVM;
use crate::witness::artifacts::LogQueueStates;
use crate::zkevm_circuits::demux_log_queue::NUM_DEMUX_OUTPUTS;

use circuit_definitions::encodings::memory_query::MemoryQueueState;
use circuit_definitions::encodings::memory_query::{MemoryQueueState, MemoryQueueStateWitnesses};

fn simulate_memory_queue(
geometry: GeometryConfig,
Expand Down Expand Up @@ -1389,8 +1389,6 @@ fn process_memory_related_circuits<CB: FnMut(WitnessGenerationArtifact)>(
)
}

pub type MemoryQueueWitness<F: SmallField> =
Vec<(MemoryQueryWitness<F>, [F; FULL_SPONGE_QUEUE_STATE_WIDTH])>;
pub enum WitnessGenerationArtifact {
BaseLayerCircuit(ZkSyncBaseLayerCircuit),
RecursionQueue(
Expand All @@ -1400,8 +1398,8 @@ pub enum WitnessGenerationArtifact {
Vec<ClosedFormInputCompactFormWitness<GoldilocksField>>,
),
),
SortedMemoryQueueWitness(MemoryQueueWitness<GoldilocksField>),
UnsortedMemoryQueueWitness(MemoryQueueWitness<GoldilocksField>),
SortedMemoryQueueWitness(MemoryQueueStateWitnesses<GoldilocksField>),
UnsortedMemoryQueueWitness(MemoryQueueStateWitnesses<GoldilocksField>),
}

/// Make basic circuits instances and witnesses,
Expand Down

0 comments on commit d7fd754

Please sign in to comment.