From b4b24b44f0db93652bb9ecf25e8368669f90d50f Mon Sep 17 00:00:00 2001 From: Sebastian Stammler Date: Mon, 14 Sep 2026 15:56:12 +0200 Subject: [PATCH 1/3] patch-testing: add sha2 0.11.0 revm-precompile 42 requires sha2 0.11, and a `[patch.crates-io]` entry only applies to the version it names, so 0.10.9's patch leaves 0.11 unaccelerated. Co-Authored-By: Claude Fable 5.1 --- patch-testing/Cargo.lock | 66 +++++++++++++++++++++++++-- patch-testing/Cargo.toml | 1 + patch-testing/build-host/Cargo.toml | 1 + patch-testing/sha/build.rs | 4 ++ patch-testing/sha/program/Cargo.toml | 8 ++++ patch-testing/sha/program/bin/sha2.rs | 3 ++ patch-testing/sha/src/lib.rs | 7 +++ 7 files changed, 85 insertions(+), 5 deletions(-) diff --git a/patch-testing/Cargo.lock b/patch-testing/Cargo.lock index 2c3426dd52..a8ea71f1be 100644 --- a/patch-testing/Cargo.lock +++ b/patch-testing/Cargo.lock @@ -358,6 +358,15 @@ dependencies = [ "generic-array 0.14.9", ] +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + [[package]] name = "bls12_381" version = "0.8.0" @@ -418,6 +427,7 @@ dependencies = [ "sha2 0.10.6", "sha2 0.10.8", "sha2 0.10.9 (git+https://github.com/sp1-patches/RustCrypto-hashes?tag=patch-sha2-0.10.9-sp1-6.2.0)", + "sha2 0.11.0", "sha2 0.9.9 (git+https://github.com/sp1-patches/RustCrypto-hashes?tag=patch-sha2-0.9.9-sp1-6.2.0)", "sha3 0.10.8", "sp1-lib", @@ -672,6 +682,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "const_format" version = "0.2.35" @@ -864,6 +880,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + [[package]] name = "curve25519-dalek" version = "1.1.0" @@ -1081,7 +1106,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "const-oid", + "const-oid 0.9.6", "pem-rfc7468", "zeroize", ] @@ -1133,11 +1158,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid", - "crypto-common", + "const-oid 0.9.6", + "crypto-common 0.1.6", "subtle", ] +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "const-oid 0.10.2", + "crypto-common 0.2.2", +] + [[package]] name = "dirs" version = "5.0.1" @@ -1831,6 +1867,15 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" +[[package]] +name = "hybrid-array" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3944cf8cf766b40e2a1a333ee5e9b563f854d5fa49d6a8ca2764e97c6eddb214" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" version = "1.9.0" @@ -3671,7 +3716,7 @@ source = "git+https://github.com/sp1-patches/RustCrypto-RSA/?tag=patch-0.9.6-sp1 dependencies = [ "bytemuck", "cfg-if", - "const-oid", + "const-oid 0.9.6", "crypto-bigint 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.10.7", "num-bigint-dig", @@ -3693,7 +3738,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" dependencies = [ - "const-oid", + "const-oid 0.9.6", "digest 0.10.7", "num-bigint-dig", "num-integer", @@ -4087,6 +4132,7 @@ version = "1.1.0" dependencies = [ "color-eyre", "rand 0.8.5", + "sha2 0.11.0", "sha2 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.10.6", "sp1-build", @@ -4169,6 +4215,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2" +version = "0.11.0" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=patch-sha2-0.11.0-sp1-6.2.0#8993e08b9f7c47cd4a056decbf85d2d7ab3fe77c" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + [[package]] name = "sha3" version = "0.10.6" diff --git a/patch-testing/Cargo.toml b/patch-testing/Cargo.toml index 49ca8aae5e..9fd053e2a3 100644 --- a/patch-testing/Cargo.toml +++ b/patch-testing/Cargo.toml @@ -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 = [ diff --git a/patch-testing/build-host/Cargo.toml b/patch-testing/build-host/Cargo.toml index cfd979daad..b7b1d1504e 100644 --- a/patch-testing/build-host/Cargo.toml +++ b/patch-testing/build-host/Cargo.toml @@ -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 } diff --git a/patch-testing/sha/build.rs b/patch-testing/sha/build.rs index c143026ecd..94a640b717 100644 --- a/patch-testing/sha/build.rs +++ b/patch-testing/sha/build.rs @@ -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() }, + ); } diff --git a/patch-testing/sha/program/Cargo.toml b/patch-testing/sha/program/Cargo.toml index 08c8aeced2..9812c477a5 100644 --- a/patch-testing/sha/program/Cargo.toml +++ b/patch-testing/sha/program/Cargo.toml @@ -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" @@ -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" } @@ -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" } @@ -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" } diff --git a/patch-testing/sha/program/bin/sha2.rs b/patch-testing/sha/program/bin/sha2.rs index 136216a0ab..9b3993d192 100644 --- a/patch-testing/sha/program/bin/sha2.rs +++ b/patch-testing/sha/program/bin/sha2.rs @@ -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. diff --git a/patch-testing/sha/src/lib.rs b/patch-testing/sha/src/lib.rs index 6c86000184..ac559fece8 100644 --- a/patch-testing/sha/src/lib.rs +++ b/patch-testing/sha/src/lib.rs @@ -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) { From 45e25d6e955a5a62b090005ebe5ade94f97fd2c7 Mon Sep 17 00:00:00 2001 From: Taehoon Kim Date: Sun, 20 Sep 2026 20:24:50 -0700 Subject: [PATCH 2/3] ci: run required checks for patch tests --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c2b0d032bf..db752eaf04 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,6 +7,7 @@ on: branches: - "**" paths: + - "patch-testing/**" - "crates/**" - "slop/**" - "sp1-gpu/**" @@ -452,8 +453,7 @@ jobs: # runs-on: [runs-on, runner=16cpu-linux-x64, disk=large, "run-id=${{ github.run_id }}"] # steps: # - name: "Checkout sources" - # uses: "actions/checkout@v6" - + # - name: "Setup CI" # uses: ./.github/actions/setup # with: From 96772a16b56263d395990e6ef1106d700a9f53a3 Mon Sep 17 00:00:00 2001 From: Taehoon Kim Date: Sun, 20 Sep 2026 20:27:29 -0700 Subject: [PATCH 3/3] ci: restore workflow comment --- .github/workflows/pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index db752eaf04..ed1f88e325 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -453,7 +453,8 @@ jobs: # runs-on: [runs-on, runner=16cpu-linux-x64, disk=large, "run-id=${{ github.run_id }}"] # steps: # - name: "Checkout sources" - + # uses: "actions/checkout@v6" + # - name: "Setup CI" # uses: ./.github/actions/setup # with: