diff --git a/crates/circuits/primitives/src/lib.rs b/crates/circuits/primitives/src/lib.rs index 90dd810771..761e6693d6 100644 --- a/crates/circuits/primitives/src/lib.rs +++ b/crates/circuits/primitives/src/lib.rs @@ -1,7 +1,7 @@ //! This crate contains a collection of primitives for use when building circuits. -//! The primitives are separated into two types: standalone [Air](p3_air::Air)s and [SubAir]s. +//! The primitives are separated into two types: standalone [Air](openvm_stark_backend::p3_air::Air)s and [SubAir]s. //! -//! The following modules contain standalone [Air]s: +//! The following modules contain standalone [Air](openvm_stark_backend::p3_air::Air)s: //! - [range] //! - [range_gate] //! - [range_tuple] diff --git a/crates/circuits/primitives/src/sub_air.rs b/crates/circuits/primitives/src/sub_air.rs index 0ba83ad604..52966b88bb 100644 --- a/crates/circuits/primitives/src/sub_air.rs +++ b/crates/circuits/primitives/src/sub_air.rs @@ -3,7 +3,7 @@ use openvm_stark_backend::p3_air::AirBuilder; /// Trait with associated types intended to allow re-use of constraint logic /// inside other AIRs. /// -/// A `SubAir` is **not** an [`Air`](p3_air::Air) itself. +/// A `SubAir` is **not** an [Air](openvm_stark_backend::p3_air::Air) itself. /// A `SubAir` is a struct that holds the means to generate a particular set of constraints, /// meant to be re-usable within other AIRs. /// diff --git a/crates/circuits/sha256-air/src/trace.rs b/crates/circuits/sha256-air/src/trace.rs index 4bf76980cb..45477a472c 100644 --- a/crates/circuits/sha256-air/src/trace.rs +++ b/crates/circuits/sha256-air/src/trace.rs @@ -42,7 +42,7 @@ impl Sha256Air { /// and the buffer values that will be put in rows 0..4. /// Will populate the given `trace` with the trace of the block, where the width of the trace is `trace_width` /// and the starting column for the `Sha256Air` is `trace_start_col`. - /// **Note**: this function only generates some of the required trace. Another pass is required, refer to [`generate_missing_cells`] for details. + /// **Note**: this function only generates some of the required trace. Another pass is required, refer to [`Self::generate_missing_cells`] for details. #[allow(clippy::too_many_arguments)] pub fn generate_block_trace( &self, @@ -285,7 +285,7 @@ impl Sha256Air { /// This function will fill in the cells that we couldn't do during the first pass. /// This function should be called only after `generate_block_trace` was called for all blocks - /// And [`generate_default_row`] is called for all invalid rows + /// And [`Self::generate_default_row`] is called for all invalid rows /// Will populate the missing values of `trace`, where the width of the trace is `trace_width` /// and the starting column for the `Sha256Air` is `trace_start_col`. /// Note: `trace` needs to be the rows 1..17 of a block and the first row of the next block diff --git a/crates/sdk/src/commit.rs b/crates/sdk/src/commit.rs index 1472e8f46f..b1c56d28e1 100644 --- a/crates/sdk/src/commit.rs +++ b/crates/sdk/src/commit.rs @@ -35,7 +35,7 @@ pub struct AppExecutionCommit { /// ), /// hash(right_pad(pc_start, 0)) /// ) - /// `right_pad` example, if pc_start = 123, right_pad(pc_start, 0) = [123,0,0,0,0,0,0,0] + /// `right_pad` example, if pc_start = 123, right_pad(pc_start, 0) = \[123,0,0,0,0,0,0,0\] pub exe_commit: [T; DIGEST_SIZE], } diff --git a/crates/sdk/src/verifier/root/types.rs b/crates/sdk/src/verifier/root/types.rs index 86f584d1c5..d1b8988276 100644 --- a/crates/sdk/src/verifier/root/types.rs +++ b/crates/sdk/src/verifier/root/types.rs @@ -25,7 +25,7 @@ pub struct RootVmVerifierPvs { /// Input for the root VM verifier. /// Note: Root verifier is proven in Root SC, but it usually verifies proofs in SC. So -/// usually only RootVmVerifierInput is needed. +/// usually only RootVmVerifierInput\ is needed. #[derive(Serialize, Deserialize, Derivative)] #[serde(bound = "")] #[derivative(Clone(bound = "Com: Clone"))] diff --git a/crates/toolchain/transpiler/src/extension.rs b/crates/toolchain/transpiler/src/extension.rs index 8163301fff..805c50a33f 100644 --- a/crates/toolchain/transpiler/src/extension.rs +++ b/crates/toolchain/transpiler/src/extension.rs @@ -3,10 +3,10 @@ use openvm_instructions::instruction::Instruction; /// Trait to add custom RISC-V instruction transpilation to OpenVM instruction format. /// RISC-V instructions always come in 32-bit chunks. /// An important feature is that multiple 32-bit RISC-V instructions can be transpiled into a single OpenVM instruction. -/// See `process_custom` for details. +/// See [process_custom](Self::process_custom) for details. pub trait TranspilerExtension { /// The `instruction_stream` provides a view of the remaining RISC-V instructions to be processed, - /// presented as 32-bit chunks. The [`CustomInstructionProcessor`] should determine if it knows how to transpile + /// presented as 32-bit chunks. The [process_custom](Self::process_custom) should determine if it knows how to transpile /// the next contiguous section of RISC-V instructions into an [`Instruction`]. /// It returns `None` if it cannot transpile. Otherwise it returns `(instruction, how_many_u32s)` to indicate that /// `instruction_stream[..how_many_u32s]` should be transpiled into `instruction`. diff --git a/crates/vm/src/arch/execution.rs b/crates/vm/src/arch/execution.rs index 624ca69da8..fc33405688 100644 --- a/crates/vm/src/arch/execution.rs +++ b/crates/vm/src/arch/execution.rs @@ -287,7 +287,7 @@ impl From<(u32, Option)> for PcIncOrSet { } /// Phantom sub-instructions affect the runtime of the VM and the trace matrix values. -/// However they all have no AIR constraints besides advancing the pc by [DEFAULT_PC_STEP](super::program::DEFAULT_PC_STEP). +/// However they all have no AIR constraints besides advancing the pc by [DEFAULT_PC_STEP](openvm_instructions::program::DEFAULT_PC_STEP). /// /// They should not mutate memory, but they can mutate the input & hint streams. /// diff --git a/crates/vm/src/arch/integration_api.rs b/crates/vm/src/arch/integration_api.rs index 336a7d5b7f..294b6a4b4c 100644 --- a/crates/vm/src/arch/integration_api.rs +++ b/crates/vm/src/arch/integration_api.rs @@ -94,7 +94,7 @@ pub trait VmAdapterChip { pub trait VmAdapterAir: BaseAir { type Interface: VmAdapterInterface; - /// [Air](p3_air::Air) constraints owned by the adapter. + /// [Air](openvm_stark_backend::p3_air::Air) constraints owned by the adapter. /// The `interface` is given as abstract expressions so it can be directly used in other AIR constraints. /// /// Adapters should document the max constraint degree as a function of the constraint degrees of `reads, writes, instruction`. diff --git a/crates/vm/src/arch/testing/memory/mod.rs b/crates/vm/src/arch/testing/memory/mod.rs index 723446601c..71e4cf9275 100644 --- a/crates/vm/src/arch/testing/memory/mod.rs +++ b/crates/vm/src/arch/testing/memory/mod.rs @@ -40,7 +40,7 @@ impl MemoryTester { } } - /// Returns the cell value at the current timestamp according to [MemoryController]. + /// Returns the cell value at the current timestamp according to `MemoryController`. pub fn read_cell(&mut self, address_space: usize, pointer: usize) -> F { let [addr_space, pointer] = [address_space, pointer].map(F::from_canonical_usize); // core::BorrowMut confuses compiler diff --git a/crates/vm/src/system/memory/offline_checker/bridge.rs b/crates/vm/src/system/memory/offline_checker/bridge.rs index 84bef2351b..64031d13c1 100644 --- a/crates/vm/src/system/memory/offline_checker/bridge.rs +++ b/crates/vm/src/system/memory/offline_checker/bridge.rs @@ -115,7 +115,7 @@ pub struct MemoryReadOperation<'a, T, V, const N: usize> { /// The max degree of constraints is: /// eval_timestamps: deg(enabled) + max(1, deg(self.timestamp)) -/// eval_bulk_access: refer to [MemoryOfflineChecker::eval_bulk_access] +/// eval_bulk_access: refer to private function MemoryOfflineChecker::eval_bulk_access impl, const N: usize> MemoryReadOperation<'_, F, V, N> { /// Evaluate constraints and send/receive interactions. pub fn eval(self, builder: &mut AB, enabled: impl Into) @@ -169,7 +169,7 @@ pub struct MemoryReadOrImmediateOperation<'a, T, V> { /// deg(address.address_space) + deg(aux.is_zero_aux)) /// is_immediate check: deg(aux.is_immediate) + max(deg(data), deg(address.pointer)) /// eval_timestamps: deg(enabled) + max(1, deg(self.timestamp)) -/// eval_bulk_access: refer to [MemoryOfflineChecker::eval_bulk_access] +/// eval_bulk_access: refer to private function MemoryOfflineChecker::eval_bulk_access impl> MemoryReadOrImmediateOperation<'_, F, V> { /// Evaluate constraints and send/receive interactions. pub fn eval(self, builder: &mut AB, enabled: impl Into) @@ -229,7 +229,7 @@ pub struct MemoryWriteOperation<'a, T, V, const N: usize> { /// The max degree of constraints is: /// eval_timestamps: deg(enabled) + max(1, deg(self.timestamp)) -/// eval_bulk_access: refer to [MemoryOfflineChecker::eval_bulk_access] +/// eval_bulk_access: refer to private function MemoryOfflineChecker::eval_bulk_access impl, const N: usize> MemoryWriteOperation<'_, T, V, N> { /// Evaluate constraints and send/receive interactions. `enabled` must be boolean. pub fn eval(self, builder: &mut AB, enabled: impl Into) diff --git a/crates/vm/src/system/memory/offline_checker/columns.rs b/crates/vm/src/system/memory/offline_checker/columns.rs index c6e09f236f..ba851a22ee 100644 --- a/crates/vm/src/system/memory/offline_checker/columns.rs +++ b/crates/vm/src/system/memory/offline_checker/columns.rs @@ -22,7 +22,7 @@ pub struct MemoryBaseAuxCols { } impl MemoryBaseAuxCols { - /// TODO[arayi]: Since we have AlignedBorrow, should remove all from_slice, from_iterator, and flatten in a future PR. + // TODO[arayi]: Since we have AlignedBorrow, should remove all from_slice, from_iterator, and flatten in a future PR. pub fn from_slice(slc: &[T]) -> Self { let base_aux_cols: &MemoryBaseAuxCols = slc.borrow(); base_aux_cols.clone() diff --git a/crates/vm/src/system/poseidon2/mod.rs b/crates/vm/src/system/poseidon2/mod.rs index 3d8aa84a90..f24dd496ed 100644 --- a/crates/vm/src/system/poseidon2/mod.rs +++ b/crates/vm/src/system/poseidon2/mod.rs @@ -1,5 +1,5 @@ //! Chip to handle **native kernel** instructions for Poseidon2 `compress` and `permute`. -//! This chip is put in [intrinsics](crate::intrinsics) for organizational convenience, but +//! This chip is put in `intrinsics` for organizational convenience, but //! it is used as a system chip for persistent memory and as a native kernel chip for aggregation. //! //! Note that neither `compress` nor `permute` on its own diff --git a/extensions/keccak256/circuit/src/air.rs b/extensions/keccak256/circuit/src/air.rs index 3939cad3cb..d5ecaa3e6e 100644 --- a/extensions/keccak256/circuit/src/air.rs +++ b/extensions/keccak256/circuit/src/air.rs @@ -164,7 +164,7 @@ impl KeccakVmAir { } /// Keccak follows the 10*1 padding rule. - /// See Section 5.1 of https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf + /// See Section 5.1 of /// Note this is the ONLY difference between Keccak and SHA-3 /// /// Constrains padding constraints and length between rounds and diff --git a/extensions/keccak256/circuit/src/columns.rs b/extensions/keccak256/circuit/src/columns.rs index 03e7ce4f79..edb28fa8ed 100644 --- a/extensions/keccak256/circuit/src/columns.rs +++ b/extensions/keccak256/circuit/src/columns.rs @@ -37,7 +37,7 @@ pub struct KeccakInstructionCols { /// False on dummy rows only used to pad the height. pub is_enabled: T, /// Is enabled and first round of block. Used to lower constraint degree. - /// is_enabled * inner.step_flags[0] + /// is_enabled * inner.step_flags\[0\] pub is_enabled_first_round: T, /// The starting timestamp to use for memory access in this row. /// A single row will do multiple memory accesses. @@ -51,17 +51,17 @@ pub struct KeccakInstructionCols { /// Memory address space pub e: T, // Register values - /// dst <- [dst_ptr:4]_1 + /// dst <- \[dst_ptr:4\]_1 pub dst: [T; RV32_REGISTER_NUM_LIMBS], - /// src <- [src_ptr:4]_1 - /// We store src_limbs[i] = [src_ptr + i + 1]_1 and src = u32([src_ptr:4]_1) from which [src_ptr]_1 + /// src <- \[src_ptr:4\]_1 + /// We store src_limbs\[i\] = \[src_ptr + i + 1\]_1 and src = u32(\[src_ptr:4\]_1) from which \[src_ptr\]_1 /// can be recovered by linear combination. /// We do this because `src` needs to be incremented between keccak-f permutations. pub src_limbs: [T; RV32_REGISTER_NUM_LIMBS - 1], pub src: T, - /// len <- [len_ptr:4]_1 - /// We store len_limbs[i] = [len_ptr + i + 1]_1 and remaining_len = u32([len_ptr:4]_1) - /// from which [len_ptr]_1 can be recovered by linear combination. + /// len <- \[len_ptr:4\]_1 + /// We store len_limbs\[i\] = \[len_ptr + i + 1\]_1 and remaining_len = u32(\[len_ptr:4\]_1) + /// from which \[len_ptr\]_1 can be recovered by linear combination. /// We do this because `remaining_len` needs to be decremented between keccak-f permutations. pub len_limbs: [T; RV32_REGISTER_NUM_LIMBS - 1], /// The remaining length of the unpadded input, in bytes. @@ -99,8 +99,8 @@ pub struct KeccakMemoryCols { pub register_aux: [MemoryReadAuxCols; KECCAK_REGISTER_READS], pub absorb_reads: [MemoryReadAuxCols; KECCAK_ABSORB_READS], pub digest_writes: [MemoryWriteAuxCols; KECCAK_DIGEST_WRITES], - /// The input bytes are batch read in blocks of [KECCAK_WORD_SIZE] bytes. However - /// if the input length is not a multiple of [KECCAK_WORD_SIZE], we read into + /// The input bytes are batch read in blocks of private constant KECCAK_WORD_SIZE bytes. However + /// if the input length is not a multiple of KECCAK_WORD_SIZE, we read into /// `partial_block` more bytes than we need. On the other hand `block_bytes` expects /// only the partial block of bytes and then the correctly padded bytes. /// We will select between `partial_block` and `block_bytes` for what to read from memory. diff --git a/extensions/native/compiler/src/ir/bits.rs b/extensions/native/compiler/src/ir/bits.rs index 64449a2f9f..746cff10de 100644 --- a/extensions/native/compiler/src/ir/bits.rs +++ b/extensions/native/compiler/src/ir/bits.rs @@ -120,10 +120,10 @@ impl Builder { /// Reverse a list of bits. /// - /// SAFETY: calling this function with `bit_len` greater [`NUM_BITS`] will result in undefined + /// SAFETY: calling this function with `bit_len` greater `NUM_BITS` will result in undefined /// behavior. /// - /// Reference: [p3_util::reverse_bits_len] + /// Reference: [`openvm_stark_backend::p3_util`] pub fn reverse_bits_len( &mut self, index_bits: &Array>, @@ -149,10 +149,10 @@ impl Builder { /// Reverse a list of bits inside a circuit. /// - /// SAFETY: calling this function with `bit_len` greater [`NUM_BITS`] will result in undefined + /// SAFETY: calling this function with `bit_len` greater `NUM_BITS` will result in undefined /// behavior. /// - /// Reference: [p3_util::reverse_bits_len] + /// Reference: [`openvm_stark_backend::p3_util`] pub fn reverse_bits_len_circuit( &mut self, index_bits: Vec>, diff --git a/extensions/native/compiler/src/ir/poseidon.rs b/extensions/native/compiler/src/ir/poseidon.rs index 8ae509606b..c4df01dab7 100644 --- a/extensions/native/compiler/src/ir/poseidon.rs +++ b/extensions/native/compiler/src/ir/poseidon.rs @@ -9,7 +9,7 @@ pub const PERMUTATION_WIDTH: usize = 16; impl Builder { /// Applies the Poseidon2 permutation to the given array. /// - /// Reference: [p3_poseidon2::Poseidon2] + /// [Reference](https://docs.rs/p3-poseidon2/latest/p3_poseidon2/struct.Poseidon2.html) pub fn poseidon2_permute(&mut self, array: &Array>) -> Array> { let output = match array { Array::Fixed(values) => { @@ -27,7 +27,7 @@ impl Builder { /// Applies the Poseidon2 permutation to the given array. /// - /// Reference: [p3_poseidon2::Poseidon2] + /// [Reference](https://docs.rs/p3-poseidon2/latest/p3_poseidon2/struct.Poseidon2.html) pub fn poseidon2_permute_mut(&mut self, array: &Array>) { if let Array::Fixed(_) = array { panic!("Poseidon2 permutation is not allowed on fixed arrays"); @@ -40,7 +40,7 @@ impl Builder { /// Applies the Poseidon2 compression function to the given array. /// - /// Reference: [p3_symmetric::TruncatedPermutation] + /// [Reference](https://docs.rs/p3-symmetric/latest/p3_symmetric/struct.TruncatedPermutation.html) pub fn poseidon2_compress( &mut self, left: &Array>, @@ -60,7 +60,7 @@ impl Builder { /// Applies the Poseidon2 compression to the given array. /// - /// Reference: [p3_symmetric::TruncatedPermutation] + /// [Reference](https://docs.rs/p3-symmetric/latest/p3_symmetric/struct.TruncatedPermutation.html) pub fn poseidon2_compress_x( &mut self, result: &Array>, @@ -76,7 +76,7 @@ impl Builder { /// Applies the Poseidon2 permutation to the given array. /// - /// Reference: [p3_symmetric::PaddingFreeSponge] + /// [Reference](https://docs.rs/p3-symmetric/latest/p3_symmetric/struct.PaddingFreeSponge.html) pub fn poseidon2_hash(&mut self, array: &Array>) -> Array> { let perm_width = PERMUTATION_WIDTH; let state: Array> = self.dyn_array(perm_width); diff --git a/extensions/native/compiler/src/ir/utils.rs b/extensions/native/compiler/src/ir/utils.rs index 54d420c68d..165eb33037 100644 --- a/extensions/native/compiler/src/ir/utils.rs +++ b/extensions/native/compiler/src/ir/utils.rs @@ -23,7 +23,7 @@ pub fn prime_field_to_usize(x: F) -> usize { impl Builder { /// The generator for the field. /// - /// Reference: [p3_baby_bear::BabyBear] + /// Reference: [`openvm_stark_sdk::p3_baby_bear::BabyBear`] pub fn generator(&mut self) -> Felt { self.eval(C::F::from_canonical_u32(31)) } @@ -141,7 +141,7 @@ impl Builder { /// Exponentiates a variable to a list of reversed bits with a given length. /// - /// Reference: [p3_util::reverse_bits_len] + /// Reference: [`openvm_stark_backend::p3_util::reverse_bits_len`] pub fn exp_reverse_bits_len( &mut self, x: V, diff --git a/extensions/native/recursion/src/challenger/duplex.rs b/extensions/native/recursion/src/challenger/duplex.rs index 317f738ee4..180f2c155b 100644 --- a/extensions/native/recursion/src/challenger/duplex.rs +++ b/extensions/native/recursion/src/challenger/duplex.rs @@ -12,7 +12,7 @@ use crate::{ digest::DigestVariable, }; -/// Reference: [p3_challenger::DuplexChallenger] +/// Reference: [`openvm_stark_backend::p3_challenger::DuplexChallenger`] #[derive(Clone)] pub struct DuplexChallengerVariable { pub sponge_state: Array>, diff --git a/extensions/native/recursion/src/challenger/mod.rs b/extensions/native/recursion/src/challenger/mod.rs index 26eccfc3fb..78488ad498 100644 --- a/extensions/native/recursion/src/challenger/mod.rs +++ b/extensions/native/recursion/src/challenger/mod.rs @@ -8,14 +8,14 @@ use crate::digest::DigestVariable; pub mod duplex; pub mod multi_field32; -/// Reference: [p3_challenger::CanObserve]. +/// Reference: [`openvm_stark_backend::p3_challenger::CanObserve`] pub trait CanObserveVariable { fn observe(&mut self, builder: &mut Builder, value: V); fn observe_slice(&mut self, builder: &mut Builder, values: Array); } -/// Reference: [p3_challenger::CanObserve]. +/// Reference: [`openvm_stark_backend::p3_challenger::CanObserve`] pub trait CanObserveDigest { fn observe_digest(&mut self, builder: &mut Builder, value: DigestVariable); } @@ -25,7 +25,7 @@ pub trait CanSampleVariable { fn sample(&mut self, builder: &mut Builder) -> V; } -/// Reference: [p3_challenger::FieldChallenger]. +/// Reference: [`openvm_stark_backend::p3_challenger::FieldChallenger`] pub trait FeltChallenger: CanObserveVariable> + CanSampleVariable> + CanSampleBitsVariable { diff --git a/extensions/native/recursion/src/fri/domain.rs b/extensions/native/recursion/src/fri/domain.rs index cb3d2f69cc..b2a3f8a07e 100644 --- a/extensions/native/recursion/src/fri/domain.rs +++ b/extensions/native/recursion/src/fri/domain.rs @@ -7,7 +7,7 @@ use openvm_stark_backend::{ use super::types::FriConfigVariable; use crate::commit::PolynomialSpaceVariable; -/// Reference: [p3_commit::TwoAdicMultiplicativeCoset] +/// Reference: [`openvm_stark_backend::p3_commit::TwoAdicMultiplicativeCoset`] #[derive(DslVariable, Clone)] pub struct TwoAdicMultiplicativeCosetVariable { pub log_n: Usize, diff --git a/extensions/native/recursion/src/fri/mod.rs b/extensions/native/recursion/src/fri/mod.rs index 3f5411a239..615ac11a60 100644 --- a/extensions/native/recursion/src/fri/mod.rs +++ b/extensions/native/recursion/src/fri/mod.rs @@ -27,7 +27,7 @@ pub mod witness; /// /// Currently assumes the index that is accessed is constant. /// -/// Reference: https://github.com/Plonky3/Plonky3/blob/4809fa7bedd9ba8f6f5d3267b1592618e3776c57/fri/src/verifier.rs#L101 +/// Reference: #[allow(clippy::too_many_arguments)] #[allow(unused_variables)] pub fn verify_query( @@ -138,7 +138,7 @@ pub enum NestedOpenedValues { /// /// Assumes the dimensions have already been sorted by tallest first. /// -/// Reference: https://github.com/Plonky3/Plonky3/blob/4809fa7bedd9ba8f6f5d3267b1592618e3776c57/merkle-tree/src/mmcs.rs#L92 +/// Reference: #[allow(clippy::type_complexity)] #[allow(unused_variables)] pub fn verify_batch( @@ -255,7 +255,7 @@ pub fn verify_batch( /// /// Assumes the dimensions have already been sorted by tallest first. /// -/// Reference: https://github.com/Plonky3/Plonky3/blob/4809fa7bedd9ba8f6f5d3267b1592618e3776c57/merkle-tree/src/mmcs.rs#L92 +/// Reference: #[allow(clippy::type_complexity)] #[allow(unused_variables)] pub fn verify_batch_static( diff --git a/extensions/native/recursion/src/halo2/utils.rs b/extensions/native/recursion/src/halo2/utils.rs index 0cbe28a3a5..703f0bf4bb 100644 --- a/extensions/native/recursion/src/halo2/utils.rs +++ b/extensions/native/recursion/src/halo2/utils.rs @@ -149,7 +149,7 @@ fn read_params(k: u32) -> Arc { /// Sort AIRs by their trace height in descending order. This should not be used outside /// static-verifier because a dynamic verifier should support any AIR order. /// This is related to an implementation detail of FieldMerkleTreeMMCS which is used in most configs. -/// Reference: https://github.com/Plonky3/Plonky3/blob/27b3127dab047e07145c38143379edec2960b3e1/merkle-tree/src/merkle_tree.rs#L53 +/// Reference: pub fn sort_chips( mut air_proof_inputs: Vec>, ) -> Vec> { diff --git a/extensions/native/recursion/src/stark/mod.rs b/extensions/native/recursion/src/stark/mod.rs index f5344dace8..bb322b4386 100644 --- a/extensions/native/recursion/src/stark/mod.rs +++ b/extensions/native/recursion/src/stark/mod.rs @@ -48,7 +48,7 @@ pub struct VerifierProgram { } impl VerifierProgram { - /// Create a new instance of the program for the [BabyBearPoseidon2] config. + /// Create a new instance of the program for the [`openvm_stark_sdk::config::baby_bear_poseidon2`] pub fn build( constants: MultiStarkVerificationAdvice, fri_params: &FriParameters, @@ -60,7 +60,7 @@ impl VerifierProgram { Self::build_with_options(constants, fri_params, options) } - /// Create a new instance of the program for the [BabyBearPoseidon2] config. + /// Create a new instance of the program for the [`openvm_stark_sdk::config::baby_bear_poseidon2`] pub fn build_with_options( constants: MultiStarkVerificationAdvice, fri_params: &FriParameters, diff --git a/extensions/native/recursion/src/utils.rs b/extensions/native/recursion/src/utils.rs index 85a56c2434..0129994835 100644 --- a/extensions/native/recursion/src/utils.rs +++ b/extensions/native/recursion/src/utils.rs @@ -38,7 +38,7 @@ pub fn const_fri_config( } } -/// Reference: https://github.com/Plonky3/Plonky3/blob/622375885320ac6bf3c338001760ed8f2230e3cb/field/src/helpers.rs#L136 +/// Reference: pub fn reduce_32(builder: &mut Builder, vals: &[Felt]) -> Var { let mut power = C::N::ONE; let result: Var = builder.eval(C::N::ZERO); @@ -50,7 +50,7 @@ pub fn reduce_32(builder: &mut Builder, vals: &[Felt]) -> Va result } -/// Reference: https://github.com/Plonky3/Plonky3/blob/622375885320ac6bf3c338001760ed8f2230e3cb/field/src/helpers.rs#L149 +/// Reference: pub fn split_32(builder: &mut Builder, val: Var, n: usize) -> Vec> { let bits = builder.num2bits_v_circuit(val, 256); let mut results = Vec::new(); diff --git a/extensions/pairing/guest/src/pairing/mod.rs b/extensions/pairing/guest/src/pairing/mod.rs index f1dadf93f6..25530fefde 100644 --- a/extensions/pairing/guest/src/pairing/mod.rs +++ b/extensions/pairing/guest/src/pairing/mod.rs @@ -30,7 +30,7 @@ pub trait PairingIntrinsics { /// The sextic extension `Fp12` is `Fp2[X] / (X^6 - \xi)`, where `\xi` is a non-residue. const XI: Self::Fp2; /// Multiplication constants for the Frobenius map for coefficients in Fp2 c1..=c5 for powers 0..12 - /// FROBENIUS_COEFFS[i][j] = \xi^{(j + 1) * (p^i - 1)/6} when p = 1 (mod 6) + /// FROBENIUS_COEFFS\[i\]\[j\] = \xi^{(j + 1) * (p^i - 1)/6} when p = 1 (mod 6) const FROBENIUS_COEFFS: [[Self::Fp2; 5]; 12]; } diff --git a/extensions/rv32im/circuit/src/adapters/alu.rs b/extensions/rv32im/circuit/src/adapters/alu.rs index 5be72f418f..5c32e4aae2 100644 --- a/extensions/rv32im/circuit/src/adapters/alu.rs +++ b/extensions/rv32im/circuit/src/adapters/alu.rs @@ -32,7 +32,7 @@ use openvm_stark_backend::{ use super::{RV32_CELL_BITS, RV32_REGISTER_NUM_LIMBS}; -/// Reads instructions of the form OP a, b, c, d, e where [a:4]_d = [b:4]_d op [c:4]_e. +/// Reads instructions of the form OP a, b, c, d, e where \[a:4\]_d = \[b:4\]_d op \[c:4\]_e. /// Operand d can only be 1, and e can be either 1 (for register reads) or 0 (when c /// is an immediate). #[derive(Debug)] diff --git a/extensions/rv32im/circuit/src/adapters/branch.rs b/extensions/rv32im/circuit/src/adapters/branch.rs index c169cab4a7..e478ffde2d 100644 --- a/extensions/rv32im/circuit/src/adapters/branch.rs +++ b/extensions/rv32im/circuit/src/adapters/branch.rs @@ -29,7 +29,7 @@ use openvm_stark_backend::{ use super::RV32_REGISTER_NUM_LIMBS; -/// Reads instructions of the form OP a, b, c, d, e where if([a:4]_d op [b:4]_e) pc += c. +/// Reads instructions of the form OP a, b, c, d, e where if(\[a:4\]_d op \[b:4\]_e) pc += c. /// Operands d and e can only be 1. #[derive(Debug)] pub struct Rv32BranchAdapterChip { diff --git a/extensions/rv32im/circuit/src/adapters/mul.rs b/extensions/rv32im/circuit/src/adapters/mul.rs index 6b0aabe44f..cca2d8fcbd 100644 --- a/extensions/rv32im/circuit/src/adapters/mul.rs +++ b/extensions/rv32im/circuit/src/adapters/mul.rs @@ -29,7 +29,7 @@ use openvm_stark_backend::{ use super::RV32_REGISTER_NUM_LIMBS; -/// Reads instructions of the form OP a, b, c, d where [a:4]_d = [b:4]_d op [c:4]_d. +/// Reads instructions of the form OP a, b, c, d where \[a:4\]_d = \[b:4\]_d op \[c:4\]_d. /// Operand d can only be 1, and there is no immediate support. #[derive(Debug)] pub struct Rv32MultAdapterChip { diff --git a/extensions/rv32im/circuit/src/adapters/rdwrite.rs b/extensions/rv32im/circuit/src/adapters/rdwrite.rs index 42c9a76117..e1f49924d5 100644 --- a/extensions/rv32im/circuit/src/adapters/rdwrite.rs +++ b/extensions/rv32im/circuit/src/adapters/rdwrite.rs @@ -30,14 +30,14 @@ use openvm_stark_backend::{ use super::RV32_REGISTER_NUM_LIMBS; -/// This adapter doesn't read anything, and writes to [a:4]_d, where d == 1 +/// This adapter doesn't read anything, and writes to \[a:4\]_d, where d == 1 #[derive(Debug)] pub struct Rv32RdWriteAdapterChip { pub air: Rv32RdWriteAdapterAir, _marker: PhantomData, } -/// This adapter doesn't read anything, and **maybe** writes to [a:4]_d, where d == 1 +/// This adapter doesn't read anything, and **maybe** writes to \[a:4\]_d, where d == 1 #[derive(Debug)] pub struct Rv32CondRdWriteAdapterChip { /// Do not use the inner air directly, use `air` instead.