Skip to content

Commit

Permalink
adding todos and initial things
Browse files Browse the repository at this point in the history
  • Loading branch information
coax1d committed Oct 11, 2024
1 parent 4b18f96 commit 24488d3
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion prover_service/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
use aptos_keyless_common::api::{RequestInput, ProverServiceResponse};


pub type Bytes = Vec<u8>;
#[derive(Default)]
pub struct Groth16Vk {
pub alpha_g1: Bytes,
pub beta_g1: Bytes,
pub delta_g2: Bytes,
pub gamma_abc_g1: Vec<Bytes>,
pub gamma_g2: Bytes,
}

// TODO: Implement
#[derive(Default)]
pub struct RapidProver {}
#[derive(Default)]
// TODO: Implement
pub struct Config {}
#[derive(Default)]
// TODO: Implement
pub struct CircuitConfig {}

#[derive(Default)]
pub struct State {
prover: Mutex<RapidProver>, // from rust-snark wrapper
groth16_vk: Groth16VK,
config: Config,
circuit_config: CircuitConfig,
}

impl State {
fn new() -> Self {
Default::default()
}
}

// TODO: Make main Tokio runtime
fn main() {
println!("Hello, world!");
// TODO: Add Service to do some sending/receiving of proof requests etc


//TODO: log service

//TODO: Add verification key file read

//TODO: Initialisze State
//TODO: Config
//TODO: wrap state in arc pointer to share to threads

//TODO: Fetch JWK refresh in some interval -- async fn

// Some metrics service start perhaps
}

#[test]
fn can_create_state() {
assert!(State::new())
}

0 comments on commit 24488d3

Please sign in to comment.