Skip to main content

Module precomputed_srs

Module precomputed_srs 

Source
Expand description

Pre-generated SRS (Structured Reference String) for proofs.

To prove and verify proofs you need a Structured Reference String (SRS). The generation of this SRS is quite expensive, so we provide a pre-generated SRS in this repo. Specifically, two of them, one for each pasta curve.

We generate the SRS within the test in this module. If you modify the SRS, you will need to regenerate the SRS by passing the SRS_OVERWRITE env var.

Re-exportsยง

use crate::ipa::SRS; ๐Ÿ”’
use crate::CommitmentCurve; ๐Ÿ”’
use crate::PolyComm; ๐Ÿ”’
use ark_serialize::CanonicalDeserialize; ๐Ÿ”’
use ark_serialize::CanonicalSerialize; ๐Ÿ”’
use mina_curves::named::NamedCurve; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde_with::serde_as; ๐Ÿ”’
use std::collections::HashMap; ๐Ÿ”’
use std::fs::File; ๐Ÿ”’
use std::io::BufReader; ๐Ÿ”’
use std::path::PathBuf; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’

Structsยง

TestSRS
A clone of the SRS struct that is used for serialization, in a test-optimised way.

Enumsยง

StoredSRSType
We store several different types of SRS objects. This enum parameterizes them.

Constantsยง

SERIALIZED_SRS_SIZE
The size of the SRS that we serialize.

Functionsยง

get_srs
Obtains an SRS for a specific curve from disk.
get_srs_generic
Generic SRS getter function.
get_srs_path ๐Ÿ”’
The path of the serialized SRS.
get_srs_test
Obtains a Test SRS for a specific curve from disk.