diff --git a/alu_u32/src/add/mod.rs b/alu_u32/src/add/mod.rs index 6286f3cc..1c8b7ba1 100644 --- a/alu_u32/src/add/mod.rs +++ b/alu_u32/src/add/mod.rs @@ -14,7 +14,7 @@ use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field, PrimeField}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use valida_util::pad_to_power_of_two; pub mod columns; diff --git a/alu_u32/src/bitwise/mod.rs b/alu_u32/src/bitwise/mod.rs index fe590c41..2ec2684d 100644 --- a/alu_u32/src/bitwise/mod.rs +++ b/alu_u32/src/bitwise/mod.rs @@ -13,7 +13,7 @@ use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field, PrimeField}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use valida_util::pad_to_power_of_two; pub mod columns; diff --git a/alu_u32/src/div/mod.rs b/alu_u32/src/div/mod.rs index f8b623b5..9e18df46 100644 --- a/alu_u32/src/div/mod.rs +++ b/alu_u32/src/div/mod.rs @@ -6,8 +6,8 @@ use columns::{Div32Cols, DIV_COL_MAP, NUM_DIV_COLS}; use core::mem::transmute; use valida_bus::MachineWithGeneralBus; use valida_cpu::MachineWithCpuChip; -use valida_machine::config::StarkConfig; -use valida_machine::core::SDiv; +use valida_machine::SDiv; +use valida_machine::StarkConfig; use valida_machine::{instructions, Chip, Instruction, Interaction, Operands, Word}; use valida_opcodes::{DIV32, SDIV32}; use valida_range::MachineWithRangeChip; diff --git a/alu_u32/src/lt/mod.rs b/alu_u32/src/lt/mod.rs index c501dfa6..032f3fc2 100644 --- a/alu_u32/src/lt/mod.rs +++ b/alu_u32/src/lt/mod.rs @@ -17,7 +17,7 @@ use p3_field::{AbstractField, Field, PrimeField}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use valida_util::pad_to_power_of_two; pub mod columns; pub mod stark; diff --git a/alu_u32/src/mul/mod.rs b/alu_u32/src/mul/mod.rs index 45d4c800..dba1f987 100644 --- a/alu_u32/src/mul/mod.rs +++ b/alu_u32/src/mul/mod.rs @@ -13,7 +13,7 @@ use core::borrow::BorrowMut; use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field, PrimeField}; use p3_matrix::dense::RowMajorMatrix; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; pub mod columns; pub mod stark; diff --git a/alu_u32/src/shift/mod.rs b/alu_u32/src/shift/mod.rs index 332fbd24..f368431e 100644 --- a/alu_u32/src/shift/mod.rs +++ b/alu_u32/src/shift/mod.rs @@ -15,7 +15,7 @@ use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field, PrimeField}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use valida_util::pad_to_power_of_two; pub mod columns; diff --git a/alu_u32/src/sub/mod.rs b/alu_u32/src/sub/mod.rs index b79bf520..1b78aec6 100644 --- a/alu_u32/src/sub/mod.rs +++ b/alu_u32/src/sub/mod.rs @@ -14,7 +14,7 @@ use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field, PrimeField}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use valida_util::pad_to_power_of_two; pub mod columns; diff --git a/basic/src/lib.rs b/basic/src/lib.rs index 29029d56..14b26ddc 100644 --- a/basic/src/lib.rs +++ b/basic/src/lib.rs @@ -38,9 +38,8 @@ use valida_cpu::{ use valida_cpu::{CpuChip, MachineWithCpuChip}; use valida_derive::Machine; use valida_machine::{ - proof::{ChipProof, MachineProof}, - AbstractExtensionField, AbstractField, AdviceProvider, BusArgument, Chip, ExtensionField, - Instruction, Machine, PrimeField64, ProgramROM, ValidaAirBuilder, + AbstractExtensionField, AbstractField, AdviceProvider, BusArgument, Chip, ChipProof, + ExtensionField, Instruction, Machine, MachineProof, PrimeField64, ProgramROM, ValidaAirBuilder, }; use valida_memory::{MachineWithMemoryChip, MemoryChip}; use valida_output::{MachineWithOutputChip, OutputChip, WriteInstruction}; @@ -48,7 +47,7 @@ use valida_program::{MachineWithProgramChip, ProgramChip}; use valida_range::{MachineWithRangeChip, RangeCheckerChip}; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; #[derive(Machine, Default)] #[machine_fields(F)] diff --git a/basic/tests/test_prover.rs b/basic/tests/test_prover.rs index 881d5859..ba7152d0 100644 --- a/basic/tests/test_prover.rs +++ b/basic/tests/test_prover.rs @@ -28,8 +28,8 @@ use p3_merkle_tree::FieldMerkleTreeMmcs; use p3_poseidon::Poseidon; use p3_symmetric::{CompressionFunctionFromHasher, SerializingHasher32}; use rand::thread_rng; +use valida_machine::StarkConfigImpl; use valida_machine::__internal::p3_commit::ExtensionMmcs; -use valida_machine::config::StarkConfigImpl; #[test] fn prove_fibonacci() { diff --git a/cpu/src/lib.rs b/cpu/src/lib.rs index 3d8d7a93..3d926e79 100644 --- a/cpu/src/lib.rs +++ b/cpu/src/lib.rs @@ -22,7 +22,7 @@ use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field, PrimeField}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use valida_util::batch_multiplicative_inverse_allowing_zero; pub mod columns; diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 308762d9..867387eb 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -232,7 +232,7 @@ fn prove_method(chips: &[&Field]) -> TokenStream2 { quote! { #[tracing::instrument(name = "prove machine execution", skip_all)] - fn prove>(&self, config: &SC) -> ::valida_machine::proof::MachineProof + fn prove>(&self, config: &SC) -> ::valida_machine::MachineProof { use ::valida_machine::__internal::*; use ::valida_machine::__internal::p3_air::{BaseAir}; @@ -240,8 +240,7 @@ fn prove_method(chips: &[&Field]) -> TokenStream2 { use ::valida_machine::__internal::p3_commit::{Pcs, UnivariatePcs, UnivariatePcsWithLde}; use ::valida_machine::__internal::p3_matrix::{Matrix, dense::RowMajorMatrix}; use ::valida_machine::__internal::p3_util::log2_strict_usize; - use ::valida_machine::generate_permutation_trace; - use ::valida_machine::proof::{MachineProof, ChipProof, Commitments}; + use ::valida_machine::{generate_permutation_trace, MachineProof, ChipProof, Commitments}; use alloc::vec; use alloc::vec::Vec; use alloc::boxed::Box; @@ -357,7 +356,7 @@ fn verify_method(_chips: &[&Field]) -> TokenStream2 { quote! { fn verify>( config: &SC, - proof: &::valida_machine::proof::MachineProof, + proof: &::valida_machine::MachineProof, ) -> core::result::Result<(), ()> { Ok(()) // TODO diff --git a/machine/src/check_constraints.rs b/machine/src/check_constraints.rs index a434a725..97ecb3e5 100644 --- a/machine/src/check_constraints.rs +++ b/machine/src/check_constraints.rs @@ -1,6 +1,6 @@ use crate::__internal::DebugConstraintBuilder; use crate::chip::eval_permutation_constraints; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use crate::{Chip, Machine}; use p3_air::TwoRowMatrixView; diff --git a/machine/src/debug_builder.rs b/machine/src/debug_builder.rs index b738f754..bbe5075f 100644 --- a/machine/src/debug_builder.rs +++ b/machine/src/debug_builder.rs @@ -1,7 +1,7 @@ use crate::{Machine, ValidaAirBuilder}; use p3_air::{AirBuilder, PairBuilder, PermutationAirBuilder, TwoRowMatrixView}; use p3_field::AbstractField; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; /// An `AirBuilder` which asserts that each constraint is zero, allowing any failed constraints to /// be detected early. pub struct DebugConstraintBuilder<'a, M: Machine, SC: StarkConfig> { diff --git a/machine/src/folding_builder.rs b/machine/src/folding_builder.rs index 8ae1e4b5..ec20d589 100644 --- a/machine/src/folding_builder.rs +++ b/machine/src/folding_builder.rs @@ -1,7 +1,7 @@ use crate::{Machine, ValidaAirBuilder}; use p3_air::{AirBuilder, PairBuilder, PermutationAirBuilder, TwoRowMatrixView}; use p3_field::AbstractField; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; pub struct ProverConstraintFolder<'a, M: Machine, SC: StarkConfig> { pub(crate) machine: &'a M, diff --git a/machine/src/lib.rs b/machine/src/lib.rs index eb76d756..1eb9b5f1 100644 --- a/machine/src/lib.rs +++ b/machine/src/lib.rs @@ -8,26 +8,28 @@ pub use chip::{BusArgument, Chip, Interaction, InteractionType, ValidaAirBuilder pub use p3_field::{ AbstractExtensionField, AbstractField, ExtensionField, Field, PrimeField, PrimeField64, }; -// TODO: some are also re-exported, so they shouldn't be pub? + pub mod __internal; mod advice; mod check_constraints; mod chip; -pub mod config; -pub mod core; +mod config; +mod core; mod debug_builder; mod folding_builder; mod machine; mod program; -pub mod proof; +mod proof; mod quotient; mod symbolic; pub use advice::*; pub use chip::*; +pub use config::*; pub use core::*; pub use machine::*; pub use program::*; +pub use proof::*; pub const OPERAND_ELEMENTS: usize = 5; pub const INSTRUCTION_ELEMENTS: usize = OPERAND_ELEMENTS + 1; diff --git a/memory/src/lib.rs b/memory/src/lib.rs index 65973100..ea0cf345 100644 --- a/memory/src/lib.rs +++ b/memory/src/lib.rs @@ -12,7 +12,7 @@ use p3_field::{Field, PrimeField}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; use valida_bus::MachineWithMemBus; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use valida_machine::{BusArgument, Chip, Interaction, Machine, Word}; use valida_util::batch_multiplicative_inverse_allowing_zero; diff --git a/native_field/src/lib.rs b/native_field/src/lib.rs index aac71118..affa7faf 100644 --- a/native_field/src/lib.rs +++ b/native_field/src/lib.rs @@ -17,7 +17,7 @@ use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field, PrimeField32}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; pub mod columns; pub mod stark; diff --git a/output/src/lib.rs b/output/src/lib.rs index 87b38860..b4104745 100644 --- a/output/src/lib.rs +++ b/output/src/lib.rs @@ -12,7 +12,7 @@ use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field}; use p3_matrix::dense::RowMajorMatrix; use p3_maybe_rayon::prelude::*; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; use valida_util::pad_to_power_of_two; pub mod columns; diff --git a/program/src/lib.rs b/program/src/lib.rs index 151300cf..638053e4 100644 --- a/program/src/lib.rs +++ b/program/src/lib.rs @@ -12,7 +12,7 @@ use valida_util::pad_to_power_of_two; use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field}; use p3_matrix::dense::RowMajorMatrix; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; pub mod columns; pub mod stark; diff --git a/range/src/lib.rs b/range/src/lib.rs index aa988357..6d104d9b 100644 --- a/range/src/lib.rs +++ b/range/src/lib.rs @@ -14,7 +14,7 @@ use valida_machine::{Chip, Machine, Word}; use p3_air::VirtualPairCol; use p3_field::{AbstractField, Field}; use p3_matrix::dense::RowMajorMatrix; -use valida_machine::config::StarkConfig; +use valida_machine::StarkConfig; pub mod columns; pub mod stark; diff --git a/verifier/src/lib.rs b/verifier/src/lib.rs index 5441d7cf..6d2a4a8c 100644 --- a/verifier/src/lib.rs +++ b/verifier/src/lib.rs @@ -1,6 +1,6 @@ #![no_std] -// use valida_machine::config::Config; +// use valida_machine::Config; // use valida_machine::Machine; // // pub fn verify>() -> Result<(), ()> {