Skip to content

Commit

Permalink
feat: Add sha512 test with patched sha2 crate
Browse files Browse the repository at this point in the history
  • Loading branch information
wwared committed Sep 27, 2024
1 parent 6fe9717 commit 2d76929
Show file tree
Hide file tree
Showing 6 changed files with 602 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/src/syscall/precompiles/sha512/extend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub mod extend_tests {
runtime::{ExecutionRecord, Instruction, Opcode, Program, SyscallCode},
utils::{
self, run_test,
tests::{SHA2_ELF, SHA512_EXTEND_ELF},
tests::{SHA512_ELF, SHA512_EXTEND_ELF},
},
};

Expand Down Expand Up @@ -99,12 +99,12 @@ pub mod extend_tests {
run_test(program).unwrap();
}

// #[test]
// fn test_sha512_program() { 512FIXME
// utils::setup_logger();
// let program = Program::from(SHA512_ELF);
// run_test(program).unwrap();
// }
#[test]
fn test_sha512_program() {
utils::setup_logger();
let program = Program::from(SHA512_ELF);
run_test(program).unwrap();
}

#[test]
fn test_sha512_extend_program() {
Expand Down
3 changes: 3 additions & 0 deletions core/src/utils/programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ pub mod tests {
pub const SHA2_ELF: &[u8] =
include_bytes!("../../../tests/sha2/elf/riscv32im-succinct-zkvm-elf");

pub const SHA512_ELF: &[u8] =
include_bytes!("../../../tests/sha512/elf/riscv32im-succinct-zkvm-elf");

pub const SHA512_COMPRESS_ELF: &[u8] =
include_bytes!("../../../tests/sha512-compress/elf/riscv32im-succinct-zkvm-elf");

Expand Down
Loading

0 comments on commit 2d76929

Please sign in to comment.