docs: add notes and todos

This commit is contained in:
Oskar Thoren 2022-03-18 13:38:48 +08:00
parent 6fdaf3474b
commit c566b29c6d
No known key found for this signature in database
GPG Key ID: B2ECCFD3BC2EF77E
3 changed files with 13 additions and 0 deletions

View File

@ -41,6 +41,8 @@ mod test {
println!("Root: {:#}", root); println!("Root: {:#}", root);
println!("Merkle proof: {:#?}", merkle_proof); println!("Merkle proof: {:#?}", merkle_proof);
// TODO Expand this test to cover RLN end to end
// // change signal and external_nullifier here // // change signal and external_nullifier here
// let signal = b"xxx"; // let signal = b"xxx";
// let external_nullifier = b"appId"; // let external_nullifier = b"appId";

View File

@ -1,3 +1,6 @@
/// This is basic entry point for `cargo run` to play around with proof,
/// outputs, etc.
///
use ark_circom::{CircomBuilder, CircomConfig}; use ark_circom::{CircomBuilder, CircomConfig};
use ark_std::rand::thread_rng; use ark_std::rand::thread_rng;
use color_eyre::Result; use color_eyre::Result;
@ -29,6 +32,8 @@ struct WitnessInput {
rln_identifier: String, rln_identifier: String,
} }
// TODO: This should use public.rs as much as possible
// RLN // RLN
fn groth16_proof_example() -> Result<()> { fn groth16_proof_example() -> Result<()> {
// Tracing to help with debugging // Tracing to help with debugging

View File

@ -1,3 +1,6 @@
/// This is the main public API for RLN. It is used by the FFI, and should be
/// used by tests etc as well
///
use crate::merkle::IncrementalMerkleTree; use crate::merkle::IncrementalMerkleTree;
use crate::poseidon::{Poseidon as PoseidonHasher, PoseidonParams}; use crate::poseidon::{Poseidon as PoseidonHasher, PoseidonParams};
use semaphore::hash::Hash; use semaphore::hash::Hash;
@ -48,6 +51,9 @@ struct WitnessInput {
rln_identifier: String, rln_identifier: String,
} }
// TODO Isolate hardcoded JSON test here
// TODO Expand API to have better coverage of things needed
impl RLN { impl RLN {
// TODO Break this apart here // TODO Break this apart here
pub fn new() -> RLN { pub fn new() -> RLN {