repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/lib.rs | runtime/entrypoint/src/lib.rs | //! Ported from Entrypoint for SP1 zkVM.
#![feature(asm_experimental_arch)]
pub mod heap;
pub mod syscalls;
pub mod io {
pub use zkm_precompiles::io::*;
}
pub mod precompiles {
pub use zkm_precompiles::*;
}
extern crate alloc;
#[macro_export]
macro_rules! entrypoint {
($path:path) => {
const ZKVM_... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/libm.rs | runtime/entrypoint/src/libm.rs | //! Ported from Entrypoint for SP1 zkVM.
//!
#[no_mangle]
pub extern "C" fn acos(x: f64) -> f64 {
libm::acos(x)
}
#[no_mangle]
pub extern "C" fn acosf(x: f32) -> f32 {
libm::acosf(x)
}
#[no_mangle]
pub extern "C" fn acosh(x: f64) -> f64 {
libm::acosh(x)
}
#[no_mangle]
pub extern "C" fn acoshf(x: f32) -> ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/heap.rs | runtime/entrypoint/src/heap.rs | //! Ported from Entrypoint for SP1 zkVM.
use core::alloc::{GlobalAlloc, Layout};
use crate::syscalls::sys_alloc_aligned;
/// A simple heap allocator.
///
/// Allocates memory from left to right, without any deallocation.
pub struct SimpleAlloc;
unsafe impl GlobalAlloc for SimpleAlloc {
unsafe fn alloc(&self, la... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/syscalls/halt.rs | runtime/entrypoint/src/syscalls/halt.rs | //! Ported from Entrypoint for SP1 zkVM.
use cfg_if::cfg_if;
cfg_if! {
if #[cfg(target_os = "zkvm")] {
use core::arch::asm;
}
}
/// Halts the program.
#[allow(unused_variables)]
pub extern "C" fn syscall_halt(exit_code: u8) -> ! {
#[cfg(target_os = "zkvm")]
unsafe {
asm!(
... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/syscalls/io.rs | runtime/entrypoint/src/syscalls/io.rs | //! Ported from Entrypoint for SP1 zkVM.
cfg_if::cfg_if! {
if #[cfg(target_os = "zkvm")] {
use core::arch::asm;
}
}
/// Write data to the prover.
#[allow(unused_variables)]
#[no_mangle]
pub extern "C" fn syscall_write(fd: u32, write_buf: *const u8, nbytes: usize) {
cfg_if::cfg_if! {
if #[c... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/syscalls/memory.rs | runtime/entrypoint/src/syscalls/memory.rs | // Copyright 2023 RISC Zero, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/syscalls/sha256.rs | runtime/entrypoint/src/syscalls/sha256.rs | #[cfg(target_os = "zkvm")]
use core::arch::asm;
/// Executes the Keccak256 permutation on the given state.
///
/// ### Safety
///
/// The caller must ensure that `state` is valid pointer to data that is aligned along a four
/// byte boundary.
#[allow(unused_variables)]
#[no_mangle]
pub extern "C" fn syscall_sha256_com... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/syscalls/keccak.rs | runtime/entrypoint/src/syscalls/keccak.rs | #[cfg(target_os = "zkvm")]
use core::arch::asm;
/// Executes the Keccak256 permutation on the given state.
///
/// ### Safety
///
/// The caller must ensure that `state` is valid pointer to data that is aligned along a four
/// byte boundary.
#[allow(unused_variables)]
#[no_mangle]
pub extern "C" fn syscall_keccak(sta... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/syscalls/mod.rs | runtime/entrypoint/src/syscalls/mod.rs | //! Ported from Entrypoint for SP1 zkVM.
mod halt;
mod io;
mod keccak;
mod memory;
mod sha256;
mod sys;
pub use halt::*;
pub use io::*;
pub use keccak::*;
pub use memory::*;
pub use sha256::*;
pub use sys::*;
/// These codes MUST match the codes in `core/src/runtime/syscall.rs`. There is a derived test
/// that chec... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/runtime/entrypoint/src/syscalls/sys.rs | runtime/entrypoint/src/syscalls/sys.rs | //! Ported from Entrypoint for SP1 zkVM.
use std::sync::Mutex;
use lazy_static::lazy_static;
use rand::{rngs::StdRng, Rng, SeedableRng};
use crate::syscalls::{syscall_halt, syscall_write};
/// The random number generator seed for the zkVM.
///
/// In the future, we can pass in this seed from the host or have the ve... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/build/src/lib.rs | build/src/lib.rs | mod build;
mod command;
mod utils;
use build::build_program_internal;
pub use build::execute_build_program;
use clap::Parser;
pub const BUILD_TARGET: &str = "mips-zkm-zkvm-elf";
// const DEFAULT_TAG: &str = "v1.0.0";
pub const DEFAULT_OUTPUT_DIR: &str = "elf";
pub const HELPER_TARGET_SUBDIR: &str = "elf-compilation";... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/build/src/build.rs | build/src/build.rs | use std::path::PathBuf;
use anyhow::Result;
use cargo_metadata::camino::Utf8PathBuf;
use crate::{
command::{local::create_local_command, utils::execute_command},
utils::{cargo_rerun_if_changed, copy_elf_to_output_dir, current_datetime},
BuildArgs,
};
/// Build a program with the specified [`BuildArgs`]. ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/build/src/utils.rs | build/src/utils.rs | use std::{fs, path::Path};
use anyhow::Result;
use cargo_metadata::{camino::Utf8PathBuf, Metadata};
use chrono::Local;
use crate::{BuildArgs, BUILD_TARGET, HELPER_TARGET_SUBDIR};
/// Copy the ELF to the specified output directory.
pub(crate) fn copy_elf_to_output_dir(
args: &BuildArgs,
program_metadata: &car... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/build/src/command/local.rs | build/src/command/local.rs | use std::process::Command;
use crate::{BuildArgs, HELPER_TARGET_SUBDIR};
use cargo_metadata::camino::Utf8PathBuf;
use super::utils::{get_program_build_args, get_rust_compiler_flags};
/// Get the command to build the program locally.
pub(crate) fn create_local_command(
args: &BuildArgs,
program_dir: &Utf8Path... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/build/src/command/utils.rs | build/src/command/utils.rs | use anyhow::{Context, Result};
use std::{
io::{BufRead, BufReader},
process::{exit, Command, Stdio},
thread,
};
use crate::{BuildArgs, BUILD_TARGET};
/// Get the arguments to build the program with the arguments from the [`BuildArgs`] struct.
pub(crate) fn get_program_build_args(args: &BuildArgs) -> Vec<S... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/build/src/command/mod.rs | build/src/command/mod.rs | pub(crate) mod local;
pub(crate) mod utils;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/config.rs | prover/src/config.rs | use plonky2::fri::reduction_strategies::FriReductionStrategy;
use plonky2::fri::{FriConfig, FriParams};
pub struct StarkConfig {
pub security_bits: usize,
/// The number of challenge points to generate, for IOPs that have soundness errors of (roughly)
/// `degree / |F|`.
pub num_challenges: usize,
... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/proof.rs | prover/src/proof.rs | use crate::all_stark::NUM_PUBLIC_INPUT_USERDATA;
use itertools::Itertools;
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::fri::oracle::PolynomialBatch;
use plonky2::fri::proof::{FriChallenges, FriChallengesTarget, FriProof, FriProofTarget};
use plonky2::fri::structure::{
FriOpeningBatch, ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/recursive_verifier.rs | prover/src/recursive_verifier.rs | use std::fmt::Debug;
use anyhow::Result;
use plonky2::field::extension::Extendable;
use plonky2::field::types::Field;
use plonky2::fri::witness_util::set_fri_proof_target;
use plonky2::gates::exponentiation::ExponentiationGate;
use plonky2::gates::gate::GateRef;
use plonky2::gates::noop::NoopGate;
use plonky2::hash::h... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/lib.rs | prover/src/lib.rs | #![allow(clippy::mixed_case_hex_literals)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::needless_range_loop)]
#![allow(clippy::type_complexity)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::doc_lazy_continuation)]
#![allow(clippy::field_reassign_with_default)]
#![feature(decl_macro)]
#![feature(gen... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/all_stark.rs | prover/src/all_stark.rs | use crate::arithmetic::arithmetic_stark;
use crate::arithmetic::arithmetic_stark::ArithmeticStark;
use crate::config::StarkConfig;
use crate::cpu::cpu_stark;
use crate::cpu::cpu_stark::CpuStark;
use crate::cpu::membus::NUM_GP_CHANNELS;
use crate::cross_table_lookup::{CrossTableLookup, TableWithColumns};
use crate::kecc... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/get_challenges.rs | prover/src/get_challenges.rs | use plonky2::field::extension::Extendable;
use plonky2::fri::proof::{FriProof, FriProofTarget};
use plonky2::hash::hash_types::RichField;
use plonky2::iop::challenger::{Challenger, RecursiveChallenger};
use plonky2::plonk::circuit_builder::CircuitBuilder;
use plonky2::plonk::config::{AlgebraicHasher, GenericConfig};
u... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/prover.rs | prover/src/prover.rs | use std::any::type_name;
use anyhow::{ensure, Result};
use itertools::Itertools;
use plonky2::field::extension::Extendable;
use plonky2::field::packable::Packable;
use plonky2::field::packed::PackedField;
use plonky2::field::polynomial::{PolynomialCoeffs, PolynomialValues};
use plonky2::field::types::Field;
use plonky... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/util.rs | prover/src/util.rs | use itertools::Itertools;
use std::mem::{size_of, transmute_copy, ManuallyDrop};
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::polynomial::PolynomialValues;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/vanishing_poly.rs | prover/src/vanishing_poly.rs | use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::hash::hash_types::RichField;
use plonky2::plonk::circuit_builder::CircuitBuilder;
use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cross_table_lookup::{
ev... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/lookup.rs | prover/src/lookup.rs | use num_bigint::BigUint;
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::field::polynomial::PolynomialValues;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::iop::ta... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/stark_testing.rs | prover/src/stark_testing.rs | use anyhow::{ensure, Result};
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::polynomial::{PolynomialCoeffs, PolynomialValues};
use plonky2::field::types::{Field, Sample};
use plonky2::hash::hash_types::RichField;
use plonky2::iop::witness::{PartialWitness, WitnessWrite};
use plonky2::p... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/stark.rs | prover/src/stark.rs | use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::fri::structure::{
FriBatchInfo, FriBatchInfoTarget, FriInstanceInfo, FriInstanceInfoTarget, FriOracleInfo,
FriPolynomialInfo,
};
use plonky2::hash::hash_types::Ric... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/constraint_consumer.rs | prover/src/constraint_consumer.rs | use std::marker::PhantomData;
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::iop::target::Target;
use plonky2::plonk::circuit_builder::CircuitBuilder;
pub struct ConstraintConsume... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/evaluation_frame.rs | prover/src/evaluation_frame.rs | /// A trait for viewing an evaluation frame of a STARK table.
///
/// It allows to access the current and next rows at a given step
/// and can be used to implement constraint evaluation both natively
/// and recursively.
pub trait StarkEvaluationFrame<T: Copy + Clone + Default>: Sized {
/// The number of columns f... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/verifier.rs | prover/src/verifier.rs | use crate::all_stark::{AllStark, Table};
use crate::config::StarkConfig;
use crate::constraint_consumer::ConstraintConsumer;
use crate::cross_table_lookup::{
num_ctl_helper_columns_by_table, verify_cross_table_lookups, CtlCheckVars,
GrandProductChallengeSet,
};
use crate::evaluation_frame::StarkEvaluationFrame... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/logic.rs | prover/src/logic.rs | use std::marker::PhantomData;
use itertools::izip;
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::field::polynomial::PolynomialValues;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionT... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cross_table_lookup.rs | prover/src/cross_table_lookup.rs | use std::borrow::Borrow;
use std::cmp::min;
use std::fmt::Debug;
use std::iter::repeat;
use anyhow::{ensure, Result};
use itertools::Itertools;
use plonky2::field::batch_util::batch_add_inplace;
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::field::po... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | true |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/fixed_recursive_verifier.rs | prover/src/fixed_recursive_verifier.rs | use core::mem::{self, MaybeUninit};
use std::collections::BTreeMap;
use std::ops::Range;
use hashbrown::HashMap;
use itertools::{zip_eq, Itertools};
use plonky2::field::extension::Extendable;
use plonky2::fri::FriParams;
use plonky2::gates::constant::ConstantGate;
use plonky2::gates::noop::NoopGate;
use plonky2::hash:... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | true |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend/sha_extend_stark.rs | prover/src/sha_extend/sha_extend_stark.rs | use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cross_table_lookup::{Column, Filter};
use crate::evaluation_frame::{StarkEvaluationFrame, StarkFrame};
use crate::sha_extend::columns::{
ShaExtendColumnsView, NUM_SHA_EXTEND_COLUMNS, SHA_EXTEND_COL_MAP,
};
use crate::sha_e... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend/rotate_right.rs | prover/src/sha_extend/rotate_right.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
pub struct RotateRightOp<T: Copy> {
pub value: [T; 4],
... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend/shift_right.rs | prover/src/sha_extend/shift_right.rs | use crate::sha_extend::rotate_right::shr_carry;
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
pub struct ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend/columns.rs | prover/src/sha_extend/columns.rs | use crate::sha_extend::rotate_right::RotateRightOp;
use crate::sha_extend::shift_right::ShiftRightOp;
use crate::sha_extend::wrapping_add_4::WrappingAdd4Op;
use crate::util::{indices_arr, transmute_no_compile_time_size_checks};
use std::borrow::{Borrow, BorrowMut};
use std::mem::transmute;
pub(crate) struct ShaExtendC... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend/mod.rs | prover/src/sha_extend/mod.rs | pub mod columns;
pub mod logic;
pub mod rotate_right;
pub mod sha_extend_stark;
mod shift_right;
mod wrapping_add_4;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend/wrapping_add_4.rs | prover/src/sha_extend/wrapping_add_4.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
pub struct WrappingAdd4Op<T> {
/// The result of `a + b... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend/logic.rs | prover/src/sha_extend/logic.rs | pub(crate) fn get_input_range_4(i: usize) -> std::ops::Range<usize> {
(i * 4)..(4 + i * 4)
}
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/keccak_sponge/columns.rs | prover/src/keccak_sponge/columns.rs | use std::borrow::{Borrow, BorrowMut};
use std::mem::{size_of, transmute};
use crate::util::{indices_arr, transmute_no_compile_time_size_checks};
pub(crate) const KECCAK_WIDTH_BYTES: usize = 200;
pub(crate) const KECCAK_WIDTH_U32S: usize = KECCAK_WIDTH_BYTES / 4;
pub(crate) const KECCAK_WIDTH_MINUS_DIGEST_U32S: usize ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/keccak_sponge/mod.rs | prover/src/keccak_sponge/mod.rs | //! The Keccak sponge STARK is used to hash a variable amount of data which is read from memory.
//!
//! It connects to the memory STARK to read input data, and to the Keccak-f STARK to evaluate the
//! permutation at each absorption step.
pub mod columns;
pub mod keccak_sponge_stark;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/keccak_sponge/keccak_sponge_stark.rs | prover/src/keccak_sponge/keccak_sponge_stark.rs | use std::borrow::Borrow;
use std::cmp::min;
use std::iter::{once, repeat};
use std::marker::PhantomData;
use std::mem::size_of;
use itertools::Itertools;
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::field::polynomial::PolynomialValues;
use plonky2::... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend_sponge/sha_extend_sponge_stark.rs | prover/src/sha_extend_sponge/sha_extend_sponge_stark.rs | use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::membus::NUM_CHANNELS;
use crate::cross_table_lookup::{Column, Filter};
use crate::evaluation_frame::{StarkEvaluationFrame, StarkFrame};
use crate::memory::segments::Segment;
use crate::sha_extend::logic::get_input_range_4... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend_sponge/columns.rs | prover/src/sha_extend_sponge/columns.rs | use crate::util::{indices_arr, transmute_no_compile_time_size_checks};
use std::borrow::{Borrow, BorrowMut};
use std::mem::transmute;
pub(crate) const NUM_EXTEND_INPUT: usize = 4;
pub(crate) const SHA_EXTEND_SPONGE_READ_BYTES: usize = NUM_EXTEND_INPUT * 4;
pub(crate) struct ShaExtendSpongeColumnsView<T: Copy> {
//... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend_sponge/mod.rs | prover/src/sha_extend_sponge/mod.rs | pub mod columns;
pub mod logic;
pub mod sha_extend_sponge_stark;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_extend_sponge/logic.rs | prover/src/sha_extend_sponge/logic.rs | use crate::sha_extend_sponge::sha_extend_sponge_stark::NUM_ROUNDS;
use plonky2::field::extension::Extendable;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
// Compute (x - y - diff) * sum_r... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/witness/errors.rs | prover/src/witness/errors.rs | #[allow(dead_code)]
#[derive(Debug)]
pub enum ProgramError {
OutOfGas,
InvalidRegister,
InvalidSyscall,
InvalidOpcode,
Trap,
StackUnderflow,
InvalidRlp,
InvalidJumpDestination,
InvalidJumpiDestination,
StackOverflow,
KernelPanic,
MemoryError(MemoryError),
GasLimitErro... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/witness/memory.rs | prover/src/witness/memory.rs | use crate::cpu::membus::{NUM_CHANNELS, NUM_GP_CHANNELS};
use itertools::Itertools;
#[derive(Clone, Copy, Debug)]
pub enum MemoryChannel {
Code,
GeneralPurpose(usize),
}
use MemoryChannel::{Code, GeneralPurpose};
use crate::memory::segments::Segment;
impl MemoryChannel {
pub fn index(&self) -> usize {
... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/witness/state.rs | prover/src/witness/state.rs | use crate::cpu::kernel::assembler::Kernel;
const KERNEL_CONTEXT: usize = 0;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct RegistersState {
pub gprs: [usize; 32],
pub lo: usize,
pub hi: usize,
pub heap: usize,
pub program_counter: usize,
pub next_pc: usize,
pub brk: usize,
pub ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/witness/transition.rs | prover/src/witness/transition.rs | use anyhow::bail;
use log::log_enabled;
use plonky2::field::extension::Extendable;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::plonk::config::GenericConfig;
use crate::cpu::columns::CpuColumnsView;
use crate::cpu::kernel::assembler::Kernel;
use crate::generation::state::Ge... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/witness/util.rs | prover/src/witness/util.rs | use byteorder::ByteOrder;
use byteorder::LittleEndian;
use itertools::Itertools;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use crate::cpu::columns::CpuColumnsView;
use crate::cpu::kernel::keccak_util::keccakf_u8s;
use crate::cpu::membus::NUM_CH... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/witness/traces.rs | prover/src/witness/traces.rs | use itertools::Itertools;
use plonky2::field::extension::Extendable;
use plonky2::field::polynomial::PolynomialValues;
use plonky2::hash::hash_types::RichField;
use plonky2::timed;
use plonky2::util::timing::TimingTree;
use plonky2_maybe_rayon::rayon;
use std::cmp::max;
use crate::all_stark::{AllStark, MIN_TRACE_LEN, ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/witness/mod.rs | prover/src/witness/mod.rs | pub(crate) mod errors;
pub(crate) mod memory;
pub(crate) mod operation;
pub(crate) mod state;
pub(crate) mod traces;
pub(crate) mod transition;
pub(crate) mod util;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/witness/operation.rs | prover/src/witness/operation.rs | use super::util::*;
use crate::cpu::columns::CpuColumnsView;
use crate::cpu::kernel::assembler::Kernel;
use crate::generation::state::GenerationState;
use crate::memory::segments::Segment;
use crate::witness::errors::ProgramError;
use crate::witness::memory::MemoryAddress;
use crate::{arithmetic, logic};
use anyhow::{... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | true |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/misc.rs | prover/src/cpu/misc.rs | use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::columns::CpuColumnsView;
use crate::util::{limb_from_bits_le, limb_from_bits_le_recursive};
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/count.rs | prover/src/cpu/count.rs | use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::columns::CpuColumnsView;
use crate::util::{limb_from_bits_le, limb_from_bits_le_recursive};
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/memio.rs | prover/src/cpu/memio.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
use crate::constraint_consumer::{ConstraintConsumer, Recu... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | true |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/jumps.rs | prover/src/cpu/jumps.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::columns::CpuC... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/bootstrap_kernel.rs | prover/src/cpu/bootstrap_kernel.rs | use itertools::Itertools;
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
use plonky2::plonk::config::Generi... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/decode.rs | prover/src/cpu/decode.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::columns::{CpuColumnsView, COL_MAP};
/// List ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/bits.rs | prover/src/cpu/bits.rs | use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::columns::CpuColumnsView;
use crate::util::{limb_from_bits_le, limb_from_bits_le_recursive};
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::hash::hash_types::RichField;
use... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/shift.rs | prover/src/cpu/shift.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::columns::CpuC... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/mod.rs | prover/src/cpu/mod.rs | pub(crate) mod bits;
pub(crate) mod bootstrap_kernel;
pub mod columns;
pub(crate) mod count;
pub mod cpu_stark;
pub(crate) mod decode;
pub(crate) mod exit_kernel;
pub(crate) mod jumps;
pub mod kernel;
pub(crate) mod membus;
pub(crate) mod memio;
pub(crate) mod misc;
pub(crate) mod shift;
pub(crate) mod syscall;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/membus.rs | prover/src/cpu/membus.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::columns::CpuColumnsView;
/// General-purpose m... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/cpu_stark.rs | prover/src/cpu/cpu_stark.rs | use std::borrow::Borrow;
use std::iter::repeat_n;
use std::marker::PhantomData;
use itertools::Itertools;
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::Exten... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/syscall.rs | prover/src/cpu/syscall.rs | use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cpu::columns::CpuColumnsView;
use crate::witness::operation::*;
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/exit_kernel.rs | prover/src/cpu/exit_kernel.rs | use itertools::Itertools;
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
use crate::constraint_consumer::{... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/kernel/assembler.rs | prover/src/cpu/kernel/assembler.rs | use super::elf::Program;
use crate::all_stark::NUM_PUBLIC_INPUT_USERDATA;
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use std::{collections::HashMap, io::Read};
use zkm_emulator::utils::get_block_path;
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize)]
pub struct Kernel {
// MIPS ELF
... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/kernel/keccak_util.rs | prover/src/cpu/kernel/keccak_util.rs | use tiny_keccak::keccakf;
use crate::keccak_sponge::columns::{KECCAK_WIDTH_BYTES, KECCAK_WIDTH_U32S};
/// Like tiny-keccak's `keccakf`, but deals with `u32` limbs instead of `u64` limbs.
pub(crate) fn keccakf_u32s(state_u32s: &mut [u32; KECCAK_WIDTH_U32S]) {
let mut state_u64s: [u64; 25] = core::array::from_fn(|i... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/kernel/mod.rs | prover/src/cpu/kernel/mod.rs | pub mod assembler;
pub(crate) mod constants;
pub(crate) mod elf;
pub(crate) mod keccak_util;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/kernel/elf.rs | prover/src/cpu/kernel/elf.rs | extern crate alloc;
use alloc::collections::BTreeMap;
use anyhow::{Context, Result};
use serde::{Deserialize, Serialize};
use std::fs::{self};
use std::io::Read;
use zkm_emulator::memory::WORD_SIZE;
use zkm_emulator::state::{Segment, REGISTERS_START};
pub const PAGE_SIZE: u32 = 4096;
/// A MIPS program
#[derive(Partia... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/kernel/constants/mod.rs | prover/src/cpu/kernel/constants/mod.rs | pub(crate) mod context_metadata;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/kernel/constants/context_metadata.rs | prover/src/cpu/kernel/constants/context_metadata.rs | /// These metadata fields contain VM state specific to a particular context.
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Debug)]
pub(crate) enum ContextMetadata {
/// The ID of the context which created this one.
ParentContext = 0,
/// The program counter to return to when we return to the p... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/columns/general.rs | prover/src/cpu/columns/general.rs | use std::borrow::{Borrow, BorrowMut};
use std::fmt::{Debug, Formatter};
use std::mem::{size_of, transmute};
/// General purpose columns, which can have different meanings depending on what CTL or other
/// operation is occurring at this row.
#[derive(Clone, Copy)]
pub(crate) union CpuGeneralColumnsView<T: Copy> {
... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/columns/mod.rs | prover/src/cpu/columns/mod.rs | use std::borrow::{Borrow, BorrowMut};
use std::fmt::Debug;
use std::mem::{size_of, transmute};
use std::ops::{Index, IndexMut};
use plonky2::field::types::Field;
use crate::cpu::columns::general::CpuGeneralColumnsView;
use crate::cpu::columns::ops::OpsColumnsView;
use crate::cpu::membus::NUM_GP_CHANNELS;
use crate::u... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/cpu/columns/ops.rs | prover/src/cpu/columns/ops.rs | use std::borrow::{Borrow, BorrowMut};
use std::mem::{size_of, transmute};
use std::ops::{Deref, DerefMut};
use crate::util::transmute_no_compile_time_size_checks;
#[repr(C)]
#[derive(Clone, Copy, Eq, PartialEq, Debug)]
pub struct OpsColumnsView<T: Copy> {
pub binary_op: T, // Combines ADD, MUL, SUB, DIV, SLL,... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/memory/columns.rs | prover/src/memory/columns.rs | //! Memory registers.
use crate::memory::VALUE_LIMBS;
// Columns for memory operations, ordered by (addr, timestamp).
/// 1 if this is an actual memory operation, or 0 if it's a padding row.
pub(crate) const FILTER: usize = 0;
pub(crate) const TIMESTAMP: usize = FILTER + 1;
pub(crate) const IS_READ: usize = TIMESTAMP... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/memory/memory_stark.rs | prover/src/memory/memory_stark.rs | use std::marker::PhantomData;
use itertools::Itertools;
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::field::polynomial::PolynomialValues;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::Exten... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/memory/segments.rs | prover/src/memory/segments.rs | /// Use segment for possible register reduce optimization
#[allow(dead_code)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Debug)]
pub enum Segment {
/// Code
Code = 0,
/// General purpose kernel memory, used by various kernel functions.
/// In general, calling a helper function can resul... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/memory/mod.rs | prover/src/memory/mod.rs | pub mod columns;
pub mod memory_stark;
pub mod segments;
// TODO: Move to CPU module, now that channels have been removed from the memory table.
pub(crate) const NUM_CHANNELS: usize = crate::cpu::membus::NUM_CHANNELS;
pub(crate) const VALUE_LIMBS: usize = 1;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_compress/columns.rs | prover/src/sha_compress/columns.rs | use crate::sha_compress::not_operation::NotOperation;
use crate::sha_compress::wrapping_add_2::WrappingAdd2Op;
use crate::sha_compress::wrapping_add_5::WrappingAdd5Op;
use crate::sha_extend::rotate_right::RotateRightOp;
use crate::util::{indices_arr, transmute_no_compile_time_size_checks};
use std::borrow::{Borrow, Bor... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_compress/wrapping_add_2.rs | prover/src/sha_compress/wrapping_add_2.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
pub struct WrappingAdd2Op<T> {
/// The result of `a + b... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_compress/sha_compress_stark.rs | prover/src/sha_compress/sha_compress_stark.rs | use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use crate::cross_table_lookup::{Column, Filter};
use crate::evaluation_frame::{StarkEvaluationFrame, StarkFrame};
use crate::sha_compress::columns::{
ShaCompressColumnsView, NUM_SHA_COMPRESS_COLUMNS, SHA_COMPRESS_COL_MAP,
};
use crat... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | true |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_compress/mod.rs | prover/src/sha_compress/mod.rs | pub mod columns;
pub mod logic;
pub mod not_operation;
pub mod sha_compress_stark;
pub mod wrapping_add_2;
pub mod wrapping_add_5;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_compress/not_operation.rs | prover/src/sha_compress/not_operation.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
pub struct NotOperation<T: Copy> {
/// The result of `!... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_compress/wrapping_add_5.rs | prover/src/sha_compress/wrapping_add_5.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::Field;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
pub struct WrappingAdd5Op<T> {
/// The result of `a + b... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/sha_compress/logic.rs | prover/src/sha_compress/logic.rs | use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
pub(crate) fn equal_packed_constraint<P: PackedField, const N: usize>(
x: [P; N],
y: ... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/poseidon_sponge/columns.rs | prover/src/poseidon_sponge/columns.rs | use crate::poseidon::constants::{SPONGE_CAPACITY, SPONGE_RATE, SPONGE_WIDTH};
use std::borrow::{Borrow, BorrowMut};
use std::mem::{size_of, transmute};
use crate::util::{indices_arr, transmute_no_compile_time_size_checks};
pub(crate) const POSEIDON_WIDTH_BYTES: usize = 48; // 12 * 4
pub(crate) const POSEIDON_WIDTH_U3... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/poseidon_sponge/mod.rs | prover/src/poseidon_sponge/mod.rs | pub mod columns;
pub mod poseidon_sponge_stark;
| rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/poseidon_sponge/poseidon_sponge_stark.rs | prover/src/poseidon_sponge/poseidon_sponge_stark.rs | use std::borrow::Borrow;
use std::cmp::min;
use std::iter::once;
use std::marker::PhantomData;
use itertools::Itertools;
use plonky2::field::extension::{Extendable, FieldExtension};
use plonky2::field::packed::PackedField;
use plonky2::field::polynomial::PolynomialValues;
use plonky2::field::types::{Field, PrimeField6... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/arithmetic/slt.rs | prover/src/arithmetic/slt.rs | use crate::arithmetic::columns::*;
use crate::arithmetic::utils::u32_to_array;
use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
use itertools::Itertools;
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::{Field, PrimeField64... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/arithmetic/sra.rs | prover/src/arithmetic/sra.rs | //! Support for the MIPS SRA(V) instructions.
//!
//! This crate verifies an MIPS shift instruction, which takes two
//! 32-bit inputs S and A, and produces a 32-bit output C satisfying
//!
//! C = A >> S (mod 2^32)
use itertools::Itertools;
use plonky2::field::extension::Extendable;
use plonky2::field::interpolati... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/arithmetic/lo_hi.rs | prover/src/arithmetic/lo_hi.rs | //! Support for MIPS instructions MFHI, MTHI, MHLO, MTLO
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::PrimeField64;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuil... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/arithmetic/mult.rs | prover/src/arithmetic/mult.rs | //! Support for the MIPS MULT/MULTU instruction.
//!
//! This crate verifies an MIPS MULT/MULTU instruction, which takes two
//! 32-bit inputs A and B, and produces two 32-bit output H and L satisfying
//!
//! (H,L)=A*B
//!
//! i.e. H is the higher half of the usual long multiplication
//! A*B and L is the lower hal... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/arithmetic/columns.rs | prover/src/arithmetic/columns.rs | //! Arithmetic unit
use std::ops::Range;
pub const LIMB_BITS: usize = 16;
const ZKM_REGISTER_BITS: usize = 32;
/// Return the number of LIMB_BITS limbs that are in an MIPS
/// register-sized number, panicking if LIMB_BITS doesn't divide in
/// the MIPS register size.
const fn n_limbs() -> usize {
if ZKM_REGISTER... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/arithmetic/div.rs | prover/src/arithmetic/div.rs | //! Support for MIPS instructions DIV and DIVU.
use std::ops::Range;
use num::{One, Zero};
use num_bigint::{BigInt, Sign};
use plonky2::field::extension::Extendable;
use plonky2::field::packed::PackedField;
use plonky2::field::types::{Field, PrimeField64};
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ex... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | true |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/arithmetic/shift.rs | prover/src/arithmetic/shift.rs | //! Support for the MIPS SLL(V), and SRL(V) instructions.
//!
//! This crate verifies an MIPS shift instruction, which takes two
//! 32-bit inputs S and A, and produces a 32-bit output C satisfying
//!
//! C = A << S (mod 2^32) for SLL(V) or
//! C = A >> S (mod 2^32) for SRL(V).
//!
//! The way this computation i... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
ProjectZKM/zkm | https://github.com/ProjectZKM/zkm/blob/eb09cf6c81bed9717bc98e4a4c9a61f54787a351/prover/src/arithmetic/utils.rs | prover/src/arithmetic/utils.rs | use std::ops::{Add, AddAssign, Mul, Neg, Range, Shr, Sub, SubAssign};
use plonky2::field::extension::Extendable;
use plonky2::field::types::{Field, PrimeField64};
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;
use plonky2::plonk::circuit_builder::CircuitBuilder;
use static_ass... | rust | MIT | eb09cf6c81bed9717bc98e4a4c9a61f54787a351 | 2026-01-04T20:21:15.281276Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.