Skip to content

Commit

Permalink
fix evm-verifier and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-a16z committed Aug 23, 2024
1 parent dbd4661 commit 998fdeb
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
1 change: 1 addition & 0 deletions jolt-evm-verifier/script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ark-serialize = "0.4.2"
ark-ec = "0.4.2"
ark-std = "0.4.0"
jolt-core = { path = "../../jolt-core", package = "jolt-core"}
jolt-types = { path = "../../jolt-types" }
rand_core = "0.6.4"
rand_chacha = { version = "0.3.0", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion jolt-evm-verifier/script/src/bin/autogenerate_r1cs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloy_primitives::hex;
use jolt_core::field::JoltField;
use jolt_core::r1cs::key::SparseConstraints;
use jolt_core::r1cs::key::SparseEqualityItem;
use jolt_types::field::JoltField;

// This code is provided as an example of how to turn the sparse constraints into solidity, and was the base
// for the code in R1CSMatrix, however because the key is not expected to change often full auto-generation is not
Expand Down
17 changes: 6 additions & 11 deletions jolt-evm-verifier/script/src/bin/grand_product_example.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use jolt_core::{
field::JoltField,
poly::commitment::hyperkzg::HyperKZG,
subprotocols::grand_product::{BatchedDenseGrandProduct, BatchedGrandProduct},
utils::transcript::ProofTranscript,
utils::sol_types::GrandProductProof
utils::sol_types::GrandProductProof,
};
use jolt_types::{field::JoltField, utils::transcript::ProofTranscript};
use std::env;

use alloy_primitives::{hex, U256};
Expand All @@ -20,10 +19,9 @@ fn get_proof_data(batched_circuit: &mut BatchedDenseGrandProduct<Fr>) {
Fr,
HyperKZG<Bn254>,
>>::prove_grand_product(batched_circuit, &mut transcript, None);
let claims =
<BatchedDenseGrandProduct<Fr> as BatchedGrandProduct<Fr, HyperKZG<Bn254>>>::claims(
batched_circuit,
);
let claims = <BatchedDenseGrandProduct<Fr> as BatchedGrandProduct<Fr, HyperKZG<Bn254>>>::claims(
batched_circuit,
);

//encoding the proof into abi

Expand All @@ -33,10 +31,7 @@ fn get_proof_data(batched_circuit: &mut BatchedDenseGrandProduct<Fr>) {
uint256[] r_prover;
});

let r_prover = r_prover
.iter()
.map(fr_to_uint256)
.collect::<Vec<_>>();
let r_prover = r_prover.iter().map(fr_to_uint256).collect::<Vec<_>>();

let claims = claims.iter().map(fr_to_uint256).collect::<Vec<_>>();

Expand Down
2 changes: 1 addition & 1 deletion jolt-evm-verifier/script/src/bin/hyperkzg_batch_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ark_std::UniformRand;
use jolt_core::poly::commitment::commitment_scheme::{BatchType, CommitmentScheme};
use jolt_core::poly::commitment::hyperkzg::*;
use jolt_core::poly::dense_mlpoly::DensePolynomial;
use jolt_core::utils::transcript::ProofTranscript;
use jolt_types::utils::transcript::ProofTranscript;
use rand_core::SeedableRng;

use jolt_core::utils::sol_types::{HyperKZGProofSol, VK};
Expand Down
2 changes: 1 addition & 1 deletion jolt-evm-verifier/script/src/bin/hyperkzg_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use ark_ff::PrimeField;
use ark_std::UniformRand;
use jolt_core::poly::commitment::hyperkzg::*;
use jolt_core::poly::dense_mlpoly::DensePolynomial;
use jolt_core::utils::transcript::ProofTranscript;
use jolt_types::utils::transcript::ProofTranscript;
use rand_core::SeedableRng;

use jolt_core::utils::sol_types::{HyperKZGProofSol, VK};
Expand Down
2 changes: 1 addition & 1 deletion jolt-evm-verifier/script/src/bin/transcript_example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use jolt_core::{field::JoltField, utils::transcript::ProofTranscript};
use jolt_types::{field::JoltField, utils::transcript::ProofTranscript};

use ark_ff::{BigInteger, PrimeField};

Expand Down
2 changes: 0 additions & 2 deletions jolt-svm-verifier/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ description = "SVM program to verify JOLT proofs"
edition = "2021"

[workspace]
members = [
]

[lib]
crate-type = ["cdylib", "lib"]
Expand Down

0 comments on commit 998fdeb

Please sign in to comment.