Skip to main content

Module precomputed_srs

Module precomputed_srs 

Source
Expand description

Clone of kimchi/precomputed_srs.rs but for MSM project with BN254

Re-exportsยง

use crate::Fp; ๐Ÿ”’
use crate::BN254; ๐Ÿ”’
use crate::DOMAIN_SIZE; ๐Ÿ”’
use ark_ec::pairing::Pairing; ๐Ÿ”’
use ark_ff::UniformRand; ๐Ÿ”’
use ark_serialize::Write; ๐Ÿ”’
use kimchi::circuits::domains::EvaluationDomains; ๐Ÿ”’
use poly_commitment::kzg::PairingSRS; ๐Ÿ”’
use poly_commitment::precomputed_srs::TestSRS; ๐Ÿ”’
use poly_commitment::SRS as _; ๐Ÿ”’
use rand::rngs::StdRng; ๐Ÿ”’
use rand::SeedableRng; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use std::fs::File; ๐Ÿ”’
use std::io::BufReader; ๐Ÿ”’
use std::path::PathBuf; ๐Ÿ”’
use zeroize::Zeroize; ๐Ÿ”’
use zeroize::Zeroize; ๐Ÿ”’

Structsยง

TestPairingSRS
A clone of the PairingSRS that is serialized in a test-optimised way.

Functionsยง

create_and_store_srs
Creates and writes the SRS into get_bn254_srs_path().
create_and_store_srs_with_path ๐Ÿ”’
Creates a BN254 SRS. If the overwrite_srs flag is on, or SRS_OVERWRITE env variable is ON, also writes it into the file.
get_bn254_srs
Obtains an SRS for a specific curve from disk, or generates it if absent.
get_bn254_srs_path
The path of the serialized BN254 SRS, inside this repo.
read_bn254_srs_from_disk ๐Ÿ”’
Tries to read the SRS from disk, otherwise panics. Returns the value without Lagrange basis.