@@ -1242,8 +1242,10 @@ dependencies = [
"bs58",
"darkfi-serial",
"halo2_gadgets",
+ "halo2_proofs",
"incrementalmerkletree",
"pasta_curves",
+ "rand",
"thiserror",
]
@@ -1482,6 +1484,7 @@ dependencies = [
"async-std",
"async-trait",
"darkfi",
+ "darkfi-serial",
"easy-parallel",
"log",
"num_cpus",
@@ -470,10 +470,8 @@ impl Decodable for OpMethods {
#[cfg(test)]
mod tests {
use super::*;
- use darkfi::{
- serial::{deserialize, serialize},
- util::gen_id,
- };
+ use darkfi::util::gen_id;
+ use darkfi_serial::{deserialize, serialize};
#[test]
fn test_to_string() {
@@ -6,6 +6,7 @@ description = "Demo chat to document darkfi net code"
[dependencies]
darkfi = {path = "../../", features = ["net", "rpc"]}
+darkfi-serial = {path = "../../src/serial"}
# Async
async-std = "1.12.0"
@@ -1,9 +1,7 @@
use async_std::sync::{Arc, Mutex};
-use darkfi::{
- net,
- serial::{SerialDecodable, SerialEncodable},
-};
+use darkfi::net;
+use darkfi_serial::{SerialDecodable, SerialEncodable};
pub type DchatMsgsBuffer = Arc<Mutex<Vec<DchatMsg>>>;
@@ -101,10 +101,10 @@ mod tests {
DrkCoinBlind, DrkSerial, DrkSpendHook, DrkTokenId, DrkUserData, DrkValueBlind,
},
- serial::{Decodable, Encodable},
zk::circuit::MintContract,
Result,
};
+ use darkfi_serial::{Decodable, Encodable};
use group::ff::Field;
use rand::rngs::OsRng;
@@ -54,7 +54,7 @@ impl SchnorrPublic for PublicKey {
- use crate::serial::{deserialize, serialize};
fn test_schnorr() {
@@ -239,7 +239,7 @@ impl Default for MessageSubsystem {
- use crate::serial::{Decodable, Encodable};
use std::io;
#[async_std::test]
@@ -26,3 +26,7 @@ bs58 = "0.4.0"
pasta_curves = "0.4.0"
incrementalmerkletree = "0.3.0"
halo2_gadgets = "0.2.0"
+
+[dev-dependencies]
+halo2_proofs = "0.2.0"
+rand = "0.8.5"
@@ -2931,12 +2931,11 @@ mod tests {
super::{COMMIT_IVK_PERSONALIZATION, NUM_WINDOWS},
*,
- use group::Curve;
use halo2_gadgets::{
ecc::chip::constants::{test_lagrange_coeffs, test_zs_and_us},
sinsemilla::primitives::CommitDomain,
- use pasta_curves::{arithmetic::CurveAffine, pallas};
+ use pasta_curves::{arithmetic::CurveAffine, group::Curve, pallas};
fn generator() {
@@ -2936,8 +2936,7 @@ mod tests {
@@ -2930,9 +2930,8 @@ mod tests {
super::{NUM_WINDOWS, ORCHARD_PERSONALIZATION},
use halo2_gadgets::ecc::chip::constants::{test_lagrange_coeffs, test_zs_and_us};
- use pasta_curves::{arithmetic::CurveExt, pallas};
+ use pasta_curves::{arithmetic::CurveExt, group::Curve, pallas};
@@ -2932,10 +2932,10 @@ mod tests {
use pasta_curves::{
arithmetic::{CurveAffine, CurveExt},
+ group::Curve,
pallas,
super::{NUM_WINDOWS, VALUE_COMMITMENT_PERSONALIZATION},
@@ -785,10 +785,10 @@ mod tests {
super::{NUM_WINDOWS_SHORT, VALUE_COMMITMENT_PERSONALIZATION},
@@ -131,9 +131,9 @@ mod tests {
fixed_bases::{COMMIT_IVK_PERSONALIZATION, NOTE_COMMITMENT_PERSONALIZATION},
sinsemilla::MERKLE_CRH_PERSONALIZATION,
- use group::{ff::PrimeField, Curve};
use halo2_gadgets::sinsemilla::primitives::{CommitDomain, HashDomain};
use halo2_proofs::{arithmetic::CurveAffine, pasta::pallas};
+ use pasta_curves::group::{ff::PrimeField, Curve};
use rand::{self, rngs::OsRng, Rng};