Skip to content

Commit 9f72a99

Browse files
committed
organize files & dirs (mostly backend structure)
1 parent 9afc436 commit 9f72a99

File tree

12 files changed

+24
-23
lines changed

12 files changed

+24
-23
lines changed
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
use crate::backends::plonky2::basetypes::{Hash, Value, D, EMPTY_HASH, EMPTY_VALUE, F, VALUE_SIZE};
2-
use crate::backends::plonky2::common::{
3-
CircuitBuilderPod, OperationTarget, StatementTarget, ValueTarget,
4-
};
5-
use crate::backends::plonky2::primitives::merkletree::MerkleProofExistenceCircuit;
6-
use crate::backends::plonky2::primitives::merkletree::{MerkleProof, MerkleTree};
7-
use crate::middleware::{
8-
hash_str, AnchoredKey, NativeOperation, NativePredicate, Operation, Params, PodType, Predicate,
9-
Statement, StatementArg, ToFields, KEY_TYPE, SELF, STATEMENT_ARG_F_LEN,
10-
};
111
use anyhow::Result;
122
use itertools::Itertools;
133
use plonky2::{
@@ -24,6 +14,17 @@ use plonky2::{
2414
};
2515
use std::collections::HashMap;
2616

17+
use crate::backends::plonky2::basetypes::{Hash, Value, D, EMPTY_HASH, EMPTY_VALUE, F, VALUE_SIZE};
18+
use crate::backends::plonky2::circuits::common::{
19+
CircuitBuilderPod, OperationTarget, StatementTarget, ValueTarget,
20+
};
21+
use crate::backends::plonky2::primitives::merkletree::MerkleProofExistenceCircuit;
22+
use crate::backends::plonky2::primitives::merkletree::{MerkleProof, MerkleTree};
23+
use crate::middleware::{
24+
hash_str, AnchoredKey, NativeOperation, NativePredicate, Operation, Params, PodType, Predicate,
25+
Statement, StatementArg, ToFields, KEY_TYPE, SELF, STATEMENT_ARG_F_LEN,
26+
};
27+
2728
/// MerkleTree Max Depth
2829
const MD: usize = 32;
2930

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub mod common;
2+
pub mod mainpod;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ impl Pod for MockMainPod {
505505
#[cfg(test)]
506506
pub mod tests {
507507
use super::*;
508-
use crate::backends::plonky2::mock_signed::MockSigner;
508+
use crate::backends::plonky2::mock::signedpod::MockSigner;
509509
use crate::examples::{
510510
great_boy_pod_full_flow, tickets_pod_full_flow, zu_kyc_pod_builder,
511511
zu_kyc_sign_pod_builders,
File renamed without changes.
File renamed without changes.

src/backends/plonky2/mock/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub mod mainpod;
2+
pub mod signedpod;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use anyhow::Result;
22
use std::any::Any;
33
use std::collections::HashMap;
44

5-
use super::primitives::merkletree::MerkleTree;
5+
use crate::backends::plonky2::primitives::merkletree::MerkleTree;
66
use crate::constants::MAX_DEPTH;
77
use crate::middleware::{
88
containers::Dictionary, hash_str, AnchoredKey, Hash, Params, Pod, PodId, PodSigner, PodType,

src/backends/plonky2/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
pub mod basetypes;
2-
pub mod common;
3-
pub mod main;
4-
pub mod mock_main;
5-
pub mod mock_signed;
2+
pub mod circuits;
3+
pub mod mock;
64
pub mod primitives;

src/backends/plonky2/primitives/merkletree_circuit.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ use plonky2::{
2323
};
2424
use std::iter;
2525

26-
use crate::backends::plonky2::basetypes::{Hash, Value, D, EMPTY_HASH, EMPTY_VALUE, F, VALUE_SIZE};
27-
use crate::backends::plonky2::common::{
28-
CircuitBuilderPod, OperationTarget, StatementTarget, ValueTarget,
29-
};
26+
use crate::backends::plonky2::basetypes::{Hash, Value, D, EMPTY_HASH, EMPTY_VALUE, F};
27+
use crate::backends::plonky2::circuits::common::{CircuitBuilderPod, ValueTarget};
3028
use crate::backends::plonky2::primitives::merkletree::MerkleProof;
3129

3230
/// `MerkleProofCircuit` allows to verify both proofs of existence and proofs

0 commit comments

Comments
 (0)