mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
zk: Move zk gadgets to separate gadget module.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use darkfi::zk::{
|
||||
use darkfi::zk::gadget::{
|
||||
arith_chip::{ArithChip, ArithConfig, ArithInstruction},
|
||||
even_bits::{EvenBitsChip, EvenBitsConfig, EvenBitsLookup},
|
||||
greater_than::{GreaterThanChip, GreaterThanConfig, GreaterThanInstruction},
|
||||
|
||||
@@ -30,8 +30,8 @@ use crate::crypto::{
|
||||
merkle_node::MerkleNode,
|
||||
};
|
||||
|
||||
use crate::zk::{
|
||||
arith_chip::{ArithChip, ArithConfig, ArithInstruction},
|
||||
use crate::zk::gadget::{
|
||||
arithmetic::{ArithChip, ArithConfig, ArithInstruction},
|
||||
even_bits::{EvenBitsChip, EvenBitsConfig, EvenBitsLookup},
|
||||
greater_than::{GreaterThanChip, GreaterThanConfig, GreaterThanInstruction},
|
||||
};
|
||||
|
||||
8
src/zk/gadget/mod.rs
Normal file
8
src/zk/gadget/mod.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
/// Scalar arithmetic
|
||||
pub mod arithmetic;
|
||||
|
||||
/// Even-bits lookup table
|
||||
pub mod even_bits;
|
||||
|
||||
/// Greater than comparison gadget;
|
||||
pub mod greater_than;
|
||||
@@ -1,14 +1,11 @@
|
||||
/// Halo2 arithmetic chip
|
||||
pub mod arith_chip;
|
||||
/// Even bits lookup table
|
||||
pub mod even_bits;
|
||||
/// Greather than gadget
|
||||
pub mod greater_than;
|
||||
/// ZK gadget implementations
|
||||
pub mod gadget;
|
||||
|
||||
/// Halo2 zkas virtual machine
|
||||
pub mod vm;
|
||||
pub mod vm_stack;
|
||||
|
||||
/// ZK circuits
|
||||
pub mod circuit;
|
||||
|
||||
use halo2_proofs::{
|
||||
|
||||
@@ -24,8 +24,8 @@ use halo2_proofs::{
|
||||
use log::debug;
|
||||
use pasta_curves::{group::Curve, pallas, Fp};
|
||||
|
||||
use super::{
|
||||
arith_chip::{ArithChip, ArithConfig, ArithInstruction},
|
||||
use super::gadget::{
|
||||
arithmetic::{ArithChip, ArithConfig, ArithInstruction},
|
||||
even_bits::{EvenBitsChip, EvenBitsConfig, EvenBitsLookup},
|
||||
greater_than::{GreaterThanChip, GreaterThanConfig, GreaterThanInstruction},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user