Skip to content

Commit

Permalink
imported correct precompile in mod.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
umadayal committed Sep 18, 2024
1 parent 80ef63d commit e2b88a9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
10 changes: 9 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/core/executor/src/programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ pub mod tests {
pub const UINT256_MUL_ELF: &[u8] =
include_bytes!("../../../../tests/uint256-mul/elf/riscv32im-succinct-zkvm-elf");

pub const UMA_MUL_ELF: &[u8] =
include_bytes!("../../../../tests/uma-test/elf/riscv32im-succinct-zkvm-elf");
pub const U256X2048_MUL_ELF: &[u8] =
include_bytes!("../../../../tests/u256x2048-mul/elf/riscv32im-succinct-zkvm-elf");

Check failure on line 97 in crates/core/executor/src/programs.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

couldn't read `crates/core/executor/src/../../../../tests/u256x2048-mul/elf/riscv32im-succinct-zkvm-elf`: No such file or directory (os error 2)

Check failure on line 97 in crates/core/executor/src/programs.rs

View workflow job for this annotation

GitHub Actions / Test (ARM)

couldn't read `crates/core/executor/src/../../../../tests/u256x2048-mul/elf/riscv32im-succinct-zkvm-elf`: No such file or directory (os error 2)

Check failure on line 97 in crates/core/executor/src/programs.rs

View workflow job for this annotation

GitHub Actions / Test (fast-experimental)

couldn't read `crates/core/executor/src/../../../../tests/u256x2048-mul/elf/riscv32im-succinct-zkvm-elf`: No such file or directory (os error 2)

Check failure on line 97 in crates/core/executor/src/programs.rs

View workflow job for this annotation

GitHub Actions / Test (x86-64)

couldn't read `crates/core/executor/src/../../../../tests/u256x2048-mul/elf/riscv32im-succinct-zkvm-elf`: No such file or directory (os error 2)

pub const BLS12381_DECOMPRESS_ELF: &[u8] =
include_bytes!("../../../../tests/bls12381-decompress/elf/riscv32im-succinct-zkvm-elf");
Expand Down
2 changes: 1 addition & 1 deletion crates/core/executor/src/syscalls/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ 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_01_01_2C => SyscallCode::UMA,
0x00_01_01_2C => SyscallCode::U256X2048_MUL,
_ => panic!("invalid syscall number: {value}"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/core/executor/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use precompiles::{
fptower::{Fp2AddSubSyscall, Fp2MulSyscall, FpOpSyscall},
keccak256::permute::Keccak256PermuteSyscall,
sha256::{compress::Sha256CompressSyscall, extend::Sha256ExtendSyscall},
u256x2048_mul::U256x2048MulSyscall,
uint256::Uint256MulSyscall,
uma::UmaSyscall,
weierstrass::{
add::WeierstrassAddAssignSyscall, decompress::WeierstrassDecompressSyscall,
double::WeierstrassDoubleAssignSyscall,
Expand Down
6 changes: 3 additions & 3 deletions crates/zkvm/entrypoint/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ mod secp256k1;
mod sha_compress;
mod sha_extend;
mod sys;
mod u256x2048_mul;
mod uint256_mul;
mod uma_mul;
mod unconstrained;
#[cfg(feature = "verify")]
mod verify;
Expand All @@ -32,8 +32,8 @@ pub use secp256k1::*;
pub use sha_compress::*;
pub use sha_extend::*;
pub use sys::*;
pub use u256x2048_mul::*;
pub use uint256_mul::*;
pub use uma_mul::*;
pub use unconstrained::*;
#[cfg(feature = "verify")]
pub use verify::*;
Expand Down Expand Up @@ -105,7 +105,7 @@ pub const BLS12381_DECOMPRESS: u32 = 0x00_00_01_1C;
pub const UINT256_MUL: u32 = 0x00_01_01_1D;

/// Executes the `UMA` precompile.
pub const UMA: u32 = 0x00_01_01_2C;
pub const U256X2048_MUL: u32 = 0x00_01_01_2C;

/// Executes the `BLS12381_ADD` precompile.
pub const BLS12381_ADD: u32 = 0x00_01_01_1E;
Expand Down
Binary file added elf/riscv32im-succinct-zkvm-elf
Binary file not shown.

0 comments on commit e2b88a9

Please sign in to comment.