Skip to content

Commit

Permalink
derives
Browse files Browse the repository at this point in the history
  • Loading branch information
0xForerunner committed Feb 13, 2024
1 parent ad29274 commit 6e86820
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ once_cell = "1.8"
oz-api = { path = "crates/oz-api" }
prometheus = "0.13.3" # We need upstream PR#465 to fix #272.
reqwest = { version = "0.11.18", features = ["json"] }
# ruint has broken semver, specify exact version.
ruint = { version = "=1.11.1", features = ["primitive-types", "sqlx"] }
semaphore = { git = "https://github.com/worldcoin/semaphore-rs", branch = "main", features = [
"depth_30",
Expand Down
6 changes: 3 additions & 3 deletions src/identity_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use semaphore::lazy_merkle_tree::{Derived, LazyMerkleTree};
use semaphore::merkle_tree::Hasher;
use semaphore::poseidon_tree::{PoseidonHash, Proof};
use semaphore::{lazy_merkle_tree, Field};
use serde::Serialize;
use serde::{Deserialize, Serialize};
use sqlx::prelude::FromRow;
use tracing::{info, warn};

Expand Down Expand Up @@ -40,7 +40,7 @@ pub struct TreeItem {
pub leaf_index: usize,
}

#[derive(Debug, Serialize, FromRow)]
#[derive(Debug, Serialize, Deserialize, FromRow)]
#[serde(rename_all = "camelCase")]
pub struct RootItem {
pub root: Field,
Expand All @@ -50,7 +50,7 @@ pub struct RootItem {
pub mined_valid_as_of: Option<chrono::DateTime<Utc>>,
}

#[derive(Debug, Serialize)]
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct InclusionProof {
pub status: Status,
Expand Down
6 changes: 3 additions & 3 deletions src/server/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ use crate::identity_tree::{
};
use crate::prover::{ProverConfig, ProverType};

#[derive(Serialize)]
#[derive(Debug, Serialize, Deserialize)]
#[serde(transparent)]
pub struct InclusionProofResponse(pub InclusionProof);

#[derive(Serialize)]
#[derive(Debug, Serialize, Deserialize)]
#[serde(transparent)]
pub struct ListBatchSizesResponse(pub Vec<ProverConfig>);

#[derive(Serialize)]
#[derive(Debug, Serialize, Deserialize)]
#[serde(transparent)]
pub struct VerifySemaphoreProofResponse(pub RootItem);

Expand Down

0 comments on commit 6e86820

Please sign in to comment.