diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 57d1afc515..d12a1d16aa 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -75,6 +75,8 @@ runs: ~/.cargo/git/db/ target/ ~/.rustup/ + ~/.sp1/circuits/plonk/ + ~/.sp1/circuits/groth16/ key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }} restore-keys: rust-1.81.0- diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index bacc95b914..911d5ffa43 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -118,15 +118,6 @@ jobs: env: CARGO_INCREMENTAL: 1 - - name: Add wasm target - run: rustup target add wasm32-unknown-unknown - - - name: Check wasm compatibility for sdk - uses: actions-rs/cargo@v1 - with: - command: check - args: -p sp1-sdk --target wasm32-unknown-unknown --no-default-features - examples: name: Examples runs-on: @@ -402,3 +393,25 @@ jobs: - uses: getsentry/action-git-diff-suggestions@main with: message: typos + + check-verifier-no-std: + name: Check Verifier `no_std` + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: riscv32imac-unknown-none-elf + + - name: Install target support + run: rustup target add riscv32imac-unknown-none-elf + + - name: Check build + run: cargo check --target riscv32imac-unknown-none-elf --no-default-features -p sp1-verifier + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 969693532c..a03b205b74 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,10 @@ pgo-data.profdata **/program.bin **/stdin.bin +# Example fibonacci groth16 / plonk proofs +examples/fibonacci/fibonacci-groth16.bin +examples/fibonacci/fibonacci-plonk.bin + # Benchmark benchmark.csv diff --git a/Cargo.lock b/Cargo.lock index 0cdbe70840..2553d1a740 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "addchain" version = "0.2.0" @@ -55,18 +45,7 @@ checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" dependencies = [ "aes-soft", "aesni", - "cipher 0.2.5", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures", + "cipher", ] [[package]] @@ -76,9 +55,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" dependencies = [ "aead", - "aes 0.6.0", - "cipher 0.2.5", - "ctr 0.6.0", + "aes", + "cipher", + "ctr", "ghash", "subtle", ] @@ -89,7 +68,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" dependencies = [ - "cipher 0.2.5", + "cipher", "opaque-debug", ] @@ -99,7 +78,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" dependencies = [ - "cipher 0.2.5", + "cipher", "opaque-debug", ] @@ -132,15 +111,17 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-consensus" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" +checksum = "41ed961a48297c732a5d97ee321aa8bb5009ecadbcb077d8bec90cb54e651629" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-rlp", "alloy-serde", + "auto_impl", "c-kzg", + "derive_more", "serde", ] @@ -150,48 +131,61 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-rlp", "serde", ] [[package]] name = "alloy-eip7702" -version = "0.1.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +checksum = "64ffc577390ce50234e02d841214b3dc0bea6aaaae8e04bbf3cb82e9a45da9eb" dependencies = [ - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-rlp", + "derive_more", "serde", ] [[package]] name = "alloy-eips" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" +checksum = "b69e06cf9c37be824b9d26d6d101114fdde6af0c87de2828b414c05c4b3daa71" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-rlp", "alloy-serde", "c-kzg", - "derive_more 1.0.0", + "derive_more", "once_cell", "serde", "sha2 0.10.8", ] +[[package]] +name = "alloy-json-abi" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded610181f3dad5810f6ff12d1a99994cf9b42d2fcb7709029352398a5da5ae6" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + [[package]] name = "alloy-json-rpc" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" +checksum = "af5979e0d5a7bf9c7eb79749121e8256e59021af611322aee56e77e20776b4b3" dependencies = [ - "alloy-primitives 0.8.8", - "alloy-sol-types 0.8.8", + "alloy-primitives", + "alloy-sol-types", "serde", "serde_json", "thiserror", @@ -200,19 +194,19 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" +checksum = "204237129086ce5dc17a58025e93739b01b45313841f98fa339eb1d780511e57" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-network-primitives", - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-rpc-types-eth", "alloy-serde", "alloy-signer", - "alloy-sol-types 0.8.8", + "alloy-sol-types", "async-trait", "auto_impl", "futures-utils-wasm", @@ -221,51 +215,30 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" +checksum = "514f70ee2a953db21631cd817b13a1571474ec77ddc03d47616d5e8203489fde" dependencies = [ + "alloy-consensus", "alloy-eips", - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-serde", "serde", ] [[package]] name = "alloy-primitives" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" -dependencies = [ - "alloy-rlp", - "bytes 1.7.2", - "cfg-if", - "const-hex", - "derive_more 0.99.18", - "hex-literal", - "itoa", - "k256", - "keccak-asm", - "proptest", - "rand 0.8.5", - "ruint", - "serde", - "tiny-keccak", -] - -[[package]] -name = "alloy-primitives" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f35429a652765189c1c5092870d8360ee7b7769b09b06d89ebaefd34676446" +checksum = "fd58d377699e6cfeab52c4a9d28bdc4ef37e2bd235ff2db525071fe37a2e9af5" dependencies = [ "alloy-rlp", - "bytes 1.7.2", + "bytes 1.8.0", "cfg-if", "const-hex", - "derive_more 1.0.0", + "derive_more", "foldhash", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "hex-literal", "indexmap 2.6.0", "itoa", @@ -283,42 +256,40 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" +checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" dependencies = [ "alloy-rlp-derive", "arrayvec", - "bytes 1.7.2", + "bytes 1.8.0", ] [[package]] name = "alloy-rlp-derive" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" +checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "alloy-rpc-types-eth" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" +checksum = "00b034779a4850b4b03f5be5ea674a1cf7d746b2da762b34d1860ab45e48ca27" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-network-primitives", - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-rlp", "alloy-serde", - "alloy-sol-types 0.8.8", - "cfg-if", - "derive_more 1.0.0", - "hashbrown 0.14.5", + "alloy-sol-types", + "derive_more", "itertools 0.13.0", "serde", "serde_json", @@ -326,22 +297,22 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" +checksum = "028e72eaa9703e4882344983cfe7636ce06d8cce104a78ea62fd19b46659efc4" dependencies = [ - "alloy-primitives 0.8.8", + "alloy-primitives", "serde", "serde_json", ] [[package]] name = "alloy-signer" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" +checksum = "592c185d7100258c041afac51877660c7bf6213447999787197db4842f0e938e" dependencies = [ - "alloy-primitives 0.8.8", + "alloy-primitives", "async-trait", "auto_impl", "elliptic-curve", @@ -351,13 +322,13 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fabe917ab1778e760b4701628d1cae8e028ee9d52ac6307de4e1e9286ab6b5f" +checksum = "6614f02fc1d5b079b2a4a5320018317b506fd0a6d67c1fd5542a71201724986c" dependencies = [ "alloy-consensus", "alloy-network", - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-signer", "async-trait", "k256", @@ -367,119 +338,72 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" -dependencies = [ - "alloy-sol-macro-expander 0.7.7", - "alloy-sol-macro-input 0.7.7", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "alloy-sol-macro" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2395336745358cc47207442127c47c63801a7065ecc0aa928da844f8bb5576" +checksum = "8a1b42ac8f45e2f49f4bcdd72cbfde0bb148f5481d403774ffa546e48b83efc1" dependencies = [ - "alloy-sol-macro-expander 0.8.8", - "alloy-sol-macro-input 0.8.8", + "alloy-sol-macro-expander", + "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.79", -] - -[[package]] -name = "alloy-sol-macro-expander" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" -dependencies = [ - "alloy-sol-macro-input 0.7.7", - "const-hex", - "heck", - "indexmap 2.6.0", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.79", - "syn-solidity 0.7.7", - "tiny-keccak", + "syn 2.0.87", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed5047c9a241df94327879c2b0729155b58b941eae7805a7ada2e19436e6b39" +checksum = "06318f1778e57f36333e850aa71bd1bb5e560c10279e236622faae0470c50412" dependencies = [ - "alloy-sol-macro-input 0.8.8", + "alloy-sol-macro-input", "const-hex", "heck", "indexmap 2.6.0", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.79", - "syn-solidity 0.8.8", + "syn 2.0.87", + "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" -dependencies = [ - "const-hex", - "dunce", - "heck", - "proc-macro2", - "quote", - "syn 2.0.79", - "syn-solidity 0.7.7", -] - -[[package]] -name = "alloy-sol-macro-input" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dee02a81f529c415082235129f0df8b8e60aa1601b9c9298ffe54d75f57210b" +checksum = "eaebb9b0ad61a41345a22c9279975c0cdd231b97947b10d7aad1cf0a7181e4a5" dependencies = [ "const-hex", "dunce", "heck", "proc-macro2", "quote", - "syn 2.0.79", - "syn-solidity 0.8.8", + "syn 2.0.87", + "syn-solidity", ] [[package]] -name = "alloy-sol-types" -version = "0.7.7" +name = "alloy-sol-type-parser" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" +checksum = "12c71028bfbfec210e24106a542aad3def7caf1a70e2c05710e92a98481980d3" dependencies = [ - "alloy-primitives 0.7.7", - "alloy-sol-macro 0.7.7", - "const-hex", "serde", + "winnow 0.6.20", ] [[package]] name = "alloy-sol-types" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2841af22d99e2c0f82a78fe107b6481be3dd20b89bfb067290092794734343a" +checksum = "374d7fb042d68ddfe79ccb23359de3007f6d4d53c13f703b64fb0db422132111" dependencies = [ - "alloy-primitives 0.8.8", - "alloy-sol-macro 0.8.8", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", "const-hex", + "serde", ] [[package]] @@ -514,9 +438,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -529,43 +453,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" dependencies = [ "backtrace", ] @@ -748,7 +672,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.1.1", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "slab", ] @@ -763,7 +687,7 @@ dependencies = [ "async-io", "async-lock", "blocking", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "once_cell", ] @@ -777,7 +701,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "parking", "polling", "rustix", @@ -812,8 +736,8 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "futures-lite 2.3.0", - "gloo-timers 0.3.0", + "futures-lite 2.4.0", + "gloo-timers", "kv-log-macro", "log", "memchr", @@ -843,7 +767,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -873,7 +797,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -889,17 +813,6 @@ dependencies = [ "tungstenite", ] -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.1", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -914,7 +827,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -931,12 +844,12 @@ checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", "axum-core", - "bytes 1.7.2", + "bytes 1.8.0", "futures-util", "http 1.1.0", - "http-body 1.0.1", + "http-body", "http-body-util", - "hyper 1.5.0", + "hyper", "hyper-util", "itoa", "matchit", @@ -964,10 +877,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", - "bytes 1.7.2", + "bytes 1.8.0", "futures-util", "http 1.1.0", - "http-body 1.0.1", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -1032,12 +945,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -1050,12 +957,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - [[package]] name = "bincode" version = "1.3.3" @@ -1071,7 +972,7 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", "itertools 0.13.0", @@ -1082,7 +983,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1100,12 +1001,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -1144,19 +1039,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake3" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -1184,7 +1066,7 @@ dependencies = [ "async-channel 2.3.1", "async-task", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.4.0", "piper", ] @@ -1213,16 +1095,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2 0.10.8", - "tinyvec", -] - [[package]] name = "bumpalo" version = "3.16.0" @@ -1240,6 +1112,20 @@ name = "bytemuck" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] [[package]] name = "byteorder" @@ -1255,9 +1141,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -1317,9 +1203,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.30" +version = "1.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" dependencies = [ "jobserver", "libc", @@ -1395,16 +1281,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clang-sys" version = "1.8.1" @@ -1447,7 +1323,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1456,63 +1332,11 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58", - "coins-core", - "digest 0.10.7", - "hmac 0.12.1", - "k256", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec", - "coins-bip32", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.12.2", - "rand 0.8.5", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32", - "bs58", - "digest 0.10.7", - "generic-array 0.14.7", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2 0.10.8", - "sha3", - "thiserror", -] - [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "concurrent-queue" @@ -1567,12 +1391,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "cookie" version = "0.14.4" @@ -1747,16 +1565,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" dependencies = [ - "cipher 0.2.5", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -1823,7 +1632,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -1969,19 +1778,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "0.99.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.1", - "syn 2.0.79", -] - [[package]] name = "derive_more" version = "1.0.0" @@ -1999,7 +1795,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "unicode-xid", ] @@ -2072,6 +1868,17 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "downcast-rs" version = "1.2.1" @@ -2143,31 +1950,13 @@ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] -[[package]] -name = "enr" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" -dependencies = [ - "base64 0.21.7", - "bytes 1.7.2", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp", - "serde", - "sha3", - "zeroize", -] - [[package]] name = "enum-map" version = "2.7.3" @@ -2186,7 +1975,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2206,272 +1995,8 @@ dependencies = [ ] [[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes 0.8.4", - "ctr 0.9.2", - "digest 0.10.7", - "hex", - "hmac 0.12.1", - "pbkdf2 0.11.0", - "rand 0.8.5", - "scrypt", - "serde", - "serde_json", - "sha2 0.10.8", - "sha3", - "thiserror", - "uuid", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-middleware", - "ethers-providers", - "ethers-signers", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "serde", - "serde_json", - "syn 2.0.79", - "toml", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.79", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec", - "bytes 1.7.2", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array 0.14.7", - "k256", - "num_enum 0.7.3", - "once_cell", - "open-fastrlp", - "rand 0.8.5", - "rlp", - "serde", - "serde_json", - "strum", - "syn 2.0.79", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-middleware" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" -dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", -] - -[[package]] -name = "ethers-providers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes 1.7.2", - "const-hex", - "enr", - "ethers-core", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http 0.2.12", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-signers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand 0.8.5", - "sha2 0.10.8", - "thiserror", - "tracing", -] - -[[package]] -name = "event-listener" -version = "2.5.3" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" @@ -2529,7 +2054,7 @@ checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ "arrayvec", "auto_impl", - "bytes 1.7.2", + "bytes 1.8.0", ] [[package]] @@ -2714,9 +2239,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "3f1fa2f9765705486b33fd2acf1577f8ec449c2ba1f318ae5447697b7c08d210" dependencies = [ "fastrand 2.1.1", "futures-core", @@ -2725,16 +2250,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - [[package]] name = "futures-macro" version = "0.3.31" @@ -2743,7 +2258,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -2758,16 +2273,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers 0.2.6", - "send_wrapper 0.4.0", -] - [[package]] name = "futures-util" version = "0.3.31" @@ -2792,15 +2297,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "gcd" version = "2.3.0" @@ -2872,7 +2368,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", "libgit2-sys", "log", @@ -2885,18 +2381,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "gloo-timers" version = "0.3.0" @@ -2953,25 +2437,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes 1.7.2", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.6.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.6" @@ -2979,7 +2444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", - "bytes 1.7.2", + "bytes 1.8.0", "fnv", "futures-core", "futures-sink", @@ -3043,9 +2508,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "allocator-api2", "equivalent", @@ -3053,15 +2518,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hashers" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", -] - [[package]] name = "heck" version = "0.5.0" @@ -3130,7 +2586,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "fnv", "itoa", ] @@ -3141,29 +2597,18 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "fnv", "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes 1.7.2", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "http 1.1.0", ] @@ -3173,10 +2618,10 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-util", "http 1.1.0", - "http-body 1.0.1", + "http-body", "pin-project-lite", ] @@ -3228,42 +2673,18 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hyper" -version = "0.14.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" -dependencies = [ - "bytes 1.7.2", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-channel", "futures-util", - "h2 0.4.6", + "h2", "http 1.1.0", - "http-body 1.0.1", + "http-body", "httparse", "httpdate", "itoa", @@ -3281,9 +2702,9 @@ checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.5.0", + "hyper", "hyper-util", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pki-types", "tokio", "tokio-rustls", @@ -3293,28 +2714,15 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" -dependencies = [ - "hyper 1.5.0", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "bytes 1.7.2", - "hyper 0.14.31", - "native-tls", + "hyper", + "hyper-util", + "pin-project-lite", "tokio", - "tokio-native-tls", + "tower-service", ] [[package]] @@ -3323,9 +2731,9 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "http-body-util", - "hyper 1.5.0", + "hyper", "hyper-util", "native-tls", "tokio", @@ -3335,16 +2743,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.1", - "hyper 1.5.0", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -3376,46 +2784,157 @@ dependencies = [ ] [[package]] -name = "ident_case" -version = "1.0.1" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "idna" -version = "0.5.0" +name = "icu_locid" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", ] [[package]] -name = "impl-codec" -version = "0.6.0" +name = "icu_locid_transform" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" dependencies = [ - "parity-scale-codec", + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "impl-rlp" -version = "0.3.0" +name = "icu_locid_transform_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ - "rlp", + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", ] [[package]] -name = "impl-serde" -version = "0.4.0" +name = "icu_normalizer_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ - "serde", + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", ] [[package]] @@ -3452,7 +2971,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -3475,15 +2994,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "instant" version = "0.1.13" @@ -3590,20 +3100,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "jubjub" version = "0.9.0" @@ -3671,9 +3167,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libgit2-sys" @@ -3699,9 +3195,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libnghttp2-sys" @@ -3719,7 +3215,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", ] @@ -3741,6 +3237,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -3766,7 +3268,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.0", + "hashbrown 0.15.1", ] [[package]] @@ -3868,7 +3370,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "cfg_aliases", "libc", @@ -4033,16 +3535,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" -dependencies = [ - "num_enum_derive 0.7.3", + "num_enum_derive", ] [[package]] @@ -4057,18 +3550,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "num_enum_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" -dependencies = [ - "proc-macro-crate 3.2.0", - "proc-macro2", - "quote", - "syn 2.0.79", -] - [[package]] name = "num_threads" version = "0.1.7" @@ -4111,38 +3592,13 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes 1.7.2", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes 1.7.2", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "openssl" -version = "0.10.67" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b8cefcf97f41316955f9294cd61f639bdcfa9f2f230faac6cb896aa8ab64704" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -4159,7 +3615,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -4215,15 +3671,6 @@ dependencies = [ "serde", ] -[[package]] -name = "p3-blake3" -version = "0.1.0" -source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" -dependencies = [ - "blake3", - "p3-symmetric", -] - [[package]] name = "p3-bn254-fr" version = "0.1.0" @@ -4531,34 +3978,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", -] - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -4586,41 +4005,31 @@ dependencies = [ "indexmap 2.6.0", ] -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.1", -] - [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -4738,12 +4147,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -4768,9 +4177,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] @@ -4793,30 +4199,6 @@ dependencies = [ "toml_edit 0.22.22", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro-error-attr2" version = "2.0.0" @@ -4836,7 +4218,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -4847,9 +4229,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -4862,7 +4244,7 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags", "lazy_static", "num-traits", "rand 0.8.5", @@ -4880,7 +4262,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "prost-derive", ] @@ -4890,7 +4272,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "heck", "itertools 0.13.0", "log", @@ -4901,7 +4283,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.79", + "syn 2.0.87", "tempfile", ] @@ -4915,7 +4297,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -4939,12 +4321,12 @@ version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash 2.0.0", - "rustls 0.23.15", + "rustls 0.23.16", "socket2", "thiserror", "tokio", @@ -4957,11 +4339,11 @@ version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "rand 0.8.5", "ring 0.17.8", "rustc-hash 2.0.0", - "rustls 0.23.15", + "rustls 0.23.16", "slab", "thiserror", "tinyvec", @@ -4970,10 +4352,11 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", @@ -5112,7 +4495,7 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -5128,9 +4511,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -5172,62 +4555,22 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes 1.7.2", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", - "hyper-tls 0.5.0", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration 0.5.1", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", - "bytes 1.7.2", + "bytes 1.8.0", "encoding_rs", "futures-core", "futures-util", - "h2 0.4.6", + "h2", "http 1.1.0", - "http-body 1.0.1", + "http-body", "http-body-util", - "hyper 1.5.0", + "hyper", "hyper-rustls", - "hyper-tls 0.6.0", + "hyper-tls", "hyper-util", "ipnet", "js-sys", @@ -5238,14 +4581,14 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.15", - "rustls-pemfile 2.2.0", + "rustls 0.23.16", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", - "system-configuration 0.6.1", + "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls", @@ -5269,7 +4612,7 @@ dependencies = [ "anyhow", "async-trait", "http 1.1.0", - "reqwest 0.12.8", + "reqwest", "serde", "thiserror", "tower-service", @@ -5315,37 +4658,16 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "rlp" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ - "bytes 1.7.2", - "rlp-derive", + "bytes 1.8.0", "rustc-hex", ] -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rrs-succinct" version = "0.1.0" @@ -5353,7 +4675,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3372685893a9f67d18e98e792d690017287fd17379a83d798d958e517d380fa9" dependencies = [ "downcast-rs", - "num_enum 0.5.11", + "num_enum", "paste", ] @@ -5378,7 +4700,7 @@ dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", - "bytes 1.7.2", + "bytes 1.8.0", "fastrlp", "num-bigint 0.4.6", "num-traits", @@ -5452,11 +4774,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -5478,9 +4800,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "log", "once_cell", @@ -5498,21 +4820,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", - "rustls-pemfile 2.2.0", + "rustls-pemfile", "rustls-pki-types", "schannel", "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - [[package]] name = "rustls-pemfile" version = "2.2.0" @@ -5561,16 +4874,7 @@ dependencies = [ name = "ryu" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher 0.4.4", -] +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -5583,33 +4887,33 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.3" +version = "2.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +checksum = "1aa7ffc1c0ef49b0452c6e2986abf2b07743320641ffd5fc63d552458e3b779b" dependencies = [ "cfg-if", - "derive_more 0.99.18", + "derive_more", "parity-scale-codec", "scale-info-derive", ] [[package]] name = "scale-info-derive" -version = "2.11.3" +version = "2.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +checksum = "46385cc24172cf615450267463f937c10072516359b3ff1cb24228a4a08bf951" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] name = "scc" -version = "2.2.2" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c1f7fc6deb21665a9060dfc7d271be784669295a31babdcd4dd2c79ae8cbfb" +checksum = "d8d25269dd3a12467afe2e510f69fb0b46b698e5afb296b59f2145259deaf8e8" dependencies = [ "sdd", ] @@ -5646,19 +4950,7 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", -] - -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac 0.12.1", - "pbkdf2 0.11.0", - "salsa20", - "sha2 0.10.8", + "syn 2.0.87", ] [[package]] @@ -5697,7 +4989,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -5756,43 +5048,31 @@ dependencies = [ "pest", ] -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - [[package]] name = "serde" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -5821,15 +5101,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5886,7 +5157,7 @@ checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -5993,18 +5264,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint 0.4.6", - "num-traits", - "thiserror", - "time 0.3.36", -] - [[package]] name = "size" version = "0.4.1" @@ -6109,7 +5368,7 @@ dependencies = [ "prettytable-rs", "rand 0.8.5", "regex", - "reqwest 0.12.8", + "reqwest", "rustc-demangle", "serde_json", "sp1-build", @@ -6173,7 +5432,6 @@ dependencies = [ "num_cpus", "p3-air", "p3-baby-bear", - "p3-blake3", "p3-challenger", "p3-field", "p3-keccak-air", @@ -6201,7 +5459,6 @@ dependencies = [ "tracing-forest", "tracing-subscriber", "typenum", - "vec_map", "web-time", ] @@ -6259,9 +5516,7 @@ dependencies = [ "anyhow", "bincode", "clap", - "csv", - "p3-baby-bear", - "reqwest 0.12.8", + "reqwest", "serde", "serde_json", "slack-rust-rs", @@ -6287,26 +5542,29 @@ dependencies = [ "serde", ] +[[package]] +name = "sp1-lib" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14deb700469a37ec075bcf88dac3815b026dd9c4b9cb175980826f1fbb2e4e80" +dependencies = [ + "bincode", + "serde", +] + [[package]] name = "sp1-perf" version = "3.0.0" dependencies = [ - "anyhow", "bincode", "clap", - "csv", "p3-baby-bear", - "reqwest 0.12.8", - "serde", - "serde_json", - "slack-rust-rs", "sp1-core-executor", "sp1-cuda", "sp1-prover", "sp1-sdk", "sp1-stark", "time 0.3.36", - "tokio", ] [[package]] @@ -6335,7 +5593,6 @@ dependencies = [ "dirs", "eyre", "itertools 0.13.0", - "lazy_static", "lru", "num-bigint 0.4.6", "p3-baby-bear", @@ -6345,8 +5602,6 @@ dependencies = [ "p3-field", "p3-matrix", "p3-symmetric", - "rayon", - "reqwest 0.11.27", "serde", "serde_json", "serial_test", @@ -6358,8 +5613,6 @@ dependencies = [ "sp1-recursion-core", "sp1-recursion-gnark-ffi", "sp1-stark", - "subtle-encoding", - "tempfile", "thiserror", "tracing", "tracing-subscriber", @@ -6506,17 +5759,16 @@ dependencies = [ name = "sp1-sdk" version = "3.0.0" dependencies = [ - "alloy-primitives 0.8.8", + "alloy-primitives", "alloy-signer", "alloy-signer-local", - "alloy-sol-types 0.7.7", + "alloy-sol-types", "anyhow", "async-trait", "backoff", "bincode", "cfg-if", "dirs", - "ethers", "futures", "hashbrown 0.14.5", "hex", @@ -6527,7 +5779,7 @@ dependencies = [ "p3-field", "p3-fri", "prost", - "reqwest 0.12.8", + "reqwest", "reqwest-middleware", "serde", "sp1-core-executor", @@ -6552,7 +5804,6 @@ name = "sp1-stark" version = "3.0.0" dependencies = [ "arrayref", - "getrandom 0.2.15", "hashbrown 0.14.5", "itertools 0.13.0", "num-traits", @@ -6578,10 +5829,23 @@ dependencies = [ "strum", "strum_macros", "sysinfo", - "thiserror", "tracing", ] +[[package]] +name = "sp1-verifier" +version = "3.0.0" +dependencies = [ + "hex", + "lazy_static", + "num-bigint 0.4.6", + "num-traits", + "sha2 0.10.8", + "sp1-sdk", + "substrate-bn", + "thiserror-no-std", +] + [[package]] name = "sp1-zkvm" version = "3.0.1" @@ -6594,7 +5858,7 @@ dependencies = [ "p3-field", "rand 0.8.5", "sha2 0.10.8", - "sp1-lib", + "sp1-lib 3.0.0", "sp1-primitives", ] @@ -6629,6 +5893,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "standback" version = "0.2.17" @@ -6724,7 +5994,23 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.79", + "syn 2.0.87", +] + +[[package]] +name = "substrate-bn" +version = "0.6.0" +source = "git+https://github.com/sp1-patches/bn?tag=substrate_bn-v0.6.0-patch-v2#8ef05d3969312eca34fa9f1f566a469022badda6" +dependencies = [ + "bytemuck", + "byteorder", + "cfg-if", + "crunchy", + "lazy_static", + "num-bigint 0.4.6", + "rand 0.8.5", + "rustc-hex", + "sp1-lib 3.1.0", ] [[package]] @@ -6733,15 +6019,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "subtle-encoding" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" -dependencies = [ - "zeroize", -] - [[package]] name = "surf" version = "2.3.2" @@ -6778,9 +6055,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -6789,26 +6066,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" -dependencies = [ - "paste", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "syn-solidity" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebfc1bfd06acc78f16d8fd3ef846bc222ee7002468d10a7dce8d703d6eab89a3" +checksum = "edf42e81491fb8871b74df3d222c64ae8cbc1269ea509fa768a3ed3e1b0ac8cb" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -6826,6 +6091,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "sysinfo" version = "0.30.13" @@ -6841,36 +6117,15 @@ dependencies = [ "windows", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys 0.5.0", -] - [[package]] name = "system-configuration" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", - "system-configuration-sys 0.6.0", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", + "system-configuration-sys", ] [[package]] @@ -6932,22 +6187,42 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "thiserror-impl-no-std" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 1.0.109", +] + +[[package]] +name = "thiserror-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +dependencies = [ + "thiserror-impl-no-std", ] [[package]] @@ -7049,6 +6324,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -7076,12 +6361,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", - "bytes 1.7.2", + "bytes 1.8.0", "libc", "mio", "parking_lot", @@ -7100,7 +6385,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -7119,7 +6404,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pki-types", "tokio", ] @@ -7141,33 +6426,18 @@ version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ - "bytes 1.7.2", + "bytes 1.8.0", "futures-core", "futures-sink", "pin-project-lite", "tokio", ] -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.22", -] - [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" @@ -7187,8 +6457,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.6.0", - "serde", - "serde_spanned", "toml_datetime", "winnow 0.6.20", ] @@ -7203,19 +6471,19 @@ dependencies = [ "async-trait", "axum", "base64 0.22.1", - "bytes 1.7.2", - "h2 0.4.6", + "bytes 1.8.0", + "h2", "http 1.1.0", - "http-body 1.0.1", + "http-body", "http-body-util", - "hyper 1.5.0", + "hyper", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", "prost", "rustls-native-certs", - "rustls-pemfile 2.2.0", + "rustls-pemfile", "socket2", "tokio", "tokio-rustls", @@ -7294,7 +6562,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", ] [[package]] @@ -7373,7 +6641,7 @@ checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.7.2", + "bytes 1.8.0", "http 0.2.12", "httparse", "log", @@ -7404,9 +6672,9 @@ dependencies = [ "futures", "http 1.1.0", "http-body-util", - "hyper 1.5.0", + "hyper", "prost", - "reqwest 0.12.8", + "reqwest", "serde", "serde_json", "thiserror", @@ -7447,18 +6715,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.17" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" @@ -7472,15 +6731,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-width" version = "0.1.14" @@ -7517,9 +6767,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -7534,20 +6784,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "utf8parse" -version = "0.2.2" +name = "utf16_iter" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" [[package]] -name = "uuid" -version = "0.8.2" +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.15", - "serde", -] +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -7557,9 +6809,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" [[package]] name = "vcpkg" @@ -7663,7 +6915,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -7697,7 +6949,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7710,9 +6962,9 @@ checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -8016,33 +7268,16 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.50.0" +name = "write16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" [[package]] -name = "ws_stream_wasm" -version = "0.7.4" +name = "writeable" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.1", - "send_wrapper 0.6.0", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wyz" @@ -8059,6 +7294,30 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -8077,7 +7336,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -8097,7 +7377,29 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.87", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f993cba193..c557828e67 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ members = [ "crates/recursion/gnark-ffi", "crates/sdk", "crates/cuda", + "crates/verifier", "crates/stark", "crates/zkvm/*", ] @@ -47,10 +48,13 @@ debug-assertions = true [workspace.dependencies] # sp1 sp1-build = { path = "crates/build", version = "3.0.0" } +sp1-cli = { path = "crates/cli", version = "3.0.0", default-features = false } sp1-core-machine = { path = "crates/core/machine", version = "3.0.0" } sp1-core-executor = { path = "crates/core/executor", version = "3.0.0" } sp1-curves = { path = "crates/curves", version = "3.0.0" } sp1-derive = { path = "crates/derive", version = "3.0.0" } +sp1-eval = { path = "crates/eval", version = "3.0.0" } +sp1-helper = { path = "crates/helper", version = "3.0.0", default-features = false } sp1-primitives = { path = "crates/primitives", version = "3.0.0" } sp1-prover = { path = "crates/prover", version = "3.0.0" } sp1-recursion-compiler = { path = "crates/recursion/compiler", version = "3.0.0" } diff --git a/book/generating-proofs/proof-types.md b/book/generating-proofs/proof-types.md index b788844398..fe1cbeeedd 100644 --- a/book/generating-proofs/proof-types.md +++ b/book/generating-proofs/proof-types.md @@ -28,7 +28,7 @@ client.prove(&pk, stdin).compressed().run().unwrap(); ## Groth16 (Recommended) -The Groth16 prover mode generate a SNARK proof that is ~260 bytes large and can be verified onchain for around ~270k gas. +The Groth16 prover mode generates a SNARK proof that is ~260 bytes large and can be verified onchain for around ~270k gas. The trusted setup for the Groth16 circuit keys uses the [Aztec Ignition ceremony](https://github.com/AztecProtocol/ignition-verification) + entropy contributions from members of the Succinct team. @@ -39,7 +39,7 @@ client.prove(&pk, stdin).groth16().run().unwrap(); ## PLONK -The PLONK prover mode generate a SNARK proof that is ~868 bytes large and can also be verified onchain for around ~300k gas. Plonk proofs take about ~1m30s longer to generate over a compressed proof. +The PLONK prover mode generates a SNARK proof that is ~868 bytes large and can also be verified onchain for around ~300k gas. Plonk proofs take about ~1m30s longer to generate over a compressed proof. PLONK does not require a trusted setup. diff --git a/book/onchain-verification/contract-addresses.md b/book/onchain-verification/contract-addresses.md index 3acb971edf..0a23f6ab2e 100644 --- a/book/onchain-verification/contract-addresses.md +++ b/book/onchain-verification/contract-addresses.md @@ -6,6 +6,27 @@ will automatically route your SP1 proof to the correct verifier based on the SP1 ## Canonical Verifier Gateways +There are different verifier gateway for each proof system: Groth16 and PLONK. This means that you +must use the correct verifier gateway depending on if you are verifying a Groth16 or PLONK proof. + +### Groth16 + +| Chain ID | Chain | Gateway | +| -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| 1 | Mainnet | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 11155111 | Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 17000 | Holesky | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://holesky.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 42161 | Arbitrum One | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://arbiscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 421614 | Arbitrum Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.arbiscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 8453 | Base | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://basescan.org/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 84532 | Base Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.basescan.org/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 10 | Optimism | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://optimistic.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 11155420 | Optimism Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia-optimism.etherscan.io/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 534351 | Scroll Sepolia | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://sepolia.scrollscan.com/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | +| 534352 | Scroll | [0x397A5f7f3dBd538f23DE225B51f532c34448dA9B](https://scrollscan.com/address/0x397A5f7f3dBd538f23DE225B51f532c34448dA9B) | + +### PLONK + | Chain ID | Chain | Gateway | | -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | 1 | Mainnet | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://etherscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | @@ -16,7 +37,7 @@ will automatically route your SP1 proof to the correct verifier based on the SP1 | 8453 | Base | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://basescan.org/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | | 84532 | Base Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.basescan.org/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | | 10 | Optimism | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://optimistic.etherscan.io/address/0x3b6041173b80e77f038f3f2c0f9744f04837185e) | -| 11155420 | Optimism Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia-optimism.etherscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | +| 11155420 | Optimism Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia-optimism.etherscan.io/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | | 534351 | Scroll Sepolia | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://sepolia.scrollscan.com/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | | 534352 | Scroll | [0x3B6041173B80E77f038f3F2C0f9744f04837185e](https://scrollscan.com/address/0x3B6041173B80E77f038f3F2C0f9744f04837185e) | diff --git a/book/writing-programs/proof-aggregation.md b/book/writing-programs/proof-aggregation.md index 056f9720ff..9993e152b4 100644 --- a/book/writing-programs/proof-aggregation.md +++ b/book/writing-programs/proof-aggregation.md @@ -15,10 +15,10 @@ Note that by itself, SP1 can already prove arbitrarily large programs by chunkin ## Verifying Proofs inside the zkVM -To verify a proof inside the zkVM, you can use the `sp1_zkvm::lib::verify::verify_proof` function. +To verify a proof inside the zkVM, you can use the `sp1_zkvm::lib::verify::verify_sp1_proof` function. ```rust,noplayground -sp1_zkvm::lib::verify::verify_proof(vkey, public_values_digest); +sp1_zkvm::lib::verify::verify_sp1_proof(vkey, public_values_digest); ``` **You do not need to pass in the proof as input into the syscall, as the proof will automatically be read for the proof input stream by the prover.** diff --git a/crates/core/executor/src/executor.rs b/crates/core/executor/src/executor.rs index a815ae5776..3fc3403fba 100644 --- a/crates/core/executor/src/executor.rs +++ b/crates/core/executor/src/executor.rs @@ -30,7 +30,6 @@ use crate::{ /// /// The exeuctor is responsible for executing a user program and tracing important events which /// occur during execution (i.e., memory reads, alu operations, etc). -#[repr(C)] pub struct Executor<'a> { /// The program. pub program: Arc, @@ -48,6 +47,10 @@ pub struct Executor<'a> { /// Whether we should write to the report. pub print_report: bool, + /// Whether we should emit global memory init and finalize events. This can be enabled in + /// Checkpoint mode and disabled in Trace mode. + pub emit_global_memory_events: bool, + /// The maximum size of each shard. pub shard_size: u32, @@ -220,6 +223,7 @@ impl<'a> Executor<'a> { unconstrained_state: ForkState::default(), syscall_map, executor_mode: ExecutorMode::Trace, + emit_global_memory_events: true, max_syscall_cycles, report: ExecutionReport::default(), print_report: false, @@ -808,7 +812,7 @@ impl<'a> Executor<'a> { LookupId::default() }; - if !self.unconstrained && self.executor_mode == ExecutorMode::Trace { + if !self.unconstrained { self.report.opcode_counts[instruction.opcode] += 1; self.report.event_counts[instruction.opcode] += 1; match instruction.opcode { @@ -938,7 +942,7 @@ impl<'a> Executor<'a> { *syscall_count += 1; let syscall_impl = self.get_syscall(syscall).cloned(); - if syscall.should_send() != 0 { + if syscall.should_send() != 0 && self.executor_mode == ExecutorMode::Trace { self.emit_syscall(clk, syscall.syscall_id(), b, c, syscall_lookup_id); } let mut precompile_rt = SyscallContext::new(self); @@ -1329,8 +1333,10 @@ impl<'a> Executor<'a> { /// Bump the record. pub fn bump_record(&mut self) { // Copy all of the existing local memory accesses to the record's local_memory_access vec. - for (_, event) in self.local_memory_access.drain() { - self.record.cpu_local_memory_access.push(event); + if self.executor_mode == ExecutorMode::Trace { + for (_, event) in self.local_memory_access.drain() { + self.record.cpu_local_memory_access.push(event); + } } let removed_record = @@ -1347,8 +1353,12 @@ impl<'a> Executor<'a> { /// # Errors /// /// This function will return an error if the program execution fails. - pub fn execute_record(&mut self) -> Result<(Vec, bool), ExecutionError> { + pub fn execute_record( + &mut self, + emit_global_memory_events: bool, + ) -> Result<(Vec, bool), ExecutionError> { self.executor_mode = ExecutorMode::Trace; + self.emit_global_memory_events = emit_global_memory_events; self.print_report = true; let done = self.execute()?; Ok((std::mem::take(&mut self.records), done)) @@ -1360,27 +1370,32 @@ impl<'a> Executor<'a> { /// # Errors /// /// This function will return an error if the program execution fails. - pub fn execute_state(&mut self) -> Result<(ExecutionState, bool), ExecutionError> { + pub fn execute_state( + &mut self, + emit_global_memory_events: bool, + ) -> Result<(ExecutionState, bool), ExecutionError> { self.memory_checkpoint.clear(); self.executor_mode = ExecutorMode::Checkpoint; + self.emit_global_memory_events = emit_global_memory_events; // Clone self.state without memory and uninitialized_memory in it so it's faster. let memory = std::mem::take(&mut self.state.memory); let uninitialized_memory = std::mem::take(&mut self.state.uninitialized_memory); - let mut checkpoint = tracing::info_span!("clone").in_scope(|| self.state.clone()); + let mut checkpoint = tracing::debug_span!("clone").in_scope(|| self.state.clone()); self.state.memory = memory; self.state.uninitialized_memory = uninitialized_memory; - let done = tracing::info_span!("execute").in_scope(|| self.execute())?; + let done = tracing::debug_span!("execute").in_scope(|| self.execute())?; // Create a checkpoint using `memory_checkpoint`. Just include all memory if `done` since we // need it all for MemoryFinalize. - tracing::info_span!("create memory checkpoint").in_scope(|| { + tracing::debug_span!("create memory checkpoint").in_scope(|| { let memory_checkpoint = std::mem::take(&mut self.memory_checkpoint); let uninitialized_memory_checkpoint = std::mem::take(&mut self.uninitialized_memory_checkpoint); - if done { - // If we're done, we need to include all memory. But we need to reset any modified - // memory to as it was before the execution. + if done && !self.emit_global_memory_events { + // If it's the last shard, and we're not emitting memory events, we need to include + // all memory so that memory events can be emitted from the checkpoint. But we need + // to first reset any modified memory to as it was before the execution. checkpoint.memory.clone_from(&self.state.memory); memory_checkpoint.into_iter().for_each(|(addr, record)| { if let Some(record) = record { @@ -1408,6 +1423,9 @@ impl<'a> Executor<'a> { .collect(); } }); + if !done { + self.records.clear(); + } Ok((checkpoint, done)) } @@ -1547,16 +1565,20 @@ impl<'a> Executor<'a> { } // Ensure that all proofs and input bytes were read, otherwise warn the user. - // if self.state.proof_stream_ptr != self.state.proof_stream.len() { - // panic!( - // "Not all proofs were read. Proving will fail during recursion. Did you pass too - // many proofs in or forget to call verify_sp1_proof?" ); - // } + if self.state.proof_stream_ptr != self.state.proof_stream.len() { + tracing::warn!( + "Not all proofs were read. Proving will fail during recursion. Did you pass too + many proofs in or forget to call verify_sp1_proof?" + ); + } if self.state.input_stream_ptr != self.state.input_stream.len() { tracing::warn!("Not all input bytes were read."); } - if self.executor_mode == ExecutorMode::Trace { + if self.emit_global_memory_events + && (self.executor_mode == ExecutorMode::Trace + || self.executor_mode == ExecutorMode::Checkpoint) + { // SECTION: Set up all MemoryInitializeFinalizeEvents needed for memory argument. let memory_finalize_events = &mut self.record.global_memory_finalize_events; diff --git a/crates/core/executor/src/syscalls/context.rs b/crates/core/executor/src/syscalls/context.rs index 9db49c5cae..74dfafb279 100644 --- a/crates/core/executor/src/syscalls/context.rs +++ b/crates/core/executor/src/syscalls/context.rs @@ -1,11 +1,16 @@ use hashbrown::HashMap; use crate::{ - events::{LookupId, MemoryLocalEvent, MemoryReadRecord, MemoryWriteRecord}, + events::{ + LookupId, MemoryLocalEvent, MemoryReadRecord, MemoryWriteRecord, PrecompileEvent, + SyscallEvent, + }, record::ExecutionRecord, - Executor, Register, + Executor, ExecutorMode, Register, }; +use super::SyscallCode; + /// A runtime for syscalls that is protected so that developers cannot arbitrarily modify the /// runtime. #[allow(dead_code)] @@ -47,6 +52,19 @@ impl<'a, 'b> SyscallContext<'a, 'b> { &mut self.rt.record } + #[inline] + /// Add a precompile event to the execution record. + pub fn add_precompile_event( + &mut self, + syscall_code: SyscallCode, + syscall_event: SyscallEvent, + event: PrecompileEvent, + ) { + if self.rt.executor_mode == ExecutorMode::Trace { + self.record_mut().precompile_events.add_event(syscall_code, syscall_event, event); + } + } + /// Get the current shard. #[must_use] pub fn current_shard(&self) -> u32 { @@ -91,7 +109,7 @@ impl<'a, 'b> SyscallContext<'a, 'b> { pub fn postprocess(&mut self) -> Vec { let mut syscall_local_mem_events = Vec::new(); - if !self.rt.unconstrained { + if !self.rt.unconstrained && self.rt.executor_mode == ExecutorMode::Trace { // Will need to transfer the existing memory local events in the executor to it's record, // and return all the syscall memory local events. This is similar to what // `bump_record` does. diff --git a/crates/core/executor/src/syscalls/precompiles/edwards/add.rs b/crates/core/executor/src/syscalls/precompiles/edwards/add.rs index 935c580cc8..af446163dd 100644 --- a/crates/core/executor/src/syscalls/precompiles/edwards/add.rs +++ b/crates/core/executor/src/syscalls/precompiles/edwards/add.rs @@ -33,11 +33,7 @@ impl Syscall for EdwardsAddAssignSyscall(rt, arg1, arg2); let syscall_event = rt.rt.syscall_event(event.clk, syscall_code.syscall_id(), arg1, arg2, event.lookup_id); - rt.record_mut().add_precompile_event( - syscall_code, - syscall_event, - PrecompileEvent::EdAdd(event), - ); + rt.add_precompile_event(syscall_code, syscall_event, PrecompileEvent::EdAdd(event)); None } } diff --git a/crates/core/executor/src/syscalls/precompiles/edwards/decompress.rs b/crates/core/executor/src/syscalls/precompiles/edwards/decompress.rs index 287101fbfd..6e790ab133 100644 --- a/crates/core/executor/src/syscalls/precompiles/edwards/decompress.rs +++ b/crates/core/executor/src/syscalls/precompiles/edwards/decompress.rs @@ -80,11 +80,7 @@ impl Syscall for EdwardsDecompressSyscall { }; let syscall_event = rt.rt.syscall_event(start_clk, syscall_code.syscall_id(), arg1, sign, event.lookup_id); - rt.record_mut().add_precompile_event( - syscall_code, - syscall_event, - PrecompileEvent::EdDecompress(event), - ); + rt.add_precompile_event(syscall_code, syscall_event, PrecompileEvent::EdDecompress(event)); None } diff --git a/crates/core/executor/src/syscalls/precompiles/fptower/fp.rs b/crates/core/executor/src/syscalls/precompiles/fptower/fp.rs index 3ce04230ec..ddba0892c6 100644 --- a/crates/core/executor/src/syscalls/precompiles/fptower/fp.rs +++ b/crates/core/executor/src/syscalls/precompiles/fptower/fp.rs @@ -98,7 +98,7 @@ impl Syscall for FpOpSyscall

