Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test test #138

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[profile.dev]
opt-level = 3
debug = 1 # change to 0 or 2 for more or less debug info
debug = 2 # change to 0 or 2 for more or less debug info
overflow-checks = true
incremental = true

Expand Down
14 changes: 13 additions & 1 deletion halo2-base/src/virtual_region/copy_constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,21 @@ impl<F: Field + Ord> CopyConstraintManager<F> {
/// Adds external raw Halo2 cell to `self.assigned_advices` and returns a new virtual cell that can be
/// used as a tag (but will not be re-assigned). The returned [ContextCell] will have `type_id` the `TypeId::of::<Cell>()`.
pub fn load_external_cell(&mut self, cell: Cell) -> ContextCell {
self.load_external_cell_impl(Some(cell))
}

/// Mock to load an external cell for base circuit simulation. If any mock external cell is loaded, calling [assign_raw] will panic.
pub fn mock_external_assigned(&mut self, v: F) -> AssignedValue<F> {
let context_cell = self.load_external_cell_impl(None);
AssignedValue { value: Assigned::Trivial(v), cell: Some(context_cell) }
}

fn load_external_cell_impl(&mut self, cell: Option<Cell>) -> ContextCell {
let context_cell = ContextCell::new(TypeId::of::<Cell>(), 0, self.external_cell_count);
self.external_cell_count += 1;
self.assigned_advices.insert(context_cell, cell);
if let Some(cell) = cell {
self.assigned_advices.insert(context_cell, cell);
}
context_cell
}

Expand Down
2 changes: 2 additions & 0 deletions hashes/zkevm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ num-bigint = { version = "0.4" }
halo2-base = { path = "../../halo2-base", default-features = false }
rayon = "1.7"
sha3 = "0.10.8"
pse-poseidon = { git = "https://github.com/axiom-crypto/pse-poseidon.git" }
getset = "0.1.2"

[dev-dependencies]
criterion = "0.3"
Expand Down
Loading