From 9d03646e6d790be0786cc73b44872a69ad7429d7 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Wed, 14 Feb 2024 15:57:07 -0800 Subject: [PATCH 01/19] checkpoint --- core/src/runtime/record.rs | 224 ++++++++++++++++++--------- core/src/stark/air.rs | 302 +++++++++++++++++++++++++++++++++++++ core/src/stark/machine.rs | 219 ++++++++++++++------------- core/src/stark/mod.rs | 4 + 4 files changed, 575 insertions(+), 174 deletions(-) create mode 100644 core/src/stark/air.rs diff --git a/core/src/runtime/record.rs b/core/src/runtime/record.rs index aa6f3d183e..5e88797a60 100644 --- a/core/src/runtime/record.rs +++ b/core/src/runtime/record.rs @@ -1,9 +1,16 @@ use std::collections::{BTreeMap, HashMap}; +use std::marker::PhantomData; use std::sync::Arc; +use crate::stark::riscv_chips::*; +use clap::builder::Str; +use k256::sha2::digest::Mac; +use p3_field::PrimeField32; + use super::program::Program; use super::Opcode; -use crate::alu::AluEvent; +use crate::air::MachineAir; +use crate::alu::{AddChip, AluEvent}; use crate::bytes::{ByteLookupEvent, ByteOpcode}; use crate::cpu::{CpuEvent, MemoryRecordEnum}; use crate::field::event::FieldEvent; @@ -15,6 +22,35 @@ use crate::syscall::precompiles::keccak256::KeccakPermuteEvent; use crate::syscall::precompiles::sha256::{ShaCompressEvent, ShaExtendEvent}; use crate::syscall::precompiles::{ECAddEvent, ECDoubleEvent}; use crate::utils::env; +use std::collections::hash_map::Entry; + +#[derive(Clone, Debug)] +pub enum Record { + Program(HashMap), + Cpu(Vec), + Add(Vec), + Sub(Vec), + Mul(Vec), + Bitwise(Vec), + ShiftLeft(Vec), + ShiftRight(Vec), + DivRem(Vec), + Lt(Vec), + FieldLtu(Vec), + ShaExtend(Vec), + ShaCompress(Vec), + KeccakPermute(Vec), + Ed5519Add(Vec), + Ed25519Decompress(Vec), + Secp256k1Add(Vec), + Secp256k1Double(Vec), + K256Decompress(Vec), + Blake3CompressInner(Vec), + ByteLookup(BTreeMap), + MemoryInit(Vec<(u32, MemoryRecord, u32)>), + MemoryLast(Vec<(u32, MemoryRecord, u32)>), + MemoryProgram(Vec<(u32, MemoryRecord, u32)>), +} /// A record of the execution of a program. Contains event data for everything that happened during /// the execution of the shard. @@ -23,104 +59,154 @@ pub struct ExecutionRecord { /// The index of the shard. pub index: u32, - /// The program. - pub program: Arc, + pub event_map: HashMap, + // /// The program. + // pub program: Arc, + + // /// A trace of the CPU events which get emitted during execution. + // pub cpu_events: Vec, + + // /// Multiplicity counts for each instruction in the program. + // pub instruction_counts: HashMap, + + // /// A trace of the ADD, and ADDI events. + // pub add_events: Vec, - /// A trace of the CPU events which get emitted during execution. - pub cpu_events: Vec, + // /// A trace of the MUL events. + // pub mul_events: Vec, - /// Multiplicity counts for each instruction in the program. - pub instruction_counts: HashMap, + // /// A trace of the SUB events. + // pub sub_events: Vec, - /// A trace of the ADD, and ADDI events. - pub add_events: Vec, + // /// A trace of the XOR, XORI, OR, ORI, AND, and ANDI events. + // pub bitwise_events: Vec, - /// A trace of the MUL events. - pub mul_events: Vec, + // /// A trace of the SLL and SLLI events. + // pub shift_left_events: Vec, - /// A trace of the SUB events. - pub sub_events: Vec, + // /// A trace of the SRL, SRLI, SRA, and SRAI events. + // pub shift_right_events: Vec, - /// A trace of the XOR, XORI, OR, ORI, AND, and ANDI events. - pub bitwise_events: Vec, + // /// A trace of the DIV, DIVU, REM, and REMU events. + // pub divrem_events: Vec, - /// A trace of the SLL and SLLI events. - pub shift_left_events: Vec, + // /// A trace of the SLT, SLTI, SLTU, and SLTIU events. + // pub lt_events: Vec, - /// A trace of the SRL, SRLI, SRA, and SRAI events. - pub shift_right_events: Vec, + // /// A trace of the byte lookups needed. + // pub byte_lookups: BTreeMap, - /// A trace of the DIV, DIVU, REM, and REMU events. - pub divrem_events: Vec, + // /// A trace of field LTU events. + // pub field_events: Vec, - /// A trace of the SLT, SLTI, SLTU, and SLTIU events. - pub lt_events: Vec, + // pub sha_extend_events: Vec, - /// A trace of the byte lookups needed. - pub byte_lookups: BTreeMap, + // pub sha_compress_events: Vec, - /// A trace of field LTU events. - pub field_events: Vec, + // pub keccak_permute_events: Vec, - pub sha_extend_events: Vec, + // pub ed_add_events: Vec, - pub sha_compress_events: Vec, + // pub ed_decompress_events: Vec, - pub keccak_permute_events: Vec, + // pub weierstrass_add_events: Vec, - pub ed_add_events: Vec, + // pub weierstrass_double_events: Vec, - pub ed_decompress_events: Vec, + // pub k256_decompress_events: Vec, - pub weierstrass_add_events: Vec, + // pub blake3_compress_inner_events: Vec, - pub weierstrass_double_events: Vec, + // /// Information needed for global chips. This shouldn't really be here but for legacy reasons, + // /// we keep this information in this struct for now. + // pub first_memory_record: Vec<(u32, MemoryRecord, u32)>, + // pub last_memory_record: Vec<(u32, MemoryRecord, u32)>, + // pub program_memory_record: Vec<(u32, MemoryRecord, u32)>, +} - pub k256_decompress_events: Vec, +impl ExecutionRecord { + fn get_record(&self, chip: &impl MachineAir) -> &Record { + self.event_map + .get(&chip.name()) + .expect("Record not found for chip") + } + + fn get_record_mut(&mut self, chip: &impl MachineAir) -> &mut Record { + self.event_map.get_mut(&chip.name()).unwrap() + } - pub blake3_compress_inner_events: Vec, + fn entry(&mut self, chip: &impl MachineAir) -> Entry { + self.event_map.entry(chip.name()) + } - /// Information needed for global chips. This shouldn't really be here but for legacy reasons, - /// we keep this information in this struct for now. - pub first_memory_record: Vec<(u32, MemoryRecord, u32)>, - pub last_memory_record: Vec<(u32, MemoryRecord, u32)>, - pub program_memory_record: Vec<(u32, MemoryRecord, u32)>, + fn insert(&mut self, chip: &impl MachineAir, record: Record) { + self.event_map.insert(chip.name(), record); + } } -pub struct ShardingConfig { - pub shard_size: usize, - pub add_len: usize, - pub mul_len: usize, - pub sub_len: usize, - pub bitwise_len: usize, - pub shift_left_len: usize, - pub shift_right_len: usize, - pub divrem_len: usize, - pub lt_len: usize, - pub field_len: usize, +/// A configuration for sharding a program's execution record to improve prover performence. +/// +/// Sharding of an execution trace can be done at any shard length for any chip. If no shard size +/// is set for a chip, the chip will have a single AIR table. +pub struct ShardingConfig { + // shard_size: usize, + // pub add_len: usize, + // pub mul_len: usize, + // pub sub_len: usize, + // pub bitwise_len: usize, + // pub shift_left_len: usize, + // pub shift_right_len: usize, + // pub divrem_len: usize, + // pub lt_len: usize, + // pub field_len: usize, + size_map: BTreeMap, + _marker: PhantomData, } -impl ShardingConfig { - pub const fn shard_size(&self) -> usize { - self.shard_size +impl ShardingConfig { + /// Sets the shard size for a specific chip. + /// + /// If the configuration already has a shard size for the chip, the old value is returned, + /// otherwise `None` is returned. + pub fn set_size(&mut self, chip: &impl MachineAir, size: usize) -> Option { + let log_size = size.next_power_of_two().trailing_zeros() as usize; + assert_eq!(size, 1 << log_size, "Shard size must be a power of 2"); + self.size_map.insert(chip.name(), size) + } + + /// Returns the shard size for a specific chip. + /// + /// If the configuration does not have a shard size for the chip, `None` is returned. + pub fn get_size(&self, chip: &impl MachineAir) -> Option { + self.size_map.get(&chip.name()).copied() + } + + /// Returns an empty configuration without any shard sizes set. + pub fn empty() -> Self { + Self { + size_map: BTreeMap::new(), + _marker: PhantomData, + } } } -impl Default for ShardingConfig { +impl Default for ShardingConfig { fn default() -> Self { let shard_size = env::shard_size(); - Self { - shard_size, - add_len: shard_size, - sub_len: shard_size, - bitwise_len: shard_size, - shift_left_len: shard_size, - divrem_len: shard_size, - lt_len: shard_size, - mul_len: shard_size, - shift_right_len: shard_size, - field_len: shard_size * 4, - } + let mut config = Self::empty(); + + config.set_size(&CpuChip::default(), shard_size); + config.set_size(&AddChip::default(), shard_size); + config.set_size(&MulChip::default(), shard_size); + config.set_size(&SubChip::default(), shard_size); + config.set_size(&BitwiseChip::default(), shard_size); + config.set_size(&ShiftLeft::default(), shard_size); + config.set_size(&ShiftRightChip::default(), shard_size); + config.set_size(&DivRemChip::default(), shard_size); + config.set_size(&LtChip::default(), shard_size); + config.set_size(&FieldLTUChip::default(), shard_size * 4); + + config } } @@ -155,7 +241,7 @@ impl ExecutionRecord { } } - pub fn shard(&self, config: &ShardingConfig) -> Vec { + pub fn shard(&self, config: &ShardingConfig) -> Vec { // Make the shard vector by splitting CPU and program events. let mut shards = self .cpu_events diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs new file mode 100644 index 0000000000..f7c8001055 --- /dev/null +++ b/core/src/stark/air.rs @@ -0,0 +1,302 @@ +use crate::air::MachineAir; +pub use crate::air::SP1AirBuilder; +use p3_air::Air; +use p3_air::BaseAir; +use p3_field::PrimeField32; + +pub use riscv_chips::*; + +pub(crate) mod riscv_chips { + pub use crate::alu::AddChip; + pub use crate::alu::BitwiseChip; + pub use crate::alu::DivRemChip; + pub use crate::alu::LtChip; + pub use crate::alu::MulChip; + pub use crate::alu::ShiftLeft; + pub use crate::alu::ShiftRightChip; + pub use crate::alu::SubChip; + pub use crate::bytes::ByteChip; + pub use crate::cpu::CpuChip; + pub use crate::field::FieldLTUChip; + pub use crate::memory::MemoryGlobalChip; + pub use crate::program::ProgramChip; + pub use crate::syscall::precompiles::blake3::Blake3CompressInnerChip; + pub use crate::syscall::precompiles::edwards::EdAddAssignChip; + pub use crate::syscall::precompiles::edwards::EdDecompressChip; + pub use crate::syscall::precompiles::k256::K256DecompressChip; + pub use crate::syscall::precompiles::keccak256::KeccakPermuteChip; + pub use crate::syscall::precompiles::sha256::ShaCompressChip; + pub use crate::syscall::precompiles::sha256::ShaExtendChip; + pub use crate::syscall::precompiles::weierstrass::WeierstrassAddAssignChip; + pub use crate::syscall::precompiles::weierstrass::WeierstrassDoubleAssignChip; + pub use crate::utils::ec::edwards::ed25519::Ed25519Parameters; + pub use crate::utils::ec::edwards::EdwardsCurve; + pub use crate::utils::ec::weierstrass::secp256k1::Secp256k1Parameters; + pub use crate::utils::ec::weierstrass::SWCurve; +} + +pub enum RiscvAir { + /// An AIR that containts a preprocessed program table and a lookup for the instructions. + Program(ProgramChip), + /// An AIR for the RISC-V CPU. Each row represents a cpu cycle. + Cpu(CpuChip), + /// An AIR for the RISC-V Add instruction. + Add(AddChip), + /// An AIR for the RISC-V Sub instruction. + Sub(SubChip), + /// An AIR for RISC-V Bitwise instructions. + Bitwise(BitwiseChip), + /// An AIR for RISC-V Mul instruction. + Mul(MulChip), + /// An AIR for RISC-V Div and Rem instructions. + DivRem(DivRemChip), + /// An AIR for RISC-V Lt instruction. + Lt(LtChip), + /// An AIR for RISC-V SLL instruction. + ShiftLeft(ShiftLeft), + /// An AIR for RISC-V SRL and SRA instruction. + ShiftRight(ShiftRightChip), + /// A lookup table for byte operations. + ByteLookup(ByteChip), + /// An table for `less than` operation on field elements. + FieldLTU(FieldLTUChip), + /// A table for initializing the memory state. + MemoryInit(MemoryGlobalChip), + /// A table for finalizing the memory state. + MemoryFinal(MemoryGlobalChip), + /// A table for initializing the program memory. + ProgramMemory(MemoryGlobalChip), + + ShaExtend(ShaExtendChip), + ShaCompress(ShaCompressChip), + Ed25519Add(EdAddAssignChip>), + Ed25519Decompress(EdDecompressChip), + + K256Decompress(K256DecompressChip), + + Secp256k1Add(WeierstrassAddAssignChip>), + Secp256k1Double(WeierstrassDoubleAssignChip>), + + KeccakP(KeccakPermuteChip), + + Blake3Compress(Blake3CompressInnerChip), +} + +impl BaseAir for RiscvAir { + fn width(&self) -> usize { + match self { + RiscvAir::Program(p) => BaseAir::::width(p), + RiscvAir::Cpu(c) => BaseAir::::width(c), + RiscvAir::Add(a) => BaseAir::::width(a), + RiscvAir::Sub(s) => BaseAir::::width(s), + RiscvAir::Bitwise(b) => BaseAir::::width(b), + RiscvAir::Mul(m) => BaseAir::::width(m), + RiscvAir::DivRem(d) => BaseAir::::width(d), + RiscvAir::Lt(l) => BaseAir::::width(l), + RiscvAir::ShiftLeft(sl) => BaseAir::::width(sl), + RiscvAir::ShiftRight(sr) => BaseAir::::width(sr), + RiscvAir::ByteLookup(b) => BaseAir::::width(b), + RiscvAir::FieldLTU(f) => BaseAir::::width(f), + RiscvAir::MemoryInit(m) => BaseAir::::width(m), + RiscvAir::MemoryFinal(m) => BaseAir::::width(m), + RiscvAir::ProgramMemory(m) => BaseAir::::width(m), + RiscvAir::ShaExtend(s) => BaseAir::::width(s), + RiscvAir::ShaCompress(s) => BaseAir::::width(s), + RiscvAir::Ed25519Add(a) => BaseAir::::width(a), + RiscvAir::Ed25519Decompress(d) => BaseAir::::width(d), + RiscvAir::K256Decompress(d) => BaseAir::::width(d), + RiscvAir::Secp256k1Add(a) => BaseAir::::width(a), + RiscvAir::Secp256k1Double(d) => BaseAir::::width(d), + RiscvAir::KeccakP(p) => BaseAir::::width(p), + RiscvAir::Blake3Compress(c) => BaseAir::::width(c), + } + } + + fn preprocessed_trace(&self) -> Option> { + match self { + RiscvAir::Program(p) => p.preprocessed_trace(), + RiscvAir::Cpu(c) => c.preprocessed_trace(), + RiscvAir::Add(a) => a.preprocessed_trace(), + RiscvAir::Sub(s) => s.preprocessed_trace(), + RiscvAir::Bitwise(b) => b.preprocessed_trace(), + RiscvAir::Mul(m) => m.preprocessed_trace(), + RiscvAir::DivRem(d) => d.preprocessed_trace(), + RiscvAir::Lt(l) => l.preprocessed_trace(), + RiscvAir::ShiftLeft(sl) => sl.preprocessed_trace(), + RiscvAir::ShiftRight(sr) => sr.preprocessed_trace(), + RiscvAir::ByteLookup(b) => b.preprocessed_trace(), + RiscvAir::FieldLTU(f) => f.preprocessed_trace(), + RiscvAir::MemoryInit(m) => m.preprocessed_trace(), + RiscvAir::MemoryFinal(m) => m.preprocessed_trace(), + RiscvAir::ProgramMemory(m) => m.preprocessed_trace(), + RiscvAir::ShaExtend(s) => s.preprocessed_trace(), + RiscvAir::ShaCompress(s) => s.preprocessed_trace(), + RiscvAir::Ed25519Add(a) => a.preprocessed_trace(), + RiscvAir::Ed25519Decompress(d) => d.preprocessed_trace(), + RiscvAir::K256Decompress(d) => d.preprocessed_trace(), + RiscvAir::Secp256k1Add(a) => a.preprocessed_trace(), + RiscvAir::Secp256k1Double(d) => d.preprocessed_trace(), + RiscvAir::KeccakP(p) => p.preprocessed_trace(), + RiscvAir::Blake3Compress(c) => c.preprocessed_trace(), + } + } +} + +impl MachineAir for RiscvAir { + fn name(&self) -> String { + match self { + RiscvAir::Program(p) => MachineAir::::name(p), + RiscvAir::Cpu(c) => MachineAir::::name(c), + RiscvAir::Add(a) => MachineAir::::name(a), + RiscvAir::Sub(s) => MachineAir::::name(s), + RiscvAir::Bitwise(b) => MachineAir::::name(b), + RiscvAir::Mul(m) => MachineAir::::name(m), + RiscvAir::DivRem(d) => MachineAir::::name(d), + RiscvAir::Lt(l) => MachineAir::::name(l), + RiscvAir::ShiftLeft(sl) => MachineAir::::name(sl), + RiscvAir::ShiftRight(sr) => MachineAir::::name(sr), + RiscvAir::ByteLookup(b) => MachineAir::::name(b), + RiscvAir::FieldLTU(f) => MachineAir::::name(f), + RiscvAir::MemoryInit(m) => MachineAir::::name(m), + RiscvAir::MemoryFinal(m) => MachineAir::::name(m), + RiscvAir::ProgramMemory(m) => MachineAir::::name(m), + RiscvAir::ShaExtend(s) => MachineAir::::name(s), + RiscvAir::ShaCompress(s) => MachineAir::::name(s), + RiscvAir::Ed25519Add(a) => MachineAir::::name(a), + RiscvAir::Ed25519Decompress(d) => MachineAir::::name(d), + RiscvAir::K256Decompress(d) => MachineAir::::name(d), + RiscvAir::Secp256k1Add(a) => MachineAir::::name(a), + RiscvAir::Secp256k1Double(d) => MachineAir::::name(d), + RiscvAir::KeccakP(p) => MachineAir::::name(p), + RiscvAir::Blake3Compress(c) => MachineAir::::name(c), + } + } + + fn generate_trace( + &self, + input: &crate::runtime::ExecutionRecord, + output: &mut crate::runtime::ExecutionRecord, + ) -> p3_matrix::dense::RowMajorMatrix { + match self { + RiscvAir::Program(p) => p.generate_trace(input, output), + RiscvAir::Cpu(c) => c.generate_trace(input, output), + RiscvAir::Add(a) => a.generate_trace(input, output), + RiscvAir::Sub(s) => s.generate_trace(input, output), + RiscvAir::Bitwise(b) => b.generate_trace(input, output), + RiscvAir::Mul(m) => m.generate_trace(input, output), + RiscvAir::DivRem(d) => d.generate_trace(input, output), + RiscvAir::Lt(l) => l.generate_trace(input, output), + RiscvAir::ShiftLeft(sl) => sl.generate_trace(input, output), + RiscvAir::ShiftRight(sr) => sr.generate_trace(input, output), + RiscvAir::ByteLookup(b) => b.generate_trace(input, output), + RiscvAir::FieldLTU(f) => f.generate_trace(input, output), + RiscvAir::MemoryInit(m) => m.generate_trace(input, output), + RiscvAir::MemoryFinal(m) => m.generate_trace(input, output), + RiscvAir::ProgramMemory(m) => m.generate_trace(input, output), + RiscvAir::ShaExtend(s) => s.generate_trace(input, output), + RiscvAir::ShaCompress(s) => s.generate_trace(input, output), + RiscvAir::Ed25519Add(a) => a.generate_trace(input, output), + RiscvAir::Ed25519Decompress(d) => d.generate_trace(input, output), + RiscvAir::K256Decompress(d) => d.generate_trace(input, output), + RiscvAir::Secp256k1Add(a) => a.generate_trace(input, output), + RiscvAir::Secp256k1Double(d) => d.generate_trace(input, output), + RiscvAir::KeccakP(p) => p.generate_trace(input, output), + RiscvAir::Blake3Compress(c) => c.generate_trace(input, output), + } + } + + fn preprocessed_width(&self) -> usize { + match self { + RiscvAir::Program(p) => MachineAir::::preprocessed_width(p), + RiscvAir::Cpu(c) => MachineAir::::preprocessed_width(c), + RiscvAir::Add(a) => MachineAir::::preprocessed_width(a), + RiscvAir::Sub(s) => MachineAir::::preprocessed_width(s), + RiscvAir::Bitwise(b) => MachineAir::::preprocessed_width(b), + RiscvAir::Mul(m) => MachineAir::::preprocessed_width(m), + RiscvAir::DivRem(d) => MachineAir::::preprocessed_width(d), + RiscvAir::Lt(l) => MachineAir::::preprocessed_width(l), + RiscvAir::ShiftLeft(sl) => MachineAir::::preprocessed_width(sl), + RiscvAir::ShiftRight(sr) => MachineAir::::preprocessed_width(sr), + RiscvAir::ByteLookup(b) => MachineAir::::preprocessed_width(b), + RiscvAir::FieldLTU(f) => MachineAir::::preprocessed_width(f), + RiscvAir::MemoryInit(m) => MachineAir::::preprocessed_width(m), + RiscvAir::MemoryFinal(m) => MachineAir::::preprocessed_width(m), + RiscvAir::ProgramMemory(m) => MachineAir::::preprocessed_width(m), + RiscvAir::ShaExtend(s) => MachineAir::::preprocessed_width(s), + RiscvAir::ShaCompress(s) => MachineAir::::preprocessed_width(s), + RiscvAir::Ed25519Add(a) => MachineAir::::preprocessed_width(a), + RiscvAir::Ed25519Decompress(d) => MachineAir::::preprocessed_width(d), + RiscvAir::K256Decompress(d) => MachineAir::::preprocessed_width(d), + RiscvAir::Secp256k1Add(a) => MachineAir::::preprocessed_width(a), + RiscvAir::Secp256k1Double(d) => MachineAir::::preprocessed_width(d), + RiscvAir::KeccakP(p) => MachineAir::::preprocessed_width(p), + RiscvAir::Blake3Compress(c) => MachineAir::::preprocessed_width(c), + } + } + + fn generate_preprocessed_trace( + &self, + program: &crate::runtime::Program, + ) -> Option> { + match self { + RiscvAir::Program(p) => p.generate_preprocessed_trace(program), + RiscvAir::Cpu(c) => c.generate_preprocessed_trace(program), + RiscvAir::Add(a) => a.generate_preprocessed_trace(program), + RiscvAir::Sub(s) => s.generate_preprocessed_trace(program), + RiscvAir::Bitwise(b) => b.generate_preprocessed_trace(program), + RiscvAir::Mul(m) => m.generate_preprocessed_trace(program), + RiscvAir::DivRem(d) => d.generate_preprocessed_trace(program), + RiscvAir::Lt(l) => l.generate_preprocessed_trace(program), + RiscvAir::ShiftLeft(sl) => sl.generate_preprocessed_trace(program), + RiscvAir::ShiftRight(sr) => sr.generate_preprocessed_trace(program), + RiscvAir::ByteLookup(b) => b.generate_preprocessed_trace(program), + RiscvAir::FieldLTU(f) => f.generate_preprocessed_trace(program), + RiscvAir::MemoryInit(m) => m.generate_preprocessed_trace(program), + RiscvAir::MemoryFinal(m) => m.generate_preprocessed_trace(program), + RiscvAir::ProgramMemory(m) => m.generate_preprocessed_trace(program), + RiscvAir::ShaExtend(s) => s.generate_preprocessed_trace(program), + RiscvAir::ShaCompress(s) => s.generate_preprocessed_trace(program), + RiscvAir::Ed25519Add(a) => a.generate_preprocessed_trace(program), + RiscvAir::Ed25519Decompress(d) => d.generate_preprocessed_trace(program), + RiscvAir::K256Decompress(d) => d.generate_preprocessed_trace(program), + RiscvAir::Secp256k1Add(a) => a.generate_preprocessed_trace(program), + RiscvAir::Secp256k1Double(d) => d.generate_preprocessed_trace(program), + RiscvAir::KeccakP(p) => p.generate_preprocessed_trace(program), + RiscvAir::Blake3Compress(c) => c.generate_preprocessed_trace(program), + } + } +} + +impl Air for RiscvAir +where + AB::F: PrimeField32, +{ + fn eval(&self, builder: &mut AB) { + match self { + RiscvAir::Program(p) => p.eval(builder), + RiscvAir::Cpu(c) => c.eval(builder), + RiscvAir::Add(a) => a.eval(builder), + RiscvAir::Sub(s) => s.eval(builder), + RiscvAir::Bitwise(b) => b.eval(builder), + RiscvAir::Mul(m) => m.eval(builder), + RiscvAir::DivRem(d) => d.eval(builder), + RiscvAir::Lt(l) => l.eval(builder), + RiscvAir::ShiftLeft(sl) => sl.eval(builder), + RiscvAir::ShiftRight(sr) => sr.eval(builder), + RiscvAir::ByteLookup(b) => b.eval(builder), + RiscvAir::FieldLTU(f) => f.eval(builder), + RiscvAir::MemoryInit(m) => m.eval(builder), + RiscvAir::MemoryFinal(m) => m.eval(builder), + RiscvAir::ProgramMemory(m) => m.eval(builder), + RiscvAir::ShaExtend(s) => s.eval(builder), + RiscvAir::ShaCompress(s) => s.eval(builder), + RiscvAir::Ed25519Add(a) => a.eval(builder), + RiscvAir::Ed25519Decompress(d) => d.eval(builder), + RiscvAir::K256Decompress(d) => d.eval(builder), + RiscvAir::Secp256k1Add(a) => a.eval(builder), + RiscvAir::Secp256k1Double(d) => d.eval(builder), + RiscvAir::KeccakP(p) => p.eval(builder), + RiscvAir::Blake3Compress(c) => c.eval(builder), + } + } +} diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index cfa11c5432..04522dced4 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -40,6 +40,7 @@ use super::Chip; use super::ChipRef; use super::Proof; use super::Prover; +use super::RiscvAir; use super::StarkGenericConfig; use super::VerificationError; use super::Verifier; @@ -59,32 +60,33 @@ pub struct VerifyingKey { pub struct RiscvStark { config: SC, - program: Chip, - cpu: Chip, - sha_extend: Chip, - sha_compress: Chip, - ed_add_assign: Chip>>, - ed_decompress: Chip>, - k256_decompress: Chip, - weierstrass_add_assign: Chip>>, - weierstrass_double_assign: - Chip>>, - keccak_permute: Chip, - blake3_compress_inner: Chip, - add: Chip, - sub: Chip, - bitwise: Chip, - div_rem: Chip, - mul: Chip, - shift_right: Chip, - shift_left: Chip, - lt: Chip, - field_ltu: Chip, - byte: Chip, - - memory_init: Chip, - memory_finalize: Chip, - program_memory_init: Chip, + chips: Vec>, + // program: Chip, + // cpu: Chip, + // sha_extend: Chip, + // sha_compress: Chip, + // ed_add_assign: Chip>>, + // ed_decompress: Chip>, + // k256_decompress: Chip, + // weierstrass_add_assign: Chip>>, + // weierstrass_double_assign: + // Chip>>, + // keccak_permute: Chip, + // blake3_compress_inner: Chip, + // add: Chip, + // sub: Chip, + // bitwise: Chip, + // div_rem: Chip, + // mul: Chip, + // shift_right: Chip, + // shift_left: Chip, + // lt: Chip, + // field_ltu: Chip, + // byte: Chip, + + // memory_init: Chip, + // memory_finalize: Chip, + // program_memory_init: Chip, } impl RiscvStark @@ -92,90 +94,93 @@ where SC::Val: PrimeField32, { pub fn new(config: SC) -> Self { - let program = Chip::new(ProgramChip::default()); - let cpu = Chip::new(CpuChip::default()); - let sha_extend = Chip::new(ShaExtendChip::default()); - let sha_compress = Chip::new(ShaCompressChip::default()); - let ed_add_assign = Chip::new(EdAddAssignChip::>::new()); - let ed_decompress = Chip::new(EdDecompressChip::::default()); - let k256_decompress = Chip::new(K256DecompressChip::default()); + let mut chips = vec![]; + let program = ProgramChip::default(); + chips.push(Chip::new(RiscvAir::Program(program))); + let cpu = CpuChip::default(); + chips.push(Chip::new(RiscvAir::Cpu(cpu))); + let sha_extend = ShaExtendChip::default(); + chips.push(Chip::new(RiscvAir::ShaExtend(sha_extend))); + let sha_compress = ShaCompressChip::default(); + chips.push(Chip::new(RiscvAir::ShaCompress(sha_compress))); + let ed_add_assign = EdAddAssignChip::>::new(); + chips.push(Chip::new(RiscvAir::Ed25519Add(ed_add_assign))); + let ed_decompress = EdDecompressChip::::default(); + chips.push(Chip::new(RiscvAir::Ed25519Decompress(ed_decompress))); + let k256_decompress = K256DecompressChip::default(); + chips.push(Chip::new(RiscvAir::K256Decompress(k256_decompress))); let weierstrass_add_assign = - Chip::new(WeierstrassAddAssignChip::>::new()); + WeierstrassAddAssignChip::>::new(); + chips.push(Chip::new(RiscvAir::Secp256k1Add(weierstrass_add_assign))); let weierstrass_double_assign = - Chip::new(WeierstrassDoubleAssignChip::>::new()); - let keccak_permute = Chip::new(KeccakPermuteChip::new()); - let blake3_compress_inner = Chip::new(Blake3CompressInnerChip::new()); - let add = Chip::new(AddChip::default()); - let sub = Chip::new(SubChip::default()); - let bitwise = Chip::new(BitwiseChip::default()); - let div_rem = Chip::new(DivRemChip::default()); - let mul = Chip::new(MulChip::default()); - let shift_right = Chip::new(ShiftRightChip::default()); - let shift_left = Chip::new(ShiftLeft::default()); - let lt = Chip::new(LtChip::default()); - let field_ltu = Chip::new(FieldLTUChip::default()); - let byte = Chip::new(ByteChip::default()); - let memory_init = Chip::new(MemoryGlobalChip::new(MemoryChipKind::Init)); - let memory_finalize = Chip::new(MemoryGlobalChip::new(MemoryChipKind::Finalize)); - let program_memory_init = Chip::new(MemoryGlobalChip::new(MemoryChipKind::Program)); - - Self { - config, - program, - cpu, - sha_extend, - sha_compress, - ed_add_assign, - ed_decompress, - k256_decompress, - weierstrass_add_assign, + WeierstrassDoubleAssignChip::>::new(); + chips.push(Chip::new(RiscvAir::Secp256k1Double( weierstrass_double_assign, - keccak_permute, - blake3_compress_inner, - add, - sub, - bitwise, - div_rem, - mul, - shift_right, - shift_left, - lt, - field_ltu, - byte, - memory_init, - memory_finalize, - program_memory_init, - } + ))); + let keccak_permute = KeccakPermuteChip::new(); + chips.push(Chip::new(RiscvAir::KeccakP(keccak_permute))); + let blake3_compress_inner = Blake3CompressInnerChip::new(); + chips.push(Chip::new(RiscvAir::Blake3Compress(blake3_compress_inner))); + let add = AddChip::default(); + chips.push(Chip::new(RiscvAir::Add(add))); + let sub = SubChip::default(); + chips.push(Chip::new(RiscvAir::Sub(sub))); + let bitwise = BitwiseChip::default(); + chips.push(Chip::new(RiscvAir::Bitwise(bitwise))); + let div_rem = DivRemChip::default(); + chips.push(Chip::new(RiscvAir::DivRem(div_rem))); + let mul = MulChip::default(); + chips.push(Chip::new(RiscvAir::Mul(mul))); + let shift_right = ShiftRightChip::default(); + chips.push(Chip::new(RiscvAir::ShiftRight(shift_right))); + let shift_left = ShiftLeft::default(); + chips.push(Chip::new(RiscvAir::ShiftLeft(shift_left))); + let lt = LtChip::default(); + chips.push(Chip::new(RiscvAir::Lt(lt))); + let field_ltu = FieldLTUChip::default(); + chips.push(Chip::new(RiscvAir::FieldLTU(field_ltu))); + let byte = ByteChip::default(); + chips.push(Chip::new(RiscvAir::ByteLookup(byte))); + let memory_init = MemoryGlobalChip::new(MemoryChipKind::Init); + chips.push(Chip::new(RiscvAir::MemoryInit(memory_init))); + let memory_finalize = MemoryGlobalChip::new(MemoryChipKind::Finalize); + chips.push(Chip::new(RiscvAir::MemoryFinal(memory_finalize))); + let program_memory_init = MemoryGlobalChip::new(MemoryChipKind::Program); + chips.push(Chip::new(RiscvAir::ProgramMemory(program_memory_init))); + + Self { config, chips } } /// Get an array containing a `ChipRef` for all the chips of this RISC-V STARK machine. - pub fn chips(&self) -> [ChipRef; 24] { - [ - self.program.as_ref(), - self.cpu.as_ref(), - self.sha_extend.as_ref(), - self.sha_compress.as_ref(), - self.ed_add_assign.as_ref(), - self.ed_decompress.as_ref(), - self.k256_decompress.as_ref(), - self.weierstrass_add_assign.as_ref(), - self.weierstrass_double_assign.as_ref(), - self.keccak_permute.as_ref(), - self.blake3_compress_inner.as_ref(), - self.add.as_ref(), - self.sub.as_ref(), - self.bitwise.as_ref(), - self.div_rem.as_ref(), - self.mul.as_ref(), - self.shift_right.as_ref(), - self.shift_left.as_ref(), - self.lt.as_ref(), - self.field_ltu.as_ref(), - self.byte.as_ref(), - self.memory_init.as_ref(), - self.memory_finalize.as_ref(), - self.program_memory_init.as_ref(), - ] + pub fn chips(&self) -> Vec> { + self.chips.iter().map(|chip| chip.as_ref()).collect() + + // [ + // self.program.as_ref(), + // self.cpu.as_ref(), + // self.sha_extend.as_ref(), + // self.sha_compress.as_ref(), + // self.ed_add_assign.as_ref(), + // self.ed_decompress.as_ref(), + // self.k256_decompress.as_ref(), + // self.weierstrass_add_assign.as_ref(), + // self.weierstrass_double_assign.as_ref(), + // self.keccak_permute.as_ref(), + // self.blake3_compress_inner.as_ref(), + // self.add.as_ref(), + // self.sub.as_ref(), + // self.bitwise.as_ref(), + // self.div_rem.as_ref(), + // self.mul.as_ref(), + // self.shift_right.as_ref(), + // self.shift_left.as_ref(), + // self.lt.as_ref(), + // self.field_ltu.as_ref(), + // self.byte.as_ref(), + // self.memory_init.as_ref(), + // self.memory_finalize.as_ref(), + // self.program_memory_init.as_ref(), + // ] } pub fn shard_chips(&self, shard: &ExecutionRecord) -> Vec> { @@ -290,7 +295,11 @@ where ) } - pub fn shard(&self, record: &mut ExecutionRecord) -> Vec { + pub fn shard( + &self, + record: &mut ExecutionRecord, + shard_config: &ShardingConfig, + ) -> Vec { // Get the local and global chips. let chips = self.chips(); diff --git a/core/src/stark/mod.rs b/core/src/stark/mod.rs index 5e0cb81609..0214107e0e 100644 --- a/core/src/stark/mod.rs +++ b/core/src/stark/mod.rs @@ -1,3 +1,4 @@ +mod air; mod chip; mod config; mod debug; @@ -11,6 +12,7 @@ mod util; mod verifier; mod zerofier_coset; +pub use air::*; pub use chip::*; pub use config::*; pub use debug::*; @@ -22,5 +24,7 @@ pub use quotient::*; pub use types::*; pub use verifier::*; +pub(crate) use air::riscv_chips; + #[cfg(test)] pub use machine::tests; From 37bf064c5638e83fd3717739863da6bb80edbaf8 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Wed, 14 Feb 2024 17:45:58 -0800 Subject: [PATCH 02/19] cleanup --- Cargo.lock | 17 ++ core/Cargo.toml | 1 + core/src/runtime/record.rs | 224 ++++++------------- core/src/stark/air.rs | 89 ++++++++ core/src/stark/chip.rs | 10 +- core/src/stark/machine.rs | 243 +-------------------- core/src/stark/mod.rs | 1 + core/src/stark/prover.rs | 7 +- examples/chess/script/Cargo.lock | 17 ++ examples/ed25519/script/Cargo.lock | 17 ++ examples/fibonacci-io/script/Cargo.lock | 17 ++ examples/fibonacci/script/Cargo.lock | 17 ++ examples/io/script/Cargo.lock | 17 ++ examples/json/script/Cargo.lock | 17 ++ examples/regex/script/Cargo.lock | 17 ++ examples/rsa/script/Cargo.lock | 17 ++ examples/ssz-withdrawals/script/Cargo.lock | 17 ++ examples/tendermint/script/Cargo.lock | 17 ++ 18 files changed, 372 insertions(+), 390 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0964a813cb..be7abf07c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -714,6 +714,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1690,6 +1696,16 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -2309,6 +2325,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rand", "rrs-lib", "serde", diff --git a/core/Cargo.toml b/core/Cargo.toml index b9b6b9c49a..6c73496f2c 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -51,6 +51,7 @@ k256 = { version = "0.13.3", features = ["expose-field"] } elliptic-curve = "0.13.8" anyhow = "1.0.79" serial_test = "3.0.0" +petgraph = "0.6.4" [dev-dependencies] criterion = "0.5.1" diff --git a/core/src/runtime/record.rs b/core/src/runtime/record.rs index 5e88797a60..aa6f3d183e 100644 --- a/core/src/runtime/record.rs +++ b/core/src/runtime/record.rs @@ -1,16 +1,9 @@ use std::collections::{BTreeMap, HashMap}; -use std::marker::PhantomData; use std::sync::Arc; -use crate::stark::riscv_chips::*; -use clap::builder::Str; -use k256::sha2::digest::Mac; -use p3_field::PrimeField32; - use super::program::Program; use super::Opcode; -use crate::air::MachineAir; -use crate::alu::{AddChip, AluEvent}; +use crate::alu::AluEvent; use crate::bytes::{ByteLookupEvent, ByteOpcode}; use crate::cpu::{CpuEvent, MemoryRecordEnum}; use crate::field::event::FieldEvent; @@ -22,35 +15,6 @@ use crate::syscall::precompiles::keccak256::KeccakPermuteEvent; use crate::syscall::precompiles::sha256::{ShaCompressEvent, ShaExtendEvent}; use crate::syscall::precompiles::{ECAddEvent, ECDoubleEvent}; use crate::utils::env; -use std::collections::hash_map::Entry; - -#[derive(Clone, Debug)] -pub enum Record { - Program(HashMap), - Cpu(Vec), - Add(Vec), - Sub(Vec), - Mul(Vec), - Bitwise(Vec), - ShiftLeft(Vec), - ShiftRight(Vec), - DivRem(Vec), - Lt(Vec), - FieldLtu(Vec), - ShaExtend(Vec), - ShaCompress(Vec), - KeccakPermute(Vec), - Ed5519Add(Vec), - Ed25519Decompress(Vec), - Secp256k1Add(Vec), - Secp256k1Double(Vec), - K256Decompress(Vec), - Blake3CompressInner(Vec), - ByteLookup(BTreeMap), - MemoryInit(Vec<(u32, MemoryRecord, u32)>), - MemoryLast(Vec<(u32, MemoryRecord, u32)>), - MemoryProgram(Vec<(u32, MemoryRecord, u32)>), -} /// A record of the execution of a program. Contains event data for everything that happened during /// the execution of the shard. @@ -59,154 +23,104 @@ pub struct ExecutionRecord { /// The index of the shard. pub index: u32, - pub event_map: HashMap, - // /// The program. - // pub program: Arc, - - // /// A trace of the CPU events which get emitted during execution. - // pub cpu_events: Vec, - - // /// Multiplicity counts for each instruction in the program. - // pub instruction_counts: HashMap, - - // /// A trace of the ADD, and ADDI events. - // pub add_events: Vec, + /// The program. + pub program: Arc, - // /// A trace of the MUL events. - // pub mul_events: Vec, + /// A trace of the CPU events which get emitted during execution. + pub cpu_events: Vec, - // /// A trace of the SUB events. - // pub sub_events: Vec, + /// Multiplicity counts for each instruction in the program. + pub instruction_counts: HashMap, - // /// A trace of the XOR, XORI, OR, ORI, AND, and ANDI events. - // pub bitwise_events: Vec, + /// A trace of the ADD, and ADDI events. + pub add_events: Vec, - // /// A trace of the SLL and SLLI events. - // pub shift_left_events: Vec, + /// A trace of the MUL events. + pub mul_events: Vec, - // /// A trace of the SRL, SRLI, SRA, and SRAI events. - // pub shift_right_events: Vec, + /// A trace of the SUB events. + pub sub_events: Vec, - // /// A trace of the DIV, DIVU, REM, and REMU events. - // pub divrem_events: Vec, + /// A trace of the XOR, XORI, OR, ORI, AND, and ANDI events. + pub bitwise_events: Vec, - // /// A trace of the SLT, SLTI, SLTU, and SLTIU events. - // pub lt_events: Vec, + /// A trace of the SLL and SLLI events. + pub shift_left_events: Vec, - // /// A trace of the byte lookups needed. - // pub byte_lookups: BTreeMap, + /// A trace of the SRL, SRLI, SRA, and SRAI events. + pub shift_right_events: Vec, - // /// A trace of field LTU events. - // pub field_events: Vec, + /// A trace of the DIV, DIVU, REM, and REMU events. + pub divrem_events: Vec, - // pub sha_extend_events: Vec, + /// A trace of the SLT, SLTI, SLTU, and SLTIU events. + pub lt_events: Vec, - // pub sha_compress_events: Vec, + /// A trace of the byte lookups needed. + pub byte_lookups: BTreeMap, - // pub keccak_permute_events: Vec, + /// A trace of field LTU events. + pub field_events: Vec, - // pub ed_add_events: Vec, + pub sha_extend_events: Vec, - // pub ed_decompress_events: Vec, + pub sha_compress_events: Vec, - // pub weierstrass_add_events: Vec, + pub keccak_permute_events: Vec, - // pub weierstrass_double_events: Vec, + pub ed_add_events: Vec, - // pub k256_decompress_events: Vec, + pub ed_decompress_events: Vec, - // pub blake3_compress_inner_events: Vec, + pub weierstrass_add_events: Vec, - // /// Information needed for global chips. This shouldn't really be here but for legacy reasons, - // /// we keep this information in this struct for now. - // pub first_memory_record: Vec<(u32, MemoryRecord, u32)>, - // pub last_memory_record: Vec<(u32, MemoryRecord, u32)>, - // pub program_memory_record: Vec<(u32, MemoryRecord, u32)>, -} + pub weierstrass_double_events: Vec, -impl ExecutionRecord { - fn get_record(&self, chip: &impl MachineAir) -> &Record { - self.event_map - .get(&chip.name()) - .expect("Record not found for chip") - } - - fn get_record_mut(&mut self, chip: &impl MachineAir) -> &mut Record { - self.event_map.get_mut(&chip.name()).unwrap() - } + pub k256_decompress_events: Vec, - fn entry(&mut self, chip: &impl MachineAir) -> Entry { - self.event_map.entry(chip.name()) - } + pub blake3_compress_inner_events: Vec, - fn insert(&mut self, chip: &impl MachineAir, record: Record) { - self.event_map.insert(chip.name(), record); - } + /// Information needed for global chips. This shouldn't really be here but for legacy reasons, + /// we keep this information in this struct for now. + pub first_memory_record: Vec<(u32, MemoryRecord, u32)>, + pub last_memory_record: Vec<(u32, MemoryRecord, u32)>, + pub program_memory_record: Vec<(u32, MemoryRecord, u32)>, } -/// A configuration for sharding a program's execution record to improve prover performence. -/// -/// Sharding of an execution trace can be done at any shard length for any chip. If no shard size -/// is set for a chip, the chip will have a single AIR table. -pub struct ShardingConfig { - // shard_size: usize, - // pub add_len: usize, - // pub mul_len: usize, - // pub sub_len: usize, - // pub bitwise_len: usize, - // pub shift_left_len: usize, - // pub shift_right_len: usize, - // pub divrem_len: usize, - // pub lt_len: usize, - // pub field_len: usize, - size_map: BTreeMap, - _marker: PhantomData, +pub struct ShardingConfig { + pub shard_size: usize, + pub add_len: usize, + pub mul_len: usize, + pub sub_len: usize, + pub bitwise_len: usize, + pub shift_left_len: usize, + pub shift_right_len: usize, + pub divrem_len: usize, + pub lt_len: usize, + pub field_len: usize, } -impl ShardingConfig { - /// Sets the shard size for a specific chip. - /// - /// If the configuration already has a shard size for the chip, the old value is returned, - /// otherwise `None` is returned. - pub fn set_size(&mut self, chip: &impl MachineAir, size: usize) -> Option { - let log_size = size.next_power_of_two().trailing_zeros() as usize; - assert_eq!(size, 1 << log_size, "Shard size must be a power of 2"); - self.size_map.insert(chip.name(), size) - } - - /// Returns the shard size for a specific chip. - /// - /// If the configuration does not have a shard size for the chip, `None` is returned. - pub fn get_size(&self, chip: &impl MachineAir) -> Option { - self.size_map.get(&chip.name()).copied() - } - - /// Returns an empty configuration without any shard sizes set. - pub fn empty() -> Self { - Self { - size_map: BTreeMap::new(), - _marker: PhantomData, - } +impl ShardingConfig { + pub const fn shard_size(&self) -> usize { + self.shard_size } } -impl Default for ShardingConfig { +impl Default for ShardingConfig { fn default() -> Self { let shard_size = env::shard_size(); - let mut config = Self::empty(); - - config.set_size(&CpuChip::default(), shard_size); - config.set_size(&AddChip::default(), shard_size); - config.set_size(&MulChip::default(), shard_size); - config.set_size(&SubChip::default(), shard_size); - config.set_size(&BitwiseChip::default(), shard_size); - config.set_size(&ShiftLeft::default(), shard_size); - config.set_size(&ShiftRightChip::default(), shard_size); - config.set_size(&DivRemChip::default(), shard_size); - config.set_size(&LtChip::default(), shard_size); - config.set_size(&FieldLTUChip::default(), shard_size * 4); - - config + Self { + shard_size, + add_len: shard_size, + sub_len: shard_size, + bitwise_len: shard_size, + shift_left_len: shard_size, + divrem_len: shard_size, + lt_len: shard_size, + mul_len: shard_size, + shift_right_len: shard_size, + field_len: shard_size * 4, + } } } @@ -241,7 +155,7 @@ impl ExecutionRecord { } } - pub fn shard(&self, config: &ShardingConfig) -> Vec { + pub fn shard(&self, config: &ShardingConfig) -> Vec { // Make the shard vector by splitting CPU and program events. let mut shards = self .cpu_events diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs index f7c8001055..77db5ab29d 100644 --- a/core/src/stark/air.rs +++ b/core/src/stark/air.rs @@ -1,5 +1,7 @@ use crate::air::MachineAir; pub use crate::air::SP1AirBuilder; +use crate::memory::MemoryChipKind; +use crate::runtime::ExecutionRecord; use p3_air::Air; use p3_air::BaseAir; use p3_field::PrimeField32; @@ -82,6 +84,93 @@ pub enum RiscvAir { Blake3Compress(Blake3CompressInnerChip), } +impl RiscvAir { + pub fn included(&self, shard: &ExecutionRecord) -> bool { + match self { + RiscvAir::Program(_) => true, + RiscvAir::Cpu(_) => true, + RiscvAir::Add(_) => !shard.add_events.is_empty(), + RiscvAir::Sub(_) => !shard.sub_events.is_empty(), + RiscvAir::Bitwise(_) => !shard.bitwise_events.is_empty(), + RiscvAir::Mul(_) => !shard.mul_events.is_empty(), + RiscvAir::DivRem(_) => !shard.divrem_events.is_empty(), + RiscvAir::Lt(_) => !shard.lt_events.is_empty(), + RiscvAir::ShiftLeft(_) => !shard.shift_left_events.is_empty(), + RiscvAir::ShiftRight(_) => !shard.shift_right_events.is_empty(), + RiscvAir::ByteLookup(_) => !shard.byte_lookups.is_empty(), + RiscvAir::FieldLTU(_) => !shard.field_events.is_empty(), + RiscvAir::MemoryInit(_) => !shard.first_memory_record.is_empty(), + RiscvAir::MemoryFinal(_) => !shard.last_memory_record.is_empty(), + RiscvAir::ProgramMemory(_) => !shard.program_memory_record.is_empty(), + RiscvAir::ShaExtend(_) => !shard.sha_extend_events.is_empty(), + RiscvAir::ShaCompress(_) => !shard.sha_compress_events.is_empty(), + RiscvAir::Ed25519Add(_) => !shard.ed_add_events.is_empty(), + RiscvAir::Ed25519Decompress(_) => !shard.ed_decompress_events.is_empty(), + RiscvAir::K256Decompress(_) => !shard.k256_decompress_events.is_empty(), + RiscvAir::Secp256k1Add(_) => !shard.weierstrass_add_events.is_empty(), + RiscvAir::Secp256k1Double(_) => !shard.weierstrass_double_events.is_empty(), + RiscvAir::KeccakP(_) => !shard.keccak_permute_events.is_empty(), + RiscvAir::Blake3Compress(_) => !shard.blake3_compress_inner_events.is_empty(), + } + } + + pub fn get_all() -> Vec { + let mut chips = vec![]; + let program = ProgramChip::default(); + chips.push(RiscvAir::Program(program)); + let cpu = CpuChip::default(); + chips.push(RiscvAir::Cpu(cpu)); + let sha_extend = ShaExtendChip::default(); + chips.push(RiscvAir::ShaExtend(sha_extend)); + let sha_compress = ShaCompressChip::default(); + chips.push(RiscvAir::ShaCompress(sha_compress)); + let ed_add_assign = EdAddAssignChip::>::new(); + chips.push(RiscvAir::Ed25519Add(ed_add_assign)); + let ed_decompress = EdDecompressChip::::default(); + chips.push(RiscvAir::Ed25519Decompress(ed_decompress)); + let k256_decompress = K256DecompressChip::default(); + chips.push(RiscvAir::K256Decompress(k256_decompress)); + let weierstrass_add_assign = + WeierstrassAddAssignChip::>::new(); + chips.push(RiscvAir::Secp256k1Add(weierstrass_add_assign)); + let weierstrass_double_assign = + WeierstrassDoubleAssignChip::>::new(); + chips.push(RiscvAir::Secp256k1Double(weierstrass_double_assign)); + let keccak_permute = KeccakPermuteChip::new(); + chips.push(RiscvAir::KeccakP(keccak_permute)); + let blake3_compress_inner = Blake3CompressInnerChip::new(); + chips.push(RiscvAir::Blake3Compress(blake3_compress_inner)); + let add = AddChip::default(); + chips.push(RiscvAir::Add(add)); + let sub = SubChip::default(); + chips.push(RiscvAir::Sub(sub)); + let bitwise = BitwiseChip::default(); + chips.push(RiscvAir::Bitwise(bitwise)); + let div_rem = DivRemChip::default(); + chips.push(RiscvAir::DivRem(div_rem)); + let mul = MulChip::default(); + chips.push(RiscvAir::Mul(mul)); + let shift_right = ShiftRightChip::default(); + chips.push(RiscvAir::ShiftRight(shift_right)); + let shift_left = ShiftLeft::default(); + chips.push(RiscvAir::ShiftLeft(shift_left)); + let lt = LtChip::default(); + chips.push(RiscvAir::Lt(lt)); + let field_ltu = FieldLTUChip::default(); + chips.push(RiscvAir::FieldLTU(field_ltu)); + let byte = ByteChip::default(); + chips.push(RiscvAir::ByteLookup(byte)); + let memory_init = MemoryGlobalChip::new(MemoryChipKind::Init); + chips.push(RiscvAir::MemoryInit(memory_init)); + let memory_finalize = MemoryGlobalChip::new(MemoryChipKind::Finalize); + chips.push(RiscvAir::MemoryFinal(memory_finalize)); + let program_memory_init = MemoryGlobalChip::new(MemoryChipKind::Program); + chips.push(RiscvAir::ProgramMemory(program_memory_init)); + + chips + } +} + impl BaseAir for RiscvAir { fn width(&self) -> usize { match self { diff --git a/core/src/stark/chip.rs b/core/src/stark/chip.rs index 453092d40e..a33ec263fc 100644 --- a/core/src/stark/chip.rs +++ b/core/src/stark/chip.rs @@ -1,5 +1,5 @@ use p3_air::{Air, BaseAir, PairBuilder}; -use p3_field::Field; +use p3_field::{Field, PrimeField32}; use p3_matrix::dense::RowMajorMatrix; use p3_util::log2_ceil_usize; @@ -10,7 +10,7 @@ use crate::{ }; use super::{ - eval_permutation_constraints, DebugConstraintBuilder, ProverConstraintFolder, + eval_permutation_constraints, DebugConstraintBuilder, ProverConstraintFolder, RiscvAir, StarkGenericConfig, VerifierConstraintFolder, }; @@ -46,6 +46,12 @@ impl Chip { } } +impl Chip { + pub fn included(&self, shard: &ExecutionRecord) -> bool { + self.air.included(shard) + } +} + impl<'a, SC: StarkGenericConfig> ChipRef<'a, SC> { pub fn sends(&self) -> &[Interaction] { self.sends diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index 04522dced4..5c3e736607 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -1,36 +1,9 @@ use std::marker::PhantomData; use crate::air::MachineAir; -use crate::alu::AddChip; -use crate::alu::BitwiseChip; -use crate::alu::DivRemChip; -use crate::alu::LtChip; -use crate::alu::MulChip; -use crate::alu::ShiftLeft; -use crate::alu::ShiftRightChip; -use crate::alu::SubChip; -use crate::bytes::ByteChip; -use crate::cpu::CpuChip; -use crate::field::FieldLTUChip; -use crate::memory::MemoryChipKind; -use crate::memory::MemoryGlobalChip; -use crate::program::ProgramChip; use crate::runtime::ExecutionRecord; use crate::runtime::Program; use crate::runtime::ShardingConfig; -use crate::syscall::precompiles::blake3::Blake3CompressInnerChip; -use crate::syscall::precompiles::edwards::EdAddAssignChip; -use crate::syscall::precompiles::edwards::EdDecompressChip; -use crate::syscall::precompiles::k256::K256DecompressChip; -use crate::syscall::precompiles::keccak256::KeccakPermuteChip; -use crate::syscall::precompiles::sha256::ShaCompressChip; -use crate::syscall::precompiles::sha256::ShaExtendChip; -use crate::syscall::precompiles::weierstrass::WeierstrassAddAssignChip; -use crate::syscall::precompiles::weierstrass::WeierstrassDoubleAssignChip; -use crate::utils::ec::edwards::ed25519::Ed25519Parameters; -use crate::utils::ec::edwards::EdwardsCurve; -use crate::utils::ec::weierstrass::secp256k1::Secp256k1Parameters; -use crate::utils::ec::weierstrass::SWCurve; use p3_challenger::CanObserve; use p3_field::AbstractField; use p3_field::Field; @@ -61,32 +34,6 @@ pub struct RiscvStark { config: SC, chips: Vec>, - // program: Chip, - // cpu: Chip, - // sha_extend: Chip, - // sha_compress: Chip, - // ed_add_assign: Chip>>, - // ed_decompress: Chip>, - // k256_decompress: Chip, - // weierstrass_add_assign: Chip>>, - // weierstrass_double_assign: - // Chip>>, - // keccak_permute: Chip, - // blake3_compress_inner: Chip, - // add: Chip, - // sub: Chip, - // bitwise: Chip, - // div_rem: Chip, - // mul: Chip, - // shift_right: Chip, - // shift_left: Chip, - // lt: Chip, - // field_ltu: Chip, - // byte: Chip, - - // memory_init: Chip, - // memory_finalize: Chip, - // program_memory_init: Chip, } impl RiscvStark @@ -94,59 +41,7 @@ where SC::Val: PrimeField32, { pub fn new(config: SC) -> Self { - let mut chips = vec![]; - let program = ProgramChip::default(); - chips.push(Chip::new(RiscvAir::Program(program))); - let cpu = CpuChip::default(); - chips.push(Chip::new(RiscvAir::Cpu(cpu))); - let sha_extend = ShaExtendChip::default(); - chips.push(Chip::new(RiscvAir::ShaExtend(sha_extend))); - let sha_compress = ShaCompressChip::default(); - chips.push(Chip::new(RiscvAir::ShaCompress(sha_compress))); - let ed_add_assign = EdAddAssignChip::>::new(); - chips.push(Chip::new(RiscvAir::Ed25519Add(ed_add_assign))); - let ed_decompress = EdDecompressChip::::default(); - chips.push(Chip::new(RiscvAir::Ed25519Decompress(ed_decompress))); - let k256_decompress = K256DecompressChip::default(); - chips.push(Chip::new(RiscvAir::K256Decompress(k256_decompress))); - let weierstrass_add_assign = - WeierstrassAddAssignChip::>::new(); - chips.push(Chip::new(RiscvAir::Secp256k1Add(weierstrass_add_assign))); - let weierstrass_double_assign = - WeierstrassDoubleAssignChip::>::new(); - chips.push(Chip::new(RiscvAir::Secp256k1Double( - weierstrass_double_assign, - ))); - let keccak_permute = KeccakPermuteChip::new(); - chips.push(Chip::new(RiscvAir::KeccakP(keccak_permute))); - let blake3_compress_inner = Blake3CompressInnerChip::new(); - chips.push(Chip::new(RiscvAir::Blake3Compress(blake3_compress_inner))); - let add = AddChip::default(); - chips.push(Chip::new(RiscvAir::Add(add))); - let sub = SubChip::default(); - chips.push(Chip::new(RiscvAir::Sub(sub))); - let bitwise = BitwiseChip::default(); - chips.push(Chip::new(RiscvAir::Bitwise(bitwise))); - let div_rem = DivRemChip::default(); - chips.push(Chip::new(RiscvAir::DivRem(div_rem))); - let mul = MulChip::default(); - chips.push(Chip::new(RiscvAir::Mul(mul))); - let shift_right = ShiftRightChip::default(); - chips.push(Chip::new(RiscvAir::ShiftRight(shift_right))); - let shift_left = ShiftLeft::default(); - chips.push(Chip::new(RiscvAir::ShiftLeft(shift_left))); - let lt = LtChip::default(); - chips.push(Chip::new(RiscvAir::Lt(lt))); - let field_ltu = FieldLTUChip::default(); - chips.push(Chip::new(RiscvAir::FieldLTU(field_ltu))); - let byte = ByteChip::default(); - chips.push(Chip::new(RiscvAir::ByteLookup(byte))); - let memory_init = MemoryGlobalChip::new(MemoryChipKind::Init); - chips.push(Chip::new(RiscvAir::MemoryInit(memory_init))); - let memory_finalize = MemoryGlobalChip::new(MemoryChipKind::Finalize); - chips.push(Chip::new(RiscvAir::MemoryFinal(memory_finalize))); - let program_memory_init = MemoryGlobalChip::new(MemoryChipKind::Program); - chips.push(Chip::new(RiscvAir::ProgramMemory(program_memory_init))); + let chips = RiscvAir::get_all().into_iter().map(Chip::new).collect(); Self { config, chips } } @@ -154,130 +49,16 @@ where /// Get an array containing a `ChipRef` for all the chips of this RISC-V STARK machine. pub fn chips(&self) -> Vec> { self.chips.iter().map(|chip| chip.as_ref()).collect() - - // [ - // self.program.as_ref(), - // self.cpu.as_ref(), - // self.sha_extend.as_ref(), - // self.sha_compress.as_ref(), - // self.ed_add_assign.as_ref(), - // self.ed_decompress.as_ref(), - // self.k256_decompress.as_ref(), - // self.weierstrass_add_assign.as_ref(), - // self.weierstrass_double_assign.as_ref(), - // self.keccak_permute.as_ref(), - // self.blake3_compress_inner.as_ref(), - // self.add.as_ref(), - // self.sub.as_ref(), - // self.bitwise.as_ref(), - // self.div_rem.as_ref(), - // self.mul.as_ref(), - // self.shift_right.as_ref(), - // self.shift_left.as_ref(), - // self.lt.as_ref(), - // self.field_ltu.as_ref(), - // self.byte.as_ref(), - // self.memory_init.as_ref(), - // self.memory_finalize.as_ref(), - // self.program_memory_init.as_ref(), - // ] } - pub fn shard_chips(&self, shard: &ExecutionRecord) -> Vec> { - let mut chips = Vec::new(); - - chips.push(self.program.as_ref()); - chips.push(self.cpu.as_ref()); - - if !shard.sha_extend_events.is_empty() { - chips.push(self.sha_extend.as_ref()); - } - - if !shard.sha_compress_events.is_empty() { - chips.push(self.sha_compress.as_ref()); - } - - if !shard.ed_add_events.is_empty() { - chips.push(self.ed_add_assign.as_ref()); - } - - if !shard.ed_decompress_events.is_empty() { - chips.push(self.ed_decompress.as_ref()); - } - - if !shard.k256_decompress_events.is_empty() { - chips.push(self.k256_decompress.as_ref()); - } - - if !shard.weierstrass_add_events.is_empty() { - chips.push(self.weierstrass_add_assign.as_ref()); - } - - if !shard.weierstrass_double_events.is_empty() { - chips.push(self.weierstrass_double_assign.as_ref()); - } - - if !shard.keccak_permute_events.is_empty() { - chips.push(self.keccak_permute.as_ref()); - } - - if !shard.blake3_compress_inner_events.is_empty() { - chips.push(self.blake3_compress_inner.as_ref()); - } - - if !shard.add_events.is_empty() { - chips.push(self.add.as_ref()); - } - - if !shard.sub_events.is_empty() { - chips.push(self.sub.as_ref()); - } - - if !shard.bitwise_events.is_empty() { - chips.push(self.bitwise.as_ref()); - } - - if !shard.divrem_events.is_empty() { - chips.push(self.div_rem.as_ref()); - } - - if !shard.mul_events.is_empty() { - chips.push(self.mul.as_ref()); - } - - if !shard.shift_right_events.is_empty() { - chips.push(self.shift_right.as_ref()); - } - - if !shard.shift_left_events.is_empty() { - chips.push(self.shift_left.as_ref()); - } - - if !shard.lt_events.is_empty() { - chips.push(self.lt.as_ref()); - } - - if !shard.field_events.is_empty() { - chips.push(self.field_ltu.as_ref()); - } - - if !shard.byte_lookups.is_empty() { - chips.push(self.byte.as_ref()); - } - - if !shard.first_memory_record.is_empty() { - chips.push(self.memory_init.as_ref()); - } - - if !shard.last_memory_record.is_empty() { - chips.push(self.memory_finalize.as_ref()); - } - - if !shard.program_memory_record.is_empty() { - chips.push(self.program_memory_init.as_ref()); - } - - chips + pub fn shard_chips<'a, 'b>( + &'a self, + shard: &'b ExecutionRecord, + ) -> impl Iterator> + where + 'a: 'b, + { + self.chips.iter().filter(|chip| chip.included(shard)) } /// The setup preprocessing phase. @@ -298,7 +79,7 @@ where pub fn shard( &self, record: &mut ExecutionRecord, - shard_config: &ShardingConfig, + shard_config: &ShardingConfig, ) -> Vec { // Get the local and global chips. let chips = self.chips(); @@ -325,7 +106,7 @@ where // For each chip, shard the events into segments. - record.shard(&ShardingConfig::default()) + record.shard(shard_config) } /// Prove the execution record is valid. @@ -339,7 +120,7 @@ where challenger: &mut SC::Challenger, ) -> Proof { tracing::info!("Sharding the execution record."); - let shards = self.shard(record); + let shards = self.shard(record, &ShardingConfig::default()); tracing::info!("Generating the shard proofs."); P::prove_shards(self, pk, &shards, challenger) diff --git a/core/src/stark/mod.rs b/core/src/stark/mod.rs index 0214107e0e..0244dfb077 100644 --- a/core/src/stark/mod.rs +++ b/core/src/stark/mod.rs @@ -24,6 +24,7 @@ pub use quotient::*; pub use types::*; pub use verifier::*; +#[allow(unused_imports)] pub(crate) use air::riscv_chips; #[cfg(test)] diff --git a/core/src/stark/prover.rs b/core/src/stark/prover.rs index c98f73db8c..7cf6eeb34b 100644 --- a/core/src/stark/prover.rs +++ b/core/src/stark/prover.rs @@ -73,7 +73,10 @@ where .map(|(data, shard)| { let data = tracing::info_span!("materializing data") .in_scope(|| data.materialize().expect("failed to load shard main data")); - let chips = machine.shard_chips(shard); + let chips = machine + .shard_chips(shard) + .map(|x| x.as_ref()) + .collect::>(); tracing::info_span!("proving shard").in_scope(|| { Self::prove_shard(config, pk, &chips, data, &mut challenger.clone()) }) @@ -105,7 +108,7 @@ where SC::Val: PrimeField32, { // Filter the chips based on what is used. - let filtered_chips = machine.shard_chips(shard); + let filtered_chips = machine.shard_chips(shard).collect::>(); // For each chip, generate the trace. let traces = filtered_chips diff --git a/examples/chess/script/Cargo.lock b/examples/chess/script/Cargo.lock index a2fff634fa..4e308e181c 100644 --- a/examples/chess/script/Cargo.lock +++ b/examples/chess/script/Cargo.lock @@ -456,6 +456,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1101,6 +1107,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1484,6 +1500,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/ed25519/script/Cargo.lock b/examples/ed25519/script/Cargo.lock index 23ea4f461e..134d78e975 100644 --- a/examples/ed25519/script/Cargo.lock +++ b/examples/ed25519/script/Cargo.lock @@ -456,6 +456,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1101,6 +1107,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1484,6 +1500,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/fibonacci-io/script/Cargo.lock b/examples/fibonacci-io/script/Cargo.lock index ad69db7466..bfeb161f7b 100644 --- a/examples/fibonacci-io/script/Cargo.lock +++ b/examples/fibonacci-io/script/Cargo.lock @@ -456,6 +456,12 @@ dependencies = [ "sp1-core", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1101,6 +1107,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1484,6 +1500,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/fibonacci/script/Cargo.lock b/examples/fibonacci/script/Cargo.lock index 86a507d5b4..2cfae5f252 100644 --- a/examples/fibonacci/script/Cargo.lock +++ b/examples/fibonacci/script/Cargo.lock @@ -456,6 +456,12 @@ dependencies = [ "sp1-core", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1101,6 +1107,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1484,6 +1500,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/io/script/Cargo.lock b/examples/io/script/Cargo.lock index 647b6a0b8b..f57d907edd 100644 --- a/examples/io/script/Cargo.lock +++ b/examples/io/script/Cargo.lock @@ -449,6 +449,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1102,6 +1108,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1485,6 +1501,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/json/script/Cargo.lock b/examples/json/script/Cargo.lock index 8b7c5c2f48..035ff4d4b1 100644 --- a/examples/json/script/Cargo.lock +++ b/examples/json/script/Cargo.lock @@ -449,6 +449,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1101,6 +1107,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1484,6 +1500,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/regex/script/Cargo.lock b/examples/regex/script/Cargo.lock index 67498d24d9..ec7dbbc7b4 100644 --- a/examples/regex/script/Cargo.lock +++ b/examples/regex/script/Cargo.lock @@ -449,6 +449,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1094,6 +1100,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1484,6 +1500,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/rsa/script/Cargo.lock b/examples/rsa/script/Cargo.lock index 67498d24d9..ec7dbbc7b4 100644 --- a/examples/rsa/script/Cargo.lock +++ b/examples/rsa/script/Cargo.lock @@ -449,6 +449,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1094,6 +1100,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1484,6 +1500,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/ssz-withdrawals/script/Cargo.lock b/examples/ssz-withdrawals/script/Cargo.lock index d817d498e5..c68c7eaf5d 100644 --- a/examples/ssz-withdrawals/script/Cargo.lock +++ b/examples/ssz-withdrawals/script/Cargo.lock @@ -449,6 +449,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1094,6 +1100,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1477,6 +1493,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", diff --git a/examples/tendermint/script/Cargo.lock b/examples/tendermint/script/Cargo.lock index e98f1341cd..02ebad6d73 100644 --- a/examples/tendermint/script/Cargo.lock +++ b/examples/tendermint/script/Cargo.lock @@ -449,6 +449,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -1094,6 +1100,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1477,6 +1493,7 @@ dependencies = [ "p3-symmetric", "p3-uni-stark", "p3-util", + "petgraph", "rrs-lib", "serde", "serde_json", From e0d505e7ea861760e761f7b7e08455dee3742f93 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Wed, 14 Feb 2024 17:53:17 -0800 Subject: [PATCH 03/19] doc --- core/src/stark/machine.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index 5c3e736607..745d58ced7 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -18,6 +18,14 @@ use super::StarkGenericConfig; use super::VerificationError; use super::Verifier; +/// A STARK for proving RISC-V execution. +pub struct RiscvStark { + /// The STARK settings for the RISC-V STARK. + config: SC, + /// The chips that make up the RISC-V STARK machine, in order of their execution. + chips: Vec>, +} + #[derive(Debug, Clone)] pub struct ProvingKey { //TODO @@ -30,16 +38,11 @@ pub struct VerifyingKey { marker: std::marker::PhantomData, } -pub struct RiscvStark { - config: SC, - - chips: Vec>, -} - impl RiscvStark where SC::Val: PrimeField32, { + /// Create a new RISC-V STARK machine. pub fn new(config: SC) -> Self { let chips = RiscvAir::get_all().into_iter().map(Chip::new).collect(); From 5310188eacf81bbbf7a19ecce3eb3fe560598824 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Thu, 15 Feb 2024 14:27:36 -0800 Subject: [PATCH 04/19] checkpoint --- core/src/lookup/interaction.rs | 2 +- core/src/memory/global.rs | 4 +- core/src/stark/air.rs | 38 ++++++++++++--- core/src/stark/chip.rs | 26 +++++++++- core/src/stark/machine.rs | 89 +++++++++++++++++++++++++++++++--- core/src/stark/prover.rs | 5 +- 6 files changed, 144 insertions(+), 20 deletions(-) diff --git a/core/src/lookup/interaction.rs b/core/src/lookup/interaction.rs index dceccfbc9e..5171a951fa 100644 --- a/core/src/lookup/interaction.rs +++ b/core/src/lookup/interaction.rs @@ -11,7 +11,7 @@ pub struct Interaction { } /// The type of interaction for a lookup argument. -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum InteractionKind { /// Interaction with the memory table, such as read and write. Memory = 1, diff --git a/core/src/memory/global.rs b/core/src/memory/global.rs index 3c01fb5714..620951b0e1 100644 --- a/core/src/memory/global.rs +++ b/core/src/memory/global.rs @@ -205,7 +205,7 @@ mod tests { let machine = RiscvStark::new(BabyBearPoseidon2::new()); debug_interactions_with_all_chips( - &machine.chips(), + &machine.dyn_chips(), &runtime.record, vec![InteractionKind::Memory], ); @@ -220,7 +220,7 @@ mod tests { let machine = RiscvStark::new(BabyBearPoseidon2::new()); debug_interactions_with_all_chips( - &machine.chips(), + &machine.dyn_chips(), &runtime.record, vec![InteractionKind::Byte], ); diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs index 77db5ab29d..eedcf34e64 100644 --- a/core/src/stark/air.rs +++ b/core/src/stark/air.rs @@ -1,3 +1,5 @@ +use std::marker::PhantomData; + use crate::air::MachineAir; pub use crate::air::SP1AirBuilder; use crate::memory::MemoryChipKind; @@ -37,7 +39,7 @@ pub(crate) mod riscv_chips { pub use crate::utils::ec::weierstrass::SWCurve; } -pub enum RiscvAir { +pub enum RiscvAir { /// An AIR that containts a preprocessed program table and a lookup for the instructions. Program(ProgramChip), /// An AIR for the RISC-V CPU. Each row represents a cpu cycle. @@ -82,9 +84,11 @@ pub enum RiscvAir { KeccakP(KeccakPermuteChip), Blake3Compress(Blake3CompressInnerChip), + + _Unreachable(PhantomData), } -impl RiscvAir { +impl RiscvAir { pub fn included(&self, shard: &ExecutionRecord) -> bool { match self { RiscvAir::Program(_) => true, @@ -111,10 +115,11 @@ impl RiscvAir { RiscvAir::Secp256k1Double(_) => !shard.weierstrass_double_events.is_empty(), RiscvAir::KeccakP(_) => !shard.keccak_permute_events.is_empty(), RiscvAir::Blake3Compress(_) => !shard.blake3_compress_inner_events.is_empty(), + RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } - pub fn get_all() -> Vec { + pub fn get_all() -> Vec { let mut chips = vec![]; let program = ProgramChip::default(); chips.push(RiscvAir::Program(program)); @@ -171,7 +176,21 @@ impl RiscvAir { } } -impl BaseAir for RiscvAir { +impl PartialEq for RiscvAir { + fn eq(&self, other: &Self) -> bool { + self.name() == other.name() + } +} + +impl Eq for RiscvAir {} + +impl core::hash::Hash for RiscvAir { + fn hash(&self, state: &mut H) { + self.name().hash(state); + } +} + +impl BaseAir for RiscvAir { fn width(&self) -> usize { match self { RiscvAir::Program(p) => BaseAir::::width(p), @@ -198,6 +217,7 @@ impl BaseAir for RiscvAir { RiscvAir::Secp256k1Double(d) => BaseAir::::width(d), RiscvAir::KeccakP(p) => BaseAir::::width(p), RiscvAir::Blake3Compress(c) => BaseAir::::width(c), + RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } @@ -227,11 +247,12 @@ impl BaseAir for RiscvAir { RiscvAir::Secp256k1Double(d) => d.preprocessed_trace(), RiscvAir::KeccakP(p) => p.preprocessed_trace(), RiscvAir::Blake3Compress(c) => c.preprocessed_trace(), + RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } } -impl MachineAir for RiscvAir { +impl MachineAir for RiscvAir { fn name(&self) -> String { match self { RiscvAir::Program(p) => MachineAir::::name(p), @@ -258,6 +279,7 @@ impl MachineAir for RiscvAir { RiscvAir::Secp256k1Double(d) => MachineAir::::name(d), RiscvAir::KeccakP(p) => MachineAir::::name(p), RiscvAir::Blake3Compress(c) => MachineAir::::name(c), + RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } @@ -291,6 +313,7 @@ impl MachineAir for RiscvAir { RiscvAir::Secp256k1Double(d) => d.generate_trace(input, output), RiscvAir::KeccakP(p) => p.generate_trace(input, output), RiscvAir::Blake3Compress(c) => c.generate_trace(input, output), + RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } @@ -320,6 +343,7 @@ impl MachineAir for RiscvAir { RiscvAir::Secp256k1Double(d) => MachineAir::::preprocessed_width(d), RiscvAir::KeccakP(p) => MachineAir::::preprocessed_width(p), RiscvAir::Blake3Compress(c) => MachineAir::::preprocessed_width(c), + RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } @@ -352,11 +376,12 @@ impl MachineAir for RiscvAir { RiscvAir::Secp256k1Double(d) => d.generate_preprocessed_trace(program), RiscvAir::KeccakP(p) => p.generate_preprocessed_trace(program), RiscvAir::Blake3Compress(c) => c.generate_preprocessed_trace(program), + RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } } -impl Air for RiscvAir +impl Air for RiscvAir where AB::F: PrimeField32, { @@ -386,6 +411,7 @@ where RiscvAir::Secp256k1Double(d) => d.eval(builder), RiscvAir::KeccakP(p) => p.eval(builder), RiscvAir::Blake3Compress(c) => c.eval(builder), + RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } } diff --git a/core/src/stark/chip.rs b/core/src/stark/chip.rs index a33ec263fc..a2afdebc9a 100644 --- a/core/src/stark/chip.rs +++ b/core/src/stark/chip.rs @@ -1,3 +1,5 @@ +use std::hash::Hash; + use p3_air::{Air, BaseAir, PairBuilder}; use p3_field::{Field, PrimeField32}; use p3_matrix::dense::RowMajorMatrix; @@ -46,7 +48,7 @@ impl Chip { } } -impl Chip { +impl Chip> { pub fn included(&self, shard: &ExecutionRecord) -> bool { self.air.included(shard) } @@ -182,6 +184,28 @@ where } } +impl PartialEq for Chip +where + F: Field, + A: PartialEq, +{ + fn eq(&self, other: &Self) -> bool { + self.air == other.air + } +} + +impl Eq for Chip where F: Field + Eq {} + +impl Hash for Chip +where + F: Field, + A: Hash, +{ + fn hash(&self, state: &mut H) { + self.air.hash(state); + } +} + // Implement Air on ChipRef similar to Chip. impl<'a, SC: StarkGenericConfig> BaseAir for ChipRef<'a, SC> { diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index 745d58ced7..ec16203824 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -1,6 +1,9 @@ +use std::collections::HashMap; +use std::collections::HashSet; use std::marker::PhantomData; use crate::air::MachineAir; +use crate::lookup::InteractionKind; use crate::runtime::ExecutionRecord; use crate::runtime::Program; use crate::runtime::ShardingConfig; @@ -8,6 +11,9 @@ use p3_challenger::CanObserve; use p3_field::AbstractField; use p3_field::Field; use p3_field::PrimeField32; +use petgraph::algo::toposort; +use petgraph::prelude::GraphMap; +use petgraph::Directed; use super::Chip; use super::ChipRef; @@ -18,12 +24,15 @@ use super::StarkGenericConfig; use super::VerificationError; use super::Verifier; +pub type RiscvChip = + Chip<::Val, RiscvAir<::Val>>; + /// A STARK for proving RISC-V execution. pub struct RiscvStark { /// The STARK settings for the RISC-V STARK. config: SC, /// The chips that make up the RISC-V STARK machine, in order of their execution. - chips: Vec>, + chips: Vec>, } #[derive(Debug, Clone)] @@ -44,24 +53,91 @@ where { /// Create a new RISC-V STARK machine. pub fn new(config: SC) -> Self { - let chips = RiscvAir::get_all().into_iter().map(Chip::new).collect(); + // The machine consists of a config (input) and a set of chips. The chip vector should + // contain the chips in the order they are executed. Each chip's air is able to add events + // to another chip's record (depending on interactions), so we order the chips by keeping + // track of which chips receive events from which other chips. + + // First, get all the chips associated with this machine. + let mut chips = RiscvAir::get_all() + .into_iter() + .map(Chip::new) + .collect::>(); + + let mut node_map: HashMap = HashMap::new(); + for (i, chip) in chips.iter().enumerate() { + node_map.insert(chip.name(), i); + } + + // Create a map of interactions to chips that receive them. + let mut interaction_receive_map = HashMap::new(); + for kind in InteractionKind::all_kinds() { + interaction_receive_map.insert(kind, HashSet::new()); + } + + for (i, chip) in chips.iter().enumerate() { + for rec in chip.receives().iter() { + interaction_receive_map + .get_mut(&rec.kind) + .unwrap() + .insert(i); + } + } + + println!("interaction_receive_map: {:#?}", interaction_receive_map); + + // Create a directed graph of chip dependencies. + let mut deps = GraphMap::::new(); + // Add a node for each chip. + for (i, chip) in chips.iter().enumerate() { + deps.add_node(i); + // For each interaction being sent, add an edge to the chips that receive it. + for send in chip.sends().iter() { + for other in interaction_receive_map + .get(&send.kind) + .expect("No chips receives this interaction") + { + deps.add_edge(i, *other, 1); + } + } + } + + // Remove self loops. + for i in 0..chips.len() { + deps.remove_edge(i, i); + } + + // Get a topological sorting of the graph, throwing a panic if there are cycles. + let sorted_indices = toposort(&deps, None).expect("Cycle in chip dependencies"); + + let sorting_key = + |index: &usize| -> usize { sorted_indices.iter().position(|x| x == index).unwrap() }; + + chips.sort_by_key(|chip| sorting_key(&node_map[&chip.name()])); Self { config, chips } } /// Get an array containing a `ChipRef` for all the chips of this RISC-V STARK machine. - pub fn chips(&self) -> Vec> { + pub fn chips(&self) -> &[RiscvChip] { + &self.chips + } + + pub fn dyn_chips(&self) -> Vec> { self.chips.iter().map(|chip| chip.as_ref()).collect() } pub fn shard_chips<'a, 'b>( &'a self, shard: &'b ExecutionRecord, - ) -> impl Iterator> + ) -> impl Iterator> where 'a: 'b, { - self.chips.iter().filter(|chip| chip.included(shard)) + self.chips + .iter() + .filter(|chip| chip.included(shard)) + .map(|chip| chip.as_ref()) } /// The setup preprocessing phase. @@ -157,8 +233,9 @@ where tracing::info_span!("verifying segment", segment = i).in_scope(|| { let chips = self .chips() - .into_iter() + .iter() .filter(|chip| proof.chip_ids.contains(&chip.name())) + .map(|chip| chip.as_ref()) .collect::>(); Verifier::verify_shard(&self.config, &chips, &mut challenger.clone(), proof) .map_err(ProgramVerificationError::InvalidSegmentProof) diff --git a/core/src/stark/prover.rs b/core/src/stark/prover.rs index 7cf6eeb34b..a2c78e528e 100644 --- a/core/src/stark/prover.rs +++ b/core/src/stark/prover.rs @@ -73,10 +73,7 @@ where .map(|(data, shard)| { let data = tracing::info_span!("materializing data") .in_scope(|| data.materialize().expect("failed to load shard main data")); - let chips = machine - .shard_chips(shard) - .map(|x| x.as_ref()) - .collect::>(); + let chips = machine.shard_chips(shard).collect::>(); tracing::info_span!("proving shard").in_scope(|| { Self::prove_shard(config, pk, &chips, data, &mut challenger.clone()) }) From 7ef0cd932352925a4b650a6e5c48263f3382e8ee Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Thu, 15 Feb 2024 17:30:28 -0800 Subject: [PATCH 05/19] dag ordering --- core/src/stark/air.rs | 58 +++++++++++++++++++++------------------ core/src/stark/machine.rs | 8 ++++-- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs index eedcf34e64..eb885fec94 100644 --- a/core/src/stark/air.rs +++ b/core/src/stark/air.rs @@ -121,30 +121,13 @@ impl RiscvAir { pub fn get_all() -> Vec { let mut chips = vec![]; - let program = ProgramChip::default(); - chips.push(RiscvAir::Program(program)); + let cpu = CpuChip::default(); chips.push(RiscvAir::Cpu(cpu)); - let sha_extend = ShaExtendChip::default(); - chips.push(RiscvAir::ShaExtend(sha_extend)); - let sha_compress = ShaCompressChip::default(); - chips.push(RiscvAir::ShaCompress(sha_compress)); - let ed_add_assign = EdAddAssignChip::>::new(); - chips.push(RiscvAir::Ed25519Add(ed_add_assign)); - let ed_decompress = EdDecompressChip::::default(); - chips.push(RiscvAir::Ed25519Decompress(ed_decompress)); - let k256_decompress = K256DecompressChip::default(); - chips.push(RiscvAir::K256Decompress(k256_decompress)); - let weierstrass_add_assign = - WeierstrassAddAssignChip::>::new(); - chips.push(RiscvAir::Secp256k1Add(weierstrass_add_assign)); - let weierstrass_double_assign = - WeierstrassDoubleAssignChip::>::new(); - chips.push(RiscvAir::Secp256k1Double(weierstrass_double_assign)); - let keccak_permute = KeccakPermuteChip::new(); - chips.push(RiscvAir::KeccakP(keccak_permute)); - let blake3_compress_inner = Blake3CompressInnerChip::new(); - chips.push(RiscvAir::Blake3Compress(blake3_compress_inner)); + + let program = ProgramChip::default(); + chips.push(RiscvAir::Program(program)); + let add = AddChip::default(); chips.push(RiscvAir::Add(add)); let sub = SubChip::default(); @@ -161,10 +144,7 @@ impl RiscvAir { chips.push(RiscvAir::ShiftLeft(shift_left)); let lt = LtChip::default(); chips.push(RiscvAir::Lt(lt)); - let field_ltu = FieldLTUChip::default(); - chips.push(RiscvAir::FieldLTU(field_ltu)); - let byte = ByteChip::default(); - chips.push(RiscvAir::ByteLookup(byte)); + let memory_init = MemoryGlobalChip::new(MemoryChipKind::Init); chips.push(RiscvAir::MemoryInit(memory_init)); let memory_finalize = MemoryGlobalChip::new(MemoryChipKind::Finalize); @@ -172,6 +152,32 @@ impl RiscvAir { let program_memory_init = MemoryGlobalChip::new(MemoryChipKind::Program); chips.push(RiscvAir::ProgramMemory(program_memory_init)); + let field_ltu = FieldLTUChip::default(); + chips.push(RiscvAir::FieldLTU(field_ltu)); + let byte = ByteChip::default(); + chips.push(RiscvAir::ByteLookup(byte)); + + let sha_extend = ShaExtendChip::default(); + chips.push(RiscvAir::ShaExtend(sha_extend)); + let sha_compress = ShaCompressChip::default(); + chips.push(RiscvAir::ShaCompress(sha_compress)); + let ed_add_assign = EdAddAssignChip::>::new(); + chips.push(RiscvAir::Ed25519Add(ed_add_assign)); + let ed_decompress = EdDecompressChip::::default(); + chips.push(RiscvAir::Ed25519Decompress(ed_decompress)); + let k256_decompress = K256DecompressChip::default(); + chips.push(RiscvAir::K256Decompress(k256_decompress)); + let weierstrass_add_assign = + WeierstrassAddAssignChip::>::new(); + chips.push(RiscvAir::Secp256k1Add(weierstrass_add_assign)); + let weierstrass_double_assign = + WeierstrassDoubleAssignChip::>::new(); + chips.push(RiscvAir::Secp256k1Double(weierstrass_double_assign)); + let keccak_permute = KeccakPermuteChip::new(); + chips.push(RiscvAir::KeccakP(keccak_permute)); + let blake3_compress_inner = Blake3CompressInnerChip::new(); + chips.push(RiscvAir::Blake3Compress(blake3_compress_inner)); + chips } } diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index ec16203824..c0743ee474 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -77,6 +77,12 @@ where for (i, chip) in chips.iter().enumerate() { for rec in chip.receives().iter() { + // Don't add memory interactions to the map, since the memory table is completely + // virtual and doesn't correspond to any chip. + if rec.kind == InteractionKind::Memory { + continue; + } + // Add the chip to the set of chips that receive this interaction. interaction_receive_map .get_mut(&rec.kind) .unwrap() @@ -84,8 +90,6 @@ where } } - println!("interaction_receive_map: {:#?}", interaction_receive_map); - // Create a directed graph of chip dependencies. let mut deps = GraphMap::::new(); // Add a node for each chip. From e705c16aeb504ebbe0f37b540a92a946f19b6595 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Fri, 16 Feb 2024 09:58:41 -0800 Subject: [PATCH 06/19] cancel reordering --- core/src/stark/air.rs | 42 +++++++++++++++++++-------------------- core/src/stark/machine.rs | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs index eb885fec94..03fcadc2fc 100644 --- a/core/src/stark/air.rs +++ b/core/src/stark/air.rs @@ -128,6 +128,27 @@ impl RiscvAir { let program = ProgramChip::default(); chips.push(RiscvAir::Program(program)); + let sha_extend = ShaExtendChip::default(); + chips.push(RiscvAir::ShaExtend(sha_extend)); + let sha_compress = ShaCompressChip::default(); + chips.push(RiscvAir::ShaCompress(sha_compress)); + let ed_add_assign = EdAddAssignChip::>::new(); + chips.push(RiscvAir::Ed25519Add(ed_add_assign)); + let ed_decompress = EdDecompressChip::::default(); + chips.push(RiscvAir::Ed25519Decompress(ed_decompress)); + let k256_decompress = K256DecompressChip::default(); + chips.push(RiscvAir::K256Decompress(k256_decompress)); + let weierstrass_add_assign = + WeierstrassAddAssignChip::>::new(); + chips.push(RiscvAir::Secp256k1Add(weierstrass_add_assign)); + let weierstrass_double_assign = + WeierstrassDoubleAssignChip::>::new(); + chips.push(RiscvAir::Secp256k1Double(weierstrass_double_assign)); + let keccak_permute = KeccakPermuteChip::new(); + chips.push(RiscvAir::KeccakP(keccak_permute)); + let blake3_compress_inner = Blake3CompressInnerChip::new(); + chips.push(RiscvAir::Blake3Compress(blake3_compress_inner)); + let add = AddChip::default(); chips.push(RiscvAir::Add(add)); let sub = SubChip::default(); @@ -157,27 +178,6 @@ impl RiscvAir { let byte = ByteChip::default(); chips.push(RiscvAir::ByteLookup(byte)); - let sha_extend = ShaExtendChip::default(); - chips.push(RiscvAir::ShaExtend(sha_extend)); - let sha_compress = ShaCompressChip::default(); - chips.push(RiscvAir::ShaCompress(sha_compress)); - let ed_add_assign = EdAddAssignChip::>::new(); - chips.push(RiscvAir::Ed25519Add(ed_add_assign)); - let ed_decompress = EdDecompressChip::::default(); - chips.push(RiscvAir::Ed25519Decompress(ed_decompress)); - let k256_decompress = K256DecompressChip::default(); - chips.push(RiscvAir::K256Decompress(k256_decompress)); - let weierstrass_add_assign = - WeierstrassAddAssignChip::>::new(); - chips.push(RiscvAir::Secp256k1Add(weierstrass_add_assign)); - let weierstrass_double_assign = - WeierstrassDoubleAssignChip::>::new(); - chips.push(RiscvAir::Secp256k1Double(weierstrass_double_assign)); - let keccak_permute = KeccakPermuteChip::new(); - chips.push(RiscvAir::KeccakP(keccak_permute)); - let blake3_compress_inner = Blake3CompressInnerChip::new(); - chips.push(RiscvAir::Blake3Compress(blake3_compress_inner)); - chips } } diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index c0743ee474..0de8fd4e9f 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -117,7 +117,7 @@ where let sorting_key = |index: &usize| -> usize { sorted_indices.iter().position(|x| x == index).unwrap() }; - chips.sort_by_key(|chip| sorting_key(&node_map[&chip.name()])); + // chips.sort_by_key(|chip| sorting_key(&node_map[&chip.name()])); Self { config, chips } } From e4edf42e5de0186026fc12e01b5f62230a61129b Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Tue, 20 Feb 2024 13:13:04 -0800 Subject: [PATCH 07/19] works --- Cargo.lock | 163 +++++++++++---------- Cargo.toml | 38 ++--- core/src/air/builder.rs | 5 +- core/src/lookup/builder.rs | 8 +- core/src/stark/config.rs | 8 +- core/src/stark/folder.rs | 40 ++--- core/src/stark/permutation.rs | 4 +- core/src/stark/quotient.rs | 30 ++-- core/src/stark/types.rs | 6 + core/src/utils/prove.rs | 33 ++--- examples/chess/script/Cargo.lock | 42 +++--- examples/ed25519/script/Cargo.lock | 42 +++--- examples/fibonacci-io/script/Cargo.lock | 42 +++--- examples/fibonacci/script/Cargo.lock | 42 +++--- examples/io/script/Cargo.lock | 42 +++--- examples/json/script/Cargo.lock | 42 +++--- examples/regex/script/Cargo.lock | 42 +++--- examples/rsa/script/Cargo.lock | 42 +++--- examples/ssz-withdrawals/script/Cargo.lock | 42 +++--- examples/tendermint/script/Cargo.lock | 42 +++--- 20 files changed, 371 insertions(+), 384 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be7abf07c9..a0896b4057 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" dependencies = [ "anstyle", "anstyle-parse", @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" dependencies = [ "backtrace", ] @@ -207,9 +207,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "c764d619ca78fccbf3069b37bd7af92577f044bb15236036662d79b6559f25b7" [[package]] name = "bytes" @@ -228,9 +228,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" dependencies = [ "serde", ] @@ -300,9 +300,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.0" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" dependencies = [ "clap_builder", "clap_derive", @@ -310,9 +310,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.0" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" dependencies = [ "anstream", "anstyle", @@ -329,7 +329,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -396,9 +396,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -516,7 +516,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -618,9 +618,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elf" @@ -807,7 +807,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -935,9 +935,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -1038,9 +1038,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown", @@ -1066,12 +1066,12 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix", + "libc", "windows-sys 0.52.0", ] @@ -1373,9 +1373,9 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ "libc", ] @@ -1416,7 +1416,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-field", "p3-matrix", @@ -1425,7 +1425,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-field", "rand", @@ -1435,7 +1435,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "blake3", "p3-symmetric", @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -1455,7 +1455,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-challenger", "p3-field", @@ -1466,7 +1466,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-field", "p3-matrix", @@ -1477,7 +1477,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "itertools 0.12.1", "p3-util", @@ -1488,7 +1488,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "itertools 0.12.1", "p3-challenger", @@ -1506,7 +1506,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-field", "p3-util", @@ -1517,7 +1517,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-field", "p3-matrix", @@ -1527,7 +1527,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -1536,7 +1536,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-air", "p3-field", @@ -1548,7 +1548,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -1560,7 +1560,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "rayon", ] @@ -1568,7 +1568,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1584,7 +1584,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "itertools 0.12.1", "p3-commit", @@ -1600,7 +1600,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "itertools 0.12.1", "p3-dft", @@ -1615,7 +1615,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "p3-baby-bear", "p3-field", @@ -1629,7 +1629,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "itertools 0.12.1", "p3-field", @@ -1638,7 +1638,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "itertools 0.12.1", "p3-air", @@ -1656,7 +1656,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" dependencies = [ "serde", ] @@ -1730,9 +1730,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" @@ -1983,16 +1983,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2072,9 +2073,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "same-file" @@ -2117,38 +2118,38 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -2189,7 +2190,7 @@ checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2417,9 +2418,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" dependencies = [ "proc-macro2", "quote", @@ -2484,22 +2485,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2606,7 +2607,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2675,7 +2676,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2756,9 +2757,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -2869,7 +2870,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-shared", ] @@ -2903,7 +2904,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3108,9 +3109,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.39" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index fdab5b226d..b83729c5a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,22 +15,22 @@ debug = true debug-assertions = true [workspace.dependencies] -p3-air = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-field = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-commit = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-matrix = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-baby-bear = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-util = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-challenger = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-dft = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-fri = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-goldilocks = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-keccak = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-keccak-air = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-blake3 = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-mds = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-merkle-tree = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-poseidon2 = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-symmetric = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-uni-stark = { git = "https://github.com/succinctlabs/plonky3.git" } -p3-maybe-rayon = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-air = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-field = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-commit = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-matrix = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-baby-bear = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-util = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-challenger = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-dft = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-fri = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-goldilocks = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-keccak = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-keccak-air = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-blake3 = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-mds = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-merkle-tree = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-poseidon2 = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-symmetric = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-uni-stark = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-maybe-rayon = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } diff --git a/core/src/air/builder.rs b/core/src/air/builder.rs index b56b3e512b..5e2c7b46fd 100644 --- a/core/src/air/builder.rs +++ b/core/src/air/builder.rs @@ -9,7 +9,7 @@ use crate::cpu::columns::OpcodeSelectorCols; use crate::lookup::InteractionKind; use crate::{bytes::ByteOpcode, memory::MemoryCols}; use p3_field::{AbstractField, Field}; -use p3_uni_stark::check_constraints::DebugConstraintBuilder; + use p3_uni_stark::StarkGenericConfig; use std::iter::once; @@ -501,4 +501,5 @@ impl>> SP1AirBuilder fo impl<'a, SC: StarkGenericConfig> EmptyMessageBuilder for ProverConstraintFolder<'a, SC> {} impl<'a, Challenge: Field> EmptyMessageBuilder for VerifierConstraintFolder<'a, Challenge> {} impl EmptyMessageBuilder for SymbolicAirBuilder {} -impl<'a, F: Field> EmptyMessageBuilder for DebugConstraintBuilder<'a, F> {} + +impl<'a, F: Field> EmptyMessageBuilder for p3_uni_stark::DebugConstraintBuilder<'a, F> {} diff --git a/core/src/lookup/builder.rs b/core/src/lookup/builder.rs index cd56ce6a30..c675ce1387 100644 --- a/core/src/lookup/builder.rs +++ b/core/src/lookup/builder.rs @@ -249,7 +249,7 @@ mod tests { &[], main.row_mut(0), ); - print!("{}, ", expr); + print!("{:?}, ", expr); } let multiplicity = interaction @@ -259,7 +259,7 @@ mod tests { main.row_mut(0), ); - println!(", multiplicity: {}", multiplicity); + println!(", multiplicity: {:?}", multiplicity); } for interaction in sends { @@ -269,7 +269,7 @@ mod tests { &[], main.row_mut(0), ); - print!("{}, ", expr); + print!("{:?}, ", expr); } let multiplicity = interaction @@ -279,7 +279,7 @@ mod tests { main.row_mut(0), ); - println!(", multiplicity: {}", multiplicity); + println!(", multiplicity: {:?}", multiplicity); } } } diff --git a/core/src/stark/config.rs b/core/src/stark/config.rs index d53141d6bc..cd34eeddb7 100644 --- a/core/src/stark/config.rs +++ b/core/src/stark/config.rs @@ -1,6 +1,6 @@ use p3_challenger::{CanObserve, FieldChallenger}; use p3_commit::{Pcs, UnivariatePcsWithLde}; -use p3_field::{AbstractExtensionField, ExtensionField, PackedField, TwoAdicField}; +use p3_field::{ExtensionField, TwoAdicField}; use p3_matrix::dense::RowMajorMatrix; use serde::Serialize; @@ -9,15 +9,9 @@ pub trait StarkGenericConfig { /// The field over which trace data is encoded. type Val: TwoAdicField; - /// The packed version of `Val` to accelerate vector-friendly computations. - type PackedVal: PackedField; - /// The field from which random challenges are drawn. type Challenge: ExtensionField + TwoAdicField + Serialize; - /// The packed version of `Challenge` to accelerate vector-friendly computations. - type PackedChallenge: AbstractExtensionField + Copy; - /// The PCS used to commit to trace polynomials. type Pcs: UnivariatePcsWithLde< Self::Val, diff --git a/core/src/stark/folder.rs b/core/src/stark/folder.rs index 407460ed0b..df61abc977 100644 --- a/core/src/stark/folder.rs +++ b/core/src/stark/folder.rs @@ -1,27 +1,27 @@ -use super::StarkGenericConfig; +use super::{PackedChallenge, PackedVal, StarkGenericConfig}; use crate::air::{EmptyMessageBuilder, MultiTableAirBuilder}; use p3_air::{AirBuilder, ExtensionBuilder, PairBuilder, PermutationAirBuilder, TwoRowMatrixView}; use p3_field::AbstractField; /// A folder for prover constraints. pub struct ProverConstraintFolder<'a, SC: StarkGenericConfig> { - pub preprocessed: TwoRowMatrixView<'a, SC::PackedVal>, - pub main: TwoRowMatrixView<'a, SC::PackedVal>, - pub perm: TwoRowMatrixView<'a, SC::PackedChallenge>, + pub preprocessed: TwoRowMatrixView<'a, PackedVal>, + pub main: TwoRowMatrixView<'a, PackedVal>, + pub perm: TwoRowMatrixView<'a, PackedChallenge>, pub perm_challenges: &'a [SC::Challenge], pub cumulative_sum: SC::Challenge, - pub is_first_row: SC::PackedVal, - pub is_last_row: SC::PackedVal, - pub is_transition: SC::PackedVal, + pub is_first_row: PackedVal, + pub is_last_row: PackedVal, + pub is_transition: PackedVal, pub alpha: SC::Challenge, - pub accumulator: SC::PackedChallenge, + pub accumulator: PackedChallenge, } impl<'a, SC: StarkGenericConfig> AirBuilder for ProverConstraintFolder<'a, SC> { type F = SC::Val; - type Expr = SC::PackedVal; - type Var = SC::PackedVal; - type M = TwoRowMatrixView<'a, SC::PackedVal>; + type Expr = PackedVal; + type Var = PackedVal; + type M = TwoRowMatrixView<'a, PackedVal>; fn main(&self) -> Self::M { self.main @@ -44,8 +44,8 @@ impl<'a, SC: StarkGenericConfig> AirBuilder for ProverConstraintFolder<'a, SC> { } fn assert_zero>(&mut self, x: I) { - let x: SC::PackedVal = x.into(); - self.accumulator *= SC::PackedChallenge::from_f(self.alpha); + let x: PackedVal = x.into(); + self.accumulator *= PackedChallenge::::from_f(self.alpha); self.accumulator += x; } } @@ -53,22 +53,22 @@ impl<'a, SC: StarkGenericConfig> AirBuilder for ProverConstraintFolder<'a, SC> { impl<'a, SC: StarkGenericConfig> ExtensionBuilder for ProverConstraintFolder<'a, SC> { type EF = SC::Challenge; - type ExprEF = SC::PackedChallenge; + type ExprEF = PackedChallenge; - type VarEF = SC::PackedChallenge; + type VarEF = PackedChallenge; fn assert_zero_ext(&mut self, x: I) where I: Into, { - let x: SC::PackedChallenge = x.into(); - self.accumulator *= SC::PackedChallenge::from_f(self.alpha); + let x: PackedChallenge = x.into(); + self.accumulator *= PackedChallenge::::from_f(self.alpha); self.accumulator += x; } } impl<'a, SC: StarkGenericConfig> PermutationAirBuilder for ProverConstraintFolder<'a, SC> { - type MP = TwoRowMatrixView<'a, SC::PackedChallenge>; + type MP = TwoRowMatrixView<'a, PackedChallenge>; fn permutation(&self) -> Self::MP { self.perm @@ -80,10 +80,10 @@ impl<'a, SC: StarkGenericConfig> PermutationAirBuilder for ProverConstraintFolde } impl<'a, SC: StarkGenericConfig> MultiTableAirBuilder for ProverConstraintFolder<'a, SC> { - type Sum = SC::PackedChallenge; + type Sum = PackedChallenge; fn cumulative_sum(&self) -> Self::Sum { - SC::PackedChallenge::from_f(self.cumulative_sum) + PackedChallenge::::from_f(self.cumulative_sum) } } diff --git a/core/src/stark/permutation.rs b/core/src/stark/permutation.rs index b93e09520b..4dd545e75e 100644 --- a/core/src/stark/permutation.rs +++ b/core/src/stark/permutation.rs @@ -2,7 +2,6 @@ use p3_air::{ExtensionBuilder, PairBuilder}; use p3_field::{AbstractExtensionField, AbstractField, ExtensionField, Field, Powers, PrimeField}; use p3_matrix::{dense::RowMajorMatrix, Matrix, MatrixRowSlices}; use p3_maybe_rayon::prelude::*; -use std::ops::{Add, Mul}; use super::util::batch_multiplicative_inverse_inplace; use crate::{air::MultiTableAirBuilder, lookup::Interaction}; @@ -143,8 +142,7 @@ pub fn eval_permutation_constraints( ) where F: Field, AB::EF: ExtensionField, - AB::Expr: Mul + Add, - AB: MultiTableAirBuilder + PairBuilder, + AB: MultiTableAirBuilder + PairBuilder, { let random_elements = builder.permutation_randomness(); let (alpha, beta) = (random_elements[0], random_elements[1]); diff --git a/core/src/stark/quotient.rs b/core/src/stark/quotient.rs index 5865ccd260..3b450e1421 100644 --- a/core/src/stark/quotient.rs +++ b/core/src/stark/quotient.rs @@ -1,4 +1,6 @@ use super::folder::ProverConstraintFolder; +use super::PackedChallenge; +use super::PackedVal; use p3_air::Air; use p3_air::TwoRowMatrixView; use p3_commit::UnivariatePcsWithLde; @@ -51,20 +53,20 @@ where (0..quotient_size) .into_par_iter() - .step_by(SC::PackedVal::WIDTH) + .step_by(PackedVal::::WIDTH) .flat_map_iter(|i_local_start| { let wrap = |i| i % quotient_size; let i_next_start = wrap(i_local_start + next_step); - let i_range = i_local_start..i_local_start + SC::PackedVal::WIDTH; + let i_range = i_local_start..i_local_start + PackedVal::::WIDTH; - let x = *SC::PackedVal::from_slice(&coset[i_range.clone()]); + let x = *PackedVal::::from_slice(&coset[i_range.clone()]); let is_transition = x - subgroup_last; - let is_first_row = *SC::PackedVal::from_slice(&lagrange_first_evals[i_range.clone()]); - let is_last_row = *SC::PackedVal::from_slice(&lagrange_last_evals[i_range]); + let is_first_row = *PackedVal::::from_slice(&lagrange_first_evals[i_range.clone()]); + let is_last_row = *PackedVal::::from_slice(&lagrange_last_evals[i_range]); let local: Vec<_> = (0..main_lde.width()) .map(|col| { - SC::PackedVal::from_fn(|offset| { + PackedVal::::from_fn(|offset| { let row = wrap(i_local_start + offset); main_lde.get(row, col) }) @@ -72,7 +74,7 @@ where .collect(); let next: Vec<_> = (0..main_lde.width()) .map(|col| { - SC::PackedVal::from_fn(|offset| { + PackedVal::::from_fn(|offset| { let row = wrap(i_next_start + offset); main_lde.get(row, col) }) @@ -82,8 +84,8 @@ where let perm_local: Vec<_> = (0..permutation_lde.width()) .step_by(ext_degree) .map(|col| { - SC::PackedChallenge::from_base_fn(|i| { - SC::PackedVal::from_fn(|offset| { + PackedChallenge::::from_base_fn(|i| { + PackedVal::::from_fn(|offset| { let row = wrap(i_local_start + offset); permutation_lde.get(row, col + i) }) @@ -94,8 +96,8 @@ where let perm_next: Vec<_> = (0..permutation_lde.width()) .step_by(ext_degree) .map(|col| { - SC::PackedChallenge::from_base_fn(|i| { - SC::PackedVal::from_fn(|offset| { + PackedChallenge::::from_base_fn(|i| { + PackedVal::::from_fn(|offset| { let row = wrap(i_next_start + offset); permutation_lde.get(row, col + i) }) @@ -103,7 +105,7 @@ where }) .collect(); - let accumulator = SC::PackedChallenge::zero(); + let accumulator = PackedChallenge::::zero(); let mut folder = ProverConstraintFolder { preprocessed: TwoRowMatrixView { local: &[], @@ -128,11 +130,11 @@ where chip.eval(&mut folder); // quotient(x) = constraints(x) / Z_H(x) - let zerofier_inv: SC::PackedVal = zerofier_on_coset.eval_inverse_packed(i_local_start); + let zerofier_inv: PackedVal = zerofier_on_coset.eval_inverse_packed(i_local_start); let quotient = folder.accumulator * zerofier_inv; // "Transpose" D packed base coefficients into WIDTH scalar extension coefficients. - (0..SC::PackedVal::WIDTH).map(move |idx_in_packing| { + (0..PackedVal::::WIDTH).map(move |idx_in_packing| { let quotient_value = (0..>::D) .map(|coeff_idx| quotient.as_base_slice()[coeff_idx].as_slice()[idx_in_packing]) .collect::>(); diff --git a/core/src/stark/types.rs b/core/src/stark/types.rs index c55ee198ff..76acae660f 100644 --- a/core/src/stark/types.rs +++ b/core/src/stark/types.rs @@ -6,6 +6,8 @@ use std::{ use bincode::{deserialize_from, Error}; use p3_air::TwoRowMatrixView; use p3_commit::{OpenedValues, Pcs}; +use p3_field::ExtensionField; +use p3_field::Field; use p3_matrix::dense::RowMajorMatrix; use size::Size; @@ -15,6 +17,10 @@ use tracing::trace; use super::StarkGenericConfig; pub type Val = ::Val; +pub type PackedVal = <::Val as Field>::Packing; +pub type PackedChallenge = <::Challenge as ExtensionField< + ::Val, +>>::ExtensionPacking; pub type OpeningProof = <::Pcs as Pcs, ValMat>>::Proof; pub type OpeningError = <::Pcs as Pcs, ValMat>>::Error; pub type Challenge = ::Challenge; diff --git a/core/src/utils/prove.rs b/core/src/utils/prove.rs index 23fb9326cd..7286cf17db 100644 --- a/core/src/utils/prove.rs +++ b/core/src/utils/prove.rs @@ -16,9 +16,7 @@ use size::Size; pub trait StarkUtils: StarkGenericConfig { type UniConfig: p3_uni_stark::StarkGenericConfig< Val = Self::Val, - PackedVal = Self::PackedVal, Challenge = Self::Challenge, - PackedChallenge = Self::PackedChallenge, Pcs = Self::Pcs, Challenger = Self::Challenger, >; @@ -137,7 +135,7 @@ where SC: StarkUtils, A: Air> + for<'a> Air> - + for<'a> Air>, + + for<'a> Air>, { p3_uni_stark::prove(config.uni_stark_config(), air, challenger, trace) } @@ -152,7 +150,7 @@ where SC: StarkUtils, A: Air> + for<'a> Air> - + for<'a> Air>, + + for<'a> Air>, { p3_uni_stark::verify(config.uni_stark_config(), air, challenger, proof) } @@ -182,9 +180,8 @@ pub(super) mod baby_bear_poseidon2 { use super::StarkUtils; pub type Val = BabyBear; - pub type Domain = Val; + pub type Challenge = BinomialExtensionField; - pub type PackedChallenge = BinomialExtensionField<::Packing, 4>; pub type Perm = Poseidon2; pub type MyHash = PaddingFreeSponge; @@ -271,10 +268,8 @@ pub(super) mod baby_bear_poseidon2 { impl StarkGenericConfig for BabyBearPoseidon2 { type Val = Val; type Challenge = Challenge; - type PackedChallenge = PackedChallenge; type Pcs = Pcs; type Challenger = Challenger; - type PackedVal = ::Packing; fn pcs(&self) -> &Self::Pcs { &self.pcs @@ -284,10 +279,8 @@ pub(super) mod baby_bear_poseidon2 { impl p3_uni_stark::StarkGenericConfig for BabyBearPoseidon2 { type Val = Val; type Challenge = Challenge; - type PackedChallenge = PackedChallenge; type Pcs = Pcs; type Challenger = Challenger; - type PackedVal = ::Packing; fn pcs(&self) -> &Self::Pcs { &self.pcs @@ -302,7 +295,7 @@ pub(super) mod baby_bear_keccak { use p3_challenger::DuplexChallenger; use p3_commit::ExtensionMmcs; use p3_dft::Radix2DitParallel; - use p3_field::{extension::BinomialExtensionField, Field}; + use p3_field::extension::BinomialExtensionField; use p3_fri::{FriConfig, TwoAdicFriPcs, TwoAdicFriPcsConfig}; use p3_keccak::Keccak256Hash; use p3_merkle_tree::FieldMerkleTreeMmcs; @@ -315,9 +308,8 @@ pub(super) mod baby_bear_keccak { use super::StarkUtils; pub type Val = BabyBear; - pub type Domain = Val; + pub type Challenge = BinomialExtensionField; - pub type PackedChallenge = BinomialExtensionField<::Packing, 4>; pub type Perm = Poseidon2; type MyHash = SerializingHasher32; @@ -404,10 +396,8 @@ pub(super) mod baby_bear_keccak { impl StarkGenericConfig for BabyBearKeccak { type Val = Val; type Challenge = Challenge; - type PackedChallenge = PackedChallenge; type Pcs = Pcs; type Challenger = Challenger; - type PackedVal = ::Packing; fn pcs(&self) -> &Self::Pcs { &self.pcs @@ -417,10 +407,8 @@ pub(super) mod baby_bear_keccak { impl p3_uni_stark::StarkGenericConfig for BabyBearKeccak { type Val = Val; type Challenge = Challenge; - type PackedChallenge = PackedChallenge; type Pcs = Pcs; type Challenger = Challenger; - type PackedVal = ::Packing; fn pcs(&self) -> &Self::Pcs { &self.pcs @@ -436,7 +424,7 @@ pub(super) mod baby_bear_blake3 { use p3_challenger::DuplexChallenger; use p3_commit::ExtensionMmcs; use p3_dft::Radix2DitParallel; - use p3_field::{extension::BinomialExtensionField, Field}; + use p3_field::extension::BinomialExtensionField; use p3_fri::{FriConfig, TwoAdicFriPcs, TwoAdicFriPcsConfig}; use p3_merkle_tree::FieldMerkleTreeMmcs; use p3_poseidon2::{DiffusionMatrixBabybear, Poseidon2}; @@ -448,9 +436,8 @@ pub(super) mod baby_bear_blake3 { use super::StarkUtils; pub type Val = BabyBear; - pub type Domain = Val; + pub type Challenge = BinomialExtensionField; - pub type PackedChallenge = BinomialExtensionField<::Packing, 4>; pub type Perm = Poseidon2; type MyHash = SerializingHasher32; @@ -540,10 +527,9 @@ pub(super) mod baby_bear_blake3 { impl StarkGenericConfig for BabyBearBlake3 { type Val = Val; type Challenge = Challenge; - type PackedChallenge = PackedChallenge; + type Pcs = Pcs; type Challenger = Challenger; - type PackedVal = ::Packing; fn pcs(&self) -> &Self::Pcs { &self.pcs @@ -553,10 +539,9 @@ pub(super) mod baby_bear_blake3 { impl p3_uni_stark::StarkGenericConfig for BabyBearBlake3 { type Val = Val; type Challenge = Challenge; - type PackedChallenge = PackedChallenge; + type Pcs = Pcs; type Challenger = Challenger; - type PackedVal = ::Packing; fn pcs(&self) -> &Self::Pcs { &self.pcs diff --git a/examples/chess/script/Cargo.lock b/examples/chess/script/Cargo.lock index 4e308e181c..a86d8cf486 100644 --- a/examples/chess/script/Cargo.lock +++ b/examples/chess/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/ed25519/script/Cargo.lock b/examples/ed25519/script/Cargo.lock index 134d78e975..c79f671ba8 100644 --- a/examples/ed25519/script/Cargo.lock +++ b/examples/ed25519/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/fibonacci-io/script/Cargo.lock b/examples/fibonacci-io/script/Cargo.lock index bfeb161f7b..837fd8274a 100644 --- a/examples/fibonacci-io/script/Cargo.lock +++ b/examples/fibonacci-io/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/fibonacci/script/Cargo.lock b/examples/fibonacci/script/Cargo.lock index 2cfae5f252..b73483a79e 100644 --- a/examples/fibonacci/script/Cargo.lock +++ b/examples/fibonacci/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/io/script/Cargo.lock b/examples/io/script/Cargo.lock index f57d907edd..84423828a7 100644 --- a/examples/io/script/Cargo.lock +++ b/examples/io/script/Cargo.lock @@ -834,7 +834,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -843,7 +843,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -853,7 +853,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -862,7 +862,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -873,7 +873,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -884,7 +884,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -895,7 +895,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -906,7 +906,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -924,7 +924,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -935,7 +935,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -945,7 +945,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -954,7 +954,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -966,7 +966,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -986,7 +986,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1002,7 +1002,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1018,7 +1018,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1033,7 +1033,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1047,7 +1047,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1056,7 +1056,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1074,7 +1074,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/json/script/Cargo.lock b/examples/json/script/Cargo.lock index 035ff4d4b1..0c616ec116 100644 --- a/examples/json/script/Cargo.lock +++ b/examples/json/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/regex/script/Cargo.lock b/examples/regex/script/Cargo.lock index ec7dbbc7b4..bb2313cd7f 100644 --- a/examples/regex/script/Cargo.lock +++ b/examples/regex/script/Cargo.lock @@ -826,7 +826,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -835,7 +835,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -865,7 +865,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -927,7 +927,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -946,7 +946,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -994,7 +994,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1010,7 +1010,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1066,7 +1066,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/rsa/script/Cargo.lock b/examples/rsa/script/Cargo.lock index ec7dbbc7b4..bb2313cd7f 100644 --- a/examples/rsa/script/Cargo.lock +++ b/examples/rsa/script/Cargo.lock @@ -826,7 +826,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -835,7 +835,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -865,7 +865,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -927,7 +927,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -946,7 +946,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -994,7 +994,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1010,7 +1010,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1066,7 +1066,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/ssz-withdrawals/script/Cargo.lock b/examples/ssz-withdrawals/script/Cargo.lock index c68c7eaf5d..ed28abcd5d 100644 --- a/examples/ssz-withdrawals/script/Cargo.lock +++ b/examples/ssz-withdrawals/script/Cargo.lock @@ -826,7 +826,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -835,7 +835,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -865,7 +865,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -927,7 +927,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -946,7 +946,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -994,7 +994,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1010,7 +1010,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1066,7 +1066,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] diff --git a/examples/tendermint/script/Cargo.lock b/examples/tendermint/script/Cargo.lock index 02ebad6d73..eb0f354d8f 100644 --- a/examples/tendermint/script/Cargo.lock +++ b/examples/tendermint/script/Cargo.lock @@ -826,7 +826,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -835,7 +835,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "rand", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "blake3", "p3-symmetric", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -865,7 +865,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-challenger", "p3-field", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-util", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-challenger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-util", @@ -927,7 +927,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-matrix", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -946,7 +946,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-air", "p3-field", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "rayon", ] @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-dft", @@ -994,7 +994,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-commit", @@ -1010,7 +1010,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-dft", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "p3-baby-bear", "p3-field", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-field", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "itertools", "p3-air", @@ -1066,7 +1066,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git#cfbf9583a02d16f9523051e0ae9840ab9d228aac" +source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" dependencies = [ "serde", ] From 4e9e1bf4405bc6c92a3327a74648315d378aad26 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Tue, 20 Feb 2024 15:58:39 -0800 Subject: [PATCH 08/19] rm graph --- core/src/stark/machine.rs | 63 +-------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index 0de8fd4e9f..54c54c28f9 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -1,9 +1,6 @@ -use std::collections::HashMap; -use std::collections::HashSet; use std::marker::PhantomData; use crate::air::MachineAir; -use crate::lookup::InteractionKind; use crate::runtime::ExecutionRecord; use crate::runtime::Program; use crate::runtime::ShardingConfig; @@ -11,9 +8,6 @@ use p3_challenger::CanObserve; use p3_field::AbstractField; use p3_field::Field; use p3_field::PrimeField32; -use petgraph::algo::toposort; -use petgraph::prelude::GraphMap; -use petgraph::Directed; use super::Chip; use super::ChipRef; @@ -59,66 +53,11 @@ where // track of which chips receive events from which other chips. // First, get all the chips associated with this machine. - let mut chips = RiscvAir::get_all() + let chips = RiscvAir::get_all() .into_iter() .map(Chip::new) .collect::>(); - let mut node_map: HashMap = HashMap::new(); - for (i, chip) in chips.iter().enumerate() { - node_map.insert(chip.name(), i); - } - - // Create a map of interactions to chips that receive them. - let mut interaction_receive_map = HashMap::new(); - for kind in InteractionKind::all_kinds() { - interaction_receive_map.insert(kind, HashSet::new()); - } - - for (i, chip) in chips.iter().enumerate() { - for rec in chip.receives().iter() { - // Don't add memory interactions to the map, since the memory table is completely - // virtual and doesn't correspond to any chip. - if rec.kind == InteractionKind::Memory { - continue; - } - // Add the chip to the set of chips that receive this interaction. - interaction_receive_map - .get_mut(&rec.kind) - .unwrap() - .insert(i); - } - } - - // Create a directed graph of chip dependencies. - let mut deps = GraphMap::::new(); - // Add a node for each chip. - for (i, chip) in chips.iter().enumerate() { - deps.add_node(i); - // For each interaction being sent, add an edge to the chips that receive it. - for send in chip.sends().iter() { - for other in interaction_receive_map - .get(&send.kind) - .expect("No chips receives this interaction") - { - deps.add_edge(i, *other, 1); - } - } - } - - // Remove self loops. - for i in 0..chips.len() { - deps.remove_edge(i, i); - } - - // Get a topological sorting of the graph, throwing a panic if there are cycles. - let sorted_indices = toposort(&deps, None).expect("Cycle in chip dependencies"); - - let sorting_key = - |index: &usize| -> usize { sorted_indices.iter().position(|x| x == index).unwrap() }; - - // chips.sort_by_key(|chip| sorting_key(&node_map[&chip.name()])); - Self { config, chips } } From f692d6c91207404c51c8790bbf5484cce98c09cb Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Tue, 20 Feb 2024 16:14:30 -0800 Subject: [PATCH 09/19] back to main --- Cargo.lock | 60 +++++++++++++----------------- Cargo.toml | 38 +++++++++---------- examples/chess/script/Cargo.lock | 42 ++++++++++----------- examples/ed25519/script/Cargo.lock | 42 ++++++++++----------- 4 files changed, 86 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0896b4057..eca66833e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -257,11 +257,10 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730" dependencies = [ - "jobserver", "libc", ] @@ -1099,15 +1098,6 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.68" @@ -1416,7 +1406,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -1425,7 +1415,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -1435,7 +1425,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -1444,7 +1434,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -1455,7 +1445,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -1466,7 +1456,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -1477,7 +1467,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools 0.12.1", "p3-util", @@ -1488,7 +1478,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools 0.12.1", "p3-challenger", @@ -1506,7 +1496,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -1517,7 +1507,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -1527,7 +1517,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -1536,7 +1526,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -1548,7 +1538,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -1560,7 +1550,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -1568,7 +1558,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1584,7 +1574,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools 0.12.1", "p3-commit", @@ -1600,7 +1590,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools 0.12.1", "p3-dft", @@ -1615,7 +1605,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1629,7 +1619,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools 0.12.1", "p3-field", @@ -1638,7 +1628,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools 0.12.1", "p3-air", @@ -1656,7 +1646,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#0993f00ccfc7fc42c4dae0853e78aed7ecb7766d" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] @@ -2505,9 +2495,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index b83729c5a3..fdab5b226d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,22 +15,22 @@ debug = true debug-assertions = true [workspace.dependencies] -p3-air = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-field = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-commit = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-matrix = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-baby-bear = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-util = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-challenger = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-dft = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-fri = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-goldilocks = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-keccak = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-keccak-air = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-blake3 = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-mds = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-merkle-tree = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-poseidon2 = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-symmetric = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-uni-stark = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } -p3-maybe-rayon = { git = "https://github.com/succinctlabs/plonky3.git", branch = "tamir/update" } +p3-air = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-field = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-commit = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-matrix = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-baby-bear = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-util = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-challenger = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-dft = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-fri = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-goldilocks = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-keccak = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-keccak-air = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-blake3 = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-mds = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-merkle-tree = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-poseidon2 = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-symmetric = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-uni-stark = { git = "https://github.com/succinctlabs/plonky3.git" } +p3-maybe-rayon = { git = "https://github.com/succinctlabs/plonky3.git" } diff --git a/examples/chess/script/Cargo.lock b/examples/chess/script/Cargo.lock index a86d8cf486..844b37bc21 100644 --- a/examples/chess/script/Cargo.lock +++ b/examples/chess/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] diff --git a/examples/ed25519/script/Cargo.lock b/examples/ed25519/script/Cargo.lock index c79f671ba8..53d0abe902 100644 --- a/examples/ed25519/script/Cargo.lock +++ b/examples/ed25519/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] From 232832ec1a94c6ad251f08567761cfef0b7f6386 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Tue, 20 Feb 2024 16:14:55 -0800 Subject: [PATCH 10/19] cargo update --- examples/fibonacci-io/script/Cargo.lock | 42 ++++++++++++------------- examples/fibonacci/script/Cargo.lock | 42 ++++++++++++------------- examples/io/script/Cargo.lock | 42 ++++++++++++------------- examples/json/script/Cargo.lock | 42 ++++++++++++------------- 4 files changed, 84 insertions(+), 84 deletions(-) diff --git a/examples/fibonacci-io/script/Cargo.lock b/examples/fibonacci-io/script/Cargo.lock index 837fd8274a..66fa4edde7 100644 --- a/examples/fibonacci-io/script/Cargo.lock +++ b/examples/fibonacci-io/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] diff --git a/examples/fibonacci/script/Cargo.lock b/examples/fibonacci/script/Cargo.lock index b73483a79e..c990196772 100644 --- a/examples/fibonacci/script/Cargo.lock +++ b/examples/fibonacci/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] diff --git a/examples/io/script/Cargo.lock b/examples/io/script/Cargo.lock index 84423828a7..8a7d9901b8 100644 --- a/examples/io/script/Cargo.lock +++ b/examples/io/script/Cargo.lock @@ -834,7 +834,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -843,7 +843,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -853,7 +853,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -862,7 +862,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -873,7 +873,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -884,7 +884,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -895,7 +895,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -906,7 +906,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -924,7 +924,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -935,7 +935,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -945,7 +945,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -954,7 +954,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -966,7 +966,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -986,7 +986,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1002,7 +1002,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1018,7 +1018,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1033,7 +1033,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1047,7 +1047,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1056,7 +1056,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1074,7 +1074,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] diff --git a/examples/json/script/Cargo.lock b/examples/json/script/Cargo.lock index 0c616ec116..e81e07e502 100644 --- a/examples/json/script/Cargo.lock +++ b/examples/json/script/Cargo.lock @@ -833,7 +833,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -894,7 +894,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -934,7 +934,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -944,7 +944,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -977,7 +977,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1032,7 +1032,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] From 7619530d3016f6b3d87cb97ad6c92d3e7177c374 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Tue, 20 Feb 2024 16:15:13 -0800 Subject: [PATCH 11/19] cargo update --- examples/regex/script/Cargo.lock | 42 +++++++++++----------- examples/rsa/script/Cargo.lock | 42 +++++++++++----------- examples/ssz-withdrawals/script/Cargo.lock | 42 +++++++++++----------- 3 files changed, 63 insertions(+), 63 deletions(-) diff --git a/examples/regex/script/Cargo.lock b/examples/regex/script/Cargo.lock index bb2313cd7f..d18b34cabb 100644 --- a/examples/regex/script/Cargo.lock +++ b/examples/regex/script/Cargo.lock @@ -826,7 +826,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -835,7 +835,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -865,7 +865,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -927,7 +927,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -946,7 +946,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -994,7 +994,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1010,7 +1010,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1066,7 +1066,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] diff --git a/examples/rsa/script/Cargo.lock b/examples/rsa/script/Cargo.lock index bb2313cd7f..d18b34cabb 100644 --- a/examples/rsa/script/Cargo.lock +++ b/examples/rsa/script/Cargo.lock @@ -826,7 +826,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -835,7 +835,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -865,7 +865,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -927,7 +927,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -946,7 +946,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -994,7 +994,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1010,7 +1010,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1066,7 +1066,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] diff --git a/examples/ssz-withdrawals/script/Cargo.lock b/examples/ssz-withdrawals/script/Cargo.lock index ed28abcd5d..eeaa5d46b7 100644 --- a/examples/ssz-withdrawals/script/Cargo.lock +++ b/examples/ssz-withdrawals/script/Cargo.lock @@ -826,7 +826,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -835,7 +835,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -865,7 +865,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -927,7 +927,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -946,7 +946,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -994,7 +994,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1010,7 +1010,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1066,7 +1066,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] From 8222c6bf4ff5b759897bc4afa9f539f279bb3798 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Tue, 20 Feb 2024 16:15:23 -0800 Subject: [PATCH 12/19] c up --- examples/tendermint/script/Cargo.lock | 42 +++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/examples/tendermint/script/Cargo.lock b/examples/tendermint/script/Cargo.lock index eb0f354d8f..ec132d58b6 100644 --- a/examples/tendermint/script/Cargo.lock +++ b/examples/tendermint/script/Cargo.lock @@ -826,7 +826,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p3-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -835,7 +835,7 @@ dependencies = [ [[package]] name = "p3-baby-bear" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "rand", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "p3-blake3" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "blake3", "p3-symmetric", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "p3-challenger" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -865,7 +865,7 @@ dependencies = [ [[package]] name = "p3-commit" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-challenger", "p3-field", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "p3-dft" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "p3-field" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-util", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "p3-fri" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-challenger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "p3-goldilocks" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-util", @@ -927,7 +927,7 @@ dependencies = [ [[package]] name = "p3-interpolation" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-matrix", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "p3-keccak" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-symmetric", "tiny-keccak", @@ -946,7 +946,7 @@ dependencies = [ [[package]] name = "p3-keccak-air" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-air", "p3-field", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "p3-matrix" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "rayon", ] @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "p3-mds" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-dft", @@ -994,7 +994,7 @@ dependencies = [ [[package]] name = "p3-merkle-tree" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-commit", @@ -1010,7 +1010,7 @@ dependencies = [ [[package]] name = "p3-mersenne-31" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-dft", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "p3-poseidon2" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "p3-baby-bear", "p3-field", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "p3-symmetric" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-field", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "p3-uni-stark" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "itertools", "p3-air", @@ -1066,7 +1066,7 @@ dependencies = [ [[package]] name = "p3-util" version = "0.1.0" -source = "git+https://github.com/succinctlabs/plonky3.git?branch=tamir/update#e8af3cb5093704560bf5b8f0e8752377d506160c" +source = "git+https://github.com/succinctlabs/plonky3.git#b6f8bb0b6e7034090af3cea816bfd4e95f7f34a2" dependencies = [ "serde", ] From 2eeefa6b7aeddcfd04428b4b59d04dc114db74bb Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Tue, 20 Feb 2024 16:20:48 -0800 Subject: [PATCH 13/19] checkpoint --- core/src/stark/machine.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index 54c54c28f9..daf60661b5 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -22,11 +22,11 @@ pub type RiscvChip = Chip<::Val, RiscvAir<::Val>>; /// A STARK for proving RISC-V execution. -pub struct RiscvStark { +pub struct RiscvStark::Val>> { /// The STARK settings for the RISC-V STARK. config: SC, /// The chips that make up the RISC-V STARK machine, in order of their execution. - chips: Vec>, + chips: Vec>, } #[derive(Debug, Clone)] From 467674d59e56c91763fd17fc76035198e0b84fac Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Tue, 20 Feb 2024 20:01:10 -0800 Subject: [PATCH 14/19] checkpoint --- core/src/air/machine.rs | 31 ++++++++++ core/src/stark/air.rs | 124 +++++++++++++++++++-------------------- core/src/stark/prover.rs | 3 +- derive/src/air.rs | 1 + derive/src/lib.rs | 47 +++++++++++++++ 5 files changed, 143 insertions(+), 63 deletions(-) create mode 100644 derive/src/air.rs diff --git a/core/src/air/machine.rs b/core/src/air/machine.rs index 297a22a34e..ceadbb0aa9 100644 --- a/core/src/air/machine.rs +++ b/core/src/air/machine.rs @@ -1,6 +1,8 @@ use p3_air::BaseAir; use p3_field::Field; use p3_matrix::dense::RowMajorMatrix; +use core::marker::PhantomData; +use p3_air::{AirBuilder, Air}; use crate::runtime::{ExecutionRecord, Program}; @@ -30,3 +32,32 @@ pub trait MachineAir: BaseAir { None } } + + + +// Implement the trait for PhantomData to allow for a default implementation. + +impl BaseAir for PhantomData { + fn width(&self) -> usize { + 0 + } + + fn preprocessed_trace(&self) -> Option> { + None + } +} + + +impl MachineAir for PhantomData { + fn name(&self) -> String { + "".to_string() + } + + fn generate_trace( + &self, + _input: &ExecutionRecord, + _output: &mut ExecutionRecord, + ) -> RowMajorMatrix { + unreachable!() + } +} \ No newline at end of file diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs index 03fcadc2fc..3799839122 100644 --- a/core/src/stark/air.rs +++ b/core/src/stark/air.rs @@ -5,7 +5,6 @@ pub use crate::air::SP1AirBuilder; use crate::memory::MemoryChipKind; use crate::runtime::ExecutionRecord; use p3_air::Air; -use p3_air::BaseAir; use p3_field::PrimeField32; pub use riscv_chips::*; @@ -39,7 +38,8 @@ pub(crate) mod riscv_chips { pub use crate::utils::ec::weierstrass::SWCurve; } -pub enum RiscvAir { +#[derive(sp1_derive::MachineAir)] +pub enum RiscvAir { /// An AIR that containts a preprocessed program table and a lookup for the instructions. Program(ProgramChip), /// An AIR for the RISC-V CPU. Each row represents a cpu cycle. @@ -196,67 +196,67 @@ impl core::hash::Hash for RiscvAir { } } -impl BaseAir for RiscvAir { - fn width(&self) -> usize { - match self { - RiscvAir::Program(p) => BaseAir::::width(p), - RiscvAir::Cpu(c) => BaseAir::::width(c), - RiscvAir::Add(a) => BaseAir::::width(a), - RiscvAir::Sub(s) => BaseAir::::width(s), - RiscvAir::Bitwise(b) => BaseAir::::width(b), - RiscvAir::Mul(m) => BaseAir::::width(m), - RiscvAir::DivRem(d) => BaseAir::::width(d), - RiscvAir::Lt(l) => BaseAir::::width(l), - RiscvAir::ShiftLeft(sl) => BaseAir::::width(sl), - RiscvAir::ShiftRight(sr) => BaseAir::::width(sr), - RiscvAir::ByteLookup(b) => BaseAir::::width(b), - RiscvAir::FieldLTU(f) => BaseAir::::width(f), - RiscvAir::MemoryInit(m) => BaseAir::::width(m), - RiscvAir::MemoryFinal(m) => BaseAir::::width(m), - RiscvAir::ProgramMemory(m) => BaseAir::::width(m), - RiscvAir::ShaExtend(s) => BaseAir::::width(s), - RiscvAir::ShaCompress(s) => BaseAir::::width(s), - RiscvAir::Ed25519Add(a) => BaseAir::::width(a), - RiscvAir::Ed25519Decompress(d) => BaseAir::::width(d), - RiscvAir::K256Decompress(d) => BaseAir::::width(d), - RiscvAir::Secp256k1Add(a) => BaseAir::::width(a), - RiscvAir::Secp256k1Double(d) => BaseAir::::width(d), - RiscvAir::KeccakP(p) => BaseAir::::width(p), - RiscvAir::Blake3Compress(c) => BaseAir::::width(c), - RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), - } - } +// impl BaseAir for RiscvAir { +// fn width(&self) -> usize { +// match self { +// RiscvAir::Program(p) => BaseAir::::width(p), +// RiscvAir::Cpu(c) => BaseAir::::width(c), +// RiscvAir::Add(a) => BaseAir::::width(a), +// RiscvAir::Sub(s) => BaseAir::::width(s), +// RiscvAir::Bitwise(b) => BaseAir::::width(b), +// RiscvAir::Mul(m) => BaseAir::::width(m), +// RiscvAir::DivRem(d) => BaseAir::::width(d), +// RiscvAir::Lt(l) => BaseAir::::width(l), +// RiscvAir::ShiftLeft(sl) => BaseAir::::width(sl), +// RiscvAir::ShiftRight(sr) => BaseAir::::width(sr), +// RiscvAir::ByteLookup(b) => BaseAir::::width(b), +// RiscvAir::FieldLTU(f) => BaseAir::::width(f), +// RiscvAir::MemoryInit(m) => BaseAir::::width(m), +// RiscvAir::MemoryFinal(m) => BaseAir::::width(m), +// RiscvAir::ProgramMemory(m) => BaseAir::::width(m), +// RiscvAir::ShaExtend(s) => BaseAir::::width(s), +// RiscvAir::ShaCompress(s) => BaseAir::::width(s), +// RiscvAir::Ed25519Add(a) => BaseAir::::width(a), +// RiscvAir::Ed25519Decompress(d) => BaseAir::::width(d), +// RiscvAir::K256Decompress(d) => BaseAir::::width(d), +// RiscvAir::Secp256k1Add(a) => BaseAir::::width(a), +// RiscvAir::Secp256k1Double(d) => BaseAir::::width(d), +// RiscvAir::KeccakP(p) => BaseAir::::width(p), +// RiscvAir::Blake3Compress(c) => BaseAir::::width(c), +// RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), +// } +// } - fn preprocessed_trace(&self) -> Option> { - match self { - RiscvAir::Program(p) => p.preprocessed_trace(), - RiscvAir::Cpu(c) => c.preprocessed_trace(), - RiscvAir::Add(a) => a.preprocessed_trace(), - RiscvAir::Sub(s) => s.preprocessed_trace(), - RiscvAir::Bitwise(b) => b.preprocessed_trace(), - RiscvAir::Mul(m) => m.preprocessed_trace(), - RiscvAir::DivRem(d) => d.preprocessed_trace(), - RiscvAir::Lt(l) => l.preprocessed_trace(), - RiscvAir::ShiftLeft(sl) => sl.preprocessed_trace(), - RiscvAir::ShiftRight(sr) => sr.preprocessed_trace(), - RiscvAir::ByteLookup(b) => b.preprocessed_trace(), - RiscvAir::FieldLTU(f) => f.preprocessed_trace(), - RiscvAir::MemoryInit(m) => m.preprocessed_trace(), - RiscvAir::MemoryFinal(m) => m.preprocessed_trace(), - RiscvAir::ProgramMemory(m) => m.preprocessed_trace(), - RiscvAir::ShaExtend(s) => s.preprocessed_trace(), - RiscvAir::ShaCompress(s) => s.preprocessed_trace(), - RiscvAir::Ed25519Add(a) => a.preprocessed_trace(), - RiscvAir::Ed25519Decompress(d) => d.preprocessed_trace(), - RiscvAir::K256Decompress(d) => d.preprocessed_trace(), - RiscvAir::Secp256k1Add(a) => a.preprocessed_trace(), - RiscvAir::Secp256k1Double(d) => d.preprocessed_trace(), - RiscvAir::KeccakP(p) => p.preprocessed_trace(), - RiscvAir::Blake3Compress(c) => c.preprocessed_trace(), - RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), - } - } -} +// fn preprocessed_trace(&self) -> Option> { +// match self { +// RiscvAir::Program(p) => p.preprocessed_trace(), +// RiscvAir::Cpu(c) => c.preprocessed_trace(), +// RiscvAir::Add(a) => a.preprocessed_trace(), +// RiscvAir::Sub(s) => s.preprocessed_trace(), +// RiscvAir::Bitwise(b) => b.preprocessed_trace(), +// RiscvAir::Mul(m) => m.preprocessed_trace(), +// RiscvAir::DivRem(d) => d.preprocessed_trace(), +// RiscvAir::Lt(l) => l.preprocessed_trace(), +// RiscvAir::ShiftLeft(sl) => sl.preprocessed_trace(), +// RiscvAir::ShiftRight(sr) => sr.preprocessed_trace(), +// RiscvAir::ByteLookup(b) => b.preprocessed_trace(), +// RiscvAir::FieldLTU(f) => f.preprocessed_trace(), +// RiscvAir::MemoryInit(m) => m.preprocessed_trace(), +// RiscvAir::MemoryFinal(m) => m.preprocessed_trace(), +// RiscvAir::ProgramMemory(m) => m.preprocessed_trace(), +// RiscvAir::ShaExtend(s) => s.preprocessed_trace(), +// RiscvAir::ShaCompress(s) => s.preprocessed_trace(), +// RiscvAir::Ed25519Add(a) => a.preprocessed_trace(), +// RiscvAir::Ed25519Decompress(d) => d.preprocessed_trace(), +// RiscvAir::K256Decompress(d) => d.preprocessed_trace(), +// RiscvAir::Secp256k1Add(a) => a.preprocessed_trace(), +// RiscvAir::Secp256k1Double(d) => d.preprocessed_trace(), +// RiscvAir::KeccakP(p) => p.preprocessed_trace(), +// RiscvAir::Blake3Compress(c) => c.preprocessed_trace(), +// RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), +// } +// } +// } impl MachineAir for RiscvAir { fn name(&self) -> String { diff --git a/core/src/stark/prover.rs b/core/src/stark/prover.rs index a2c78e528e..55b1ff24f6 100644 --- a/core/src/stark/prover.rs +++ b/core/src/stark/prover.rs @@ -34,7 +34,8 @@ pub trait Prover { pk: &ProvingKey, shards: &[ExecutionRecord], challenger: &mut SC::Challenger, - ) -> Proof; + ) -> Proof + where SC::Val: PrimeField32; } impl Prover for LocalProver diff --git a/derive/src/air.rs b/derive/src/air.rs new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/derive/src/air.rs @@ -0,0 +1 @@ + diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 89e9954887..2aafc86b66 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -27,8 +27,11 @@ extern crate proc_macro; use proc_macro::TokenStream; use quote::quote; use syn::parse_macro_input; +use syn::Data; use syn::ItemFn; +mod air; + #[proc_macro_derive(AlignedBorrow)] pub fn aligned_borrow_derive(input: TokenStream) -> TokenStream { let ast: syn::DeriveInput = syn::parse(input).unwrap(); @@ -59,6 +62,50 @@ pub fn aligned_borrow_derive(input: TokenStream) -> TokenStream { methods.into() } +#[proc_macro_derive(MachineAir)] +pub fn machine_air_derive(input: TokenStream) -> TokenStream { + let ast: syn::DeriveInput = syn::parse(input).unwrap(); + + let name = &ast.ident; + let generics = &ast.generics; + + let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); + + match &ast.data { + Data::Struct(_) => unimplemented!("Structs are not supported yet"), + Data::Enum(e) => { + let variants = e.variants.iter().map(|variant| { + let variant_name = &variant.ident; + + let mut fields = variant.fields.iter(); + let field = fields.next().unwrap(); + assert!(fields.next().is_none(), "Only one field is supported"); + (variant_name, field) + }); + + let width_arms = variants.map(|(variant_name, field)| { + let field_ty = &field.ty; + quote! { + #name::#variant_name(x) => <#field_ty as p3_air::BaseAir>::width(x) + } + }); + + let result = quote! { + impl #impl_generics p3_air::BaseAir for #name #ty_generics #where_clause { + fn width(&self) -> usize { + match self { + #(#width_arms,)* + } + } + } + }; + + result.into() + } + Data::Union(_) => unimplemented!("Unions are not supported"), + } +} + #[proc_macro_attribute] pub fn cycle_tracker(_attr: TokenStream, item: TokenStream) -> TokenStream { let input = parse_macro_input!(item as ItemFn); From 975cb618a155d2c6d8d56d6e581c33e05ef7d879 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Wed, 21 Feb 2024 06:14:34 -0800 Subject: [PATCH 15/19] width --- core/src/air/machine.rs | 31 ------------------------------- core/src/bytes/air.rs | 4 ++-- core/src/bytes/mod.rs | 8 ++++---- core/src/bytes/trace.rs | 4 ++-- core/src/stark/air.rs | 14 ++------------ core/src/stark/types.rs | 4 +--- derive/Cargo.toml | 2 +- tests/keccak256/src/main.rs | 2 +- 8 files changed, 13 insertions(+), 56 deletions(-) diff --git a/core/src/air/machine.rs b/core/src/air/machine.rs index ceadbb0aa9..297a22a34e 100644 --- a/core/src/air/machine.rs +++ b/core/src/air/machine.rs @@ -1,8 +1,6 @@ use p3_air::BaseAir; use p3_field::Field; use p3_matrix::dense::RowMajorMatrix; -use core::marker::PhantomData; -use p3_air::{AirBuilder, Air}; use crate::runtime::{ExecutionRecord, Program}; @@ -32,32 +30,3 @@ pub trait MachineAir: BaseAir { None } } - - - -// Implement the trait for PhantomData to allow for a default implementation. - -impl BaseAir for PhantomData { - fn width(&self) -> usize { - 0 - } - - fn preprocessed_trace(&self) -> Option> { - None - } -} - - -impl MachineAir for PhantomData { - fn name(&self) -> String { - "".to_string() - } - - fn generate_trace( - &self, - _input: &ExecutionRecord, - _output: &mut ExecutionRecord, - ) -> RowMajorMatrix { - unreachable!() - } -} \ No newline at end of file diff --git a/core/src/bytes/air.rs b/core/src/bytes/air.rs index 40a0c96340..f85827134c 100644 --- a/core/src/bytes/air.rs +++ b/core/src/bytes/air.rs @@ -24,13 +24,13 @@ pub(crate) const BYTE_COL_MAP: ByteCols = make_col_map(); /// The multiplicity indices for each byte operation. pub(crate) const BYTE_MULT_INDICES: [usize; NUM_BYTE_OPS] = BYTE_COL_MAP.multiplicities; -impl BaseAir for ByteChip { +impl BaseAir for ByteChip { fn width(&self) -> usize { NUM_BYTE_COLS } } -impl Air for ByteChip { +impl Air for ByteChip { fn eval(&self, builder: &mut AB) { let main = builder.main(); let local: &ByteCols = main.row_slice(0).borrow(); diff --git a/core/src/bytes/mod.rs b/core/src/bytes/mod.rs index 7b60698357..0db7bd7f55 100644 --- a/core/src/bytes/mod.rs +++ b/core/src/bytes/mod.rs @@ -13,6 +13,7 @@ pub use event::ByteLookupEvent; use itertools::Itertools; use p3_field::Field; use p3_matrix::dense::RowMajorMatrix; +use std::marker::PhantomData; use self::columns::{ByteCols, NUM_BYTE_COLS}; use self::utils::shr_carry; @@ -26,17 +27,16 @@ pub const NUM_BYTE_OPS: usize = 9; /// The chip contains a preprocessed table of all possible byte operations. Other chips can then /// use lookups into this table to compute their own operations. #[derive(Debug, Clone, Copy, Default)] -pub struct ByteChip; +pub struct ByteChip(PhantomData); -impl ByteChip { +impl ByteChip { /// Creates the preprocessed byte trace and event map. /// /// This function returns a pair `(trace, map)`, where: /// - `trace` is a matrix containing all possible byte operations. /// - `map` is a map map from a byte lookup to the corresponding row it appears in the table and /// the index of the result in the array of multiplicities. - pub fn trace_and_map( - ) -> (RowMajorMatrix, BTreeMap) { + pub fn trace_and_map() -> (RowMajorMatrix, BTreeMap) { // A map from a byte lookup to its corresponding row in the table and index in the array of // multiplicities. let mut event_map = BTreeMap::new(); diff --git a/core/src/bytes/trace.rs b/core/src/bytes/trace.rs index 44ee49798a..b6c1dc45d1 100644 --- a/core/src/bytes/trace.rs +++ b/core/src/bytes/trace.rs @@ -6,7 +6,7 @@ use crate::{air::MachineAir, runtime::ExecutionRecord}; pub const NUM_ROWS: usize = 1 << 16; -impl MachineAir for ByteChip { +impl MachineAir for ByteChip { fn name(&self) -> String { "Byte".to_string() } @@ -16,7 +16,7 @@ impl MachineAir for ByteChip { input: &ExecutionRecord, _output: &mut ExecutionRecord, ) -> RowMajorMatrix { - let (mut trace, event_map) = ByteChip::trace_and_map::(); + let (mut trace, event_map) = ByteChip::trace_and_map(); for (lookup, mult) in input.byte_lookups.iter() { let (row, index) = event_map[lookup]; diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs index 3799839122..44cf9b65bb 100644 --- a/core/src/stark/air.rs +++ b/core/src/stark/air.rs @@ -1,5 +1,3 @@ -use std::marker::PhantomData; - use crate::air::MachineAir; pub use crate::air::SP1AirBuilder; use crate::memory::MemoryChipKind; @@ -39,7 +37,7 @@ pub(crate) mod riscv_chips { } #[derive(sp1_derive::MachineAir)] -pub enum RiscvAir { +pub enum RiscvAir { /// An AIR that containts a preprocessed program table and a lookup for the instructions. Program(ProgramChip), /// An AIR for the RISC-V CPU. Each row represents a cpu cycle. @@ -61,7 +59,7 @@ pub enum RiscvAir { /// An AIR for RISC-V SRL and SRA instruction. ShiftRight(ShiftRightChip), /// A lookup table for byte operations. - ByteLookup(ByteChip), + ByteLookup(ByteChip), /// An table for `less than` operation on field elements. FieldLTU(FieldLTUChip), /// A table for initializing the memory state. @@ -84,8 +82,6 @@ pub enum RiscvAir { KeccakP(KeccakPermuteChip), Blake3Compress(Blake3CompressInnerChip), - - _Unreachable(PhantomData), } impl RiscvAir { @@ -115,7 +111,6 @@ impl RiscvAir { RiscvAir::Secp256k1Double(_) => !shard.weierstrass_double_events.is_empty(), RiscvAir::KeccakP(_) => !shard.keccak_permute_events.is_empty(), RiscvAir::Blake3Compress(_) => !shard.blake3_compress_inner_events.is_empty(), - RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } @@ -285,7 +280,6 @@ impl MachineAir for RiscvAir { RiscvAir::Secp256k1Double(d) => MachineAir::::name(d), RiscvAir::KeccakP(p) => MachineAir::::name(p), RiscvAir::Blake3Compress(c) => MachineAir::::name(c), - RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } @@ -319,7 +313,6 @@ impl MachineAir for RiscvAir { RiscvAir::Secp256k1Double(d) => d.generate_trace(input, output), RiscvAir::KeccakP(p) => p.generate_trace(input, output), RiscvAir::Blake3Compress(c) => c.generate_trace(input, output), - RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } @@ -349,7 +342,6 @@ impl MachineAir for RiscvAir { RiscvAir::Secp256k1Double(d) => MachineAir::::preprocessed_width(d), RiscvAir::KeccakP(p) => MachineAir::::preprocessed_width(p), RiscvAir::Blake3Compress(c) => MachineAir::::preprocessed_width(c), - RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } @@ -382,7 +374,6 @@ impl MachineAir for RiscvAir { RiscvAir::Secp256k1Double(d) => d.generate_preprocessed_trace(program), RiscvAir::KeccakP(p) => p.generate_preprocessed_trace(program), RiscvAir::Blake3Compress(c) => c.generate_preprocessed_trace(program), - RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } } @@ -417,7 +408,6 @@ where RiscvAir::Secp256k1Double(d) => d.eval(builder), RiscvAir::KeccakP(p) => p.eval(builder), RiscvAir::Blake3Compress(c) => c.eval(builder), - RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), } } } diff --git a/core/src/stark/types.rs b/core/src/stark/types.rs index 91983c46ac..a35cd05113 100644 --- a/core/src/stark/types.rs +++ b/core/src/stark/types.rs @@ -18,9 +18,7 @@ use super::StarkGenericConfig; pub type Val = ::Val; pub type PackedVal = <::Val as Field>::Packing; -pub type PackedChallenge = <::Challenge as ExtensionField< - ::Val, ->>::ExtensionPacking; +pub type PackedChallenge = as ExtensionField>>::ExtensionPacking; pub type OpeningProof = <::Pcs as Pcs, ValMat>>::Proof; pub type OpeningError = <::Pcs as Pcs, ValMat>>::Error; pub type Challenge = ::Challenge; diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 089de420fb..b479cf8b38 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -11,4 +11,4 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" quote = "1.0" -syn = { version = "1.0", features = ["full"] } \ No newline at end of file +syn = { version = "1.0", features = ["full"] } diff --git a/tests/keccak256/src/main.rs b/tests/keccak256/src/main.rs index eb50354022..dd1198f307 100644 --- a/tests/keccak256/src/main.rs +++ b/tests/keccak256/src/main.rs @@ -5,7 +5,7 @@ use tiny_keccak::{Hasher, Keccak}; pub fn main() { let num_cases = sp1_zkvm::io::read::(); - for i in 0..num_cases { + for _ in 0..num_cases { let input = sp1_zkvm::io::read::>(); let mut hasher = Keccak::v256(); hasher.update(&input); From d87e2b1c451ec9871f8fc9736b10e5f0998c95f5 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Wed, 21 Feb 2024 08:47:29 -0800 Subject: [PATCH 16/19] complete derive macto --- core/src/air/machine.rs | 2 + core/src/stark/air.rs | 265 ++++----------------------------------- core/src/stark/prover.rs | 3 +- derive/src/air.rs | 1 - derive/src/lib.rs | 130 ++++++++++++++++--- 5 files changed, 144 insertions(+), 257 deletions(-) delete mode 100644 derive/src/air.rs diff --git a/core/src/air/machine.rs b/core/src/air/machine.rs index 297a22a34e..8345ce6178 100644 --- a/core/src/air/machine.rs +++ b/core/src/air/machine.rs @@ -4,6 +4,8 @@ use p3_matrix::dense::RowMajorMatrix; use crate::runtime::{ExecutionRecord, Program}; +pub use sp1_derive::MachineAir; + /// An AIR that is part of a Risc-V AIR arithmetization. pub trait MachineAir: BaseAir { /// A unique identifier for this AIR as part of a machine. diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs index 44cf9b65bb..dfb1caa6bf 100644 --- a/core/src/stark/air.rs +++ b/core/src/stark/air.rs @@ -2,11 +2,11 @@ use crate::air::MachineAir; pub use crate::air::SP1AirBuilder; use crate::memory::MemoryChipKind; use crate::runtime::ExecutionRecord; -use p3_air::Air; use p3_field::PrimeField32; pub use riscv_chips::*; +/// A module for importing all the different RISC-V chips. pub(crate) mod riscv_chips { pub use crate::alu::AddChip; pub use crate::alu::BitwiseChip; @@ -36,7 +36,12 @@ pub(crate) mod riscv_chips { pub use crate::utils::ec::weierstrass::SWCurve; } -#[derive(sp1_derive::MachineAir)] +/// An AIR for encoding RISC-V execution. +/// +/// This enum contains all the different AIRs that are used in the Sp1 RISC-V IOP. Each variant is +/// a different AIR that is used to encode a different part of the RISC-V execution, and the +/// different AIR variants have a joint lookup argument. +#[derive(MachineAir)] pub enum RiscvAir { /// An AIR that containts a preprocessed program table and a lookup for the instructions. Program(ProgramChip), @@ -68,19 +73,23 @@ pub enum RiscvAir { MemoryFinal(MemoryGlobalChip), /// A table for initializing the program memory. ProgramMemory(MemoryGlobalChip), - - ShaExtend(ShaExtendChip), - ShaCompress(ShaCompressChip), + /// A precompile for sha256 extend. + Sha256Extend(ShaExtendChip), + /// A precompile for sha256 compress. + Sha256Compress(ShaCompressChip), + /// A precompile for addition on the Elliptic curve ed25519. Ed25519Add(EdAddAssignChip>), + /// A precompile for decompressing a point on the Edwards curve ed25519. Ed25519Decompress(EdDecompressChip), - + /// A precompile for decompressing a point on the K256 curve. K256Decompress(K256DecompressChip), - + /// A precompile for addition on the Elliptic curve secp256k1. Secp256k1Add(WeierstrassAddAssignChip>), + /// A precompile for doubling a point on the Elliptic curve secp256k1. Secp256k1Double(WeierstrassDoubleAssignChip>), - + /// A precompile for the Keccak permutation. KeccakP(KeccakPermuteChip), - + /// A precompile for the Blake3 compression function. Blake3Compress(Blake3CompressInnerChip), } @@ -102,8 +111,8 @@ impl RiscvAir { RiscvAir::MemoryInit(_) => !shard.first_memory_record.is_empty(), RiscvAir::MemoryFinal(_) => !shard.last_memory_record.is_empty(), RiscvAir::ProgramMemory(_) => !shard.program_memory_record.is_empty(), - RiscvAir::ShaExtend(_) => !shard.sha_extend_events.is_empty(), - RiscvAir::ShaCompress(_) => !shard.sha_compress_events.is_empty(), + RiscvAir::Sha256Extend(_) => !shard.sha_extend_events.is_empty(), + RiscvAir::Sha256Compress(_) => !shard.sha_compress_events.is_empty(), RiscvAir::Ed25519Add(_) => !shard.ed_add_events.is_empty(), RiscvAir::Ed25519Decompress(_) => !shard.ed_decompress_events.is_empty(), RiscvAir::K256Decompress(_) => !shard.k256_decompress_events.is_empty(), @@ -114,19 +123,19 @@ impl RiscvAir { } } + /// Get all the different RISC-V AIRs. pub fn get_all() -> Vec { + // The order of the chips is important, as it is used to determine the order of trace + // generation. In the future, we will detect that order automatically. let mut chips = vec![]; - let cpu = CpuChip::default(); chips.push(RiscvAir::Cpu(cpu)); - let program = ProgramChip::default(); chips.push(RiscvAir::Program(program)); - let sha_extend = ShaExtendChip::default(); - chips.push(RiscvAir::ShaExtend(sha_extend)); + chips.push(RiscvAir::Sha256Extend(sha_extend)); let sha_compress = ShaCompressChip::default(); - chips.push(RiscvAir::ShaCompress(sha_compress)); + chips.push(RiscvAir::Sha256Compress(sha_compress)); let ed_add_assign = EdAddAssignChip::>::new(); chips.push(RiscvAir::Ed25519Add(ed_add_assign)); let ed_decompress = EdDecompressChip::::default(); @@ -143,7 +152,6 @@ impl RiscvAir { chips.push(RiscvAir::KeccakP(keccak_permute)); let blake3_compress_inner = Blake3CompressInnerChip::new(); chips.push(RiscvAir::Blake3Compress(blake3_compress_inner)); - let add = AddChip::default(); chips.push(RiscvAir::Add(add)); let sub = SubChip::default(); @@ -160,14 +168,12 @@ impl RiscvAir { chips.push(RiscvAir::ShiftLeft(shift_left)); let lt = LtChip::default(); chips.push(RiscvAir::Lt(lt)); - let memory_init = MemoryGlobalChip::new(MemoryChipKind::Init); chips.push(RiscvAir::MemoryInit(memory_init)); let memory_finalize = MemoryGlobalChip::new(MemoryChipKind::Finalize); chips.push(RiscvAir::MemoryFinal(memory_finalize)); let program_memory_init = MemoryGlobalChip::new(MemoryChipKind::Program); chips.push(RiscvAir::ProgramMemory(program_memory_init)); - let field_ltu = FieldLTUChip::default(); chips.push(RiscvAir::FieldLTU(field_ltu)); let byte = ByteChip::default(); @@ -190,224 +196,3 @@ impl core::hash::Hash for RiscvAir { self.name().hash(state); } } - -// impl BaseAir for RiscvAir { -// fn width(&self) -> usize { -// match self { -// RiscvAir::Program(p) => BaseAir::::width(p), -// RiscvAir::Cpu(c) => BaseAir::::width(c), -// RiscvAir::Add(a) => BaseAir::::width(a), -// RiscvAir::Sub(s) => BaseAir::::width(s), -// RiscvAir::Bitwise(b) => BaseAir::::width(b), -// RiscvAir::Mul(m) => BaseAir::::width(m), -// RiscvAir::DivRem(d) => BaseAir::::width(d), -// RiscvAir::Lt(l) => BaseAir::::width(l), -// RiscvAir::ShiftLeft(sl) => BaseAir::::width(sl), -// RiscvAir::ShiftRight(sr) => BaseAir::::width(sr), -// RiscvAir::ByteLookup(b) => BaseAir::::width(b), -// RiscvAir::FieldLTU(f) => BaseAir::::width(f), -// RiscvAir::MemoryInit(m) => BaseAir::::width(m), -// RiscvAir::MemoryFinal(m) => BaseAir::::width(m), -// RiscvAir::ProgramMemory(m) => BaseAir::::width(m), -// RiscvAir::ShaExtend(s) => BaseAir::::width(s), -// RiscvAir::ShaCompress(s) => BaseAir::::width(s), -// RiscvAir::Ed25519Add(a) => BaseAir::::width(a), -// RiscvAir::Ed25519Decompress(d) => BaseAir::::width(d), -// RiscvAir::K256Decompress(d) => BaseAir::::width(d), -// RiscvAir::Secp256k1Add(a) => BaseAir::::width(a), -// RiscvAir::Secp256k1Double(d) => BaseAir::::width(d), -// RiscvAir::KeccakP(p) => BaseAir::::width(p), -// RiscvAir::Blake3Compress(c) => BaseAir::::width(c), -// RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), -// } -// } - -// fn preprocessed_trace(&self) -> Option> { -// match self { -// RiscvAir::Program(p) => p.preprocessed_trace(), -// RiscvAir::Cpu(c) => c.preprocessed_trace(), -// RiscvAir::Add(a) => a.preprocessed_trace(), -// RiscvAir::Sub(s) => s.preprocessed_trace(), -// RiscvAir::Bitwise(b) => b.preprocessed_trace(), -// RiscvAir::Mul(m) => m.preprocessed_trace(), -// RiscvAir::DivRem(d) => d.preprocessed_trace(), -// RiscvAir::Lt(l) => l.preprocessed_trace(), -// RiscvAir::ShiftLeft(sl) => sl.preprocessed_trace(), -// RiscvAir::ShiftRight(sr) => sr.preprocessed_trace(), -// RiscvAir::ByteLookup(b) => b.preprocessed_trace(), -// RiscvAir::FieldLTU(f) => f.preprocessed_trace(), -// RiscvAir::MemoryInit(m) => m.preprocessed_trace(), -// RiscvAir::MemoryFinal(m) => m.preprocessed_trace(), -// RiscvAir::ProgramMemory(m) => m.preprocessed_trace(), -// RiscvAir::ShaExtend(s) => s.preprocessed_trace(), -// RiscvAir::ShaCompress(s) => s.preprocessed_trace(), -// RiscvAir::Ed25519Add(a) => a.preprocessed_trace(), -// RiscvAir::Ed25519Decompress(d) => d.preprocessed_trace(), -// RiscvAir::K256Decompress(d) => d.preprocessed_trace(), -// RiscvAir::Secp256k1Add(a) => a.preprocessed_trace(), -// RiscvAir::Secp256k1Double(d) => d.preprocessed_trace(), -// RiscvAir::KeccakP(p) => p.preprocessed_trace(), -// RiscvAir::Blake3Compress(c) => c.preprocessed_trace(), -// RiscvAir::_Unreachable(_) => unreachable!("Unreachable"), -// } -// } -// } - -impl MachineAir for RiscvAir { - fn name(&self) -> String { - match self { - RiscvAir::Program(p) => MachineAir::::name(p), - RiscvAir::Cpu(c) => MachineAir::::name(c), - RiscvAir::Add(a) => MachineAir::::name(a), - RiscvAir::Sub(s) => MachineAir::::name(s), - RiscvAir::Bitwise(b) => MachineAir::::name(b), - RiscvAir::Mul(m) => MachineAir::::name(m), - RiscvAir::DivRem(d) => MachineAir::::name(d), - RiscvAir::Lt(l) => MachineAir::::name(l), - RiscvAir::ShiftLeft(sl) => MachineAir::::name(sl), - RiscvAir::ShiftRight(sr) => MachineAir::::name(sr), - RiscvAir::ByteLookup(b) => MachineAir::::name(b), - RiscvAir::FieldLTU(f) => MachineAir::::name(f), - RiscvAir::MemoryInit(m) => MachineAir::::name(m), - RiscvAir::MemoryFinal(m) => MachineAir::::name(m), - RiscvAir::ProgramMemory(m) => MachineAir::::name(m), - RiscvAir::ShaExtend(s) => MachineAir::::name(s), - RiscvAir::ShaCompress(s) => MachineAir::::name(s), - RiscvAir::Ed25519Add(a) => MachineAir::::name(a), - RiscvAir::Ed25519Decompress(d) => MachineAir::::name(d), - RiscvAir::K256Decompress(d) => MachineAir::::name(d), - RiscvAir::Secp256k1Add(a) => MachineAir::::name(a), - RiscvAir::Secp256k1Double(d) => MachineAir::::name(d), - RiscvAir::KeccakP(p) => MachineAir::::name(p), - RiscvAir::Blake3Compress(c) => MachineAir::::name(c), - } - } - - fn generate_trace( - &self, - input: &crate::runtime::ExecutionRecord, - output: &mut crate::runtime::ExecutionRecord, - ) -> p3_matrix::dense::RowMajorMatrix { - match self { - RiscvAir::Program(p) => p.generate_trace(input, output), - RiscvAir::Cpu(c) => c.generate_trace(input, output), - RiscvAir::Add(a) => a.generate_trace(input, output), - RiscvAir::Sub(s) => s.generate_trace(input, output), - RiscvAir::Bitwise(b) => b.generate_trace(input, output), - RiscvAir::Mul(m) => m.generate_trace(input, output), - RiscvAir::DivRem(d) => d.generate_trace(input, output), - RiscvAir::Lt(l) => l.generate_trace(input, output), - RiscvAir::ShiftLeft(sl) => sl.generate_trace(input, output), - RiscvAir::ShiftRight(sr) => sr.generate_trace(input, output), - RiscvAir::ByteLookup(b) => b.generate_trace(input, output), - RiscvAir::FieldLTU(f) => f.generate_trace(input, output), - RiscvAir::MemoryInit(m) => m.generate_trace(input, output), - RiscvAir::MemoryFinal(m) => m.generate_trace(input, output), - RiscvAir::ProgramMemory(m) => m.generate_trace(input, output), - RiscvAir::ShaExtend(s) => s.generate_trace(input, output), - RiscvAir::ShaCompress(s) => s.generate_trace(input, output), - RiscvAir::Ed25519Add(a) => a.generate_trace(input, output), - RiscvAir::Ed25519Decompress(d) => d.generate_trace(input, output), - RiscvAir::K256Decompress(d) => d.generate_trace(input, output), - RiscvAir::Secp256k1Add(a) => a.generate_trace(input, output), - RiscvAir::Secp256k1Double(d) => d.generate_trace(input, output), - RiscvAir::KeccakP(p) => p.generate_trace(input, output), - RiscvAir::Blake3Compress(c) => c.generate_trace(input, output), - } - } - - fn preprocessed_width(&self) -> usize { - match self { - RiscvAir::Program(p) => MachineAir::::preprocessed_width(p), - RiscvAir::Cpu(c) => MachineAir::::preprocessed_width(c), - RiscvAir::Add(a) => MachineAir::::preprocessed_width(a), - RiscvAir::Sub(s) => MachineAir::::preprocessed_width(s), - RiscvAir::Bitwise(b) => MachineAir::::preprocessed_width(b), - RiscvAir::Mul(m) => MachineAir::::preprocessed_width(m), - RiscvAir::DivRem(d) => MachineAir::::preprocessed_width(d), - RiscvAir::Lt(l) => MachineAir::::preprocessed_width(l), - RiscvAir::ShiftLeft(sl) => MachineAir::::preprocessed_width(sl), - RiscvAir::ShiftRight(sr) => MachineAir::::preprocessed_width(sr), - RiscvAir::ByteLookup(b) => MachineAir::::preprocessed_width(b), - RiscvAir::FieldLTU(f) => MachineAir::::preprocessed_width(f), - RiscvAir::MemoryInit(m) => MachineAir::::preprocessed_width(m), - RiscvAir::MemoryFinal(m) => MachineAir::::preprocessed_width(m), - RiscvAir::ProgramMemory(m) => MachineAir::::preprocessed_width(m), - RiscvAir::ShaExtend(s) => MachineAir::::preprocessed_width(s), - RiscvAir::ShaCompress(s) => MachineAir::::preprocessed_width(s), - RiscvAir::Ed25519Add(a) => MachineAir::::preprocessed_width(a), - RiscvAir::Ed25519Decompress(d) => MachineAir::::preprocessed_width(d), - RiscvAir::K256Decompress(d) => MachineAir::::preprocessed_width(d), - RiscvAir::Secp256k1Add(a) => MachineAir::::preprocessed_width(a), - RiscvAir::Secp256k1Double(d) => MachineAir::::preprocessed_width(d), - RiscvAir::KeccakP(p) => MachineAir::::preprocessed_width(p), - RiscvAir::Blake3Compress(c) => MachineAir::::preprocessed_width(c), - } - } - - fn generate_preprocessed_trace( - &self, - program: &crate::runtime::Program, - ) -> Option> { - match self { - RiscvAir::Program(p) => p.generate_preprocessed_trace(program), - RiscvAir::Cpu(c) => c.generate_preprocessed_trace(program), - RiscvAir::Add(a) => a.generate_preprocessed_trace(program), - RiscvAir::Sub(s) => s.generate_preprocessed_trace(program), - RiscvAir::Bitwise(b) => b.generate_preprocessed_trace(program), - RiscvAir::Mul(m) => m.generate_preprocessed_trace(program), - RiscvAir::DivRem(d) => d.generate_preprocessed_trace(program), - RiscvAir::Lt(l) => l.generate_preprocessed_trace(program), - RiscvAir::ShiftLeft(sl) => sl.generate_preprocessed_trace(program), - RiscvAir::ShiftRight(sr) => sr.generate_preprocessed_trace(program), - RiscvAir::ByteLookup(b) => b.generate_preprocessed_trace(program), - RiscvAir::FieldLTU(f) => f.generate_preprocessed_trace(program), - RiscvAir::MemoryInit(m) => m.generate_preprocessed_trace(program), - RiscvAir::MemoryFinal(m) => m.generate_preprocessed_trace(program), - RiscvAir::ProgramMemory(m) => m.generate_preprocessed_trace(program), - RiscvAir::ShaExtend(s) => s.generate_preprocessed_trace(program), - RiscvAir::ShaCompress(s) => s.generate_preprocessed_trace(program), - RiscvAir::Ed25519Add(a) => a.generate_preprocessed_trace(program), - RiscvAir::Ed25519Decompress(d) => d.generate_preprocessed_trace(program), - RiscvAir::K256Decompress(d) => d.generate_preprocessed_trace(program), - RiscvAir::Secp256k1Add(a) => a.generate_preprocessed_trace(program), - RiscvAir::Secp256k1Double(d) => d.generate_preprocessed_trace(program), - RiscvAir::KeccakP(p) => p.generate_preprocessed_trace(program), - RiscvAir::Blake3Compress(c) => c.generate_preprocessed_trace(program), - } - } -} - -impl Air for RiscvAir -where - AB::F: PrimeField32, -{ - fn eval(&self, builder: &mut AB) { - match self { - RiscvAir::Program(p) => p.eval(builder), - RiscvAir::Cpu(c) => c.eval(builder), - RiscvAir::Add(a) => a.eval(builder), - RiscvAir::Sub(s) => s.eval(builder), - RiscvAir::Bitwise(b) => b.eval(builder), - RiscvAir::Mul(m) => m.eval(builder), - RiscvAir::DivRem(d) => d.eval(builder), - RiscvAir::Lt(l) => l.eval(builder), - RiscvAir::ShiftLeft(sl) => sl.eval(builder), - RiscvAir::ShiftRight(sr) => sr.eval(builder), - RiscvAir::ByteLookup(b) => b.eval(builder), - RiscvAir::FieldLTU(f) => f.eval(builder), - RiscvAir::MemoryInit(m) => m.eval(builder), - RiscvAir::MemoryFinal(m) => m.eval(builder), - RiscvAir::ProgramMemory(m) => m.eval(builder), - RiscvAir::ShaExtend(s) => s.eval(builder), - RiscvAir::ShaCompress(s) => s.eval(builder), - RiscvAir::Ed25519Add(a) => a.eval(builder), - RiscvAir::Ed25519Decompress(d) => d.eval(builder), - RiscvAir::K256Decompress(d) => d.eval(builder), - RiscvAir::Secp256k1Add(a) => a.eval(builder), - RiscvAir::Secp256k1Double(d) => d.eval(builder), - RiscvAir::KeccakP(p) => p.eval(builder), - RiscvAir::Blake3Compress(c) => c.eval(builder), - } - } -} diff --git a/core/src/stark/prover.rs b/core/src/stark/prover.rs index 55b1ff24f6..1071ae14dc 100644 --- a/core/src/stark/prover.rs +++ b/core/src/stark/prover.rs @@ -35,7 +35,8 @@ pub trait Prover { shards: &[ExecutionRecord], challenger: &mut SC::Challenger, ) -> Proof - where SC::Val: PrimeField32; + where + SC::Val: PrimeField32; } impl Prover for LocalProver diff --git a/derive/src/air.rs b/derive/src/air.rs deleted file mode 100644 index 8b13789179..0000000000 --- a/derive/src/air.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 2aafc86b66..1f9d2f32bc 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -30,8 +30,6 @@ use syn::parse_macro_input; use syn::Data; use syn::ItemFn; -mod air; - #[proc_macro_derive(AlignedBorrow)] pub fn aligned_borrow_derive(input: TokenStream) -> TokenStream { let ast: syn::DeriveInput = syn::parse(input).unwrap(); @@ -74,33 +72,135 @@ pub fn machine_air_derive(input: TokenStream) -> TokenStream { match &ast.data { Data::Struct(_) => unimplemented!("Structs are not supported yet"), Data::Enum(e) => { - let variants = e.variants.iter().map(|variant| { - let variant_name = &variant.ident; - - let mut fields = variant.fields.iter(); - let field = fields.next().unwrap(); - assert!(fields.next().is_none(), "Only one field is supported"); - (variant_name, field) - }); - - let width_arms = variants.map(|(variant_name, field)| { + let variants = e + .variants + .iter() + .map(|variant| { + let variant_name = &variant.ident; + + let mut fields = variant.fields.iter(); + let field = fields.next().unwrap(); + assert!(fields.next().is_none(), "Only one field is supported"); + (variant_name, field) + }) + .collect::>(); + + let width_arms = variants.iter().map(|(variant_name, field)| { let field_ty = &field.ty; quote! { #name::#variant_name(x) => <#field_ty as p3_air::BaseAir>::width(x) } - }); + }); - let result = quote! { + let base_air = quote! { impl #impl_generics p3_air::BaseAir for #name #ty_generics #where_clause { fn width(&self) -> usize { match self { #(#width_arms,)* } } + + fn preprocessed_trace(&self) -> Option> { + unreachable!("A machine air should use the preprocessed trace from the `MachineAir` trait") + } } }; - result.into() + let name_arms = variants.iter().map(|(variant_name, field)| { + let field_ty = &field.ty; + quote! { + #name::#variant_name(x) => <#field_ty as crate::air::MachineAir>::name(x) + } + }); + + let preprocessed_width_arms = variants.iter().map(|(variant_name, field)| { + let field_ty = &field.ty; + quote! { + #name::#variant_name(x) => <#field_ty as crate::air::MachineAir>::preprocessed_width(x) + } + }); + + let generate_preprocessed_trace_arms = variants.iter().map(|(variant_name, field)| { + let field_ty = &field.ty; + quote! { + #name::#variant_name(x) => <#field_ty as crate::air::MachineAir>::generate_preprocessed_trace(x, program) + } + }); + + let generate_trace_arms = variants.iter().map(|(variant_name, field)| { + let field_ty = &field.ty; + quote! { + #name::#variant_name(x) => <#field_ty as crate::air::MachineAir>::generate_trace(x, input, output) + } + }); + + let machine_air = quote! { + impl #impl_generics crate::air::MachineAir for #name #ty_generics #where_clause { + fn name(&self) -> String { + match self { + #(#name_arms,)* + } + } + + fn preprocessed_width(&self) -> usize { + match self { + #(#preprocessed_width_arms,)* + } + } + + fn generate_preprocessed_trace( + &self, + program: &crate::runtime::Program, + ) -> Option> { + match self { + #(#generate_preprocessed_trace_arms,)* + } + } + + fn generate_trace( + &self, + input: &crate::runtime::ExecutionRecord, + output: &mut crate::runtime::ExecutionRecord, + ) -> p3_matrix::dense::RowMajorMatrix { + match self { + #(#generate_trace_arms,)* + } + } + } + }; + + let eval_arms = variants.iter().map(|(variant_name, field)| { + let field_ty = &field.ty; + quote! { + #name::#variant_name(x) => <#field_ty as p3_air::Air>::eval(x, builder) + } + }); + + // Attach an extra generic AB : crate::air::SP1AirBuilder to the generics of the enum + let generics = &ast.generics; + let mut new_generics = generics.clone(); + new_generics.params.push(syn::parse_quote! { AB: crate::air::SP1AirBuilder }); + + let (air_impl_generics, _, _) = new_generics.split_for_impl(); + + let air = quote! { + impl #air_impl_generics p3_air::Air for #name #ty_generics #where_clause { + fn eval(&self, builder: &mut AB) { + match self { + #(#eval_arms,)* + } + } + } + }; + + quote! { + #base_air + + #machine_air + + #air + } + .into() } Data::Union(_) => unimplemented!("Unions are not supported"), } From 78242c77e8643dfadbb0351f3d313ea80b768ebe Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Wed, 21 Feb 2024 08:57:00 -0800 Subject: [PATCH 17/19] fmt --- derive/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 1f9d2f32bc..d6cd719395 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -179,9 +179,11 @@ pub fn machine_air_derive(input: TokenStream) -> TokenStream { // Attach an extra generic AB : crate::air::SP1AirBuilder to the generics of the enum let generics = &ast.generics; let mut new_generics = generics.clone(); - new_generics.params.push(syn::parse_quote! { AB: crate::air::SP1AirBuilder }); + new_generics + .params + .push(syn::parse_quote! { AB: crate::air::SP1AirBuilder }); - let (air_impl_generics, _, _) = new_generics.split_for_impl(); + let (air_impl_generics, _, _) = new_generics.split_for_impl(); let air = quote! { impl #air_impl_generics p3_air::Air for #name #ty_generics #where_clause { From e5ddd5c6623a33c16ee83ac7c92bbcdce8741d66 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Wed, 21 Feb 2024 12:34:29 -0800 Subject: [PATCH 18/19] get rid of dyn --- core/src/lookup/debug.rs | 8 +-- core/src/memory/global.rs | 8 +-- core/src/stark/air.rs | 60 ++++++++--------- core/src/stark/chip.rs | 117 ++++++++-------------------------- core/src/stark/config.rs | 4 +- core/src/stark/debug.rs | 28 ++++++-- core/src/stark/machine.rs | 13 +--- core/src/stark/permutation.rs | 2 +- core/src/stark/prover.rs | 27 +++----- core/src/stark/quotient.rs | 9 ++- core/src/stark/verifier.rs | 17 +++-- 11 files changed, 117 insertions(+), 176 deletions(-) diff --git a/core/src/lookup/debug.rs b/core/src/lookup/debug.rs index ed0f4e1f31..0e72b1b3ed 100644 --- a/core/src/lookup/debug.rs +++ b/core/src/lookup/debug.rs @@ -7,7 +7,7 @@ use p3_matrix::Matrix; use crate::air::MachineAir; use crate::runtime::ExecutionRecord; -use crate::stark::{ChipRef, StarkGenericConfig}; +use crate::stark::{RiscvChip, StarkGenericConfig}; use super::InteractionKind; @@ -44,7 +44,7 @@ fn babybear_to_int(n: BabyBear) -> i32 { } pub fn debug_interactions( - chip: &ChipRef, + chip: &RiscvChip, record: &ExecutionRecord, interaction_kinds: Vec, ) -> ( @@ -110,14 +110,14 @@ pub fn debug_interactions( /// Calculate the the number of times we send and receive each event of the given interaction type, /// and print out the ones for which the set of sends and receives don't match. pub fn debug_interactions_with_all_chips>( - chips: &[ChipRef], + chips: &[RiscvChip], segment: &ExecutionRecord, interaction_kinds: Vec, ) -> bool { let mut final_map = BTreeMap::new(); for chip in chips.iter() { - let (_, count) = debug_interactions(chip, segment, interaction_kinds.clone()); + let (_, count) = debug_interactions::(chip, segment, interaction_kinds.clone()); tracing::debug!("{} chip has {} distinct events", chip.name(), count.len()); for (key, value) in count.iter() { diff --git a/core/src/memory/global.rs b/core/src/memory/global.rs index 620951b0e1..3ddc5273e6 100644 --- a/core/src/memory/global.rs +++ b/core/src/memory/global.rs @@ -204,8 +204,8 @@ mod tests { runtime.run(); let machine = RiscvStark::new(BabyBearPoseidon2::new()); - debug_interactions_with_all_chips( - &machine.dyn_chips(), + debug_interactions_with_all_chips::( + machine.chips(), &runtime.record, vec![InteractionKind::Memory], ); @@ -219,8 +219,8 @@ mod tests { runtime.run(); let machine = RiscvStark::new(BabyBearPoseidon2::new()); - debug_interactions_with_all_chips( - &machine.dyn_chips(), + debug_interactions_with_all_chips::( + machine.chips(), &runtime.record, vec![InteractionKind::Byte], ); diff --git a/core/src/stark/air.rs b/core/src/stark/air.rs index dfb1caa6bf..537942232d 100644 --- a/core/src/stark/air.rs +++ b/core/src/stark/air.rs @@ -3,7 +3,6 @@ pub use crate::air::SP1AirBuilder; use crate::memory::MemoryChipKind; use crate::runtime::ExecutionRecord; use p3_field::PrimeField32; - pub use riscv_chips::*; /// A module for importing all the different RISC-V chips. @@ -94,35 +93,6 @@ pub enum RiscvAir { } impl RiscvAir { - pub fn included(&self, shard: &ExecutionRecord) -> bool { - match self { - RiscvAir::Program(_) => true, - RiscvAir::Cpu(_) => true, - RiscvAir::Add(_) => !shard.add_events.is_empty(), - RiscvAir::Sub(_) => !shard.sub_events.is_empty(), - RiscvAir::Bitwise(_) => !shard.bitwise_events.is_empty(), - RiscvAir::Mul(_) => !shard.mul_events.is_empty(), - RiscvAir::DivRem(_) => !shard.divrem_events.is_empty(), - RiscvAir::Lt(_) => !shard.lt_events.is_empty(), - RiscvAir::ShiftLeft(_) => !shard.shift_left_events.is_empty(), - RiscvAir::ShiftRight(_) => !shard.shift_right_events.is_empty(), - RiscvAir::ByteLookup(_) => !shard.byte_lookups.is_empty(), - RiscvAir::FieldLTU(_) => !shard.field_events.is_empty(), - RiscvAir::MemoryInit(_) => !shard.first_memory_record.is_empty(), - RiscvAir::MemoryFinal(_) => !shard.last_memory_record.is_empty(), - RiscvAir::ProgramMemory(_) => !shard.program_memory_record.is_empty(), - RiscvAir::Sha256Extend(_) => !shard.sha_extend_events.is_empty(), - RiscvAir::Sha256Compress(_) => !shard.sha_compress_events.is_empty(), - RiscvAir::Ed25519Add(_) => !shard.ed_add_events.is_empty(), - RiscvAir::Ed25519Decompress(_) => !shard.ed_decompress_events.is_empty(), - RiscvAir::K256Decompress(_) => !shard.k256_decompress_events.is_empty(), - RiscvAir::Secp256k1Add(_) => !shard.weierstrass_add_events.is_empty(), - RiscvAir::Secp256k1Double(_) => !shard.weierstrass_double_events.is_empty(), - RiscvAir::KeccakP(_) => !shard.keccak_permute_events.is_empty(), - RiscvAir::Blake3Compress(_) => !shard.blake3_compress_inner_events.is_empty(), - } - } - /// Get all the different RISC-V AIRs. pub fn get_all() -> Vec { // The order of the chips is important, as it is used to determine the order of trace @@ -181,6 +151,36 @@ impl RiscvAir { chips } + + /// Returns `true` if the given `shard` includes events for this AIR. + pub fn included(&self, shard: &ExecutionRecord) -> bool { + match self { + RiscvAir::Program(_) => true, + RiscvAir::Cpu(_) => true, + RiscvAir::Add(_) => !shard.add_events.is_empty(), + RiscvAir::Sub(_) => !shard.sub_events.is_empty(), + RiscvAir::Bitwise(_) => !shard.bitwise_events.is_empty(), + RiscvAir::Mul(_) => !shard.mul_events.is_empty(), + RiscvAir::DivRem(_) => !shard.divrem_events.is_empty(), + RiscvAir::Lt(_) => !shard.lt_events.is_empty(), + RiscvAir::ShiftLeft(_) => !shard.shift_left_events.is_empty(), + RiscvAir::ShiftRight(_) => !shard.shift_right_events.is_empty(), + RiscvAir::ByteLookup(_) => !shard.byte_lookups.is_empty(), + RiscvAir::FieldLTU(_) => !shard.field_events.is_empty(), + RiscvAir::MemoryInit(_) => !shard.first_memory_record.is_empty(), + RiscvAir::MemoryFinal(_) => !shard.last_memory_record.is_empty(), + RiscvAir::ProgramMemory(_) => !shard.program_memory_record.is_empty(), + RiscvAir::Sha256Extend(_) => !shard.sha_extend_events.is_empty(), + RiscvAir::Sha256Compress(_) => !shard.sha_compress_events.is_empty(), + RiscvAir::Ed25519Add(_) => !shard.ed_add_events.is_empty(), + RiscvAir::Ed25519Decompress(_) => !shard.ed_decompress_events.is_empty(), + RiscvAir::K256Decompress(_) => !shard.k256_decompress_events.is_empty(), + RiscvAir::Secp256k1Add(_) => !shard.weierstrass_add_events.is_empty(), + RiscvAir::Secp256k1Double(_) => !shard.weierstrass_double_events.is_empty(), + RiscvAir::KeccakP(_) => !shard.keccak_permute_events.is_empty(), + RiscvAir::Blake3Compress(_) => !shard.blake3_compress_inner_events.is_empty(), + } + } } impl PartialEq for RiscvAir { diff --git a/core/src/stark/chip.rs b/core/src/stark/chip.rs index a2afdebc9a..f6e4492639 100644 --- a/core/src/stark/chip.rs +++ b/core/src/stark/chip.rs @@ -1,7 +1,7 @@ use std::hash::Hash; use p3_air::{Air, BaseAir, PairBuilder}; -use p3_field::{Field, PrimeField32}; +use p3_field::{ExtensionField, Field, PrimeField, PrimeField32}; use p3_matrix::dense::RowMajorMatrix; use p3_util::log2_ceil_usize; @@ -12,10 +12,11 @@ use crate::{ }; use super::{ - eval_permutation_constraints, DebugConstraintBuilder, ProverConstraintFolder, RiscvAir, - StarkGenericConfig, VerifierConstraintFolder, + eval_permutation_constraints, generate_permutation_trace, DebugConstraintBuilder, + ProverConstraintFolder, RiscvAir, StarkGenericConfig, VerifierConstraintFolder, }; +/// An Air that encodes lookups based on interactions. pub struct Chip { /// The underlying AIR of the chip for constraint evaluation. air: A, @@ -27,47 +28,30 @@ pub struct Chip { log_quotient_degree: usize, } -pub struct ChipRef<'a, SC: StarkGenericConfig> { - air: &'a dyn StarkAir, - sends: &'a [Interaction], - receives: &'a [Interaction], - log_quotient_degree: usize, -} - impl Chip { + /// The send interactions of the chip. pub fn sends(&self) -> &[Interaction] { &self.sends } + /// The receive interactions of the chip. pub fn receives(&self) -> &[Interaction] { &self.receives } + /// The relative log degree of the quotient polynomial, i.e. `log2(max_constraint_degree - 1)`. pub const fn log_quotient_degree(&self) -> usize { self.log_quotient_degree } } impl Chip> { + /// Returns whether the given chip is included in the execution record of the shard. pub fn included(&self, shard: &ExecutionRecord) -> bool { self.air.included(shard) } } -impl<'a, SC: StarkGenericConfig> ChipRef<'a, SC> { - pub fn sends(&self) -> &[Interaction] { - self.sends - } - - pub fn receives(&self) -> &[Interaction] { - self.receives - } - - pub const fn log_quotient_degree(&self) -> usize { - self.log_quotient_degree - } -} - /// A trait for AIRs that can be used with STARKs. /// /// This trait is for specifying a trait bound for explicit types of builders used in the stark @@ -94,9 +78,12 @@ impl StarkAir for T where impl Chip where F: Field, - A: Air>, { - pub fn new(air: A) -> Self { + /// Records the interactions and constraint degree from the air and crates a new chip. + pub fn new(air: A) -> Self + where + A: Air>, + { let mut builder = InteractionBuilder::new(air.width()); air.eval(&mut builder); let (sends, receives) = builder.interactions(); @@ -117,16 +104,22 @@ where self.sends.len() + self.receives.len() } - pub fn as_ref>(&self) -> ChipRef + pub fn generate_permutation_trace>( + &self, + preprocessed: &Option>, + main: &RowMajorMatrix, + random_elements: &[EF], + ) -> RowMajorMatrix where - A: StarkAir, + F: PrimeField, { - ChipRef { - air: &self.air, - sends: &self.sends, - receives: &self.receives, - log_quotient_degree: self.log_quotient_degree, - } + generate_permutation_trace( + &self.sends, + &self.receives, + preprocessed, + main, + random_elements, + ) } } @@ -205,59 +198,3 @@ where self.air.hash(state); } } - -// Implement Air on ChipRef similar to Chip. - -impl<'a, SC: StarkGenericConfig> BaseAir for ChipRef<'a, SC> { - fn width(&self) -> usize { - as BaseAir>::width(self.air) - } - - fn preprocessed_trace(&self) -> Option> { - as BaseAir>::preprocessed_trace(self.air) - } -} - -impl<'a, SC: StarkGenericConfig> MachineAir for ChipRef<'a, SC> { - fn name(&self) -> String { - as MachineAir>::name(self.air) - } - - fn generate_preprocessed_trace(&self, program: &Program) -> Option> { - as MachineAir>::generate_preprocessed_trace(self.air, program) - } - - fn preprocessed_width(&self) -> usize { - as MachineAir>::preprocessed_width(self.air) - } - - fn generate_trace( - &self, - input: &ExecutionRecord, - output: &mut ExecutionRecord, - ) -> RowMajorMatrix { - as MachineAir>::generate_trace(self.air, input, output) - } -} - -impl<'a, 'b, SC: StarkGenericConfig> Air> for ChipRef<'a, SC> { - fn eval(&self, builder: &mut ProverConstraintFolder<'b, SC>) { - as Air>>::eval(self.air, builder); - } -} - -impl<'a, 'b, SC: StarkGenericConfig> Air> for ChipRef<'a, SC> { - fn eval(&self, builder: &mut VerifierConstraintFolder<'b, SC>) { - as Air>>::eval(self.air, builder); - } -} - -impl<'a, 'b, SC: StarkGenericConfig> Air> - for ChipRef<'a, SC> -{ - fn eval(&self, builder: &mut DebugConstraintBuilder<'b, SC::Val, SC::Challenge>) { - as Air>>::eval( - self.air, builder, - ); - } -} diff --git a/core/src/stark/config.rs b/core/src/stark/config.rs index cd34eeddb7..0a50db3ea9 100644 --- a/core/src/stark/config.rs +++ b/core/src/stark/config.rs @@ -1,13 +1,13 @@ use p3_challenger::{CanObserve, FieldChallenger}; use p3_commit::{Pcs, UnivariatePcsWithLde}; -use p3_field::{ExtensionField, TwoAdicField}; +use p3_field::{ExtensionField, PrimeField32, TwoAdicField}; use p3_matrix::dense::RowMajorMatrix; use serde::Serialize; /// A configuration for a STARK. pub trait StarkGenericConfig { /// The field over which trace data is encoded. - type Val: TwoAdicField; + type Val: TwoAdicField + PrimeField32; /// The field from which random challenges are drawn. type Challenge: ExtensionField + TwoAdicField + Serialize; diff --git a/core/src/stark/debug.rs b/core/src/stark/debug.rs index 5575ed4ae6..51ee32adb8 100644 --- a/core/src/stark/debug.rs +++ b/core/src/stark/debug.rs @@ -3,30 +3,34 @@ use std::panic::{catch_unwind, AssertUnwindSafe}; use p3_air::{ Air, AirBuilder, ExtensionBuilder, PairBuilder, PermutationAirBuilder, TwoRowMatrixView, }; -use p3_field::AbstractField; +use p3_field::{AbstractField, PrimeField32}; use p3_field::{ExtensionField, Field}; use p3_matrix::{dense::RowMajorMatrix, Matrix, MatrixRowSlices}; -use crate::air::{EmptyMessageBuilder, MachineAir}; +use crate::air::{EmptyMessageBuilder, MachineAir, MultiTableAirBuilder}; -use super::{ChipRef, StarkGenericConfig}; +use super::{RiscvChip, StarkGenericConfig}; /// Checks that the constraints of the given AIR are satisfied, including the permutation trace. /// /// Note that this does not actually verify the proof. pub fn debug_constraints( - chip: &ChipRef, + chip: &RiscvChip, preprocessed: Option<&RowMajorMatrix>, main: &RowMajorMatrix, perm: &RowMajorMatrix, perm_challenges: &[SC::Challenge], -) { +) where + SC::Val: PrimeField32, +{ assert_eq!(main.height(), perm.height()); let height = main.height(); if height == 0 { return; } + let cumulative_sum = perm.row_slice(perm.height() - 1).last().copied().unwrap(); + // Check that constraints are satisfied. (0..height).for_each(|i| { let i_next = (i + 1) % height; @@ -60,6 +64,7 @@ pub fn debug_constraints( next: perm_next, }, perm_challenges, + cumulative_sum, is_first_row: SC::Val::zero(), is_last_row: SC::Val::zero(), is_transition: SC::Val::one(), @@ -98,6 +103,7 @@ pub struct DebugConstraintBuilder<'a, F: Field, EF: ExtensionField> { pub(crate) preprocessed: TwoRowMatrixView<'a, F>, pub(crate) main: TwoRowMatrixView<'a, F>, pub(crate) perm: TwoRowMatrixView<'a, EF>, + pub(crate) cumulative_sum: EF, pub(crate) perm_challenges: &'a [EF], pub(crate) is_first_row: F, pub(crate) is_last_row: F, @@ -186,6 +192,18 @@ where } } +impl<'a, F, EF> MultiTableAirBuilder for DebugConstraintBuilder<'a, F, EF> +where + F: Field, + EF: ExtensionField, +{ + type Sum = EF; + + fn cumulative_sum(&self) -> Self::Sum { + self.cumulative_sum + } +} + impl<'a, F: Field, EF: ExtensionField> EmptyMessageBuilder for DebugConstraintBuilder<'a, F, EF> { diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index daf60661b5..a02f703b72 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -10,7 +10,6 @@ use p3_field::Field; use p3_field::PrimeField32; use super::Chip; -use super::ChipRef; use super::Proof; use super::Prover; use super::RiscvAir; @@ -66,21 +65,14 @@ where &self.chips } - pub fn dyn_chips(&self) -> Vec> { - self.chips.iter().map(|chip| chip.as_ref()).collect() - } - pub fn shard_chips<'a, 'b>( &'a self, shard: &'b ExecutionRecord, - ) -> impl Iterator> + ) -> impl Iterator> where 'a: 'b, { - self.chips - .iter() - .filter(|chip| chip.included(shard)) - .map(|chip| chip.as_ref()) + self.chips.iter().filter(|chip| chip.included(shard)) } /// The setup preprocessing phase. @@ -178,7 +170,6 @@ where .chips() .iter() .filter(|chip| proof.chip_ids.contains(&chip.name())) - .map(|chip| chip.as_ref()) .collect::>(); Verifier::verify_shard(&self.config, &chips, &mut challenger.clone(), proof) .map_err(ProgramVerificationError::InvalidSegmentProof) diff --git a/core/src/stark/permutation.rs b/core/src/stark/permutation.rs index 4dd545e75e..11ecfcc003 100644 --- a/core/src/stark/permutation.rs +++ b/core/src/stark/permutation.rs @@ -28,7 +28,7 @@ pub fn generate_interaction_rlc_elements /// /// The permutation trace has (N+1)*EF::NUM_COLS columns, where N is the number of interactions in /// the chip. -pub fn generate_permutation_trace>( +pub(crate) fn generate_permutation_trace>( sends: &[Interaction], receives: &[Interaction], preprocessed: &Option>, diff --git a/core/src/stark/prover.rs b/core/src/stark/prover.rs index 1071ae14dc..c9d43f92e2 100644 --- a/core/src/stark/prover.rs +++ b/core/src/stark/prover.rs @@ -1,5 +1,5 @@ -use super::ProvingKey; use super::{quotient_values, RiscvStark}; +use super::{ProvingKey, RiscvChip}; use itertools::izip; #[cfg(not(feature = "perf"))] use p3_air::BaseAir; @@ -19,10 +19,9 @@ use serde::Serialize; use std::marker::PhantomData; use super::util::decompose_and_flatten; -use super::{types::*, ChipRef, StarkGenericConfig}; +use super::{types::*, StarkGenericConfig}; use crate::air::MachineAir; use crate::runtime::ExecutionRecord; -use crate::stark::permutation::generate_permutation_trace; use crate::utils::env; #[cfg(not(feature = "perf"))] @@ -137,7 +136,7 @@ where fn prove_shard( config: &SC, _pk: &ProvingKey, - chips: &[ChipRef], + chips: &[&RiscvChip], shard_data: ShardMainData, challenger: &mut SC::Challenger, ) -> ShardProof @@ -161,10 +160,6 @@ where .map(|log_deg| SC::Val::two_adic_generator(*log_deg)) .collect::>(); - // Compute the interactions for all chips - let sends = chips.iter().map(|chip| chip.sends()).collect::>(); - let receives = chips.iter().map(|chip| chip.receives()).collect::>(); - // Obtain the challenges used for the permutation argument. let mut permutation_challenges: Vec = Vec::new(); for _ in 0..2 { @@ -175,18 +170,12 @@ where let mut permutation_traces = Vec::with_capacity(chips.len()); let mut cumulative_sums = Vec::with_capacity(chips.len()); tracing::info_span!("generate permutation traces").in_scope(|| { - sends + chips .par_iter() - .zip(receives.par_iter()) .zip(traces.par_iter()) - .map(|((send, rec), main_trace)| { - let perm_trace = generate_permutation_trace( - send, - rec, - &None, - main_trace, - &permutation_challenges, - ); + .map(|(chip, main_trace)| { + let perm_trace = + chip.generate_permutation_trace(&None, main_trace, &permutation_challenges); let cumulative_sum = perm_trace .row_slice(main_trace.height() - 1) .last() @@ -253,7 +242,7 @@ where .map(|i| { quotient_values( config, - &chips[i], + chips[i], cumulative_sums[i], log_degrees[i], &main_ldes[i], diff --git a/core/src/stark/quotient.rs b/core/src/stark/quotient.rs index 3b450e1421..138ef775da 100644 --- a/core/src/stark/quotient.rs +++ b/core/src/stark/quotient.rs @@ -1,6 +1,8 @@ use super::folder::ProverConstraintFolder; +use super::Chip; use super::PackedChallenge; use super::PackedVal; +use super::StarkAir; use p3_air::Air; use p3_air::TwoRowMatrixView; use p3_commit::UnivariatePcsWithLde; @@ -11,12 +13,12 @@ use p3_field::{cyclic_subgroup_coset_known_order, Field, TwoAdicField}; use p3_matrix::MatrixGet; use p3_maybe_rayon::prelude::*; -use super::{zerofier_coset::ZerofierOnCoset, ChipRef, StarkGenericConfig}; +use super::{zerofier_coset::ZerofierOnCoset, StarkGenericConfig}; #[allow(clippy::too_many_arguments)] -pub fn quotient_values( +pub fn quotient_values( config: &SC, - chip: &ChipRef, + chip: &Chip, cumulative_sum: SC::Challenge, degree_bits: usize, main_lde: &MainLde, @@ -25,6 +27,7 @@ pub fn quotient_values( alpha: SC::Challenge, ) -> Vec where + A: StarkAir, SC: StarkGenericConfig, SC::Val: TwoAdicField, MainLde: MatrixGet + Sync, diff --git a/core/src/stark/verifier.rs b/core/src/stark/verifier.rs index 9e9384875f..0e206d0944 100644 --- a/core/src/stark/verifier.rs +++ b/core/src/stark/verifier.rs @@ -7,6 +7,7 @@ use p3_commit::UnivariatePcs; use p3_field::AbstractExtensionField; use p3_field::AbstractField; use p3_field::Field; +use p3_field::PrimeField32; use p3_field::TwoAdicField; use p3_matrix::Dimensions; @@ -16,20 +17,22 @@ use std::marker::PhantomData; use super::folder::VerifierConstraintFolder; use super::types::*; +use super::RiscvChip; use super::StarkGenericConfig; use core::fmt::Display; -use super::ChipRef; - pub struct Verifier(PhantomData); -impl Verifier { +impl Verifier +where + SC::Val: PrimeField32, +{ /// Verify a proof for a collection of air chips. #[cfg(feature = "perf")] pub fn verify_shard( config: &SC, - chips: &[ChipRef], + chips: &[&RiscvChip], challenger: &mut SC::Challenger, proof: &ShardProof, ) -> Result<(), VerificationError> { @@ -151,7 +154,7 @@ impl Verifier { #[cfg(not(feature = "perf"))] pub fn verify_shard( _config: &SC, - _chips: &[ChipRef], + _chips: &[&RiscvChip], _challenger: &mut SC::Challenger, _proof: &ShardProof, ) -> Result<(), VerificationError> { @@ -160,7 +163,7 @@ impl Verifier { #[cfg(feature = "perf")] fn verify_constraints( - chip: &ChipRef, + chip: &RiscvChip, opening: ChipOpenedValues, g: SC::Val, zeta: SC::Challenge, @@ -213,7 +216,7 @@ impl Verifier { next: unflatten(&opening.permutation.next), }; - let mut folder = VerifierConstraintFolder { + let mut folder = VerifierConstraintFolder:: { preprocessed: opening.preprocessed.view(), main: opening.main.view(), perm: perm_opening.view(), From 5b5cd8fe82a3198da64d41dfdda1ce13598c6300 Mon Sep 17 00:00:00 2001 From: Tamir Hemo Date: Wed, 21 Feb 2024 12:40:34 -0800 Subject: [PATCH 19/19] trait bounds --- core/src/stark/machine.rs | 7 +------ core/src/stark/prover.rs | 8 +++----- core/src/stark/verifier.rs | 6 +----- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/core/src/stark/machine.rs b/core/src/stark/machine.rs index a02f703b72..6953a6a7c4 100644 --- a/core/src/stark/machine.rs +++ b/core/src/stark/machine.rs @@ -7,7 +7,6 @@ use crate::runtime::ShardingConfig; use p3_challenger::CanObserve; use p3_field::AbstractField; use p3_field::Field; -use p3_field::PrimeField32; use super::Chip; use super::Proof; @@ -40,10 +39,7 @@ pub struct VerifyingKey { marker: std::marker::PhantomData, } -impl RiscvStark -where - SC::Val: PrimeField32, -{ +impl RiscvStark { /// Create a new RISC-V STARK machine. pub fn new(config: SC) -> Self { // The machine consists of a config (input) and a set of chips. The chip vector should @@ -151,7 +147,6 @@ where challenger: &mut SC::Challenger, ) -> Result<(), ProgramVerificationError> where - SC::Val: PrimeField32, SC::Challenger: Clone, { // TODO: Observe the challenges in a tree-like structure for easily verifiable reconstruction diff --git a/core/src/stark/prover.rs b/core/src/stark/prover.rs index c9d43f92e2..60696bb9d6 100644 --- a/core/src/stark/prover.rs +++ b/core/src/stark/prover.rs @@ -33,14 +33,12 @@ pub trait Prover { pk: &ProvingKey, shards: &[ExecutionRecord], challenger: &mut SC::Challenger, - ) -> Proof - where - SC::Val: PrimeField32; + ) -> Proof; } impl Prover for LocalProver where - SC::Val: PrimeField32 + TwoAdicField + Send + Sync, + SC::Val: Send + Sync, SC: StarkGenericConfig + Send + Sync, SC::Challenger: Clone, Com: Send + Sync, @@ -89,7 +87,7 @@ pub struct LocalProver(PhantomData); impl LocalProver where - SC::Val: PrimeField + TwoAdicField + PrimeField32, + SC::Val: TwoAdicField, SC: StarkGenericConfig + Send + Sync, SC::Challenger: Clone, Com: Send + Sync, diff --git a/core/src/stark/verifier.rs b/core/src/stark/verifier.rs index 0e206d0944..5e035e7feb 100644 --- a/core/src/stark/verifier.rs +++ b/core/src/stark/verifier.rs @@ -7,7 +7,6 @@ use p3_commit::UnivariatePcs; use p3_field::AbstractExtensionField; use p3_field::AbstractField; use p3_field::Field; -use p3_field::PrimeField32; use p3_field::TwoAdicField; use p3_matrix::Dimensions; @@ -24,10 +23,7 @@ use core::fmt::Display; pub struct Verifier(PhantomData); -impl Verifier -where - SC::Val: PrimeField32, -{ +impl Verifier { /// Verify a proof for a collection of air chips. #[cfg(feature = "perf")] pub fn verify_shard(