Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates following FRI refactor #110

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion basic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ p3-dft = { path = "../../Plonky3/dft" }
p3-field = { path = "../../Plonky3/field" }
p3-fri = { path = "../../Plonky3/fri" }
p3-keccak = { path = "../../Plonky3/keccak" }
p3-ldt = { path = "../../Plonky3/ldt" }
p3-mds = { path = "../../Plonky3/mds" }
p3-merkle-tree = { path = "../../Plonky3/merkle-tree" }
p3-poseidon = { path = "../../Plonky3/poseidon" }
Expand Down
20 changes: 11 additions & 9 deletions basic/tests/test_prover.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
extern crate core;

use p3_baby_bear::BabyBear;
use p3_fri::{TwoAdicFriPcs, TwoAdicFriPcsConfig};
use valida_alu_u32::add::{Add32Instruction, MachineWithAdd32Chip};
use valida_basic::BasicMachine;
use valida_cpu::{
BeqInstruction, BneInstruction, Imm32Instruction, JalInstruction, JalvInstruction,
MachineWithCpuChip, StopInstruction,
};

use valida_machine::{
FixedAdviceProvider, Instruction, InstructionWord, Machine, MachineProof, Operands, ProgramROM,
Word,
Expand All @@ -21,9 +21,8 @@ use p3_challenger::DuplexChallenger;
use p3_dft::Radix2Bowers;
use p3_field::extension::BinomialExtensionField;
use p3_field::Field;
use p3_fri::{FriBasedPcs, FriConfigImpl, FriLdt};
use p3_fri::FriConfig;
use p3_keccak::Keccak256Hash;
use p3_ldt::QuotientMmcs;
use p3_mds::coset_mds::CosetMds;
use p3_merkle_tree::FieldMerkleTreeMmcs;
use p3_poseidon::Poseidon;
Expand Down Expand Up @@ -221,15 +220,18 @@ fn prove_fibonacci() {

type Challenger = DuplexChallenger<Val, Perm16, 16>;

type Quotient = QuotientMmcs<Val, Challenge, ValMmcs>;
type MyFriConfig = FriConfigImpl<Val, Challenge, Quotient, ChallengeMmcs, Challenger>;
let fri_config = MyFriConfig::new(1, 40, 8, challenge_mmcs);
let ldt = FriLdt { config: fri_config };
type MyFriConfig = TwoAdicFriPcsConfig<Val, Challenge, Challenger, Dft, ValMmcs, ChallengeMmcs>;
let fri_config = FriConfig {
log_blowup: 1,
num_queries: 40,
proof_of_work_bits: 8,
mmcs: challenge_mmcs,
};

type Pcs = FriBasedPcs<MyFriConfig, ValMmcs, Dft, Challenger>;
type Pcs = TwoAdicFriPcs<MyFriConfig>;
type MyConfig = StarkConfigImpl<Val, Challenge, PackedChallenge, Pcs, Challenger>;

let pcs = Pcs::new(dft, val_mmcs, ldt);
let pcs = Pcs::new(fri_config, dft, val_mmcs);

let challenger = Challenger::new(perm16);
let config = MyConfig::new(pcs, challenger);
Expand Down
Loading