Skip to content

Commit

Permalink
add hack to allow clients to sync with golang
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed May 13, 2024
1 parent 7688f0a commit 9d69cf9
Show file tree
Hide file tree
Showing 5 changed files with 558 additions and 5 deletions.
10 changes: 7 additions & 3 deletions ipa-multipoint/src/ipa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ use std::iter;

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct IPAProof {
pub(crate) L_vec: Vec<Element>,
pub(crate) R_vec: Vec<Element>,
pub(crate) a: Fr,
// TODO: These are now public because the golang code
// exposes the proof structure to client devs,
// and if we don't expose, then we can't deserialize the json
// proof into a IPAProof.
pub L_vec: Vec<Element>,
pub R_vec: Vec<Element>,
pub a: Fr,
}

impl IPAProof {
Expand Down
8 changes: 6 additions & 2 deletions ipa-multipoint/src/multiproof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ impl MultiPoint {
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MultiPointProof {
open_proof: IPAProof,
g_x_comm: Element,
// TODO: These are now public because the golang code
// exposes the proof structure to client devs,
// and if we don't expose, then we can't deserialize the json
// proof into a MultiPointProof
pub open_proof: IPAProof,
pub g_x_comm: Element,
}

impl MultiPointProof {
Expand Down
5 changes: 5 additions & 0 deletions verkle-trie/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ rayon = "1.5.1"
smallvec = "1.6.1"
sha2 = "0.9.3"
itertools = "0.10.1"
# serde is needed to deserialize the execution witness in the block.
# Most of these elements should be opaque, but the golang code
# exposes them.
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

[dev-dependencies]
criterion = "0.5.1"
Expand Down
1 change: 1 addition & 0 deletions verkle-trie/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use ipa_multipoint::transcript::Transcript;
use std::collections::{BTreeMap, BTreeSet};
use std::io::{Read, Write};

pub mod golang_proof_format;
mod key_path_finder;
mod opening_data;
pub(crate) mod prover;
Expand Down
Loading

0 comments on commit 9d69cf9

Please sign in to comment.