Skip to content

Commit

Permalink
use 0 as bn254 scalar nonce. FIX later
Browse files Browse the repository at this point in the history
  • Loading branch information
lispc committed Jun 27, 2024
1 parent e755c43 commit 1b558fe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/runtime/syscall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ mod tests {
SyscallCode::BN254_SCALAR_MAC => {
assert_eq!(code as u32, sp1_zkvm::syscalls::BN254_SCALAR_MAC)
}
SyscallCode::MEMCPY_32 => todo!(),
SyscallCode::MEMCPY_64 => todo!(),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions core/src/syscall/memcpy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ impl<AB: SP1AirBuilder, NumWords: ArrayLength + Sync, NumBytes: ArrayLength + Sy
row.shard,
row.channel,
row.clk,
AB::F::from_canonical_u32(0u32),
AB::F::from_canonical_u32(Self::syscall_id()),
row.src_ptr,
row.dst_ptr,
Expand Down
1 change: 1 addition & 0 deletions core/src/syscall/precompiles/bn254_scalar/mac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ where
row.shard,
row.channel,
row.clk,
AB::F::from_canonical_u32(0u32),
syscall_id,
row.arg1_ptr,
row.arg2_ptr,
Expand Down
2 changes: 2 additions & 0 deletions core/src/syscall/precompiles/bn254_scalar/mul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub struct Bn254ScalarMulCols<T> {
shard: T,
channel: T,
clk: T,
nonce: T,
p_ptr: T,
q_ptr: T,
p_access: [MemoryWriteCols<T>; NUM_WORDS_PER_FE],
Expand Down Expand Up @@ -210,6 +211,7 @@ where
row.shard,
row.channel,
row.clk,
AB::F::from_canonical_u32(0u32),
syscall_id,
row.p_ptr,
row.q_ptr,
Expand Down

0 comments on commit 1b558fe

Please sign in to comment.