pub struct FriVerify {
pub expansion_factor: u32,
pub num_collinearity_checks: u32,
pub domain_length: u32,
pub domain_offset: BFieldElement,
pub domain_generator: BFieldElement,
}
Expand description
FRI verification of a Reed-Solomon codeword.
FriVerify
checks that a Reed-Solomon codeword, provided as an oracle, has a low
degree interpolant. Specifically, the algorithm takes a ProofStream
object, runs the
verifier of the FRI protocol, and (if successful) returns the lists of indices at
which the codeword is probed along with the values of the codeword at those indices.
The test succeeds with probability 1 if the codeword is of low degree; and with
probability soundness error if the codeword is far from low-degree. If the test is
not successful, the VM crashes.
Fields§
§expansion_factor: u32
§num_collinearity_checks: u32
§domain_length: u32
§domain_offset: BFieldElement
§domain_generator: BFieldElement
Implementations§
Source§impl FriVerify
impl FriVerify
Sourcepub fn dummy() -> Self
pub fn dummy() -> Self
Return a dummy FRI verify structure that can be used when an instance is not needed but the compiler thinks it is. Is probably only needed when the FRI snippet is used in an external test.
pub fn extract_digests_required_for_proving( &self, proof_stream: &ProofStream, ) -> Vec<Digest>
pub fn to_fri(self) -> Fri
Sourcepub fn num_rounds(&self) -> usize
pub fn num_rounds(&self) -> usize
Computes the number of rounds
Sourcepub fn last_round_max_degree(&self) -> usize
pub fn last_round_max_degree(&self) -> usize
Computes the max degree of the codeword interpolant after the last round
Sourcepub fn first_round_max_degree(&self) -> usize
pub fn first_round_max_degree(&self) -> usize
Computes the max degree of the very first codeword interpolant
Sourcepub fn get_collinearity_check_x(&self, idx: u32, round: usize) -> XFieldElement
pub fn get_collinearity_check_x(&self, idx: u32, round: usize) -> XFieldElement
Get the x-coordinate of an A or B point in a collinearity check, given the point’s
index and the round number in which the check takes place. In Triton VM, this
method is called get_evaluation_argument
.
Trait Implementations§
Source§impl BFieldCodec for FriVerify
impl BFieldCodec for FriVerify
type Error = FriVerifyBFieldDecodingError
fn decode(sequence: &[BFieldElement]) -> Result<Box<Self>, Self::Error>
fn encode(&self) -> Vec<BFieldElement>
Source§fn static_length() -> Option<usize>
fn static_length() -> Option<usize>
Source§impl TasmObject for FriVerify
impl TasmObject for FriVerify
fn label_friendly_name() -> String
Source§fn get_field(field_name: &str) -> Vec<LabelledInstruction>
fn get_field(field_name: &str) -> Vec<LabelledInstruction>
Source§fn get_field_with_size(field_name: &str) -> Vec<LabelledInstruction>
fn get_field_with_size(field_name: &str) -> Vec<LabelledInstruction>
Source§fn get_field_start_with_jump_distance(
field_name: &str,
) -> Vec<LabelledInstruction>
fn get_field_start_with_jump_distance( field_name: &str, ) -> Vec<LabelledInstruction>
Source§fn compute_size_and_assert_valid_size_indicator(
library: &mut Library,
) -> Vec<LabelledInstruction>
fn compute_size_and_assert_valid_size_indicator( library: &mut Library, ) -> Vec<LabelledInstruction>
Source§fn decode_iter<Itr: Iterator<Item = BFieldElement>>(
iterator: &mut Itr,
) -> Result<Box<Self>, Box<dyn Error + Send + Sync>>
fn decode_iter<Itr: Iterator<Item = BFieldElement>>( iterator: &mut Itr, ) -> Result<Box<Self>, Box<dyn Error + Send + Sync>>
Self
.Source§const MAX_OFFSET: u32 = 268_435_456u32
const MAX_OFFSET: u32 = 268_435_456u32
fn decode_from_memory( memory: &HashMap<BFieldElement, BFieldElement>, address: BFieldElement, ) -> Result<Box<Self>, Box<dyn Error + Send + Sync>>
impl Copy for FriVerify
impl Eq for FriVerify
impl StructuralPartialEq for FriVerify
Auto Trait Implementations§
impl Freeze for FriVerify
impl RefUnwindSafe for FriVerify
impl Send for FriVerify
impl Sync for FriVerify
impl Unpin for FriVerify
impl UnwindSafe for FriVerify
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more