From 2b62447fddb83d313a8a0e2131aa9f45100be956 Mon Sep 17 00:00:00 2001 From: Lun-Kai Hsu Date: Mon, 27 Jul 2026 16:44:44 +0000 Subject: [PATCH 1/3] feat(sdk): client-side deferral prepare (derive verify_stark parent inputs) Add axiom_sdk::deferral: given a completed child stark proof, derive everything a verify_stark parent submission needs, hiding all keyset internals behind the existing API surface: - downloads the config's complete openvm.toml (GET /configs/{id}/config, which carries the keygen-derived [[app_vm_config.deferral.circuits]] section; clear rerun-keygen error when absent), the config's agg_vk (GET /configs/{id}/vk/agg), and the PARENT program's baseline.json (GET /programs/{id}/download/baseline); - derives def_hook_commit + the verify-stark circuit's cached commit locally, exactly as backend keygen does (DeferralAggProver::verify_stark on the toml's agg params + 100-bit hook params + memory dims + num user PVs), cross-checks the derived circuit commit against the toml's, and caches the pair under ~/.axiom/cache/deferral-commits-.json (the construction costs ~12s release / minutes dev per config); - mirrors the backend's internal deferral_prepare helper for the rest: child app_exe_commit from the proof's VM public values, child vk = agg_vk + baseline with the two deferral overrides, get_raw_deferral_results -> input_commit (verifies the child proof client-side), openvm-codec child bytes for upload, and the {"input": ["0x01"]} parent input body whose exact StdIn::write(&input_commit) encoding is pinned by unit test. Empirically verified (ignored probe test, run against the standard-config keyset constants): deferral_circuit_cached_commits[0] != the toml's circuit commit, so the cached commit cannot be read off the toml and is always derived (it falls out of the same DeferralAggProver construction the hook commit needs). Pins openvm/stark-backend crates at tag v2.0.0 in crates/sdk, matching the proving backend's keygen; this roughly doubles CLI compile time. --- Cargo.lock | 3730 ++++++++++++++++- crates/sdk/Cargo.toml | 18 + crates/sdk/src/deferral.rs | 756 ++++ crates/sdk/src/lib.rs | 11 + crates/sdk/src/prove.rs | 14 +- crates/sdk/test-fixtures/openvm_standard.toml | 72 + 6 files changed, 4407 insertions(+), 194 deletions(-) create mode 100644 crates/sdk/src/deferral.rs create mode 100644 crates/sdk/test-fixtures/openvm_standard.toml diff --git a/Cargo.lock b/Cargo.lock index 282b3af..6f1eef3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,54 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "abi_stable" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d6512d3eb05ffe5004c59c206de7f99c34951504056ce23fc953842f12c445" +dependencies = [ + "abi_stable_derive", + "abi_stable_shared", + "const_panic", + "core_extensions", + "crossbeam-channel", + "generational-arena", + "libloading", + "lock_api", + "parking_lot", + "paste", + "repr_offset", + "rustc_version", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "abi_stable_derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7178468b407a4ee10e881bc7a328a65e739f0863615cca4429d43916b05e898" +dependencies = [ + "abi_stable_shared", + "as_derive_utils", + "core_extensions", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", + "typed-arena", +] + +[[package]] +name = "abi_stable_shared" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b5df7688c123e63f4d4d649cba63f2967ba7f7861b1664fca3f77d3dad2b63" +dependencies = [ + "core_extensions", +] + [[package]] name = "addr2line" version = "0.24.2" @@ -17,6 +65,33 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -32,6 +107,15 @@ 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.20" @@ -82,6 +166,94 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[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.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std", + "digest", + "num-bigint", +] + +[[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.7", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "as_derive_utils" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff3c96645900a44cf11941c111bd08a6573b0e2f9f69bc9264b179d8fae753c4" +dependencies = [ + "core_extensions", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -99,18 +271,28 @@ name = "axiom-sdk" version = "1.4.0" dependencies = [ "bytes", - "cargo_metadata", + "cargo_metadata 0.21.0", "chrono", "dirs", "eyre", "flate2", "hex", + "openvm-continuations", + "openvm-sdk", + "openvm-sdk-config", + "openvm-stark-backend", + "openvm-stark-sdk", + "openvm-verify-stark-circuit", + "openvm-verify-stark-host", "reqwest", "rustc_version", "scopeguard", "serde", "serde_json", + "sha2", "tar", + "tempfile", + "toml 0.9.5", "toml_edit 0.23.4", "url", "walkdir", @@ -128,33 +310,181 @@ dependencies = [ "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.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bitcode" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6ed1b54d8dc333e7be604d00fa9262f4635485ffea923647b6521a5fff045d" +dependencies = [ + "bytemuck", + "serde", +] + [[package]] name = "bitflags" version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +[[package]] +name = "bitvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b79834656f71332577234b50bfc009996f7449e0c056884e6a02492ded0ca2f3" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[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 = "blst" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20659f9bbee16cbbd2f7393e40ab6309f5a98f76a2eb57a995ec508b72387fe" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "blstrs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a8a8ed6fefbeef4a8c7b460e4110e12c5e22a5b7cf32621aae6ad650c4dcf29" +dependencies = [ + "blst", + "byte-slice-cast", + "ff 0.13.1", + "group 0.13.0", + "pairing 0.23.0", + "rand_core 0.6.4", + "serde", + "subtle", +] + +[[package]] +name = "bon" +version = "3.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a602c73c7b0148ec6d12af6fd5cc7a46e2eacc8878271a999abac56eed12f561" +dependencies = [ + "bon-macros", + "rustversion", +] + +[[package]] +name = "bon-macros" +version = "3.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dee98b0db6a962de883bf5d20362dee4d7ca0d12fe39a7c6c73c844e1cd7c1f" +dependencies = [ + "darling 0.23.0", + "ident_case", + "prettyplease", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.106", +] + [[package]] name = "bumpalo" version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +[[package]] +name = "bytesize" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7c8918969267b2932ffd5655509bbbea0833823058c378876953217f5fc50e" + [[package]] name = "camino" version = "1.1.12" @@ -169,7 +499,7 @@ name = "cargo-axiom" version = "1.4.0" dependencies = [ "axiom-sdk", - "cargo_metadata", + "cargo_metadata 0.21.0", "chrono", "clap", "clap_complete", @@ -182,6 +512,15 @@ dependencies = [ "toml_edit 0.23.4", ] +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + [[package]] name = "cargo-platform" version = "0.2.0" @@ -201,12 +540,26 @@ dependencies = [ "serde", "serde-untagged", "serde-value", - "thiserror", - "toml", + "thiserror 2.0.16", + "toml 0.8.23", "unicode-xid", "url", ] +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform 0.1.9", + "semver", + "serde", + "serde_json", + "thiserror 1.0.69", +] + [[package]] name = "cargo_metadata" version = "0.21.0" @@ -214,12 +567,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cfca2aaa699835ba88faf58a06342a314a950d2b9686165e038286c30316868" dependencies = [ "camino", - "cargo-platform", + "cargo-platform 0.2.0", "cargo-util-schemas", "semver", "serde", "serde_json", - "thiserror", + "thiserror 2.0.16", ] [[package]] @@ -229,14 +582,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "590f9024a68a8c40351881787f1934dc11afd69090f5edb6831464694d836ea3" dependencies = [ "find-msvc-tools", + "jobserver", + "libc", "shlex", ] [[package]] name = "cfg-if" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chrono" @@ -250,7 +605,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -293,7 +648,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 2.0.106", ] [[package]] @@ -302,6 +657,15 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" +[[package]] +name = "cobs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror 2.0.16", +] + [[package]] name = "colorchoice" version = "1.0.4" @@ -331,6 +695,27 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const_panic" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e262cdaac42494e3ae34c43969f9cdeb7da178bdb4b66fa6a1ea2edb4c8ae652" +dependencies = [ + "typewit", +] + +[[package]] +name = "constant_time_eq" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" + [[package]] name = "core-foundation" version = "0.9.4" @@ -347,6 +732,30 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core_extensions" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42bb5e5d0269fd4f739ea6cedaf29c16d81c27a7ce7582008e90eb50dcd57003" +dependencies = [ + "core_extensions_proc_macros", +] + +[[package]] +name = "core_extensions_proc_macros" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533d38ecd2709b7608fb8e18e4504deb99e9a72879e6aa66373a76d8dc4259ea" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.5.0" @@ -357,58 +766,360 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "6.0.0" +name = "crossbeam-channel" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" dependencies = [ - "dirs-sys", + "crossbeam-utils", ] [[package]] -name = "dirs-sys" -version = "0.5.0" +name = "crossbeam-deque" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.60.2", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "displaydoc" -version = "0.2.5" +name = "crossbeam-epoch" +version = "0.9.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" dependencies = [ - "proc-macro2", - "quote", - "syn", + "crossbeam-utils", ] [[package]] -name = "dotenvy" -version = "0.15.7" +name = "crossbeam-utils" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] -name = "encode_unicode" -version = "1.0.0" +name = "crunchy" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] -name = "encoding_rs" -version = "0.8.35" +name = "crypto-bigint" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "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", + "typenum", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core 0.21.3", + "darling_macro 0.21.3", +] + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.106", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core 0.21.3", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "dashmap" +version = "6.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", + "rayon", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "serde_core", +] + +[[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-new" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "derive-new" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cdc8d50f426189eef89dac62fabfa0abb27d5cc008f25bf4156a0203325becc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[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 = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.60.2", +] + +[[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.106", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "digest", + "elliptic-curve", + "signature", +] + +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + +[[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", + "digest", + "ff 0.13.1", + "generic-array", + "group 0.13.0", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + [[package]] name = "equivalent" version = "1.0.2" @@ -451,6 +1162,28 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "bitvec", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "filetime" version = "0.2.26" @@ -485,6 +1218,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -509,6 +1248,12 @@ 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-channel" version = "0.3.31" @@ -559,6 +1304,26 @@ dependencies = [ "slab", ] +[[package]] +name = "generational-arena" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877e94aff08e743b651baaea359664321055749b398adff8740a7399af7796e7" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "generic-array" +version = "0.14.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + [[package]] name = "getrandom" version = "0.2.16" @@ -578,40 +1343,163 @@ checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 5.3.0", "wasi 0.14.3+wasi-0.2.4", ] [[package]] -name = "gimli" -version = "0.31.1" +name = "getrandom" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] [[package]] -name = "h2" -version = "0.4.12" +name = "getset" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +checksum = "6cf442baaabe4213ce7d1239afc26c039180b6456da2cededa316ae2c8a77a77" dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] -name = "hashbrown" -version = "0.15.5" +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[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.1", + "rand 0.8.7", + "rand_core 0.6.4", + "rand_xorshift", + "subtle", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.11.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[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 = "halo2curves-axiom" +version = "0.7.2" +source = "git+https://github.com/axiom-crypto/halo2curves.git?tag=v0.7.2#3a65a710e27fe03711f6fb4fc0c4469ae351974a" +dependencies = [ + "blake2b_simd", + "digest", + "ff 0.13.1", + "group 0.13.0", + "hex", + "lazy_static", + "num-bigint", + "num-traits", + "pairing 0.23.0", + "pasta_curves 0.5.2", + "paste", + "rand 0.8.7", + "rand_core 0.6.4", + "rayon", + "serde", + "serde_arrays", + "sha2", + "static_assertions", + "subtle", + "unroll", +] + +[[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", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] [[package]] name = "heck" @@ -619,11 +1507,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + [[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 = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" [[package]] name = "http" @@ -855,6 +1758,12 @@ dependencies = [ "zerovec", ] +[[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.1.0" @@ -882,6 +1791,17 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" +[[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.11.0" @@ -889,7 +1809,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.5", + "serde", ] [[package]] @@ -938,12 +1859,40 @@ 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.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + [[package]] name = "js-sys" version = "0.3.77" @@ -954,12 +1903,60 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jubjub" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a575df5f985fe1cd5b2b05664ff6accfc46559032b954529fd225a2168d27b0f" +dependencies = [ + "bitvec", + "bls12_381", + "ff 0.12.1", + "group 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "keccak" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin 0.9.9", +] + [[package]] name = "libc" version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + [[package]] name = "libredox" version = "0.1.9" @@ -983,18 +1980,122 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7" +dependencies = [ + "autocfg", + "rawpointer", +] + [[package]] name = "memchr" version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +[[package]] +name = "memmap2" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +dependencies = [ + "libc", +] + +[[package]] +name = "memuse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d97bbf43eb4f088f8ca469930cde17fa036207c9a5e02ccc5107c4e8b17c964" + +[[package]] +name = "metrics" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3045b4193fbdc5b5681f32f11070da9be3609f189a79f3390706d42587f46bb5" +dependencies = [ + "ahash", + "portable-atomic", +] + +[[package]] +name = "metrics-tracing-context" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62a6a1f7141f1d9bc7a886b87536bbfc97752e08b369e1e0453a9acfab5f5da4" +dependencies = [ + "indexmap 2.11.0", + "itoa", + "lockfree-object-pool", + "metrics", + "metrics-util", + "once_cell", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "metrics-util" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4259040465c955f9f2f1a4a8a16dc46726169bca0f88e8fb2dbeced487c3e828" +dependencies = [ + "aho-corasick", + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.14.5", + "indexmap 2.11.0", + "metrics", + "num_cpus", + "ordered-float 4.6.0", + "quanta", + "radix_trie", + "sketches-ddsketch", +] + [[package]] name = "mime" version = "0.3.17" @@ -1049,175 +2150,1817 @@ dependencies = [ ] [[package]] -name = "num-traits" -version = "0.2.19" +name = "ndarray" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841" dependencies = [ - "autocfg", + "matrixmultiply", + "num-complex", + "num-integer", + "num-traits", + "portable-atomic", + "portable-atomic-util", + "rawpointer", ] [[package]] -name = "object" -version = "0.36.7" +name = "nibble_vec" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" dependencies = [ - "memchr", + "smallvec", ] [[package]] -name = "once_cell" -version = "1.21.3" +name = "nu-ansi-term" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.60.2", +] [[package]] -name = "once_cell_polyfill" -version = "1.70.1" +name = "num-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +dependencies = [ + "num-integer", + "num-traits", + "rand 0.8.7", + "serde", +] + +[[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.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[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-modular" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a5fe11d4135c3bcdf3a95b18b194afa9608a5f6ff034f5d857bc9a27fb0119" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-prime" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e238432a7881ec7164503ccc516c014bf009be7984cde1ba56837862543bdec3" +dependencies = [ + "bitvec", + "either", + "lru", + "num-bigint", + "num-integer", + "num-modular", + "num-traits", + "rand 0.8.7", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "openvm" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "bytemuck", + "num-bigint", + "openvm-custom-insn", + "openvm-platform", + "openvm-rv32im-guest", + "serde", +] + +[[package]] +name = "openvm-algebra-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "blstrs", + "cfg-if", + "derive-new 0.6.0", + "derive_more", + "eyre", + "halo2curves-axiom", + "num-bigint", + "num-traits", + "once_cell", + "openvm-algebra-transpiler", + "openvm-circuit", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-cpu-backend", + "openvm-instructions", + "openvm-mod-circuit-builder", + "openvm-rv32-adapters", + "openvm-rv32im-circuit", + "openvm-stark-backend", + "openvm-stark-sdk", + "rand 0.9.5", + "serde", + "serde_with", + "strum", +] + +[[package]] +name = "openvm-algebra-complex-macros" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-macros-common", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-algebra-guest" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "halo2curves-axiom", + "num-bigint", + "once_cell", + "openvm-algebra-complex-macros", + "openvm-algebra-moduli-macros", + "openvm-custom-insn", + "openvm-rv32im-guest", + "serde-big-array", + "strum_macros", +] + +[[package]] +name = "openvm-algebra-moduli-macros" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "num-bigint", + "num-prime", + "openvm-macros-common", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-algebra-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-algebra-guest", + "openvm-instructions", + "openvm-instructions-derive", + "openvm-stark-backend", + "openvm-transpiler", + "rrs-lib", + "strum", +] + +[[package]] +name = "openvm-bigint-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "cfg-if", + "derive-new 0.6.0", + "derive_more", + "openvm-bigint-transpiler", + "openvm-circuit", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-cpu-backend", + "openvm-instructions", + "openvm-rv32-adapters", + "openvm-rv32im-circuit", + "openvm-rv32im-transpiler", + "openvm-stark-backend", + "openvm-stark-sdk", + "rand 0.9.5", + "serde", +] + +[[package]] +name = "openvm-bigint-guest" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-platform", + "strum_macros", +] + +[[package]] +name = "openvm-bigint-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-bigint-guest", + "openvm-instructions", + "openvm-instructions-derive", + "openvm-rv32im-transpiler", + "openvm-stark-backend", + "openvm-transpiler", + "rrs-lib", + "strum", +] + +[[package]] +name = "openvm-build" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "cargo_metadata 0.18.1", + "eyre", + "openvm-platform", + "serde", + "serde_json", +] + +[[package]] +name = "openvm-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "abi_stable", + "backtrace", + "bytesize", + "cfg-if", + "dashmap", + "derive-new 0.6.0", + "derive_more", + "eyre", + "getset", + "itertools 0.14.0", + "libc", + "memmap2", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-cpu-backend", + "openvm-instructions", + "openvm-poseidon2-air", + "openvm-stark-backend", + "openvm-stark-sdk", + "p3-baby-bear", + "p3-field", + "rand 0.9.5", + "rustc-hash", + "serde", + "serde-big-array", + "static_assertions", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "openvm-circuit-derive" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-circuit-primitives" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "derive-new 0.6.0", + "itertools 0.14.0", + "num-bigint", + "num-traits", + "openvm-circuit-primitives-derive", + "openvm-cpu-backend", + "openvm-cuda-builder", + "openvm-stark-backend", + "rand 0.9.5", + "struct-reflection", + "tracing", +] + +[[package]] +name = "openvm-circuit-primitives-derive" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-codec-derive" +version = "2.0.0" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-continuations" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "cfg-if", + "derivative", + "derive-new 0.6.0", + "eyre", + "hex", + "itertools 0.14.0", + "num-bigint", + "openvm-circuit", + "openvm-circuit-primitives", + "openvm-cpu-backend", + "openvm-poseidon2-air", + "openvm-recursion-circuit", + "openvm-recursion-circuit-derive", + "openvm-stark-backend", + "openvm-stark-sdk", + "openvm-verify-stark-host", + "p3-air", + "p3-field", + "p3-matrix", + "serde", + "tracing", +] + +[[package]] +name = "openvm-cpu-backend" +version = "2.0.0" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +dependencies = [ + "cfg-if", + "derive-new 0.7.0", + "getset", + "itertools 0.14.0", + "openvm-stark-backend", + "p3-air", + "p3-baby-bear", + "p3-dft", + "p3-field", + "p3-interpolation", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "rayon", + "rustc-hash", + "serde", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "openvm-cuda-builder" +version = "2.0.0" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +dependencies = [ + "cc", + "glob", +] + +[[package]] +name = "openvm-custom-insn" +version = "0.1.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-deferral-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "cfg-if", + "dashmap", + "derive-new 0.6.0", + "derive_more", + "itertools 0.14.0", + "openvm-circuit", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-cpu-backend", + "openvm-deferral-transpiler", + "openvm-instructions", + "openvm-poseidon2-air", + "openvm-rv32im-circuit", + "openvm-stark-backend", + "openvm-stark-sdk", + "p3-field", + "rand 0.9.5", + "rustc-hash", + "serde", +] + +[[package]] +name = "openvm-deferral-guest" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-custom-insn", + "strum_macros", +] + +[[package]] +name = "openvm-deferral-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "eyre", + "openvm-deferral-guest", + "openvm-instructions", + "openvm-instructions-derive", + "openvm-transpiler", + "p3-field", + "rrs-lib", + "serde", + "strum", +] + +[[package]] +name = "openvm-ecc-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "blstrs", + "cfg-if", + "derive-new 0.6.0", + "derive_more", + "halo2curves-axiom", + "hex-literal", + "lazy_static", + "num-bigint", + "num-traits", + "once_cell", + "openvm-algebra-circuit", + "openvm-circuit", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-cpu-backend", + "openvm-ecc-transpiler", + "openvm-instructions", + "openvm-mod-circuit-builder", + "openvm-rv32-adapters", + "openvm-stark-backend", + "rand 0.9.5", + "serde", + "serde_with", + "strum", +] + +[[package]] +name = "openvm-ecc-guest" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "ecdsa", + "elliptic-curve", + "group 0.13.0", + "halo2curves-axiom", + "once_cell", + "openvm", + "openvm-algebra-guest", + "openvm-custom-insn", + "openvm-ecc-sw-macros", + "openvm-rv32im-guest", + "serde", + "strum_macros", +] + +[[package]] +name = "openvm-ecc-sw-macros" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-macros-common", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-ecc-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-ecc-guest", + "openvm-instructions", + "openvm-instructions-derive", + "openvm-stark-backend", + "openvm-transpiler", + "rrs-lib", + "strum", +] + +[[package]] +name = "openvm-instructions" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "backtrace", + "derive-new 0.6.0", + "itertools 0.14.0", + "num-bigint", + "num-traits", + "openvm-instructions-derive", + "openvm-stark-backend", + "serde", + "strum", + "strum_macros", +] + +[[package]] +name = "openvm-instructions-derive" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-keccak256-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "derive-new 0.6.0", + "derive_more", + "itertools 0.14.0", + "openvm-circuit", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-cpu-backend", + "openvm-instructions", + "openvm-keccak256-transpiler", + "openvm-rv32im-circuit", + "openvm-stark-backend", + "openvm-stark-sdk", + "p3-keccak-air", + "rand 0.9.5", + "serde", + "strum", + "tiny-keccak", +] + +[[package]] +name = "openvm-keccak256-guest" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-platform", +] + +[[package]] +name = "openvm-keccak256-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-instructions", + "openvm-instructions-derive", + "openvm-keccak256-guest", + "openvm-stark-backend", + "openvm-transpiler", + "rrs-lib", + "strum", +] + +[[package]] +name = "openvm-macros-common" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "syn 2.0.106", +] + +[[package]] +name = "openvm-mod-circuit-builder" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "itertools 0.14.0", + "num-bigint", + "num-traits", + "openvm-circuit", + "openvm-circuit-primitives", + "openvm-instructions", + "openvm-stark-backend", + "openvm-stark-sdk", + "rand 0.8.7", + "rand 0.9.5", + "tracing", +] + +[[package]] +name = "openvm-pairing-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "cfg-if", + "derive-new 0.6.0", + "derive_more", + "eyre", + "halo2curves-axiom", + "num-bigint", + "num-traits", + "openvm-algebra-circuit", + "openvm-circuit", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-cpu-backend", + "openvm-ecc-circuit", + "openvm-ecc-guest", + "openvm-instructions", + "openvm-mod-circuit-builder", + "openvm-pairing-guest", + "openvm-pairing-transpiler", + "openvm-rv32im-circuit", + "openvm-stark-backend", + "rand 0.9.5", + "serde", + "strum", +] + +[[package]] +name = "openvm-pairing-guest" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "blstrs", + "halo2curves-axiom", + "hex-literal", + "itertools 0.14.0", + "lazy_static", + "num-bigint", + "num-traits", + "openvm", + "openvm-algebra-guest", + "openvm-algebra-moduli-macros", + "openvm-custom-insn", + "openvm-ecc-guest", + "serde", + "strum_macros", +] + +[[package]] +name = "openvm-pairing-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-instructions", + "openvm-pairing-guest", + "openvm-stark-backend", + "openvm-transpiler", + "rrs-lib", + "strum", +] + +[[package]] +name = "openvm-platform" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "libm", + "openvm-custom-insn", + "openvm-rv32im-guest", +] + +[[package]] +name = "openvm-poseidon2-air" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "derivative", + "lazy_static", + "openvm-circuit-primitives", + "openvm-cuda-builder", + "openvm-stark-backend", + "openvm-stark-sdk", + "p3-poseidon2", + "p3-poseidon2-air", + "p3-symmetric", + "rand 0.9.5", + "zkhash-axiom", +] + +[[package]] +name = "openvm-recursion-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "derive-new 0.6.0", + "itertools 0.14.0", + "openvm-circuit", + "openvm-circuit-primitives", + "openvm-cpu-backend", + "openvm-poseidon2-air", + "openvm-recursion-circuit-derive", + "openvm-stark-backend", + "openvm-stark-sdk", + "p3-air", + "p3-baby-bear", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-symmetric", + "strum", + "strum_macros", + "tracing", +] + +[[package]] +name = "openvm-recursion-circuit-derive" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openvm-rv32-adapters" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "derive-new 0.6.0", + "itertools 0.14.0", + "openvm-circuit", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-instructions", + "openvm-rv32im-circuit", + "openvm-stark-backend", + "openvm-stark-sdk", + "rand 0.9.5", +] + +[[package]] +name = "openvm-rv32im-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "cfg-if", + "derive-new 0.6.0", + "derive_more", + "eyre", + "num-bigint", + "num-integer", + "openvm-circuit", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-cpu-backend", + "openvm-instructions", + "openvm-rv32im-transpiler", + "openvm-stark-backend", + "rand 0.9.5", + "serde", + "strum", + "tracing", +] + +[[package]] +name = "openvm-rv32im-guest" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-custom-insn", + "strum_macros", +] + +[[package]] +name = "openvm-rv32im-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-instructions", + "openvm-instructions-derive", + "openvm-rv32im-guest", + "openvm-stark-backend", + "openvm-transpiler", + "rrs-lib", + "serde", + "strum", + "tracing", +] + +[[package]] +name = "openvm-sdk" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "bitcode", + "cfg-if", + "clap", + "derivative", + "derive-new 0.6.0", + "derive_more", + "eyre", + "getset", + "hex", + "itertools 0.14.0", + "openvm", + "openvm-build", + "openvm-circuit", + "openvm-continuations", + "openvm-deferral-circuit", + "openvm-recursion-circuit", + "openvm-sdk-config", + "openvm-stark-backend", + "openvm-stark-sdk", + "openvm-transpiler", + "openvm-verify-stark-circuit", + "openvm-verify-stark-host", + "serde", + "serde_json", + "serde_with", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "openvm-sdk-config" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "bon", + "cfg-if", + "derive_more", + "openvm-algebra-circuit", + "openvm-algebra-transpiler", + "openvm-bigint-circuit", + "openvm-bigint-transpiler", + "openvm-circuit", + "openvm-continuations", + "openvm-cpu-backend", + "openvm-deferral-circuit", + "openvm-deferral-transpiler", + "openvm-ecc-circuit", + "openvm-ecc-transpiler", + "openvm-keccak256-circuit", + "openvm-keccak256-transpiler", + "openvm-pairing-circuit", + "openvm-pairing-transpiler", + "openvm-rv32im-circuit", + "openvm-rv32im-transpiler", + "openvm-sha2-circuit", + "openvm-sha2-transpiler", + "openvm-stark-backend", + "openvm-stark-sdk", + "openvm-transpiler", + "openvm-verify-stark-circuit", + "serde", + "toml 0.8.23", +] + +[[package]] +name = "openvm-sha2-air" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "ndarray", + "num_enum", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-stark-backend", + "rand 0.9.5", + "sha2", +] + +[[package]] +name = "openvm-sha2-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "cfg-if", + "derive-new 0.6.0", + "derive_more", + "itertools 0.14.0", + "ndarray", + "openvm-circuit", + "openvm-circuit-derive", + "openvm-circuit-primitives", + "openvm-circuit-primitives-derive", + "openvm-cpu-backend", + "openvm-instructions", + "openvm-rv32im-circuit", + "openvm-sha2-air", + "openvm-sha2-transpiler", + "openvm-stark-backend", + "openvm-stark-sdk", + "rand 0.9.5", + "serde", + "sha2", +] + +[[package]] +name = "openvm-sha2-guest" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-platform", +] + +[[package]] +name = "openvm-sha2-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "openvm-instructions", + "openvm-instructions-derive", + "openvm-sha2-guest", + "openvm-stark-backend", + "openvm-transpiler", + "rrs-lib", + "strum", +] + +[[package]] +name = "openvm-stark-backend" +version = "2.0.0" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +dependencies = [ + "cfg-if", + "derivative", + "derive-new 0.7.0", + "eyre", + "getset", + "hex-literal", + "itertools 0.14.0", + "openvm-codec-derive", + "p3-air", + "p3-challenger", + "p3-dft", + "p3-field", + "p3-interpolation", + "p3-matrix", + "p3-maybe-rayon", + "p3-symmetric", + "p3-util", + "postcard", + "rayon", + "rustc-hash", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "openvm-stark-sdk" +version = "2.0.0" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v2.0.0#16d60de724c21dcadfde7d8315a1db507e5832d7" +dependencies = [ + "dashmap", + "derive-new 0.7.0", + "eyre", + "hex-literal", + "itertools 0.14.0", + "metrics-tracing-context", + "metrics-util", + "openvm-cpu-backend", + "openvm-stark-backend", + "p3-baby-bear", + "p3-field", + "rand 0.9.5", + "serde", + "serde_json", + "static_assertions", + "tracing", + "tracing-forest", + "tracing-subscriber", +] + +[[package]] +name = "openvm-transpiler" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "elf", + "eyre", + "openvm-instructions", + "openvm-platform", + "openvm-stark-backend", + "rrs-lib", + "thiserror 1.0.69", +] + +[[package]] +name = "openvm-verify-stark-circuit" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "bitcode", + "cfg-if", + "derive-new 0.6.0", + "eyre", + "itertools 0.14.0", + "openvm-circuit", + "openvm-circuit-primitives", + "openvm-continuations", + "openvm-cpu-backend", + "openvm-deferral-circuit", + "openvm-poseidon2-air", + "openvm-recursion-circuit", + "openvm-recursion-circuit-derive", + "openvm-stark-backend", + "openvm-stark-sdk", + "openvm-verify-stark-host", + "p3-air", + "p3-field", + "p3-matrix", + "serde", + "tracing", +] + +[[package]] +name = "openvm-verify-stark-host" +version = "2.0.0" +source = "git+https://github.com/openvm-org/openvm.git?tag=v2.0.0#15a7ab6baed03d75050dbef2bbad4b4e98fb8dba" +dependencies = [ + "bitcode", + "eyre", + "openvm-circuit", + "openvm-circuit-primitives", + "openvm-recursion-circuit-derive", + "openvm-stark-backend", + "openvm-stark-sdk", + "p3-field", + "serde", + "thiserror 1.0.69", + "zstd", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ordered-float" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" +dependencies = [ + "num-traits", +] + +[[package]] +name = "p3-air" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daee3082e2ca0db2ac876c43c9c8fd53204b0fcb95cfe7258d21f4a925ad82c4" +dependencies = [ + "p3-field", + "p3-matrix", +] + +[[package]] +name = "p3-baby-bear" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a1a49f4d9c8b8cbdab61e25d9de1b78b3c8347dd2fb88b11d990b3efa8cdd3a" +dependencies = [ + "p3-challenger", + "p3-field", + "p3-mds", + "p3-monty-31", + "p3-poseidon2", + "p3-symmetric", + "rand 0.9.5", +] + +[[package]] +name = "p3-challenger" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d2d45f5a51dc3f965e8d6da60a6c26c807e88657863d56da275eaa05ad36f1" +dependencies = [ + "p3-field", + "p3-maybe-rayon", + "p3-monty-31", + "p3-symmetric", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-dft" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beabb40bc8ac7f5f95870f271fb844c7e2e1ebb7f0761a8eebb2614b56c6b1c1" +dependencies = [ + "itertools 0.14.0", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "spin 0.10.1", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4819a3e4c1882431a63d4847ffa10d110017aee4cb9cf4319ca6dca191930969" +dependencies = [ + "itertools 0.14.0", + "num-bigint", + "p3-maybe-rayon", + "p3-util", + "paste", + "rand 0.9.5", + "serde", + "tracing", +] + +[[package]] +name = "p3-interpolation" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27a3696641a8f4ec990ff8c91862fb4f3b4ff29f589f78005d046023fe3550f" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", +] + +[[package]] +name = "p3-keccak-air" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4832d817455f7a4a35b598cbb8a42f1ee0430ee82df0203956c26917b2509865" +dependencies = [ + "p3-air", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "rand 0.9.5", + "tracing", +] + +[[package]] +name = "p3-matrix" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6fde449bd2963d394284ec46db8c647e6a5602d90601117b76752072ab54168" +dependencies = [ + "itertools 0.14.0", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand 0.9.5", + "serde", + "tracing", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54afab3883d8a14676b492709d6c4e9fa535c36718b737db0817aacfaaaa11f6" +dependencies = [ + "rayon", +] + +[[package]] +name = "p3-mds" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3895055d735ac96d010747b3aaabd4c2645b9fd80226960550318db2e25afb75" +dependencies = [ + "p3-dft", + "p3-field", + "p3-symmetric", + "p3-util", + "rand 0.9.5", +] + +[[package]] +name = "p3-monty-31" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9fe0be661891af1f703ceaf57334fcbd540804988984dc2b500dd99740e7c81" +dependencies = [ + "itertools 0.14.0", + "num-bigint", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "paste", + "rand 0.9.5", + "serde", + "spin 0.10.1", + "tracing", +] + +[[package]] +name = "p3-poseidon2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6fc2368447576283f8b3849a36095017f25addf06eab9e33b0ce7f96b0b99d" +dependencies = [ + "p3-field", + "p3-mds", + "p3-symmetric", + "p3-util", + "rand 0.9.5", +] + +[[package]] +name = "p3-poseidon2-air" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a80481b023f74c0f8ded5058dab8054174e8060d82d400da7b67cf7f2f0a87bc" +dependencies = [ + "p3-air", + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-poseidon2", + "rand 0.9.5", + "tracing", +] + +[[package]] +name = "p3-symmetric" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a14456a42a7d9e65f13999706f1bca2832175935169b3a54286e18331cf1d82f" +dependencies = [ + "itertools 0.14.0", + "p3-field", + "serde", +] + +[[package]] +name = "p3-util" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911154accf66034b0eec4452956c088f92a200b37a8225c1caed74cfbd38cc8d" +dependencies = [ + "serde", + "transpose", +] + +[[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 = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link 0.2.1", +] + +[[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.7", + "static_assertions", + "subtle", +] + +[[package]] +name = "pasta_curves" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3437083215c505e867eea5478371feba43d7689d6d15ec0a209eb46fb0d4cda6" +dependencies = [ + "blake2b_simd", + "ff 0.13.1", + "group 0.13.0", + "lazy_static", + "rand 0.8.7", + "static_assertions", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "postcard" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "serde", +] + +[[package]] +name = "potential_utf" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +dependencies = [ + "zerovec", +] + +[[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.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.106", +] + +[[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-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quanta" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi 0.11.1+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "radix_trie" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] [[package]] -name = "openssl" -version = "0.10.73" +name = "rand" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", "libc", - "once_cell", - "openssl-macros", - "openssl-sys", + "rand_chacha 0.3.1", + "rand_core 0.6.4", ] [[package]] -name = "openssl-macros" -version = "0.1.1" +name = "rand" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ - "proc-macro2", - "quote", - "syn", + "rand_chacha 0.9.0", + "rand_core 0.9.5", ] [[package]] -name = "openssl-probe" -version = "0.1.6" +name = "rand_chacha" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] [[package]] -name = "openssl-sys" -version = "0.9.109" +name = "rand_chacha" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", + "ppv-lite86", + "rand_core 0.9.5", ] [[package]] -name = "option-ext" -version = "0.2.0" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] [[package]] -name = "ordered-float" -version = "2.10.1" +name = "rand_core" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "num-traits", + "getrandom 0.3.3", ] [[package]] -name = "percent-encoding" -version = "2.3.2" +name = "rand_xorshift" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] [[package]] -name = "pin-project-lite" -version = "0.2.16" +name = "raw-cpuid" +version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags", +] [[package]] -name = "pin-utils" -version = "0.1.0" +name = "rawpointer" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] -name = "pkg-config" -version = "0.3.32" +name = "rayon" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] [[package]] -name = "portable-atomic" -version = "1.11.1" +name = "rayon-core" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] [[package]] -name = "potential_utf" -version = "0.1.3" +name = "redox_syscall" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "zerovec", + "bitflags", ] [[package]] -name = "proc-macro2" -version = "1.0.101" +name = "redox_users" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "unicode-ident", + "getrandom 0.2.16", + "libredox", + "thiserror 2.0.16", ] [[package]] -name = "quote" -version = "1.0.40" +name = "ref-cast" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" dependencies = [ - "proc-macro2", + "ref-cast-impl", ] [[package]] -name = "r-efi" -version = "5.3.0" +name = "ref-cast-impl" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] [[package]] -name = "redox_syscall" -version = "0.5.17" +name = "regex-automata" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" dependencies = [ - "bitflags", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] -name = "redox_users" -version = "0.5.2" +name = "regex-syntax" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "repr_offset" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1070755bd29dffc19d0971cab794e607839ba2ef4b69a9e6fbc8733c1b72ea" dependencies = [ - "getrandom 0.2.16", - "libredox", - "thiserror", + "tstr", ] [[package]] @@ -1277,12 +4020,28 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rrs-lib" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4382d3af3a4ebdae7f64ba6edd9114fff92c89808004c4943b393377a25d001" +dependencies = [ + "downcast-rs", + "paste", +] + [[package]] name = "rustc-demangle" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + [[package]] name = "rustc_version" version = "0.4.1" @@ -1368,12 +4127,49 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "subtle", + "zeroize", +] + [[package]] name = "security-framework" version = "2.11.1" @@ -1408,13 +4204,23 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.219" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ + "serde_core", "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f" +dependencies = [ + "serde", +] + [[package]] name = "serde-untagged" version = "0.1.8" @@ -1432,19 +4238,37 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" dependencies = [ - "ordered-float", + "ordered-float 2.10.1", + "serde", +] + +[[package]] +name = "serde_arrays" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38636132857f68ec3d5f3eb121166d2af33cb55174c4d5ff645db6165cbef0fd" +dependencies = [ "serde", ] +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] @@ -1468,6 +4292,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -1480,12 +4313,90 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c522100790450cf78eeac1507263d0a350d4d5b30df0c8e1fe051a10c22b376e" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.11.0", + "schemars 0.9.0", + "schemars 1.2.2", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327ada00f7d64abaac1e55a6911e90cf665aa051b9a561c7006c157f4633135e" +dependencies = [ + "darling 0.21.3", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77fd7028345d415a4034cf8777cd4f8ab1851274233b45f84e3d955502d93874" +dependencies = [ + "digest", + "keccak", +] + +[[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 = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "sketches-ddsketch" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" + [[package]] name = "slab" version = "0.4.11" @@ -1499,26 +4410,95 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] -name = "socket2" -version = "0.6.0" +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + +[[package]] +name = "spin" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "023a211cb3138dbc438680b32560ad89f699977624c9f8dbb95a47d5b4c07dd3" +dependencies = [ + "lock_api", +] + +[[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 = "strength_reduce" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "struct-reflection" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "701b671d1ad68e250e05718f95dae3014a17f4e69cbe51842531c30495ff3301" +dependencies = [ + "struct-reflection-derive", +] + +[[package]] +name = "struct-reflection-derive" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +checksum = "59ab74230a0592602e361bd63c645413fa8cbe4500d10274e849179e5c72548f" dependencies = [ - "libc", - "windows-sys 0.59.0", + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "strum" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] [[package]] -name = "strsim" -version = "0.11.1" +name = "strum_macros" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.106", +] [[package]] name = "subtle" @@ -1526,6 +4506,17 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[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.106" @@ -1537,6 +4528,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "1.0.2" @@ -1554,7 +4556,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.106", ] [[package]] @@ -1578,6 +4580,12 @@ dependencies = [ "libc", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tar" version = "0.4.44" @@ -1601,13 +4609,33 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.16", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] @@ -1618,7 +4646,64 @@ checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.106", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[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.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", ] [[package]] @@ -1688,11 +4773,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", - "serde_spanned", + "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_edit 0.22.27", ] +[[package]] +name = "toml" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" +dependencies = [ + "indexmap 2.11.0", + "serde", + "serde_spanned 1.1.1", + "toml_datetime 0.7.0", + "toml_parser", + "toml_writer", + "winnow 0.7.13", +] + [[package]] name = "toml_datetime" version = "0.6.11" @@ -1711,18 +4811,29 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.11.0", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + [[package]] name = "toml_edit" version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap", + "indexmap 2.11.0", "serde", - "serde_spanned", + "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_write", - "winnow", + "winnow 0.7.13", ] [[package]] @@ -1731,11 +4842,11 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7211ff1b8f0d3adae1663b7da9ffe396eabe1ca25f0b0bee42b0da29a9ddce93" dependencies = [ - "indexmap", + "indexmap 2.11.0", "toml_datetime 0.7.0", "toml_parser", "toml_writer", - "winnow", + "winnow 0.7.13", ] [[package]] @@ -1744,7 +4855,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" dependencies = [ - "winnow", + "winnow 0.7.13", ] [[package]] @@ -1811,9 +4922,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "tracing-core" version = "0.1.34" @@ -1821,6 +4944,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" 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 1.0.69", + "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.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "transpose" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e" +dependencies = [ + "num-integer", + "strength_reduce", ] [[package]] @@ -1829,12 +5005,45 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tstr" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8e0294f14baae476d0dd0a2d780b2e24d66e349a9de876f5126777a37bdba7" +dependencies = [ + "tstr_proc_macros", +] + +[[package]] +name = "tstr_proc_macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78122066b0cb818b8afd08f7ed22f7fdbc3e90815035726f0840d0d26c0747a" + +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typeid" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "typewit" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214ca0b2191785cbc06209b9ca1861e048e39b5ba33574b3cedd58363d5bb5f6" + [[package]] name = "unicase" version = "2.8.1" @@ -1871,6 +5080,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817" +[[package]] +name = "unroll" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ad948c1cb799b1a70f836077721a92a35ac177d4daddf4c20a633786d4cf618" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "untrusted" version = "0.9.0" @@ -1901,12 +5120,24 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "walkdir" version = "2.5.0" @@ -1963,7 +5194,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 2.0.106", "wasm-bindgen-shared", ] @@ -1998,7 +5229,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2032,6 +5263,22 @@ dependencies = [ "wasm-bindgen", ] +[[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-util" version = "0.1.10" @@ -2041,6 +5288,12 @@ dependencies = [ "windows-sys 0.60.2", ] +[[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-core" version = "0.61.2" @@ -2049,7 +5302,7 @@ checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.3", "windows-result", "windows-strings", ] @@ -2062,7 +5315,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.106", ] [[package]] @@ -2073,7 +5326,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.106", ] [[package]] @@ -2082,13 +5335,19 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-registry" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ - "windows-link", + "windows-link 0.1.3", "windows-result", "windows-strings", ] @@ -2099,7 +5358,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -2108,7 +5367,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -2160,7 +5419,7 @@ version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ - "windows-link", + "windows-link 0.1.3", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -2267,6 +5526,15 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[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.7.13" @@ -2288,6 +5556,15 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +[[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.8.0" @@ -2308,10 +5585,30 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.106", "synstructure", ] +[[package]] +name = "zerocopy" +version = "0.8.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "zerofrom" version = "0.1.6" @@ -2329,7 +5626,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.106", "synstructure", ] @@ -2338,6 +5635,20 @@ 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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] [[package]] name = "zerotrie" @@ -2369,5 +5680,60 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.106", +] + +[[package]] +name = "zkhash-axiom" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d038a7895d0e3ab0a352f53e7eb4f1f829f88fce2fb3cff93d665a8a0e01af6" +dependencies = [ + "ark-ff", + "ark-std", + "bitvec", + "blake2", + "bls12_381", + "byteorder", + "cfg-if", + "group 0.12.1", + "group 0.13.0", + "halo2", + "hex", + "jubjub", + "lazy_static", + "pasta_curves 0.5.2", + "rand 0.8.7", + "serde", + "sha2", + "sha3", + "subtle", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", ] diff --git a/crates/sdk/Cargo.toml b/crates/sdk/Cargo.toml index 244baaa..f1fc0ba 100644 --- a/crates/sdk/Cargo.toml +++ b/crates/sdk/Cargo.toml @@ -24,3 +24,21 @@ url = "2.5" scopeguard = "1.2" chrono = { version = "0.4", features = ["serde"] } hex = "0.4" +sha2 = "0.10" +tempfile = "3" +toml = "0.9" + +# openvm pinned to the v2.0.0 release tag, matching what the proving backend's +# keygen runs (cloud-proving-backend/workloads_v2). stark-backend must match +# what openvm v2.0.0 pins (also tag v2.0.0) so both resolve to one tagged +# source. Used by the `deferral` module to derive deferral commits and the +# verify_stark parent input client-side. +openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", default-features = false, tag = "v2.0.0", features = [ + "parallel", +] } +openvm-sdk-config = { git = "https://github.com/openvm-org/openvm.git", default-features = false, tag = "v2.0.0" } +openvm-continuations = { git = "https://github.com/openvm-org/openvm.git", default-features = false, tag = "v2.0.0" } +openvm-verify-stark-host = { git = "https://github.com/openvm-org/openvm.git", default-features = false, tag = "v2.0.0" } +openvm-verify-stark-circuit = { git = "https://github.com/openvm-org/openvm.git", default-features = false, tag = "v2.0.0" } +openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", default-features = false, tag = "v2.0.0" } +openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", default-features = false, tag = "v2.0.0" } diff --git a/crates/sdk/src/deferral.rs b/crates/sdk/src/deferral.rs new file mode 100644 index 0000000..3b92eb0 --- /dev/null +++ b/crates/sdk/src/deferral.rs @@ -0,0 +1,756 @@ +//! Client-side deferral submission prep: derive everything a caller needs to +//! submit a `verify_stark` parent job from a child stark proof. +//! +//! The deferral design makes the CALLER responsible for computing the +//! guest-visible stdin values — notably `input_commit` — from the child proof +//! with the Rust SDK; there is no server-side fingerprint endpoint. This +//! module packages that derivation behind the Axiom API surface so no keyset +//! internals leak into the interface: +//! +//! - the config's complete `openvm.toml` (`GET /configs/{id}/config`) carries +//! the deferral circuit commit (`[[app_vm_config.deferral.circuits]]`); +//! - the config's `agg_vk` (`GET /configs/{id}/vk/agg`) is the child proof's +//! `MultiStarkVerifyingKey`; +//! - the PARENT program's `baseline.json` +//! (`GET /programs/{id}/download/baseline`) is the config-level +//! `VerificationBaseline` template; +//! - the two remaining keyset values (`def_hook_commit` and the verify-stark +//! circuit's cached commit) are deterministic fixed points of the config's +//! keygen parameters, so they are DERIVED locally from the downloaded toml +//! (exactly how backend keygen derives them: `DeferralAggProver::verify_stark` +//! on the agg params + 100-bit hook params + memory dimensions + num user +//! PVs) and cached under `~/.axiom/cache/` because the construction costs +//! several CPU-minutes. +//! +//! Outputs mirror the backend's internal helper: +//! - the child proof re-encoded as openvm-codec bytes +//! (`VersionedVmStarkProof::encode_to_vec`) — the ONLY encoding +//! `cargo axiom prove --deferred-proof` uploads; +//! - the parent's API input body `{"input": ["0x01"]}` — one entry +//! carrying the exact byte stream `StdIn::write(&input_commit)` produces; +//! - the raw 32-byte `input_commit` (hex) for logging. + +use std::{borrow::Borrow, path::PathBuf, slice::from_ref}; + +use eyre::{Context, Result, eyre}; +use openvm_continuations::CommitBytes; +use openvm_sdk::{ + F, StdIn, + config::{AggregationConfig, AggregationSystemParams, AppConfig}, + fs::read_object_from_file, + openvm_circuit::{ + arch::hasher::poseidon2::vm_poseidon2_hasher, system::program::trace::compute_exe_commit, + }, + prover::DeferralAggProver, + types::{VerificationBaselineJson, VersionedVmStarkProof}, +}; +use openvm_sdk_config::{SdkVmConfig, deferral::SupportedDeferral}; +use openvm_stark_backend::{ + codec::{Decode, Encode}, + keygen::types::MultiStarkVerifyingKey, + p3_field::PrimeField32, +}; +use openvm_stark_sdk::config::{ + baby_bear_poseidon2::{BabyBearPoseidon2Config, Digest}, + hook_params_with_100_bits_security, +}; +use openvm_verify_stark_circuit::extension::get_raw_deferral_results; +use openvm_verify_stark_host::{ + VmStarkProof, + pvs::{VM_PVS_AIR_ID, VmPvs}, + vk::{VerificationBaseline, VmStarkVerifyingKey}, +}; +use serde::{Deserialize, Serialize}; +use sha2::{Digest as _, Sha256}; + +use crate::{ + AxiomSdk, authenticated_get, config::ConfigSdk, download_file, get_axiom_dir, get_config_id, + looks_like_json, +}; + +/// Number of bytes in a serialized `CommitBytes` (BabyBear digest). +const COMMIT_NUM_BYTES: usize = 32; + +/// Stack size for the derivation thread. OpenVM keygen-style constructions +/// (deep recursive circuit builders) overflow the default thread stack. +const DERIVATION_STACK_BYTES: usize = 64 * 1024 * 1024; + +pub trait DeferralSdk { + /// Derive the parent-job API inputs for a `verify_stark` deferral job from + /// a child stark proof. Returns the child's `input_commit` as `0x`-hex. + fn prepare_deferral(&self, args: &DeferralPrepareArgs) -> Result; +} + +#[derive(Debug)] +pub struct DeferralPrepareArgs { + /// The child stark proof: either the JSON served by + /// `GET /proofs/{id}/proof/stark` or its openvm-codec binary encoding. + pub child_proof: PathBuf, + /// The config ID (defaults from `~/.axiom/config.json`). + pub config_id: Option, + /// The PARENT program ID (the `verify_stark` guest that will be proved). + pub program_id: String, + /// Output path: the child proof as openvm-codec bytes, ready to pass to + /// `cargo axiom prove --deferred-proof`. + pub out_child_bin: PathBuf, + /// Output path: the parent submission's JSON input body. + pub out_input_json: PathBuf, +} + +/// The `openvm.toml` schema the backend's keygen serves from +/// `GET /configs/{id}/config`: an `AppConfig` (flattened) plus an +/// optional `agg_config` section defaulting to the standard aggregation params. +#[derive(Debug, Clone, Deserialize)] +struct OpenvmConfig { + #[serde(flatten)] + app_config: AppConfig, + #[serde(default = "default_agg_config")] + agg_config: AggregationConfig, +} + +fn default_agg_config() -> AggregationConfig { + AggregationConfig { + params: AggregationSystemParams::default(), + } +} + +/// Deferral commits derived from a config toml, cached on disk because the +/// `DeferralAggProver` construction costs several CPU-minutes. Both fields are +/// bare hex (64 chars, no `0x`) of the 32-byte canonical commit encoding. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct CachedDeferralCommits { + /// The keyset's deferral hook commit (`baseline.expected_def_hook_commit` + /// override for the child vk). + pub def_hook_commit: String, + /// The verify-stark deferral circuit's cached commit + /// (`deferral_circuit_cached_commits[0]` in keygen terms) — folded into + /// each child's `input_commit`. + pub circuit_cached_commit: String, +} + +impl CachedDeferralCommits { + fn def_hook_commit_digest(&self) -> Result { + Ok(decode_bare_hex_commit(&self.def_hook_commit)?.into()) + } + + fn circuit_cached_commit_digest(&self) -> Result { + Ok(decode_bare_hex_commit(&self.circuit_cached_commit)?.into()) + } +} + +/// Cache file path for the deferral commits derived from this exact toml: +/// `~/.axiom/cache/deferral-commits-.json`. Keyed on +/// the raw bytes so any config change (even formatting) re-derives. +pub fn deferral_commits_cache_path(toml_bytes: &[u8]) -> Result { + let digest = Sha256::digest(toml_bytes); + Ok(get_axiom_dir()? + .join("cache") + .join(format!("deferral-commits-{}.json", hex::encode(digest)))) +} + +fn load_cached_commits(path: &std::path::Path) -> Option { + let contents = std::fs::read_to_string(path).ok()?; + serde_json::from_str(&contents).ok() +} + +fn store_cached_commits(path: &std::path::Path, commits: &CachedDeferralCommits) -> Result<()> { + if let Some(parent) = path.parent() { + std::fs::create_dir_all(parent) + .with_context(|| format!("failed to create cache dir {}", parent.display()))?; + } + std::fs::write(path, serde_json::to_vec_pretty(commits)?) + .with_context(|| format!("failed to write commit cache {}", path.display())) +} + +/// Decode a bare-hex 32-byte commit (no `0x`), the encoding both the cache +/// file and backend keygen's commit artifacts use. +fn decode_bare_hex_commit(hex_str: &str) -> Result { + let bytes = hex::decode(hex_str.trim()).context("invalid commit hex")?; + let arr: [u8; COMMIT_NUM_BYTES] = bytes.as_slice().try_into().map_err(|_| { + eyre!( + "commit must be {COMMIT_NUM_BYTES} bytes, got {}", + bytes.len() + ) + })?; + Ok(CommitBytes::new(arr)) +} + +fn commit_to_bare_hex(commit: &CommitBytes) -> String { + hex::encode(commit.as_slice()) +} + +fn parse_openvm_config(toml_str: &str) -> Result { + toml::from_str(toml_str).context("failed to parse the config's openvm.toml") +} + +/// Extract the verify-stark deferral circuit commit from the config toml's +/// `[[app_vm_config.deferral.circuits]]` section. Keygen writes this section +/// (with the keyset-derived commit) into the complete `openvm.toml` it serves; +/// a toml without it predates deferral support. +fn deferral_circuit_commit(config: &OpenvmConfig, config_id: &str) -> Result { + let deferral = config + .app_config + .app_vm_config + .deferral + .as_ref() + .ok_or_else(|| missing_deferral_section_error(config_id))?; + let circuit = deferral + .circuits + .first() + .ok_or_else(|| missing_deferral_section_error(config_id))?; + Ok(circuit.commit) +} + +fn missing_deferral_section_error(config_id: &str) -> eyre::Report { + eyre!( + "config {config_id} was keygen'd before deferral support (its openvm.toml has no \ + [[app_vm_config.deferral.circuits]] section); rerun keygen for this config" + ) +} + +/// All deferral commits derivable from a config toml. +pub struct DerivedDeferralCommits { + pub def_hook_commit: CommitBytes, + /// `deferral_circuit_cached_commits[0]`: the verify-stark circuit prover's + /// cached commit, folded into each child's `input_commit`. + /// + /// NOTE: this is NOT the toml's deferral circuit commit — empirically + /// verified against the standard-config keyset (see the ignored + /// `derive_matches_standard_config_keyset_constants` test), the two values + /// differ, so the cached commit cannot be read off the toml and must be + /// derived. It falls out of the same `DeferralAggProver` construction the + /// hook commit needs, so this costs nothing extra. + pub circuit_cached_commit: CommitBytes, + /// The deferral circuit commit (`make_config`), i.e. the value keygen bakes + /// into the served toml's `[[app_vm_config.deferral.circuits]]` section. + /// Derived alongside the others (no extra cost) as a keyset cross-check. + pub circuit_commit: CommitBytes, +} + +/// Derive the deferral commits from the config toml exactly as backend keygen +/// does (`keygen_lib::build_deferral_sdk`): construct +/// `DeferralAggProver::verify_stark` from the toml's aggregation params, the +/// 100-bit-security hook params, and the app system config's memory dimensions +/// and public-value count. Costs ~12s in a release build on a many-core +/// machine, but minutes in dev builds or on small machines; results are cached +/// by the caller. Runs on a large-stack thread (recursive circuit construction +/// overflows default stacks). +pub fn derive_deferral_commits(toml_str: &str) -> Result { + let toml_str = toml_str.to_string(); + std::thread::Builder::new() + .stack_size(DERIVATION_STACK_BYTES) + .spawn(move || -> Result { + let config = parse_openvm_config(&toml_str)?; + let agg_params = config.agg_config.params.clone(); + let (memory_dimensions, num_user_pvs) = { + let system_config = &config.app_config.app_vm_config.system.config; + ( + system_config.memory_config.memory_dimensions(), + system_config.num_public_values, + ) + }; + + let deferral_agg_prover = DeferralAggProver::verify_stark( + &agg_params, + hook_params_with_100_bits_security(), + memory_dimensions, + num_user_pvs, + ); + + let def_hook_commit: CommitBytes = deferral_agg_prover.def_hook_commit().into(); + + // The deferral circuit set is exactly [VerifyStark]; index 0 is the + // sole circuit. Mirrors GenericSdk::deferral_circuit_cached_commits(0). + let circuit_cached_commit = deferral_agg_prover + .multi_deferral_circuit_prover + .single_circuit_provers + .first() + .ok_or_else(|| eyre!("deferral prover has no circuits"))? + .def_circuit_prover + .cached_commits() + .first() + .copied() + .ok_or_else(|| eyre!("verify-stark circuit exposes no cached commits"))?; + + // Same derivation keygen uses for the served toml's circuit commit. + let circuit_commit = deferral_agg_prover + .multi_deferral_circuit_prover + .make_config(vec![SupportedDeferral::VerifyStark]) + .circuits + .first() + .ok_or_else(|| eyre!("make_config returned no circuits"))? + .commit; + + Ok(DerivedDeferralCommits { + def_hook_commit, + circuit_cached_commit, + circuit_commit, + }) + }) + .context("failed to spawn deferral derivation thread")? + .join() + .map_err(|_| eyre!("deferral derivation thread panicked"))? +} + +/// Parse a child stark proof from either encoding: the JSON artifact served by +/// proof download, or the openvm-codec binary (`encode_to_vec`). A codec +/// stream's leading bytes are a version-string length prefix and can never be +/// `{`, so the JSON sniff is unambiguous. +pub fn parse_child_proof(bytes: &[u8]) -> Result { + if looks_like_json(bytes) { + serde_json::from_slice(bytes) + .context("failed to parse child proof as VersionedVmStarkProof JSON") + } else { + VersionedVmStarkProof::decode(&mut &bytes[..]) + .map_err(|e| eyre!("failed to decode child proof as openvm-codec binary: {e}")) + } +} + +/// Compute a child program's `app_exe_commit` from its stark proof's VM public +/// values — the same computation openvm's `verify_vm_stark_proof_pvs` performs. +/// This is the one program-specific field of the child's +/// [`VerificationBaseline`]. +fn child_app_exe_commit(proof: &VmStarkProof) -> Result { + let vm_pvs_air = proof + .inner + .public_values + .get(VM_PVS_AIR_ID) + .ok_or_else(|| { + eyre!( + "child stark proof has only {} public-value AIR(s) but VmPvs lives at \ + VM_PVS_AIR_ID={VM_PVS_AIR_ID}; the child proof is malformed or from a \ + different keyset", + proof.inner.public_values.len(), + ) + })?; + let vm_pvs: &VmPvs = vm_pvs_air.as_slice().borrow(); + Ok(compute_exe_commit( + &vm_poseidon2_hasher(), + &vm_pvs.program_commit, + &vm_pvs.initial_root, + vm_pvs.initial_pc, + )) +} + +/// Build the child [`VmStarkVerifyingKey`]: the config's `agg_vk` as `mvk`, the +/// parent program's config-level `baseline` with two child/deferral overrides +/// applied ([`child_baseline`]). +fn build_child_vk( + mvk: MultiStarkVerifyingKey, + baseline: VerificationBaseline, + child_app_exe_commit: Digest, + expected_def_hook_commit: Digest, +) -> VmStarkVerifyingKey { + VmStarkVerifyingKey { + mvk, + baseline: child_baseline(baseline, child_app_exe_commit, expected_def_hook_commit), + } +} + +/// Apply the child/deferral overrides to a config-level `baseline` template: +/// the child's `app_exe_commit`, and the deferral-aware +/// `expected_def_hook_commit` (the on-disk `baseline.json` always carries +/// `None`, but every child proof on a deferral config carries deferral public +/// values, so the child vk MUST be deferral-aware). +fn child_baseline( + mut baseline: VerificationBaseline, + child_app_exe_commit: Digest, + expected_def_hook_commit: Digest, +) -> VerificationBaseline { + baseline.app_exe_commit = child_app_exe_commit; + baseline.expected_def_hook_commit = Some(expected_def_hook_commit); + baseline +} + +/// Convert a built [`StdIn`] into the API's `0x01`-prefixed input entries, one +/// entry per stdin buffer item. +/// +/// Round-trip argument: `StdIn::write(&T)` serializes `T` into u32 words +/// (openvm serde), splits them into LE bytes, and stores ONE FIELD ELEMENT PER +/// BYTE (`write_bytes`). The API's `0x01` decoding is exactly `write_bytes` on +/// the raw bytes, so hex-encoding each buffer item's per-byte field elements +/// reproduces the identical stdin worker-side. +fn stdin_to_input_entries(stdin: &StdIn) -> Result> { + stdin + .buffer + .iter() + .map(|fes| { + let bytes = fes + .iter() + .map(|f| { + let v = f.as_canonical_u32(); + u8::try_from(v).map_err(|_| { + eyre!( + "stdin field element {v} does not fit in a byte; not a write_bytes \ + stream" + ) + }) + }) + .collect::>>()?; + Ok(format!("0x01{}", hex::encode(bytes))) + }) + .collect() +} + +/// Build the parent guest's stdin. The `verify_stark` parent guest reads +/// exactly one value: `let input_commit: Commit = read();` (`Commit = [u8; 32]`). +fn parent_stdin(input_commit: &[u8; COMMIT_NUM_BYTES]) -> StdIn { + let mut stdin = StdIn::default(); + stdin.write(input_commit); + stdin +} + +/// Parent API input body: same schema as a plain proof submission JSON body. +#[derive(Debug, Serialize)] +struct InputBody { + input: Vec, +} + +impl DeferralSdk for AxiomSdk { + fn prepare_deferral(&self, args: &DeferralPrepareArgs) -> Result { + let config_id = get_config_id(args.config_id.as_deref(), &self.config)?; + + // --- Download everything through the public API surface. --- + + // The config's complete openvm.toml (carries the deferral circuit + // commit) — also the cache key for the derived commits. + let toml_bytes = self.download_config(Some(&config_id), None)?; + let toml_str = std::str::from_utf8(&toml_bytes) + .context("config openvm.toml is not valid UTF-8")? + .to_string(); + let openvm_config = parse_openvm_config(&toml_str)?; + let toml_commit = deferral_circuit_commit(&openvm_config, &config_id)?; + + // The config's aggregation verifying key (the child proof's mvk). + let tmp_dir = tempfile::tempdir().context("failed to create temp dir")?; + let agg_vk_path = tmp_dir.path().join("agg_vk"); + let downloader = self.get_proving_keys(Some(&config_id), "agg_vk")?; + downloader + .download_pk_with_callback(&agg_vk_path.to_string_lossy(), &*self.callback) + .context("failed to download the config's agg verifying key")?; + let mvk: MultiStarkVerifyingKey = + read_object_from_file(&agg_vk_path).context("failed to decode agg verifying key")?; + + // The PARENT program's baseline.json (config-level baseline template). + self.callback.on_info(&format!( + "Downloading baseline for parent program {}", + args.program_id + )); + let baseline_url = format!( + "{}/programs/{}/download/baseline", + self.config.api_url, args.program_id + ); + let baseline_bytes = download_file( + authenticated_get(&self.config, &baseline_url)?, + None, + "Failed to download the parent program's baseline", + )?; + let baseline: VerificationBaseline = + serde_json::from_slice::(&baseline_bytes) + .context("failed to parse the parent program's baseline.json")? + .into(); + + // --- Child proof: parse (JSON or codec), re-encode to codec bytes. --- + let child_bytes = std::fs::read(&args.child_proof) + .with_context(|| format!("failed to read {}", args.child_proof.display()))?; + let versioned = parse_child_proof(&child_bytes)?; + let codec_bytes = versioned + .encode_to_vec() + .map_err(|e| eyre!("failed to codec-encode child proof: {e}"))?; + if let Some(parent) = args.out_child_bin.parent() { + std::fs::create_dir_all(parent)?; + } + std::fs::write(&args.out_child_bin, &codec_bytes) + .with_context(|| format!("failed to write {}", args.out_child_bin.display()))?; + let proof = VmStarkProof::try_from(versioned) + .map_err(|e| eyre!("failed to decode child VmStarkProof: {e}"))?; + + // --- Deferral commits: cache hit or expensive local derivation. --- + let cache_path = deferral_commits_cache_path(&toml_bytes)?; + let cached = match load_cached_commits(&cache_path) { + Some(cached) => cached, + None => { + self.callback.on_info(&format!( + "first run for config {config_id}: deriving deferral commits (may take \ + several minutes)..." + )); + let derived = derive_deferral_commits(&toml_str)?; + // Keyset cross-check: the derived circuit commit must equal the + // commit keygen baked into the served toml. A mismatch means + // this CLI's openvm pin diverged from the config's keyset. + if derived.circuit_commit != toml_commit { + return Err(eyre!( + "derived deferral circuit commit 0x{} does not match the config's \ + openvm.toml commit 0x{}; the CLI's pinned openvm version does not \ + match config {config_id}'s keyset", + commit_to_bare_hex(&derived.circuit_commit), + commit_to_bare_hex(&toml_commit), + )); + } + let cached = CachedDeferralCommits { + def_hook_commit: commit_to_bare_hex(&derived.def_hook_commit), + circuit_cached_commit: commit_to_bare_hex(&derived.circuit_cached_commit), + }; + store_cached_commits(&cache_path, &cached)?; + self.callback.on_info(&format!( + "deferral commits cached at {}", + cache_path.display() + )); + cached + } + }; + let def_hook_commit: Digest = cached.def_hook_commit_digest()?; + let circuit_cached_commit: Digest = cached.circuit_cached_commit_digest()?; + + // --- Derive input_commit exactly as the proving worker does. --- + // get_raw_deferral_results verifies the child proof, so a wrong-keyset + // child fails HERE, before any job is submitted. + let exe_commit = child_app_exe_commit(&proof)?; + let child_vk = build_child_vk(mvk, baseline, exe_commit, def_hook_commit); + let raw = get_raw_deferral_results(&child_vk, from_ref(&proof), circuit_cached_commit) + .map_err(|e| eyre!("get_raw_deferral_results failed: {e}"))?; + let input_commit: [u8; COMMIT_NUM_BYTES] = raw[0] + .input + .clone() + .try_into() + .map_err(|v: Vec| eyre!("input_commit must be 32 bytes, got {}", v.len()))?; + + // --- Parent input body. --- + let entries = stdin_to_input_entries(&parent_stdin(&input_commit))?; + let body = InputBody { input: entries }; + if let Some(parent) = args.out_input_json.parent() { + std::fs::create_dir_all(parent)?; + } + std::fs::write(&args.out_input_json, serde_json::to_vec_pretty(&body)?) + .with_context(|| format!("failed to write {}", args.out_input_json.display()))?; + + let input_commit_hex = format!("0x{}", hex::encode(input_commit)); + self.callback.on_field("input_commit", &input_commit_hex); + self.callback.on_success(&format!( + "wrote {} and {}", + args.out_child_bin.display(), + args.out_input_json.display() + )); + Ok(input_commit_hex) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + /// Pin the exact byte encoding `StdIn::write(&[u8; 32])` produces, i.e. + /// what the parent's `0x01` input entry must carry. openvm serde + /// serializes each `u8` of a fixed-size array as its own u32 word, and + /// `StdIn::write` flattens words to LE bytes — so a 32-byte commit becomes + /// 128 bytes: each commit byte followed by three zero bytes. NOT the 32 + /// raw bytes. (Mirrors the backend's internal deferral_prepare pin test.) + #[test] + fn stdin_write_commit_encoding_is_one_word_per_byte() { + let commit: [u8; COMMIT_NUM_BYTES] = std::array::from_fn(|i| (i as u8) + 1); + let stdin = parent_stdin(&commit); + assert_eq!(stdin.buffer.len(), 1, "one write => one stream entry"); + + let expected: Vec = commit.iter().flat_map(|&b| [b, 0, 0, 0]).collect(); + let entries = stdin_to_input_entries(&stdin).unwrap(); + assert_eq!(entries.len(), 1); + assert_eq!(entries[0], format!("0x01{}", hex::encode(&expected))); + assert_eq!(entries[0].len(), 2 + 2 + 2 * 128, "0x + 01 + 128 bytes hex"); + } + + /// The input body round-trips through the API's own parsing rules: JSON + /// object with an "input" list of `0x01`-prefixed hex strings whose byte + /// decoding reproduces the stdin. + #[test] + fn input_body_round_trips_through_api_input_decoding() { + let commit: [u8; COMMIT_NUM_BYTES] = std::array::from_fn(|i| 255 - i as u8); + let original = parent_stdin(&commit); + let body = InputBody { + input: stdin_to_input_entries(&original).unwrap(), + }; + let json = serde_json::to_string(&body).unwrap(); + + // Re-parse as the API/worker would: strip 0x01, hex-decode, write_bytes. + let parsed: serde_json::Value = serde_json::from_str(&json).unwrap(); + let mut reconstructed = StdIn::default(); + for entry in parsed["input"].as_array().unwrap() { + let s = entry.as_str().unwrap(); + assert!(s.starts_with("0x01"), "byte-stream entries only"); + let bytes = hex::decode(&s[4..]).unwrap(); + reconstructed.write_bytes(&bytes); + } + + let flatten = |s: &StdIn| -> Vec { + s.buffer + .iter() + .flat_map(|fes| fes.iter().map(F::as_canonical_u32)) + .collect() + }; + assert_eq!(flatten(&original), flatten(&reconstructed)); + } + + /// The commit cache round-trips: what `store_cached_commits` writes, + /// `load_cached_commits` reads back identically, and the hex fields decode + /// to the original digests. Also pins that the cache path is keyed on the + /// toml BYTES (different bytes => different path). + #[test] + fn commit_cache_round_trips() { + let commit = CommitBytes::from([1u32, 2, 3, 4, 5, 6, 7, 8]); + let cached = CachedDeferralCommits { + def_hook_commit: commit_to_bare_hex(&commit), + circuit_cached_commit: commit_to_bare_hex(&commit), + }; + + let dir = tempfile::tempdir().unwrap(); + // Exercise the create_dir_all path with a nested location. + let path = dir.path().join("cache").join("deferral-commits-test.json"); + store_cached_commits(&path, &cached).unwrap(); + let loaded = load_cached_commits(&path).unwrap(); + assert_eq!(loaded, cached); + + let digest: Digest = loaded.def_hook_commit_digest().unwrap(); + assert_eq!(CommitBytes::from(digest), commit); + + // Missing file and corrupt file are both cache misses, not errors. + assert!(load_cached_commits(&dir.path().join("nope.json")).is_none()); + std::fs::write(dir.path().join("bad.json"), b"not json").unwrap(); + assert!(load_cached_commits(&dir.path().join("bad.json")).is_none()); + + // Path is keyed on the toml bytes. + let p1 = deferral_commits_cache_path(b"toml-a").unwrap(); + let p2 = deferral_commits_cache_path(b"toml-b").unwrap(); + assert_ne!(p1, p2); + assert_eq!(p1, deferral_commits_cache_path(b"toml-a").unwrap()); + assert!( + p1.file_name() + .unwrap() + .to_string_lossy() + .starts_with("deferral-commits-") + ); + } + + /// A keygen-served toml (deferral section present) parses and exposes the + /// circuit commit; a pre-deferral toml errors with the rerun-keygen + /// message. + #[test] + fn toml_deferral_section_parse_and_clear_error_when_absent() { + let with_deferral = r#" +[app_vm_config.rv32i] +[app_vm_config.rv32m] +[app_vm_config.io] + +[[app_vm_config.deferral.circuits]] +def_type = "VerifyStark" +commit = "0x0028f0c4c21eb53a99c7480ecc941110425c5dea91fb74de6d458b29492ebaf7" +"#; + let config = parse_openvm_config(with_deferral).unwrap(); + let commit = deferral_circuit_commit(&config, "cfg_test").unwrap(); + assert_eq!( + commit_to_bare_hex(&commit), + "0028f0c4c21eb53a99c7480ecc941110425c5dea91fb74de6d458b29492ebaf7" + ); + + let without_deferral = r#" +[app_vm_config.rv32i] +[app_vm_config.rv32m] +[app_vm_config.io] +"#; + let config = parse_openvm_config(without_deferral).unwrap(); + let err = deferral_circuit_commit(&config, "cfg_test").unwrap_err(); + let msg = err.to_string(); + assert!( + msg.contains("keygen'd before deferral support") && msg.contains("rerun keygen"), + "error must tell the user to rerun keygen, got: {msg}" + ); + assert!(msg.contains("cfg_test"), "error names the config: {msg}"); + } + + /// The child-proof sniffing accepts BOTH encodings the docs promise: the + /// downloaded JSON artifact and the openvm-codec binary. Inner proof bytes + /// are opaque at this level, so a dummy envelope is used; equality of the + /// re-parsed envelope proves the decode path. + #[test] + fn parse_child_proof_accepts_json_and_codec() { + let versioned = VersionedVmStarkProof { + version: "v9.9-test".to_string(), + proof: vec![1, 2, 3], + user_pvs_proof: vec![4, 5], + deferral_merkle_proofs: None, + }; + + let json_bytes = serde_json::to_vec(&versioned).unwrap(); + let from_json = parse_child_proof(&json_bytes).unwrap(); + assert_eq!(from_json.version, versioned.version); + assert_eq!(from_json.proof, versioned.proof); + + let codec_bytes = versioned.encode_to_vec().unwrap(); + let from_codec = parse_child_proof(&codec_bytes).unwrap(); + assert_eq!(from_codec.version, versioned.version); + assert_eq!(from_codec.proof, versioned.proof); + + // Garbage that is neither fails with the codec error (not a panic). + assert!(parse_child_proof(&[0xff, 0xfe, 0xfd]).is_err()); + } + + /// One-time probe against the standard config's known keyset constants + /// (openvm v2.0.0, default aggregation params, 100-bit hook params, + /// default memory dimensions and public values — what + /// openvm_standard.toml yields). Verifies: + /// - the derived `def_hook_commit` matches the backend keyset's artifact + /// (the constant guarded by the backend's deferral e2e test); + /// - the derived circuit commit matches the commit keygen bakes into the + /// served openvm.toml; + /// - EMPIRICAL ANSWER (run 2026-07-27, openvm v2.0.0): + /// `deferral_circuit_cached_commits[0]` does NOT equal the toml's + /// circuit commit — the cached commit is the circuit's PCS trace + /// commitment while the toml commit hashes six vk-commit components — + /// so the cached commit must always be derived; there is no toml + /// shortcut. + /// + /// Ignored by default: the DeferralAggProver construction is full circuit + /// keygen (~12s release on a many-core machine, minutes otherwise). Run: + /// cargo test -p axiom-sdk --release derive_matches_standard_config -- --ignored --nocapture + #[test] + #[ignore = "expensive DeferralAggProver construction"] + fn derive_matches_standard_config_keyset_constants() { + const EXPECTED_DEF_HOOK_COMMIT: &str = + "003d2f6e11db9ed346a6b595d4c8e358f7e434b4bd6fa378741898d861209fb4"; + const EXPECTED_CIRCUIT_COMMIT: &str = + "0028f0c4c21eb53a99c7480ecc941110425c5dea91fb74de6d458b29492ebaf7"; + // Observed on the first probe run; pinned so keyset drift is loud. + const EXPECTED_CIRCUIT_CACHED_COMMIT: &str = + "001d294a5c49bd8a5a1ec12238795ea7c6d25326ab44d6aa493b4b73742e8dff"; + + let toml_str = include_str!("../test-fixtures/openvm_standard.toml"); + let derived = derive_deferral_commits(toml_str).unwrap(); + + let hook_hex = commit_to_bare_hex(&derived.def_hook_commit); + let cached_hex = commit_to_bare_hex(&derived.circuit_cached_commit); + let circuit_hex = commit_to_bare_hex(&derived.circuit_commit); + println!("def_hook_commit: {hook_hex}"); + println!("circuit_cached_commit: {cached_hex}"); + println!("circuit_commit (toml): {circuit_hex}"); + println!( + "cached_commit == toml circuit commit? {}", + cached_hex == circuit_hex + ); + + assert_eq!( + hook_hex, EXPECTED_DEF_HOOK_COMMIT, + "def_hook_commit drifted" + ); + assert_eq!( + circuit_hex, EXPECTED_CIRCUIT_COMMIT, + "deferral circuit commit drifted" + ); + assert_eq!( + cached_hex, EXPECTED_CIRCUIT_CACHED_COMMIT, + "verify-stark circuit cached commit drifted" + ); + assert_ne!( + cached_hex, circuit_hex, + "cached commit and toml circuit commit are distinct values; if this ever \ + starts failing, revisit DerivedDeferralCommits' docs" + ); + } +} diff --git a/crates/sdk/src/lib.rs b/crates/sdk/src/lib.rs index 1586b22..bd99122 100644 --- a/crates/sdk/src/lib.rs +++ b/crates/sdk/src/lib.rs @@ -16,6 +16,7 @@ use crate::input::decode_hex_string; pub mod build; pub mod config; +pub mod deferral; pub mod input; pub mod projects; pub mod prove; @@ -489,6 +490,16 @@ fn handle_response(response: Response) -> Result<()> { } } +/// A file whose first non-whitespace byte is `{` is JSON, never an +/// openvm-codec stream (whose leading bytes are a version-string length +/// prefix). Used to tell the two proof encodings apart client-side. +pub(crate) fn looks_like_json(bytes: &[u8]) -> bool { + bytes + .iter() + .find(|b| !b.is_ascii_whitespace()) + .is_some_and(|b| *b == b'{') +} + /// A reader wrapper that tracks total bytes read via an atomic counter. /// Useful for monitoring upload progress from a separate thread. pub struct CountingReader { diff --git a/crates/sdk/src/prove.rs b/crates/sdk/src/prove.rs index 5eca28f..d42ce9a 100644 --- a/crates/sdk/src/prove.rs +++ b/crates/sdk/src/prove.rs @@ -7,7 +7,7 @@ use serde_json::{Value, json}; use crate::{ AxiomSdk, ProgressCallback, ProofType, authenticated_get, authenticated_post, download_file, - input::Input, send_request_json, + input::Input, looks_like_json, send_request_json, }; const PROOF_POLLING_INTERVAL_SECS: u64 = 10; @@ -534,19 +534,9 @@ impl AxiomSdk { } } -/// A file whose first non-whitespace byte is `{` is JSON, never an -/// openvm-codec stream (whose leading bytes are a version-string length -/// prefix). Used to reject accidental stark-proof-JSON uploads client-side. -fn looks_like_json(bytes: &[u8]) -> bool { - bytes - .iter() - .find(|b| !b.is_ascii_whitespace()) - .is_some_and(|b| *b == b'{') -} - #[cfg(test)] mod deferred_proof_tests { - use super::looks_like_json; + use crate::looks_like_json; #[test] fn json_sniff_matches_codec_reality() { diff --git a/crates/sdk/test-fixtures/openvm_standard.toml b/crates/sdk/test-fixtures/openvm_standard.toml new file mode 100644 index 0000000..eac2c0a --- /dev/null +++ b/crates/sdk/test-fixtures/openvm_standard.toml @@ -0,0 +1,72 @@ +[app_vm_config.rv32i] +[app_vm_config.rv32m] +[app_vm_config.io] + +[app_vm_config.keccak] +[app_vm_config.sha2] +[app_vm_config.bigint] + +[app_vm_config.modular] +supported_moduli = [ + # bn254 (alt bn128) + "21888242871839275222246405745257275088696311157297823662689037894645226208583", # coordinate field + "21888242871839275222246405745257275088548364400416034343698204186575808495617", # scalar field + # secp256k1 (k256) + "115792089237316195423570985008687907853269984665640564039457584007908834671663", # coordinate field + "115792089237316195423570985008687907852837564279074904382605163141518161494337", # scalar field + # secp256r1 (p256) + "115792089210356248762697446949407573530086143415290314195533631308867097853951", # coordinate + "115792089210356248762697446949407573529996955224135760342422259061068512044369", # scalar + # bls12_381 + "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787", # coordinate field + "52435875175126190479447740508185965837690552500527637822603658699938581184513", # scalar field +] + +[app_vm_config.fp2] +supported_moduli = [ + [ + "Bn254Fp2", + # bn254 (alt bn128) + "21888242871839275222246405745257275088696311157297823662689037894645226208583", + ], + # Bls12_381 + [ + "Bls12_381Fp2", + "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787", + ], +] + +# bn254 (alt bn128) +[[app_vm_config.ecc.supported_curves]] +struct_name = "Bn254G1Affine" +modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583" +scalar = "21888242871839275222246405745257275088548364400416034343698204186575808495617" +a = "0" +b = "3" + +# secp256k1 (k256) +[[app_vm_config.ecc.supported_curves]] +struct_name = "Secp256k1Point" +modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663" +scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337" +a = "0" +b = "7" + +# secp256r1 (p256) +[[app_vm_config.ecc.supported_curves]] +struct_name = "P256Point" +modulus = "115792089210356248762697446949407573530086143415290314195533631308867097853951" +scalar = "115792089210356248762697446949407573529996955224135760342422259061068512044369" +a = "115792089210356248762697446949407573530086143415290314195533631308867097853948" +b = "41058363725152142129326129780047268409114441015993725554835256314039467401291" + +# bls12_381 +[[app_vm_config.ecc.supported_curves]] +struct_name = "Bls12_381G1Affine" +modulus = "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787" +scalar = "52435875175126190479447740508185965837690552500527637822603658699938581184513" +a = "0" +b = "4" + +[app_vm_config.pairing] +supported_curves = ["Bn254", "Bls12_381"] From a711eccd3f3d475651b897875a0d0cfc158460c6 Mon Sep 17 00:00:00 2001 From: Lun-Kai Hsu Date: Mon, 27 Jul 2026 16:44:52 +0000 Subject: [PATCH 2/3] feat(cli): cargo axiom deferral prepare subcommand New DeferralCmd group wired into the CLI: cargo axiom deferral prepare --child-proof [--config-id ] --program-id --out-child-bin --out-input-json --config-id defaults from ~/.axiom/config.json like other commands; --program-id names the PARENT program (the verify_stark guest). The child proof is accepted in either encoding (downloaded JSON or openvm-codec binary, sniffed by first byte). Prints the derived input_commit and the follow-up prove command. --- crates/cli/src/commands/deferral.rs | 93 +++++++++++++++++++++++++++++ crates/cli/src/commands/mod.rs | 2 + crates/cli/src/main.rs | 7 ++- 3 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 crates/cli/src/commands/deferral.rs diff --git a/crates/cli/src/commands/deferral.rs b/crates/cli/src/commands/deferral.rs new file mode 100644 index 0000000..ea8b949 --- /dev/null +++ b/crates/cli/src/commands/deferral.rs @@ -0,0 +1,93 @@ +use std::path::PathBuf; + +use axiom_sdk::{ + AxiomSdk, + deferral::{DeferralPrepareArgs, DeferralSdk}, +}; +use clap::{Args, Subcommand}; +use eyre::Result; + +use crate::progress::CliProgressCallback; + +#[derive(Args, Debug)] +pub struct DeferralCmd { + #[command(subcommand)] + command: DeferralSubcommand, +} + +#[derive(Debug, Subcommand)] +enum DeferralSubcommand { + /// Derive the parent-job inputs for a verify_stark deferral job from a + /// completed child stark proof. + /// + /// Downloads what it needs from the Axiom API (the config's openvm.toml + /// and agg verifying key, and the parent program's verification baseline), + /// verifies the child proof locally, and writes the two artifacts a parent + /// submission needs: the child proof re-encoded as openvm-codec bytes + /// (pass to `cargo axiom prove --deferred-proof`) and the parent's input + /// JSON body (pass to `cargo axiom prove --input`). + /// + /// The first run for a config derives its deferral commitments locally + /// (several CPU-minutes); the result is cached under ~/.axiom/cache/ and + /// reused on later runs. + Prepare { + /// The child stark proof: the JSON from + /// `cargo axiom prove download --type stark`, or its openvm-codec + /// binary encoding + #[clap(long, value_name = "FILE")] + child_proof: PathBuf, + + /// The config ID (defaults to the configured config_id) + #[clap(long, value_name = "ID")] + config_id: Option, + + /// The PARENT program ID (the verify_stark guest the parent job will + /// prove) + #[clap(long, value_name = "ID")] + program_id: String, + + /// Output: the child proof as openvm-codec bytes, ready for + /// `cargo axiom prove --deferred-proof` + #[clap(long, value_name = "FILE")] + out_child_bin: PathBuf, + + /// Output: the parent submission's input JSON body, ready for + /// `cargo axiom prove --input` + #[clap(long, value_name = "FILE")] + out_input_json: PathBuf, + }, +} + +impl DeferralCmd { + pub fn run(self) -> Result<()> { + let config = axiom_sdk::load_config()?; + let sdk = AxiomSdk::new(config).with_callback(CliProgressCallback::new()); + + match self.command { + DeferralSubcommand::Prepare { + child_proof, + config_id, + program_id, + out_child_bin, + out_input_json, + } => { + let args = DeferralPrepareArgs { + child_proof, + config_id, + program_id, + out_child_bin: out_child_bin.clone(), + out_input_json: out_input_json.clone(), + }; + let input_commit = sdk.prepare_deferral(&args)?; + println!("input_commit: {input_commit}"); + println!( + "Submit the parent job with:\n cargo axiom prove --program-id \ + --input {} --deferred-proof {}", + out_input_json.display(), + out_child_bin.display() + ); + Ok(()) + } + } + } +} diff --git a/crates/cli/src/commands/mod.rs b/crates/cli/src/commands/mod.rs index 0d5d9a7..dafa7f8 100644 --- a/crates/cli/src/commands/mod.rs +++ b/crates/cli/src/commands/mod.rs @@ -1,5 +1,6 @@ pub mod build; pub mod config; +pub mod deferral; pub mod init; pub mod projects; pub mod prove; @@ -11,6 +12,7 @@ pub mod version; pub use build::BuildCmd; pub use config::ConfigCmd; +pub use deferral::DeferralCmd; pub use init::InitCmd; pub use projects::ProjectsCmd; pub use prove::ProveCmd; diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index e56ffaf..4cc4566 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -11,8 +11,8 @@ mod formatting; mod progress; use commands::{ - BuildCmd, ConfigCmd, InitCmd, ProjectsCmd, ProveCmd, RegisterCmd, RunCmd, UploadExeCmd, - VerifyCmd, VersionCmd, + BuildCmd, ConfigCmd, DeferralCmd, InitCmd, ProjectsCmd, ProveCmd, RegisterCmd, RunCmd, + UploadExeCmd, VerifyCmd, VersionCmd, }; #[derive(Parser)] @@ -49,6 +49,8 @@ enum AxiomCommands { Config(ConfigCmd), /// Verify a proof using the Axiom Verifying Service Verify(VerifyCmd), + /// Prepare deferral (verify_stark) submissions + Deferral(DeferralCmd), /// Manage projects Projects(ProjectsCmd), /// Upload pre-built VMEXE to Axiom Proving Service @@ -151,6 +153,7 @@ fn main() { AxiomCommands::Run(cmd) => cmd.run(), AxiomCommands::Config(cmd) => cmd.run(), AxiomCommands::Verify(cmd) => cmd.run(), + AxiomCommands::Deferral(cmd) => cmd.run(), AxiomCommands::Projects(cmd) => cmd.run(), AxiomCommands::UploadExe(cmd) => cmd.run(), AxiomCommands::Version(cmd) => cmd.run(), From 71ed7e66ebca7369dfe0633869856a7542d50864 Mon Sep 17 00:00:00 2001 From: Lun-Kai Hsu Date: Mon, 27 Jul 2026 16:58:18 +0000 Subject: [PATCH 3/3] test: derive the standard config from SdkVmConfig::standard(), drop copied fixture sdk-config is the canonical owner of openvm_standard.toml (it ships the file and embeds it as SdkVmConfig::standard()'s docs); a copied fixture can drift from the pinned openvm version, the constructor cannot. The probe serializes the constructed config to the user-toml shape and feeds it through the same parse path a served config takes, so it now also pins constructor-vs-toml equivalence: all three derived constants unchanged (verified, 12s release). --- crates/sdk/src/deferral.rs | 21 ++++-- crates/sdk/test-fixtures/openvm_standard.toml | 72 ------------------- 2 files changed, 17 insertions(+), 76 deletions(-) delete mode 100644 crates/sdk/test-fixtures/openvm_standard.toml diff --git a/crates/sdk/src/deferral.rs b/crates/sdk/src/deferral.rs index 3b92eb0..5d0b2e4 100644 --- a/crates/sdk/src/deferral.rs +++ b/crates/sdk/src/deferral.rs @@ -694,8 +694,12 @@ commit = "0x0028f0c4c21eb53a99c7480ecc941110425c5dea91fb74de6d458b29492ebaf7" /// One-time probe against the standard config's known keyset constants /// (openvm v2.0.0, default aggregation params, 100-bit hook params, - /// default memory dimensions and public values — what - /// openvm_standard.toml yields). Verifies: + /// default memory dimensions and public values). The config comes from + /// `SdkVmConfig::standard()` — the canonical constructor whose docs embed + /// sdk-config's own `openvm_standard.toml` — serialized to the user-toml + /// shape and fed through the SAME parse path a served config takes, so + /// this also pins constructor ≡ toml equivalence (a divergence would + /// change the derived constants and fail the assertions). Verifies: /// - the derived `def_hook_commit` matches the backend keyset's artifact /// (the constant guarded by the backend's deferral e2e test); /// - the derived circuit commit matches the commit keygen bakes into the @@ -721,8 +725,17 @@ commit = "0x0028f0c4c21eb53a99c7480ecc941110425c5dea91fb74de6d458b29492ebaf7" const EXPECTED_CIRCUIT_CACHED_COMMIT: &str = "001d294a5c49bd8a5a1ec12238795ea7c6d25326ab44d6aa493b4b73742e8dff"; - let toml_str = include_str!("../test-fixtures/openvm_standard.toml"); - let derived = derive_deferral_commits(toml_str).unwrap(); + // The canonical standard config, from the dependency itself — no + // copied fixture to drift. + #[derive(serde::Serialize)] + struct UserToml { + app_vm_config: SdkVmConfig, + } + let toml_str = toml::to_string(&UserToml { + app_vm_config: SdkVmConfig::standard(), + }) + .unwrap(); + let derived = derive_deferral_commits(&toml_str).unwrap(); let hook_hex = commit_to_bare_hex(&derived.def_hook_commit); let cached_hex = commit_to_bare_hex(&derived.circuit_cached_commit); diff --git a/crates/sdk/test-fixtures/openvm_standard.toml b/crates/sdk/test-fixtures/openvm_standard.toml deleted file mode 100644 index eac2c0a..0000000 --- a/crates/sdk/test-fixtures/openvm_standard.toml +++ /dev/null @@ -1,72 +0,0 @@ -[app_vm_config.rv32i] -[app_vm_config.rv32m] -[app_vm_config.io] - -[app_vm_config.keccak] -[app_vm_config.sha2] -[app_vm_config.bigint] - -[app_vm_config.modular] -supported_moduli = [ - # bn254 (alt bn128) - "21888242871839275222246405745257275088696311157297823662689037894645226208583", # coordinate field - "21888242871839275222246405745257275088548364400416034343698204186575808495617", # scalar field - # secp256k1 (k256) - "115792089237316195423570985008687907853269984665640564039457584007908834671663", # coordinate field - "115792089237316195423570985008687907852837564279074904382605163141518161494337", # scalar field - # secp256r1 (p256) - "115792089210356248762697446949407573530086143415290314195533631308867097853951", # coordinate - "115792089210356248762697446949407573529996955224135760342422259061068512044369", # scalar - # bls12_381 - "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787", # coordinate field - "52435875175126190479447740508185965837690552500527637822603658699938581184513", # scalar field -] - -[app_vm_config.fp2] -supported_moduli = [ - [ - "Bn254Fp2", - # bn254 (alt bn128) - "21888242871839275222246405745257275088696311157297823662689037894645226208583", - ], - # Bls12_381 - [ - "Bls12_381Fp2", - "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787", - ], -] - -# bn254 (alt bn128) -[[app_vm_config.ecc.supported_curves]] -struct_name = "Bn254G1Affine" -modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583" -scalar = "21888242871839275222246405745257275088548364400416034343698204186575808495617" -a = "0" -b = "3" - -# secp256k1 (k256) -[[app_vm_config.ecc.supported_curves]] -struct_name = "Secp256k1Point" -modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663" -scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337" -a = "0" -b = "7" - -# secp256r1 (p256) -[[app_vm_config.ecc.supported_curves]] -struct_name = "P256Point" -modulus = "115792089210356248762697446949407573530086143415290314195533631308867097853951" -scalar = "115792089210356248762697446949407573529996955224135760342422259061068512044369" -a = "115792089210356248762697446949407573530086143415290314195533631308867097853948" -b = "41058363725152142129326129780047268409114441015993725554835256314039467401291" - -# bls12_381 -[[app_vm_config.ecc.supported_curves]] -struct_name = "Bls12_381G1Affine" -modulus = "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787" -scalar = "52435875175126190479447740508185965837690552500527637822603658699938581184513" -a = "0" -b = "4" - -[app_vm_config.pairing] -supported_curves = ["Bn254", "Bls12_381"]