diff --git a/crates/core/executor/src/events/memcpy.rs b/crates/core/executor/src/events/memcpy.rs new file mode 100644 index 0000000000..c6622015d8 --- /dev/null +++ b/crates/core/executor/src/events/memcpy.rs @@ -0,0 +1,14 @@ +use super::{LookupId, MemoryReadRecord, MemoryWriteRecord}; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct MemCopyEvent { + pub lookup_id: LookupId, + pub shard: u32, + pub channel: u8, + pub clk: u32, + pub src_ptr: u32, + pub dst_ptr: u32, + pub read_records: Vec, + pub write_records: Vec, +} diff --git a/crates/core/executor/src/events/mod.rs b/crates/core/executor/src/events/mod.rs index 9981e960af..11183d8f65 100644 --- a/crates/core/executor/src/events/mod.rs +++ b/crates/core/executor/src/events/mod.rs @@ -3,6 +3,7 @@ mod alu; mod byte; mod cpu; +mod memcpy; mod memory; mod precompiles; mod utils; @@ -10,6 +11,7 @@ mod utils; pub use alu::*; pub use byte::*; pub use cpu::*; +pub use memcpy::*; pub use memory::*; pub use precompiles::*; pub use utils::*; diff --git a/crates/core/executor/src/events/precompiles/bn254_scalar.rs b/crates/core/executor/src/events/precompiles/bn254_scalar.rs new file mode 100644 index 0000000000..7e84528370 --- /dev/null +++ b/crates/core/executor/src/events/precompiles/bn254_scalar.rs @@ -0,0 +1,167 @@ +/* +use crate::{ + operations::field::params::{FieldParameters, NumWords}, + operations::field::{field_op::FieldOperation, params::Limbs}, + runtime::{MemoryReadRecord, MemoryWriteRecord, SyscallContext}, +}; +*/ +use num::BigUint; +use sp1_curves::{ + params::{FieldParameters, NumWords}, + weierstrass::bn254::Bn254ScalarField, +}; +use typenum::Unsigned; + +use serde::{Deserialize, Serialize}; + +use crate::{ + events::{LookupId, MemoryReadRecord, MemoryWriteRecord}, + syscalls::SyscallContext, +}; + +use super::FieldOperation; + +pub const NUM_WORDS_PER_FE: usize = 8; + +#[derive(PartialEq, Copy, Clone, Debug, Serialize, Deserialize)] +pub enum Bn254FieldOperation { + Mul = 2, + Mac = 4, +} + +impl Bn254FieldOperation { + pub const fn to_field_operation(&self) -> FieldOperation { + match self { + Bn254FieldOperation::Mul => FieldOperation::Mul, + Bn254FieldOperation::Mac => panic!("not supported"), + } + } +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct Bn254FieldArithEvent { + pub lookup_id: LookupId, + pub shard: u32, + pub channel: u8, + pub clk: u32, + pub op: Bn254FieldOperation, + pub arg1: FieldArithMemoryAccess, + pub arg2: FieldArithMemoryAccess, + pub a: Option>, + pub b: Option>, +} + +pub fn create_bn254_scalar_arith_event( + rt: &mut SyscallContext, + arg1: u32, + arg2: u32, + op: Bn254FieldOperation, +) -> Bn254FieldArithEvent { + let start_clk = rt.clk; + let p_ptr = arg1; + let q_ptr = arg2; + + assert_eq!(p_ptr % 4, 0, "p_ptr({:x}) is not aligned", p_ptr); + assert_eq!(q_ptr % 4, 0, "q_ptr({:x}) is not aligned", q_ptr); + + let nw_per_fe = ::WordsFieldElement::USIZE; + debug_assert_eq!(nw_per_fe, NUM_WORDS_PER_FE); + + let arg1: Vec = rt.slice_unsafe(p_ptr, nw_per_fe); + let arg2 = match op { + Bn254FieldOperation::Mac => FieldArithMemoryAccess::read(rt, arg2, 2), + _ => FieldArithMemoryAccess::read(rt, arg2, nw_per_fe), + }; + + let bn_arg1 = BigUint::from_bytes_le( + &arg1.iter().copied().flat_map(|word| word.to_le_bytes()).collect::>(), + ); + let modulus = Bn254ScalarField::modulus(); + + let (a, b, bn_arg1_out) = if matches!(op, Bn254FieldOperation::Mac) { + let a = FieldArithMemoryAccess::read(rt, arg2.memory_records[0].value, nw_per_fe); + let b = FieldArithMemoryAccess::read(rt, arg2.memory_records[1].value, nw_per_fe); + + let bn_a = a.value_as_biguint(); + let bn_b = b.value_as_biguint(); + let bn_arg1_out = (&bn_a * &bn_b + &bn_arg1) % modulus; + + (Some(a), Some(b), bn_arg1_out) + } else { + let bn_arg2 = arg2.value_as_biguint(); + + let bn_arg1_out = match op { + Bn254FieldOperation::Mul => (&bn_arg1 * &bn_arg2) % modulus, + _ => unimplemented!("not supported"), + }; + (None, None, bn_arg1_out) + }; + + log::trace!( + "shard: {}, clk: {}, op: {:?}, arg1: {:?}, arg2: {:?}, a: {:?}, b: {:?}", + rt.current_shard(), + rt.clk, + op, + arg1, + arg2, + a, + b + ); + + let mut result_words = bn_arg1_out.to_u32_digits(); + result_words.resize(nw_per_fe, 0); + + let arg1 = FieldArithMemoryAccess::write(rt, p_ptr, &result_words); + + let shard = rt.current_shard(); + Bn254FieldArithEvent { + lookup_id: rt.syscall_lookup_id, + shard, + channel: rt.current_channel(), + clk: start_clk, + op, + arg1, + arg2, + a, + b, + } +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct FieldArithMemoryAccess { + pub ptr: u32, + pub memory_records: Vec, +} + +impl FieldArithMemoryAccess { + pub fn read(rt: &mut SyscallContext, ptr: u32, len: usize) -> Self { + let (memory_records, _) = rt.mr_slice(ptr, len); + Self { ptr, memory_records } + } + + pub fn value_as_biguint(&self) -> BigUint { + BigUint::from_bytes_le( + &self + .memory_records + .iter() + .flat_map(|word| word.value.to_le_bytes()) + .collect::>(), + ) + } +} + +impl FieldArithMemoryAccess { + pub fn write(rt: &mut SyscallContext, ptr: u32, values: &[u32]) -> Self { + Self { ptr, memory_records: rt.mw_slice(ptr, &values) } + } + + pub fn prev_value_as_biguint(&self) -> BigUint { + BigUint::from_bytes_le( + &self + .memory_records + .iter() + .flat_map(|word| word.prev_value.to_le_bytes()) + .collect::>(), + ) + } +} diff --git a/crates/core/executor/src/events/precompiles/mod.rs b/crates/core/executor/src/events/precompiles/mod.rs index ded0f62cd2..9b0a05c501 100644 --- a/crates/core/executor/src/events/precompiles/mod.rs +++ b/crates/core/executor/src/events/precompiles/mod.rs @@ -1,3 +1,4 @@ +mod bn254_scalar; mod ec; mod edwards; mod fptower; @@ -6,6 +7,9 @@ mod sha256_compress; mod sha256_extend; mod uint256; +pub use bn254_scalar::{ + create_bn254_scalar_arith_event, Bn254FieldArithEvent, Bn254FieldOperation, NUM_WORDS_PER_FE, +}; pub use ec::*; pub use edwards::*; pub use fptower::*; diff --git a/crates/core/executor/src/executor.rs b/crates/core/executor/src/executor.rs index 991ba3cb0c..ea17ed82fd 100644 --- a/crates/core/executor/src/executor.rs +++ b/crates/core/executor/src/executor.rs @@ -770,6 +770,10 @@ impl<'a> Executor<'a> { let value = (memory_read_value).to_le_bytes()[(addr % 4) as usize]; a = ((value as i8) as i32) as u32; memory_store_value = Some(memory_read_value); + //println!( + // "[clk: {}, pc: 0x{:x}] LB: {:?} <- {:x}", + // self.state.global_clk, self.state.pc, rd, a + //); self.rw(rd, a); } Opcode::LH => { @@ -784,6 +788,10 @@ impl<'a> Executor<'a> { }; a = ((value as i16) as i32) as u32; memory_store_value = Some(memory_read_value); + //println!( + // "[clk: {}, pc: 0x{:x}] LH: {:?} <- {:x}", + // self.state.global_clk, self.state.pc, rd, a + //); self.rw(rd, a); } Opcode::LW => { @@ -793,6 +801,10 @@ impl<'a> Executor<'a> { } a = memory_read_value; memory_store_value = Some(memory_read_value); + //println!( + // "[clk: {}, pc: 0x{:x}] LW: {:?} <- {}", + // self.state.global_clk, self.state.pc, rd, a + //); self.rw(rd, a); } Opcode::LBU => { @@ -828,6 +840,10 @@ impl<'a> Executor<'a> { _ => unreachable!(), }; memory_store_value = Some(value); + //println!( + // "[clk: {}, pc: 0x{:x}] SB 0x{:x} <- 0x{:x}", + // self.state.global_clk, pc, addr, value + //); self.mw_cpu(align(addr), value, MemoryAccessPosition::Memory); } Opcode::SH => { @@ -841,6 +857,10 @@ impl<'a> Executor<'a> { _ => unreachable!(), }; memory_store_value = Some(value); + //println!( + // "[clk: {}, pc: 0x{:x}] SH 0x{:x} <- 0x{:x}", + // self.state.global_clk, pc, addr, value + //); self.mw_cpu(align(addr), value, MemoryAccessPosition::Memory); } Opcode::SW => { @@ -850,6 +870,10 @@ impl<'a> Executor<'a> { } let value = a; memory_store_value = Some(value); + //println!( + // "[clk: {}, pc: 0x{:x}] SW 0x{:x} <- 0x{:x}", + // self.state.global_clk, pc, addr, value + //); self.mw_cpu(align(addr), value, MemoryAccessPosition::Memory); } @@ -941,9 +965,18 @@ impl<'a> Executor<'a> { return Err(ExecutionError::InvalidSyscallUsage(syscall_id as u64)); } + let global_clk = self.state.global_clk; let syscall_impl = self.get_syscall(syscall).cloned(); let mut precompile_rt = SyscallContext::new(self); precompile_rt.syscall_lookup_id = syscall_lookup_id; + log::trace!( + "[clk: {}, pc: 0x{:x}] ecall syscall_id=0x{:x}, b: 0x{:x}, c: 0x{:x}", + global_clk, + pc, + syscall_id, + b, + c, + ); let (precompile_next_pc, precompile_cycles, returned_exit_code) = if let Some(syscall_impl) = syscall_impl { // Executing a syscall optionally returns a value to write to the t0 @@ -991,7 +1024,20 @@ impl<'a> Executor<'a> { _ => (self.opts.split_opts.deferred, 1), }; let nonce = (((*syscall_count as usize) % threshold) * multiplier) as u32; - self.record.nonce_lookup.insert(syscall_lookup_id, nonce); + // FIXME + match syscall { + SyscallCode::BN254_SCALAR_MAC + | SyscallCode::BN254_SCALAR_MUL + | SyscallCode::MEMCPY_32 + | SyscallCode::MEMCPY_64 => {} + _ => { + self.record.nonce_lookup.insert(syscall_lookup_id, nonce); + } + } + + //log::info!( + // "execute_instruction {syscall:?} {syscall_count} {nonce} {syscall_lookup_id}" + //); *syscall_count += 1; } Opcode::EBREAK => { diff --git a/crates/core/executor/src/record.rs b/crates/core/executor/src/record.rs index ab78477f02..27fb832efb 100644 --- a/crates/core/executor/src/record.rs +++ b/crates/core/executor/src/record.rs @@ -8,11 +8,11 @@ use serde::{Deserialize, Serialize}; use super::{program::Program, Opcode}; use crate::events::{ - add_sharded_byte_lookup_events, AluEvent, ByteLookupEvent, ByteRecord, CpuEvent, - EdDecompressEvent, EllipticCurveAddEvent, EllipticCurveDecompressEvent, + add_sharded_byte_lookup_events, AluEvent, Bn254FieldArithEvent, ByteLookupEvent, ByteRecord, + CpuEvent, EdDecompressEvent, EllipticCurveAddEvent, EllipticCurveDecompressEvent, EllipticCurveDoubleEvent, Fp2AddSubEvent, Fp2MulEvent, FpOpEvent, KeccakPermuteEvent, LookupId, - MemoryInitializeFinalizeEvent, MemoryRecordEnum, ShaCompressEvent, ShaExtendEvent, - Uint256MulEvent, + MemCopyEvent, MemoryInitializeFinalizeEvent, MemoryRecordEnum, ShaCompressEvent, + ShaExtendEvent, Uint256MulEvent, }; /// A record of the execution of a program. @@ -86,6 +86,12 @@ pub struct ExecutionRecord { pub bn254_fp2_addsub_events: Vec, /// A trace of the bn254 fp2 mul events. pub bn254_fp2_mul_events: Vec, + + pub bn254_scalar_mul_events: Vec, + pub bn254_scalar_mac_events: Vec, + pub memcpy32_events: Vec, + pub memcpy64_events: Vec, + /// The public values. pub public_values: PublicValues, /// The nonce lookup. @@ -156,6 +162,10 @@ impl ExecutionRecord { bn254_fp2_mul_events: std::mem::take(&mut self.bn254_fp2_mul_events), bn254_add_events: std::mem::take(&mut self.bn254_add_events), bn254_double_events: std::mem::take(&mut self.bn254_double_events), + bn254_scalar_mul_events: std::mem::take(&mut self.bn254_scalar_mul_events), + bn254_scalar_mac_events: std::mem::take(&mut self.bn254_scalar_mac_events), + memcpy32_events: std::mem::take(&mut self.memcpy32_events), + memcpy64_events: std::mem::take(&mut self.memcpy64_events), bls12381_add_events: std::mem::take(&mut self.bls12381_add_events), bls12381_double_events: std::mem::take(&mut self.bls12381_double_events), sha_extend_events: std::mem::take(&mut self.sha_extend_events), @@ -226,6 +236,11 @@ impl ExecutionRecord { split_events!(self, bn254_fp_events, shards, opts.deferred, last); split_events!(self, bn254_fp2_addsub_events, shards, opts.deferred, last); split_events!(self, bn254_fp2_mul_events, shards, opts.deferred, last); + + split_events!(self, memcpy32_events, shards, opts.deferred, last); + split_events!(self, memcpy64_events, shards, opts.deferred, last); + split_events!(self, bn254_scalar_mul_events, shards, opts.deferred, last); + split_events!(self, bn254_scalar_mac_events, shards, opts.deferred, last); // _ = last_pct; if last { @@ -330,6 +345,13 @@ impl MachineRecord for ExecutionRecord { ); stats.insert("memory_initialize_events".to_string(), self.memory_initialize_events.len()); stats.insert("memory_finalize_events".to_string(), self.memory_finalize_events.len()); + + stats.insert("bn254_scalar_mul_events".to_string(), self.bn254_scalar_mul_events.len()); + stats.insert("bn254_scalar_mac_events".to_string(), self.bn254_scalar_mac_events.len()); + + stats.insert("memcpy32_events".to_string(), self.memcpy32_events.len()); + stats.insert("memcpy64_events".to_string(), self.memcpy64_events.len()); + if !self.cpu_events.is_empty() { let shard = self.cpu_events[0].shard; stats.insert( @@ -373,6 +395,11 @@ impl MachineRecord for ExecutionRecord { self.bn254_fp2_mul_events.append(&mut other.bn254_fp2_mul_events); self.bls12381_decompress_events.append(&mut other.bls12381_decompress_events); + self.bn254_scalar_mul_events.append(&mut other.bn254_scalar_mul_events); + self.bn254_scalar_mac_events.append(&mut other.bn254_scalar_mac_events); + self.memcpy32_events.append(&mut other.memcpy32_events); + self.memcpy64_events.append(&mut other.memcpy64_events); + self.bls12381_decompress_events.append(&mut other.bls12381_decompress_events); if self.byte_lookups.is_empty() { @@ -417,6 +444,35 @@ impl MachineRecord for ExecutionRecord { self.lt_events.iter().enumerate().for_each(|(i, event)| { self.nonce_lookup.insert(event.lookup_id, i as u32); }); + + /* + self.memcpy32_events + .iter() + .enumerate() + .for_each(|(i, event)| { + self.nonce_lookup.insert(event.lookup_id, i as u32); + }); + + self.memcpy64_events + .iter() + .enumerate() + .for_each(|(i, event)| { + self.nonce_lookup.insert(event.lookup_id, i as u32); + }); + + self.bn254_scalar_mul_events + .iter() + .enumerate() + .for_each(|(i, event)| { + self.nonce_lookup.insert(event.lookup_id, i as u32); + }); + self.bn254_scalar_mac_events + .iter() + .enumerate() + .for_each(|(i, event)| { + self.nonce_lookup.insert(event.lookup_id, i as u32); + }); + */ } /// Retrieves the public values. This method is needed for the `MachineRecord` trait, since diff --git a/crates/core/executor/src/syscalls/code.rs b/crates/core/executor/src/syscalls/code.rs index ece5a06e99..fe4562cd4f 100644 --- a/crates/core/executor/src/syscalls/code.rs +++ b/crates/core/executor/src/syscalls/code.rs @@ -94,10 +94,10 @@ pub enum SyscallCode { BLS12381_DOUBLE = 0x00_00_01_1F, /// Executes the `BLS12381_FP_ADD` precompile. - BLS12381_FP_ADD = 0x00_01_01_20, + BLS12381_FP_ADD = 0x00_01_01_40, /// Executes the `BLS12381_FP_SUB` precompile. - BLS12381_FP_SUB = 0x00_01_01_21, + BLS12381_FP_SUB = 0x00_01_01_41, /// Executes the `BLS12381_FP_MUL` precompile. BLS12381_FP_MUL = 0x00_01_01_22, @@ -128,6 +128,15 @@ pub enum SyscallCode { /// Executes the `BN254_FP2_MUL` precompile. BN254_FP2_MUL = 0x00_01_01_2B, + + /// Execute the `MEMCPY_32` precompile. + MEMCPY_32 = 0x00_00_01_30, + /// Execute the `MEMCPY_64` precompile. + MEMCPY_64 = 0x00_00_01_31, + /// Execute the `BN254_SCALAR_MUL` precompile. + BN254_SCALAR_MUL = 0x00_01_01_20, + /// Execute the `BN254_SCALAR_MAC` precompile. + BN254_SCALAR_MAC = 0x00_01_01_21, } impl SyscallCode { @@ -157,8 +166,8 @@ impl SyscallCode { 0x00_00_00_F0 => SyscallCode::HINT_LEN, 0x00_00_00_F1 => SyscallCode::HINT_READ, 0x00_01_01_1D => SyscallCode::UINT256_MUL, - 0x00_01_01_20 => SyscallCode::BLS12381_FP_ADD, - 0x00_01_01_21 => SyscallCode::BLS12381_FP_SUB, + 0x00_01_01_40 => SyscallCode::BLS12381_FP_ADD, + 0x00_01_01_41 => SyscallCode::BLS12381_FP_SUB, 0x00_01_01_22 => SyscallCode::BLS12381_FP_MUL, 0x00_01_01_23 => SyscallCode::BLS12381_FP2_ADD, 0x00_01_01_24 => SyscallCode::BLS12381_FP2_SUB, @@ -170,6 +179,10 @@ impl SyscallCode { 0x00_01_01_2A => SyscallCode::BN254_FP2_SUB, 0x00_01_01_2B => SyscallCode::BN254_FP2_MUL, 0x00_00_01_1C => SyscallCode::BLS12381_DECOMPRESS, + 0x00_00_01_30 => SyscallCode::MEMCPY_32, + 0x00_00_01_31 => SyscallCode::MEMCPY_64, + 0x00_01_01_20 => SyscallCode::BN254_SCALAR_MUL, + 0x00_01_01_21 => SyscallCode::BN254_SCALAR_MAC, _ => panic!("invalid syscall number: {value}"), } } diff --git a/crates/core/executor/src/syscalls/mod.rs b/crates/core/executor/src/syscalls/mod.rs index e4286bdaab..6b5c059410 100644 --- a/crates/core/executor/src/syscalls/mod.rs +++ b/crates/core/executor/src/syscalls/mod.rs @@ -22,9 +22,11 @@ pub use code::*; pub use context::*; use hint::{HintLenSyscall, HintReadSyscall}; use precompiles::{ + bn254_scalar::{Bn254ScalarMacSyscall, Bn254ScalarMulSyscall}, edwards::{add::EdwardsAddAssignSyscall, decompress::EdwardsDecompressSyscall}, fptower::{Fp2AddSubSyscall, Fp2MulSyscall, FpOpSyscall}, keccak256::permute::Keccak256PermuteSyscall, + memcopy::MemCopySyscall, sha256::{compress::Sha256CompressSyscall, extend::Sha256ExtendSyscall}, uint256::Uint256MulSyscall, weierstrass::{ @@ -199,5 +201,16 @@ pub fn default_syscall_map() -> HashMap> { Arc::new(WeierstrassDecompressSyscall::::new()), ); + syscall_map.insert(SyscallCode::BN254_SCALAR_MUL, Arc::new(Bn254ScalarMulSyscall)); + syscall_map.insert(SyscallCode::BN254_SCALAR_MAC, Arc::new(Bn254ScalarMacSyscall)); + syscall_map.insert( + SyscallCode::MEMCPY_32, + Arc::new(MemCopySyscall::::new()), + ); + syscall_map.insert( + SyscallCode::MEMCPY_64, + Arc::new(MemCopySyscall::::new()), + ); + syscall_map } diff --git a/crates/core/executor/src/syscalls/precompiles/bn254_scalar/mod.rs b/crates/core/executor/src/syscalls/precompiles/bn254_scalar/mod.rs new file mode 100644 index 0000000000..67388b2224 --- /dev/null +++ b/crates/core/executor/src/syscalls/precompiles/bn254_scalar/mod.rs @@ -0,0 +1,33 @@ +use crate::{ + events::{create_bn254_scalar_arith_event, Bn254FieldOperation}, + syscalls::{Syscall, SyscallContext}, +}; + +pub(crate) struct Bn254ScalarMacSyscall; + +impl Syscall for Bn254ScalarMacSyscall { + fn execute(&self, rt: &mut SyscallContext, arg1: u32, arg2: u32) -> Option { + let event = create_bn254_scalar_arith_event(rt, arg1, arg2, Bn254FieldOperation::Mac); + rt.record_mut().bn254_scalar_mac_events.push(event); + + None + } + + fn num_extra_cycles(&self) -> u32 { + 1 + } +} + +pub(crate) struct Bn254ScalarMulSyscall; +impl Syscall for Bn254ScalarMulSyscall { + fn execute(&self, rt: &mut SyscallContext, arg1: u32, arg2: u32) -> Option { + let event = create_bn254_scalar_arith_event(rt, arg1, arg2, Bn254FieldOperation::Mul); + rt.record_mut().bn254_scalar_mul_events.push(event); + + None + } + + fn num_extra_cycles(&self) -> u32 { + 1 + } +} diff --git a/crates/core/executor/src/syscalls/precompiles/memcopy.rs b/crates/core/executor/src/syscalls/precompiles/memcopy.rs new file mode 100644 index 0000000000..168a1c67a3 --- /dev/null +++ b/crates/core/executor/src/syscalls/precompiles/memcopy.rs @@ -0,0 +1,46 @@ +use std::marker::PhantomData; + +use generic_array::ArrayLength; + +use crate::{ + events::MemCopyEvent, + syscalls::{Syscall, SyscallContext}, +}; + +pub struct MemCopySyscall { + _marker: PhantomData<(NumWords, NumBytes)>, +} + +impl MemCopySyscall { + pub const fn new() -> Self { + Self { _marker: PhantomData } + } +} + +impl Syscall + for MemCopySyscall +{ + fn execute(&self, ctx: &mut SyscallContext, src: u32, dst: u32) -> Option { + let (read, read_bytes) = ctx.mr_slice(src, NumWords::USIZE); + let write = ctx.mw_slice(dst, &read_bytes); + + let event = MemCopyEvent { + lookup_id: ctx.syscall_lookup_id, + shard: ctx.current_shard(), + channel: ctx.current_channel(), + clk: ctx.clk, + src_ptr: src, + dst_ptr: dst, + read_records: read, + write_records: write, + }; + (match NumWords::USIZE { + 8 => &mut ctx.record_mut().memcpy32_events, + 16 => &mut ctx.record_mut().memcpy64_events, + _ => panic!("invalid uszie {}", NumWords::USIZE), + }) + .push(event); + + None + } +} diff --git a/crates/core/executor/src/syscalls/precompiles/mod.rs b/crates/core/executor/src/syscalls/precompiles/mod.rs index f07da94609..b6d2d96b2d 100644 --- a/crates/core/executor/src/syscalls/precompiles/mod.rs +++ b/crates/core/executor/src/syscalls/precompiles/mod.rs @@ -1,6 +1,8 @@ +pub mod bn254_scalar; pub mod edwards; pub mod fptower; pub mod keccak256; +pub mod memcopy; pub mod sha256; pub mod uint256; pub mod weierstrass; diff --git a/crates/core/machine/src/cpu/trace.rs b/crates/core/machine/src/cpu/trace.rs index 5189d77747..fb970873cc 100644 --- a/crates/core/machine/src/cpu/trace.rs +++ b/crates/core/machine/src/cpu/trace.rs @@ -681,9 +681,27 @@ impl CpuChip { } // Write the syscall nonce. - ecall_cols.syscall_nonce = F::from_canonical_u32( - nonce_lookup.get(&event.syscall_lookup_id).copied().unwrap_or_default(), + let syscall_nonce = + nonce_lookup.get(&event.syscall_lookup_id).copied().unwrap_or_default(); + ecall_cols.syscall_nonce = F::from_canonical_u32(syscall_nonce); + + // FIXME + + if syscall_id == F::from_canonical_u32(SyscallCode::MEMCPY_32.syscall_id()) + || syscall_id == F::from_canonical_u32(SyscallCode::MEMCPY_64.syscall_id()) + || syscall_id == F::from_canonical_u32(SyscallCode::BN254_SCALAR_MAC.syscall_id()) + || syscall_id == F::from_canonical_u32(SyscallCode::BN254_SCALAR_MUL.syscall_id()) + { + ecall_cols.syscall_nonce = F::from_canonical_u32(0); + } + + /* + log::info!( + "populate_ecall syscall_lookup_id {} syscall_nonce {} syscall_id {syscall_id:?}", + event.syscall_lookup_id, + syscall_nonce ); + */ is_halt = syscall_id == F::from_canonical_u32(SyscallCode::HALT.syscall_id()); diff --git a/crates/core/machine/src/lib.rs b/crates/core/machine/src/lib.rs index 6fd698c897..ec9091703d 100644 --- a/crates/core/machine/src/lib.rs +++ b/crates/core/machine/src/lib.rs @@ -30,4 +30,4 @@ pub mod utils; /// This string should be updated whenever any step in verifying an SP1 proof changes, including /// core, recursion, and plonk-bn254. This string is used to download SP1 artifacts and the gnark /// docker image. -pub const SP1_CIRCUIT_VERSION: &str = "v2.0.0"; +pub const SP1_CIRCUIT_VERSION: &str = "v2.0.0-scroll"; diff --git a/crates/core/machine/src/riscv/cost.rs b/crates/core/machine/src/riscv/cost.rs index 0da65a34cc..7f6f942938 100644 --- a/crates/core/machine/src/riscv/cost.rs +++ b/crates/core/machine/src/riscv/cost.rs @@ -1,7 +1,7 @@ use p3_baby_bear::BabyBear; use sp1_core_executor::{syscalls::SyscallCode, ExecutionReport, Opcode}; -use crate::riscv::RiscvAirDiscriminants; +use crate::{riscv::RiscvAirDiscriminants, syscall::precompiles::bn254_scalar}; use super::RiscvAir; @@ -122,6 +122,24 @@ impl CostEstimator for ExecutionReport { total_area += (bn254_fp2_mul_events as u64) * costs[&RiscvAirDiscriminants::Bn254Fp2Mul]; total_chips += 1; + let bn254_scalar_mul_events = self.syscall_counts[SyscallCode::BN254_SCALAR_MUL]; + total_area += + (bn254_scalar_mul_events as u64) * costs[&RiscvAirDiscriminants::Bn254ScalarMul]; + total_chips += 1; + + let bn254_scalar_mac_events = self.syscall_counts[SyscallCode::BN254_SCALAR_MAC]; + total_area += + (bn254_scalar_mac_events as u64) * costs[&RiscvAirDiscriminants::Bn254ScalarMac]; + total_chips += 1; + + let mem_copy_32_events = self.syscall_counts[SyscallCode::MEMCPY_32]; + total_area += (mem_copy_32_events as u64) * costs[&RiscvAirDiscriminants::MemCopy32]; + total_chips += 1; + + let mem_copy_64_events = self.syscall_counts[SyscallCode::MEMCPY_64]; + total_area += (mem_copy_64_events as u64) * costs[&RiscvAirDiscriminants::MemCopy64]; + total_chips += 1; + let bls12381_decompress_events = self.syscall_counts[SyscallCode::BLS12381_DECOMPRESS]; total_area += (bls12381_decompress_events as u64) * costs[&RiscvAirDiscriminants::Bls12381Decompress]; diff --git a/crates/core/machine/src/riscv/mod.rs b/crates/core/machine/src/riscv/mod.rs index 7fba0e1ec2..d60f46155d 100644 --- a/crates/core/machine/src/riscv/mod.rs +++ b/crates/core/machine/src/riscv/mod.rs @@ -2,7 +2,13 @@ pub mod cost; use crate::{ memory::{MemoryChipType, MemoryProgramChip}, - syscall::precompiles::fptower::{Fp2AddSubAssignChip, Fp2MulAssignChip, FpOpChip}, + syscall::{ + memcpy::{self, MemCopy32Chip, MemCopy64Chip, MemCopyChip}, + precompiles::{ + bn254_scalar::{self, Bn254ScalarMacChip}, + fptower::{Fp2AddSubAssignChip, Fp2MulAssignChip, FpOpChip}, + }, + }, }; use hashbrown::HashMap; use p3_field::PrimeField32; @@ -24,6 +30,7 @@ pub(crate) mod riscv_chips { memory::MemoryChip, program::ProgramChip, syscall::precompiles::{ + bn254_scalar::{Bn254ScalarMacChip, Bn254ScalarMulChip}, edwards::{EdAddAssignChip, EdDecompressChip}, keccak256::KeccakPermuteChip, sha256::{ShaCompressChip, ShaExtendChip}, @@ -116,6 +123,11 @@ pub enum RiscvAir { Bn254Fp2Mul(Fp2MulAssignChip), /// A precompile for BN-254 fp2 addition/subtraction. Bn254Fp2AddSub(Fp2AddSubAssignChip), + + Bn254ScalarMac(bn254_scalar::Bn254ScalarMacChip), + Bn254ScalarMul(bn254_scalar::Bn254ScalarMulChip), + MemCopy32(memcpy::MemCopy32Chip), + MemCopy64(memcpy::MemCopy64Chip), } impl RiscvAir { @@ -249,6 +261,19 @@ impl RiscvAir { costs.insert(RiscvAirDiscriminants::Bn254Fp2Mul, bn254_fp2_mul.cost()); chips.push(bn254_fp2_mul); + let bn254_scalar_mac = Chip::new(RiscvAir::Bn254ScalarMac(Bn254ScalarMacChip::new())); + costs.insert(RiscvAirDiscriminants::Bn254ScalarMac, bn254_scalar_mac.cost()); + chips.push(bn254_scalar_mac); + let bn254_scalar_mul = Chip::new(RiscvAir::Bn254ScalarMul(Bn254ScalarMulChip::new())); + costs.insert(RiscvAirDiscriminants::Bn254ScalarMul, bn254_scalar_mul.cost()); + chips.push(bn254_scalar_mul); + let mem_copy_32 = Chip::new(RiscvAir::MemCopy32(MemCopy32Chip::new())); + costs.insert(RiscvAirDiscriminants::MemCopy32, mem_copy_32.cost()); + chips.push(mem_copy_32); + let mem_copy_64 = Chip::new(RiscvAir::MemCopy64(MemCopy64Chip::new())); + costs.insert(RiscvAirDiscriminants::MemCopy64, mem_copy_64.cost()); + chips.push(mem_copy_64); + let bls12381_decompress = Chip::new(RiscvAir::Bls12381Decompress(WeierstrassDecompressChip::< SwCurve, diff --git a/crates/core/machine/src/runtime/syscall.rs b/crates/core/machine/src/runtime/syscall.rs index bb88f32257..b809c4badd 100644 --- a/crates/core/machine/src/runtime/syscall.rs +++ b/crates/core/machine/src/runtime/syscall.rs @@ -4,9 +4,11 @@ use std::sync::Arc; use serde::{Deserialize, Serialize}; use strum_macros::EnumIter; +use typenum::{U16, U32, U64, U8}; use crate::operations::field::field_op::FieldOperation; use crate::runtime::{Register, Runtime}; +use crate::syscall::precompiles::bn254_scalar::{Bn254ScalarMacChip, Bn254ScalarMulChip}; use crate::syscall::precompiles::edwards::EdAddAssignChip; use crate::syscall::precompiles::edwards::EdDecompressChip; use crate::syscall::precompiles::fptower::{Fp2AddSubSyscall, Fp2MulAssignChip, FpOpSyscall}; @@ -17,8 +19,9 @@ use crate::syscall::precompiles::weierstrass::WeierstrassAddAssignChip; use crate::syscall::precompiles::weierstrass::WeierstrassDecompressChip; use crate::syscall::precompiles::weierstrass::WeierstrassDoubleAssignChip; use crate::syscall::{ - SyscallCommit, SyscallCommitDeferred, SyscallEnterUnconstrained, SyscallExitUnconstrained, - SyscallHalt, SyscallHintLen, SyscallHintRead, SyscallVerifySP1Proof, SyscallWrite, + MemCopyChip, SyscallCommit, SyscallCommitDeferred, SyscallEnterUnconstrained, + SyscallExitUnconstrained, SyscallHalt, SyscallHintLen, SyscallHintRead, SyscallVerifySP1Proof, + SyscallWrite, }; use crate::utils::ec::edwards::ed25519::{Ed25519, Ed25519Parameters}; use crate::utils::ec::weierstrass::bls12_381::{Bls12381, Bls12381BaseField}; @@ -107,10 +110,10 @@ pub enum SyscallCode { BLS12381_DOUBLE = 0x00_00_01_1F, /// Executes the `BLS12381_FP_ADD` precompile. - BLS12381_FP_ADD = 0x00_01_01_20, + BLS12381_FP_ADD = 0x00_01_01_40, /// Executes the `BLS12381_FP_SUB` precompile. - BLS12381_FP_SUB = 0x00_01_01_21, + BLS12381_FP_SUB = 0x00_01_01_41, /// Executes the `BLS12381_FP_MUL` precompile. BLS12381_FP_MUL = 0x00_01_01_22, @@ -141,6 +144,15 @@ pub enum SyscallCode { /// Executes the `BN254_FP2_MUL` precompile. BN254_FP2_MUL = 0x00_01_01_2B, + + /// Execute the `MEMCPY_32` precompile. + MEMCPY_32 = 0x00_00_01_30, + /// Execute the `MEMCPY_64` precompile. + MEMCPY_64 = 0x00_00_01_31, + /// Execute the `BN254_SCALAR_MUL` precompile. + BN254_SCALAR_MUL = 0x00_01_01_20, + /// Execute the `BN254_SCALAR_MAC` precompile. + BN254_SCALAR_MAC = 0x00_01_01_21, } impl SyscallCode { @@ -169,8 +181,8 @@ impl SyscallCode { 0x00_00_00_F0 => SyscallCode::HINT_LEN, 0x00_00_00_F1 => SyscallCode::HINT_READ, 0x00_01_01_1D => SyscallCode::UINT256_MUL, - 0x00_01_01_20 => SyscallCode::BLS12381_FP_ADD, - 0x00_01_01_21 => SyscallCode::BLS12381_FP_SUB, + 0x00_01_01_40 => SyscallCode::BLS12381_FP_ADD, + 0x00_01_01_41 => SyscallCode::BLS12381_FP_SUB, 0x00_01_01_22 => SyscallCode::BLS12381_FP_MUL, 0x00_01_01_23 => SyscallCode::BLS12381_FP2_ADD, 0x00_01_01_24 => SyscallCode::BLS12381_FP2_SUB, @@ -182,6 +194,10 @@ impl SyscallCode { 0x00_01_01_2A => SyscallCode::BN254_FP2_SUB, 0x00_01_01_2B => SyscallCode::BN254_FP2_MUL, 0x00_00_01_1C => SyscallCode::BLS12381_DECOMPRESS, + 0x00_00_01_30 => SyscallCode::MEMCPY_32, + 0x00_00_01_31 => SyscallCode::MEMCPY_64, + 0x00_01_01_20 => SyscallCode::BN254_SCALAR_MUL, + 0x00_01_01_21 => SyscallCode::BN254_SCALAR_MAC, _ => panic!("invalid syscall number: {}", value), } } @@ -336,22 +352,12 @@ pub fn default_syscall_map() -> HashMap> { syscall_map.insert(SyscallCode::HALT, Arc::new(SyscallHalt {})); syscall_map.insert(SyscallCode::SHA_EXTEND, Arc::new(ShaExtendChip::new())); syscall_map.insert(SyscallCode::SHA_COMPRESS, Arc::new(ShaCompressChip::new())); - syscall_map.insert( - SyscallCode::ED_ADD, - Arc::new(EdAddAssignChip::::new()), - ); - syscall_map.insert( - SyscallCode::ED_DECOMPRESS, - Arc::new(EdDecompressChip::::new()), - ); - syscall_map.insert( - SyscallCode::KECCAK_PERMUTE, - Arc::new(KeccakPermuteChip::new()), - ); - syscall_map.insert( - SyscallCode::SECP256K1_ADD, - Arc::new(WeierstrassAddAssignChip::::new()), - ); + syscall_map.insert(SyscallCode::ED_ADD, Arc::new(EdAddAssignChip::::new())); + syscall_map + .insert(SyscallCode::ED_DECOMPRESS, Arc::new(EdDecompressChip::::new())); + syscall_map.insert(SyscallCode::KECCAK_PERMUTE, Arc::new(KeccakPermuteChip::new())); + syscall_map + .insert(SyscallCode::SECP256K1_ADD, Arc::new(WeierstrassAddAssignChip::::new())); syscall_map.insert( SyscallCode::SECP256K1_DOUBLE, Arc::new(WeierstrassDoubleAssignChip::::new()), @@ -360,18 +366,11 @@ pub fn default_syscall_map() -> HashMap> { SyscallCode::SECP256K1_DECOMPRESS, Arc::new(WeierstrassDecompressChip::::with_lsb_rule()), ); - syscall_map.insert( - SyscallCode::BN254_ADD, - Arc::new(WeierstrassAddAssignChip::::new()), - ); - syscall_map.insert( - SyscallCode::BN254_DOUBLE, - Arc::new(WeierstrassDoubleAssignChip::::new()), - ); - syscall_map.insert( - SyscallCode::BLS12381_ADD, - Arc::new(WeierstrassAddAssignChip::::new()), - ); + syscall_map.insert(SyscallCode::BN254_ADD, Arc::new(WeierstrassAddAssignChip::::new())); + syscall_map + .insert(SyscallCode::BN254_DOUBLE, Arc::new(WeierstrassDoubleAssignChip::::new())); + syscall_map + .insert(SyscallCode::BLS12381_ADD, Arc::new(WeierstrassAddAssignChip::::new())); syscall_map.insert( SyscallCode::BLS12381_DOUBLE, Arc::new(WeierstrassDoubleAssignChip::::new()), @@ -391,15 +390,11 @@ pub fn default_syscall_map() -> HashMap> { ); syscall_map.insert( SyscallCode::BLS12381_FP2_ADD, - Arc::new(Fp2AddSubSyscall::::new( - FieldOperation::Add, - )), + Arc::new(Fp2AddSubSyscall::::new(FieldOperation::Add)), ); syscall_map.insert( SyscallCode::BLS12381_FP2_SUB, - Arc::new(Fp2AddSubSyscall::::new( - FieldOperation::Sub, - )), + Arc::new(Fp2AddSubSyscall::::new(FieldOperation::Sub)), ); syscall_map.insert( SyscallCode::BLS12381_FP2_MUL, @@ -425,28 +420,15 @@ pub fn default_syscall_map() -> HashMap> { SyscallCode::BN254_FP2_SUB, Arc::new(Fp2AddSubSyscall::::new(FieldOperation::Sub)), ); - syscall_map.insert( - SyscallCode::BN254_FP2_MUL, - Arc::new(Fp2MulAssignChip::::new()), - ); - syscall_map.insert( - SyscallCode::ENTER_UNCONSTRAINED, - Arc::new(SyscallEnterUnconstrained::new()), - ); - syscall_map.insert( - SyscallCode::EXIT_UNCONSTRAINED, - Arc::new(SyscallExitUnconstrained::new()), - ); + syscall_map + .insert(SyscallCode::BN254_FP2_MUL, Arc::new(Fp2MulAssignChip::::new())); + syscall_map + .insert(SyscallCode::ENTER_UNCONSTRAINED, Arc::new(SyscallEnterUnconstrained::new())); + syscall_map.insert(SyscallCode::EXIT_UNCONSTRAINED, Arc::new(SyscallExitUnconstrained::new())); syscall_map.insert(SyscallCode::WRITE, Arc::new(SyscallWrite::new())); syscall_map.insert(SyscallCode::COMMIT, Arc::new(SyscallCommit::new())); - syscall_map.insert( - SyscallCode::COMMIT_DEFERRED_PROOFS, - Arc::new(SyscallCommitDeferred::new()), - ); - syscall_map.insert( - SyscallCode::VERIFY_SP1_PROOF, - Arc::new(SyscallVerifySP1Proof::new()), - ); + syscall_map.insert(SyscallCode::COMMIT_DEFERRED_PROOFS, Arc::new(SyscallCommitDeferred::new())); + syscall_map.insert(SyscallCode::VERIFY_SP1_PROOF, Arc::new(SyscallVerifySP1Proof::new())); syscall_map.insert(SyscallCode::HINT_LEN, Arc::new(SyscallHintLen::new())); syscall_map.insert(SyscallCode::HINT_READ, Arc::new(SyscallHintRead::new())); syscall_map.insert( @@ -455,6 +437,11 @@ pub fn default_syscall_map() -> HashMap> { ); syscall_map.insert(SyscallCode::UINT256_MUL, Arc::new(Uint256MulChip::new())); + syscall_map.insert(SyscallCode::BN254_SCALAR_MUL, Arc::new(Bn254ScalarMulChip::new())); + syscall_map.insert(SyscallCode::BN254_SCALAR_MAC, Arc::new(Bn254ScalarMacChip::new())); + syscall_map.insert(SyscallCode::MEMCPY_32, Arc::new(MemCopyChip::::new())); + syscall_map.insert(SyscallCode::MEMCPY_64, Arc::new(MemCopyChip::::new())); + syscall_map } @@ -580,6 +567,14 @@ mod tests { SyscallCode::BN254_FP2_MUL => { assert_eq!(code as u32, sp1_zkvm::syscalls::BN254_FP2_MUL) } + SyscallCode::BN254_SCALAR_MUL => { + assert_eq!(code as u32, sp1_zkvm::syscalls::BN254_SCALAR_MUL) + } + SyscallCode::BN254_SCALAR_MAC => { + assert_eq!(code as u32, sp1_zkvm::syscalls::BN254_SCALAR_MAC) + } + SyscallCode::MEMCPY_32 => todo!(), + SyscallCode::MEMCPY_64 => todo!(), } } } diff --git a/crates/core/machine/src/runtime/utils.rs b/crates/core/machine/src/runtime/utils.rs index 7c0ad541e7..0d45d9c10c 100644 --- a/crates/core/machine/src/runtime/utils.rs +++ b/crates/core/machine/src/runtime/utils.rs @@ -68,6 +68,13 @@ impl<'a> Runtime<'a> { registers[18], ); + log::trace!( + "[clk: {}, pc: 0x{:x}] {:?}", + self.state.global_clk, + self.state.pc, + instruction, + ); + if !self.unconstrained && self.state.global_clk % 10_000_000 == 0 { log::info!( "clk = {} pc = 0x{:x?}", diff --git a/crates/core/machine/src/syscall/memcpy.rs b/crates/core/machine/src/syscall/memcpy.rs new file mode 100644 index 0000000000..ccfac78d01 --- /dev/null +++ b/crates/core/machine/src/syscall/memcpy.rs @@ -0,0 +1,194 @@ +use generic_array::{ArrayLength, GenericArray}; +use sp1_core_executor::events::ByteRecord; +use sp1_core_executor::events::MemCopyEvent; +use sp1_core_executor::syscalls::{Syscall, SyscallCode, SyscallContext}; +use sp1_core_executor::{ExecutionRecord, Program}; +use sp1_curves::params::Limbs; +use sp1_stark::air::{MachineAir, SP1AirBuilder}; +use std::borrow::{Borrow, BorrowMut}; +use std::marker::PhantomData; + +use p3_air::{Air, AirBuilder, BaseAir}; +use p3_field::AbstractField; +use p3_field::{Field, PrimeField32}; +use p3_matrix::{dense::RowMajorMatrix, Matrix}; +use sp1_derive::AlignedBorrow; + +use crate::air::MemoryAirBuilder; +use crate::memory::{MemoryReadCols, MemoryWriteCols}; +use crate::utils::{limbs_from_access, limbs_from_prev_access, pad_rows}; + +#[derive(Debug, Clone, AlignedBorrow)] +#[repr(C)] +pub struct MemCopyCols { + is_real: T, + shard: T, + channel: T, + clk: T, + nonce: T, + src_ptr: T, + dst_ptr: T, + src_access: GenericArray, NumWords>, + dst_access: GenericArray, NumWords>, +} + +pub struct MemCopyChip { + _marker: PhantomData<(NumWords, NumBytes)>, +} + +use typenum::{U16, U32, U64, U8}; +pub type MemCopy32Chip = MemCopyChip; +pub type MemCopy64Chip = MemCopyChip; + +impl MemCopyChip { + const NUM_COLS: usize = core::mem::size_of::>(); + + pub fn new() -> Self { + println!("MemCopyChip<{}> NUM_COLS = {}", NumWords::USIZE, Self::NUM_COLS); + assert_eq!(NumWords::USIZE * 4, NumBytes::USIZE); + Self { _marker: PhantomData } + } + + pub fn syscall_id() -> u32 { + match NumBytes::USIZE { + 32 => SyscallCode::MEMCPY_32.syscall_id(), + 64 => SyscallCode::MEMCPY_64.syscall_id(), + _ => unreachable!(), + } + } +} + +impl + MachineAir for MemCopyChip +{ + type Record = ExecutionRecord; + + type Program = Program; + + fn name(&self) -> String { + format!("MemCopy{}Chip", NumWords::USIZE) + } + + fn generate_trace(&self, input: &Self::Record, output: &mut Self::Record) -> RowMajorMatrix { + let mut rows = vec![]; + let mut new_byte_lookup_events = vec![]; + let events = match NumWords::USIZE { + 8 => &input.memcpy32_events, + 16 => &input.memcpy64_events, + _ => unreachable!(), + }; + + for event in events { + let mut row = Vec::with_capacity(Self::NUM_COLS); + row.resize(Self::NUM_COLS, F::zero()); + let cols: &mut MemCopyCols = row.as_mut_slice().borrow_mut(); + + cols.is_real = F::one(); + cols.shard = F::from_canonical_u32(event.shard); + cols.channel = F::from_canonical_u8(event.channel); + cols.clk = F::from_canonical_u32(event.clk); + cols.src_ptr = F::from_canonical_u32(event.src_ptr); + cols.dst_ptr = F::from_canonical_u32(event.dst_ptr); + + /* + cols.nonce = F::from_canonical_u32( + output + .nonce_lookup + .get(&event.lookup_id) + .copied() + .expect("should not be none"), + ); + */ + + for i in 0..NumWords::USIZE { + cols.src_access[i].populate( + event.channel, + event.read_records[i], + &mut new_byte_lookup_events, + ); + } + for i in 0..NumWords::USIZE { + cols.dst_access[i].populate( + event.channel, + event.write_records[i], + &mut new_byte_lookup_events, + ); + } + + rows.push(row); + } + output.add_byte_lookup_events(new_byte_lookup_events); + + pad_rows(&mut rows, || vec![F::zero(); Self::NUM_COLS]); + + let mut trace = + RowMajorMatrix::new(rows.into_iter().flatten().collect::>(), Self::NUM_COLS); + // Write the nonces to the trace. + for i in 0..trace.height() { + let cols: &mut MemCopyCols = + trace.values[i * Self::NUM_COLS..(i + 1) * Self::NUM_COLS].borrow_mut(); + //cols.nonce = F::from_canonical_usize(i); + } + trace + } + + fn included(&self, shard: &Self::Record) -> bool { + !(match NumWords::USIZE { + 8 => &shard.memcpy32_events, + 16 => &shard.memcpy64_events, + _ => unreachable!(), + }) + .is_empty() + } +} + +impl BaseAir + for MemCopyChip +{ + fn width(&self) -> usize { + Self::NUM_COLS + } +} + +impl Air + for MemCopyChip +{ + fn eval(&self, builder: &mut AB) { + let main = builder.main(); + let row = main.row_slice(0); + let row: &MemCopyCols = (*row).borrow(); + + let src: Limbs<::Var, NumBytes> = limbs_from_prev_access(&row.src_access); + let dst: Limbs<::Var, NumBytes> = limbs_from_access(&row.dst_access); + + // TODO assert eq + + builder.eval_memory_access_slice( + row.shard, + row.channel, + row.clk.into(), + row.src_ptr, + &row.src_access, + row.is_real, + ); + builder.eval_memory_access_slice( + row.shard, + row.channel, + row.clk.into(), + row.dst_ptr, + &row.dst_access, + row.is_real, + ); + + builder.receive_syscall( + row.shard, + row.channel, + row.clk, + row.nonce, + AB::F::from_canonical_u32(Self::syscall_id()), + row.src_ptr, + row.dst_ptr, + row.is_real, + ); + } +} diff --git a/crates/core/machine/src/syscall/mod.rs b/crates/core/machine/src/syscall/mod.rs index c0363937e7..b9afd15d0b 100644 --- a/crates/core/machine/src/syscall/mod.rs +++ b/crates/core/machine/src/syscall/mod.rs @@ -1 +1,2 @@ +pub mod memcpy; pub mod precompiles; diff --git a/crates/core/machine/src/syscall/precompiles/bn254_scalar/general_field_op.rs b/crates/core/machine/src/syscall/precompiles/bn254_scalar/general_field_op.rs new file mode 100644 index 0000000000..d657390d75 --- /dev/null +++ b/crates/core/machine/src/syscall/precompiles/bn254_scalar/general_field_op.rs @@ -0,0 +1,81 @@ +use num::BigUint; +use sp1_derive::AlignedBorrow; + +use crate::operations::field::field_op::FieldOperation; +use crate::operations::field::util_air::eval_field_operation; +use crate::{ + air::Polynomial, operations::field::field_op::FieldOpCols, stark::SP1AirBuilder, + utils::ec::field::FieldParameters, +}; +use p3_field::AbstractField; +use p3_field::PrimeField32; + +#[derive(Debug, Clone, AlignedBorrow)] +pub struct GeneralFieldOpCols { + pub is_sub_div: T, + pub is_mul_div: T, + pub cols: FieldOpCols, +} + +impl GeneralFieldOpCols { + pub fn populate(&mut self, a: &BigUint, b: &BigUint, op: FieldOperation) -> BigUint { + let (is_mul_div, is_sub_div) = match op { + FieldOperation::Add => (0, 0), + FieldOperation::Sub => (0, 1), + FieldOperation::Mul => (1, 0), + FieldOperation::Div => (1, 1), + }; + self.is_mul_div = F::from_canonical_u32(is_mul_div); + self.is_sub_div = F::from_canonical_u32(is_sub_div); + self.cols.populate(a, b, op) + } +} +impl GeneralFieldOpCols { + pub fn eval< + AB: SP1AirBuilder, + A: Into> + Clone, + B: Into> + Clone, + OP: Into, + >( + &self, + builder: &mut AB, + a: &A, + b: &B, + op: OP, + ) where + V: Into, + { + let one = AB::Expr::from(AB::F::one()); + let is_sub_div: AB::Expr = self.is_sub_div.into(); + let is_mul_div: AB::Expr = self.is_mul_div.into(); + let not_sub_div = one.clone() - is_sub_div.clone(); + let not_mul_div = one - is_mul_div.clone(); + builder.assert_bool(is_sub_div.clone()); + builder.assert_bool(is_mul_div.clone()); + + // mul: 1 0 + // div: 1 1 + // add: 0 0 + // sub: 0 1 + let assigned_op: AB::Expr = AB::Expr::from(AB::F::from_canonical_u8(0b01)) + * is_sub_div.clone() + + AB::Expr::from(AB::F::from_canonical_u8(0b10)) * is_mul_div.clone(); + builder.assert_eq(assigned_op, op.into()); + + let p_a_param: Polynomial = (*a).clone().into(); + let p_b: Polynomial = (*b).clone().into(); + + let result: Polynomial = self.cols.result.clone().into(); + let p_a = &result * is_sub_div.clone() + &p_a_param * not_sub_div.clone(); + let p_result = &p_a_param * is_sub_div.clone() + &result * not_sub_div.clone(); + let p_carry: Polynomial = self.cols.carry.clone().into(); + let p_op = &p_a * &p_b * is_mul_div.clone() + (&p_a + &p_b) * not_mul_div; + + let p_op_minus_result: Polynomial = p_op - p_result; + let p_limbs = Polynomial::from_iter(P::modulus_field_iter::().map(AB::Expr::from)); + let p_vanishing = p_op_minus_result - &(&p_carry * &p_limbs); + let p_witness_low = self.cols.witness_low.0.iter().into(); + let p_witness_high = self.cols.witness_high.0.iter().into(); + eval_field_operation::(builder, &p_vanishing, &p_witness_low, &p_witness_high); + } +} diff --git a/crates/core/machine/src/syscall/precompiles/bn254_scalar/mac.rs b/crates/core/machine/src/syscall/precompiles/bn254_scalar/mac.rs new file mode 100644 index 0000000000..05303fa077 --- /dev/null +++ b/crates/core/machine/src/syscall/precompiles/bn254_scalar/mac.rs @@ -0,0 +1,290 @@ +use std::borrow::{Borrow, BorrowMut}; + +use num::BigUint; +use num::Zero; +use p3_air::{Air, AirBuilder, BaseAir}; +use p3_field::AbstractField; +use p3_field::{Field, PrimeField32}; +use p3_matrix::{dense::RowMajorMatrix, Matrix}; +use sp1_core_executor::events::Bn254FieldOperation; +use sp1_core_executor::events::ByteRecord; +use sp1_core_executor::events::FieldOperation; +use sp1_core_executor::events::NUM_WORDS_PER_FE; +use sp1_core_executor::syscalls::SyscallCode; +use sp1_core_executor::ExecutionRecord; +use sp1_core_executor::Program; +use sp1_curves::params::FieldParameters; +use sp1_curves::params::Limbs; +use sp1_curves::params::NumLimbs; +use sp1_curves::weierstrass::bn254::Bn254ScalarField; +use sp1_derive::AlignedBorrow; +use sp1_stark::air::MachineAir; +use sp1_stark::air::SP1AirBuilder; +use typenum::U8; + +use crate::air::MemoryAirBuilder; +use crate::utils::limbs_from_prev_access; +use crate::utils::pad_rows; +use crate::{ + memory::{MemoryCols, MemoryReadCols, MemoryWriteCols}, + operations::field::field_op::FieldOpCols, +}; + +const NUM_COLS: usize = core::mem::size_of::>(); +const OP: Bn254FieldOperation = Bn254FieldOperation::Mac; + +#[derive(Debug, Clone, AlignedBorrow)] +#[repr(C)] +pub struct Bn254ScalarMacCols { + is_real: T, + shard: T, + channel: T, + nonce: T, + clk: T, + arg1_ptr: T, + arg2_ptr: T, + arg1_access: [MemoryWriteCols; NUM_WORDS_PER_FE], + arg2_access: [MemoryReadCols; 2], + a_access: [MemoryReadCols; NUM_WORDS_PER_FE], + b_access: [MemoryReadCols; NUM_WORDS_PER_FE], + mul_eval: FieldOpCols, + add_eval: FieldOpCols, +} + +pub struct Bn254ScalarMacChip; + +impl Bn254ScalarMacChip { + pub fn new() -> Self { + Self + } +} + +impl MachineAir for Bn254ScalarMacChip { + type Record = ExecutionRecord; + + type Program = Program; + + fn name(&self) -> String { + "Bn254ScalarMac".to_string() + } + + fn generate_trace(&self, input: &Self::Record, output: &mut Self::Record) -> RowMajorMatrix { + let mut rows = vec![]; + let mut new_byte_lookup_events = vec![]; + + for event in input.bn254_scalar_mac_events.iter().filter(|e| e.op == OP) { + let mut row = [F::zero(); NUM_COLS]; + let cols: &mut Bn254ScalarMacCols = row.as_mut_slice().borrow_mut(); + + let arg1 = event.arg1.prev_value_as_biguint(); + let a = event.a.as_ref().unwrap().value_as_biguint(); + let b = event.b.as_ref().unwrap().value_as_biguint(); + + cols.is_real = F::one(); + cols.shard = F::from_canonical_u32(event.shard); + cols.channel = F::from_canonical_u8(event.channel); + cols.clk = F::from_canonical_u32(event.clk); + cols.arg1_ptr = F::from_canonical_u32(event.arg1.ptr); + cols.arg2_ptr = F::from_canonical_u32(event.arg2.ptr); + + /* + cols.nonce = F::from_canonical_u32( + output + .nonce_lookup + .get(&event.lookup_id) + .copied() + .expect("should not be none"), + ); + */ + + let mul = cols.mul_eval.populate( + &mut new_byte_lookup_events, + event.shard, + event.channel, + &a, + &b, + FieldOperation::Mul, + ); + cols.add_eval.populate( + &mut new_byte_lookup_events, + event.shard, + event.channel, + &arg1, + &mul, + FieldOperation::Add, + ); + + for i in 0..cols.arg1_access.len() { + cols.arg1_access[i].populate( + event.channel, + event.arg1.memory_records[i], + &mut new_byte_lookup_events, + ); + } + for i in 0..cols.arg2_access.len() { + cols.arg2_access[i].populate( + event.channel, + event.arg2.memory_records[i], + &mut new_byte_lookup_events, + ); + } + for i in 0..cols.a_access.len() { + cols.a_access[i].populate( + event.channel, + event.a.as_ref().unwrap().memory_records[i], + &mut new_byte_lookup_events, + ); + } + for i in 0..cols.b_access.len() { + cols.b_access[i].populate( + event.channel, + event.b.as_ref().unwrap().memory_records[i], + &mut new_byte_lookup_events, + ); + } + + rows.push(row); + } + output.add_byte_lookup_events(new_byte_lookup_events); + + pad_rows(&mut rows, || { + let mut row = [F::zero(); NUM_COLS]; + let cols: &mut Bn254ScalarMacCols = row.as_mut_slice().borrow_mut(); + + let zero = BigUint::zero(); + cols.mul_eval.populate(&mut vec![], 0, 0, &zero, &zero, FieldOperation::Mul); + cols.add_eval.populate(&mut vec![], 0, 0, &zero, &zero, FieldOperation::Add); + + row + }); + + let mut trace = + RowMajorMatrix::new(rows.into_iter().flatten().collect::>(), NUM_COLS); + // Write the nonces to the trace. + for i in 0..trace.height() { + let _cols: &mut Bn254ScalarMacCols = + trace.values[i * NUM_COLS..(i + 1) * NUM_COLS].borrow_mut(); + //cols.nonce = F::from_canonical_usize(i); + } + + trace + } + + fn included(&self, shard: &Self::Record) -> bool { + shard.bn254_scalar_mac_events.iter().filter(|e| e.op == OP).count() != 0 + } +} + +impl BaseAir for Bn254ScalarMacChip { + fn width(&self) -> usize { + NUM_COLS + } +} + +impl Air for Bn254ScalarMacChip +where + AB: SP1AirBuilder, +{ + fn eval(&self, builder: &mut AB) { + let main = builder.main(); + let row = main.row_slice(0); + let row: &Bn254ScalarMacCols = (*row).borrow(); + + builder.assert_bool(row.is_real); + + let arg1: Limbs<::Var, ::Limbs> = + limbs_from_prev_access(&row.arg1_access); + let arg2: Limbs<::Var, U8> = limbs_from_prev_access(&row.arg2_access); + let a: Limbs<::Var, ::Limbs> = + limbs_from_prev_access(&row.a_access); + let b: Limbs<::Var, ::Limbs> = + limbs_from_prev_access(&row.b_access); + + row.mul_eval.eval( + builder, + &a, + &b, + FieldOperation::Mul, + row.shard, + row.channel, + row.is_real, + ); + row.add_eval.eval( + builder, + &arg1, + &row.mul_eval.result, + FieldOperation::Add, + row.shard, + row.channel, + row.is_real, + ); + + for i in 0..Bn254ScalarField::NB_LIMBS { + builder + .when(row.is_real) + .assert_eq(row.add_eval.result[i], row.arg1_access[i / 4].value()[i % 4]); + } + + builder.eval_memory_access_slice( + row.shard, + row.channel, + row.clk.into(), + row.arg1_ptr, + &row.arg1_access, + row.is_real, + ); + + builder.eval_memory_access_slice( + row.shard, + row.channel, + row.clk.into(), + row.arg2_ptr, + &row.arg2_access, + row.is_real, + ); + + let a_ptr = arg2.0[0..4] + .iter() + .rev() + .cloned() + .map(|v| v.into()) + .fold(AB::Expr::zero(), |acc, b| acc * AB::Expr::from_canonical_u16(0x100) + b); + + let b_ptr = arg2.0[4..8] + .iter() + .rev() + .cloned() + .map(|v| v.into()) + .fold(AB::Expr::zero(), |acc, b| acc * AB::Expr::from_canonical_u16(0x100) + b); + + builder.eval_memory_access_slice( + row.shard, + row.channel, + row.clk.into(), + a_ptr, + &row.a_access, + row.is_real, + ); + + builder.eval_memory_access_slice( + row.shard, + row.channel, + row.clk.into(), + b_ptr, + &row.b_access, + row.is_real, + ); + + let syscall_id = AB::F::from_canonical_u32(SyscallCode::BN254_SCALAR_MAC.syscall_id()); + builder.receive_syscall( + row.shard, + row.channel, + row.clk, + row.nonce, + syscall_id, + row.arg1_ptr, + row.arg2_ptr, + row.is_real, + ); + } +} diff --git a/crates/core/machine/src/syscall/precompiles/bn254_scalar/mod.rs b/crates/core/machine/src/syscall/precompiles/bn254_scalar/mod.rs new file mode 100644 index 0000000000..8315a2ec37 --- /dev/null +++ b/crates/core/machine/src/syscall/precompiles/bn254_scalar/mod.rs @@ -0,0 +1,6 @@ +mod mac; +mod mul; +// mod general_field_op; + +pub use mac::Bn254ScalarMacChip; +pub use mul::Bn254ScalarMulChip; diff --git a/crates/core/machine/src/syscall/precompiles/bn254_scalar/mul.rs b/crates/core/machine/src/syscall/precompiles/bn254_scalar/mul.rs new file mode 100644 index 0000000000..df50bdfbdc --- /dev/null +++ b/crates/core/machine/src/syscall/precompiles/bn254_scalar/mul.rs @@ -0,0 +1,218 @@ +use std::borrow::{Borrow, BorrowMut}; + +use num::BigUint; +use num::Zero; +use p3_air::{Air, AirBuilder, BaseAir}; +use p3_field::AbstractField; +use p3_field::{Field, PrimeField32}; +use p3_matrix::{dense::RowMajorMatrix, Matrix}; +use sp1_core_executor::events::Bn254FieldOperation; +use sp1_core_executor::events::ByteRecord; +use sp1_core_executor::events::NUM_WORDS_PER_FE; +use sp1_core_executor::syscalls::SyscallCode; +use sp1_core_executor::ExecutionRecord; +use sp1_core_executor::Program; +use sp1_curves::params::FieldParameters; +use sp1_curves::params::Limbs; +use sp1_curves::params::NumLimbs; +use sp1_curves::weierstrass::bn254::Bn254ScalarField; +use sp1_derive::AlignedBorrow; +use sp1_stark::air::MachineAir; +use sp1_stark::air::SP1AirBuilder; + +use crate::air::MemoryAirBuilder; +use crate::utils::limbs_from_prev_access; +use crate::utils::pad_rows; +use crate::{ + memory::{MemoryCols, MemoryReadCols, MemoryWriteCols}, + operations::field::field_op::FieldOpCols, +}; + +const NUM_COLS: usize = core::mem::size_of::>(); +const OP: Bn254FieldOperation = Bn254FieldOperation::Mul; + +#[derive(Debug, Clone, AlignedBorrow)] +#[repr(C)] +pub struct Bn254ScalarMulCols { + is_real: T, + shard: T, + channel: T, + nonce: T, + clk: T, + p_ptr: T, + q_ptr: T, + p_access: [MemoryWriteCols; NUM_WORDS_PER_FE], + q_access: [MemoryReadCols; NUM_WORDS_PER_FE], + eval: FieldOpCols, +} + +pub struct Bn254ScalarMulChip; + +impl Bn254ScalarMulChip { + pub fn new() -> Self { + Self + } +} + +impl MachineAir for Bn254ScalarMulChip { + type Record = ExecutionRecord; + + type Program = Program; + + fn name(&self) -> String { + "Bn254ScalarMul".to_string() + } + + fn generate_trace(&self, input: &Self::Record, output: &mut Self::Record) -> RowMajorMatrix { + let mut rows = vec![]; + let mut new_byte_lookup_events = vec![]; + + for event in input.bn254_scalar_mul_events.iter().filter(|e| e.op == OP) { + let mut row = [F::zero(); NUM_COLS]; + let cols: &mut Bn254ScalarMulCols = row.as_mut_slice().borrow_mut(); + + let p = event.arg1.prev_value_as_biguint(); + let q = event.arg2.value_as_biguint(); + + cols.is_real = F::one(); + cols.shard = F::from_canonical_u32(event.shard); + cols.channel = F::from_canonical_u8(event.channel); + cols.clk = F::from_canonical_u32(event.clk); + cols.p_ptr = F::from_canonical_u32(event.arg1.ptr); + cols.q_ptr = F::from_canonical_u32(event.arg2.ptr); + + /* + cols.nonce = F::from_canonical_u32( + output + .nonce_lookup + .get(&event.lookup_id) + .copied() + .expect("should not be none"), + ); + */ + + cols.eval.populate( + &mut new_byte_lookup_events, + event.shard, + event.channel, + &p, + &q, + OP.to_field_operation(), + ); + + for i in 0..cols.p_access.len() { + cols.p_access[i].populate( + event.channel, + event.arg1.memory_records[i], + &mut new_byte_lookup_events, + ); + } + for i in 0..cols.q_access.len() { + cols.q_access[i].populate( + event.channel, + event.arg2.memory_records[i], + &mut new_byte_lookup_events, + ); + } + + rows.push(row); + } + output.add_byte_lookup_events(new_byte_lookup_events); + + pad_rows(&mut rows, || { + let mut row = [F::zero(); NUM_COLS]; + let cols: &mut Bn254ScalarMulCols = row.as_mut_slice().borrow_mut(); + + let zero = BigUint::zero(); + cols.eval.populate(&mut vec![], 0, 0, &zero, &zero, OP.to_field_operation()); + + row + }); + + let mut trace = + RowMajorMatrix::new(rows.into_iter().flatten().collect::>(), NUM_COLS); + // Write the nonces to the trace. + for i in 0..trace.height() { + let _cols: &mut Bn254ScalarMulCols = + trace.values[i * NUM_COLS..(i + 1) * NUM_COLS].borrow_mut(); + //cols.nonce = F::from_canonical_usize(i); + } + + trace + } + + fn included(&self, shard: &Self::Record) -> bool { + shard.bn254_scalar_mul_events.iter().filter(|e| e.op == OP).count() != 0 + } +} + +impl BaseAir for Bn254ScalarMulChip { + fn width(&self) -> usize { + NUM_COLS + } +} + +impl Air for Bn254ScalarMulChip +where + AB: SP1AirBuilder, + // AB::Expr: Copy, +{ + fn eval(&self, builder: &mut AB) { + let main = builder.main(); + let row = main.row_slice(0); + let row: &Bn254ScalarMulCols = (*row).borrow(); + + builder.assert_bool(row.is_real); + + let p: Limbs<::Var, ::Limbs> = + limbs_from_prev_access(&row.p_access); + let q: Limbs<::Var, ::Limbs> = + limbs_from_prev_access(&row.q_access); + + row.eval.eval( + builder, + &p, + &q, + OP.to_field_operation(), + row.shard, + row.channel, + row.is_real, + ); + + for i in 0..Bn254ScalarField::NB_LIMBS { + builder + .when(row.is_real) + .assert_eq(row.eval.result[i], row.p_access[i / 4].value()[i % 4]); + } + + builder.eval_memory_access_slice( + row.shard, + row.channel, + row.clk.into(), + row.q_ptr, + &row.q_access, + row.is_real, + ); + + builder.eval_memory_access_slice( + row.shard, + row.channel, + row.clk.into(), + row.p_ptr, + &row.p_access, + row.is_real, + ); + + let syscall_id = AB::F::from_canonical_u32(SyscallCode::BN254_SCALAR_MUL.syscall_id()); + builder.receive_syscall( + row.shard, + row.channel, + row.clk, + row.nonce, + syscall_id, + row.p_ptr, + row.q_ptr, + row.is_real, + ); + } +} diff --git a/crates/core/machine/src/syscall/precompiles/mod.rs b/crates/core/machine/src/syscall/precompiles/mod.rs index f07da94609..a93d372dd7 100644 --- a/crates/core/machine/src/syscall/precompiles/mod.rs +++ b/crates/core/machine/src/syscall/precompiles/mod.rs @@ -1,3 +1,4 @@ +pub mod bn254_scalar; pub mod edwards; pub mod fptower; pub mod keccak256; diff --git a/crates/curves/src/weierstrass/bn254.rs b/crates/curves/src/weierstrass/bn254.rs index a2dd2aa32c..346fcfad69 100644 --- a/crates/curves/src/weierstrass/bn254.rs +++ b/crates/curves/src/weierstrass/bn254.rs @@ -48,6 +48,32 @@ impl NumLimbs for Bn254BaseField { type Witness = U62; } +#[derive(Debug, Default, Clone, Copy, PartialEq, Serialize, Deserialize)] +pub struct Bn254ScalarField; + +impl FieldParameters for Bn254ScalarField { + const MODULUS: &'static [u8] = &[ + 1, 0, 0, 240, 147, 245, 225, 67, 145, 112, 185, 121, 72, 232, 51, 40, 93, 88, 129, 129, + 182, 69, 80, 184, 41, 160, 49, 225, 114, 78, 100, 48, + ]; + + // TODO: check this constant + const WITNESS_OFFSET: usize = 1usize << 13; + + fn modulus() -> BigUint { + BigUint::from_str_radix( + "21888242871839275222246405745257275088548364400416034343698204186575808495617", + 10, + ) + .unwrap() + } +} + +impl NumLimbs for Bn254ScalarField { + type Limbs = U32; + type Witness = U62; +} + impl EllipticCurveParameters for Bn254Parameters { type BaseField = Bn254BaseField; diff --git a/crates/prover/Cargo.toml b/crates/prover/Cargo.toml index a848d986d5..d1d65efc85 100644 --- a/crates/prover/Cargo.toml +++ b/crates/prover/Cargo.toml @@ -56,6 +56,7 @@ name = "e2e" path = "scripts/e2e.rs" [features] +debug = ["sp1-recursion-program/debug"] neon = ["sp1-core-machine/neon"] native-gnark = ["sp1-recursion-gnark-ffi/native"] export-tests = [] diff --git a/crates/recursion/gnark-ffi/Cargo.toml b/crates/recursion/gnark-ffi/Cargo.toml index ee53b5b4af..b3af835642 100644 --- a/crates/recursion/gnark-ffi/Cargo.toml +++ b/crates/recursion/gnark-ffi/Cargo.toml @@ -34,4 +34,5 @@ cc = "1.1" cfg-if = "1.0" [features] +default = ["native"] native = [] diff --git a/crates/recursion/gnark-ffi/go/sp1/build.go b/crates/recursion/gnark-ffi/go/sp1/build.go index 174c3f961f..ed82d68d72 100644 --- a/crates/recursion/gnark-ffi/go/sp1/build.go +++ b/crates/recursion/gnark-ffi/go/sp1/build.go @@ -96,7 +96,11 @@ func BuildPlonk(dataDir string) { _, err = srsLagrange.ReadFrom(srsLagrangeFile) if err != nil { - panic(err) + srsLagrange = trusted_setup.ToLagrange(scs, srs) + _, err = srsLagrange.WriteTo(srsLagrangeFile) + if err != nil { + panic(err) + } } } diff --git a/crates/sdk/src/provers/cuda.rs b/crates/sdk/src/provers/cuda.rs index f271530a61..8a3dd91773 100644 --- a/crates/sdk/src/provers/cuda.rs +++ b/crates/sdk/src/provers/cuda.rs @@ -41,7 +41,7 @@ impl Prover for CudaProver { &'a self, pk: &SP1ProvingKey, stdin: SP1Stdin, - _opts: ProofOpts, + opts: ProofOpts, _context: SP1Context<'a>, kind: SP1ProofKind, ) -> Result { @@ -73,10 +73,10 @@ impl Prover for CudaProver { } // Generate the shrink proof. - let compress_proof = self.cuda_prover.shrink(reduce_proof)?; + let compress_proof = self.prover.shrink(reduce_proof, opts.sp1_prover_opts)?; // Genenerate the wrap proof. - let outer_proof = self.cuda_prover.wrap_bn254(compress_proof)?; + let outer_proof = self.prover.wrap_bn254(compress_proof, opts.sp1_prover_opts)?; let plonk_bn254_aritfacts = if sp1_prover::build::sp1_dev_mode() { sp1_prover::build::try_build_plonk_bn254_artifacts_dev( diff --git a/crates/zkvm/entrypoint/src/memcpy.c b/crates/zkvm/entrypoint/src/memcpy.c new file mode 100644 index 0000000000..16f30bc2b8 --- /dev/null +++ b/crates/zkvm/entrypoint/src/memcpy.c @@ -0,0 +1,142 @@ +#include +#include + +#define MEMCPY_32 0x00000130 +#define MEMCPY_64 0x00000131 + +void *memcpy(void *restrict dest, const void *restrict src, size_t n) +{ + unsigned char *d = dest; + const unsigned char *s = src; + +#ifdef __GNUC__ +#define LS >> +#define RS << + + typedef uint32_t __attribute__((__may_alias__)) u32; + uint32_t w, x; + + for (; (uintptr_t)s % 4 && n; n--) *d++ = *s++; + + if ((uintptr_t)d % 4 == 0) { + for (; n>=64; s+=64, d+=64, n-=64) { + asm volatile( + "mv t0, %0\n" + "mv a0, %1\n" + "mv a1, %2\n" + "ecall" + : // No output operands + : "r"(MEMCPY_64), "r"(s), "r"(d) + : "t0", "a0", "a1" // Clobbered registers + ); + } + for (; n>=32; s+=32, d+=32, n-=32) { + asm volatile( + "mv t0, %0\n" + "mv a0, %1\n" + "mv a1, %2\n" + "ecall" + : // No output operands + : "r"(MEMCPY_32), "r"(s), "r"(d) + : "t0", "a0", "a1" // Clobbered registers + ); + } + for (; n>=16; s+=16, d+=16, n-=16) { + *(u32 *)(d+0) = *(u32 *)(s+0); + *(u32 *)(d+4) = *(u32 *)(s+4); + *(u32 *)(d+8) = *(u32 *)(s+8); + *(u32 *)(d+12) = *(u32 *)(s+12); + } + if (n&8) { + *(u32 *)(d+0) = *(u32 *)(s+0); + *(u32 *)(d+4) = *(u32 *)(s+4); + d += 8; s += 8; + } + if (n&4) { + *(u32 *)(d+0) = *(u32 *)(s+0); + d += 4; s += 4; + } + if (n&2) { + *d++ = *s++; *d++ = *s++; + } + if (n&1) { + *d = *s; + } + return dest; + } + + if (n >= 32) switch ((uintptr_t)d % 4) { + case 1: + w = *(u32 *)s; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + n -= 3; + for (; n>=17; s+=16, d+=16, n-=16) { + x = *(u32 *)(s+1); + *(u32 *)(d+0) = (w LS 24) | (x RS 8); + w = *(u32 *)(s+5); + *(u32 *)(d+4) = (x LS 24) | (w RS 8); + x = *(u32 *)(s+9); + *(u32 *)(d+8) = (w LS 24) | (x RS 8); + w = *(u32 *)(s+13); + *(u32 *)(d+12) = (x LS 24) | (w RS 8); + } + break; + case 2: + w = *(u32 *)s; + *d++ = *s++; + *d++ = *s++; + n -= 2; + for (; n>=18; s+=16, d+=16, n-=16) { + x = *(u32 *)(s+2); + *(u32 *)(d+0) = (w LS 16) | (x RS 16); + w = *(u32 *)(s+6); + *(u32 *)(d+4) = (x LS 16) | (w RS 16); + x = *(u32 *)(s+10); + *(u32 *)(d+8) = (w LS 16) | (x RS 16); + w = *(u32 *)(s+14); + *(u32 *)(d+12) = (x LS 16) | (w RS 16); + } + break; + case 3: + w = *(u32 *)s; + *d++ = *s++; + n -= 1; + for (; n>=19; s+=16, d+=16, n-=16) { + x = *(u32 *)(s+3); + *(u32 *)(d+0) = (w LS 8) | (x RS 24); + w = *(u32 *)(s+7); + *(u32 *)(d+4) = (x LS 8) | (w RS 24); + x = *(u32 *)(s+11); + *(u32 *)(d+8) = (w LS 8) | (x RS 24); + w = *(u32 *)(s+15); + *(u32 *)(d+12) = (x LS 8) | (w RS 24); + } + break; + } + if (n&16) { + *d++ = *s++; *d++ = *s++; *d++ = *s++; *d++ = *s++; + *d++ = *s++; *d++ = *s++; *d++ = *s++; *d++ = *s++; + *d++ = *s++; *d++ = *s++; *d++ = *s++; *d++ = *s++; + *d++ = *s++; *d++ = *s++; *d++ = *s++; *d++ = *s++; + } + if (n&8) { + *d++ = *s++; *d++ = *s++; *d++ = *s++; *d++ = *s++; + *d++ = *s++; *d++ = *s++; *d++ = *s++; *d++ = *s++; + } + if (n&4) { + *d++ = *s++; *d++ = *s++; *d++ = *s++; *d++ = *s++; + } + if (n&2) { + *d++ = *s++; *d++ = *s++; + } + if (n&1) { + *d = *s; + } + return dest; +#endif + + for (; n; n--) *d++ = *s++; + return dest; +} \ No newline at end of file diff --git a/crates/zkvm/entrypoint/src/memcpy.s b/crates/zkvm/entrypoint/src/memcpy.s index 1735cae5c7..1100370be3 100644 --- a/crates/zkvm/entrypoint/src/memcpy.s +++ b/crates/zkvm/entrypoint/src/memcpy.s @@ -201,298 +201,851 @@ // negated the permissions granted in the license. In the spirit of // permissive licensing, and of not having licensing issues being an // obstacle to adoption, that text has been removed. + .file "memcpy.c" + .option nopic + .attribute arch, "rv32im" + .attribute unaligned_access, 0 + .attribute stack_align, 16 .text - .attribute 4, 16 - .attribute 5, "rv32im" - .file "musl_memcpy.c" + .align 2 .globl memcpy - .p2align 2 - .type memcpy,@function + .type memcpy, @function memcpy: - andi a3, a1, 3 - seqz a3, a3 - seqz a4, a2 - or a3, a3, a4 - bnez a3, .LBBmemcpy0_11 - addi a5, a1, 1 - mv a6, a0 -.LBBmemcpy0_2: - lb a7, 0(a1) - addi a4, a1, 1 - addi a3, a6, 1 - sb a7, 0(a6) - addi a2, a2, -1 - andi a1, a5, 3 - snez a1, a1 - snez a6, a2 - and a7, a1, a6 - addi a5, a5, 1 - mv a1, a4 - mv a6, a3 - bnez a7, .LBBmemcpy0_2 - andi a1, a3, 3 - beqz a1, .LBBmemcpy0_12 -.LBBmemcpy0_4: - li a5, 32 - bltu a2, a5, .LBBmemcpy0_26 - li a5, 3 - beq a1, a5, .LBBmemcpy0_19 - li a5, 2 - beq a1, a5, .LBBmemcpy0_22 - li a5, 1 - bne a1, a5, .LBBmemcpy0_26 - lw a5, 0(a4) - sb a5, 0(a3) - srli a1, a5, 8 - sb a1, 1(a3) - srli a6, a5, 16 - addi a1, a3, 3 - sb a6, 2(a3) - addi a2, a2, -3 - addi a3, a4, 16 - li a4, 16 -.LBBmemcpy0_9: - lw a6, -12(a3) - srli a5, a5, 24 - slli a7, a6, 8 - lw t0, -8(a3) - or a5, a7, a5 - sw a5, 0(a1) - srli a5, a6, 24 - slli a6, t0, 8 - lw a7, -4(a3) - or a5, a6, a5 - sw a5, 4(a1) - srli a6, t0, 24 - slli t0, a7, 8 - lw a5, 0(a3) - or a6, t0, a6 - sw a6, 8(a1) - srli a6, a7, 24 - slli a7, a5, 8 - or a6, a7, a6 - sw a6, 12(a1) - addi a1, a1, 16 - addi a2, a2, -16 - addi a3, a3, 16 - bltu a4, a2, .LBBmemcpy0_9 - addi a4, a3, -13 - j .LBBmemcpy0_25 -.LBBmemcpy0_11: - mv a3, a0 - mv a4, a1 - andi a1, a3, 3 - bnez a1, .LBBmemcpy0_4 -.LBBmemcpy0_12: - li a1, 16 - bltu a2, a1, .LBBmemcpy0_15 - li a1, 15 -.LBBmemcpy0_14: - lw a5, 0(a4) - lw a6, 4(a4) - lw a7, 8(a4) - lw t0, 12(a4) - sw a5, 0(a3) - sw a6, 4(a3) - sw a7, 8(a3) - sw t0, 12(a3) - addi a4, a4, 16 - addi a2, a2, -16 - addi a3, a3, 16 - bltu a1, a2, .LBBmemcpy0_14 -.LBBmemcpy0_15: - andi a1, a2, 8 - beqz a1, .LBBmemcpy0_17 - lw a1, 0(a4) - lw a5, 4(a4) - sw a1, 0(a3) - sw a5, 4(a3) - addi a3, a3, 8 - addi a4, a4, 8 -.LBBmemcpy0_17: - andi a1, a2, 4 - beqz a1, .LBBmemcpy0_30 - lw a1, 0(a4) - sw a1, 0(a3) - addi a3, a3, 4 - addi a4, a4, 4 - j .LBBmemcpy0_30 -.LBBmemcpy0_19: - lw a5, 0(a4) - addi a1, a3, 1 - sb a5, 0(a3) - addi a2, a2, -1 - addi a3, a4, 16 - li a4, 18 -.LBBmemcpy0_20: - lw a6, -12(a3) - srli a5, a5, 8 - slli a7, a6, 24 - lw t0, -8(a3) - or a5, a7, a5 - sw a5, 0(a1) - srli a5, a6, 8 - slli a6, t0, 24 - lw a7, -4(a3) - or a5, a6, a5 - sw a5, 4(a1) - srli a6, t0, 8 - slli t0, a7, 24 - lw a5, 0(a3) - or a6, t0, a6 - sw a6, 8(a1) - srli a6, a7, 8 - slli a7, a5, 24 - or a6, a7, a6 - sw a6, 12(a1) - addi a1, a1, 16 - addi a2, a2, -16 - addi a3, a3, 16 - bltu a4, a2, .LBBmemcpy0_20 - addi a4, a3, -15 - j .LBBmemcpy0_25 -.LBBmemcpy0_22: - lw a5, 0(a4) - sb a5, 0(a3) - srli a6, a5, 8 - addi a1, a3, 2 - sb a6, 1(a3) - addi a2, a2, -2 - addi a3, a4, 16 - li a4, 17 -.LBBmemcpy0_23: - lw a6, -12(a3) - srli a5, a5, 16 - slli a7, a6, 16 - lw t0, -8(a3) - or a5, a7, a5 - sw a5, 0(a1) - srli a5, a6, 16 - slli a6, t0, 16 - lw a7, -4(a3) - or a5, a6, a5 - sw a5, 4(a1) - srli a6, t0, 16 - slli t0, a7, 16 - lw a5, 0(a3) - or a6, t0, a6 - sw a6, 8(a1) - srli a6, a7, 16 - slli a7, a5, 16 - or a6, a7, a6 - sw a6, 12(a1) - addi a1, a1, 16 - addi a2, a2, -16 - addi a3, a3, 16 - bltu a4, a2, .LBBmemcpy0_23 - addi a4, a3, -14 -.LBBmemcpy0_25: - mv a3, a1 -.LBBmemcpy0_26: - andi a1, a2, 16 - bnez a1, .LBBmemcpy0_35 - andi a1, a2, 8 - bnez a1, .LBBmemcpy0_36 -.LBBmemcpy0_28: - andi a1, a2, 4 - beqz a1, .LBBmemcpy0_30 -.LBBmemcpy0_29: - lb a1, 0(a4) - lb a5, 1(a4) - lb a6, 2(a4) - sb a1, 0(a3) - sb a5, 1(a3) - lb a1, 3(a4) - sb a6, 2(a3) - addi a4, a4, 4 - addi a5, a3, 4 - sb a1, 3(a3) - mv a3, a5 -.LBBmemcpy0_30: - andi a1, a2, 2 - bnez a1, .LBBmemcpy0_33 - andi a1, a2, 1 - bnez a1, .LBBmemcpy0_34 -.LBBmemcpy0_32: - ret -.LBBmemcpy0_33: - lb a1, 0(a4) - lb a5, 1(a4) - sb a1, 0(a3) - addi a4, a4, 2 - addi a1, a3, 2 - sb a5, 1(a3) - mv a3, a1 - andi a1, a2, 1 - beqz a1, .LBBmemcpy0_32 -.LBBmemcpy0_34: - lb a1, 0(a4) - sb a1, 0(a3) - ret -.LBBmemcpy0_35: - lb a1, 0(a4) - lb a5, 1(a4) - lb a6, 2(a4) - sb a1, 0(a3) - sb a5, 1(a3) - lb a1, 3(a4) - sb a6, 2(a3) - lb a5, 4(a4) - lb a6, 5(a4) - sb a1, 3(a3) - lb a1, 6(a4) - sb a5, 4(a3) - sb a6, 5(a3) - lb a5, 7(a4) - sb a1, 6(a3) - lb a1, 8(a4) - lb a6, 9(a4) - sb a5, 7(a3) - lb a5, 10(a4) - sb a1, 8(a3) - sb a6, 9(a3) - lb a1, 11(a4) - sb a5, 10(a3) - lb a5, 12(a4) - lb a6, 13(a4) - sb a1, 11(a3) - lb a1, 14(a4) - sb a5, 12(a3) - sb a6, 13(a3) - lb a5, 15(a4) - sb a1, 14(a3) - addi a4, a4, 16 - addi a1, a3, 16 - sb a5, 15(a3) - mv a3, a1 - andi a1, a2, 8 - beqz a1, .LBBmemcpy0_28 -.LBBmemcpy0_36: - lb a1, 0(a4) - lb a5, 1(a4) - lb a6, 2(a4) - sb a1, 0(a3) - sb a5, 1(a3) - lb a1, 3(a4) - sb a6, 2(a3) - lb a5, 4(a4) - lb a6, 5(a4) - sb a1, 3(a3) - lb a1, 6(a4) - sb a5, 4(a3) - sb a6, 5(a3) - lb a5, 7(a4) - sb a1, 6(a3) - addi a4, a4, 8 - addi a1, a3, 8 - sb a5, 7(a3) - mv a3, a1 - andi a1, a2, 4 - bnez a1, .LBBmemcpy0_29 - j .LBBmemcpy0_30 -.Lfuncmemcpy_end0: - .size memcpy, .Lfuncmemcpy_end0-memcpy - - .ident "Ubuntu clang version 14.0.6-++20220622053131+f28c006a5895-1~exp1~20220622173215.157" - .section ".note.GNU-stack","",@progbits - .addrsig \ No newline at end of file + andi a4,a1,3 + addi sp,sp,-32 + mv a5,a1 + mv a6,a0 + beq a4,zero,.L27 + beq a2,zero,.L40 + andi a3,a2,7 + mv a4,a0 + addi a0,a2,-1 + beq a3,zero,.L4 + li a1,1 + beq a3,a1,.L106 + li t0,2 + beq a3,t0,.L107 + li t1,3 + beq a3,t1,.L108 + li t2,4 + beq a3,t2,.L109 + li a7,5 + beq a3,a7,.L110 + li t3,6 + bne a3,t3,.L166 +.L111: + lbu t5,0(a5) + addi a5,a5,1 + andi t6,a5,3 + sb t5,0(a4) + addi a2,a2,-1 + addi a4,a4,1 + beq t6,zero,.L2 +.L110: + lbu a0,0(a5) + addi a5,a5,1 + andi a3,a5,3 + sb a0,0(a4) + addi a2,a2,-1 + addi a4,a4,1 + beq a3,zero,.L2 +.L109: + lbu a1,0(a5) + addi a5,a5,1 + andi t0,a5,3 + sb a1,0(a4) + addi a2,a2,-1 + addi a4,a4,1 + beq t0,zero,.L2 +.L108: + lbu t1,0(a5) + addi a5,a5,1 + andi t2,a5,3 + sb t1,0(a4) + addi a2,a2,-1 + addi a4,a4,1 + beq t2,zero,.L2 +.L107: + lbu a7,0(a5) + addi a5,a5,1 + andi t3,a5,3 + sb a7,0(a4) + addi a2,a2,-1 + addi a4,a4,1 + beq t3,zero,.L2 +.L106: + lbu t4,0(a5) + addi a5,a5,1 + andi t5,a5,3 + sb t4,0(a4) + addi a2,a2,-1 + addi a4,a4,1 + beq t5,zero,.L2 +.L163: + beq a2,zero,.L167 +.L4: + lbu a0,0(a5) + addi a5,a5,1 + addi a4,a4,1 + addi a2,a2,-1 + andi t0,a5,3 + sb a0,-1(a4) + mv a3,a5 + mv a1,a4 + mv t3,a2 + beq t0,zero,.L2 + lbu t1,0(a5) + addi a5,a5,1 + andi a7,a5,3 + sb t1,0(a4) + addi a2,a2,-1 + addi a4,a4,1 + beq a7,zero,.L2 + lbu a4,1(a3) + addi a5,a3,2 + andi t4,a5,3 + sb a4,1(a1) + addi a2,t3,-2 + addi a4,a1,2 + beq t4,zero,.L2 + lbu a2,2(a3) + addi a5,a3,3 + andi t5,a5,3 + sb a2,2(a1) + addi a4,a1,3 + addi a2,t3,-3 + beq t5,zero,.L2 + lbu t6,3(a3) + addi a4,a1,4 + addi a5,a3,4 + sb t6,-1(a4) + addi a2,t3,-4 + beq t0,zero,.L2 + lbu a0,4(a3) + addi a5,a3,5 + andi t0,a5,3 + sb a0,4(a1) + addi a4,a1,5 + addi a2,t3,-5 + beq t0,zero,.L2 + lbu t2,5(a3) + addi a5,a3,6 + andi t1,a5,3 + sb t2,5(a1) + addi a4,a1,6 + addi a2,t3,-6 + beq t1,zero,.L2 + lbu a7,6(a3) + addi a5,a3,7 + andi a3,a5,3 + sb a7,6(a1) + addi a4,a1,7 + addi a2,t3,-7 + bne a3,zero,.L163 +.L2: + andi a1,a4,3 + bne a1,zero,.L8 + li t5,63 + bleu a2,t5,.L29 + addi t4,a2,-64 + andi t3,t4,-64 + addi t2,t3,64 + addi t1,t2,-64 + srli a3,t1,6 + addi a7,a3,1 + andi a1,a7,7 + mv a3,a5 + add a7,a4,t2 + li t6,305 + beq a1,zero,.L10 + li t0,1 + beq a1,t0,.L112 + li a0,2 + beq a1,a0,.L113 + li t5,3 + beq a1,t5,.L114 + li t4,4 + beq a1,t4,.L115 + li t3,5 + beq a1,t3,.L116 + li t1,6 + bne a1,t1,.L168 +.L117: + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, a3 +mv a1, a4 +ecall +# 0 "" 2 + #NO_APP + addi a3,a3,64 + addi a4,a4,64 +.L116: + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, a3 +mv a1, a4 +ecall +# 0 "" 2 + #NO_APP + addi a3,a3,64 + addi a4,a4,64 +.L115: + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, a3 +mv a1, a4 +ecall +# 0 "" 2 + #NO_APP + addi a3,a3,64 + addi a4,a4,64 +.L114: + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, a3 +mv a1, a4 +ecall +# 0 "" 2 + #NO_APP + addi a3,a3,64 + addi a4,a4,64 +.L113: + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, a3 +mv a1, a4 +ecall +# 0 "" 2 + #NO_APP + addi a3,a3,64 + addi a4,a4,64 +.L112: + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, a3 +mv a1, a4 +ecall +# 0 "" 2 + #NO_APP + addi a4,a4,64 + addi a3,a3,64 + beq a4,a7,.L153 +.L10: + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, a3 +mv a1, a4 +ecall +# 0 "" 2 + #NO_APP + addi t4,a3,64 + addi t5,a4,64 + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, t4 +mv a1, t5 +ecall +# 0 "" 2 + #NO_APP + addi t3,a3,128 + addi t1,a4,128 + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, t3 +mv a1, t1 +ecall +# 0 "" 2 + #NO_APP + addi t4,a3,192 + addi t5,a4,192 + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, t4 +mv a1, t5 +ecall +# 0 "" 2 + #NO_APP + addi t3,a3,256 + addi t1,a4,256 + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, t3 +mv a1, t1 +ecall +# 0 "" 2 + #NO_APP + addi t4,a3,320 + addi t5,a4,320 + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, t4 +mv a1, t5 +ecall +# 0 "" 2 + #NO_APP + addi t3,a3,384 + addi t1,a4,384 + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, t3 +mv a1, t1 +ecall +# 0 "" 2 + #NO_APP + addi t4,a3,448 + addi t5,a4,448 + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, t4 +mv a1, t5 +ecall +# 0 "" 2 + #NO_APP + addi a4,a4,512 + addi a3,a3,512 + bne a4,a7,.L10 +.L153: + add a5,a5,t2 + andi t6,a2,63 +.L9: + li a4,31 + bleu t6,a4,.L11 + li a2,304 + #APP +# 34 "memcpy.c" 1 + mv t0, a2 +mv a0, a5 +mv a1, a7 +ecall +# 0 "" 2 + #NO_APP + addi a5,a5,32 + addi a7,a7,32 + andi t6,t6,31 +.L11: + li t2,15 + bleu t6,t2,.L12 + lw t0,4(a5) + lw a1,8(a5) + lw a0,12(a5) + lw a3,0(a5) + sw t0,4(a7) + sw a1,8(a7) + sw a3,0(a7) + sw a0,12(a7) + addi a5,a5,16 + addi a7,a7,16 + addi t6,t6,-16 +.L12: + andi t3,t6,8 + beq t3,zero,.L13 + lw t1,4(a5) + lw t4,0(a5) + addi a7,a7,8 + addi a5,a5,8 + sw t1,-4(a7) + sw t4,-8(a7) +.L13: + andi t5,t6,4 + beq t5,zero,.L6 + lw a4,0(a5) + addi a7,a7,4 + addi a5,a5,4 + sw a4,-4(a7) +.L6: + andi a2,t6,2 + beq a2,zero,.L14 + lbu t2,0(a5) + lbu t0,1(a5) + addi a7,a7,2 + sb t2,-2(a7) + sb t0,-1(a7) + addi a5,a5,2 +.L14: + andi t6,t6,1 + beq t6,zero,.L40 + lbu a5,0(a5) + sb a5,0(a7) +.L40: + mv a0,a6 + addi sp,sp,32 + jr ra +.L8: + sw s0,28(sp) + sw s1,24(sp) + sw s2,20(sp) + li s0,31 + bleu a2,s0,.L159 + li s1,2 + lbu s2,0(a5) + lw a3,0(a5) + beq a1,s1,.L18 + addi t4,a2,-20 + li t6,3 + andi t2,t4,-16 + beq a1,t6,.L19 + addi t0,t2,19 + addi t6,a4,3 + add t5,a4,t0 + lbu a0,1(a5) + lbu a1,2(a5) + sub s1,t5,t6 + addi s0,s1,-16 + srli a7,s0,4 + addi t0,a5,3 + sb a0,1(a4) + sb a1,2(a4) + sb s2,0(a4) + andi t3,a7,1 + srli t4,t4,4 + mv a1,t0 + mv a0,t6 + bne t3,zero,.L160 + lw s1,1(t0) + lw a0,5(t0) + lw a1,9(t0) + srli t1,a3,24 + lw a3,13(t0) + slli s2,s1,8 + srli a7,s1,24 + slli s0,a1,8 + slli s1,a0,8 + srli a1,a1,24 + srli a0,a0,24 + slli t3,a3,8 + or t1,t1,s2 + or s2,a7,s1 + or a7,a0,s0 + or s1,a1,t3 + sw t1,0(t6) + sw s2,4(t6) + sw a7,8(t6) + sw s1,12(t6) + addi a0,a4,19 + addi a1,a5,19 + beq a0,t5,.L154 +.L160: + sw s3,16(sp) + sw s4,12(sp) + sw s5,8(sp) + sw s6,4(sp) + sw s7,0(sp) +.L20: + lw s6,1(a1) + lw s5,5(a1) + lw s4,9(a1) + lw s3,13(a1) + lw a7,17(a1) + lw a4,21(a1) + lw a5,25(a1) + srli s2,a3,24 + lw a3,29(a1) + slli s7,s6,8 + srli s1,s6,24 + srli s0,s5,24 + slli s6,s5,8 + srli t3,s4,24 + slli s5,s4,8 + slli s4,s3,8 + srli t1,s3,24 + or s2,s2,s7 + slli s3,a7,8 + or s7,s1,s6 + srli a7,a7,24 + or s1,s0,s5 + or s6,t3,s4 + slli s5,a4,8 + slli t3,a5,8 + srli a4,a4,24 + srli a5,a5,24 + slli s4,a3,8 + or s0,t1,s3 + sw s2,0(a0) + or t1,a7,s5 + or s3,a4,t3 + or s2,a5,s4 + sw s7,4(a0) + sw s1,8(a0) + sw s6,12(a0) + sw s0,16(a0) + sw t1,20(a0) + sw s3,24(a0) + sw s2,28(a0) + addi a0,a0,32 + addi a1,a1,32 + bne a0,t5,.L20 + lw s3,16(sp) + lw s4,12(sp) + lw s5,8(sp) + lw s6,4(sp) + lw s7,0(sp) +.L154: + addi a3,t4,1 + slli t5,a3,4 + addi a2,a2,-19 + j .L164 +.L167: + andi t6,a4,3 + beq t6,zero,.L169 +.L17: + andi t2,a2,16 + andi a3,a2,8 + andi a7,a2,4 + andi a0,a2,2 + andi a2,a2,1 + beq t2,zero,.L23 + sw s0,28(sp) + sw s1,24(sp) + sw s2,20(sp) + sw s3,16(sp) + sw s4,12(sp) + sw s5,8(sp) + sw s6,4(sp) + sw s7,0(sp) + lbu s7,0(a5) + lbu s6,1(a5) + lbu s5,2(a5) + lbu s4,3(a5) + lbu s3,4(a5) + lbu s2,5(a5) + lbu s1,6(a5) + lbu s0,7(a5) + lbu t0,9(a5) + lbu t6,10(a5) + lbu t5,11(a5) + lbu t4,12(a5) + lbu t3,13(a5) + lbu t1,14(a5) + lbu a1,15(a5) + lbu t2,8(a5) + sb s7,0(a4) + sb s6,1(a4) + sb s5,2(a4) + sb s4,3(a4) + sb s3,4(a4) + sb s2,5(a4) + sb s1,6(a4) + sb s0,7(a4) + sb t2,8(a4) + sb t0,9(a4) + sb t6,10(a4) + sb t5,11(a4) + sb t4,12(a4) + sb t3,13(a4) + sb t1,14(a4) + sb a1,15(a4) + lw s0,28(sp) + lw s1,24(sp) + lw s2,20(sp) + lw s3,16(sp) + lw s4,12(sp) + lw s5,8(sp) + lw s6,4(sp) + lw s7,0(sp) + addi a5,a5,16 + addi a4,a4,16 +.L23: + beq a3,zero,.L24 + lbu t2,0(a5) + lbu t0,1(a5) + lbu t6,2(a5) + lbu t5,3(a5) + lbu t4,4(a5) + lbu t3,5(a5) + lbu t1,6(a5) + lbu a3,7(a5) + sb t2,0(a4) + sb t0,1(a4) + sb t6,2(a4) + sb t5,3(a4) + sb t4,4(a4) + sb t3,5(a4) + sb t1,6(a4) + sb a3,7(a4) + addi a5,a5,8 + addi a4,a4,8 +.L24: + beq a7,zero,.L25 + lbu t2,0(a5) + lbu a7,1(a5) + lbu a1,2(a5) + lbu t0,3(a5) + sb t2,0(a4) + sb a7,1(a4) + sb a1,2(a4) + sb t0,3(a4) + addi a5,a5,4 + addi a4,a4,4 +.L25: + beq a0,zero,.L7 + lbu a0,0(a5) + lbu t6,1(a5) + addi a4,a4,2 + sb a0,-2(a4) + sb t6,-1(a4) + addi a5,a5,2 +.L7: + beq a2,zero,.L40 + lbu a5,0(a5) + mv a0,a6 + sb a5,0(a4) + addi sp,sp,32 + jr ra +.L166: + lbu a2,0(a5) + addi a5,a5,1 + andi t4,a5,3 + sb a2,0(a6) + addi a4,a6,1 + mv a2,a0 + bne t4,zero,.L111 + j .L2 +.L19: + addi t0,t2,17 + addi t6,a4,1 + add t5,a4,t0 + sub a0,t5,t6 + addi a1,a0,-16 + srli s1,a1,4 + addi t0,a5,1 + sb s2,0(a4) + andi s0,s1,1 + srli t4,t4,4 + mv a1,t0 + mv a0,t6 + bne s0,zero,.L161 + lw t3,7(t0) + lw a7,3(t0) + lw a1,11(t0) + srli t1,a3,8 + lw a3,15(t0) + slli s2,a7,24 + slli s1,t3,24 + srli a0,t3,8 + srli a7,a7,8 + slli s0,a1,24 + slli t3,a3,24 + srli a1,a1,8 + or t1,t1,s2 + or s2,a7,s1 + or a7,a0,s0 + or s1,a1,t3 + sw t1,0(t6) + sw s2,4(t6) + sw a7,8(t6) + sw s1,12(t6) + addi a0,a4,17 + addi a1,a5,17 + beq a0,t5,.L155 +.L161: + sw s3,16(sp) + sw s4,12(sp) + sw s5,8(sp) + sw s6,4(sp) + sw s7,0(sp) +.L22: + lw s6,3(a1) + lw s5,7(a1) + lw s4,11(a1) + lw s3,15(a1) + lw a7,19(a1) + lw a4,23(a1) + lw a5,27(a1) + srli s2,a3,8 + lw a3,31(a1) + slli s7,s6,24 + srli s1,s6,8 + srli s0,s5,8 + slli s6,s5,24 + srli t3,s4,8 + slli s5,s4,24 + slli s4,s3,24 + srli t1,s3,8 + or s2,s2,s7 + slli s3,a7,24 + or s7,s1,s6 + srli a7,a7,8 + or s1,s0,s5 + or s6,t3,s4 + slli s5,a4,24 + slli t3,a5,24 + srli a4,a4,8 + srli a5,a5,8 + slli s4,a3,24 + or s0,t1,s3 + sw s2,0(a0) + or t1,a7,s5 + or s3,a4,t3 + or s2,a5,s4 + sw s7,4(a0) + sw s1,8(a0) + sw s6,12(a0) + sw s0,16(a0) + sw t1,20(a0) + sw s3,24(a0) + sw s2,28(a0) + addi a0,a0,32 + addi a1,a1,32 + bne a0,t5,.L22 + lw s3,16(sp) + lw s4,12(sp) + lw s5,8(sp) + lw s6,4(sp) + lw s7,0(sp) +.L155: + addi a3,t4,1 + slli t5,a3,4 + addi a2,a2,-17 +.L164: + lw s0,28(sp) + lw s1,24(sp) + lw s2,20(sp) + add a5,t0,t5 + add a4,t6,t5 + sub a2,a2,t2 + j .L17 +.L18: + addi t3,a2,-20 + andi t2,t3,-16 + addi t4,t2,18 + addi t6,a4,2 + add t5,a4,t4 + lbu a0,1(a5) + sub t0,t5,t6 + addi t1,t0,-16 + srli a7,t1,4 + addi t0,a5,2 + sb a0,1(a4) + sb s2,0(a4) + andi s0,a7,1 + srli t4,t3,4 + mv a1,t0 + mv a0,t6 + bne s0,zero,.L162 + lw s1,2(t0) + lw t3,6(t0) + lw a1,10(t0) + srli t1,a3,16 + lw a3,14(t0) + slli s2,s1,16 + srli a7,s1,16 + srli a0,t3,16 + slli s1,t3,16 + slli s0,a1,16 + slli t3,a3,16 + srli a1,a1,16 + or t1,t1,s2 + or s2,a7,s1 + or a7,a0,s0 + or s1,a1,t3 + sw t1,0(t6) + sw s2,4(t6) + sw a7,8(t6) + sw s1,12(t6) + addi a0,a4,18 + addi a1,a5,18 + beq a0,t5,.L156 +.L162: + sw s3,16(sp) + sw s4,12(sp) + sw s5,8(sp) + sw s6,4(sp) + sw s7,0(sp) +.L21: + lw s3,2(a1) + lw s4,6(a1) + lw t3,10(a1) + lw t1,14(a1) + lw a7,18(a1) + lw a4,22(a1) + lw a5,26(a1) + srli s2,a3,16 + lw a3,30(a1) + slli s7,s3,16 + srli s1,s3,16 + slli s6,s4,16 + srli s0,s4,16 + slli s5,t3,16 + slli s4,t1,16 + srli t3,t3,16 + slli s3,a7,16 + or s2,s2,s7 + srli t1,t1,16 + or s7,s1,s6 + srli a7,a7,16 + or s1,s0,s5 + or s6,t3,s4 + slli s5,a4,16 + slli t3,a5,16 + srli a4,a4,16 + srli a5,a5,16 + slli s4,a3,16 + or s0,t1,s3 + sw s2,0(a0) + or t1,a7,s5 + or s3,a4,t3 + or s2,a5,s4 + sw s7,4(a0) + sw s1,8(a0) + sw s6,12(a0) + sw s0,16(a0) + sw t1,20(a0) + sw s3,24(a0) + sw s2,28(a0) + addi a0,a0,32 + addi a1,a1,32 + bne a0,t5,.L21 + lw s3,16(sp) + lw s4,12(sp) + lw s5,8(sp) + lw s6,4(sp) + lw s7,0(sp) +.L156: + addi t5,t4,1 + slli t5,t5,4 + addi a2,a2,-18 + j .L164 +.L27: + mv a4,a0 + j .L2 +.L159: + lw s0,28(sp) + lw s1,24(sp) + lw s2,20(sp) + j .L17 +.L168: + #APP +# 23 "memcpy.c" 1 + mv t0, t6 +mv a0, a5 +mv a1, a4 +ecall +# 0 "" 2 + #NO_APP + addi a3,a5,64 + addi a4,a4,64 + j .L117 +.L169: + mv a7,a4 + j .L11 +.L29: + mv a7,a4 + mv t6,a2 + j .L9 + .size memcpy, .-memcpy + .ident "GCC: (gc891d8dc23e1) 13.2.0" diff --git a/crates/zkvm/entrypoint/src/syscalls/bn254.rs b/crates/zkvm/entrypoint/src/syscalls/bn254.rs index 6ac4e98c1d..8ee6a8fa5d 100644 --- a/crates/zkvm/entrypoint/src/syscalls/bn254.rs +++ b/crates/zkvm/entrypoint/src/syscalls/bn254.rs @@ -50,3 +50,40 @@ pub extern "C" fn syscall_bn254_double(p: *mut [u32; 16]) { #[cfg(not(target_os = "zkvm"))] unreachable!() } + +#[allow(unused_variables)] +#[no_mangle] +pub extern "C" fn syscall_bn254_scalar_mul(p: *mut u32, q: *const u32) { + #[cfg(target_os = "zkvm")] + unsafe { + asm!( + "ecall", + in("t0") crate::syscalls::BN254_SCALAR_MUL, + in("a0") p, + in("a1") q, + ); + } + + #[cfg(not(target_os = "zkvm"))] + unreachable!() +} + +#[allow(unused_variables)] +#[no_mangle] +pub extern "C" fn syscall_bn254_scalar_mac(ret: *mut u32, a: *const u32, b: *const u32) { + let q = &[a, b]; + let q_ptr = q.as_ptr() as *const u32; + #[cfg(target_os = "zkvm")] + unsafe { + asm!( + "ecall", + in("t0") crate::syscalls::BN254_SCALAR_MAC, + in("a0") ret, + in("a1") q_ptr, + + ); + } + + #[cfg(not(target_os = "zkvm"))] + unreachable!() +} diff --git a/crates/zkvm/entrypoint/src/syscalls/mod.rs b/crates/zkvm/entrypoint/src/syscalls/mod.rs index e40728d7ed..a5b39fe794 100644 --- a/crates/zkvm/entrypoint/src/syscalls/mod.rs +++ b/crates/zkvm/entrypoint/src/syscalls/mod.rs @@ -106,15 +106,23 @@ pub const BLS12381_ADD: u32 = 0x00_01_01_1E; /// Executes the `BLS12381_DOUBLE` precompile. pub const BLS12381_DOUBLE: u32 = 0x00_00_01_1F; +/// Executes the `BN254_SCALAR_MUL` precompile +pub const BN254_SCALAR_MUL: u32 = 0x00_01_02_20; /// Executes the `BLS12381_FP_ADD` precompile. pub const BLS12381_FP_ADD: u32 = 0x00_01_01_20; +/// Executes the `BN254_SCALAR_MAC` precompile +pub const BN254_SCALAR_MAC: u32 = 0x00_01_02_21; /// Executes the `BLS12381_FP_SUB` precompile. pub const BLS12381_FP_SUB: u32 = 0x00_01_01_21; +/// Executes the `MEMCPY_32` precompile +pub const MEMCPY_32: u32 = 0x00_00_02_30; /// Executes the `BLS12381_FP_MUL` precompile. pub const BLS12381_FP_MUL: u32 = 0x00_01_01_22; +/// Executes the `MEMCPY_64` precompile +pub const MEMCPY_64: u32 = 0x00_00_02_31; /// Executes the `BLS12381_FP2_ADD` precompile. pub const BLS12381_FP2_ADD: u32 = 0x00_01_01_23; diff --git a/crates/zkvm/lib/src/lib.rs b/crates/zkvm/lib/src/lib.rs index f849859a8b..c08763e355 100644 --- a/crates/zkvm/lib/src/lib.rs +++ b/crates/zkvm/lib/src/lib.rs @@ -83,6 +83,9 @@ extern "C" { /// Decompresses a BLS12-381 point. pub fn syscall_bls12381_decompress(point: &mut [u8; 96], is_odd: bool); + pub fn syscall_bn254_scalar_mul(p: *mut u32, q: *const u32); + pub fn syscall_bn254_scalar_mac(ret: *mut u32, a: *const u32, b: *const u32); + /// Computes a big integer operation with a modulus. pub fn sys_bigint( result: *mut [u32; 8], diff --git a/examples/poseidon_bn254/.gitignore b/examples/poseidon_bn254/.gitignore new file mode 100644 index 0000000000..0be6e7269a --- /dev/null +++ b/examples/poseidon_bn254/.gitignore @@ -0,0 +1,16 @@ +# Cargo build +**/target + +# Cargo config +.cargo + +# Profile-guided optimization +/tmp +pgo-data.profdata + +# MacOS nuisances +.DS_Store + +# Proofs +**/proof-with-pis.json +**/proof-with-io.json diff --git a/examples/poseidon_bn254/program/Cargo.lock b/examples/poseidon_bn254/program/Cargo.lock new file mode 100644 index 0000000000..3334760917 --- /dev/null +++ b/examples/poseidon_bn254/program/Cargo.lock @@ -0,0 +1,834 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "tap", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "git+https://github.com/scroll-tech/ff?branch=feat/sp1#7e94aa6726837138b1b8346ec55b6ce6b593dc96" +dependencies = [ + "bitvec", + "rand_core", + "subtle", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "halo2curves" +version = "0.3.3" +source = "git+https://github.com/scroll-tech/halo2curves.git?branch=feat/sp1#366a78b34dbf3ebaed78435f8f16e033a7bcecfa" +dependencies = [ + "ff", + "group", + "lazy_static", + "num-bigint", + "num-traits", + "pasta_curves", + "paste", + "rand", + "rand_core", + "static_assertions", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "pasta_curves" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" +dependencies = [ + "blake2b_simd", + "ff", + "group", + "lazy_static", + "rand", + "static_assertions", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "poseidon-base" +version = "0.1.0" +source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=feat/sp1#30d40848eae359cf8086a061a4d3bb81bf458f63" +dependencies = [ + "bitvec", + "halo2curves", + "lazy_static", + "subtle", +] + +[[package]] +name = "poseidon_bn254-program" +version = "0.1.0" +dependencies = [ + "halo2curves", + "hex", + "poseidon-base", + "sp1-zkvm", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "serde" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "sp1-precompiles" +version = "0.1.0" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "getrandom", + "hex", + "k256", + "num", + "rand", + "serde", + "snowbridge-amcl", +] + +[[package]] +name = "sp1-zkvm" +version = "0.1.0" +dependencies = [ + "bincode", + "cfg-if", + "getrandom", + "k256", + "libm", + "once_cell", + "rand", + "serde", + "sha2", + "sp1-precompiles", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/examples/poseidon_bn254/program/Cargo.toml b/examples/poseidon_bn254/program/Cargo.toml new file mode 100644 index 0000000000..c4894356a4 --- /dev/null +++ b/examples/poseidon_bn254/program/Cargo.toml @@ -0,0 +1,15 @@ +[workspace] +[package] +version = "0.1.0" +name = "poseidon_bn254-program" +edition = "2021" + +[dependencies] +sp1-zkvm = { path = "../../../zkvm/entrypoint" } +hex = "0.4" +halo2curves = { git = "https://github.com/scroll-tech/halo2curves.git", branch = "feat/sp1" } +poseidon_base = { git = "https://github.com/scroll-tech/poseidon-circuit.git", package = "poseidon-base", branch = "feat/sp1" } + +[patch.crates-io] +ff = { git = "https://github.com/scroll-tech/ff", branch = "feat/sp1" } +halo2curves = { git = "https://github.com/scroll-tech/halo2curves.git", branch = "feat/sp1" } diff --git a/examples/poseidon_bn254/program/elf/riscv32im-succinct-zkvm-elf b/examples/poseidon_bn254/program/elf/riscv32im-succinct-zkvm-elf new file mode 100755 index 0000000000..52442a1ba7 Binary files /dev/null and b/examples/poseidon_bn254/program/elf/riscv32im-succinct-zkvm-elf differ diff --git a/examples/poseidon_bn254/program/src/main.rs b/examples/poseidon_bn254/program/src/main.rs new file mode 100644 index 0000000000..0179f5fbfa --- /dev/null +++ b/examples/poseidon_bn254/program/src/main.rs @@ -0,0 +1,32 @@ +//! A simple program to be proven inside the zkVM. +#![no_main] +sp1_zkvm::entrypoint!(main); + +use halo2curves::bn256::Fr; +use halo2curves::ff::PrimeField; +use poseidon_base::Hashable; + +pub fn main() { + let message = [Fr::from(1), Fr::from(2)]; + + let mut results = Vec::new(); + for _ in 0..20 { + println!("cycle-tracker-start: hash with domain"); + results.push(Fr::hash_with_domain(message, Fr::zero())); + println!("cycle-tracker-end: hash with domain"); + } + // Use the results in some way that the compiler can't optimize away. + let c = if results.len() > 0 { + results[0] + } else { + Fr::zero() + }; + + let mut c_le_bytes = c.to_repr().to_vec(); + c_le_bytes.reverse(); + + assert_eq!( + hex::encode(&c_le_bytes), + "115cc0f5e7d690413df64c6b9662e9cf2a3617f2743245519e19607a4417189a" + ); +} diff --git a/examples/poseidon_bn254/script/Cargo.lock b/examples/poseidon_bn254/script/Cargo.lock new file mode 100644 index 0000000000..0ef079db68 --- /dev/null +++ b/examples/poseidon_bn254/script/Cargo.lock @@ -0,0 +1,5738 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addchain" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" +dependencies = [ + "num-bigint 0.3.3", + "num-integer", + "num-traits", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "alloy-primitives" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8aa973e647ec336810a9356af8aea787249c9d00b1525359f3db29a68d231b" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b155716bab55763c95ba212806cf43d05bcc70e5f35b02bad20cf5ec7fe11fed" +dependencies = [ + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dbd17d67f3e89478c8a634416358e539e577899666c927bc3d2b1328ee9b6ca" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6da95adcf4760bb4b108fefa51d50096c5e5fdd29ee72fed3e86ee414f2e34" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck 0.4.1", + "indexmap 2.2.6", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.66", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32c8da04c1343871fb6ce5a489218f9c85323c8340a36e9106b5fc98d4dd59d5" +dependencies = [ + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.66", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a64d2d2395c1ac636b62419a7b17ec39031d6b2367e66e9acbf566e6055e9c" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.5", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.5", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.5", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.5", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.5", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "async-trait" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version 0.4.0", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "axum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "serde", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.5.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.66", + "which", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "rayon", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "bls12_381" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" +dependencies = [ + "ff 0.12.1", + "group 0.12.1", + "pairing", + "rand_core", + "subtle", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets 0.52.5", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "clap_lex" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58", + "digest 0.10.7", + "generic-array 0.14.7", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror", +] + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + +[[package]] +name = "const-hex" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "fiat-crypto", + "platforms", + "rustc_version 0.4.0", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "darling" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.66", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[package]] +name = "elf" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand", + "rlp", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-middleware", + "ethers-providers", + "ethers-signers", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "serde", + "serde_json", + "syn 2.0.66", + "toml", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.66", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array 0.14.7", + "k256", + "num_enum 0.7.2", + "once_cell", + "open-fastrlp", + "rand", + "rlp", + "serde", + "serde_json", + "strum", + "syn 2.0.66", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http 0.2.12", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand", + "sha2", + "thiserror", + "tracing", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "bitvec", + "rand_core", + "subtle", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "bitvec", + "byteorder", + "ff_derive", + "rand_core", + "subtle", +] + +[[package]] +name = "ff_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" +dependencies = [ + "addchain", + "cfg-if", + "num-bigint 0.3.3", + "num-integer", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "generic-array" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe739944a5406424e080edccb6add95685130b9f160d5407c639c7df0c5836b0" +dependencies = [ + "serde", + "typenum", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "git2" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +dependencies = [ + "bitflags 2.5.0", + "libc", + "libgit2-sys", + "log", + "url", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "memuse", + "rand_core", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "halo2" +version = "0.1.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a23c779b38253fe1538102da44ad5bd5378495a61d2c4ee18d64eaa61ae5995" +dependencies = [ + "halo2_proofs", +] + +[[package]] +name = "halo2_proofs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e925780549adee8364c7f2b685c753f6f3df23bde520c67416e93bf615933760" +dependencies = [ + "blake2b_simd", + "ff 0.12.1", + "group 0.12.1", + "pasta_curves 0.4.1", + "rand_core", + "rayon", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d8d52be92d09acc2e01dddb7fde3ad983fc6489c7db4837e605bc3fca4cb63e" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.3.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", + "serde", +] + +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "jubjub" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a575df5f985fe1cd5b2b05664ff6accfc46559032b954529fd225a2168d27b0f" +dependencies = [ + "bitvec", + "bls12_381", + "ff 0.12.1", + "group 0.12.1", + "rand_core", + "subtle", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libgit2-sys" +version = "0.16.2+1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +dependencies = [ + "cc", + "libc", + "libz-sys", + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets 0.52.5", +] + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "libz-sys" +version = "1.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "memuse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2145869435ace5ea6ea3d35f59be559317ec9a0d04e1812d5f185a87b6d36f1a" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint 0.4.5", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint 0.4.5", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p3-air" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "p3-field", + "p3-matrix", +] + +[[package]] +name = "p3-baby-bear" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "num-bigint 0.4.5", + "p3-field", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "rand", + "serde", +] + +[[package]] +name = "p3-blake3" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "blake3", + "p3-symmetric", +] + +[[package]] +name = "p3-bn254-fr" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "ff 0.13.0", + "num-bigint 0.4.5", + "p3-field", + "p3-poseidon2", + "p3-symmetric", + "rand", + "serde", +] + +[[package]] +name = "p3-challenger" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "p3-field", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-commit" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "itertools 0.12.1", + "p3-challenger", + "p3-field", + "p3-matrix", + "p3-util", + "serde", +] + +[[package]] +name = "p3-dft" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "itertools 0.12.1", + "num-bigint 0.4.5", + "num-traits", + "p3-util", + "rand", + "serde", +] + +[[package]] +name = "p3-fri" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "itertools 0.12.1", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-interpolation", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-interpolation" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-util", +] + +[[package]] +name = "p3-keccak" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "p3-symmetric", + "tiny-keccak", +] + +[[package]] +name = "p3-keccak-air" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "p3-air", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-matrix" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand", + "serde", + "tracing", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "rayon", +] + +[[package]] +name = "p3-mds" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "itertools 0.12.1", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-symmetric", + "p3-util", + "rand", +] + +[[package]] +name = "p3-merkle-tree" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "itertools 0.12.1", + "p3-commit", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-poseidon2" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "gcd", + "p3-field", + "p3-mds", + "p3-symmetric", + "rand", +] + +[[package]] +name = "p3-symmetric" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "serde", +] + +[[package]] +name = "p3-uni-stark" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "itertools 0.12.1", + "p3-air", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-util" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?rev=3b5265f9d5af36534a46caebf0617595cfb42c5a#3b5265f9d5af36534a46caebf0617595cfb42c5a" +dependencies = [ + "serde", +] + +[[package]] +name = "pairing" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" +dependencies = [ + "group 0.12.1", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "pasta_curves" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc65faf8e7313b4b1fbaa9f7ca917a0eed499a9663be71477f87993604341d8" +dependencies = [ + "blake2b_simd", + "ff 0.12.1", + "group 0.12.1", + "lazy_static", + "rand", + "static_assertions", + "subtle", +] + +[[package]] +name = "pasta_curves" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" +dependencies = [ + "blake2b_simd", + "ff 0.13.0", + "group 0.13.0", + "lazy_static", + "rand", + "static_assertions", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version 0.4.0", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "platforms" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "poseidon_bn254-script" +version = "0.1.0" +dependencies = [ + "sp1-helper", + "sp1-sdk", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.66", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.5.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.3", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rayon-scan" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f87cc11a0140b4b0da0ffc889885760c61b13672d80a908920b2c0df078fa14" +dependencies = [ + "rayon", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.29", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration", + "tokio", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", + "winreg 0.52.0", +] + +[[package]] +name = "reqwest-middleware" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a45d100244a467870f6cb763c4484d010a6bed6bd610b3676e3825d93fb4cfbd" +dependencies = [ + "anyhow", + "async-trait", + "http 1.1.0", + "reqwest 0.12.4", + "serde", + "thiserror", + "tower-service", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rrs-lib" +version = "0.1.0" +source = "git+https://github.com/GregAC/rrs.git#b23afc16b4e6a1fb5c4a73eb1e337e9400816507" +dependencies = [ + "downcast-rs", + "num_enum 0.5.11", + "paste", +] + +[[package]] +name = "ruint" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint 0.4.5", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.23", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.102.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +dependencies = [ + "ring 0.17.8", + "rustls-pki-types", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scc" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" +dependencies = [ + "sdd", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "sdd" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serial_test" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +dependencies = [ + "futures", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.5", + "num-traits", + "thiserror", + "time", +] + +[[package]] +name = "size" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fed904c7fb2856d868b92464fc8fa597fce366edea1a9cbfaa8cb5fe080bd6d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "sp1-core" +version = "0.1.0" +dependencies = [ + "anyhow", + "arrayref", + "bincode", + "blake3", + "cfg-if", + "curve25519-dalek", + "elf", + "elliptic-curve", + "generic-array 1.0.0", + "hex", + "itertools 0.12.1", + "k256", + "log", + "nohash-hasher", + "num", + "num-bigint 0.4.5", + "num_cpus", + "p3-air", + "p3-baby-bear", + "p3-blake3", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-keccak", + "p3-keccak-air", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-uni-stark", + "p3-util", + "rayon-scan", + "rrs-lib", + "serde", + "serde_with", + "size", + "snowbridge-amcl", + "sp1-derive", + "sp1-primitives", + "strum", + "strum_macros", + "tempfile", + "thiserror", + "tracing", + "tracing-forest", + "tracing-subscriber", + "typenum", + "web-time", +] + +[[package]] +name = "sp1-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp1-helper" +version = "0.1.0" +dependencies = [ + "cargo_metadata", + "chrono", +] + +[[package]] +name = "sp1-primitives" +version = "0.1.0" +dependencies = [ + "itertools 0.12.1", + "lazy_static", + "p3-baby-bear", + "p3-field", + "p3-poseidon2", + "p3-symmetric", +] + +[[package]] +name = "sp1-prover" +version = "0.1.0" +dependencies = [ + "anyhow", + "backtrace", + "bincode", + "clap", + "dirs", + "futures", + "hex", + "indicatif", + "itertools 0.12.1", + "num-bigint 0.4.5", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-field", + "rayon", + "reqwest 0.12.4", + "serde", + "serde_json", + "serial_test", + "sha2", + "size", + "sp1-core", + "sp1-primitives", + "sp1-recursion-circuit", + "sp1-recursion-compiler", + "sp1-recursion-core", + "sp1-recursion-gnark-ffi", + "sp1-recursion-program", + "subtle-encoding", + "tempfile", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "sp1-recursion-circuit" +version = "0.1.0" +dependencies = [ + "bincode", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-util", + "serde", + "sp1-core", + "sp1-recursion-compiler", + "sp1-recursion-core", + "sp1-recursion-derive", + "sp1-recursion-program", +] + +[[package]] +name = "sp1-recursion-compiler" +version = "0.1.0" +dependencies = [ + "backtrace", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "serde", + "sp1-core", + "sp1-recursion-core", + "sp1-recursion-derive", + "tracing", +] + +[[package]] +name = "sp1-recursion-core" +version = "0.1.0" +dependencies = [ + "arrayref", + "backtrace", + "ff 0.13.0", + "hashbrown 0.14.5", + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "serde", + "serde_with", + "sp1-core", + "sp1-derive", + "sp1-primitives", + "static_assertions", + "tracing", + "zkhash", +] + +[[package]] +name = "sp1-recursion-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp1-recursion-gnark-ffi" +version = "0.1.0" +dependencies = [ + "bindgen", + "cc", + "cfg-if", + "log", + "num-bigint 0.4.5", + "p3-baby-bear", + "p3-field", + "rand", + "serde", + "serde_json", + "sp1-recursion-compiler", + "tempfile", +] + +[[package]] +name = "sp1-recursion-program" +version = "0.1.0" +dependencies = [ + "itertools 0.12.1", + "p3-air", + "p3-baby-bear", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "rand", + "serde", + "sp1-core", + "sp1-recursion-compiler", + "sp1-recursion-core", + "tracing", +] + +[[package]] +name = "sp1-sdk" +version = "0.1.0" +dependencies = [ + "alloy-sol-types", + "anyhow", + "async-trait", + "axum", + "bincode", + "cfg-if", + "dirs", + "ethers", + "futures", + "hex", + "indicatif", + "log", + "num-bigint 0.4.5", + "p3-commit", + "p3-field", + "p3-matrix", + "prost", + "reqwest 0.12.4", + "reqwest-middleware", + "serde", + "serde_json", + "sha2", + "sp1-core", + "sp1-prover", + "strum", + "strum_macros", + "tempfile", + "tokio", + "tracing", + "twirp", + "vergen", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.66", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8db114c44cf843a8bacd37a146e37987a0b823a0e8bc4fdc610c9c72ab397a5" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "thiserror" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.14", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.8", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-forest" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee40835db14ddd1e3ba414292272eddde9dad04d3d4b65509656414d1c42592f" +dependencies = [ + "ansi_term", + "smallvec", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "twirp" +version = "0.3.0" +source = "git+https://github.com/github/twirp-rs.git?rev=c85f31f9c54957374e7dcb3534fc52cff0aa2dc5#c85f31f9c54957374e7dcb3534fc52cff0aa2dc5" +dependencies = [ + "async-trait", + "axum", + "bytes", + "futures", + "http 1.1.0", + "http-body-util", + "hyper 1.3.1", + "prost", + "reqwest 0.12.4", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom", + "serde", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vergen" +version = "8.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +dependencies = [ + "anyhow", + "cfg-if", + "git2", + "rustversion", + "time", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.66", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version 0.4.0", + "send_wrapper 0.6.0", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "zkhash" +version = "0.2.0" +source = "git+https://github.com/HorizenLabs/poseidon2#bb476b9ca38198cf5092487283c8b8c5d4317c4e" +dependencies = [ + "ark-ff 0.4.2", + "ark-std 0.4.0", + "bitvec", + "blake2", + "bls12_381", + "byteorder", + "cfg-if", + "group 0.12.1", + "group 0.13.0", + "halo2", + "hex", + "jubjub", + "lazy_static", + "pasta_curves 0.5.1", + "rand", + "serde", + "sha2", + "sha3", + "subtle", +] diff --git a/examples/poseidon_bn254/script/Cargo.toml b/examples/poseidon_bn254/script/Cargo.toml new file mode 100644 index 0000000000..712d15d1e1 --- /dev/null +++ b/examples/poseidon_bn254/script/Cargo.toml @@ -0,0 +1,11 @@ +[workspace] +[package] +version = "0.1.0" +name = "poseidon_bn254-script" +edition = "2021" + +[dependencies] +sp1-sdk = { path = "../../../sdk" } + +[build-dependencies] +sp1-helper = { path = "../../../helper" } \ No newline at end of file diff --git a/examples/poseidon_bn254/script/build.rs b/examples/poseidon_bn254/script/build.rs new file mode 100644 index 0000000000..32b99273cd --- /dev/null +++ b/examples/poseidon_bn254/script/build.rs @@ -0,0 +1,5 @@ +use sp1_helper::build_program; + +fn main() { + build_program("../program") +} diff --git a/examples/poseidon_bn254/script/src/main.rs b/examples/poseidon_bn254/script/src/main.rs new file mode 100644 index 0000000000..43a04adfd1 --- /dev/null +++ b/examples/poseidon_bn254/script/src/main.rs @@ -0,0 +1,26 @@ +//! A simple script to generate and verify the proof of a given program. +// use sp1_core::{SP1Prover, SP1Stdin, SP1Verifier}; +use sp1_sdk::{utils, ProverClient, SP1Stdin}; + +const ELF: &[u8] = include_bytes!("../../program/elf/riscv32im-succinct-zkvm-elf"); + +fn main() { + utils::setup_logger(); + + // Generate proof. + let mut stdin = SP1Stdin::new(); + + let client = ProverClient::new(); + let (pk, vk) = client.setup(ELF); + let mut proof = client.prove(&pk, stdin).expect("proving failed"); + + // Verify proof. + client.verify(&proof, &vk).expect("verification failed"); + + // Save proof. + proof + .save("proof-with-io.json") + .expect("saving proof failed"); + + println!("successfully generated and verified proof for the program!") +} diff --git a/tests/bn254-scalar-arith/Cargo.lock b/tests/bn254-scalar-arith/Cargo.lock new file mode 100644 index 0000000000..1824553209 --- /dev/null +++ b/tests/bn254-scalar-arith/Cargo.lock @@ -0,0 +1,953 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bn254-scalar-arith-test" +version = "0.1.0" +dependencies = [ + "num", + "sp1-zkvm", +] + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "tap", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "bitvec", + "rand_core", + "subtle", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "num" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "p3-baby-bear" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" +dependencies = [ + "num-bigint", + "p3-field", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "rand", + "serde", +] + +[[package]] +name = "p3-dft" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" +dependencies = [ + "itertools 0.12.1", + "num-bigint", + "num-traits", + "p3-util", + "rand", + "serde", +] + +[[package]] +name = "p3-matrix" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand", + "serde", + "tracing", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" + +[[package]] +name = "p3-mds" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" +dependencies = [ + "itertools 0.11.0", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-symmetric", + "p3-util", + "rand", +] + +[[package]] +name = "p3-poseidon2" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" +dependencies = [ + "gcd", + "p3-field", + "p3-mds", + "p3-symmetric", + "rand", +] + +[[package]] +name = "p3-symmetric" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "serde", +] + +[[package]] +name = "p3-util" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3.git?branch=sp1#056f328a5096049b2b308fb6dc3497249e81d354" +dependencies = [ + "serde", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +dependencies = [ + "arrayvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +dependencies = [ + "proc-macro-crate 2.0.2", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro2" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "scale-info" +version = "2.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "serde" +version = "1.0.198" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.198" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "sp1-precompiles" +version = "0.1.0" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "getrandom", + "hex", + "k256", + "num", + "rand", + "serde", + "snowbridge-amcl", +] + +[[package]] +name = "sp1-primitives" +version = "0.1.0" +dependencies = [ + "itertools 0.12.1", + "lazy_static", + "p3-baby-bear", + "p3-field", + "p3-poseidon2", + "p3-symmetric", +] + +[[package]] +name = "sp1-zkvm" +version = "0.1.0" +dependencies = [ + "bincode", + "cfg-if", + "getrandom", + "k256", + "libm", + "once_cell", + "p3-baby-bear", + "p3-field", + "rand", + "serde", + "sha2", + "sp1-precompiles", + "sp1-primitives", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/tests/bn254-scalar-arith/Cargo.toml b/tests/bn254-scalar-arith/Cargo.toml new file mode 100644 index 0000000000..0ff405e930 --- /dev/null +++ b/tests/bn254-scalar-arith/Cargo.toml @@ -0,0 +1,9 @@ +[workspace] +[package] +version = "0.1.0" +name = "bn254-scalar-arith-test" +edition = "2021" + +[dependencies] +sp1-zkvm = { path = "../../zkvm/entrypoint" } +num = { version = "0.4.1", default-features = false } \ No newline at end of file diff --git a/tests/bn254-scalar-arith/elf/riscv32im-succinct-zkvm-elf b/tests/bn254-scalar-arith/elf/riscv32im-succinct-zkvm-elf new file mode 100755 index 0000000000..b97a236049 Binary files /dev/null and b/tests/bn254-scalar-arith/elf/riscv32im-succinct-zkvm-elf differ diff --git a/tests/bn254-scalar-arith/src/main.rs b/tests/bn254-scalar-arith/src/main.rs new file mode 100644 index 0000000000..6adc9e0cc4 --- /dev/null +++ b/tests/bn254-scalar-arith/src/main.rs @@ -0,0 +1,30 @@ +#![no_main] +sp1_zkvm::entrypoint!(main); + +extern "C" { + fn syscall_bn254_scalar_mul(p: *mut u32, q: *const u32); +} + +fn main() { + let mut p: [u8; 32] = [ + 69, 44, 191, 0, 130, 148, 188, 171, 61, 47, 83, 78, 152, 132, 196, 72, 209, 29, 140, 237, + 126, 75, 223, 58, 115, 139, 235, 236, 200, 47, 2, 28, + ]; + let q: [u8; 32] = [ + 169, 1, 76, 216, 163, 152, 124, 133, 147, 234, 54, 244, 220, 34, 93, 224, 147, 90, 136, + 227, 1, 70, 214, 130, 142, 119, 53, 203, 16, 160, 133, 43, + ]; + + let c: [u8; 32] = [ + 43, 132, 167, 109, 73, 175, 44, 161, 152, 82, 20, 126, 173, 132, 9, 50, 112, 242, 217, 141, + 87, 50, 0, 64, 74, 105, 9, 124, 167, 37, 39, 37, + ]; + + // println!("cycle-tracker-start: bn254_scalar_mul"); + unsafe { + syscall_bn254_scalar_mul(p.as_mut_ptr() as *mut u32, q.as_ptr() as *const u32); + } + // println!("cycle-tracker-end: bn254_scalar_mul"); + + assert_eq!(p, c); +}