Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- "**"
paths:
- "patch-testing/**"
- "crates/**"
- "slop/**"
- "sp1-gpu/**"
Expand Down
66 changes: 61 additions & 5 deletions patch-testing/Cargo.lock

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

1 change: 1 addition & 0 deletions patch-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ sha2-v0-9-9-patched = { git = "https://github.com/sp1-patches/RustCrypto-hashes"
sha2-v0-10-6-patched = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.6-sp1-6.2.0" }
sha2-v0-10-8-patched = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.8-sp1-6.2.0" }
sha2-v0-10-9-patched = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.9-sp1-6.2.0" }
sha2-v0-11-0-patched = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.11.0-sp1-6.2.0" }
sha3-v0-10-8-patched = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha3", tag = "patch-sha3-0.10.8-sp1-6.2.0" }
crypto-bigint-patched = { git = "https://github.com/sp1-patches/RustCrypto-bigint", tag = "patch-0.5.5-sp1-6.2.0", package = "crypto-bigint" }
tiny-keccak-patched = { git = "https://github.com/sp1-patches/tiny-keccak", tag = "patch-2.0.2-sp1-6.2.0", package = "tiny-keccak", features = [
Expand Down
1 change: 1 addition & 0 deletions patch-testing/build-host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ sha2-v0-9-9-patched = { workspace = true }
sha2-v0-10-6-patched = { workspace = true }
sha2-v0-10-8-patched = { workspace = true }
sha2-v0-10-9-patched = { workspace = true }
sha2-v0-11-0-patched = { workspace = true }
sha3-v0-10-8-patched = { workspace = true }
crypto-bigint-patched = { workspace = true }
tiny-keccak-patched = { workspace = true }
Expand Down
4 changes: 4 additions & 0 deletions patch-testing/sha/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ fn main() {
"./program",
BuildArgs { features: vec!["v0-10-9".to_string()], ..Default::default() },
);
sp1_build::build_program_with_args(
"./program",
BuildArgs { features: vec!["v0-11-0".to_string()], ..Default::default() },
);
}
8 changes: 8 additions & 0 deletions patch-testing/sha/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ name = "sha2_v0_10_9"
path = "bin/sha2.rs"
required-features = ["v0-10-9"]

[[bin]]
name = "sha2_v0_11_0"
path = "bin/sha2.rs"
required-features = ["v0-11-0"]

[[bin]]
name = "sha3"
path = "bin/sha3.rs"
Expand All @@ -36,6 +41,7 @@ sha2-v0-9-9 = { version = "0.9.9", package = "sha2", optional = true }
sha2-v0-10-6 = { version = "0.10.6", package = "sha2", optional = true }
sha2-v0-10-8 = { version = "0.10.8", package = "sha2", optional = true }
sha2-v0-10-9 = { version = "0.10.9", package = "sha2", optional = true }
sha2-v0-11-0 = { version = "0.11.0", package = "sha2", optional = true }

sha3 = { version = "0.10.8", package = "sha3" }

Expand All @@ -44,6 +50,7 @@ v0-9-9 = ["dep:sha2-v0-9-9"]
v0-10-6 = ["dep:sha2-v0-10-6"]
v0-10-8 = ["dep:sha2-v0-10-8"]
v0-10-9 = ["dep:sha2-v0-10-9"]
v0-11-0 = ["dep:sha2-v0-11-0"]

[patch.crates-io]
sha3 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha3", tag = "patch-sha3-0.10.8-sp1-6.2.0" }
Expand All @@ -52,3 +59,4 @@ sha2-v0-9-9 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", packag
sha2-v0-10-6 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.6-sp1-6.2.0" }
sha2-v0-10-8 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.8-sp1-6.2.0" }
sha2-v0-10-9 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.9-sp1-6.2.0" }
sha2-v0-11-0 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.11.0-sp1-6.2.0" }
3 changes: 3 additions & 0 deletions patch-testing/sha/program/bin/sha2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ extern crate sha2_v0_10_8 as sha2;
#[cfg(feature = "v0-10-9")]
extern crate sha2_v0_10_9 as sha2;

#[cfg(feature = "v0-11-0")]
extern crate sha2_v0_11_0 as sha2;

use sha2::{Digest, Sha256};

/// Emits SHA_COMPRESS and SHA_EXTEND syscalls.
Expand Down
7 changes: 7 additions & 0 deletions patch-testing/sha/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ mod tests {
sha2_expected_digest_lte_100_times(stdin)
}

#[sp1_test("sha2_v0_11_0", syscalls = [SHA_COMPRESS, SHA_EXTEND], gpu, prove)]
fn test_sha2_v0_11_0_expected_digest_lte_100_times(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(SP1PublicValues) {
sha2_expected_digest_lte_100_times(stdin)
}

fn sha2_expected_digest_lte_100_times(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(SP1PublicValues) {
Expand Down
Loading