{ arg2, event.lookup_id, ); - rt.record_mut().add_precompile_event( + rt.add_precompile_event( syscall_code_key, syscall_event, PrecompileEvent::Bn254Fp(event), @@ -119,7 +119,7 @@ impl Syscall for FpOpSyscall

{ arg2, event.lookup_id, ); - rt.record_mut().add_precompile_event( + rt.add_precompile_event( syscall_code_key, syscall_event, PrecompileEvent::Bls12381Fp(event), diff --git a/crates/core/executor/src/syscalls/precompiles/fptower/fp2_addsub.rs b/crates/core/executor/src/syscalls/precompiles/fptower/fp2_addsub.rs index e2563a6bce..f583432310 100644 --- a/crates/core/executor/src/syscalls/precompiles/fptower/fp2_addsub.rs +++ b/crates/core/executor/src/syscalls/precompiles/fptower/fp2_addsub.rs @@ -104,7 +104,7 @@ impl Syscall for Fp2AddSubSyscall

{ arg2, event.lookup_id, ); - rt.record_mut().add_precompile_event( + rt.add_precompile_event( syscall_code_key, syscall_event, PrecompileEvent::Bn254Fp2AddSub(event), @@ -125,7 +125,7 @@ impl Syscall for Fp2AddSubSyscall

{ arg2, event.lookup_id, ); - rt.record_mut().add_precompile_event( + rt.add_precompile_event( syscall_code_key, syscall_event, PrecompileEvent::Bls12381Fp2AddSub(event), diff --git a/crates/core/executor/src/syscalls/precompiles/fptower/fp2_mul.rs b/crates/core/executor/src/syscalls/precompiles/fptower/fp2_mul.rs index 46598ef2b2..5089c00726 100644 --- a/crates/core/executor/src/syscalls/precompiles/fptower/fp2_mul.rs +++ b/crates/core/executor/src/syscalls/precompiles/fptower/fp2_mul.rs @@ -85,12 +85,12 @@ impl Syscall for Fp2MulSyscall

{ let syscall_event = rt.rt.syscall_event(clk, syscall_code.syscall_id(), arg1, arg2, event.lookup_id); match P::FIELD_TYPE { - FieldType::Bn254 => rt.record_mut().add_precompile_event( + FieldType::Bn254 => rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Bn254Fp2Mul(event), ), - FieldType::Bls12381 => rt.record_mut().add_precompile_event( + FieldType::Bls12381 => rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Bls12381Fp2Mul(event), diff --git a/crates/core/executor/src/syscalls/precompiles/keccak256/permute.rs b/crates/core/executor/src/syscalls/precompiles/keccak256/permute.rs index f33019f8b2..be3743e1f0 100644 --- a/crates/core/executor/src/syscalls/precompiles/keccak256/permute.rs +++ b/crates/core/executor/src/syscalls/precompiles/keccak256/permute.rs @@ -78,7 +78,7 @@ impl Syscall for Keccak256PermuteSyscall { }); let syscall_event = rt.rt.syscall_event(start_clk, syscall_code.syscall_id(), arg1, arg2, lookup_id); - rt.record_mut().add_precompile_event(syscall_code, syscall_event, event); + rt.add_precompile_event(syscall_code, syscall_event, event); None } diff --git a/crates/core/executor/src/syscalls/precompiles/sha256/compress.rs b/crates/core/executor/src/syscalls/precompiles/sha256/compress.rs index 8d87fe7376..db1e9c42ec 100644 --- a/crates/core/executor/src/syscalls/precompiles/sha256/compress.rs +++ b/crates/core/executor/src/syscalls/precompiles/sha256/compress.rs @@ -110,7 +110,7 @@ impl Syscall for Sha256CompressSyscall { }); let syscall_event = rt.rt.syscall_event(start_clk, syscall_code.syscall_id(), arg1, arg2, lookup_id); - rt.record_mut().add_precompile_event(syscall_code, syscall_event, event); + rt.add_precompile_event(syscall_code, syscall_event, event); None } diff --git a/crates/core/executor/src/syscalls/precompiles/sha256/extend.rs b/crates/core/executor/src/syscalls/precompiles/sha256/extend.rs index 1d4a2a769e..cc5e288fb6 100644 --- a/crates/core/executor/src/syscalls/precompiles/sha256/extend.rs +++ b/crates/core/executor/src/syscalls/precompiles/sha256/extend.rs @@ -77,7 +77,7 @@ impl Syscall for Sha256ExtendSyscall { }); let syscall_event = rt.rt.syscall_event(clk_init, syscall_code.syscall_id(), arg1, arg2, lookup_id); - rt.record_mut().add_precompile_event(syscall_code, syscall_event, event); + rt.add_precompile_event(syscall_code, syscall_event, event); None } diff --git a/crates/core/executor/src/syscalls/precompiles/uint256.rs b/crates/core/executor/src/syscalls/precompiles/uint256.rs index a8d5c54fdc..769ad0beb8 100644 --- a/crates/core/executor/src/syscalls/precompiles/uint256.rs +++ b/crates/core/executor/src/syscalls/precompiles/uint256.rs @@ -82,7 +82,7 @@ impl Syscall for Uint256MulSyscall { }); let sycall_event = rt.rt.syscall_event(clk, syscall_code.syscall_id(), arg1, arg2, lookup_id); - rt.record_mut().add_precompile_event(syscall_code, sycall_event, event); + rt.add_precompile_event(syscall_code, sycall_event, event); None } diff --git a/crates/core/executor/src/syscalls/precompiles/weierstrass/add.rs b/crates/core/executor/src/syscalls/precompiles/weierstrass/add.rs index 1456b9870f..f643196a77 100644 --- a/crates/core/executor/src/syscalls/precompiles/weierstrass/add.rs +++ b/crates/core/executor/src/syscalls/precompiles/weierstrass/add.rs @@ -30,19 +30,19 @@ impl Syscall for WeierstrassAddAssignSyscall { let syscall_event = rt.rt.syscall_event(event.clk, syscall_code.syscall_id(), arg1, arg2, event.lookup_id); match E::CURVE_TYPE { - CurveType::Secp256k1 => rt.record_mut().add_precompile_event( + CurveType::Secp256k1 => rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Secp256k1Add(event), ), CurveType::Bn254 => { - rt.record_mut().add_precompile_event( + rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Bn254Add(event), ); } - CurveType::Bls12381 => rt.record_mut().add_precompile_event( + CurveType::Bls12381 => rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Bls12381Add(event), diff --git a/crates/core/executor/src/syscalls/precompiles/weierstrass/decompress.rs b/crates/core/executor/src/syscalls/precompiles/weierstrass/decompress.rs index df056337a1..3c2069e118 100644 --- a/crates/core/executor/src/syscalls/precompiles/weierstrass/decompress.rs +++ b/crates/core/executor/src/syscalls/precompiles/weierstrass/decompress.rs @@ -30,12 +30,12 @@ impl Syscall for WeierstrassDecompressSyscall { let syscall_event = rt.rt.syscall_event(event.clk, syscall_code.syscall_id(), arg1, arg2, event.lookup_id); match E::CURVE_TYPE { - CurveType::Secp256k1 => rt.record_mut().add_precompile_event( + CurveType::Secp256k1 => rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Secp256k1Decompress(event), ), - CurveType::Bls12381 => rt.record_mut().add_precompile_event( + CurveType::Bls12381 => rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Bls12381Decompress(event), diff --git a/crates/core/executor/src/syscalls/precompiles/weierstrass/double.rs b/crates/core/executor/src/syscalls/precompiles/weierstrass/double.rs index 70e7074853..26d3090310 100644 --- a/crates/core/executor/src/syscalls/precompiles/weierstrass/double.rs +++ b/crates/core/executor/src/syscalls/precompiles/weierstrass/double.rs @@ -31,21 +31,21 @@ impl Syscall for WeierstrassDoubleAssignSyscall { rt.rt.syscall_event(event.clk, syscall_code.syscall_id(), arg1, arg2, event.lookup_id); match E::CURVE_TYPE { CurveType::Secp256k1 => { - rt.record_mut().add_precompile_event( + rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Secp256k1Double(event), ); } CurveType::Bn254 => { - rt.record_mut().add_precompile_event( + rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Bn254Double(event), ); } CurveType::Bls12381 => { - rt.record_mut().add_precompile_event( + rt.add_precompile_event( syscall_code, syscall_event, PrecompileEvent::Bls12381Double(event), diff --git a/crates/core/machine/Cargo.toml b/crates/core/machine/Cargo.toml index 3b0b0f34f9..60ae3da008 100644 --- a/crates/core/machine/Cargo.toml +++ b/crates/core/machine/Cargo.toml @@ -19,7 +19,6 @@ p3-air = { workspace = true } p3-baby-bear = { workspace = true } p3-challenger = { workspace = true } p3-field = { workspace = true } -p3-blake3 = { workspace = true } p3-keccak-air = { workspace = true } p3-matrix = { workspace = true } p3-maybe-rayon = { workspace = true, features = ["parallel"] } @@ -54,7 +53,6 @@ static_assertions = "1.1.0" sp1-stark = { workspace = true } sp1-core-executor = { workspace = true } sp1-curves = { workspace = true } -vec_map = "0.8.2" [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } @@ -65,7 +63,6 @@ sp1-zkvm = { workspace = true } sp1-core-executor = { workspace = true, features = ["programs"] } [features] -neon = ["p3-blake3/neon"] programs = [] debug = [] bigint-rug = ["sp1-curves/bigint-rug"] diff --git a/crates/core/machine/src/cpu/trace.rs b/crates/core/machine/src/cpu/trace.rs index c9831c66c0..5a43202608 100644 --- a/crates/core/machine/src/cpu/trace.rs +++ b/crates/core/machine/src/cpu/trace.rs @@ -42,7 +42,7 @@ impl MachineAir for CpuChip { n_real_rows.next_power_of_two() }; let mut values = zeroed_f_vec(padded_nb_rows * NUM_CPU_COLS); - let shard = input.public_values.shard; + let shard = input.public_values.execution_shard; let chunk_size = std::cmp::max(input.cpu_events.len() / num_cpus::get(), 1); values.chunks_mut(chunk_size * NUM_CPU_COLS).enumerate().par_bridge().for_each( @@ -79,7 +79,7 @@ impl MachineAir for CpuChip { fn generate_dependencies(&self, input: &ExecutionRecord, output: &mut ExecutionRecord) { // Generate the trace rows for each event. let chunk_size = std::cmp::max(input.cpu_events.len() / num_cpus::get(), 1); - let shard = input.public_values.shard; + let shard = input.public_values.execution_shard; let blu_events: Vec<_> = input .cpu_events diff --git a/crates/core/machine/src/riscv/mod.rs b/crates/core/machine/src/riscv/mod.rs index b2395acf5e..8865c937a7 100644 --- a/crates/core/machine/src/riscv/mod.rs +++ b/crates/core/machine/src/riscv/mod.rs @@ -745,6 +745,7 @@ pub mod tests { assert_eq!(pk.traces, deserialized_pk.traces); assert_eq!(pk.data.root(), deserialized_pk.data.root()); assert_eq!(pk.chip_ordering, deserialized_pk.chip_ordering); + assert_eq!(pk.local_only, deserialized_pk.local_only); let serialized_vk = bincode::serialize(&vk).unwrap(); let deserialized_vk: StarkVerifyingKey = diff --git a/crates/core/machine/src/utils/prove.rs b/crates/core/machine/src/utils/prove.rs index 4b18c2e54c..18f857cdf3 100644 --- a/crates/core/machine/src/utils/prove.rs +++ b/crates/core/machine/src/utils/prove.rs @@ -142,11 +142,8 @@ where { // Setup the runtime. let mut runtime = Executor::with_context(program.clone(), opts, context); - let maximal_shapes = match shape_config.as_ref() { - Some(shape_config) => shape_config.maximal_core_shapes(), - None => vec![], - }; - runtime.maximal_shapes = Some(maximal_shapes.into_iter().map(|s| s.inner).collect()); + runtime.maximal_shapes = shape_config + .map(|config| config.maximal_core_shapes().into_iter().map(|s| s.inner).collect()); runtime.write_vecs(&stdin.buffer); for proof in stdin.proofs.iter() { let (proof, vk) = proof.clone(); @@ -177,8 +174,9 @@ where let _span = span.enter(); // Execute the runtime until we reach a checkpoint. - let (checkpoint, done) = - runtime.execute_state().map_err(SP1CoreProverError::ExecutionError)?; + let (checkpoint, done) = runtime + .execute_state(false) + .map_err(SP1CoreProverError::ExecutionError)?; // Save the checkpoint to a temp file. let mut checkpoint_file = @@ -618,9 +616,16 @@ where |(record, (global_traces, local_traces))| { let _span = span.enter(); + let global_commit_span = + tracing::debug_span!("commit to global traces").entered(); let global_data = prover.commit(&record, global_traces); + global_commit_span.exit(); + let local_commit_span = + tracing::debug_span!("commit to local traces").entered(); let local_data = prover.commit(&record, local_traces); + local_commit_span.exit(); + let opening_span = tracing::debug_span!("opening").entered(); let proof = prover .open( pk, @@ -630,6 +635,7 @@ where &global_permutation_challenges, ) .unwrap(); + opening_span.exit(); #[cfg(debug_assertions)] { @@ -694,7 +700,8 @@ where { let all_records = all_records_rx.iter().flatten().collect::>(); let mut challenger = prover.machine().config().challenger(); - prover.machine().debug_constraints(&pk.to_host(), all_records, &mut challenger); + let pk_host = prover.pk_to_host(pk); + prover.machine().debug_constraints(&pk_host, all_records, &mut challenger); } Ok((proof, public_values_stream, cycles)) @@ -792,7 +799,11 @@ where let prove_span = tracing::debug_span!("prove").entered(); #[cfg(feature = "debug")] - prover.machine().debug_constraints(&pk.to_host(), records.clone(), &mut challenger.clone()); + prover.machine().debug_constraints( + &prover.pk_to_host(&pk), + records.clone(), + &mut challenger.clone(), + ); let proof = prover.prove(&pk, records, &mut challenger, SP1CoreOpts::default()).unwrap(); prove_span.exit(); @@ -838,22 +849,19 @@ fn trace_checkpoint( where ::Val: PrimeField32, { - let maximal_shapes = match shape_config { - Some(shape_config) => shape_config.maximal_core_shapes(), - None => vec![], - }; let mut reader = std::io::BufReader::new(file); let state: ExecutionState = bincode::deserialize_from(&mut reader).expect("failed to deserialize state"); let mut runtime = Executor::recover(program.clone(), state.clone(), opts); - runtime.maximal_shapes = Some(maximal_shapes.into_iter().map(|s| s.inner).collect()); + runtime.maximal_shapes = shape_config + .map(|config| config.maximal_core_shapes().into_iter().map(|s| s.inner).collect()); // We already passed the deferred proof verifier when creating checkpoints, so the proofs were // already verified. So here we use a noop verifier to not print any warnings. runtime.subproof_verifier = Arc::new(NoOpSubproofVerifier); // Execute from the checkpoint. - let (records, _) = runtime.execute_record().unwrap(); + let (records, _) = runtime.execute_record(true).unwrap(); (records, runtime.report) } diff --git a/crates/derive/src/lib.rs b/crates/derive/src/lib.rs index 924be7d913..3721b9b93e 100644 --- a/crates/derive/src/lib.rs +++ b/crates/derive/src/lib.rs @@ -191,6 +191,13 @@ pub fn machine_air_derive(input: TokenStream) -> TokenStream { } }); + let local_only_arms = variants.iter().map(|(variant_name, field)| { + let field_ty = &field.ty; + quote! { + #name::#variant_name(x) => <#field_ty as sp1_stark::air::MachineAir>::local_only(x) + } + }); + let machine_air = quote! { impl #impl_generics sp1_stark::air::MachineAir for #name #ty_generics #where_clause { type Record = #execution_record_path; @@ -249,6 +256,12 @@ pub fn machine_air_derive(input: TokenStream) -> TokenStream { #(#commit_scope_arms,)* } } + + fn local_only(&self) -> bool { + match self { + #(#local_only_arms,)* + } + } } }; diff --git a/crates/eval/Cargo.toml b/crates/eval/Cargo.toml index 6cb700a464..e986c88112 100644 --- a/crates/eval/Cargo.toml +++ b/crates/eval/Cargo.toml @@ -12,12 +12,10 @@ categories = { workspace = true } [dependencies] sp1-prover = { workspace = true } sp1-sdk = { workspace = true } -p3-baby-bear = { workspace = true } sp1-stark = { workspace = true } anyhow = "1.0.83" clap = { version = "4.5.9", features = ["derive"] } -csv = "1.3.0" serde = "1.0.204" bincode = "1.3.3" time = "0.3.26" diff --git a/crates/perf/Cargo.toml b/crates/perf/Cargo.toml index 4f36711353..93ae716949 100644 --- a/crates/perf/Cargo.toml +++ b/crates/perf/Cargo.toml @@ -17,16 +17,9 @@ p3-baby-bear = { workspace = true } sp1-stark = { workspace = true } sp1-cuda = { workspace = true } -anyhow = "1.0.83" clap = { version = "4.5.9", features = ["derive"] } -csv = "1.3.0" -serde = "1.0.204" bincode = "1.3.3" time = "0.3.26" -slack-rust = { package = "slack-rust-rs", version = "0.0.1" } -tokio = { version = "1.39.0", features = ["full"] } -reqwest = { version = "0.12.4", features = ["json"] } -serde_json = "1.0.104" [features] native-gnark = ["sp1-sdk/native-gnark"] diff --git a/crates/prover/Cargo.toml b/crates/prover/Cargo.toml index a4fc480c7f..2a57c7bfd3 100644 --- a/crates/prover/Cargo.toml +++ b/crates/prover/Cargo.toml @@ -27,7 +27,6 @@ p3-bn254-fr = { workspace = true } p3-commit = { workspace = true } bincode = "1.3.3" serde = { version = "1.0", features = ["derive", "rc"] } -rayon = "1.10.0" itertools = "0.13.0" tracing = "0.1.40" tracing-subscriber = "0.3.18" @@ -35,15 +34,11 @@ serde_json = "1.0.121" clap = { version = "4.5.9", features = ["derive", "env"] } anyhow = "1.0.83" dirs = "5.0.1" -tempfile = "3.10.1" -subtle-encoding = "0.5.1" serial_test = "3.1.1" num-bigint = "0.4.6" thiserror = "1.0.63" lru = "0.12.4" eyre = "0.6.12" -reqwest = { version = "0.11", features = ["blocking"] } -lazy_static = "1.5.0" [[bin]] name = "build_plonk_bn254" @@ -66,7 +61,6 @@ name = "e2e" path = "scripts/e2e.rs" [features] -neon = ["sp1-core-machine/neon"] native-gnark = ["sp1-recursion-gnark-ffi/native"] export-tests = [] debug = ["sp1-core-machine/debug"] diff --git a/crates/prover/release.sh b/crates/prover/release.sh index 005a2b6456..41013e1fcf 100644 --- a/crates/prover/release.sh +++ b/crates/prover/release.sh @@ -76,6 +76,10 @@ if [ $? -ne 0 ]; then exit 1 fi +# Copy Groth16 and Plonk vks to verifier crate +cp ./build/groth16/$VERSION/groth16_vk.bin ../verifier/bn254-vk/groth16_vk.bin +cp ./build/plonk/$VERSION/plonk_vk.bin ../verifier/bn254-vk/plonk_vk.bin + echo "Successfully uploaded build artifacts to S3:" echo "- s3://$S3_BUCKET/$GROTH16_ARCHIVE" echo "- s3://$S3_BUCKET/$PLONK_ARCHIVE" diff --git a/crates/prover/src/lib.rs b/crates/prover/src/lib.rs index fb46afd4ed..5ffd096e43 100644 --- a/crates/prover/src/lib.rs +++ b/crates/prover/src/lib.rs @@ -247,7 +247,11 @@ impl SP1Prover { let program = self.get_program(elf).unwrap(); let (pk, vk) = self.core_prover.setup(&program); let vk = SP1VerifyingKey { vk }; - let pk = SP1ProvingKey { pk: pk.to_host(), elf: elf.to_vec(), vk: vk.clone() }; + let pk = SP1ProvingKey { + pk: self.core_prover.pk_to_host(&pk), + elf: elf.to_vec(), + vk: vk.clone(), + }; (pk, vk) } @@ -292,20 +296,17 @@ impl SP1Prover { ) -> Result { context.subproof_verifier.replace(Arc::new(self)); let program = self.get_program(&pk.elf).unwrap(); - let (proof, public_values_stream, cycles) = sp1_core_machine::utils::prove_with_context::< - _, - C::CoreProver, - >( - &self.core_prover, - &>>::DeviceProvingKey::from_host( - &pk.pk, - ), - program, - stdin, - opts.core_opts, - context, - self.core_shape_config.as_ref(), - )?; + let pk = self.core_prover.pk_to_device(&pk.pk); + let (proof, public_values_stream, cycles) = + sp1_core_machine::utils::prove_with_context::<_, C::CoreProver>( + &self.core_prover, + &pk, + program, + stdin, + opts.core_opts, + context, + self.core_shape_config.as_ref(), + )?; Self::check_for_high_cycles(cycles); let public_values = SP1PublicValues::from(&public_values_stream); Ok(SP1CoreProof { @@ -819,7 +820,7 @@ impl SP1Prover { #[cfg(feature = "debug")] self.compress_prover.debug_constraints( - &pk.to_host(), + &self.compress_prover.pk_to_host(&pk), vec![record.clone()], &mut challenger.clone(), ); @@ -900,12 +901,8 @@ impl SP1Prover { if let Ok((index, height, vk, proof)) = received { batch.push((index, height, vk, proof)); - // Compute whether we've reached the root of the tree. - let is_complete = height == expected_height; - - // If it's not complete, and we haven't reached the batch size, - // continue. - if !is_complete && batch.len() < batch_size { + // If we haven't reached the batch size, continue. + if batch.len() < batch_size { continue; } @@ -920,7 +917,10 @@ impl SP1Prover { let inputs = if is_last { vec![batch[0].clone()] } else { batch.clone() }; - let next_input_index = inputs[0].1 + 1; + let next_input_height = inputs[0].1 + 1; + + let is_complete = next_input_height == expected_height; + let vks_and_proofs = inputs .into_iter() .map(|(_, _, vk, proof)| (vk, proof)) @@ -934,7 +934,7 @@ impl SP1Prover { input_tx .lock() .unwrap() - .send((count, next_input_index, input)) + .send((count, next_input_height, input)) .unwrap(); input_sync.advance_turn(); count += 1; diff --git a/crates/recursion/circuit/src/fri.rs b/crates/recursion/circuit/src/fri.rs index 099f8bcfe4..ea343bea4e 100644 --- a/crates/recursion/circuit/src/fri.rs +++ b/crates/recursion/circuit/src/fri.rs @@ -151,10 +151,11 @@ pub fn verify_two_adic_pcs, SC: BabyBearFriConfigV for (z, ps_at_z) in izip!(mat_points, mat_values) { // Unroll the loop calculation to avoid symbolic expression overhead - // let mut acc: Ext = builder.constant(C::EF::zero()); - let mut acc: Ext<_, _> = builder.uninit(); + let len = ps_at_z.len(); + let mut alphas = Vec::with_capacity(len); + let mut p_at_zs = Vec::with_capacity(len); + let mut p_at_xs = Vec::with_capacity(len); - builder.push_op(DslIr::ImmE(acc, C::EF::zero())); for (p_at_x, p_at_z) in izip!(mat_opening.clone(), ps_at_z) { let pow = log_height_pow[log_height]; // Fill in any missing powers of alpha. @@ -170,24 +171,17 @@ pub fn verify_two_adic_pcs, SC: BabyBearFriConfigV builder.reduce_e(new_alpha); alpha_pows.push(new_alpha); } - // Unroll: - // - // acc = builder.eval(acc + (alpha_pows[pow] * (p_at_z - p_at_x[0]))); - - // let temp_1 = p_at_z - p_at_x[0]; - let temp_1: Ext<_, _> = builder.uninit(); - builder.push_op(DslIr::SubEF(temp_1, p_at_z, p_at_x[0])); - // let temp_2 = alpha_pows[pow] * temp_1; - let temp_2: Ext<_, _> = builder.uninit(); - builder.push_op(DslIr::MulE(temp_2, alpha_pows[pow], temp_1)); - // let temp_3 = acc + temp_2; - let temp_3: Ext<_, _> = builder.uninit(); - builder.push_op(DslIr::AddE(temp_3, acc, temp_2)); - // acc = temp_3; - acc = temp_3; + + alphas.push(alpha_pows[pow]); + p_at_zs.push(p_at_z); + p_at_xs.push(p_at_x[0]); log_height_pow[log_height] += 1; } + + // acc = sum(alpha_pows[pow] * (p_at_z - p_at_x[0])); + let acc = C::batch_fri(builder, alphas, p_at_zs, p_at_xs); + // Unroll this calculation to avoid symbolic expression overhead // ro[log_height] = builder.eval(ro[log_height] + acc / (z - x)); diff --git a/crates/recursion/circuit/src/lib.rs b/crates/recursion/circuit/src/lib.rs index eeda3448b8..22247f25ed 100644 --- a/crates/recursion/circuit/src/lib.rs +++ b/crates/recursion/circuit/src/lib.rs @@ -1,12 +1,11 @@ //! Copied from [`sp1_recursion_program`]. -use std::iter::{repeat, zip}; - use challenger::{ CanCopyChallenger, CanObserveVariable, DuplexChallengerVariable, FieldChallengerVariable, MultiField32ChallengerVariable, SpongeChallengerShape, }; use hash::{FieldHasherVariable, Posedion2BabyBearHasherVariable}; +use itertools::izip; use p3_bn254_fr::Bn254Fr; use p3_field::AbstractField; use p3_matrix::dense::RowMajorMatrix; @@ -15,6 +14,7 @@ use sp1_recursion_compiler::{ config::{InnerConfig, OuterConfig}, ir::{Builder, Config, DslIr, Ext, Felt, SymbolicFelt, Var, Variable}, }; +use std::iter::{repeat, zip}; mod types; @@ -137,6 +137,13 @@ pub trait CircuitConfig: Config { two_adic_powers_of_x: &[Felt], ) -> Felt; + fn batch_fri( + builder: &mut Builder, + alpha_pows: Vec>, + p_at_zs: Vec>, + p_at_xs: Vec>, + ) -> Ext; + fn num2bits( builder: &mut Builder, num: Felt<::F>, @@ -210,6 +217,15 @@ impl CircuitConfig for InnerConfig { builder.exp_reverse_bits_v2(input, power_bits) } + fn batch_fri( + builder: &mut Builder, + alpha_pows: Vec::F, ::EF>>, + p_at_zs: Vec::F, ::EF>>, + p_at_xs: Vec::F>>, + ) -> Ext<::F, ::EF> { + builder.batch_fri_v2(alpha_pows, p_at_zs, p_at_xs) + } + fn num2bits( builder: &mut Builder, num: Felt<::F>, @@ -329,6 +345,15 @@ impl CircuitConfig for WrapConfig { result } + fn batch_fri( + builder: &mut Builder, + alpha_pows: Vec::F, ::EF>>, + p_at_zs: Vec::F, ::EF>>, + p_at_xs: Vec::F>>, + ) -> Ext<::F, ::EF> { + builder.batch_fri_v2(alpha_pows, p_at_zs, p_at_xs) + } + fn num2bits( builder: &mut Builder, num: Felt<::F>, @@ -440,6 +465,26 @@ impl CircuitConfig for OuterConfig { result } + fn batch_fri( + builder: &mut Builder, + alpha_pows: Vec::F, ::EF>>, + p_at_zs: Vec::F, ::EF>>, + p_at_xs: Vec::F>>, + ) -> Ext<::F, ::EF> { + let mut acc: Ext<_, _> = builder.uninit(); + builder.push_op(DslIr::ImmE(acc, ::EF::zero())); + for (alpha_pow, p_at_z, p_at_x) in izip!(alpha_pows, p_at_zs, p_at_xs) { + let temp_1: Ext<_, _> = builder.uninit(); + builder.push_op(DslIr::SubEF(temp_1, p_at_z, p_at_x)); + let temp_2: Ext<_, _> = builder.uninit(); + builder.push_op(DslIr::MulE(temp_2, alpha_pow, temp_1)); + let temp_3: Ext<_, _> = builder.uninit(); + builder.push_op(DslIr::AddE(temp_3, acc, temp_2)); + acc = temp_3; + } + acc + } + fn num2bits( builder: &mut Builder, num: Felt<::F>, diff --git a/crates/recursion/circuit/src/stark.rs b/crates/recursion/circuit/src/stark.rs index 26e83c76d3..feb81e0ef4 100644 --- a/crates/recursion/circuit/src/stark.rs +++ b/crates/recursion/circuit/src/stark.rs @@ -358,10 +358,18 @@ where .map(|(name, domain, _)| { let i = chip_ordering[name]; let values = opened_values.chips[i].preprocessed.clone(); - TwoAdicPcsMatsVariable:: { - domain: *domain, - points: vec![zeta, domain.next_point_variable(builder, zeta)], - values: vec![values.local, values.next], + if !chips[i].local_only() { + TwoAdicPcsMatsVariable:: { + domain: *domain, + points: vec![zeta, domain.next_point_variable(builder, zeta)], + values: vec![values.local, values.next], + } + } else { + TwoAdicPcsMatsVariable:: { + domain: *domain, + points: vec![zeta], + values: vec![values.local], + } } }) .collect::>(); @@ -369,10 +377,21 @@ where let main_domains_points_and_opens = trace_domains .iter() .zip_eq(opened_values.chips.iter()) - .map(|(domain, values)| TwoAdicPcsMatsVariable:: { - domain: *domain, - points: vec![zeta, domain.next_point_variable(builder, zeta)], - values: vec![values.main.local.clone(), values.main.next.clone()], + .zip_eq(chips.iter()) + .map(|((domain, values), chip)| { + if !chip.local_only() { + TwoAdicPcsMatsVariable:: { + domain: *domain, + points: vec![zeta, domain.next_point_variable(builder, zeta)], + values: vec![values.main.local.clone(), values.main.next.clone()], + } + } else { + TwoAdicPcsMatsVariable:: { + domain: *domain, + points: vec![zeta], + values: vec![values.main.local.clone()], + } + } }) .collect::>(); diff --git a/crates/recursion/circuit/src/utils.rs b/crates/recursion/circuit/src/utils.rs index 9609a5f40c..9c7eeaf8f0 100644 --- a/crates/recursion/circuit/src/utils.rs +++ b/crates/recursion/circuit/src/utils.rs @@ -107,7 +107,6 @@ pub(crate) mod tests { use sp1_recursion_core::{machine::RecursionAir, Runtime}; use sp1_stark::{ baby_bear_poseidon2::BabyBearPoseidon2, CpuProver, InnerChallenge, InnerVal, MachineProver, - MachineProvingKey, }; use crate::witness::WitnessBlock; @@ -145,8 +144,8 @@ pub(crate) mod tests { let proof_wide_span = tracing::debug_span!("Run test with wide machine").entered(); let wide_machine = RecursionAir::<_, 3>::compress_machine(SC::default()); let (pk, vk) = wide_machine.setup(&program); - let pk = P::DeviceProvingKey::from_host(&pk); let prover = P::new(wide_machine); + let pk = prover.pk_to_device(&pk); let result = run_test_machine_with_prover::<_, _, P>(&prover, records.clone(), pk, vk); proof_wide_span.exit(); diff --git a/crates/recursion/compiler/src/circuit/builder.rs b/crates/recursion/compiler/src/circuit/builder.rs index 418aeb4bfb..f78145ad1d 100644 --- a/crates/recursion/compiler/src/circuit/builder.rs +++ b/crates/recursion/compiler/src/circuit/builder.rs @@ -17,6 +17,12 @@ pub trait CircuitV2Builder { fn num2bits_v2_f(&mut self, num: Felt, num_bits: usize) -> Vec>; fn exp_reverse_bits_v2(&mut self, input: Felt, power_bits: Vec>) -> Felt; + fn batch_fri_v2( + &mut self, + alphas: Vec>, + p_at_zs: Vec>, + p_at_xs: Vec>, + ) -> Ext; fn poseidon2_permute_v2(&mut self, state: [Felt; WIDTH]) -> [Felt; WIDTH]; fn poseidon2_hash_v2(&mut self, array: &[Felt]) -> [Felt; DIGEST_SIZE]; fn poseidon2_compress_v2( @@ -106,6 +112,18 @@ impl> CircuitV2Builder for Builder { output } + /// A version of the `batch_fri` that uses the BatchFRI precompile. + fn batch_fri_v2( + &mut self, + alpha_pows: Vec>, + p_at_zs: Vec>, + p_at_xs: Vec>, + ) -> Ext { + let output: Ext<_, _> = self.uninit(); + self.push_op(DslIr::CircuitV2BatchFRI(Box::new((output, alpha_pows, p_at_zs, p_at_xs)))); + output + } + /// Applies the Poseidon2 permutation to the given array. fn poseidon2_permute_v2(&mut self, array: [Felt; WIDTH]) -> [Felt; WIDTH] { let output: [Felt; WIDTH] = core::array::from_fn(|_| self.uninit()); diff --git a/crates/recursion/compiler/src/circuit/compiler.rs b/crates/recursion/compiler/src/circuit/compiler.rs index b44b38a1dd..14aa320c98 100644 --- a/crates/recursion/compiler/src/circuit/compiler.rs +++ b/crates/recursion/compiler/src/circuit/compiler.rs @@ -338,6 +338,26 @@ where })) } + fn batch_fri( + &mut self, + acc: Ext, + alpha_pows: Vec>, + p_at_zs: Vec>, + p_at_xs: Vec>, + ) -> Instruction { + Instruction::BatchFRI(Box::new(BatchFRIInstr { + base_vec_addrs: BatchFRIBaseVecIo { + p_at_x: p_at_xs.into_iter().map(|e| e.read(self)).collect(), + }, + ext_single_addrs: BatchFRIExtSingleIo { acc: acc.write(self) }, + ext_vec_addrs: BatchFRIExtVecIo { + p_at_z: p_at_zs.into_iter().map(|e| e.read(self)).collect(), + alpha_pow: alpha_pows.into_iter().map(|e| e.read(self)).collect(), + }, + acc_mult: C::F::zero(), + })) + } + fn commit_public_values( &mut self, public_values: &RecursionPublicValues>, @@ -483,6 +503,7 @@ where f(self.hint_bit_decomposition(value, output)) } DslIr::CircuitV2FriFold(data) => f(self.fri_fold(data.0, data.1)), + DslIr::CircuitV2BatchFRI(data) => f(self.batch_fri(data.0, data.1, data.2, data.3)), DslIr::CircuitV2CommitPublicValues(public_values) => { f(self.commit_public_values(&public_values)) } @@ -619,6 +640,14 @@ where alpha_pow_mults.iter_mut().zip(alpha_pow_output).for_each(&mut backfill); ro_mults.iter_mut().zip(ro_output).for_each(&mut backfill); } + Instruction::BatchFRI(instr) => { + let BatchFRIInstr { + ext_single_addrs: BatchFRIExtSingleIo { ref acc }, + acc_mult, + .. + } = instr.as_mut(); + backfill((acc_mult, acc)); + } Instruction::HintExt2Felts(HintExt2FeltsInstr { output_addrs_mults, .. }) => { @@ -674,6 +703,7 @@ const fn instr_name(instr: &Instruction) -> &'static str { Instruction::ExpReverseBitsLen(_) => "ExpReverseBitsLen", Instruction::HintBits(_) => "HintBits", Instruction::FriFold(_) => "FriFold", + Instruction::BatchFRI(_) => "BatchFRI", Instruction::Print(_) => "Print", Instruction::HintExt2Felts(_) => "HintExt2Felts", Instruction::Hint(_) => "Hint", diff --git a/crates/recursion/compiler/src/ir/instructions.rs b/crates/recursion/compiler/src/ir/instructions.rs index 3d718e2568..04ddb26713 100644 --- a/crates/recursion/compiler/src/ir/instructions.rs +++ b/crates/recursion/compiler/src/ir/instructions.rs @@ -120,8 +120,7 @@ pub enum DslIr { /// Inverts an extension field element (ext = 1 / ext). InvE(Ext, Ext), - // Selecting Digest. - /// Selects the digest based on a bit (should_swap, first result, second result, first input, second input) + /// Selects order of felts based on a bit (should_swap, first result, second result, first input, second input) Select(Felt, Felt, Felt, Felt, Felt), // Control flow. @@ -283,6 +282,11 @@ pub enum DslIr { /// Executes a FRI fold operation. Input is the fri fold input array. See [`FriFoldInput`] for /// more details. CircuitV2FriFold(Box<(CircuitV2FriFoldOutput, CircuitV2FriFoldInput)>), + // FRI specific instructions. + /// Executes a Batch FRI loop. Input is the power of alphas, evaluations at z, and evaluations at x. + CircuitV2BatchFRI( + Box<(Ext, Vec>, Vec>, Vec>)>, + ), /// Select's a variable based on a condition. (select(cond, true_val, false_val) => output). /// Should only be used when target is a gnark circuit. CircuitSelectV(Var, Var, Var, Var), diff --git a/crates/recursion/core/src/chips/alu_base.rs b/crates/recursion/core/src/chips/alu_base.rs index ba29d34434..f587c73ce8 100644 --- a/crates/recursion/core/src/chips/alu_base.rs +++ b/crates/recursion/core/src/chips/alu_base.rs @@ -149,6 +149,10 @@ impl MachineAir for BaseAluChip { fn included(&self, _record: &Self::Record) -> bool { true } + + fn local_only(&self) -> bool { + true + } } impl Air for BaseAluChip diff --git a/crates/recursion/core/src/chips/alu_ext.rs b/crates/recursion/core/src/chips/alu_ext.rs index 89e7940e49..b698a5d209 100644 --- a/crates/recursion/core/src/chips/alu_ext.rs +++ b/crates/recursion/core/src/chips/alu_ext.rs @@ -147,6 +147,10 @@ impl> MachineAir for ExtAluChip { fn included(&self, _record: &Self::Record) -> bool { true } + + fn local_only(&self) -> bool { + true + } } impl Air for ExtAluChip diff --git a/crates/recursion/core/src/chips/batch_fri.rs b/crates/recursion/core/src/chips/batch_fri.rs new file mode 100644 index 0000000000..6522a9881d --- /dev/null +++ b/crates/recursion/core/src/chips/batch_fri.rs @@ -0,0 +1,231 @@ +#![allow(clippy::needless_range_loop)] + +use core::borrow::Borrow; +use itertools::Itertools; +use sp1_core_machine::utils::pad_rows_fixed; +use sp1_stark::air::{BaseAirBuilder, BinomialExtension, MachineAir}; +use std::borrow::BorrowMut; +use tracing::instrument; + +use p3_air::{Air, AirBuilder, BaseAir, PairBuilder}; +use p3_field::PrimeField32; +use p3_matrix::{dense::RowMajorMatrix, Matrix}; +use sp1_stark::air::ExtensionAirBuilder; + +use sp1_derive::AlignedBorrow; + +use crate::{ + air::Block, + builder::SP1RecursionAirBuilder, + runtime::{Instruction, RecursionProgram}, + Address, BatchFRIInstr, ExecutionRecord, +}; + +pub const NUM_BATCH_FRI_COLS: usize = core::mem::size_of::>(); +pub const NUM_BATCH_FRI_PREPROCESSED_COLS: usize = + core::mem::size_of::>(); + +#[derive(Clone, Debug, Copy, Default)] +pub struct BatchFRIChip; + +/// The preprocessed columns for a batch FRI invocation. +#[derive(AlignedBorrow, Debug, Clone, Copy)] +#[repr(C)] +pub struct BatchFRIPreprocessedCols { + pub is_real: T, + pub is_end: T, + pub acc_addr: Address, + pub alpha_pow_addr: Address, + pub p_at_z_addr: Address, + pub p_at_x_addr: Address, +} + +/// The main columns for a batch FRI invocation. +#[derive(AlignedBorrow, Debug, Clone, Copy)] +#[repr(C)] +pub struct BatchFRICols { + pub acc: Block, + pub alpha_pow: Block, + pub p_at_z: Block, + pub p_at_x: T, +} + +impl BaseAir for BatchFRIChip { + fn width(&self) -> usize { + NUM_BATCH_FRI_COLS + } +} + +impl MachineAir for BatchFRIChip { + type Record = ExecutionRecord; + + type Program = RecursionProgram; + + fn name(&self) -> String { + "BatchFRI".to_string() + } + + fn generate_dependencies(&self, _: &Self::Record, _: &mut Self::Record) { + // This is a no-op. + } + + fn preprocessed_width(&self) -> usize { + NUM_BATCH_FRI_PREPROCESSED_COLS + } + fn generate_preprocessed_trace(&self, program: &Self::Program) -> Option> { + let mut rows: Vec<[F; NUM_BATCH_FRI_PREPROCESSED_COLS]> = Vec::new(); + program + .instructions + .iter() + .filter_map(|instruction| { + if let Instruction::BatchFRI(instr) = instruction { + Some(instr) + } else { + None + } + }) + .for_each(|instruction| { + let BatchFRIInstr { base_vec_addrs, ext_single_addrs, ext_vec_addrs, acc_mult } = + instruction.as_ref(); + let len = ext_vec_addrs.p_at_z.len(); + let mut row_add = vec![[F::zero(); NUM_BATCH_FRI_PREPROCESSED_COLS]; len]; + debug_assert_eq!(*acc_mult, F::one()); + + row_add.iter_mut().enumerate().for_each(|(i, row)| { + let row: &mut BatchFRIPreprocessedCols = row.as_mut_slice().borrow_mut(); + row.is_real = F::one(); + row.is_end = F::from_bool(i == len - 1); + row.acc_addr = ext_single_addrs.acc; + row.alpha_pow_addr = ext_vec_addrs.alpha_pow[i]; + row.p_at_z_addr = ext_vec_addrs.p_at_z[i]; + row.p_at_x_addr = base_vec_addrs.p_at_x[i]; + }); + rows.extend(row_add); + }); + + // Pad the trace to a power of two. + pad_rows_fixed( + &mut rows, + || [F::zero(); NUM_BATCH_FRI_PREPROCESSED_COLS], + program.fixed_log2_rows(self), + ); + + let trace = RowMajorMatrix::new( + rows.into_iter().flatten().collect(), + NUM_BATCH_FRI_PREPROCESSED_COLS, + ); + Some(trace) + } + + #[instrument(name = "generate batch fri trace", level = "debug", skip_all, fields(rows = input.batch_fri_events.len()))] + fn generate_trace( + &self, + input: &ExecutionRecord, + _: &mut ExecutionRecord, + ) -> RowMajorMatrix { + let mut rows = input + .batch_fri_events + .iter() + .map(|event| { + let mut row = [F::zero(); NUM_BATCH_FRI_COLS]; + let cols: &mut BatchFRICols = row.as_mut_slice().borrow_mut(); + cols.acc = event.ext_single.acc; + cols.alpha_pow = event.ext_vec.alpha_pow; + cols.p_at_z = event.ext_vec.p_at_z; + cols.p_at_x = event.base_vec.p_at_x; + row + }) + .collect_vec(); + + // Pad the trace to a power of two. + pad_rows_fixed(&mut rows, || [F::zero(); NUM_BATCH_FRI_COLS], input.fixed_log2_rows(self)); + + // Convert the trace to a row major matrix. + let trace = RowMajorMatrix::new(rows.into_iter().flatten().collect(), NUM_BATCH_FRI_COLS); + + #[cfg(debug_assertions)] + println!( + "batch fri trace dims is width: {:?}, height: {:?}", + trace.width(), + trace.height() + ); + + trace + } + + fn included(&self, _record: &Self::Record) -> bool { + true + } +} + +impl BatchFRIChip { + pub fn eval_batch_fri( + &self, + builder: &mut AB, + local: &BatchFRICols, + next: &BatchFRICols, + local_prepr: &BatchFRIPreprocessedCols, + _next_prepr: &BatchFRIPreprocessedCols, + ) { + // Constrain memory read for alpha_pow, p_at_z, and p_at_x. + builder.receive_block(local_prepr.alpha_pow_addr, local.alpha_pow, local_prepr.is_real); + builder.receive_block(local_prepr.p_at_z_addr, local.p_at_z, local_prepr.is_real); + builder.receive_single(local_prepr.p_at_x_addr, local.p_at_x, local_prepr.is_real); + + // Constrain memory write for the accumulator. + // Note that we write with multiplicity 1, when `is_end` is true. + builder.send_block(local_prepr.acc_addr, local.acc, local_prepr.is_end); + + // Constrain the accumulator value of the first row. + builder.when_first_row().assert_ext_eq( + local.acc.as_extension::(), + local.alpha_pow.as_extension::() + * (local.p_at_z.as_extension::() + - BinomialExtension::from_base(local.p_at_x.into())), + ); + + // Constrain the accumulator of the next row when the current row is the end of loop. + builder.when_transition().when(local_prepr.is_end).assert_ext_eq( + next.acc.as_extension::(), + next.alpha_pow.as_extension::() + * (next.p_at_z.as_extension::() + - BinomialExtension::from_base(next.p_at_x.into())), + ); + + // Constrain the accumulator of the next row when the current row is not the end of loop. + builder.when_transition().when_not(local_prepr.is_end).assert_ext_eq( + next.acc.as_extension::(), + local.acc.as_extension::() + + next.alpha_pow.as_extension::() + * (next.p_at_z.as_extension::() + - BinomialExtension::from_base(next.p_at_x.into())), + ); + } + + pub const fn do_memory_access(local: &BatchFRIPreprocessedCols) -> T { + local.is_real + } +} + +impl Air for BatchFRIChip +where + AB: SP1RecursionAirBuilder + PairBuilder, +{ + fn eval(&self, builder: &mut AB) { + let main = builder.main(); + let (local, next) = (main.row_slice(0), main.row_slice(1)); + let local: &BatchFRICols = (*local).borrow(); + let next: &BatchFRICols = (*next).borrow(); + let prepr = builder.preprocessed(); + let (prepr_local, prepr_next) = (prepr.row_slice(0), prepr.row_slice(1)); + let prepr_local: &BatchFRIPreprocessedCols = (*prepr_local).borrow(); + let prepr_next: &BatchFRIPreprocessedCols = (*prepr_next).borrow(); + + // Dummy constraints to normalize to DEGREE. + let lhs = (0..DEGREE).map(|_| prepr_local.is_real.into()).product::(); + let rhs = (0..DEGREE).map(|_| prepr_local.is_real.into()).product::(); + builder.assert_eq(lhs, rhs); + + self.eval_batch_fri::(builder, local, next, prepr_local, prepr_next); + } +} diff --git a/crates/recursion/core/src/chips/mem/constant.rs b/crates/recursion/core/src/chips/mem/constant.rs index 27bc64b8da..9298de73ec 100644 --- a/crates/recursion/core/src/chips/mem/constant.rs +++ b/crates/recursion/core/src/chips/mem/constant.rs @@ -122,6 +122,10 @@ impl MachineAir for MemoryChip { fn included(&self, _record: &Self::Record) -> bool { true } + + fn local_only(&self) -> bool { + true + } } impl Air for MemoryChip diff --git a/crates/recursion/core/src/chips/mem/variable.rs b/crates/recursion/core/src/chips/mem/variable.rs index a5b1fb3156..98ae999ba4 100644 --- a/crates/recursion/core/src/chips/mem/variable.rs +++ b/crates/recursion/core/src/chips/mem/variable.rs @@ -120,6 +120,10 @@ impl MachineAir for MemoryChip { fn included(&self, _record: &Self::Record) -> bool { true } + + fn local_only(&self) -> bool { + true + } } impl Air for MemoryChip diff --git a/crates/recursion/core/src/chips/mod.rs b/crates/recursion/core/src/chips/mod.rs index 61f2be6a5e..ef2d65691a 100644 --- a/crates/recursion/core/src/chips/mod.rs +++ b/crates/recursion/core/src/chips/mod.rs @@ -1,5 +1,6 @@ pub mod alu_base; pub mod alu_ext; +pub mod batch_fri; pub mod exp_reverse_bits; pub mod fri_fold; pub mod mem; diff --git a/crates/recursion/core/src/chips/poseidon2_wide/trace.rs b/crates/recursion/core/src/chips/poseidon2_wide/trace.rs index 19a3b6f287..e13717bfae 100644 --- a/crates/recursion/core/src/chips/poseidon2_wide/trace.rs +++ b/crates/recursion/core/src/chips/poseidon2_wide/trace.rs @@ -82,6 +82,10 @@ impl MachineAir for Poseidon2WideChip bool { + true + } + fn preprocessed_width(&self) -> usize { PREPROCESSED_POSEIDON2_WIDTH } diff --git a/crates/recursion/core/src/chips/select.rs b/crates/recursion/core/src/chips/select.rs index eebfe7e674..d1c44d9b94 100644 --- a/crates/recursion/core/src/chips/select.rs +++ b/crates/recursion/core/src/chips/select.rs @@ -119,6 +119,10 @@ impl MachineAir for SelectChip { fn included(&self, _record: &Self::Record) -> bool { true } + + fn local_only(&self) -> bool { + true + } } impl Air for SelectChip diff --git a/crates/recursion/core/src/lib.rs b/crates/recursion/core/src/lib.rs index 8a90a2f593..bec9e0b0ab 100644 --- a/crates/recursion/core/src/lib.rs +++ b/crates/recursion/core/src/lib.rs @@ -116,7 +116,7 @@ pub struct Poseidon2SkinnyInstr { pub type Poseidon2Event = Poseidon2Io; -/// The inputs and outputs to a select digest operation. +/// The inputs and outputs to a select operation. #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct SelectIo { pub bit: V, @@ -126,7 +126,7 @@ pub struct SelectIo { pub in2: V, } -/// An instruction invoking the select digest operation. +/// An instruction invoking the select operation. #[derive(Clone, Copy, Debug, Serialize, Deserialize)] pub struct SelectInstr { pub addrs: SelectIo>, @@ -134,7 +134,7 @@ pub struct SelectInstr { pub mult2: F, } -/// The event encoding the inputs and outputs of a select digest operation. +/// The event encoding the inputs and outputs of a select operation. pub type SelectEvent = SelectIo; /// The inputs and outputs to an exp-reverse-bits operation. @@ -217,6 +217,52 @@ pub struct FriFoldEvent { pub ext_vec: FriFoldExtVecIo>, } +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct BatchFRIIo { + pub ext_single: BatchFRIExtSingleIo>, + pub ext_vec: BatchFRIExtVecIo>>, + pub base_vec: BatchFRIBaseVecIo, +} + +/// The extension-field-valued single inputs to the batch FRI operation. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct BatchFRIExtSingleIo { + pub acc: V, +} + +/// The extension-field-valued vector inputs to the batch FRI operation. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct BatchFRIExtVecIo { + pub p_at_z: V, + pub alpha_pow: V, +} + +/// The base-field-valued vector inputs to the batch FRI operation. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct BatchFRIBaseVecIo { + pub p_at_x: V, +} + +/// An instruction invoking the batch FRI operation. Addresses for extension field elements are of +/// the same type as for base field elements. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct BatchFRIInstr { + pub base_vec_addrs: BatchFRIBaseVecIo>>, + pub ext_single_addrs: BatchFRIExtSingleIo>, + pub ext_vec_addrs: BatchFRIExtVecIo>>, + pub acc_mult: F, +} + +/// The event encoding the data of a single iteration within the batch FRI operation. +/// For any given event, we are accessing a single element of the `Vec` inputs, so that the event +/// is not a type alias for `BatchFRIIo` like many of the other events. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct BatchFRIEvent { + pub base_vec: BatchFRIBaseVecIo, + pub ext_single: BatchFRIExtSingleIo>, + pub ext_vec: BatchFRIExtVecIo>, +} + /// An instruction that will save the public values to the execution record and will commit to /// it's digest. #[derive(Clone, Debug, Serialize, Deserialize)] diff --git a/crates/recursion/core/src/machine.rs b/crates/recursion/core/src/machine.rs index 4bb7c87888..b143487d1d 100644 --- a/crates/recursion/core/src/machine.rs +++ b/crates/recursion/core/src/machine.rs @@ -11,6 +11,7 @@ use crate::{ chips::{ alu_base::{BaseAluChip, NUM_BASE_ALU_ENTRIES_PER_ROW}, alu_ext::{ExtAluChip, NUM_EXT_ALU_ENTRIES_PER_ROW}, + batch_fri::BatchFRIChip, exp_reverse_bits::ExpReverseBitsLenChip, fri_fold::FriFoldChip, mem::{ @@ -42,6 +43,7 @@ pub enum RecursionAir, const DEGREE: u Poseidon2Wide(Poseidon2WideChip), Select(SelectChip), FriFold(FriFoldChip), + BatchFRI(BatchFRIChip), ExpReverseBitsLen(ExpReverseBitsLenChip), PublicValues(PublicValuesChip), } @@ -54,6 +56,7 @@ pub struct RecursionAirEventCount { pub ext_alu_events: usize, pub poseidon2_wide_events: usize, pub fri_fold_events: usize, + pub batch_fri_events: usize, pub select_events: usize, pub exp_reverse_bits_len_events: usize, } @@ -70,6 +73,7 @@ impl, const DEGREE: usize> RecursionAi RecursionAir::ExtAlu(ExtAluChip), RecursionAir::Poseidon2Wide(Poseidon2WideChip::), RecursionAir::FriFold(FriFoldChip::::default()), + RecursionAir::BatchFRI(BatchFRIChip::), RecursionAir::Select(SelectChip), RecursionAir::ExpReverseBitsLen(ExpReverseBitsLenChip::), RecursionAir::PublicValues(PublicValuesChip), @@ -91,6 +95,7 @@ impl, const DEGREE: usize> RecursionAi RecursionAir::ExtAlu(ExtAluChip), RecursionAir::Poseidon2Skinny(Poseidon2SkinnyChip::::default()), RecursionAir::FriFold(FriFoldChip::::default()), + RecursionAir::BatchFRI(BatchFRIChip::), RecursionAir::Select(SelectChip), RecursionAir::ExpReverseBitsLen(ExpReverseBitsLenChip::), RecursionAir::PublicValues(PublicValuesChip), @@ -109,6 +114,7 @@ impl, const DEGREE: usize> RecursionAi RecursionAir::BaseAlu(BaseAluChip), RecursionAir::ExtAlu(ExtAluChip), RecursionAir::Poseidon2Wide(Poseidon2WideChip::), + RecursionAir::BatchFRI(BatchFRIChip::), RecursionAir::Select(SelectChip), RecursionAir::ExpReverseBitsLen(ExpReverseBitsLenChip::), RecursionAir::PublicValues(PublicValuesChip), @@ -134,6 +140,7 @@ impl, const DEGREE: usize> RecursionAi RecursionAir::BaseAlu(BaseAluChip), RecursionAir::ExtAlu(ExtAluChip), RecursionAir::Poseidon2Skinny(Poseidon2SkinnyChip::::default()), + RecursionAir::BatchFRI(BatchFRIChip::), RecursionAir::Select(SelectChip), // RecursionAir::ExpReverseBitsLen(ExpReverseBitsLenChip::), RecursionAir::PublicValues(PublicValuesChip), @@ -152,6 +159,7 @@ impl, const DEGREE: usize> RecursionAi (Self::BaseAlu(BaseAluChip), 20), (Self::ExtAlu(ExtAluChip), 18), (Self::Poseidon2Wide(Poseidon2WideChip::), 16), + (Self::BatchFRI(BatchFRIChip::), 18), (Self::Select(SelectChip), 18), (Self::ExpReverseBitsLen(ExpReverseBitsLenChip::), 17), (Self::PublicValues(PublicValuesChip), PUB_VALUES_LOG_HEIGHT), @@ -185,6 +193,7 @@ impl, const DEGREE: usize> RecursionAi heights.ext_alu_events.div_ceil(NUM_EXT_ALU_ENTRIES_PER_ROW), ), (Self::Poseidon2Wide(Poseidon2WideChip::), heights.poseidon2_wide_events), + (Self::BatchFRI(BatchFRIChip::), heights.batch_fri_events), (Self::Select(SelectChip), heights.select_events), ( Self::ExpReverseBitsLen(ExpReverseBitsLenChip::), @@ -219,6 +228,9 @@ impl AddAssign<&Instruction> for RecursionAirEventCount { input_addr: _, // No receive interaction for the hint operation }) => self.mem_var_events += output_addrs_mults.len(), Instruction::FriFold(_) => self.fri_fold_events += 1, + Instruction::BatchFRI(instr) => { + self.batch_fri_events += instr.base_vec_addrs.p_at_x.len() + } Instruction::CommitPublicValues(_) => {} Instruction::Print(_) => {} } diff --git a/crates/recursion/core/src/runtime/instruction.rs b/crates/recursion/core/src/runtime/instruction.rs index d18b4ca910..7a74097246 100644 --- a/crates/recursion/core/src/runtime/instruction.rs +++ b/crates/recursion/core/src/runtime/instruction.rs @@ -15,6 +15,7 @@ pub enum Instruction { ExpReverseBitsLen(ExpReverseBitsInstr), HintBits(HintBitsInstr), FriFold(Box>), + BatchFRI(Box>), Print(PrintInstr), HintExt2Felts(HintExt2FeltsInstr), CommitPublicValues(Box>), @@ -227,6 +228,27 @@ pub fn fri_fold( })) } +#[allow(clippy::too_many_arguments)] +pub fn batch_fri( + acc: u32, + alpha_pows: Vec, + p_at_zs: Vec, + p_at_xs: Vec, + acc_mult: u32, +) -> Instruction { + Instruction::BatchFRI(Box::new(BatchFRIInstr { + base_vec_addrs: BatchFRIBaseVecIo { + p_at_x: p_at_xs.iter().map(|elm| Address(F::from_canonical_u32(*elm))).collect(), + }, + ext_single_addrs: BatchFRIExtSingleIo { acc: Address(F::from_canonical_u32(acc)) }, + ext_vec_addrs: BatchFRIExtVecIo { + p_at_z: p_at_zs.iter().map(|elm| Address(F::from_canonical_u32(*elm))).collect(), + alpha_pow: alpha_pows.iter().map(|elm| Address(F::from_canonical_u32(*elm))).collect(), + }, + acc_mult: F::from_canonical_u32(acc_mult), + })) +} + pub fn commit_public_values( public_values_a: &RecursionPublicValues, ) -> Instruction { diff --git a/crates/recursion/core/src/runtime/mod.rs b/crates/recursion/core/src/runtime/mod.rs index 63d6ce2643..90bdd1fb55 100644 --- a/crates/recursion/core/src/runtime/mod.rs +++ b/crates/recursion/core/src/runtime/mod.rs @@ -91,6 +91,8 @@ pub struct Runtime<'a, F: PrimeField32, EF: ExtensionField, Diffusion> { pub nb_fri_fold: usize, + pub nb_batch_fri: usize, + pub nb_print_f: usize, pub nb_print_e: usize, @@ -197,6 +199,7 @@ where nb_memory_ops: 0, nb_branch_ops: 0, nb_fri_fold: 0, + nb_batch_fri: 0, nb_print_f: 0, nb_print_e: 0, clk: F::zero(), @@ -220,7 +223,9 @@ where tracing::debug!("Exp Reverse Bits Operations: {}", self.nb_exp_reverse_bits); tracing::debug!("FriFold Operations: {}", self.nb_fri_fold); tracing::debug!("Field Operations: {}", self.nb_base_ops); + tracing::debug!("Select Operations: {}", self.nb_select); tracing::debug!("Extension Operations: {}", self.nb_ext_ops); + tracing::debug!("BatchFRI Operations: {}", self.nb_batch_fri); tracing::debug!("Memory Operations: {}", self.nb_memory_ops); tracing::debug!("Branch Operations: {}", self.nb_branch_ops); for (name, entry) in self.cycle_tracker.iter().sorted_by_key(|(name, _)| *name) { @@ -485,7 +490,48 @@ where }); } } + Instruction::BatchFRI(instr) => { + let BatchFRIInstr { base_vec_addrs, ext_single_addrs, ext_vec_addrs, acc_mult } = + *instr; + + let mut acc = EF::zero(); + let p_at_xs = base_vec_addrs + .p_at_x + .iter() + .map(|addr| self.memory.mr(*addr).val[0]) + .collect_vec(); + let p_at_zs = ext_vec_addrs + .p_at_z + .iter() + .map(|addr| self.memory.mr(*addr).val.ext::()) + .collect_vec(); + let alpha_pows: Vec<_> = ext_vec_addrs + .alpha_pow + .iter() + .map(|addr| self.memory.mr(*addr).val.ext::()) + .collect_vec(); + self.nb_batch_fri += p_at_zs.len(); + for m in 0..p_at_zs.len() { + acc += alpha_pows[m] * (p_at_zs[m] - EF::from_base(p_at_xs[m])); + self.record.batch_fri_events.push(BatchFRIEvent { + base_vec: BatchFRIBaseVecIo { p_at_x: p_at_xs[m] }, + ext_single: BatchFRIExtSingleIo { + acc: Block::from(acc.as_base_slice()), + }, + ext_vec: BatchFRIExtVecIo { + p_at_z: Block::from(p_at_zs[m].as_base_slice()), + alpha_pow: Block::from(alpha_pows[m].as_base_slice()), + }, + }); + } + + let _ = self.memory.mw( + ext_single_addrs.acc, + Block::from(acc.as_base_slice()), + acc_mult, + ); + } Instruction::CommitPublicValues(instr) => { let pv_addrs = instr.pv_addrs.as_array(); let pv_values: [F; RECURSIVE_PROOF_NUM_PV_ELTS] = @@ -558,5 +604,6 @@ where self.record.base_alu_events.reserve(event_counts.base_alu_events); self.record.ext_alu_events.reserve(event_counts.ext_alu_events); self.record.exp_reverse_bits_len_events.reserve(event_counts.exp_reverse_bits_len_events); + self.record.select_events.reserve(event_counts.select_events); } } diff --git a/crates/recursion/core/src/runtime/record.rs b/crates/recursion/core/src/runtime/record.rs index dd645b74af..94f2f4079a 100644 --- a/crates/recursion/core/src/runtime/record.rs +++ b/crates/recursion/core/src/runtime/record.rs @@ -5,8 +5,8 @@ use p3_field::{AbstractField, Field, PrimeField32}; use sp1_stark::{air::MachineAir, MachineRecord, SP1CoreOpts, PROOF_MAX_NUM_PVS}; use super::{ - BaseAluEvent, CommitPublicValuesEvent, ExpReverseBitsEvent, ExtAluEvent, FriFoldEvent, - MemEvent, Poseidon2Event, RecursionProgram, RecursionPublicValues, SelectEvent, + BaseAluEvent, BatchFRIEvent, CommitPublicValuesEvent, ExpReverseBitsEvent, ExtAluEvent, + FriFoldEvent, MemEvent, Poseidon2Event, RecursionProgram, RecursionPublicValues, SelectEvent, }; #[derive(Clone, Default, Debug)] @@ -26,6 +26,7 @@ pub struct ExecutionRecord { pub select_events: Vec>, pub exp_reverse_bits_len_events: Vec>, pub fri_fold_events: Vec>, + pub batch_fri_events: Vec>, pub commit_pv_hash_events: Vec>, } @@ -59,6 +60,7 @@ impl MachineRecord for ExecutionRecord { select_events, exp_reverse_bits_len_events, fri_fold_events, + batch_fri_events, commit_pv_hash_events, } = self; base_alu_events.append(&mut other.base_alu_events); @@ -69,6 +71,7 @@ impl MachineRecord for ExecutionRecord { select_events.append(&mut other.select_events); exp_reverse_bits_len_events.append(&mut other.exp_reverse_bits_len_events); fri_fold_events.append(&mut other.fri_fold_events); + batch_fri_events.append(&mut other.batch_fri_events); commit_pv_hash_events.append(&mut other.commit_pv_hash_events); } diff --git a/crates/recursion/core/src/shape.rs b/crates/recursion/core/src/shape.rs index 64756d3fed..39f47cf72c 100644 --- a/crates/recursion/core/src/shape.rs +++ b/crates/recursion/core/src/shape.rs @@ -11,6 +11,7 @@ use crate::{ chips::{ alu_base::BaseAluChip, alu_ext::ExtAluChip, + batch_fri::BatchFRIChip, exp_reverse_bits::ExpReverseBitsLenChip, mem::{MemoryConstChip, MemoryVarChip}, poseidon2_wide::Poseidon2WideChip, @@ -93,6 +94,7 @@ impl, const DEGREE: usize> Default let ext_alu = RecursionAir::::ExtAlu(ExtAluChip).name(); let poseidon2_wide = RecursionAir::::Poseidon2Wide(Poseidon2WideChip::).name(); + let batch_fri = RecursionAir::::BatchFRI(BatchFRIChip::).name(); let select = RecursionAir::::Select(SelectChip).name(); let exp_reverse_bits_len = RecursionAir::::ExpReverseBitsLen(ExpReverseBitsLenChip::).name(); @@ -107,6 +109,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 17), (mem_const.clone(), 17), (poseidon2_wide.clone(), 16), + (batch_fri.clone(), 18), (select.clone(), 18), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -117,6 +120,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 17), (mem_const.clone(), 16), (poseidon2_wide.clone(), 16), + (batch_fri.clone(), 18), (select.clone(), 18), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -127,6 +131,7 @@ impl, const DEGREE: usize> Default (poseidon2_wide.clone(), 17), (mem_const.clone(), 16), (exp_reverse_bits_len.clone(), 16), + (batch_fri.clone(), 20), (select.clone(), 18), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -137,6 +142,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 17), (mem_const.clone(), 16), (poseidon2_wide.clone(), 16), + (batch_fri.clone(), 18), (select.clone(), 18), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -147,6 +153,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 16), (mem_const.clone(), 16), (poseidon2_wide.clone(), 16), + (batch_fri.clone(), 18), (select.clone(), 18), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -157,6 +164,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 17), (mem_const.clone(), 17), (poseidon2_wide.clone(), 17), + (batch_fri.clone(), 19), (select.clone(), 19), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -167,6 +175,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 18), (mem_const.clone(), 18), (poseidon2_wide.clone(), 17), + (batch_fri.clone(), 19), (select.clone(), 19), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -177,6 +186,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 18), (mem_const.clone(), 17), (poseidon2_wide.clone(), 17), + (batch_fri.clone(), 19), (select.clone(), 19), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -187,6 +197,7 @@ impl, const DEGREE: usize> Default (poseidon2_wide.clone(), 18), (mem_const.clone(), 17), (exp_reverse_bits_len.clone(), 17), + (batch_fri.clone(), 21), (select.clone(), 19), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -197,6 +208,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 18), (mem_const.clone(), 17), (poseidon2_wide.clone(), 17), + (batch_fri.clone(), 19), (select.clone(), 19), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -207,6 +219,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 17), (mem_const.clone(), 17), (poseidon2_wide.clone(), 17), + (batch_fri.clone(), 19), (select.clone(), 19), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], @@ -217,6 +230,7 @@ impl, const DEGREE: usize> Default (exp_reverse_bits_len.clone(), 18), (mem_const.clone(), 18), (poseidon2_wide.clone(), 18), + (batch_fri.clone(), 20), (select.clone(), 19), (public_values.clone(), PUB_VALUES_LOG_HEIGHT), ], diff --git a/crates/sdk/Cargo.toml b/crates/sdk/Cargo.toml index ffedbe26da..9d3b66d6d8 100644 --- a/crates/sdk/Cargo.toml +++ b/crates/sdk/Cargo.toml @@ -15,7 +15,7 @@ serde = { version = "1.0.204", features = ["derive"] } twirp = { package = "twirp-rs", version = "0.13.0-succinct", optional = true } async-trait = "0.1.81" reqwest-middleware = { version = "0.3.2", optional = true } -reqwest = { version = "0.12.4", features = [ +reqwest = { version = "0.12.4", default-features = false, features = [ "rustls-tls", "trust-dns", "stream", @@ -34,11 +34,9 @@ indicatif = "0.17.8" tracing = "0.1.40" hex = "0.4.3" log = "0.4.22" -alloy-sol-types = { version = "0.7.7", optional = true } dirs = "5.0.1" tempfile = "3.10.1" cfg-if = "1.0" -ethers = { version = "2", default-features = false, optional = true } strum = "0.26.3" strum_macros = "0.26.4" thiserror = "1.0.63" @@ -48,14 +46,14 @@ sp1-stark = { workspace = true } sp1-primitives = { workspace = true } itertools = "0.13.0" tonic = { version = "0.12", features = ["tls", "tls-roots"], optional = true } -alloy-signer = { version = "0.3.6", optional = true } -alloy-signer-local = { version = "0.3.6", optional = true } -alloy-primitives = { version = "0.8.7", optional = true } +alloy-sol-types = { version = "0.8", optional = true } +alloy-signer = { version = "0.5", optional = true } +alloy-signer-local = { version = "0.5", optional = true } +alloy-primitives = { version = "0.8", optional = true } backoff = { version = "0.4", features = ["tokio"], optional = true } [features] default = ["network"] -neon = ["sp1-core-machine/neon"] native-gnark = ["sp1-prover/native-gnark"] # TODO: Once alloy has a 1.* release, we can likely remove this feature flag, as there will be less # dependency resolution issues. @@ -63,7 +61,8 @@ network = [ "dep:prost", "dep:alloy-sol-types", "dep:tokio", - "dep:ethers", + "dep:alloy-signer", + "dep:alloy-signer-local", "dep:reqwest", "dep:twirp", "dep:reqwest-middleware", @@ -75,7 +74,7 @@ network-v2 = [ "dep:alloy-signer-local", "dep:alloy-primitives", "dep:tokio", - "dep:ethers", + "dep:alloy-signer", "dep:reqwest", "dep:twirp", "dep:reqwest-middleware", diff --git a/crates/sdk/src/lib.rs b/crates/sdk/src/lib.rs index 68bc0ba459..ac97f2e47c 100644 --- a/crates/sdk/src/lib.rs +++ b/crates/sdk/src/lib.rs @@ -359,8 +359,7 @@ mod tests { fn test_e2e_core() { utils::setup_logger(); let client = ProverClient::local(); - let elf = - include_bytes!("../../../examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf"); + let elf = include_bytes!("../../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); let (pk, vk) = client.setup(elf); let mut stdin = SP1Stdin::new(); stdin.write(&10usize); @@ -380,8 +379,7 @@ mod tests { fn test_e2e_compressed() { utils::setup_logger(); let client = ProverClient::local(); - let elf = - include_bytes!("../../../examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf"); + let elf = include_bytes!("../../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); let (pk, vk) = client.setup(elf); let mut stdin = SP1Stdin::new(); stdin.write(&10usize); @@ -401,8 +399,7 @@ mod tests { fn test_e2e_prove_plonk() { utils::setup_logger(); let client = ProverClient::local(); - let elf = - include_bytes!("../../../examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf"); + let elf = include_bytes!("../../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); let (pk, vk) = client.setup(elf); let mut stdin = SP1Stdin::new(); stdin.write(&10usize); @@ -422,8 +419,7 @@ mod tests { fn test_e2e_prove_plonk_mock() { utils::setup_logger(); let client = ProverClient::mock(); - let elf = - include_bytes!("../../../examples/fibonacci/program/elf/riscv32im-succinct-zkvm-elf"); + let elf = include_bytes!("../../../tests/fibonacci/elf/riscv32im-succinct-zkvm-elf"); let (pk, vk) = client.setup(elf); let mut stdin = SP1Stdin::new(); stdin.write(&10usize); diff --git a/crates/sdk/src/network-v2/client.rs b/crates/sdk/src/network-v2/client.rs index 4559b9a50d..a428dee332 100644 --- a/crates/sdk/src/network-v2/client.rs +++ b/crates/sdk/src/network-v2/client.rs @@ -26,7 +26,7 @@ use crate::network_v2::proto::network::{ use crate::network_v2::Signable; /// The default RPC endpoint for the Succinct prover network. -pub const DEFAULT_PROVER_NETWORK_RPC: &str = "https://rpc.dev.succinct.tools/"; +pub const DEFAULT_PROVER_NETWORK_RPC: &str = "https://rpc.production.succinct.tools/"; pub struct NetworkClient { signer: PrivateKeySigner, diff --git a/crates/sdk/src/network-v2/proto/network.rs b/crates/sdk/src/network-v2/proto/network.rs index 52d72ae958..b210cb9215 100644 --- a/crates/sdk/src/network-v2/proto/network.rs +++ b/crates/sdk/src/network-v2/proto/network.rs @@ -183,6 +183,18 @@ pub struct ExecuteProofResponse { } #[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] pub struct ExecuteProofResponseBody {} +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLatestBridgeBlockRequest { + /// The chain ID of the bridge. + #[prost(uint32, tag = "1")] + pub chain_id: u32, +} +#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLatestBridgeBlockResponse { + /// The latest processed block in the bridge. + #[prost(uint64, tag = "1")] + pub block_number: u64, +} #[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct GetBalanceRequest { /// The address of the account. @@ -447,8 +459,7 @@ impl ExecutionStatus { /// Generated client implementations. pub mod prover_network_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; - use tonic::codegen::*; + use tonic::codegen::{http::Uri, *}; #[derive(Debug, Clone)] pub struct ProverNetworkClient { inner: tonic::client::Grpc, @@ -626,6 +637,26 @@ pub mod prover_network_client { .insert(GrpcMethod::new("network.ProverNetwork", "GetProofRequestStatus")); self.inner.unary(req, path, codec).await } + /// Get the latest processed block in the bridge. + pub async fn get_latest_bridge_block( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/network.ProverNetwork/GetLatestBridgeBlock"); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("network.ProverNetwork", "GetLatestBridgeBlock")); + self.inner.unary(req, path, codec).await + } /// Get the balance of an account. pub async fn get_balance( &mut self, @@ -684,7 +715,8 @@ pub mod prover_network_client { pub mod prover_network_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with ProverNetworkServer. + /// Generated trait containing gRPC methods that should be implemented for use with + /// ProverNetworkServer. #[async_trait] pub trait ProverNetwork: std::marker::Send + std::marker::Sync + 'static { /// Creates a proof. @@ -715,6 +747,11 @@ pub mod prover_network_server { &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; + /// Get the latest processed block in the bridge. + async fn get_latest_bridge_block( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; /// Get the balance of an account. async fn get_balance( &self, @@ -1013,6 +1050,48 @@ pub mod prover_network_server { }; Box::pin(fut) } + "/network.ProverNetwork/GetLatestBridgeBlock" => { + #[allow(non_camel_case_types)] + struct GetLatestBridgeBlockSvc(pub Arc); + impl + tonic::server::UnaryService + for GetLatestBridgeBlockSvc + { + type Response = super::GetLatestBridgeBlockResponse; + type Future = BoxFuture, tonic::Status>; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::get_latest_bridge_block(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = GetLatestBridgeBlockSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } "/network.ProverNetwork/GetBalance" => { #[allow(non_camel_case_types)] struct GetBalanceSvc(pub Arc); diff --git a/crates/sdk/src/network-v2/prover.rs b/crates/sdk/src/network-v2/prover.rs index 8bd954a64a..d67ed34386 100644 --- a/crates/sdk/src/network-v2/prover.rs +++ b/crates/sdk/src/network-v2/prover.rs @@ -4,7 +4,7 @@ use std::{ }; use crate::{ - network_v2::client::{NetworkClient, DEFAULT_PROVER_NETWORK_RPC}, + network_v2::client::NetworkClient, network_v2::proto::network::{ProofMode, ProofStatus, ProofStrategy}, Prover, SP1Context, SP1ProofKind, SP1ProofWithPublicValues, SP1ProvingKey, SP1VerifyingKey, }; @@ -23,8 +23,8 @@ use crate::provers::{CpuProver, ProofOpts, ProverType}; /// The timeout for a proof request to be fulfilled. const TIMEOUT_SECS: u64 = 14400; -/// The default cycle limit for a proof request. -const DEFAULT_CYCLE_LIMIT: u64 = 1_000_000_000; +/// The default cycle limit for a proof request if simulation is skipped. +const DEFAULT_CYCLE_LIMIT: u64 = 100_000_000; /// An implementation of [crate::ProverClient] that can generate proofs on a remote RPC server. pub struct NetworkProver { @@ -99,10 +99,6 @@ impl NetworkProver { let request_id_hex = "0x".to_string() + &hex::encode(request_id.clone()); log::info!("Created request {} in transaction {}", request_id_hex, tx_hash_hex); - if NetworkClient::rpc_url() == DEFAULT_PROVER_NETWORK_RPC { - log::info!("View in explorer: https://explorer-v2.succinct.xyz/{}", request_id_hex); - } - Ok(request_id) } diff --git a/crates/sdk/src/network/auth.rs b/crates/sdk/src/network/auth.rs index 4057e6d836..7786cc4d36 100644 --- a/crates/sdk/src/network/auth.rs +++ b/crates/sdk/src/network/auth.rs @@ -1,11 +1,10 @@ use std::{borrow::Cow, str::FromStr}; +use alloy_signer::SignerSync; +use alloy_signer_local::PrivateKeySigner; + use alloy_sol_types::{sol, Eip712Domain, SolStruct}; use anyhow::Result; -use ethers::{ - signers::{LocalWallet, Signer}, - types::H256, -}; use crate::network::proto::network::UnclaimReason; @@ -54,12 +53,12 @@ sol! { /// https://eips.ethereum.org/EIPS/eip-712 pub struct NetworkAuth { // Holds a secp256k1 private key. - wallet: LocalWallet, + wallet: PrivateKeySigner, } impl NetworkAuth { pub fn new(private_key: &str) -> Self { - let wallet = LocalWallet::from_str(private_key).unwrap(); + let wallet = PrivateKeySigner::from_str(private_key).unwrap(); Self { wallet } } @@ -74,15 +73,15 @@ impl NetworkAuth { /// Gets the address of the auth's account, derived from the secp256k1 private key. pub fn get_address(&self) -> [u8; 20] { - self.wallet.address().0 + self.wallet.address().into() } // Generic function to sign a message based on the SolStruct. async fn sign_message(&self, type_struct: T) -> Result> { let domain_separator = Self::get_domain_separator(); let message_hash = type_struct.eip712_signing_hash(&domain_separator); - let signature = self.wallet.sign_hash(H256(message_hash.0))?; - Ok(signature.to_vec()) + let signature = self.wallet.sign_hash_sync(&message_hash)?; + Ok(signature.as_bytes().to_vec()) } /// Signs a message to to request to create a proof. diff --git a/crates/sdk/src/proof.rs b/crates/sdk/src/proof.rs index 9a39f333e8..86bd723e50 100644 --- a/crates/sdk/src/proof.rs +++ b/crates/sdk/src/proof.rs @@ -53,9 +53,27 @@ impl SP1ProofWithPublicValues { } } + /// Returns the *raw* proof as bytes, prepended with the first 4 bytes of the vkey hash. + /// + /// This is the format expected by the `sp1-verifier` crate. The extra 4 bytes are used to + /// ensure that the proof will eventually be verified by the correct vkey. + pub fn raw_with_checksum(&self) -> Vec { + match &self.proof { + SP1Proof::Plonk(plonk) => { + let proof_bytes = hex::decode(&plonk.raw_proof).expect("Invalid Plonk proof"); + [plonk.plonk_vkey_hash[..4].to_vec(), proof_bytes].concat() + } + SP1Proof::Groth16(groth16) => { + let proof_bytes = hex::decode(&groth16.raw_proof).expect("Invalid Groth16 proof"); + [groth16.groth16_vkey_hash[..4].to_vec(), proof_bytes].concat() + } + _ => unimplemented!(), + } + } + /// For Plonk or Groth16 proofs, returns the proof in a byte encoding the onchain verifier /// accepts. The bytes consist of the first four bytes of Plonk vkey hash followed by the - /// encoded proof. + /// *encoded* proof. pub fn bytes(&self) -> Vec { match &self.proof { SP1Proof::Plonk(plonk_proof) => { @@ -65,26 +83,14 @@ impl SP1ProofWithPublicValues { return Vec::new(); } - let mut bytes = Vec::with_capacity(4 + plonk_proof.encoded_proof.len()); - bytes.extend_from_slice(&plonk_proof.plonk_vkey_hash[..4]); - bytes.extend_from_slice( - &hex::decode(&plonk_proof.encoded_proof).expect("Invalid Plonk proof"), - ); - bytes + let proof_bytes = + hex::decode(&plonk_proof.encoded_proof).expect("Invalid Plonk proof"); + [plonk_proof.plonk_vkey_hash[..4].to_vec(), proof_bytes].concat() } SP1Proof::Groth16(groth16_proof) => { - if groth16_proof.encoded_proof.is_empty() { - // If the proof is empty, then this is a mock proof. The mock SP1 verifier - // expects an empty byte array for verification, so return an empty byte array. - return Vec::new(); - } - - let mut bytes = Vec::with_capacity(4 + groth16_proof.encoded_proof.len()); - bytes.extend_from_slice(&groth16_proof.groth16_vkey_hash[..4]); - bytes.extend_from_slice( - &hex::decode(&groth16_proof.encoded_proof).expect("Invalid Groth16 proof"), - ); - bytes + let proof_bytes = + hex::decode(&groth16_proof.encoded_proof).expect("Invalid Groth16 proof"); + [groth16_proof.groth16_vkey_hash[..4].to_vec(), proof_bytes].concat() } _ => unimplemented!("only Plonk and Groth16 proofs are verifiable onchain"), } diff --git a/crates/stark/Cargo.toml b/crates/stark/Cargo.toml index 6865e1f7d2..548dc57bbe 100644 --- a/crates/stark/Cargo.toml +++ b/crates/stark/Cargo.toml @@ -39,10 +39,8 @@ rayon-scan = "0.1.1" arrayref = "0.3.8" strum = "0.26.3" strum_macros = "0.26.4" -getrandom = { version = "0.2.15", features = ["custom"] } sysinfo = "0.30.13" num-traits = "0.2.19" -thiserror = "1.0.64" [dev-dependencies] sp1-zkvm = { workspace = true } diff --git a/crates/stark/src/air/machine.rs b/crates/stark/src/air/machine.rs index 4973c4769c..0a9b0af4a8 100644 --- a/crates/stark/src/air/machine.rs +++ b/crates/stark/src/air/machine.rs @@ -48,6 +48,11 @@ pub trait MachineAir: BaseAir + 'static + Send + Sync { fn commit_scope(&self) -> InteractionScope { InteractionScope::Local } + + /// Specifies whether the air only uses the local row, and not the next row. + fn local_only(&self) -> bool { + false + } } /// A program that defines the control flow of a machine through a program counter. diff --git a/crates/stark/src/chip.rs b/crates/stark/src/chip.rs index 9ba6651565..2d627d2ccd 100644 --- a/crates/stark/src/chip.rs +++ b/crates/stark/src/chip.rs @@ -213,6 +213,10 @@ where fn commit_scope(&self) -> crate::air::InteractionScope { self.air.commit_scope() } + + fn local_only(&self) -> bool { + self.air.local_only() + } } // Implement AIR directly on Chip, evaluating both execution and permutation constraints. diff --git a/crates/stark/src/machine.rs b/crates/stark/src/machine.rs index 58318614a0..5a5f5ea8db 100644 --- a/crates/stark/src/machine.rs +++ b/crates/stark/src/machine.rs @@ -66,6 +66,8 @@ pub struct StarkProvingKey { pub data: PcsProverData, /// The preprocessed chip ordering. pub chip_ordering: HashMap, + /// The preprocessed chip local only information. + pub local_only: Vec, } impl StarkProvingKey { @@ -196,19 +198,19 @@ impl>> StarkMachine { chip.preprocessed_width(), "Incorrect number of preprocessed columns for chip {chip_name}" ); - prep_trace.map(move |t| (chip_name, t)) + prep_trace.map(move |t| (chip_name, chip.local_only(), t)) }) .collect::>() }); // Order the chips and traces by trace size (biggest first), and get the ordering map. named_preprocessed_traces - .sort_by_key(|(name, trace)| (Reverse(trace.height()), name.clone())); + .sort_by_key(|(name, _, trace)| (Reverse(trace.height()), name.clone())); let pcs = self.config.pcs(); let (chip_information, domains_and_traces): (Vec<_>, Vec<_>) = named_preprocessed_traces .iter() - .map(|(name, trace)| { + .map(|(name, _, trace)| { let domain = pcs.natural_domain_for_degree(trace.height()); ((name.to_owned(), domain, trace.dimensions()), (domain, trace.to_owned())) }) @@ -222,12 +224,17 @@ impl>> StarkMachine { let chip_ordering = named_preprocessed_traces .iter() .enumerate() - .map(|(i, (name, _))| (name.to_owned(), i)) + .map(|(i, (name, _, _))| (name.to_owned(), i)) .collect::>(); + let local_only = named_preprocessed_traces + .iter() + .map(|(_, local_only, _)| local_only.to_owned()) + .collect::>(); + // Get the preprocessed traces let traces = - named_preprocessed_traces.into_iter().map(|(_, trace)| trace).collect::>(); + named_preprocessed_traces.into_iter().map(|(_, _, trace)| trace).collect::>(); let pc_start = program.pc_start(); @@ -238,6 +245,7 @@ impl>> StarkMachine { traces, data, chip_ordering: chip_ordering.clone(), + local_only, }, StarkVerifyingKey { commit, pc_start, chip_information, chip_ordering }, ) diff --git a/crates/stark/src/prover.rs b/crates/stark/src/prover.rs index 16d0eea234..95d3da46c5 100644 --- a/crates/stark/src/prover.rs +++ b/crates/stark/src/prover.rs @@ -57,6 +57,12 @@ pub trait MachineProver>: /// Setup the preprocessed data into a proving and verifying key. fn setup(&self, program: &A::Program) -> (Self::DeviceProvingKey, StarkVerifyingKey); + /// Copy the proving key from the host to the device. + fn pk_to_device(&self, pk: &StarkProvingKey) -> Self::DeviceProvingKey; + + /// Copy the proving key from the device to the host. + fn pk_to_host(&self, pk: &Self::DeviceProvingKey) -> StarkProvingKey; + /// Generate the main traces. fn generate_traces( &self, @@ -273,12 +279,6 @@ pub trait MachineProvingKey: Send + Sync { /// The start pc. fn pc_start(&self) -> Val; - /// The proving key on the host. - fn to_host(&self) -> StarkProvingKey; - - /// The proving key on the device. - fn from_host(host: &StarkProvingKey) -> Self; - /// Observe itself in the challenger. fn observe_into(&self, challenger: &mut Challenger); } @@ -323,6 +323,14 @@ where self.machine().setup(program) } + fn pk_to_device(&self, pk: &StarkProvingKey) -> Self::DeviceProvingKey { + pk.clone() + } + + fn pk_to_host(&self, pk: &Self::DeviceProvingKey) -> StarkProvingKey { + pk.clone() + } + fn commit( &self, record: &A::Record, @@ -593,15 +601,35 @@ where tracing::debug_span!("compute preprocessed opening points").in_scope(|| { pk.traces .iter() - .map(|trace| { + .zip(pk.local_only.iter()) + .map(|(trace, local_only)| { let domain = pcs.natural_domain_for_degree(trace.height()); - vec![zeta, domain.next_point(zeta).unwrap()] + if !local_only { + vec![zeta, domain.next_point(zeta).unwrap()] + } else { + vec![zeta] + } + }) + .collect::>() + }); + + let main_trace_opening_points = tracing::debug_span!("compute main trace opening points") + .in_scope(|| { + trace_domains + .iter() + .zip(chips.iter()) + .map(|(domain, chip)| { + if !chip.local_only() { + vec![zeta, domain.next_point(zeta).unwrap()] + } else { + vec![zeta] + } }) .collect::>() }); - let trace_opening_points = - tracing::debug_span!("compute trace opening points").in_scope(|| { + let permutation_trace_opening_points = + tracing::debug_span!("compute permutation trace opening points").in_scope(|| { trace_domains .iter() .map(|domain| vec![zeta, domain.next_point(zeta).unwrap()]) @@ -615,7 +643,7 @@ where // Split the trace_opening_points to the global and local chips. let mut global_trace_opening_points = Vec::with_capacity(global_chip_ordering.len()); let mut local_trace_opening_points = Vec::with_capacity(local_chip_ordering.len()); - for (i, trace_opening_point) in trace_opening_points.clone().into_iter().enumerate() { + for (i, trace_opening_point) in main_trace_opening_points.clone().into_iter().enumerate() { let scope = all_chip_scopes[i]; if scope == InteractionScope::Global { global_trace_opening_points.push(trace_opening_point); @@ -629,14 +657,14 @@ where (&pk.data, preprocessed_opening_points), (global_main_data, global_trace_opening_points), (&local_main_data, local_trace_opening_points), - (&permutation_data, trace_opening_points), + (&permutation_data, permutation_trace_opening_points), ("ient_data, quotient_opening_points), ] } else { vec![ (&pk.data, preprocessed_opening_points), (&local_main_data, local_trace_opening_points), - (&permutation_data, trace_opening_points), + (&permutation_data, permutation_trace_opening_points), ("ient_data, quotient_opening_points), ] }; @@ -669,9 +697,16 @@ where let preprocessed_opened_values = preprocessed_values .into_iter() - .map(|op| { - let [local, next] = op.try_into().unwrap(); - AirOpenedValues { local, next } + .zip(pk.local_only.iter()) + .map(|(op, local_only)| { + if !local_only { + let [local, next] = op.try_into().unwrap(); + AirOpenedValues { local, next } + } else { + let [local] = op.try_into().unwrap(); + let width = local.len(); + AirOpenedValues { local, next: vec![SC::Challenge::zero(); width] } + } }) .collect::>(); @@ -685,10 +720,10 @@ where (Some(&global_order), None) => { let global_main_values = global_main_values.as_ref().expect("Global main values should be Some"); - main_values.push(global_main_values[global_order].clone()); + main_values.push((global_main_values[global_order].clone(), chip.local_only())); } (None, Some(&local_order)) => { - main_values.push(local_main_values[local_order].clone()); + main_values.push((local_main_values[local_order].clone(), chip.local_only())); } _ => unreachable!(), } @@ -697,9 +732,15 @@ where let main_opened_values = main_values .into_iter() - .map(|op| { - let [local, next] = op.try_into().unwrap(); - AirOpenedValues { local, next } + .map(|(op, local_only)| { + if !local_only { + let [local, next] = op.try_into().unwrap(); + AirOpenedValues { local, next } + } else { + let [local] = op.try_into().unwrap(); + let width = local.len(); + AirOpenedValues { local, next: vec![SC::Challenge::zero(); width] } + } }) .collect::>(); let permutation_opened_values = permutation_values @@ -856,14 +897,6 @@ where self.pc_start } - fn to_host(&self) -> StarkProvingKey { - self.clone() - } - - fn from_host(host: &StarkProvingKey) -> Self { - host.clone() - } - fn observe_into(&self, challenger: &mut Challenger) { challenger.observe(self.commit.clone()); challenger.observe(self.pc_start); diff --git a/crates/stark/src/verifier.rs b/crates/stark/src/verifier.rs index 56d823e401..2fb3e8cef3 100644 --- a/crates/stark/src/verifier.rs +++ b/crates/stark/src/verifier.rs @@ -140,24 +140,33 @@ impl>> Verifier { .map(|(name, domain, _)| { let i = chip_ordering[name]; let values = opened_values.chips[i].preprocessed.clone(); - ( - *domain, - vec![(zeta, values.local), (domain.next_point(zeta).unwrap(), values.next)], - ) + if !chips[i].local_only() { + ( + *domain, + vec![(zeta, values.local), (domain.next_point(zeta).unwrap(), values.next)], + ) + } else { + (*domain, vec![(zeta, values.local)]) + } }) .collect::>(); let main_domains_points_and_opens = trace_domains .iter() .zip_eq(opened_values.chips.iter()) - .map(|(domain, values)| { - ( - *domain, - vec![ - (zeta, values.main.local.clone()), - (domain.next_point(zeta).unwrap(), values.main.next.clone()), - ], - ) + .zip_eq(chips.iter()) + .map(|((domain, values), chip)| { + if !chip.local_only() { + ( + *domain, + vec![ + (zeta, values.main.local.clone()), + (domain.next_point(zeta).unwrap(), values.main.next.clone()), + ], + ) + } else { + (*domain, vec![(zeta, values.main.local.clone())]) + } }) .collect::>(); diff --git a/crates/verifier/Cargo.toml b/crates/verifier/Cargo.toml new file mode 100644 index 0000000000..321fa3c905 --- /dev/null +++ b/crates/verifier/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "sp1-verifier" +description = "Verifier for SP1 Groth16 and Plonk proofs." +readme = "../../README.md" +version = { workspace = true } +edition = { workspace = true } +license = { workspace = true } +repository = { workspace = true } +keywords = { workspace = true } +categories = { workspace = true } + +[dependencies] +bn = { git = "https://github.com/sp1-patches/bn", tag = "substrate_bn-v0.6.0-patch-v2", package = "substrate-bn" } +sha2 = { version = "0.10.8", default-features = false } +thiserror-no-std = "2.0.2" +hex = { version = "0.4.3", default-features = false, features = ["alloc"] } +lazy_static = { version = "1.5.0", default-features = false } + +[dev-dependencies] +sp1-sdk = { workspace = true } +num-bigint = "0.4.6" +num-traits = "0.2.19" + +[features] +default = ["std"] +std = [] diff --git a/crates/verifier/README.md b/crates/verifier/README.md new file mode 100644 index 0000000000..6a4042e04e --- /dev/null +++ b/crates/verifier/README.md @@ -0,0 +1,37 @@ +# SP1 Verifier + +This crate provides verifiers for SP1 Groth16 and Plonk zero-knowledge proofs. These proofs are expected +to be generated using the [SP1 SDK](../sdk). + +## Features + +Groth16 and Plonk proof verification are supported in `no-std` environments. Verification in the +SP1 ZKVM context is patched, in order to make use of the +[bn254 precompiles](https://blog.succinct.xyz/succinctshipsprecompiles/). + +### Pre-generated verification keys + +Verification keys for Groth16 and Plonk are stored in the [`bn254-vk`](./bn254-vk/) directory. These +vkeys are used to verify all SP1 proofs. + +These vkeys are the same as those found locally in +`~/.sp1/circuits///_vk.bin`, and should be automatically +updated after every release. + +## Tests + +Run tests with the following command: + +```sh +cargo test --package sp1-verifier +``` + +These tests verify the proofs in the [`test_binaries`](./test_binaries) directory. These test binaries +were generated from the fibonacci [groth16](../../examples/fibonacci/script/bin/groth16_bn254.rs) and +[plonk](../../examples/fibonacci/script/bin/plonk_bn254.rs) examples. You can reproduce these proofs +from the examples by running `cargo run --bin groth16_bn254` and `cargo run --bin plonk_bn254` from the +[`examples/fibonacci`](../../examples/fibonacci/) directory. + +## Acknowledgements + +Adapted from [@Bisht13's](https://github.com/Bisht13/gnark-bn254-verifier) `gnark-bn254-verifier` crate. diff --git a/crates/verifier/bn254-vk/groth16_vk.bin b/crates/verifier/bn254-vk/groth16_vk.bin new file mode 100644 index 0000000000..348cc8a0a3 Binary files /dev/null and b/crates/verifier/bn254-vk/groth16_vk.bin differ diff --git a/crates/verifier/bn254-vk/plonk_vk.bin b/crates/verifier/bn254-vk/plonk_vk.bin new file mode 100644 index 0000000000..c8e98e6fdb Binary files /dev/null and b/crates/verifier/bn254-vk/plonk_vk.bin differ diff --git a/crates/verifier/src/constants.rs b/crates/verifier/src/constants.rs new file mode 100644 index 0000000000..7480c5a42f --- /dev/null +++ b/crates/verifier/src/constants.rs @@ -0,0 +1,33 @@ +/// Gnark (and arkworks) use the 2 most significant bits to encode the flag for a compressed +/// G1 point. +/// https://github.com/Consensys/gnark-crypto/blob/a7d721497f2a98b1f292886bb685fd3c5a90f930/ecc/bn254/marshal.go#L32-L42 +pub(crate) const MASK: u8 = 0b11 << 6; + +/// The flags for a positive, negative, or infinity compressed point. +pub(crate) const COMPRESSED_POSITIVE: u8 = 0b10 << 6; +pub(crate) const COMPRESSED_NEGATIVE: u8 = 0b11 << 6; +pub(crate) const COMPRESSED_INFINITY: u8 = 0b01 << 6; + +#[derive(Debug, PartialEq, Eq)] +pub(crate) enum CompressedPointFlag { + Positive = COMPRESSED_POSITIVE as isize, + Negative = COMPRESSED_NEGATIVE as isize, + Infinity = COMPRESSED_INFINITY as isize, +} + +impl From for CompressedPointFlag { + fn from(val: u8) -> Self { + match val { + COMPRESSED_POSITIVE => CompressedPointFlag::Positive, + COMPRESSED_NEGATIVE => CompressedPointFlag::Negative, + COMPRESSED_INFINITY => CompressedPointFlag::Infinity, + _ => panic!("Invalid compressed point flag"), + } + } +} + +impl From for u8 { + fn from(value: CompressedPointFlag) -> Self { + value as u8 + } +} diff --git a/crates/verifier/src/converter.rs b/crates/verifier/src/converter.rs new file mode 100644 index 0000000000..2c747ce5d4 --- /dev/null +++ b/crates/verifier/src/converter.rs @@ -0,0 +1,122 @@ +use core::cmp::Ordering; + +use bn::{AffineG1, AffineG2, Fq, Fq2}; + +use crate::{ + constants::{CompressedPointFlag, MASK}, + error::Error, +}; + +/// Deserializes an Fq element from a buffer. +/// +/// If this Fq element is part of a compressed point, the flag that indicates the sign of the +/// y coordinate is also returned. +pub(crate) fn deserialize_with_flags(buf: &[u8]) -> Result<(Fq, CompressedPointFlag), Error> { + if buf.len() != 32 { + return Err(Error::InvalidXLength); + }; + + let m_data = buf[0] & MASK; + if m_data == u8::from(CompressedPointFlag::Infinity) { + // Checks if the first byte is zero after masking AND the rest of the bytes are zero. + if buf[0] & !MASK == 0 && buf[1..].iter().all(|&b| b == 0) { + return Err(Error::InvalidPoint); + } + Ok((Fq::zero(), CompressedPointFlag::Infinity)) + } else { + let mut x_bytes: [u8; 32] = [0u8; 32]; + x_bytes.copy_from_slice(buf); + x_bytes[0] &= !MASK; + + let x = Fq::from_be_bytes_mod_order(&x_bytes).expect("Failed to convert x bytes to Fq"); + + Ok((x, m_data.into())) + } +} + +/// Converts a compressed G1 point to an AffineG1 point. +/// +/// Asserts that the compressed point is represented as a single fq element: the x coordinate +/// of the point. The y coordinate is then computed from the x coordinate. The final point +/// is not checked to be on the curve for efficiency. +pub(crate) fn unchecked_compressed_x_to_g1_point(buf: &[u8]) -> Result { + let (x, m_data) = deserialize_with_flags(buf)?; + let (y, neg_y) = AffineG1::get_ys_from_x_unchecked(x).ok_or(Error::InvalidPoint)?; + + let mut final_y = y; + if y.cmp(&neg_y) == Ordering::Greater { + if m_data == CompressedPointFlag::Positive { + final_y = -y; + } + } else if m_data == CompressedPointFlag::Negative { + final_y = -y; + } + + Ok(AffineG1::new_unchecked(x, final_y)) +} + +/// Converts an uncompressed G1 point to an AffineG1 point. +/// +/// Asserts that the affine point is represented as two fq elements. +pub(crate) fn uncompressed_bytes_to_g1_point(buf: &[u8]) -> Result { + if buf.len() != 64 { + return Err(Error::InvalidXLength); + }; + + let (x_bytes, y_bytes) = buf.split_at(32); + + let x = Fq::from_slice(x_bytes).map_err(Error::Field)?; + let y = Fq::from_slice(y_bytes).map_err(Error::Field)?; + AffineG1::new(x, y).map_err(Error::Group) +} + +/// Converts a compressed G2 point to an AffineG2 point. +/// +/// Asserts that the compressed point is represented as a single fq2 element: the x coordinate +/// of the point. +/// Then, gets the y coordinate from the x coordinate. +/// For efficiency, this function does not check that the final point is on the curve. +pub(crate) fn unchecked_compressed_x_to_g2_point(buf: &[u8]) -> Result { + if buf.len() != 64 { + return Err(Error::InvalidXLength); + }; + + let (x1, flag) = deserialize_with_flags(&buf[..32])?; + let x0 = Fq::from_be_bytes_mod_order(&buf[32..64]).map_err(Error::Field)?; + let x = Fq2::new(x0, x1); + + if flag == CompressedPointFlag::Infinity { + return Ok(AffineG2::one()); + } + + let (y, neg_y) = AffineG2::get_ys_from_x_unchecked(x).ok_or(Error::InvalidPoint)?; + + match flag { + CompressedPointFlag::Positive => Ok(AffineG2::new_unchecked(x, y)), + CompressedPointFlag::Negative => Ok(AffineG2::new_unchecked(x, neg_y)), + _ => Err(Error::InvalidPoint), + } +} + +/// Converts an uncompressed G2 point to an AffineG2 point. +/// +/// Asserts that the affine point is represented as two fq2 elements. +pub(crate) fn uncompressed_bytes_to_g2_point(buf: &[u8]) -> Result { + if buf.len() != 128 { + return Err(Error::InvalidXLength); + } + + let (x_bytes, y_bytes) = buf.split_at(64); + let (x1_bytes, x0_bytes) = x_bytes.split_at(32); + let (y1_bytes, y0_bytes) = y_bytes.split_at(32); + + let x1 = Fq::from_slice(x1_bytes).map_err(Error::Field)?; + let x0 = Fq::from_slice(x0_bytes).map_err(Error::Field)?; + let y1 = Fq::from_slice(y1_bytes).map_err(Error::Field)?; + let y0 = Fq::from_slice(y0_bytes).map_err(Error::Field)?; + + let x = Fq2::new(x0, x1); + let y = Fq2::new(y0, y1); + + AffineG2::new(x, y).map_err(Error::Group) +} diff --git a/crates/verifier/src/error.rs b/crates/verifier/src/error.rs new file mode 100644 index 0000000000..0facb98902 --- /dev/null +++ b/crates/verifier/src/error.rs @@ -0,0 +1,63 @@ +use bn::{CurveError, FieldError, GroupError}; +use thiserror_no_std::Error; + +#[derive(Error, Debug)] +pub enum Error { + // Cryptographic Errors + #[error("BSB22 Commitment number mismatch")] + Bsb22CommitmentMismatch, + #[error("Challenge already computed")] + ChallengeAlreadyComputed, + #[error("Challenge not found")] + ChallengeNotFound, + #[error("Previous challenge not computed")] + PreviousChallengeNotComputed, + #[error("Pairing check failed")] + PairingCheckFailed, + #[error("Invalid point in subgroup check")] + InvalidPoint, + + // Arithmetic Errors + #[error("Beyond the modulus")] + BeyondTheModulus, + #[error("Ell too large")] + EllTooLarge, + #[error("Inverse not found")] + InverseNotFound, + #[error("Opening linear polynomial mismatch")] + OpeningPolyMismatch, + + // Input Errors + #[error("DST too large")] + DSTTooLarge, + #[error("Invalid number of digests")] + InvalidNumberOfDigests, + #[error("Invalid witness")] + InvalidWitness, + #[error("Invalid x length")] + InvalidXLength, + #[error("Unexpected flag")] + UnexpectedFlag, + #[error("Invalid data")] + InvalidData, + + // Conversion Errors + #[error("Failed to get Fr from random bytes")] + FailedToGetFrFromRandomBytes, + #[error("Failed to get x")] + FailedToGetX, + #[error("Failed to get y")] + FailedToGetY, + + // External Library Errors + #[error("BN254 Field Error")] + Field(FieldError), + #[error("BN254 Group Error")] + Group(GroupError), + #[error("BN254 Curve Error")] + Curve(CurveError), + + // SP1 Errors + #[error("Invalid program vkey hash")] + InvalidProgramVkeyHash, +} diff --git a/crates/verifier/src/groth16/converter.rs b/crates/verifier/src/groth16/converter.rs new file mode 100644 index 0000000000..6c7a5e3b97 --- /dev/null +++ b/crates/verifier/src/groth16/converter.rs @@ -0,0 +1,53 @@ +use alloc::vec::Vec; + +use crate::{ + converter::{ + unchecked_compressed_x_to_g1_point, unchecked_compressed_x_to_g2_point, + uncompressed_bytes_to_g1_point, uncompressed_bytes_to_g2_point, + }, + groth16::{Groth16G1, Groth16G2, Groth16Proof, Groth16VerifyingKey}, +}; + +use super::error::Groth16Error; + +/// Load the Groth16 proof from the given byte slice. +/// +/// The byte slice is represented as 2 uncompressed g1 points, and one uncompressed g2 point, +/// as outputted from gnark. +pub(crate) fn load_groth16_proof_from_bytes(buffer: &[u8]) -> Result { + let ar = uncompressed_bytes_to_g1_point(&buffer[..64])?; + let bs = uncompressed_bytes_to_g2_point(&buffer[64..192])?; + let krs = uncompressed_bytes_to_g1_point(&buffer[192..256])?; + + Ok(Groth16Proof { ar, bs, krs }) +} + +/// Load the Groth16 verification key from the given byte slice. +/// +/// The gnark verification key includes a lot of extraneous information. We only extract the necessary +/// elements to verify a proof. +pub(crate) fn load_groth16_verifying_key_from_bytes( + buffer: &[u8], +) -> Result { + // We don't need to check each compressed point because the Groth16 vkey is a public constant + // that doesn't usually change. The party using the Groth16 vkey will usually clearly know + // how the vkey was generated. + let g1_alpha = unchecked_compressed_x_to_g1_point(&buffer[..32])?; + let g2_beta = unchecked_compressed_x_to_g2_point(&buffer[64..128])?; + let g2_gamma = unchecked_compressed_x_to_g2_point(&buffer[128..192])?; + let g2_delta = unchecked_compressed_x_to_g2_point(&buffer[224..288])?; + + let num_k = u32::from_be_bytes([buffer[288], buffer[289], buffer[290], buffer[291]]); + let mut k = Vec::new(); + let mut offset = 292; + for _ in 0..num_k { + let point = unchecked_compressed_x_to_g1_point(&buffer[offset..offset + 32])?; + k.push(point); + offset += 32; + } + + Ok(Groth16VerifyingKey { + g1: Groth16G1 { alpha: g1_alpha, k }, + g2: Groth16G2 { beta: -g2_beta, gamma: g2_gamma, delta: g2_delta }, + }) +} diff --git a/crates/verifier/src/groth16/error.rs b/crates/verifier/src/groth16/error.rs new file mode 100644 index 0000000000..bc88da868c --- /dev/null +++ b/crates/verifier/src/groth16/error.rs @@ -0,0 +1,17 @@ +use thiserror_no_std::Error; + +#[derive(Debug, Error)] +pub enum Groth16Error { + #[error("Proof verification failed")] + ProofVerificationFailed, + #[error("Process verifying key failed")] + ProcessVerifyingKeyFailed, + #[error("Prepare inputs failed")] + PrepareInputsFailed, + #[error("Unexpected identity")] + UnexpectedIdentity, + #[error("General error")] + GeneralError(#[from] crate::error::Error), + #[error("Groth16 vkey hash mismatch")] + Groth16VkeyHashMismatch, +} diff --git a/crates/verifier/src/groth16/mod.rs b/crates/verifier/src/groth16/mod.rs new file mode 100644 index 0000000000..123d71e4f6 --- /dev/null +++ b/crates/verifier/src/groth16/mod.rs @@ -0,0 +1,66 @@ +mod converter; +pub(crate) mod error; +mod verify; + +pub(crate) use converter::{load_groth16_proof_from_bytes, load_groth16_verifying_key_from_bytes}; +use sha2::{Digest, Sha256}; +pub(crate) use verify::*; + +use error::Groth16Error; + +use crate::{bn254_public_values, decode_sp1_vkey_hash}; + +/// A verifier for Groth16 zero-knowledge proofs. +#[derive(Debug)] +pub struct Groth16Verifier; +impl Groth16Verifier { + /// Verifies a Groth16 proof. + /// + /// # Arguments + /// + /// * `proof` - The proof bytes. + /// * `public_inputs` - The SP1 public inputs. + /// * `sp1_vkey_hash` - The SP1 vkey hash. + /// This is generated in the following manner: + /// + /// ```ignore + /// use sp1_sdk::ProverClient; + /// let client = ProverClient::new(); + /// let (pk, vk) = client.setup(ELF); + /// let sp1_vkey_hash = vk.bytes32(); + /// ``` + /// * `groth16_vk` - The Groth16 verifying key bytes. + /// Usually this will be the [`crate::GROTH16_VK_BYTES`] constant, which is the Groth16 + /// verifying key for the current SP1 version. + /// + /// # Returns + /// + /// A [`Result`] containing a boolean indicating whether the proof is valid, + /// or a [`Groth16Error`] if verification fails. + pub fn verify( + proof: &[u8], + sp1_public_inputs: &[u8], + sp1_vkey_hash: &str, + groth16_vk: &[u8], + ) -> Result { + // Hash the vk and get the first 4 bytes. + let groth16_vk_hash: [u8; 4] = Sha256::digest(groth16_vk)[..4].try_into().unwrap(); + + // Check to make sure that this proof was generated by the groth16 proving key corresponding to + // the given groth16_vk. + // + // SP1 prepends the raw Groth16 proof with the first 4 bytes of the groth16 vkey to + // facilitate this check. + if groth16_vk_hash != proof[..4] { + return Err(Groth16Error::Groth16VkeyHashMismatch); + } + + let sp1_vkey_hash = decode_sp1_vkey_hash(sp1_vkey_hash)?; + let public_inputs = bn254_public_values(&sp1_vkey_hash, sp1_public_inputs); + + let proof = load_groth16_proof_from_bytes(&proof[4..]).unwrap(); + let groth16_vk = load_groth16_verifying_key_from_bytes(groth16_vk).unwrap(); + + verify_groth16_raw(&groth16_vk, &proof, &public_inputs) + } +} diff --git a/crates/verifier/src/groth16/verify.rs b/crates/verifier/src/groth16/verify.rs new file mode 100644 index 0000000000..510815b971 --- /dev/null +++ b/crates/verifier/src/groth16/verify.rs @@ -0,0 +1,66 @@ +use alloc::vec::Vec; +use bn::{pairing_batch, AffineG1, AffineG2, Fr, Gt, G1, G2}; + +use super::error::Groth16Error; + +/// G1 elements of the verification key. +#[derive(Clone, PartialEq)] +pub(crate) struct Groth16G1 { + pub(crate) alpha: AffineG1, + pub(crate) k: Vec, +} + +/// G2 elements of the verification key. +#[derive(Clone, PartialEq)] +pub(crate) struct Groth16G2 { + pub(crate) beta: AffineG2, + pub(crate) delta: AffineG2, + pub(crate) gamma: AffineG2, +} + +/// Verification key for the Groth16 proof. +#[derive(Clone, PartialEq)] +pub(crate) struct Groth16VerifyingKey { + pub(crate) g1: Groth16G1, + pub(crate) g2: Groth16G2, +} + +/// Proof for the Groth16 verification. +pub(crate) struct Groth16Proof { + pub(crate) ar: AffineG1, + pub(crate) krs: AffineG1, + pub(crate) bs: AffineG2, +} + +/// Prepare the inputs for the Groth16 verification by combining the public inputs with the +/// corresponding elements of the verification key. +fn prepare_inputs(vk: Groth16VerifyingKey, public_inputs: &[Fr]) -> Result { + if (public_inputs.len() + 1) != vk.g1.k.len() { + return Err(Groth16Error::PrepareInputsFailed); + } + + Ok(public_inputs + .iter() + .zip(vk.g1.k.iter().skip(1)) + .fold(vk.g1.k[0], |acc, (i, b)| acc + (*b * *i)) + .into()) +} + +/// Verify the Groth16 proof +/// +/// First, prepare the public inputs by folding them with the verification key. +/// Then, verify the proof by checking the pairing equation. +pub(crate) fn verify_groth16_raw( + vk: &Groth16VerifyingKey, + proof: &Groth16Proof, + public_inputs: &[Fr], +) -> Result { + let prepared_inputs = prepare_inputs(vk.clone(), public_inputs)?; + + Ok(pairing_batch(&[ + (-Into::::into(proof.ar), proof.bs.into()), + (prepared_inputs, vk.g2.gamma.into()), + (proof.krs.into(), vk.g2.delta.into()), + (vk.g1.alpha.into(), -Into::::into(vk.g2.beta)), + ]) == Gt::one()) +} diff --git a/crates/verifier/src/lib.rs b/crates/verifier/src/lib.rs new file mode 100644 index 0000000000..6abbd051e2 --- /dev/null +++ b/crates/verifier/src/lib.rs @@ -0,0 +1,32 @@ +//! This crate provides verifiers for SP1 Groth16 and Plonk BN254 proofs in a no-std environment. +//! It is patched for efficient verification within the SP1 ZKVM context. + +#![cfg_attr(not(feature = "std"), no_std)] +extern crate alloc; + +use lazy_static::lazy_static; + +lazy_static! { + /// The PLONK verifying key for this SP1 version. + pub static ref PLONK_VK_BYTES: &'static [u8] = include_bytes!("../bn254-vk/plonk_vk.bin"); +} + +lazy_static! { + /// The Groth16 verifying key for this SP1 version. + pub static ref GROTH16_VK_BYTES: &'static [u8] = include_bytes!("../bn254-vk/groth16_vk.bin"); +} + +mod constants; +mod converter; +mod error; +mod groth16; +mod utils; + +pub use groth16::Groth16Verifier; +pub use utils::*; + +mod plonk; +pub use plonk::PlonkVerifier; + +#[cfg(test)] +mod tests; diff --git a/crates/verifier/src/plonk/converter.rs b/crates/verifier/src/plonk/converter.rs new file mode 100644 index 0000000000..16bd387218 --- /dev/null +++ b/crates/verifier/src/plonk/converter.rs @@ -0,0 +1,176 @@ +use crate::{ + converter::{ + unchecked_compressed_x_to_g1_point, unchecked_compressed_x_to_g2_point, + uncompressed_bytes_to_g1_point, + }, + error::Error, +}; +use alloc::vec::Vec; +use bn::{AffineG1, Fr, G2}; + +use super::{ + error::PlonkError, + kzg::{self, BatchOpeningProof, LineEvaluationAff, OpeningProof, E2}, + verify::PlonkVerifyingKey, + PlonkProof, +}; + +pub(crate) fn load_plonk_verifying_key_from_bytes( + buffer: &[u8], +) -> Result { + let size = u64::from_be_bytes([ + buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], + ]) as usize; + let size_inv = + Fr::from_slice(&buffer[8..40]).map_err(|e| PlonkError::GeneralError(Error::Field(e)))?; + let generator = + Fr::from_slice(&buffer[40..72]).map_err(|e| PlonkError::GeneralError(Error::Field(e)))?; + + let nb_public_variables = u64::from_be_bytes([ + buffer[72], buffer[73], buffer[74], buffer[75], buffer[76], buffer[77], buffer[78], + buffer[79], + ]) as usize; + + let coset_shift = + Fr::from_slice(&buffer[80..112]).map_err(|e| PlonkError::GeneralError(Error::Field(e)))?; + let s0 = unchecked_compressed_x_to_g1_point(&buffer[112..144])?; + let s1 = unchecked_compressed_x_to_g1_point(&buffer[144..176])?; + let s2 = unchecked_compressed_x_to_g1_point(&buffer[176..208])?; + let ql = unchecked_compressed_x_to_g1_point(&buffer[208..240])?; + let qr = unchecked_compressed_x_to_g1_point(&buffer[240..272])?; + let qm = unchecked_compressed_x_to_g1_point(&buffer[272..304])?; + let qo = unchecked_compressed_x_to_g1_point(&buffer[304..336])?; + let qk = unchecked_compressed_x_to_g1_point(&buffer[336..368])?; + let num_qcp = u32::from_be_bytes([buffer[368], buffer[369], buffer[370], buffer[371]]); + let mut qcp = Vec::new(); + let mut offset = 372; + + for _ in 0..num_qcp { + let point = unchecked_compressed_x_to_g1_point(&buffer[offset..offset + 32])?; + qcp.push(point); + offset += 32; + } + + let g1 = unchecked_compressed_x_to_g1_point(&buffer[offset..offset + 32])?; + let g2_0 = unchecked_compressed_x_to_g2_point(&buffer[offset + 32..offset + 96])?; + let g2_1 = unchecked_compressed_x_to_g2_point(&buffer[offset + 96..offset + 160])?; + + offset += 160 + 33788; + + let num_commitment_constraint_indexes = u64::from_be_bytes([ + buffer[offset], + buffer[offset + 1], + buffer[offset + 2], + buffer[offset + 3], + buffer[offset + 4], + buffer[offset + 5], + buffer[offset + 6], + buffer[offset + 7], + ]) as usize; + + let mut commitment_constraint_indexes = Vec::new(); + offset += 8; + for _ in 0..num_commitment_constraint_indexes { + let index = u64::from_be_bytes([ + buffer[offset], + buffer[offset + 1], + buffer[offset + 2], + buffer[offset + 3], + buffer[offset + 4], + buffer[offset + 5], + buffer[offset + 6], + buffer[offset + 7], + ]) as usize; + commitment_constraint_indexes.push(index); + offset += 8; + } + + let result = PlonkVerifyingKey { + size, + size_inv, + generator, + nb_public_variables, + kzg: kzg::KZGVerifyingKey { + g2: [G2::from(g2_0), G2::from(g2_1)], + g1: g1.into(), + lines: [[[LineEvaluationAff { + r0: E2 { a0: Fr::zero(), a1: Fr::zero() }, + r1: E2 { a0: Fr::zero(), a1: Fr::zero() }, + }; 66]; 2]; 2], + }, + coset_shift, + s: [s0, s1, s2], + ql, + qr, + qm, + qo, + qk, + qcp, + commitment_constraint_indexes, + }; + + Ok(result) +} + +pub(crate) fn load_plonk_proof_from_bytes(buffer: &[u8]) -> Result { + let lro0 = uncompressed_bytes_to_g1_point(&buffer[..64])?; + let lro1 = uncompressed_bytes_to_g1_point(&buffer[64..128])?; + let lro2 = uncompressed_bytes_to_g1_point(&buffer[128..192])?; + let z = uncompressed_bytes_to_g1_point(&buffer[192..256])?; + let h0 = uncompressed_bytes_to_g1_point(&buffer[256..320])?; + let h1 = uncompressed_bytes_to_g1_point(&buffer[320..384])?; + let h2 = uncompressed_bytes_to_g1_point(&buffer[384..448])?; + let batched_proof_h = uncompressed_bytes_to_g1_point(&buffer[448..512])?; + + let num_claimed_values = + u32::from_be_bytes([buffer[512], buffer[513], buffer[514], buffer[515]]) as usize; + + let mut claimed_values = Vec::new(); + let mut offset = 516; + for _ in 0..num_claimed_values { + let value = Fr::from_slice(&buffer[offset..offset + 32]) + .map_err(|e| PlonkError::GeneralError(Error::Field(e)))?; + claimed_values.push(value); + offset += 32; + } + + let z_shifted_opening_h = uncompressed_bytes_to_g1_point(&buffer[offset..offset + 64])?; + let z_shifted_opening_value = Fr::from_slice(&buffer[offset + 64..offset + 96]) + .map_err(|e| PlonkError::GeneralError(Error::Field(e)))?; + + let num_bsb22_commitments = u32::from_be_bytes([ + buffer[offset + 96], + buffer[offset + 97], + buffer[offset + 98], + buffer[offset + 99], + ]) as usize; + + let mut bsb22_commitments = Vec::new(); + offset += 100; + for _ in 0..num_bsb22_commitments { + let commitment = uncompressed_bytes_to_g1_point(&buffer[offset..offset + 64])?; + bsb22_commitments.push(commitment); + offset += 64; + } + + let result = PlonkProof { + lro: [lro0, lro1, lro2], + z, + h: [h0, h1, h2], + bsb22_commitments, + batched_proof: BatchOpeningProof { h: batched_proof_h, claimed_values }, + z_shifted_opening: OpeningProof { + h: z_shifted_opening_h, + claimed_value: z_shifted_opening_value, + }, + }; + + Ok(result) +} + +pub(crate) fn g1_to_bytes(g1: &AffineG1) -> Result, PlonkError> { + let mut bytes: [u8; 64] = unsafe { core::mem::transmute(*g1) }; + bytes[..32].reverse(); + bytes[32..].reverse(); + Ok(bytes.to_vec()) +} diff --git a/crates/verifier/src/plonk/error.rs b/crates/verifier/src/plonk/error.rs new file mode 100644 index 0000000000..cc166638dd --- /dev/null +++ b/crates/verifier/src/plonk/error.rs @@ -0,0 +1,49 @@ +use thiserror_no_std::Error; + +#[derive(Error, Debug)] +pub enum PlonkError { + #[error("Beyond the modulus")] + BeyondTheModulus, + #[error("BSB22 Commitment number mismatch")] + Bsb22CommitmentMismatch, + #[error("Challenge already computed")] + ChallengeAlreadyComputed, + #[error("Challenge not found")] + ChallengeNotFound, + #[error("DST too large")] + DSTTooLarge, + #[error("Ell too large")] + EllTooLarge, + #[error("Failed to get Fr from random bytes")] + FailedToGetFrFromRandomBytes, + #[error("Failed to get x")] + FailedToGetX, + #[error("Failed to get y")] + FailedToGetY, + #[error("Inverse not found")] + InverseNotFound, + #[error("Invalid number of digests")] + InvalidNumberOfDigests, + #[error("Invalid point in subgroup check")] + InvalidPoint, + #[error("Invalid witness")] + InvalidWitness, + #[error("Invalid x length")] + InvalidXLength, + #[error("Opening linear polynomial mismatch")] + OpeningPolyMismatch, + #[error("Pairing check failed")] + PairingCheckFailed, + #[error("Previous challenge not computed")] + PreviousChallengeNotComputed, + #[error("Unexpected flag")] + UnexpectedFlag, + #[error("Transcript error")] + TranscriptError, + #[error("Hash to field initialization failed")] + HashToFieldInitializationFailed, + #[error("Plonk vkey hash mismatch")] + PlonkVkeyHashMismatch, + #[error("General error")] + GeneralError(#[from] crate::error::Error), +} diff --git a/crates/verifier/src/plonk/hash_to_field.rs b/crates/verifier/src/plonk/hash_to_field.rs new file mode 100644 index 0000000000..d473abc4fe --- /dev/null +++ b/crates/verifier/src/plonk/hash_to_field.rs @@ -0,0 +1,118 @@ +use alloc::vec; +use alloc::vec::Vec; +use core::hash::Hasher; +use sha2::Digest; + +use crate::error::Error; + +pub(crate) struct WrappedHashToField { + domain: Vec, + to_hash: Vec, +} + +impl WrappedHashToField { + // Creates a new instance with a domain separator + pub(crate) fn new(domain_separator: &[u8]) -> Result { + Ok(Self { domain: domain_separator.to_vec(), to_hash: Vec::new() }) + } + + // Hashes the bytes to a field element and returns the byte representation + pub(crate) fn sum(&self) -> Result, Error> { + let res = Self::hash(self.to_hash.clone(), self.domain.clone(), 1)?; + + Ok(res[0].clone()) + } + + pub(crate) fn hash(msg: Vec, dst: Vec, count: usize) -> Result>, Error> { + let bytes = 32; + let l = 16 + bytes; + + let len_in_bytes = count * l; + let pseudo_random_bytes = Self::expand_msg_xmd(msg, dst, len_in_bytes).unwrap(); + + let mut res = Vec::new(); + for i in 0..count { + res.push(pseudo_random_bytes[i * l..(i + 1) * l].to_vec()); + } + + Ok(res) + } + + fn expand_msg_xmd(msg: Vec, dst: Vec, len: usize) -> Result, Error> { + let mut h = sha2::Sha256::new(); + + let ell = (len + 32 - 1) / 32; + + if ell > 255 { + Err(Error::EllTooLarge)?; + } + if dst.len() > 255 { + Err(Error::DSTTooLarge)?; + } + + let size_domain = dst.len(); + + h.reset(); + + // b_0 = H(msg_prime) + h.update([0u8; 64]); // Assuming the block size is 64 bytes for SHA-256 + h.update(&msg); + h.update([(len >> 8) as u8, len as u8, 0]); + h.update(&dst); + h.update([size_domain as u8]); + let b0 = h.finalize_reset(); + + // b_1 = H(b_0 || I2OSP(1, 1) || DST_prime) + h.update(b0); + h.update([1]); // I2OSP(1, 1) + h.update(&dst); + h.update([size_domain as u8]); + let mut b1 = h.finalize_reset(); + + let mut res = vec![0u8; len]; + res[..32].copy_from_slice(&b1); + + for i in 2..=ell { + h.reset(); + let mut strxor = vec![0u8; 32]; + for (j, (b0_byte, b1_byte)) in b0.iter().zip(b1.iter()).enumerate() { + strxor[j] = b0_byte ^ b1_byte; + } + h.update(&strxor); + h.update([i as u8]); + h.update(&dst); + h.update([size_domain as u8]); + b1 = h.finalize_reset(); + + let start = 32 * (i - 1); + let end = core::cmp::min(start + 32, res.len()); + res[start..end].copy_from_slice(&b1[..end - start]); + } + + Ok(res) + } +} + +impl Hasher for WrappedHashToField { + fn finish(&self) -> u64 { + // This method is not directly applicable to field elements, so it's a stub + unimplemented!(); + } + + fn write(&mut self, bytes: &[u8]) { + self.to_hash.extend_from_slice(bytes); + } +} + +impl Default for WrappedHashToField { + fn default() -> Self { + Self::new(&[]).unwrap() + } +} + +impl WrappedHashToField { + // Resets the state of the hasher + pub(crate) fn reset(&mut self) { + self.to_hash.clear(); + } +} diff --git a/crates/verifier/src/plonk/kzg.rs b/crates/verifier/src/plonk/kzg.rs new file mode 100644 index 0000000000..549e048f9c --- /dev/null +++ b/crates/verifier/src/plonk/kzg.rs @@ -0,0 +1,193 @@ +use alloc::{string::ToString, vec, vec::Vec}; +use bn::{pairing_batch, AffineG1, Fr, G1, G2}; + +use crate::{error::Error, plonk::transcript::Transcript}; + +use super::{converter::g1_to_bytes, error::PlonkError, GAMMA, U}; + +pub(crate) type Digest = AffineG1; + +#[derive(Clone, Copy, Debug)] +#[allow(dead_code)] +pub(crate) struct E2 { + pub(crate) a0: Fr, + pub(crate) a1: Fr, +} + +#[derive(Clone, Copy, Debug)] +#[allow(dead_code)] +pub(crate) struct LineEvaluationAff { + pub(crate) r0: E2, + pub(crate) r1: E2, +} + +#[derive(Clone, Copy, Debug)] +#[allow(dead_code)] +pub(crate) struct KZGVerifyingKey { + pub(crate) g2: [G2; 2], // [G₂, [α]G₂] + pub(crate) g1: G1, + // Precomputed pairing lines corresponding to G₂, [α]G₂ + pub(crate) lines: [[[LineEvaluationAff; 66]; 2]; 2], +} + +#[derive(Clone, Debug)] +pub(crate) struct BatchOpeningProof { + pub(crate) h: AffineG1, + pub(crate) claimed_values: Vec, +} + +#[derive(Clone, Copy, Debug)] +pub(crate) struct OpeningProof { + pub(crate) h: AffineG1, + pub(crate) claimed_value: Fr, +} + +/// Derives the folding factor for the batched opening proof. +/// +/// Uses a separate transcript than the main transcript used for the other fiat shamir randomness. +fn derive_gamma( + point: &Fr, + digests: Vec, + claimed_values: Vec, + data_transcript: Option>, +) -> Result { + let mut transcript = Transcript::new(Some([GAMMA.to_string()].to_vec()))?; + transcript.bind(GAMMA, &point.into_u256().to_bytes_be())?; + + for digest in digests.iter() { + transcript.bind(GAMMA, &g1_to_bytes(digest)?)?; + } + + for claimed_value in claimed_values.iter() { + transcript.bind(GAMMA, &claimed_value.into_u256().to_bytes_be())?; + } + + if let Some(data_transcript) = data_transcript { + transcript.bind(GAMMA, &data_transcript)?; + } + + let gamma_byte = transcript.compute_challenge(GAMMA)?; + + let x = Fr::from_bytes_be_mod_order(gamma_byte.as_slice()) + .map_err(|e| PlonkError::GeneralError(Error::Field(e)))?; + + Ok(x) +} + +fn fold(di: Vec, fai: Vec, ci: Vec) -> Result<(AffineG1, Fr), PlonkError> { + let nb_digests = di.len(); + let mut folded_evaluations = Fr::zero(); + + for i in 0..nb_digests { + folded_evaluations += fai[i] * ci[i]; + } + + let folded_digests = AffineG1::msm(&di, &ci); + + Ok((folded_digests, folded_evaluations)) +} + +pub(crate) fn fold_proof( + digests: Vec, + batch_opening_proof: &BatchOpeningProof, + point: &Fr, + data_transcript: Option>, + global_transcript: &mut Transcript, +) -> Result<(OpeningProof, AffineG1), PlonkError> { + let nb_digests = digests.len(); + + if nb_digests != batch_opening_proof.claimed_values.len() { + return Err(Error::InvalidNumberOfDigests.into()); + } + + let gamma = derive_gamma( + point, + digests.clone(), + batch_opening_proof.claimed_values.clone(), + data_transcript, + )?; + + // Bind gamma to the transcript to challenge U. + global_transcript.bind(U, &gamma.into_u256().to_bytes_be())?; + + let mut gammai = vec![Fr::zero(); nb_digests]; + gammai[0] = Fr::one(); + + if nb_digests > 1 { + gammai[1] = gamma; + } + + for i in 2..nb_digests { + gammai[i] = gammai[i - 1] * gamma; + } + + let (folded_digests, folded_evaluations) = + fold(digests, batch_opening_proof.claimed_values.clone(), gammai)?; + + let open_proof = OpeningProof { h: batch_opening_proof.h, claimed_value: folded_evaluations }; + + Ok((open_proof, folded_digests)) +} + +pub(crate) fn batch_verify_multi_points( + digests: Vec, + proofs: Vec, + points: Vec, + u: Fr, + vk: &KZGVerifyingKey, +) -> Result<(), PlonkError> { + let nb_digests = digests.len(); + let nb_proofs = proofs.len(); + let nb_points = points.len(); + + if nb_digests != nb_proofs { + return Err(Error::InvalidNumberOfDigests.into()); + } + + if nb_digests != nb_points { + return Err(Error::InvalidNumberOfDigests.into()); + } + + if nb_digests == 1 { + todo!(); + } + + let mut random_numbers = Vec::with_capacity(nb_digests); + random_numbers.push(Fr::one()); + for i in 1..nb_digests { + random_numbers.push(u * random_numbers[i - 1]); + } + + let mut quotients = Vec::with_capacity(nb_proofs); + for item in proofs.iter().take(nb_digests) { + quotients.push(item.h); + } + + let mut folded_quotients = AffineG1::msm("ients, &random_numbers); + let mut evals = Vec::with_capacity(nb_digests); + + for item in proofs.iter().take(nb_digests) { + evals.push(item.claimed_value); + } + + let (mut folded_digests, folded_evals) = fold(digests, evals, random_numbers.clone())?; + let folded_evals_commit = vk.g1 * folded_evals; + folded_digests = folded_digests - folded_evals_commit.into(); + + for i in 0..random_numbers.len() { + random_numbers[i] *= points[i]; + } + let folded_points_quotients = AffineG1::msm("ients, &random_numbers); + + folded_digests = folded_digests + folded_points_quotients; + folded_quotients = -folded_quotients; + + let pairing_result = + pairing_batch(&[(folded_digests.into(), vk.g2[0]), (folded_quotients.into(), vk.g2[1])]); + + if !pairing_result.is_one() { + return Err(Error::PairingCheckFailed.into()); + } + + Ok(()) +} diff --git a/crates/verifier/src/plonk/mod.rs b/crates/verifier/src/plonk/mod.rs new file mode 100644 index 0000000000..4ee223b71e --- /dev/null +++ b/crates/verifier/src/plonk/mod.rs @@ -0,0 +1,75 @@ +pub(crate) const GAMMA: &str = "gamma"; +pub(crate) const BETA: &str = "beta"; +pub(crate) const ALPHA: &str = "alpha"; +pub(crate) const ZETA: &str = "zeta"; +pub(crate) const U: &str = "u"; + +mod converter; +mod hash_to_field; +mod kzg; +mod proof; +mod transcript; +mod verify; + +pub(crate) mod error; + +pub(crate) use converter::{load_plonk_proof_from_bytes, load_plonk_verifying_key_from_bytes}; +pub(crate) use proof::PlonkProof; +pub(crate) use verify::verify_plonk_raw; + +use error::PlonkError; +use sha2::{Digest, Sha256}; + +use crate::{bn254_public_values, decode_sp1_vkey_hash}; +/// A verifier for Plonk zero-knowledge proofs. +#[derive(Debug)] +pub struct PlonkVerifier; + +impl PlonkVerifier { + /// # Arguments + /// + /// * `proof` - The proof bytes. + /// * `public_inputs` - The SP1 public inputs. + /// * `sp1_vkey_hash` - The SP1 vkey hash. + /// This is generated in the following manner: + /// + /// ```ignore + /// use sp1_sdk::ProverClient; + /// let client = ProverClient::new(); + /// let (pk, vk) = client.setup(ELF); + /// let sp1_vkey_hash = vk.bytes32(); + /// ``` + /// * `plonk_vk` - The Plonk verifying key bytes. + /// Usually this will be the [`crate::PLONK_VK_BYTES`] constant. + /// + /// # Returns + /// + /// A `Result` containing a boolean indicating whether the proof is valid, + /// or a [`PlonkError`] if verification fails. + pub fn verify( + proof: &[u8], + sp1_public_inputs: &[u8], + sp1_vkey_hash: &str, + plonk_vk: &[u8], + ) -> Result { + // Hash the vk and get the first 4 bytes. + let plonk_vk_hash: [u8; 4] = Sha256::digest(plonk_vk)[..4].try_into().unwrap(); + + // Check to make sure that this proof was generated by the plonk proving key corresponding to + // the given plonk vk. + // + // SP1 prepends the raw Plonk proof with the first 4 bytes of the plonk vkey to + // facilitate this check. + if plonk_vk_hash != proof[..4] { + return Err(PlonkError::PlonkVkeyHashMismatch); + } + + let sp1_vkey_hash = decode_sp1_vkey_hash(sp1_vkey_hash)?; + let public_inputs = bn254_public_values(&sp1_vkey_hash, sp1_public_inputs); + + let proof = load_plonk_proof_from_bytes(&proof[4..]).unwrap(); + let plonk_vk = load_plonk_verifying_key_from_bytes(plonk_vk).unwrap(); + + verify_plonk_raw(&plonk_vk, &proof, &public_inputs) + } +} diff --git a/crates/verifier/src/plonk/proof.rs b/crates/verifier/src/plonk/proof.rs new file mode 100644 index 0000000000..850ecf00f4 --- /dev/null +++ b/crates/verifier/src/plonk/proof.rs @@ -0,0 +1,13 @@ +use alloc::vec::Vec; + +use super::kzg::{BatchOpeningProof, Digest, OpeningProof}; + +#[derive(Debug)] +pub(crate) struct PlonkProof { + pub(crate) lro: [Digest; 3], + pub(crate) z: Digest, + pub(crate) h: [Digest; 3], + pub(crate) bsb22_commitments: Vec, + pub(crate) batched_proof: BatchOpeningProof, + pub(crate) z_shifted_opening: OpeningProof, +} diff --git a/crates/verifier/src/plonk/transcript.rs b/crates/verifier/src/plonk/transcript.rs new file mode 100644 index 0000000000..5d1c2db8db --- /dev/null +++ b/crates/verifier/src/plonk/transcript.rs @@ -0,0 +1,103 @@ +use alloc::{collections::btree_map::BTreeMap, string::String, vec::Vec}; +use sha2::{Digest, Sha256}; + +use crate::error::Error; + +/// A challenge in the transcript, derived with randomness from `bindings` and the previous +/// challenge. +#[derive(Clone, Debug)] +pub(crate) struct Challenge { + position: usize, + bindings: Vec>, + value: Vec, + is_computed: bool, +} + +/// A Fiat-Shamir transcript. +#[derive(Clone, Debug)] +pub(crate) struct Transcript { + pub(crate) h: Sha256, + + pub(crate) challenges: BTreeMap, + previous_challenge: Option, +} + +impl Transcript { + /// Creates a new transcript. + pub(crate) fn new(challenges_id: Option>) -> Result { + let h = Sha256::new(); + + if let Some(challenges_id) = challenges_id { + let mut challenges = BTreeMap::new(); + for (position, id) in challenges_id.iter().enumerate() { + challenges.insert( + id.clone(), + Challenge { + position, + bindings: Vec::new(), + value: Vec::new(), + is_computed: false, + }, + ); + } + + Ok(Transcript { h, challenges, previous_challenge: None }) + } else { + Ok(Transcript { h, challenges: BTreeMap::new(), previous_challenge: None }) + } + } + + /// Binds some data to a challenge. + pub(crate) fn bind(&mut self, id: &str, binding: &[u8]) -> Result<(), Error> { + let current_challenge = self.challenges.get_mut(id).ok_or(Error::ChallengeNotFound)?; + if current_challenge.is_computed { + return Err(Error::ChallengeAlreadyComputed); + } + + current_challenge.bindings.push(binding.to_vec()); + + Ok(()) + } + + /// Computes a challenge and returns its value. + /// + /// Challenges must be computed in order. The previous challenge is automatically fed into the + /// challenge currently being computed. + pub(crate) fn compute_challenge(&mut self, challenge_id: &str) -> Result, Error> { + let challenge = self.challenges.get_mut(challenge_id).ok_or(Error::ChallengeNotFound)?; + + if challenge.is_computed { + return Ok(challenge.value.clone()); + } + + // Reset the hash function before and after computing the challenge + self.h.reset(); + + self.h.update(challenge_id.as_bytes()); + + if challenge.position != 0 { + if let Some(previous_challenge) = &self.previous_challenge { + if previous_challenge.position != challenge.position - 1 { + return Err(Error::PreviousChallengeNotComputed); + } + self.h.update(&previous_challenge.value) + } else { + return Err(Error::PreviousChallengeNotComputed); + } + } + + for binding in challenge.bindings.iter() { + self.h.update(binding) + } + + let res = self.h.finalize_reset(); + + challenge.value = res.to_vec(); + challenge.is_computed = true; + + // Update the previous challenge reference + self.previous_challenge = Some(challenge.clone()); + + Ok(res.to_vec()) + } +} diff --git a/crates/verifier/src/plonk/verify.rs b/crates/verifier/src/plonk/verify.rs new file mode 100644 index 0000000000..d00f35094b --- /dev/null +++ b/crates/verifier/src/plonk/verify.rs @@ -0,0 +1,404 @@ +use alloc::{string::ToString, vec, vec::Vec}; +use bn::{arith::U256, AffineG1, Fr}; +use core::hash::Hasher; + +use crate::{error::Error, plonk::transcript::Transcript}; + +use super::{ + converter::g1_to_bytes, error::PlonkError, kzg, PlonkProof, ALPHA, BETA, GAMMA, U, ZETA, +}; +#[derive(Debug)] +pub(crate) struct PlonkVerifyingKey { + pub(crate) size: usize, + pub(crate) size_inv: Fr, + pub(crate) generator: Fr, + pub(crate) nb_public_variables: usize, + + pub(crate) kzg: kzg::KZGVerifyingKey, + + pub(crate) coset_shift: Fr, + + pub(crate) s: [kzg::Digest; 3], + + pub(crate) ql: kzg::Digest, + pub(crate) qr: kzg::Digest, + pub(crate) qm: kzg::Digest, + pub(crate) qo: kzg::Digest, + pub(crate) qk: kzg::Digest, + pub(crate) qcp: Vec, + + pub(crate) commitment_constraint_indexes: Vec, +} + +/// Verifies a PLONK proof +/// +/// # Arguments +/// +/// * `vk` - The verifying key +/// * `proof` - The PLONK proof +/// * `public_inputs` - The public inputs to the circuit +/// +/// # Returns +/// +/// * `Result` - Returns true if the proof is valid, or an error if verification fails +pub(crate) fn verify_plonk_raw( + vk: &PlonkVerifyingKey, + proof: &PlonkProof, + public_inputs: &[Fr], +) -> Result { + // Check if the number of BSB22 commitments matches the number of Qcp in the verifying key + if proof.bsb22_commitments.len() != vk.qcp.len() { + return Err(PlonkError::GeneralError(Error::Bsb22CommitmentMismatch)); + } + + // Check if the number of public inputs matches the number of public variables in the verifying key + if public_inputs.len() != vk.nb_public_variables { + return Err(PlonkError::GeneralError(Error::InvalidWitness)); + } + + // Initialize the Fiat-Shamir transcript + let mut fs = Transcript::new(Some( + [GAMMA.to_string(), BETA.to_string(), ALPHA.to_string(), ZETA.to_string(), U.to_string()] + .to_vec(), + ))?; + + // Bind public data to the transcript + bind_public_data(&mut fs, GAMMA, vk, public_inputs)?; + + // Derive gamma challenge: γ + let gamma = derive_randomness( + &mut fs, + GAMMA, + Some([proof.lro[0], proof.lro[1], proof.lro[2]].to_vec()), + )?; + + // Derive beta challenge: β + let beta = derive_randomness(&mut fs, BETA, None)?; + + // Derive alpha challenge: α + let mut alpha_deps: Vec = proof.bsb22_commitments.to_vec(); + alpha_deps.push(proof.z); + let alpha = derive_randomness(&mut fs, ALPHA, Some(alpha_deps))?; + + // Derive zeta challenge (point of evaluation): ζ + let zeta = + derive_randomness(&mut fs, ZETA, Some([proof.h[0], proof.h[1], proof.h[2]].to_vec()))?; + + // Compute zh_zeta = ζⁿ - 1 + let one = Fr::one(); + let n = U256::from(vk.size as u64); + let n = + Fr::from_slice(&n.to_bytes_be()).map_err(|e| PlonkError::GeneralError(Error::Field(e)))?; + let zeta_power_n = zeta.pow(n); + let zh_zeta = zeta_power_n - one; + + // Compute Lagrange polynomial at ζ: L₁(ζ) = (ζⁿ - 1) / (n * (ζ - 1)) + let mut lagrange_one = (zeta - one).inverse().ok_or(Error::InverseNotFound)?; + lagrange_one *= zh_zeta; + lagrange_one *= vk.size_inv; + + // Compute PI = ∑_{i Result<(), PlonkError> { + transcript.bind(challenge, &g1_to_bytes(&vk.s[0])?)?; + transcript.bind(challenge, &g1_to_bytes(&vk.s[1])?)?; + transcript.bind(challenge, &g1_to_bytes(&vk.s[2])?)?; + + transcript.bind(challenge, &g1_to_bytes(&vk.ql)?)?; + transcript.bind(challenge, &g1_to_bytes(&vk.qr)?)?; + transcript.bind(challenge, &g1_to_bytes(&vk.qm)?)?; + transcript.bind(challenge, &g1_to_bytes(&vk.qo)?)?; + transcript.bind(challenge, &g1_to_bytes(&vk.qk)?)?; + + for qcp in vk.qcp.iter() { + transcript.bind(challenge, &g1_to_bytes(qcp)?)?; + } + + for public_input in public_inputs.iter() { + transcript.bind(challenge, &public_input.into_u256().to_bytes_be())?; + } + + Ok(()) +} + +/// Derives the randomness from the transcript. +/// +/// If you want to include some data for a challenge that isn't an affine g1 point, use +/// [`Transcript::bind`] to bind the data to the transcript before deriving the randomness. +fn derive_randomness( + transcript: &mut Transcript, + challenge: &str, + points: Option>, +) -> Result { + if let Some(points) = points { + for point in points { + let buf = g1_to_bytes(&point)?; + transcript.bind(challenge, &buf)?; + } + } + + let b = transcript.compute_challenge(challenge)?; + let x = Fr::from_bytes_be_mod_order(b.as_slice()) + .map_err(|e| PlonkError::GeneralError(Error::Field(e)))?; + Ok(x) +} + +/// Wrapper for [`batch_inversion`]. +fn batch_invert(elements: &[Fr]) -> Result, PlonkError> { + let mut elements = elements.to_vec(); + batch_inversion(&mut elements); + Ok(elements) +} + +/// Inverts a batch of Fr elements. +fn batch_inversion(v: &mut [Fr]) { + batch_inversion_and_mul(v, &Fr::one()); +} + +/// Inverts a batch of Fr elements and multiplies them by a given coefficient. +fn batch_inversion_and_mul(v: &mut [Fr], coeff: &Fr) { + let mut prod = Vec::with_capacity(v.len()); + let mut tmp = Fr::one(); + for f in v.iter().filter(|f| !f.is_zero()) { + tmp *= *f; + prod.push(tmp); + } + + tmp = tmp.inverse().unwrap(); + + tmp *= *coeff; + + for (f, s) in v + .iter_mut() + .rev() + .filter(|f| !f.is_zero()) + .zip(prod.into_iter().rev().skip(1).chain(Some(Fr::one()))) + { + let new_tmp = tmp * *f; + *f = tmp * s; + tmp = new_tmp; + } +} diff --git a/crates/verifier/src/tests.rs b/crates/verifier/src/tests.rs new file mode 100644 index 0000000000..7048c3c8e8 --- /dev/null +++ b/crates/verifier/src/tests.rs @@ -0,0 +1,62 @@ +use sp1_sdk::{install::try_install_circuit_artifacts, SP1ProofWithPublicValues}; + +extern crate std; + +#[test] +fn test_verify_groth16() { + // Location of the serialized SP1ProofWithPublicValues. See README.md for more information. + let proof_file = "test_binaries/fibonacci-groth16.bin"; + + // Load the saved proof and extract the proof and public inputs. + let sp1_proof_with_public_values = SP1ProofWithPublicValues::load(proof_file).unwrap(); + + let proof = sp1_proof_with_public_values.bytes(); + let public_inputs = sp1_proof_with_public_values.public_values.to_vec(); + + // This vkey hash was derived by calling `vk.bytes32()` on the verifying key. + let vkey_hash = "0x00e60860c07bfc6e4c480286c0ddbb879674eb47f84b4ef041cf858b17aa0ed1"; + + let is_valid = + crate::Groth16Verifier::verify(&proof, &public_inputs, vkey_hash, &crate::GROTH16_VK_BYTES) + .expect("Groth16 proof is invalid"); + + if !is_valid { + panic!("Groth16 proof is invalid"); + } +} + +#[test] +fn test_verify_plonk() { + // Location of the serialized SP1ProofWithPublicValues. See README.md for more information. + let proof_file = "test_binaries/fibonacci-plonk.bin"; + + // Load the saved proof and extract the proof and public inputs. + let sp1_proof_with_public_values = SP1ProofWithPublicValues::load(proof_file).unwrap(); + + let proof = sp1_proof_with_public_values.raw_with_checksum(); + let public_inputs = sp1_proof_with_public_values.public_values.to_vec(); + + // This vkey hash was derived by calling `vk.bytes32()` on the verifying key. + let vkey_hash = "0x00e60860c07bfc6e4c480286c0ddbb879674eb47f84b4ef041cf858b17aa0ed1"; + + let is_valid = + crate::PlonkVerifier::verify(&proof, &public_inputs, vkey_hash, &crate::PLONK_VK_BYTES) + .expect("Plonk proof is invalid"); + + if !is_valid { + panic!("Plonk proof is invalid"); + } +} + +#[test] +fn test_vkeys() { + let groth16_path = try_install_circuit_artifacts("groth16"); + let s3_vkey_path = groth16_path.join("groth16_vk.bin"); + let s3_vkey_bytes = std::fs::read(s3_vkey_path).unwrap(); + assert_eq!(s3_vkey_bytes, *crate::GROTH16_VK_BYTES); + + let plonk_path = try_install_circuit_artifacts("plonk"); + let s3_vkey_path = plonk_path.join("plonk_vk.bin"); + let s3_vkey_bytes = std::fs::read(s3_vkey_path).unwrap(); + assert_eq!(s3_vkey_bytes, *crate::PLONK_VK_BYTES); +} diff --git a/crates/verifier/src/utils.rs b/crates/verifier/src/utils.rs new file mode 100644 index 0000000000..7c2472374f --- /dev/null +++ b/crates/verifier/src/utils.rs @@ -0,0 +1,29 @@ +use bn::Fr; +use sha2::{Digest, Sha256}; + +use crate::error::Error; + +/// Hashes the public inputs in the same format as the Plonk and Groth16 verifiers. +pub fn hash_public_inputs(public_inputs: &[u8]) -> [u8; 32] { + let mut result = Sha256::digest(public_inputs); + + // The Plonk and Groth16 verifiers operate over a 254 bit field, so we need to zero + // out the first 3 bits. The same logic happens in the SP1 Ethereum verifier contract. + result[0] &= 0x1F; + + result.into() +} + +/// Formats the sp1 vkey hash and public inputs for use in either the Plonk or Groth16 verifier. +pub fn bn254_public_values(sp1_vkey_hash: &[u8; 32], sp1_public_inputs: &[u8]) -> [Fr; 2] { + let committed_values_digest = hash_public_inputs(sp1_public_inputs); + let vkey_hash = Fr::from_slice(&sp1_vkey_hash[1..]).unwrap(); + let committed_values_digest = Fr::from_slice(&committed_values_digest).unwrap(); + [vkey_hash, committed_values_digest] +} + +/// Decodes the sp1 vkey hash from the string from a call to `vk.bytes32`. +pub fn decode_sp1_vkey_hash(sp1_vkey_hash: &str) -> Result<[u8; 32], Error> { + let bytes = hex::decode(&sp1_vkey_hash[2..]).map_err(|_| Error::InvalidProgramVkeyHash)?; + bytes.try_into().map_err(|_| Error::InvalidProgramVkeyHash) +} diff --git a/crates/verifier/test_binaries/fibonacci-groth16.bin b/crates/verifier/test_binaries/fibonacci-groth16.bin new file mode 100644 index 0000000000..72c58644c3 Binary files /dev/null and b/crates/verifier/test_binaries/fibonacci-groth16.bin differ diff --git a/crates/verifier/test_binaries/fibonacci-plonk.bin b/crates/verifier/test_binaries/fibonacci-plonk.bin new file mode 100644 index 0000000000..303c9ff278 Binary files /dev/null and b/crates/verifier/test_binaries/fibonacci-plonk.bin differ diff --git a/crates/zkvm/entrypoint/src/memcpy.s b/crates/zkvm/entrypoint/src/memcpy.s index 1735cae5c7..bbf5f1cd73 100644 --- a/crates/zkvm/entrypoint/src/memcpy.s +++ b/crates/zkvm/entrypoint/src/memcpy.s @@ -173,7 +173,7 @@ // All other files which have no copyright comments are original works // produced specifically for use as part of this library, written either // by Rich Felker, the main author of the library, or by one or more -// contibutors listed above. Details on authorship of individual files +// contributors listed above. Details on authorship of individual files // can be found in the git version control history of the project. The // omission of copyright and license comments in each file is in the // interest of source tree size. diff --git a/crates/zkvm/entrypoint/src/memset.s b/crates/zkvm/entrypoint/src/memset.s index a19a11da89..7415aea300 100644 --- a/crates/zkvm/entrypoint/src/memset.s +++ b/crates/zkvm/entrypoint/src/memset.s @@ -173,7 +173,7 @@ // All other files which have no copyright comments are original works // produced specifically for use as part of this library, written either // by Rich Felker, the main author of the library, or by one or more -// contibutors listed above. Details on authorship of individual files +// contributors listed above. Details on authorship of individual files // can be found in the git version control history of the project. The // omission of copyright and license comments in each file is in the // interest of source tree size. diff --git a/examples/Cargo.lock b/examples/Cargo.lock new file mode 100644 index 0000000000..663d53235f --- /dev/null +++ b/examples/Cargo.lock @@ -0,0 +1,7484 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addchain" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" +dependencies = [ + "num-bigint 0.3.3", + "num-integer", + "num-traits", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "aggregation-program" +version = "1.1.0" +dependencies = [ + "sha2 0.10.8", + "sp1-zkvm", +] + +[[package]] +name = "aggregation-script" +version = "1.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", + "tracing", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "alloy-chains" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836cf02383d9ebb35502d379bcd1ae803155094077eaab9c29131d888cd5fa3e" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "num_enum 0.7.3", + "serde", + "strum", +] + +[[package]] +name = "alloy-consensus" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-serde 0.3.6", + "c-kzg", + "serde", +] + +[[package]] +name = "alloy-consensus" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed961a48297c732a5d97ee321aa8bb5009ecadbcb077d8bec90cb54e651629" +dependencies = [ + "alloy-eips 0.5.4", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-serde 0.5.4", + "auto_impl", + "c-kzg", + "derive_more 1.0.0", + "serde", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "k256", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ffc577390ce50234e02d841214b3dc0bea6aaaae8e04bbf3cb82e9a45da9eb" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "derive_more 1.0.0", + "serde", +] + +[[package]] +name = "alloy-eips" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702 0.1.1", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-serde 0.3.6", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-eips" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b69e06cf9c37be824b9d26d6d101114fdde6af0c87de2828b414c05c4b3daa71" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702 0.3.2", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-serde 0.5.4", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-genesis" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-serde 0.3.6", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31a0f0d51db8a1a30a4d98a9f90e090a94c8f44cb4d9eafc7e03aa6d00aae984" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af5979e0d5a7bf9c7eb79749121e8256e59021af611322aee56e77e20776b4b3" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "204237129086ce5dc17a58025e93739b01b45313841f98fa339eb1d780511e57" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-json-rpc", + "alloy-network-primitives 0.5.4", + "alloy-primitives 0.8.10", + "alloy-rpc-types-eth 0.5.4", + "alloy-serde 0.5.4", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-primitives 0.8.10", + "alloy-serde 0.3.6", + "serde", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514f70ee2a953db21631cd817b13a1571474ec77ddc03d47616d5e8203489fde" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-primitives 0.8.10", + "alloy-serde 0.5.4", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "600d34d8de81e23b6d909c094e23b3d357e01ca36b78a8c5424c501eedbe86f0" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 0.99.18", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8edae627382349b56cd6a7a2106f4fd69b243a9233e560c55c2e03cabb7e1d3c" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 1.0.0", + "foldhash", + "getrandom", + "hashbrown 0.15.1", + "hex-literal", + "indexmap 2.6.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash 2.0.0", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.6", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" +dependencies = [ + "alloy-rpc-types-eth 0.3.6", + "alloy-serde 0.3.6", + "serde", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-network-primitives 0.3.6", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-serde 0.3.6", + "alloy-sol-types", + "cfg-if", + "derive_more 1.0.0", + "hashbrown 0.14.5", + "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b034779a4850b4b03f5be5ea674a1cf7d746b2da762b34d1860ab45e48ca27" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-eips 0.5.4", + "alloy-network-primitives 0.5.4", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-serde 0.5.4", + "alloy-sol-types", + "derive_more 1.0.0", + "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" +dependencies = [ + "alloy-primitives 0.8.10", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "028e72eaa9703e4882344983cfe7636ce06d8cce104a78ea62fd19b46659efc4" +dependencies = [ + "alloy-primitives 0.8.10", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "592c185d7100258c041afac51877660c7bf6213447999787197db4842f0e938e" +dependencies = [ + "alloy-primitives 0.8.10", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6614f02fc1d5b079b2a4a5320018317b506fd0a6d67c1fd5542a71201724986c" +dependencies = [ + "alloy-consensus 0.5.4", + "alloy-network", + "alloy-primitives 0.8.10", + "alloy-signer", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841eabaa4710f719fddbc24c95d386eae313f07e6da4babc25830ee37945be0c" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6672337f19d837b9f7073c45853aeb528ed9f7dd6a4154ce683e9e5cb7794014" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck", + "indexmap 2.6.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.87", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dff37dd20bfb118b777c96eda83b2067f4226d2644c5cfa00187b3bc01770ba" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro2", + "quote", + "syn 2.0.87", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b853d42292dbb159671a3edae3b2750277ff130f32b726fe07dc2b17aa6f2b5" +dependencies = [ + "serde", + "winnow 0.6.20", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa828bb1b9a6dc52208fbb18084fb9ce2c30facc2bfda6a5d922349b4990354f" +dependencies = [ + "alloy-json-abi", + "alloy-primitives 0.8.10", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-trie" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a46c9c4fdccda7982e7928904bd85fe235a0404ee3d7e197fff13d61eac8b4f" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "derive_more 1.0.0", + "hashbrown 0.14.5", + "nybbles", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +dependencies = [ + "anstyle", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "aurora-engine-modexp" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aef7712851e524f35fbbb74fa6599c5cd8692056a1c36f9ca0d2001b670e7e5" +dependencies = [ + "hex", + "num", +] + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "axum" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.1", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "serde", + "windows-targets 0.52.6", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.87", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "serde", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec 0.7.6", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "bls12381-program" +version = "1.1.0" +dependencies = [ + "bls12_381 0.8.0", + "ff 0.13.0", + "group 0.13.0", + "rand 0.8.5", + "sp1-zkvm", +] + +[[package]] +name = "bls12381-script" +version = "0.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "bls12_381" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" +dependencies = [ + "ff 0.12.1", + "group 0.12.1", + "pairing 0.22.0", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "bls12_381" +version = "0.8.0" +source = "git+https://github.com/sp1-patches/bls12_381?tag=bls12_381-v0.8.0-patch-v1#444e109287eb3adc581425e160ed6041622dda35" +dependencies = [ + "cfg-if", + "ff 0.13.0", + "group 0.13.0", + "pairing 0.23.0", + "rand_core 0.6.4", + "sp1-lib 3.1.0", + "subtle", +] + +[[package]] +name = "blst" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bn254-program" +version = "1.1.0" +dependencies = [ + "rand 0.8.5", + "sp1-zkvm", + "substrate-bn 0.6.0 (git+https://github.com/sp1-patches/bn?tag=substrate_bn-v0.6.0-patch-v1)", +] + +[[package]] +name = "bn254-script" +version = "0.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "bytemuck" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chess" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ed299b171ec34f372945ad6726f7bc1d2afd5f59fb8380f64f48e2bab2f0ec8" +dependencies = [ + "arrayvec 0.5.2", + "failure", + "nodrop", + "rand 0.7.3", +] + +[[package]] +name = "chess-program" +version = "1.1.0" +dependencies = [ + "chess", + "sp1-zkvm", +] + +[[package]] +name = "chess-script" +version = "1.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets 0.52.6", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "clap_lex" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + +[[package]] +name = "const-hex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + +[[package]] +name = "ctrlc" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" +dependencies = [ + "nix", + "windows-sys 0.59.0", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "git+https://github.com/sp1-patches/curve25519-dalek?tag=curve25519_dalek-v4.1.3-patch-v1#dbdd0ffeea0ff767affc3f6765d1edbdaa9e2cb9" +dependencies = [ + "anyhow", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version 0.4.1", + "sp1-lib 3.1.0", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "git+https://github.com/sp1-patches/curve25519-dalek?tag=curve25519_dalek-v4.1.3-patch-v1#dbdd0ffeea0ff767affc3f6765d1edbdaa9e2cb9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "git+https://github.com/sp1-patches/curve25519-dalek-ng?tag=curve25519_dalek_ng-v4.1.1-patch-v1#3fb3e7f6047ddeef0f0c9212f4604bd30d64bd28" +dependencies = [ + "anyhow", + "byteorder", + "cfg-if", + "digest 0.9.0", + "rand_core 0.6.4", + "sp1-lib 3.1.0", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "git+https://github.com/sp1-patches/curve25519-dalek-ng?branch=patch-v4.1.1#3fb3e7f6047ddeef0f0c9212f4604bd30d64bd28" +dependencies = [ + "anyhow", + "byteorder", + "cfg-if", + "digest 0.9.0", + "rand_core 0.6.4", + "sp1-lib 3.1.0", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "cycle-tracking-program" +version = "1.1.0" +dependencies = [ + "sp1-derive", + "sp1-zkvm", +] + +[[package]] +name = "cycle-tracking-script" +version = "1.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.87", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "dashu" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b3e5ac1e23ff1995ef05b912e2b012a8784506987a2651552db2c73fb3d7e0" +dependencies = [ + "dashu-base", + "dashu-float", + "dashu-int", + "dashu-macros", + "dashu-ratio", + "rustversion", +] + +[[package]] +name = "dashu-base" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b80bf6b85aa68c58ffea2ddb040109943049ce3fbdf4385d0380aef08ef289" + +[[package]] +name = "dashu-float" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85078445a8dbd2e1bd21f04a816f352db8d333643f0c9b78ca7c3d1df71063e7" +dependencies = [ + "dashu-base", + "dashu-int", + "num-modular", + "num-order", + "rustversion", + "static_assertions", +] + +[[package]] +name = "dashu-int" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee99d08031ca34a4d044efbbb21dff9b8c54bb9d8c82a189187c0651ffdb9fbf" +dependencies = [ + "cfg-if", + "dashu-base", + "num-modular", + "num-order", + "rustversion", + "static_assertions", +] + +[[package]] +name = "dashu-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93381c3ef6366766f6e9ed9cf09e4ef9dec69499baf04f0c60e70d653cf0ab10" +dependencies = [ + "dashu-base", + "dashu-float", + "dashu-int", + "dashu-ratio", + "paste", + "proc-macro2", + "quote", + "rustversion", +] + +[[package]] +name = "dashu-ratio" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e33b04dd7ce1ccf8a02a69d3419e354f2bbfdf4eb911a0b7465487248764c9" +dependencies = [ + "dashu-base", + "dashu-float", + "dashu-int", + "num-modular", + "num-order", + "rustversion", +] + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid 0.7.1", + "crypto-bigint 0.3.2", + "pem-rfc7468 0.3.1", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid 0.9.6", + "pem-rfc7468 0.7.0", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +dependencies = [ + "convert_case 0.4.0", + "proc-macro2", + "quote", + "rustc_version 0.4.1", + "syn 2.0.87", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "convert_case 0.6.0", + "proc-macro2", + "quote", + "syn 2.0.87", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.9", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki 0.7.3", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "git+https://github.com/sp1-patches/signatures?branch=patch-ecdsa-v0.16.9#475daa8834035cc170a567e7656329ab8de8cc44" +dependencies = [ + "anyhow", + "cfg-if", + "digest 0.10.7", + "elliptic-curve", + "hex-literal", + "signature", + "sp1-lib 3.1.0", + "spki 0.7.3", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature", +] + +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "git+https://github.com/sp1-patches/ed25519-consensus?tag=ed25519_consensus-v2.1.0-patch-v1#2b2c4b43344bc4daf5b1326f367f2d9d661eeabb" +dependencies = [ + "curve25519-dalek-ng 4.1.1 (git+https://github.com/sp1-patches/curve25519-dalek-ng?branch=patch-v4.1.1)", + "hex", + "rand_core 0.6.4", + "serde", + "sha2 0.9.9", + "thiserror", + "zeroize", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elf" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint 0.5.5", + "digest 0.10.7", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "enr" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "972070166c68827e64bd1ebc8159dd8e32d9bc2da7ebe8f20b61308f7974ad30" +dependencies = [ + "alloy-rlp", + "base64 0.21.7", + "bytes", + "hex", + "log", + "rand 0.8.5", + "sha3", + "zeroize", +] + +[[package]] +name = "enum-map" +version = "2.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" +dependencies = [ + "enum-map-derive", + "serde", +] + +[[package]] +name = "enum-map-derive" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "enumn" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure 0.12.6", +] + +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "bitvec", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "bitvec", + "byteorder", + "ff_derive", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "ff_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" +dependencies = [ + "addchain", + "cfg-if", + "num-bigint 0.3.3", + "num-integer", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "fibonacci-program" +version = "1.1.0" +dependencies = [ + "sp1-zkvm", +] + +[[package]] +name = "fibonacci-script" +version = "1.1.0" +dependencies = [ + "hex", + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "paste", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "generic-array" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" +dependencies = [ + "serde", + "typenum", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "git2" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +dependencies = [ + "bitflags", + "libc", + "libgit2-sys", + "log", + "url", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "groth16-verifier-program" +version = "1.1.0" +dependencies = [ + "sp1-verifier", + "sp1-zkvm", +] + +[[package]] +name = "groth16-verifier-script" +version = "1.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "memuse", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "halo2" +version = "0.1.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a23c779b38253fe1538102da44ad5bd5378495a61d2c4ee18d64eaa61ae5995" +dependencies = [ + "halo2_proofs", +] + +[[package]] +name = "halo2_proofs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e925780549adee8364c7f2b685c753f6f3df23bde520c67416e93bf615933760" +dependencies = [ + "blake2b_simd", + "ff 0.12.1", + "group 0.12.1", + "pasta_curves 0.4.1", + "rand_core 0.6.4", + "rayon", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.1", + "serde", +] + +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-program" +version = "1.1.0" +dependencies = [ + "serde", + "sp1-zkvm", +] + +[[package]] +name = "io-script" +version = "1.1.0" +dependencies = [ + "serde", + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "is-prime-program" +version = "1.1.0" +dependencies = [ + "sp1-zkvm", +] + +[[package]] +name = "is-prime-script" +version = "1.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "json-lib" +version = "1.1.0" +dependencies = [ + "serde", +] + +[[package]] +name = "json-program" +version = "1.1.0" +dependencies = [ + "json-lib", + "serde_json", + "sp1-zkvm", +] + +[[package]] +name = "json-script" +version = "1.1.0" +dependencies = [ + "json-lib", + "serde_json", + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "jubjub" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a575df5f985fe1cd5b2b05664ff6accfc46559032b954529fd225a2168d27b0f" +dependencies = [ + "bitvec", + "bls12_381 0.7.1", + "ff 0.12.1", + "group 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", + "elliptic-curve", + "once_cell", + "sha2 0.10.8", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "kzg-rs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850eb19206463a61bede4f7b7e6b21731807137619044b1f3c287ebcfe2b3b0" +dependencies = [ + "ff 0.13.0", + "hex", + "sha2 0.10.8", + "sp1_bls12_381", + "spin", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.161" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "libgit2-sys" +version = "0.17.0+1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" +dependencies = [ + "cc", + "libc", + "libz-sys", + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags", + "libc", +] + +[[package]] +name = "libz-sys" +version = "1.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.1", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memuse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2145869435ace5ea6ea3d35f59be559317ec9a0d04e1812d5f185a87b6d36f1a" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +dependencies = [ + "hermit-abi", + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint 0.4.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-modular" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bb261bf36fa7d83f4c294f834e91256769097b3cb505d44831e0a179ac647f" + +[[package]] +name = "num-order" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537b596b97c40fcf8056d153049eb22f481c17ebce72a513ec9286e4986d1bb6" +dependencies = [ + "num-modular", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint 0.4.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive 0.7.3", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "nybbles" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95f06be0417d97f81fe4e5c86d7d01b392655a9cac9c19a848aa033e18937b23" +dependencies = [ + "alloy-rlp", + "const-hex", + "proptest", + "serde", + "smallvec", +] + +[[package]] +name = "object" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "op-alloy-consensus" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21aad1fbf80d2bcd7406880efc7ba109365f44bbb72896758ddcbfa46bf1592c" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-serde 0.3.6", + "derive_more 1.0.0", + "serde", + "spin", +] + +[[package]] +name = "op-alloy-rpc-types" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e281fbfc2198b7c0c16457d6524f83d192662bc9f3df70f24c3038d4521616df" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-network-primitives 0.3.6", + "alloy-primitives 0.8.10", + "alloy-rpc-types-eth 0.3.6", + "alloy-serde 0.3.6", + "cfg-if", + "hashbrown 0.14.5", + "op-alloy-consensus", + "serde", + "serde_json", +] + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] + +[[package]] +name = "p3-air" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "p3-field", + "p3-matrix", +] + +[[package]] +name = "p3-baby-bear" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "num-bigint 0.4.6", + "p3-field", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "p3-bn254-fr" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "ff 0.13.0", + "num-bigint 0.4.6", + "p3-field", + "p3-poseidon2", + "p3-symmetric", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "p3-challenger" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "p3-field", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-commit" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "itertools 0.12.1", + "p3-challenger", + "p3-field", + "p3-matrix", + "p3-util", + "serde", +] + +[[package]] +name = "p3-dft" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "itertools 0.12.1", + "num-bigint 0.4.6", + "num-traits", + "p3-util", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "p3-fri" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "itertools 0.12.1", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-interpolation", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-interpolation" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-util", +] + +[[package]] +name = "p3-keccak-air" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "p3-air", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-matrix" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand 0.8.5", + "serde", + "tracing", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "rayon", +] + +[[package]] +name = "p3-mds" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "itertools 0.12.1", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-symmetric", + "p3-util", + "rand 0.8.5", +] + +[[package]] +name = "p3-merkle-tree" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "itertools 0.12.1", + "p3-commit", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-poseidon2" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "gcd", + "p3-field", + "p3-mds", + "p3-symmetric", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "p3-symmetric" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "serde", +] + +[[package]] +name = "p3-uni-stark" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "itertools 0.12.1", + "p3-air", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "serde", + "tracing", +] + +[[package]] +name = "p3-util" +version = "0.1.0" +source = "git+https://github.com/Plonky3/Plonky3?branch=sp1-v4#db3d45d4ec899efaf8f7234a8573f285fbdda5db" +dependencies = [ + "serde", +] + +[[package]] +name = "pairing" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" +dependencies = [ + "group 0.12.1", +] + +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group 0.13.0", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec 0.7.6", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "pasta_curves" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc65faf8e7313b4b1fbaa9f7ca917a0eed499a9663be71477f87993604341d8" +dependencies = [ + "blake2b_simd", + "ff 0.12.1", + "group 0.12.1", + "lazy_static", + "rand 0.8.5", + "static_assertions", + "subtle", +] + +[[package]] +name = "pasta_curves" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" +dependencies = [ + "blake2b_simd", + "ff 0.13.0", + "group 0.13.0", + "lazy_static", + "rand 0.8.5", + "static_assertions", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "patch-testing-program" +version = "1.1.0" +dependencies = [ + "alloy-primitives 0.8.10", + "curve25519-dalek", + "curve25519-dalek-ng 4.1.1 (git+https://github.com/sp1-patches/curve25519-dalek-ng?tag=curve25519_dalek_ng-v4.1.1-patch-v1)", + "ed25519-consensus", + "ed25519-dalek", + "revm-precompile", + "secp256k1", + "sha2 0.10.8", + "sha2 0.9.9", + "sp1-zkvm", + "tiny-keccak", +] + +[[package]] +name = "patch-testing-script" +version = "1.1.0" +dependencies = [ + "sp1-build", + "sp1-core-executor", + "sp1-sdk", +] + +[[package]] +name = "pem-rfc7468" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01de5d978f34aa4b2296576379fcc416034702fd94117c56ffd8a1a767cefb30" +dependencies = [ + "base64ct", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a78f66c04ccc83dd4486fd46c33896f4e17b24a7a3a6400dedc48ed0ddd72320" +dependencies = [ + "der 0.5.1", + "pkcs8 0.8.0", + "zeroize", +] + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der 0.7.9", + "pkcs8 0.10.2", + "spki 0.7.3", +] + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der 0.5.1", + "spki 0.5.4", + "zeroize", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.9", + "spki 0.7.3", +] + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.87", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit 0.22.22", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "proc-macro2" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive 0.12.6", +] + +[[package]] +name = "prost" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +dependencies = [ + "bytes", + "prost-derive 0.13.3", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "prost-derive" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "prost-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +dependencies = [ + "prost 0.12.6", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.0.0", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring", + "rustc-hash 2.0.0", + "rustls", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e346e016eacfff12233c243718197ca12f148c84e1e84268a896699b41c71780" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rayon-scan" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f87cc11a0140b4b0da0ffc889885760c61b13672d80a908920b2c0df078fa14" +dependencies = [ + "rayon", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-program" +version = "1.1.0" +dependencies = [ + "regex", + "sp1-zkvm", +] + +[[package]] +name = "regex-script" +version = "1.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.12.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pemfile", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", + "windows-registry", +] + +[[package]] +name = "reqwest-middleware" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" +dependencies = [ + "anyhow", + "async-trait", + "http", + "reqwest", + "serde", + "thiserror", + "tower-service", +] + +[[package]] +name = "reth-blockchain-tree-api" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-consensus", + "reth-execution-errors", + "reth-primitives", + "reth-storage-errors", + "thiserror", +] + +[[package]] +name = "reth-chainspec" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-chains", + "alloy-eips 0.3.6", + "alloy-genesis", + "alloy-primitives 0.8.10", + "alloy-trie", + "auto_impl", + "derive_more 1.0.0", + "once_cell", + "op-alloy-rpc-types", + "reth-ethereum-forks", + "reth-network-peers", + "reth-primitives-traits", + "reth-trie-common", + "serde", + "serde_json", +] + +[[package]] +name = "reth-codecs" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-genesis", + "alloy-primitives 0.8.10", + "alloy-trie", + "bytes", + "modular-bitfield", + "reth-codecs-derive", + "serde", +] + +[[package]] +name = "reth-codecs-derive" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "convert_case 0.6.0", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "reth-consensus" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "auto_impl", + "derive_more 1.0.0", + "reth-primitives", +] + +[[package]] +name = "reth-consensus-common" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-consensus", + "reth-primitives", +] + +[[package]] +name = "reth-db-models" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "bytes", + "modular-bitfield", + "reth-codecs", + "reth-primitives", + "serde", +] + +[[package]] +name = "reth-errors" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-blockchain-tree-api", + "reth-consensus", + "reth-execution-errors", + "reth-fs-util", + "reth-storage-errors", + "thiserror", +] + +[[package]] +name = "reth-ethereum-consensus" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-primitives", + "tracing", +] + +[[package]] +name = "reth-ethereum-forks" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-chains", + "alloy-primitives 0.8.10", + "alloy-rlp", + "auto_impl", + "crc", + "dyn-clone", + "once_cell", + "rustc-hash 2.0.0", + "serde", + "thiserror-no-std", +] + +[[package]] +name = "reth-evm" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-eips 0.3.6", + "auto_impl", + "futures-util", + "reth-chainspec", + "reth-execution-errors", + "reth-execution-types", + "reth-primitives", + "reth-prune-types", + "reth-storage-errors", + "revm", + "revm-primitives", +] + +[[package]] +name = "reth-evm-ethereum" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-sol-types", + "reth-chainspec", + "reth-ethereum-consensus", + "reth-ethereum-forks", + "reth-evm", + "reth-execution-types", + "reth-primitives", + "reth-prune-types", + "reth-revm", + "revm-primitives", +] + +[[package]] +name = "reth-evm-optimism" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-ethereum-forks", + "reth-evm", + "reth-execution-errors", + "reth-execution-types", + "reth-optimism-consensus", + "reth-primitives", + "reth-prune-types", + "reth-revm", + "revm", + "revm-primitives", + "thiserror", + "tracing", +] + +[[package]] +name = "reth-execution-errors" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-primitives 0.8.10", + "alloy-rlp", + "derive_more 1.0.0", + "nybbles", + "reth-consensus", + "reth-prune-types", + "reth-storage-errors", + "revm-primitives", +] + +[[package]] +name = "reth-execution-types" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-execution-errors", + "reth-primitives", + "reth-trie", + "revm", +] + +[[package]] +name = "reth-fs-util" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "reth-network-peers" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "enr", + "serde_with", + "thiserror", + "url", +] + +[[package]] +name = "reth-optimism-chainspec" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-chains", + "alloy-primitives 0.8.10", + "derive_more 1.0.0", + "once_cell", + "reth-chainspec", + "reth-ethereum-forks", + "reth-primitives-traits", + "serde_json", +] + +[[package]] +name = "reth-optimism-consensus" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-primitives", + "tracing", +] + +[[package]] +name = "reth-primitives" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-genesis", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-rpc-types", + "alloy-serde 0.3.6", + "bytes", + "derive_more 1.0.0", + "k256", + "once_cell", + "op-alloy-rpc-types", + "rayon", + "reth-chainspec", + "reth-ethereum-forks", + "reth-optimism-chainspec", + "reth-primitives-traits", + "reth-static-file-types", + "reth-trie-common", + "revm-primitives", + "serde", + "thiserror", +] + +[[package]] +name = "reth-primitives-traits" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-genesis", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-rpc-types-eth 0.3.6", + "byteorder", + "bytes", + "derive_more 1.0.0", + "modular-bitfield", + "reth-codecs", + "revm-primitives", + "roaring", + "serde", +] + +[[package]] +name = "reth-prune-types" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-primitives 0.8.10", + "bytes", + "derive_more 1.0.0", + "modular-bitfield", + "reth-codecs", + "serde", + "thiserror", +] + +[[package]] +name = "reth-revm" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "reth-chainspec", + "reth-consensus-common", + "reth-execution-errors", + "reth-primitives", + "reth-prune-types", + "reth-storage-api", + "reth-storage-errors", + "revm", +] + +[[package]] +name = "reth-stages-types" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-primitives 0.8.10", + "bytes", + "modular-bitfield", + "reth-codecs", + "reth-trie-common", + "serde", +] + +[[package]] +name = "reth-static-file-types" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-primitives 0.8.10", + "derive_more 1.0.0", + "serde", + "strum", +] + +[[package]] +name = "reth-storage-api" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "auto_impl", + "reth-chainspec", + "reth-db-models", + "reth-execution-types", + "reth-primitives", + "reth-prune-types", + "reth-stages-types", + "reth-storage-errors", + "reth-trie", +] + +[[package]] +name = "reth-storage-errors" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-rlp", + "derive_more 1.0.0", + "reth-fs-util", + "reth-primitives", +] + +[[package]] +name = "reth-trie" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-rlp", + "auto_impl", + "derive_more 1.0.0", + "itertools 0.13.0", + "rayon", + "reth-execution-errors", + "reth-primitives", + "reth-stages-types", + "reth-storage-errors", + "reth-trie-common", + "revm", + "tracing", +] + +[[package]] +name = "reth-trie-common" +version = "1.0.6" +source = "git+https://github.com/sp1-patches/reth?tag=rsp-20240830#260c7ed2c9374182a43a3602aaa953d37aa9217b" +dependencies = [ + "alloy-consensus 0.3.6", + "alloy-genesis", + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-trie", + "bytes", + "derive_more 1.0.0", + "itertools 0.13.0", + "nybbles", + "reth-codecs", + "reth-primitives-traits", + "revm-primitives", + "serde", +] + +[[package]] +name = "revm" +version = "14.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f719e28cc6fdd086f8bc481429e587740d20ad89729cec3f5f5dd7b655474df" +dependencies = [ + "auto_impl", + "cfg-if", + "dyn-clone", + "revm-interpreter", + "revm-precompile", + "serde", + "serde_json", +] + +[[package]] +name = "revm-interpreter" +version = "10.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "959ecbc36802de6126852479844737f20194cf8e6718e0c30697d306a2cca916" +dependencies = [ + "revm-primitives", + "serde", +] + +[[package]] +name = "revm-precompile" +version = "11.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e25f604cb9db593ca3013be8c00f310d6790ccb1b7d8fbbdd4660ec8888043a" +dependencies = [ + "aurora-engine-modexp", + "c-kzg", + "cfg-if", + "k256", + "kzg-rs", + "once_cell", + "p256", + "revm-primitives", + "ripemd", + "secp256k1", + "sha2 0.10.8", + "substrate-bn 0.6.0 (git+https://github.com/sp1-patches/bn?tag=substrate_bn-v0.6.0-patch-v1)", +] + +[[package]] +name = "revm-primitives" +version = "9.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a6bff9dbde3370a5ac9555104117f7e6039b3cc76e8d5d9d01899088beca2a" +dependencies = [ + "alloy-eips 0.3.6", + "alloy-primitives 0.8.10", + "auto_impl", + "bitflags", + "bitvec", + "c-kzg", + "cfg-if", + "dyn-clone", + "enumn", + "hashbrown 0.14.5", + "hex", + "kzg-rs", + "serde", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "roaring" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4b84ba6e838ceb47b41de5194a60244fac43d9fe03b71dbe8c5a201081d6d1" +dependencies = [ + "bytemuck", + "byteorder", +] + +[[package]] +name = "rrs-succinct" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3372685893a9f67d18e98e792d690017287fd17379a83d798d958e517d380fa9" +dependencies = [ + "downcast-rs", + "num_enum 0.5.11", + "paste", +] + +[[package]] +name = "rsa" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf22754c49613d2b3b119f0e5d46e34a2c628a937e3024b8762de4e7d8c710b" +dependencies = [ + "byteorder", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-iter", + "num-traits", + "pkcs1 0.3.3", + "pkcs8 0.8.0", + "rand_core 0.6.4", + "smallvec", + "subtle", + "zeroize", +] + +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid 0.9.6", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1 0.7.5", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "signature", + "spki 0.7.3", + "subtle", + "zeroize", +] + +[[package]] +name = "rsa-program" +version = "1.1.0" +dependencies = [ + "rsa 0.9.6", + "sha2 0.10.8", + "sp1-zkvm", +] + +[[package]] +name = "rsa-script" +version = "1.1.0" +dependencies = [ + "rsa 0.6.1", + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "rsp-client-executor" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp/?rev=3647076#3647076da6580e30384dd911a3fc50d4bcdb5bc1" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "eyre", + "futures", + "itertools 0.13.0", + "reth-chainspec", + "reth-errors", + "reth-ethereum-consensus", + "reth-evm", + "reth-evm-ethereum", + "reth-evm-optimism", + "reth-execution-types", + "reth-optimism-consensus", + "reth-primitives", + "reth-revm", + "reth-storage-errors", + "reth-trie", + "revm", + "revm-primitives", + "rsp-mpt", + "rsp-primitives", + "rsp-witness-db", + "serde", + "serde_json", + "tokio", + "url", +] + +[[package]] +name = "rsp-mpt" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp/?rev=3647076#3647076da6580e30384dd911a3fc50d4bcdb5bc1" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "alloy-rpc-types", + "anyhow", + "eyre", + "itertools 0.13.0", + "reth-execution-types", + "reth-primitives", + "reth-trie", + "revm", + "revm-primitives", + "rlp", + "rsp-primitives", + "serde", + "thiserror", +] + +[[package]] +name = "rsp-primitives" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp/?rev=3647076#3647076da6580e30384dd911a3fc50d4bcdb5bc1" +dependencies = [ + "alloy-rpc-types", + "eyre", + "reth-chainspec", + "reth-optimism-chainspec", + "reth-primitives", + "reth-revm", + "reth-trie", + "revm-interpreter", + "revm-precompile", + "revm-primitives", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "rsp-program" +version = "1.1.0" +dependencies = [ + "bincode", + "rsp-client-executor", + "sp1-zkvm", +] + +[[package]] +name = "rsp-script" +version = "0.1.0" +dependencies = [ + "alloy-primitives 0.8.10", + "bincode", + "clap", + "rsp-client-executor", + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "rsp-witness-db" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/rsp/?rev=3647076#3647076da6580e30384dd911a3fc50d4bcdb5bc1" +dependencies = [ + "reth-primitives", + "reth-storage-errors", + "revm-primitives", + "rsp-primitives", + "serde", +] + +[[package]] +name = "ruint" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint 0.4.6", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +dependencies = [ + "rand 0.8.5", +] + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.23", +] + +[[package]] +name = "rustix" +version = "0.38.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "scale-info" +version = "2.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa7ffc1c0ef49b0452c6e2986abf2b07743320641ffd5fc63d552458e3b779b" +dependencies = [ + "cfg-if", + "derive_more 1.0.0", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46385cc24172cf615450267463f937c10072516359b3ff1cb24228a4a08bf951" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "scc" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d25269dd3a12467afe2e510f69fb0b46b698e5afb296b59f2145259deaf8e8" +dependencies = [ + "sdd", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sdd" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der 0.7.9", + "generic-array 0.14.7", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.29.0" +source = "git+https://github.com/sp1-patches/rust-secp256k1?tag=secp256k1-v0.29.0-patch-v1#c78195abe3c5bc11163d69588a5559ef21bdff31" +dependencies = [ + "cfg-if", + "ecdsa 0.16.9 (git+https://github.com/sp1-patches/signatures?branch=patch-ecdsa-v0.16.9)", + "elliptic-curve", + "k256", + "rand 0.8.5", + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.0" +source = "git+https://github.com/sp1-patches/rust-secp256k1?tag=secp256k1-v0.29.0-patch-v1#c78195abe3c5bc11163d69588a5559ef21bdff31" +dependencies = [ + "cc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.214" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.214" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "serde_json" +version = "1.0.132" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +dependencies = [ + "indexmap 2.6.0", + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.6.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "serial_test" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +dependencies = [ + "futures", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "sha2" +version = "0.9.8" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes.git?branch=patch-v0.9.8#afdbfb09c325f8a69c01d540ec9a261e3637725d" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=sha2-v0.9.9-patch-v1#db82a4848f8d033eab544255e1efa036cc06f054" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=sha2-v0.10.8-patch-v1#1f224388fdede7cef649bce0d63876d1a9e3f515" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "size" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fed904c7fb2856d868b92464fc8fa597fce366edea1a9cbfaa8cb5fe080bd6d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "sp1-build" +version = "3.0.0" +dependencies = [ + "anyhow", + "cargo_metadata", + "chrono", + "clap", + "dirs", +] + +[[package]] +name = "sp1-core-executor" +version = "3.0.0" +dependencies = [ + "bincode", + "bytemuck", + "elf", + "enum-map", + "eyre", + "hashbrown 0.14.5", + "hex", + "itertools 0.13.0", + "log", + "nohash-hasher", + "num", + "p3-field", + "p3-maybe-rayon", + "rand 0.8.5", + "rrs-succinct", + "serde", + "sp1-curves", + "sp1-primitives", + "sp1-stark", + "strum", + "strum_macros", + "thiserror", + "tiny-keccak", + "tracing", + "typenum", + "vec_map", +] + +[[package]] +name = "sp1-core-machine" +version = "3.0.0" +dependencies = [ + "bincode", + "cfg-if", + "elliptic-curve", + "generic-array 1.1.0", + "hashbrown 0.14.5", + "hex", + "itertools 0.13.0", + "k256", + "log", + "num", + "num_cpus", + "p3-air", + "p3-baby-bear", + "p3-challenger", + "p3-field", + "p3-keccak-air", + "p3-matrix", + "p3-maybe-rayon", + "p3-uni-stark", + "p3-util", + "rand 0.8.5", + "serde", + "size", + "snowbridge-amcl", + "sp1-core-executor", + "sp1-curves", + "sp1-derive", + "sp1-primitives", + "sp1-stark", + "static_assertions", + "strum", + "strum_macros", + "tempfile", + "thiserror", + "tracing", + "tracing-forest", + "tracing-subscriber", + "typenum", + "web-time", +] + +[[package]] +name = "sp1-cuda" +version = "3.0.0" +dependencies = [ + "bincode", + "ctrlc", + "prost 0.13.3", + "serde", + "sp1-core-machine", + "sp1-prover", + "tokio", + "tracing", + "twirp-rs", +] + +[[package]] +name = "sp1-curves" +version = "3.0.0" +dependencies = [ + "cfg-if", + "curve25519-dalek", + "dashu", + "elliptic-curve", + "generic-array 1.1.0", + "itertools 0.13.0", + "k256", + "num", + "p3-field", + "serde", + "snowbridge-amcl", + "sp1-primitives", + "sp1-stark", + "typenum", +] + +[[package]] +name = "sp1-derive" +version = "3.0.0" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp1-lib" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bea7811abd2d3a991007fcb284f41152840b8388c171288d0c52c6793956609c" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "hex", + "serde", + "snowbridge-amcl", +] + +[[package]] +name = "sp1-lib" +version = "3.0.0" +dependencies = [ + "bincode", + "serde", +] + +[[package]] +name = "sp1-lib" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14deb700469a37ec075bcf88dac3815b026dd9c4b9cb175980826f1fbb2e4e80" +dependencies = [ + "bincode", + "serde", +] + +[[package]] +name = "sp1-primitives" +version = "3.0.0" +dependencies = [ + "bincode", + "hex", + "lazy_static", + "num-bigint 0.4.6", + "p3-baby-bear", + "p3-field", + "p3-poseidon2", + "p3-symmetric", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "sp1-prover" +version = "3.0.0" +dependencies = [ + "anyhow", + "bincode", + "clap", + "dirs", + "eyre", + "itertools 0.13.0", + "lru", + "num-bigint 0.4.6", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-field", + "p3-matrix", + "p3-symmetric", + "serde", + "serde_json", + "serial_test", + "sp1-core-executor", + "sp1-core-machine", + "sp1-primitives", + "sp1-recursion-circuit", + "sp1-recursion-compiler", + "sp1-recursion-core", + "sp1-recursion-gnark-ffi", + "sp1-stark", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "sp1-recursion-circuit" +version = "3.0.0" +dependencies = [ + "hashbrown 0.14.5", + "itertools 0.13.0", + "num-traits", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-symmetric", + "p3-util", + "rand 0.8.5", + "rayon", + "serde", + "sp1-core-executor", + "sp1-core-machine", + "sp1-derive", + "sp1-primitives", + "sp1-recursion-compiler", + "sp1-recursion-core", + "sp1-recursion-gnark-ffi", + "sp1-stark", + "tracing", +] + +[[package]] +name = "sp1-recursion-compiler" +version = "3.0.0" +dependencies = [ + "backtrace", + "itertools 0.13.0", + "p3-baby-bear", + "p3-bn254-fr", + "p3-field", + "p3-symmetric", + "serde", + "sp1-core-machine", + "sp1-primitives", + "sp1-recursion-core", + "sp1-recursion-derive", + "sp1-stark", + "tracing", + "vec_map", +] + +[[package]] +name = "sp1-recursion-core" +version = "3.0.0" +dependencies = [ + "backtrace", + "ff 0.13.0", + "hashbrown 0.14.5", + "itertools 0.13.0", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "serde", + "sp1-core-machine", + "sp1-derive", + "sp1-primitives", + "sp1-stark", + "static_assertions", + "thiserror", + "tracing", + "vec_map", + "zkhash", +] + +[[package]] +name = "sp1-recursion-derive" +version = "3.0.0" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp1-recursion-gnark-ffi" +version = "3.0.0" +dependencies = [ + "anyhow", + "bincode", + "bindgen", + "cc", + "cfg-if", + "hex", + "log", + "num-bigint 0.4.6", + "p3-baby-bear", + "p3-field", + "p3-symmetric", + "serde", + "serde_json", + "sha2 0.10.8", + "sp1-core-machine", + "sp1-recursion-compiler", + "sp1-stark", + "tempfile", +] + +[[package]] +name = "sp1-sdk" +version = "3.0.0" +dependencies = [ + "alloy-signer", + "alloy-signer-local", + "alloy-sol-types", + "anyhow", + "async-trait", + "bincode", + "cfg-if", + "dirs", + "futures", + "hashbrown 0.14.5", + "hex", + "indicatif", + "itertools 0.13.0", + "log", + "p3-baby-bear", + "p3-field", + "p3-fri", + "prost 0.13.3", + "reqwest", + "reqwest-middleware", + "serde", + "sp1-core-executor", + "sp1-core-machine", + "sp1-cuda", + "sp1-primitives", + "sp1-prover", + "sp1-stark", + "strum", + "strum_macros", + "tempfile", + "thiserror", + "tokio", + "tracing", + "twirp-rs", + "vergen", +] + +[[package]] +name = "sp1-stark" +version = "3.0.0" +dependencies = [ + "arrayref", + "hashbrown 0.14.5", + "itertools 0.13.0", + "num-traits", + "p3-air", + "p3-baby-bear", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-uni-stark", + "p3-util", + "rayon-scan", + "serde", + "sp1-derive", + "sp1-primitives", + "strum", + "strum_macros", + "sysinfo", + "tracing", +] + +[[package]] +name = "sp1-verifier" +version = "3.0.0" +dependencies = [ + "hex", + "lazy_static", + "sha2 0.10.8", + "substrate-bn 0.6.0 (git+https://github.com/sp1-patches/bn?tag=substrate_bn-v0.6.0-patch-v2)", + "thiserror-no-std", +] + +[[package]] +name = "sp1-zkvm" +version = "3.0.1" +dependencies = [ + "cfg-if", + "getrandom", + "lazy_static", + "libm", + "p3-baby-bear", + "p3-field", + "rand 0.8.5", + "sha2 0.10.8", + "sp1-lib 3.0.0", + "sp1-primitives", +] + +[[package]] +name = "sp1_bls12_381" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a27c4b8901334dc09099dd82f80a72ddfc76b0046f4b342584c808f1931bed5a" +dependencies = [ + "cfg-if", + "ff 0.13.0", + "group 0.13.0", + "pairing 0.23.0", + "rand_core 0.6.4", + "sp1-lib 1.2.0", + "subtle", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der 0.5.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der 0.7.9", +] + +[[package]] +name = "ssz-withdrawals-program" +version = "1.1.0" +dependencies = [ + "alloy-primitives 0.6.4", + "hex", + "hex-literal", + "serde", + "serde_with", + "sha2 0.9.8", + "sp1-zkvm", + "ssz_rs", +] + +[[package]] +name = "ssz-withdrawals-script" +version = "1.1.0" +dependencies = [ + "sp1-build", + "sp1-sdk", +] + +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "hex", + "num-bigint 0.4.6", + "serde", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.87", +] + +[[package]] +name = "substrate-bn" +version = "0.6.0" +source = "git+https://github.com/sp1-patches/bn?tag=substrate_bn-v0.6.0-patch-v1#9b0e986d32ea128a08cebfe90767072beccdb45f" +dependencies = [ + "bytemuck", + "byteorder", + "cfg-if", + "crunchy", + "lazy_static", + "rand 0.8.5", + "rustc-hex", + "sp1-lib 3.1.0", +] + +[[package]] +name = "substrate-bn" +version = "0.6.0" +source = "git+https://github.com/sp1-patches/bn?tag=substrate_bn-v0.6.0-patch-v2#8ef05d3969312eca34fa9f1f566a469022badda6" +dependencies = [ + "bytemuck", + "byteorder", + "cfg-if", + "crunchy", + "lazy_static", + "num-bigint 0.4.6", + "rand 0.8.5", + "rustc-hex", + "sp1-lib 3.1.0", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16320d4a2021ba1a32470b3759676114a918885e9800e68ad60f2c67969fba62" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "sysinfo" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" +dependencies = [ + "cfg-if", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "rayon", + "windows", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "tendermint" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f8a10105d0a7c4af0a242e23ed5a12519afe5cc0e68419da441bb5981a6802" +dependencies = [ + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "num-traits", + "once_cell", + "prost 0.12.6", + "prost-types", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.8", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time", + "zeroize", +] + +[[package]] +name = "tendermint-light-client-verifier" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35678b66e819659617c2e83f9662b8544425694441990c07137904a07872d871" +dependencies = [ + "derive_more 0.99.18", + "flex-error", + "serde", + "tendermint", + "time", +] + +[[package]] +name = "tendermint-program" +version = "1.1.0" +dependencies = [ + "serde_cbor", + "sp1-zkvm", + "tendermint-light-client-verifier", +] + +[[package]] +name = "tendermint-proto" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff525d5540a9fc535c38dc0d92a98da3ee36fcdfbda99cecb9f3cce5cd4d41d7" +dependencies = [ + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost 0.12.6", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "tendermint-script" +version = "1.1.0" +dependencies = [ + "serde_cbor", + "serde_json", + "sp1-build", + "sp1-sdk", + "tendermint-light-client-verifier", +] + +[[package]] +name = "thiserror" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "thiserror-impl-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "thiserror-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +dependencies = [ + "thiserror-impl-no-std", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "git+https://github.com/sp1-patches/tiny-keccak?tag=tiny_keccak-v2.0.2-patch-v1#bf0b28f63510a90c7b6c21ac6ff461c93ecd2331" +dependencies = [ + "cfg-if", + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.6.0", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap 2.6.0", + "toml_datetime", + "winnow 0.6.20", +] + +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-forest" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee40835db14ddd1e3ba414292272eddde9dad04d3d4b65509656414d1c42592f" +dependencies = [ + "ansi_term", + "smallvec", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "twirp-rs" +version = "0.13.0-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27dfcc06b8d9262bc2d4b8d1847c56af9971a52dd8a0076876de9db763227d0d" +dependencies = [ + "async-trait", + "axum", + "futures", + "http", + "http-body-util", + "hyper", + "prost 0.13.3", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +dependencies = [ + "serde", +] + +[[package]] +name = "vergen" +version = "8.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" +dependencies = [ + "anyhow", + "cfg-if", + "git2", + "rustversion", + "time", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.87", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure 0.13.1", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure 0.13.1", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "zkhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4352d1081da6922701401cdd4cbf29a2723feb4cfabb5771f6fee8e9276da1c7" +dependencies = [ + "ark-ff 0.4.2", + "ark-std 0.4.0", + "bitvec", + "blake2", + "bls12_381 0.7.1", + "byteorder", + "cfg-if", + "group 0.12.1", + "group 0.13.0", + "halo2", + "hex", + "jubjub", + "lazy_static", + "pasta_curves 0.5.1", + "rand 0.8.5", + "serde", + "sha2 0.10.8", + "sha3", + "subtle", +] + +[[patch.unused]] +name = "ecdsa" +version = "0.16.8" +source = "git+https://github.com/sp1-patches/signatures?tag=ecdsa-v0.16.8-patch-v1#aad9626d51e830729969220eee44de082ff97d53" + +[[patch.unused]] +name = "sha2" +version = "0.10.6" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=sha2-v0.10.6-patch-v1#e5f8b7eaaa9801503bd998932a52b65848eee234" + +[[patch.unused]] +name = "sha2" +version = "0.9.8" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=sha2-v0.9.8-patch-v1#afdbfb09c325f8a69c01d540ec9a261e3637725d" diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 48301d93be..4022f079b2 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -12,6 +12,8 @@ members = [ "cycle-tracking/script", "fibonacci/program", "fibonacci/script", + "groth16/program", + "groth16/script", "io/program", "io/script", "is-prime/program", diff --git a/examples/fibonacci/script/Cargo.toml b/examples/fibonacci/script/Cargo.toml index 021aaf5fcc..308d3eeede 100644 --- a/examples/fibonacci/script/Cargo.toml +++ b/examples/fibonacci/script/Cargo.toml @@ -12,6 +12,10 @@ sp1-sdk = { workspace = true } [build-dependencies] sp1-build = { workspace = true } +[[bin]] +name = "plonk_bn254" +path = "bin/plonk_bn254.rs" + [[bin]] name = "groth16_bn254" path = "bin/groth16_bn254.rs" diff --git a/examples/fibonacci/script/bin/groth16_bn254.rs b/examples/fibonacci/script/bin/groth16_bn254.rs index ac873f9760..3b4aae3cbd 100644 --- a/examples/fibonacci/script/bin/groth16_bn254.rs +++ b/examples/fibonacci/script/bin/groth16_bn254.rs @@ -1,4 +1,4 @@ -use sp1_sdk::{utils, ProverClient, SP1Stdin}; +use sp1_sdk::{utils, HashableKey, ProverClient, SP1Stdin}; /// The ELF we want to execute inside the zkVM. const ELF: &[u8] = include_bytes!("../../program/elf/riscv32im-succinct-zkvm-elf"); @@ -13,11 +13,13 @@ fn main() { let mut stdin = SP1Stdin::new(); stdin.write(&n); - // Generate the proof for the given program and input. + // Set up the pk and vk. let client = ProverClient::new(); let (pk, vk) = client.setup(ELF); - let proof = client.prove(&pk, stdin).groth16().run().unwrap(); + println!("vk: {:?}", vk.bytes32()); + // Generate the Groth16 proof. + let proof = client.prove(&pk, stdin).groth16().run().unwrap(); println!("generated proof"); // Get the public values as bytes. @@ -32,7 +34,7 @@ fn main() { client.verify(&proof, &vk).expect("verification failed"); // Save the proof. - proof.save("proof-with-pis.bin").expect("saving proof failed"); + proof.save("fibonacci-groth16.bin").expect("saving proof failed"); println!("successfully generated and verified proof for the program!") } diff --git a/examples/fibonacci/script/bin/plonk_bn254.rs b/examples/fibonacci/script/bin/plonk_bn254.rs new file mode 100644 index 0000000000..f9dd90569f --- /dev/null +++ b/examples/fibonacci/script/bin/plonk_bn254.rs @@ -0,0 +1,40 @@ +use sp1_sdk::{utils, HashableKey, ProverClient, SP1Stdin}; + +/// The ELF we want to execute inside the zkVM. +const ELF: &[u8] = include_bytes!("../../program/elf/riscv32im-succinct-zkvm-elf"); + +fn main() { + // Setup logging. + utils::setup_logger(); + + // Create an input stream and write '500' to it. + let n = 500u32; + + let mut stdin = SP1Stdin::new(); + stdin.write(&n); + + // Set up the pk and vk. + let client = ProverClient::new(); + let (pk, vk) = client.setup(ELF); + println!("vk: {:?}", vk.bytes32()); + + // Generate the Plonk proof. + let proof = client.prove(&pk, stdin).plonk().run().unwrap(); + println!("generated proof"); + + // Get the public values as bytes. + let public_values = proof.public_values.as_slice(); + println!("public values: 0x{}", hex::encode(public_values)); + + // Get the proof as bytes. + let solidity_proof = proof.bytes(); + println!("proof: 0x{}", hex::encode(solidity_proof)); + + // Verify proof and public values + client.verify(&proof, &vk).expect("verification failed"); + + // Save the proof. + proof.save("fibonacci-plonk.bin").expect("saving proof failed"); + + println!("successfully generated and verified proof for the program!") +} diff --git a/examples/groth16/program/Cargo.toml b/examples/groth16/program/Cargo.toml new file mode 100644 index 0000000000..164feb7373 --- /dev/null +++ b/examples/groth16/program/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "groth16-verifier-program" +version = "1.1.0" +edition = "2021" +publish = false + +[dependencies] +sp1-zkvm = { path = "../../../crates/zkvm/entrypoint" } +sp1-verifier = { path = "../../../crates/verifier" } diff --git a/examples/groth16/program/src/main.rs b/examples/groth16/program/src/main.rs new file mode 100644 index 0000000000..f7dd8178f4 --- /dev/null +++ b/examples/groth16/program/src/main.rs @@ -0,0 +1,31 @@ +//! A program that verifies a Groth16 proof in SP1. + +#![no_main] +sp1_zkvm::entrypoint!(main); + +use sp1_verifier::Groth16Verifier; + +pub fn main() { + // Read the proof, public values, and vkey hash from the input stream. + let proof = sp1_zkvm::io::read_vec(); + let sp1_public_values = sp1_zkvm::io::read_vec(); + let sp1_vkey_hash: String = sp1_zkvm::io::read(); + + // Verify the groth16 proof. + let groth16_vk = *sp1_verifier::GROTH16_VK_BYTES; + println!("cycle-tracker-start: verify"); + let result = Groth16Verifier::verify(&proof, &sp1_public_values, &sp1_vkey_hash, groth16_vk); + println!("cycle-tracker-end: verify"); + + match result { + Ok(true) => { + println!("Proof is valid"); + } + Ok(false) => { + println!("Proof is invalid"); + } + Err(e) => { + println!("Error verifying proof: {:?}", e); + } + } +} diff --git a/examples/groth16/script/Cargo.toml b/examples/groth16/script/Cargo.toml new file mode 100644 index 0000000000..24e96a2fc5 --- /dev/null +++ b/examples/groth16/script/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "groth16-verifier-script" +version = { workspace = true } +edition = { workspace = true } +publish = false + +[dependencies] +sp1-sdk = { workspace = true } + +[build-dependencies] +sp1-build = { workspace = true } + +[features] +cuda = ["sp1-sdk/cuda"] diff --git a/examples/groth16/script/build.rs b/examples/groth16/script/build.rs new file mode 100644 index 0000000000..7e10aecc5a --- /dev/null +++ b/examples/groth16/script/build.rs @@ -0,0 +1,4 @@ +fn main() { + sp1_build::build_program("../program"); + sp1_build::build_program("../../fibonacci/program"); +} diff --git a/examples/groth16/script/src/main.rs b/examples/groth16/script/src/main.rs new file mode 100644 index 0000000000..1a55484de1 --- /dev/null +++ b/examples/groth16/script/src/main.rs @@ -0,0 +1,50 @@ +//! A script that generates a Groth16 proof for the Fibonacci program, and verifies the +//! Groth16 proof in SP1. + +use sp1_sdk::{include_elf, utils, HashableKey, ProverClient, SP1ProofWithPublicValues, SP1Stdin}; + +/// The ELF for the Groth16 verifier program. +const GROTH16_ELF: &[u8] = include_elf!("groth16-verifier-program"); + +/// The ELF for the Fibonacci program. +const FIBONACCI_ELF: &[u8] = include_elf!("fibonacci-program"); + +fn generate_fibonacci_proof() -> (SP1ProofWithPublicValues, String) { + // Create an input stream and write '20' to it. + let n = 20u32; + + // The input stream that the program will read from using `sp1_zkvm::io::read`. Note that the + // types of the elements in the input stream must match the types being read in the program. + let mut stdin = SP1Stdin::new(); + stdin.write(&n); + + // Create a `ProverClient`. + let client = ProverClient::new(); + + // Generate the proof for the fibonacci program.. + let (pk, vk) = client.setup(FIBONACCI_ELF); + println!("vk: {:?}", vk.bytes32()); + (client.prove(&pk, stdin).groth16().run().unwrap(), vk.bytes32()) +} + +fn main() { + // Setup logging. + utils::setup_logger(); + + // Generate the Fibonacci proof. + let (fibonacci_proof, vk) = generate_fibonacci_proof(); + + // Write the proof, public values, and vkey hash to the input stream. + let mut stdin = SP1Stdin::new(); + stdin.write_vec(fibonacci_proof.bytes()); + stdin.write_vec(fibonacci_proof.public_values.to_vec()); + stdin.write(&vk); + + // Create a `ProverClient`. + let client = ProverClient::new(); + + // Execute the program using the `ProverClient.execute` method, without generating a proof. + let (_, report) = client.execute(GROTH16_ELF, stdin.clone()).run().unwrap(); + println!("executed groth16 program with {} cycles", report.total_instruction_count()); + println!("{}", report); +} diff --git a/examples/riscv32im-succinct-zkvm-elf b/examples/riscv32im-succinct-zkvm-elf new file mode 100755 index 0000000000..b100efdd3f Binary files /dev/null and b/examples/riscv32im-succinct-zkvm-elf differ diff --git a/examples/tendermint/script/Cargo.toml b/examples/tendermint/script/Cargo.toml index af778202d0..4e60dab52b 100644 --- a/examples/tendermint/script/Cargo.toml +++ b/examples/tendermint/script/Cargo.toml @@ -6,7 +6,6 @@ publish = false [dependencies] sp1-sdk = { workspace = true } -serde = { version = "1.0", default-features = false, features = ["derive"] } serde_json = { version = "1.0", default-features = false, features = ["alloc"] } tendermint-light-client-verifier = { version = "0.35.0", default-features = false, features = [ "rust-crypto", diff --git a/tests/bls12381-double/Cargo.toml b/tests/bls12381-double/Cargo.toml index 33bc133f77..f93909483e 100644 --- a/tests/bls12381-double/Cargo.toml +++ b/tests/bls12381-double/Cargo.toml @@ -6,4 +6,3 @@ publish = false [dependencies] sp1-zkvm = { path = "../../crates/zkvm/entrypoint" } -num = { version = "0.4.1", default-features = false } diff --git a/tests/ed-add/Cargo.toml b/tests/ed-add/Cargo.toml index 9e820d6b6b..0beb43f4f6 100644 --- a/tests/ed-add/Cargo.toml +++ b/tests/ed-add/Cargo.toml @@ -6,5 +6,3 @@ publish = false [dependencies] sp1-zkvm = { path = "../../crates/zkvm/entrypoint" } -hex-literal = "0.4.1" -num = { version = "0.4.1", default-features = false } diff --git a/tests/rand/Cargo.toml b/tests/rand/Cargo.toml index 1d432a3892..fed3efb4cf 100644 --- a/tests/rand/Cargo.toml +++ b/tests/rand/Cargo.toml @@ -6,5 +6,4 @@ publish = false [dependencies] sp1-zkvm = { path = "../../crates/zkvm/entrypoint" } -sp1-derive = { path = "../../crates/derive" } rand = "0.8.5"