diff --git a/.github/.DS_Store b/.github/.DS_Store deleted file mode 100644 index daf430c9..00000000 Binary files a/.github/.DS_Store and /dev/null differ diff --git a/Cargo.lock b/Cargo.lock index a53256b0..bdb95b5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,6 +28,17 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.11" @@ -52,26 +63,44 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-consensus", - "alloy-core", - "alloy-eips", - "alloy-network", - "alloy-provider", - "alloy-rpc-client", - "alloy-signer", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-core 0.6.4", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-network 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-provider 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-rpc-client 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-signer 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", "alloy-signer-wallet", - "alloy-transport", - "alloy-transport-http", - "reqwest 0.12.4", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-transport-http 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "reqwest 0.12.5", +] + +[[package]] +name = "alloy" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-contract", + "alloy-core 0.7.6", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-genesis", + "alloy-provider 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-rpc-client 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-transport-http 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "reqwest 0.12.5", ] [[package]] @@ -79,22 +108,65 @@ name = "alloy-consensus" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-primitives 0.6.4", "alloy-rlp", "sha2", ] +[[package]] +name = "alloy-consensus" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-primitives 0.7.6", + "alloy-rlp", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "c-kzg", + "serde", +] + +[[package]] +name = "alloy-contract" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-dyn-abi 0.7.6", + "alloy-json-abi 0.7.6", + "alloy-network 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-primitives 0.7.6", + "alloy-provider 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-sol-types 0.7.6", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "futures", + "futures-util", + "thiserror", +] + [[package]] name = "alloy-core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd180ed0c69492633d6d7d9e22dab64951fb56906f4294a8e0739c8036df315" dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-types", + "alloy-dyn-abi 0.6.4", + "alloy-json-abi 0.6.4", + "alloy-primitives 0.6.4", + "alloy-sol-types 0.6.4", +] + +[[package]] +name = "alloy-core" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5af3faff14c12c8b11037e0a093dd157c3702becb8435577a2408534d0758315" +dependencies = [ + "alloy-dyn-abi 0.7.6", + "alloy-json-abi 0.7.6", + "alloy-primitives 0.7.6", + "alloy-sol-types 0.7.6", ] [[package]] @@ -103,15 +175,32 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2919acdad13336bc5dc26b636cdd6892c2f27fb0d4a58320a00c2713cf6a4e9a" dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-type-parser", - "alloy-sol-types", + "alloy-json-abi 0.6.4", + "alloy-primitives 0.6.4", + "alloy-sol-type-parser 0.6.4", + "alloy-sol-types 0.6.4", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.6.13", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6e6436a9530f25010d13653e206fab4c9feddacf21a54de8d7311b275bc56b" +dependencies = [ + "alloy-json-abi 0.7.6", + "alloy-primitives 0.7.6", + "alloy-sol-type-parser 0.7.6", + "alloy-sol-types 0.7.6", "const-hex", "itoa", "serde", "serde_json", - "winnow 0.6.5", + "winnow 0.6.13", ] [[package]] @@ -119,12 +208,37 @@ name = "alloy-eips" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.6.4", + "alloy-rlp", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "c-kzg", + "once_cell", + "serde", +] + +[[package]] +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-primitives 0.7.6", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", "c-kzg", "once_cell", "serde", + "sha2", +] + +[[package]] +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-primitives 0.7.6", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "serde", + "serde_json", ] [[package]] @@ -133,8 +247,20 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24ed0f2a6c3a1c947b4508522a53a190dba8f94dcd4e3e1a5af945a498e78f2f" dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", + "alloy-primitives 0.6.4", + "alloy-sol-type-parser 0.6.4", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-abi" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaeaccd50238126e3a0ff9387c7c568837726ad4f4e399b528ca88104d6c25ef" +dependencies = [ + "alloy-primitives 0.7.6", + "alloy-sol-type-parser 0.7.6", "serde", "serde_json", ] @@ -144,10 +270,22 @@ name = "alloy-json-rpc" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.6.4", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-primitives 0.7.6", "serde", "serde_json", "thiserror", + "tracing", ] [[package]] @@ -155,18 +293,35 @@ name = "alloy-network" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-primitives", - "alloy-rpc-types", - "alloy-signer", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-primitives 0.6.4", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-signer 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", "async-trait", "futures-utils-wasm", "serde", "thiserror", ] +[[package]] +name = "alloy-network" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-primitives 0.7.6", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-signer 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-sol-types 0.7.6", + "async-trait", + "futures-utils-wasm", + "thiserror", +] + [[package]] name = "alloy-primitives" version = "0.6.4" @@ -189,36 +344,86 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-primitives" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + [[package]] name = "alloy-provider" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-json-rpc", - "alloy-network", - "alloy-primitives", - "alloy-rpc-client", + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-network 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-primitives 0.6.4", + "alloy-rpc-client 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", "alloy-rpc-trace-types", - "alloy-rpc-types", - "alloy-transport", - "alloy-transport-http", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-transport-http 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "lru", + "reqwest 0.12.5", + "serde_json", + "tokio", + "tracing", +] + +[[package]] +name = "alloy-provider" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-network 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-primitives 0.7.6", + "alloy-rpc-client 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-rpc-types-trace", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-transport-http 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", "async-stream", "async-trait", "auto_impl", "dashmap", "futures", + "futures-utils-wasm", "lru", - "reqwest 0.12.4", + "reqwest 0.12.5", "serde_json", "tokio", "tracing", + "url", ] [[package]] name = "alloy-rlp" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +checksum = "b155716bab55763c95ba212806cf43d05bcc70e5f35b02bad20cf5ec7fe11fed" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -227,13 +432,13 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +checksum = "8037e03c7f462a063f28daec9fda285a9a89da003c552f8637a80b9c8fd96241" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -241,12 +446,32 @@ name = "alloy-rpc-client" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "alloy-transport-http", + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-transport-http 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "futures", + "pin-project", + "reqwest 0.12.5", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-transport-http 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", "futures", "pin-project", - "reqwest 0.12.4", + "reqwest 0.12.5", "serde", "serde_json", "tokio", @@ -261,9 +486,9 @@ name = "alloy-rpc-trace-types" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-primitives", - "alloy-rpc-types", - "alloy-serde", + "alloy-primitives 0.6.4", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", "serde", "serde_json", ] @@ -273,23 +498,63 @@ name = "alloy-rpc-types" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-primitives 0.6.4", + "alloy-rlp", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-genesis", + "alloy-primitives 0.7.6", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-sol-types 0.7.6", "itertools 0.12.1", "serde", "serde_json", "thiserror", ] +[[package]] +name = "alloy-rpc-types-trace" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-primitives 0.7.6", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.6.4", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-primitives 0.7.6", "serde", "serde_json", ] @@ -299,7 +564,20 @@ name = "alloy-signer" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.6.4", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-primitives 0.7.6", "async-trait", "auto_impl", "elliptic-curve", @@ -312,10 +590,10 @@ name = "alloy-signer-wallet" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-network 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-primitives 0.6.4", + "alloy-signer 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", "async-trait", "k256", "rand", @@ -330,23 +608,82 @@ checksum = "e86ec0a47740b20bc5613b8712d0d321d031c4efc58e9645af96085d5cccfc27" dependencies = [ "const-hex", "dunce", - "heck", + "heck 0.4.1", + "indexmap 2.2.6", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.66", + "syn-solidity 0.6.4", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" +dependencies = [ + "alloy-json-abi 0.7.6", + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", "indexmap 2.2.6", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.58", - "syn-solidity", + "syn 2.0.66", + "syn-solidity 0.7.6", "tiny-keccak", ] +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" +dependencies = [ + "alloy-json-abi 0.7.6", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.66", + "syn-solidity 0.7.6", +] + [[package]] name = "alloy-sol-type-parser" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0045cc89524e1451ccf33e8581355b6027ac7c6e494bb02959d4213ad0d8e91d" dependencies = [ - "winnow 0.6.5", + "winnow 0.6.13", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa2fbd22d353d8685bd9fee11ba2d8b5c3b1d11e56adb3265fcf1f32bfdf404" +dependencies = [ + "winnow 0.6.13", ] [[package]] @@ -355,8 +692,21 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad09ec5853fa700d12d778ad224dcdec636af424d29fad84fb9a2f16a5b0ef09" dependencies = [ - "alloy-primitives", - "alloy-sol-macro", + "alloy-primitives 0.6.4", + "alloy-sol-macro 0.6.4", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd" +dependencies = [ + "alloy-json-abi 0.7.6", + "alloy-primitives 0.7.6", + "alloy-sol-macro 0.7.6", "const-hex", "serde", ] @@ -366,7 +716,25 @@ name = "alloy-transport" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", + "wasm-bindgen-futures", +] + +[[package]] +name = "alloy-transport" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", "base64 0.22.1", "futures-util", "futures-utils-wasm", @@ -384,19 +752,33 @@ name = "alloy-transport-http" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=68952c0#68952c00372b4c388c7effc53cd562fd321c0aa3" dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "reqwest 0.12.4", + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", + "reqwest 0.12.5", + "serde_json", + "tower", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e#7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" +dependencies = [ + "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "reqwest 0.12.5", "serde_json", "tower", + "tracing", "url", ] [[package]] name = "amq-protocol" -version = "7.1.2" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d40d8b2465c7959dd40cee32ba6ac334b5de57e9fca0cc756759894a4152a5d" +checksum = "f051d4d77904272e9be7e292607378dc9900d15b8d314bfd3ed4b82fdd84f125" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -408,9 +790,9 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "7.1.2" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb2100adae7da61953a2c3a01935d86caae13329fadce3333f524d6d6ce12e2" +checksum = "4e3d51dd36e67d757c9ba80a7b2a2a2a69254c1dbe4d8c631824ec7f5b69f60e" dependencies = [ "amq-protocol-uri", "tcp-stream", @@ -419,9 +801,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "7.1.2" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "156ff13c8a3ced600b4e54ed826a2ae6242b6069d00dd98466827cef07d3daff" +checksum = "0acdd47054ced8b9bc89ee0dbb42ccc8028de48d8658b24de4c255a226c9bfec" dependencies = [ "cookie-factory", "nom", @@ -431,9 +813,9 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "7.1.2" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "751bbd7d440576066233e740576f1b31fdc6ab86cfabfbd48c548de77eca73e4" +checksum = "f17881b7575dab3e71403f28a3e50b71f0d1bd026829abca3c48664522ce0df0" dependencies = [ "amq-protocol-types", "percent-encoding", @@ -456,16 +838,59 @@ dependencies = [ ] [[package]] -name = "anstyle" -version = "1.0.6" +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arc-swap" @@ -473,6 +898,23 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits 0.2.19", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.3.0" @@ -485,7 +927,7 @@ dependencies = [ "ark-std 0.3.0", "derivative", "num-bigint", - "num-traits", + "num-traits 0.2.19", "paste", "rustc_version 0.3.3", "zeroize", @@ -505,7 +947,7 @@ dependencies = [ "digest 0.10.7", "itertools 0.10.5", "num-bigint", - "num-traits", + "num-traits 0.2.19", "paste", "rustc_version 0.4.0", "zeroize", @@ -538,7 +980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ "num-bigint", - "num-traits", + "num-traits 0.2.19", "quote", "syn 1.0.109", ] @@ -550,12 +992,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ "num-bigint", - "num-traits", + "num-traits 0.2.19", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-secp256k1" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c02e954eaeb4ddb29613fee20840c2bbc85ca4396d53e33837e11905363c5f2" +dependencies = [ + "ark-ec", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-secp256r1" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3975a01b0a6e3eae0f72ec7ca8598a6620fc72fa5981f6f5cca33b7cd788f633" +dependencies = [ + "ark-ec", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + [[package]] name = "ark-serialize" version = "0.3.0" @@ -572,18 +1049,30 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ + "ark-serialize-derive", "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-std" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ - "num-traits", + "num-traits 0.2.19", "rand", ] @@ -593,7 +1082,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ - "num-traits", + "num-traits 0.2.19", "rand", ] @@ -612,6 +1101,45 @@ dependencies = [ "term", ] +[[package]] +name = "asn1-rs" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits 0.2.19", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "assert-json-diff" version = "2.0.2" @@ -622,6 +1150,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-attributes" version = "1.1.2" @@ -645,27 +1179,25 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.1", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.9.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b3e585719c2358d2660232671ca8ca4ddb4be4ce8a1842d6c2dc8685303316" +checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" dependencies = [ - "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-lite 2.3.0", "slab", ] @@ -676,10 +1208,10 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.2.0", + "async-channel 2.3.1", "async-executor", - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.3", + "async-lock 3.4.0", "blocking", "futures-lite 2.3.0", "once_cell", @@ -718,18 +1250,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.6.0", - "rustix 0.38.32", + "polling 3.7.2", + "rustix 0.38.34", "slab", "tracing", "windows-sys 0.52.0", @@ -746,12 +1278,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] @@ -777,7 +1309,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.32", + "rustix 0.38.34", "windows-sys 0.48.0", ] @@ -795,17 +1327,17 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" dependencies = [ - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.3", + "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.32", + "rustix 0.38.34", "signal-hook-registry", "slab", "windows-sys 0.52.0", @@ -858,24 +1390,24 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -892,20 +1424,20 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "aws-config" -version = "1.1.9" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297b64446175a73987cedc3c438d79b2a654d0fff96f65ff530fbe039347644c" +checksum = "2ac9889352d632214df943e26740c46a0f3da6e329fbd28164fe7ae1b061da7b" dependencies = [ "aws-credential-types", "aws-runtime", @@ -920,10 +1452,10 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "fastrand 2.0.2", + "fastrand 2.1.0", "hex", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.29", "ring", "time", "tokio", @@ -934,9 +1466,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.1.8" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8587ae17c8e967e4b05a62d495be2fb7701bec52a97f7acfe8a29f938384c8" +checksum = "e16838e6c9e12125face1c1eff1343c75e3ff540de98ff7ebd61874a89bcfeb9" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -944,11 +1476,38 @@ dependencies = [ "zeroize", ] +[[package]] +name = "aws-lc-rs" +version = "1.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7d844e282b4b56750b2d4e893b2205581ded8709fddd2b6aa5418c150ca877" +dependencies = [ + "aws-lc-sys", + "mirai-annotations", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3a2c29203f6bf296d01141cc8bb9dbd5ecd4c27843f2ee0767bcd5985a927da" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "libc", + "paste", +] + [[package]] name = "aws-runtime" -version = "1.1.8" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13dc54b4b49f8288532334bba8f87386a40571c47c37b1304979b556dc613c8" +checksum = "9a4a5e448145999d7de17bf44a886900ecb834953408dae8aaf90465ce91c1dd" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -958,7 +1517,7 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "fastrand 2.0.2", + "fastrand 2.1.0", "http 0.2.12", "http-body 0.4.6", "percent-encoding", @@ -969,9 +1528,9 @@ dependencies = [ [[package]] name = "aws-sdk-sqs" -version = "1.18.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaacad4846908c0ff49edf57136ab10b58b177739897a502fe007db7a2025af2" +checksum = "5f3fb8da46554d08e63272e56495f7c94908c16dc62d3c7cc8a0fb4d7591726a" dependencies = [ "aws-credential-types", "aws-runtime", @@ -991,9 +1550,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.18.0" +version = "1.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "019a07902c43b03167ea5df0182f0cb63fae89f9a9682c44d18cf2e4a042cb34" +checksum = "da75cf91cbb46686a27436d639a720a3a198b148efa76dc2467b7e5374a67fc0" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1013,9 +1572,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.18.0" +version = "1.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c46ee08a48a7f4eaa4ad201dcc1dd537b49c50859d14d4510e00ad9d3f9af2" +checksum = "cf2ec8a6687299685ed0a4a3137c129cdb132b5235bc3aa3443f6cffe468b9ff" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1035,9 +1594,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.18.0" +version = "1.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f752ac730125ca6017f72f9db5ec1772c9ecc664f87aa7507a7d81b023c23713" +checksum = "458f1031e094b1411b59b49b19e4118f069e1fe13a9c5b8888e933daaf7ffdd6" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1058,9 +1617,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d6f29688a4be9895c0ba8bef861ad0c0dac5c15e9618b9b7a6c233990fc263" +checksum = "31eed8d45759b2c5fe7fd304dd70739060e9e0de509209036eabea14d0720cce" dependencies = [ "aws-credential-types", "aws-smithy-http", @@ -1092,9 +1651,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.7" +version = "0.60.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f10fa66956f01540051b0aa7ad54574640f748f9839e843442d99b970d3aff9" +checksum = "4a7de001a1b9a25601016d8057ea16e31a45fdca3751304c8edf4ad72e706c08" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", @@ -1131,35 +1690,35 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.2.1" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53572b4cd934ee5e8461ad53caa36e9d246aaef42166e3ac539e206a925d330" +checksum = "d0d3965f6417a92a6d1009c5958a67042f57e46342afb37ca58f9ad26744ec73" dependencies = [ "aws-smithy-async", "aws-smithy-http", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", - "fastrand 2.0.2", + "fastrand 2.1.0", "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "http-body 1.0.0", - "hyper 0.14.28", - "hyper-rustls", + "hyper 0.14.29", + "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", "pin-utils", - "rustls", + "rustls 0.21.12", "tokio", "tracing", ] [[package]] name = "aws-smithy-runtime-api" -version = "1.3.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb2b3a7030dc9a3c9a08ce0b25decea5130e9db19619d4dffbbff34f75fe850" +checksum = "1b570ea39eb95bd32543f6e4032bce172cb6209b9bc8c83c770d08169e875afc" dependencies = [ "aws-smithy-async", "aws-smithy-types", @@ -1174,9 +1733,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.1.8" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe14dceea1e70101d38fbf2a99e6a34159477c0fb95e68e05c66bd7ae4c3729" +checksum = "cfe321a6b21f5d8eabd0ade9c55d3d0335f3c3157fc2b3e87f05f34b539e4df5" dependencies = [ "base64-simd", "bytes", @@ -1200,18 +1759,18 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.60.7" +version = "0.60.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872c68cf019c0e4afc5de7753c4f7288ce4b71663212771bf5e4542eb9346ca9" +checksum = "d123fbc2a4adc3c301652ba8e149bf4bc1d1725affb9784eb20c953ace06bf55" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "1.1.8" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dbf2f3da841a8930f159163175cf6a3d16ddde517c1b0fba7aa776822800f40" +checksum = "6f734808d43702a67e57d478a12e227d4d038d0b90c9005a78c87890d3805922" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -1235,7 +1794,7 @@ dependencies = [ "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.29", "itoa", "matchit", "memchr", @@ -1264,7 +1823,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.3.0", + "hyper 1.3.1", "hyper-util", "itoa", "matchit", @@ -1277,7 +1836,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.0", + "sync_wrapper 1.0.1", "tokio", "tower", "tower-layer", @@ -1329,10 +1888,10 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -1409,14 +1968,13 @@ dependencies = [ [[package]] name = "bb8" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7c2093d15d6a1d33b1f972e1c5ea3177748742b97a5f392aa83a65262c6780" +checksum = "b10cf871f3ff2ce56432fddc2615ac7acc3aa22ca321f8fea800846fbb32f188" dependencies = [ "async-trait", - "futures-channel", "futures-util", - "parking_lot", + "parking_lot 0.12.3", "tokio", ] @@ -1439,10 +1997,42 @@ checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" dependencies = [ "num-bigint", "num-integer", - "num-traits", + "num-traits 0.2.19", "serde", ] +[[package]] +name = "bincode" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.5.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.66", + "which", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -1478,6 +2068,7 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] @@ -1500,27 +2091,62 @@ dependencies = [ "generic-array", ] +[[package]] +name = "blockifier" +version = "0.5.0" +source = "git+https://github.com/Moonsong-Labs/blockifier?branch=msl/derive-clone#d16e46b73acfb22540325b66fd7a4cefd8dcbaff" +dependencies = [ + "anyhow", + "ark-ec", + "ark-ff 0.4.2", + "ark-secp256k1", + "ark-secp256r1", + "cached", + "cairo-felt", + "cairo-lang-casm", + "cairo-lang-runner", + "cairo-lang-starknet-classes", + "cairo-lang-utils", + "cairo-vm 0.9.3", + "derive_more", + "indexmap 2.2.6", + "itertools 0.10.5", + "keccak", + "log", + "num-bigint", + "num-integer", + "num-traits 0.2.19", + "once_cell", + "phf", + "rstest 0.17.0", + "serde", + "serde_json", + "sha3", + "starknet-crypto 0.5.2", + "starknet_api", + "strum", + "strum_macros", + "thiserror", +] + [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.0", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", - "fastrand 2.0.2", "futures-io", "futures-lite 2.3.0", "piper", - "tracing", ] [[package]] name = "blst" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" dependencies = [ "cc", "glob", @@ -1529,75 +2155,724 @@ dependencies = [ ] [[package]] -name = "bson" -version = "2.10.0" +name = "bollard" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aed08d3adb6ebe0eff737115056652670ae290f177759aac19c30456135f94c" +dependencies = [ + "base64 0.22.1", + "bollard-stubs", + "bytes", + "futures-core", + "futures-util", + "hex", + "home", + "http 1.1.0", + "http-body-util", + "hyper 1.3.1", + "hyper-named-pipe", + "hyper-rustls 0.26.0", + "hyper-util", + "hyperlocal-next", + "log", + "pin-project-lite", + "rustls 0.22.4", + "rustls-native-certs 0.7.0", + "rustls-pemfile 2.1.2", + "rustls-pki-types", + "serde", + "serde_derive", + "serde_json", + "serde_repr", + "serde_urlencoded", + "thiserror", + "tokio", + "tokio-util", + "tower-service", + "url", + "winapi", +] + +[[package]] +name = "bollard-stubs" +version = "1.44.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709d9aa1c37abb89d40f19f5d0ad6f0d88cb1581264e571c9350fc5bb89cf1c5" +dependencies = [ + "serde", + "serde_repr", + "serde_with 3.8.1", +] + +[[package]] +name = "bson" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a88e82b9106923b5c4d6edfca9e7db958d4e98a478ec115022e81b9b38e2c8" +dependencies = [ + "ahash 0.8.11", + "base64 0.13.1", + "bitvec", + "hex", + "indexmap 2.2.6", + "js-sys", + "once_cell", + "rand", + "serde", + "serde_bytes", + "serde_json", + "time", + "uuid 1.8.0", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "c-kzg" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "serde", +] + +[[package]] +name = "cached" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b195e4fbc4b6862bbd065b991a34750399c119797efff72492f28a5864de8700" +dependencies = [ + "async-trait", + "cached_proc_macro", + "cached_proc_macro_types", + "futures", + "hashbrown 0.13.2", + "instant", + "once_cell", + "thiserror", + "tokio", +] + +[[package]] +name = "cached_proc_macro" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b48814962d2fd604c50d2b9433c2a41a0ab567779ee2c02f7fba6eca1221f082" +dependencies = [ + "cached_proc_macro_types", + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "cached_proc_macro_types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" + +[[package]] +name = "cairo-felt" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae932292b9ba497a4e892b56aa4e0c6f329a455180fdbdc132700dfe68d9b153" +dependencies = [ + "lazy_static", + "num-bigint", + "num-integer", + "num-traits 0.2.19", + "serde", +] + +[[package]] +name = "cairo-lang-casm" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6296d5748288d9fb97175d31aff9f68ea3f602456923895e512b078e9a2210a0" +dependencies = [ + "cairo-lang-utils", + "indoc", + "num-bigint", + "num-traits 0.2.19", + "parity-scale-codec", + "serde", +] + +[[package]] +name = "cairo-lang-compiler" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7be5083c3328dad2248a94f0a24b3520c588e7d3bd5891770e4c91d3facade3" +dependencies = [ + "anyhow", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-parser", + "cairo-lang-project", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-syntax", + "cairo-lang-utils", + "salsa", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-debug" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3cbf67fd766cb7ed48b72e6abf7041857518c9b9fd42475a60c138671c6603" +dependencies = [ + "cairo-lang-utils", +] + +[[package]] +name = "cairo-lang-defs" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b284e41dfc158dfbdc02612dbfdb27a55547d23063bdc53105eeec41d8df006" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "itertools 0.11.0", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-diagnostics" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6314b24901af8be75cd0e1363e3ff1a8020066372501f4cfc9161726b06ec2a" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-filesystem", + "cairo-lang-utils", + "itertools 0.11.0", +] + +[[package]] +name = "cairo-lang-eq-solver" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f95f5c8f7ea75580d164b5304251022e3d47f43fc1c778a01381b55ca9f268c" +dependencies = [ + "cairo-lang-utils", + "good_lp", +] + +[[package]] +name = "cairo-lang-filesystem" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e58b80f0b413ef1320358fde1a0877fc3fbf740f5cead0de3e947a1bc3bfd4" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-utils", + "path-clean", + "salsa", + "serde", + "smol_str", +] + +[[package]] +name = "cairo-lang-lowering" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe6d604a06ea96c05b3666f2e8fac63cb8709e13667de272912f81db004a16b" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-proc-macros", + "cairo-lang-semantic", + "cairo-lang-syntax", + "cairo-lang-utils", + "id-arena", + "itertools 0.11.0", + "log", + "num-bigint", + "num-traits 0.2.19", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-parser" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf1c279de47a77422f81b8a98023cd523cf0ae79f7153d60c4cf8b62b8ece2f" +dependencies = [ + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-syntax", + "cairo-lang-syntax-codegen", + "cairo-lang-utils", + "colored", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.19", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-plugins" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1177a07498bdf45cba62f0c727388ff7433072847dbf701c58fa3c3e358154e" +dependencies = [ + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "indent", + "indoc", + "itertools 0.11.0", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-proc-macros" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c90d812ec983c5a8e3173aca3fc55036b9739201c89f30271ee14a4c1189379" +dependencies = [ + "cairo-lang-debug", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "cairo-lang-project" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3985495d7e9dc481e97135d7139cfa098024351fb51d5feef8366b5fbc104807" +dependencies = [ + "cairo-lang-filesystem", + "cairo-lang-utils", + "serde", + "smol_str", + "thiserror", + "toml", +] + +[[package]] +name = "cairo-lang-runner" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc7c5969d107d24dbd7612ab7afec65d25475fe51d4bb708e3c773f2346c92b" +dependencies = [ + "ark-ff 0.4.2", + "ark-secp256k1", + "ark-secp256r1", + "ark-std 0.4.0", + "cairo-felt", + "cairo-lang-casm", + "cairo-lang-lowering", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-generator", + "cairo-lang-sierra-to-casm", + "cairo-lang-sierra-type-size", + "cairo-lang-starknet", + "cairo-lang-utils", + "cairo-vm 0.9.3", + "itertools 0.11.0", + "keccak", + "num-bigint", + "num-integer", + "num-traits 0.2.19", + "smol_str", + "starknet-crypto 0.6.2", + "thiserror", +] + +[[package]] +name = "cairo-lang-semantic" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5cfadbb9ca3479a6b5c02c0a125a5747835ba57a2de9c4e9764f42d85abe059" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-plugins", + "cairo-lang-proc-macros", + "cairo-lang-syntax", + "cairo-lang-utils", + "id-arena", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.19", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-sierra" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74a57492267a5a8891866b6e48cdefa508b5f05931a5f8eaf004b9de15b1ffd6" +dependencies = [ + "anyhow", + "cairo-felt", + "cairo-lang-utils", + "const-fnv1a-hash", + "convert_case 0.6.0", + "derivative", + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "num-bigint", + "num-traits 0.2.19", + "regex", + "salsa", + "serde", + "serde_json", + "sha3", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-ap-change" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fdbb4bd95477123653b9200bd4e9dceae95a914f6fe85b2bed83b223e36fb5a" +dependencies = [ + "cairo-lang-eq-solver", + "cairo-lang-sierra", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "itertools 0.11.0", + "num-traits 0.2.19", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-gas" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "882cb178f1b79aabf70acce1d87b08d569d8a4b0ce8b1d8f538a02cdb36789db" +dependencies = [ + "cairo-lang-eq-solver", + "cairo-lang-sierra", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "itertools 0.11.0", + "num-traits 0.2.19", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-generator" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d80c9d29e6d3f4ab60e698ebe2de84dcf90570c3dd1cfa7b01bd5c42470331c" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-parser", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-syntax", + "cairo-lang-utils", + "itertools 0.11.0", + "num-traits 0.2.19", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-sierra-to-casm" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ac02c90be2630ae861db6af226090da92741020519768332dd2c07e24d94c75" +dependencies = [ + "assert_matches", + "cairo-felt", + "cairo-lang-casm", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-gas", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.19", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-type-size" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d102b10989f9637b1c916dd950cbd1bd8bb1b6a7aaa1a3035390be0683b92d85" +dependencies = [ + "cairo-lang-sierra", + "cairo-lang-utils", +] + +[[package]] +name = "cairo-lang-starknet" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a27921a2bf82d191d28afd570b913341080c8fc25c83bf870dbf1252570b1b41" +dependencies = [ + "anyhow", + "cairo-felt", + "cairo-lang-compiler", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-plugins", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-starknet-classes", + "cairo-lang-syntax", + "cairo-lang-utils", + "const_format", + "indent", + "indoc", + "itertools 0.11.0", + "once_cell", + "serde", + "serde_json", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-starknet-classes" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d43b38e074cc0de2957f10947e376a1d88b9c4dbab340b590800cc1b2e066b2" +checksum = "8623b076ef3569e4262da5da270a84658b1ff242fe0c9624fbe432e7a937d101" dependencies = [ - "ahash", - "base64 0.13.1", - "bitvec", - "hex", - "indexmap 2.2.6", - "js-sys", + "cairo-felt", + "cairo-lang-casm", + "cairo-lang-sierra", + "cairo-lang-sierra-to-casm", + "cairo-lang-utils", + "convert_case 0.6.0", + "itertools 0.11.0", + "num-bigint", + "num-integer", + "num-traits 0.2.19", "once_cell", - "rand", "serde", - "serde_bytes", "serde_json", - "time", - "uuid 1.8.0", + "sha3", + "smol_str", + "starknet-crypto 0.6.2", + "thiserror", ] [[package]] -name = "bumpalo" -version = "3.15.4" +name = "cairo-lang-syntax" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "4c62f5bd74e249636e7c48d8b95e6cc0ee991206d4a6cbe5c2624184a828e70b" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-filesystem", + "cairo-lang-utils", + "num-bigint", + "num-traits 0.2.19", + "salsa", + "smol_str", + "unescaper", +] [[package]] -name = "byte-slice-cast" -version = "1.2.2" +name = "cairo-lang-syntax-codegen" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +checksum = "a744747e9ab03b65480265304490f3e29d99e4cb297e39d0e6fdb047c1bc86a7" +dependencies = [ + "genco", + "xshell", +] [[package]] -name = "byteorder" -version = "1.5.0" +name = "cairo-lang-utils" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "e6f98e8769412907ceb106c21c70907cc0c87ca0a2a44c82b6229a695a6f9b48" +dependencies = [ + "hashbrown 0.14.5", + "indexmap 2.2.6", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.19", + "parity-scale-codec", + "schemars", + "serde", +] [[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +name = "cairo-type-derive" +version = "0.1.0" +source = "git+https://github.com/keep-starknet-strange/snos#11814f3bb8c8d9b926125aa339ed2926ebc01722" dependencies = [ - "serde", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "bytes-utils" -version = "0.1.4" +name = "cairo-vm" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +checksum = "d90d260c5b0c0812f02fcbdc21eb0d5908fcecdca888fb779b54c3967f7f88bf" dependencies = [ - "bytes", - "either", + "anyhow", + "bincode", + "bitvec", + "cairo-felt", + "generic-array", + "hashbrown 0.14.5", + "hex", + "keccak", + "lazy_static", + "mimalloc", + "nom", + "num-bigint", + "num-integer", + "num-prime", + "num-traits 0.2.19", + "rand", + "rust_decimal", + "serde", + "serde_json", + "sha2", + "sha3", + "starknet-crypto 0.6.2", + "starknet-curve 0.4.2", + "thiserror-no-std", ] [[package]] -name = "c-kzg" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +name = "cairo-vm" +version = "1.0.0-rc3" +source = "git+https://github.com/lambdaclass/cairo-vm#5d1181185a976c77956aaa4247846babd4d0e2df" dependencies = [ - "blst", - "cc", - "glob", + "anyhow", + "ark-ff 0.4.2", + "ark-std 0.4.0", + "bincode", + "bitvec", + "cairo-lang-casm", + "cairo-lang-starknet", + "cairo-lang-starknet-classes", + "generic-array", + "hashbrown 0.14.5", "hex", - "libc", + "keccak", + "lazy_static", + "nom", + "num-bigint", + "num-integer", + "num-prime", + "num-traits 0.2.19", + "rand", + "rust_decimal", "serde", + "serde_json", + "sha2", + "sha3", + "starknet-crypto 0.6.2", + "starknet-types-core", + "thiserror-no-std", + "zip", ] [[package]] @@ -1617,9 +2892,23 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cexpr" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -1629,15 +2918,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", - "num-traits", + "num-traits 0.2.19", "serde", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -1650,6 +2939,38 @@ dependencies = [ "inout", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "cmake" +version = "0.1.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +dependencies = [ + "cc", +] + +[[package]] +name = "cms" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b77c319abfd5219629c45c34c89ba945ed3c5e49fcde9d16b6c3885f118a730" +dependencies = [ + "const-oid", + "der", + "spki", + "x509-cert", +] + [[package]] name = "color-eyre" version = "0.6.3" @@ -1677,11 +2998,27 @@ dependencies = [ "tracing-error", ] +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "colored" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +dependencies = [ + "lazy_static", + "windows-sys 0.48.0", +] + [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "futures-core", @@ -1693,18 +3030,24 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-fnv1a-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" + [[package]] name = "const-hex" -version = "1.11.3" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" dependencies = [ "cfg-if", "cpufeatures", @@ -1719,20 +3062,52 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const_format" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cookie-factory" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" -dependencies = [ - "futures", -] [[package]] name = "core-foundation" @@ -1767,18 +3142,18 @@ checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff" [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1828,7 +3203,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "socket2 0.5.6", + "socket2 0.5.7", "windows-sys 0.52.0", ] @@ -1871,12 +3246,22 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.9", + "darling_macro 0.20.9", ] [[package]] @@ -1889,22 +3274,36 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", "syn 1.0.109", ] [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.58", + "strsim 0.11.1", + "syn 2.0.66", ] [[package]] @@ -1920,13 +3319,24 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.9", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -1936,17 +3346,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.10", ] [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "der" @@ -1955,9 +3365,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", + "der_derive", + "flagset", + "pem-rfc7468", "zeroize", ] +[[package]] +name = "der-parser" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits 0.2.19", + "rusticata-macros", +] + +[[package]] +name = "der_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "deranged" version = "0.3.11" @@ -1981,15 +3419,15 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] @@ -2001,6 +3439,12 @@ dependencies = [ "cipher", ] +[[package]] +name = "deunicode" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" + [[package]] name = "digest" version = "0.9.0" @@ -2022,6 +3466,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-next" version = "2.0.0" @@ -2032,6 +3485,18 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -2043,12 +3508,34 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "doc-comment" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "docker_credential" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31951f49556e34d90ed28342e1df7e1cb7a229c4cab0aecc627b5d91edd41d07" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + [[package]] name = "dotenv" version = "0.15.0" @@ -2067,12 +3554,44 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +[[package]] +name = "dummy" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e57e12b69e57fad516e01e2b3960f122696fdb13420e1a88ed8e210316f2876" +dependencies = [ + "darling 0.20.9", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "dunce" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + +[[package]] +name = "e2e-tests" +version = "0.1.0" +dependencies = [ + "orchestrator", + "reqwest 0.11.27", + "serde_json", + "testcontainers", + "tokio", + "tokio-stream", + "tokio-util", + "url", +] + [[package]] name = "ecdsa" version = "0.16.9" @@ -2089,9 +3608,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "elliptic-curve" @@ -2123,9 +3642,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -2136,12 +3655,47 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "enum-as-inner" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -2150,9 +3704,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2169,9 +3723,9 @@ dependencies = [ "digest 0.10.7", "hex", "hmac", - "pbkdf2", + "pbkdf2 0.11.0", "rand", - "scrypt", + "scrypt 0.10.0", "serde", "serde_json", "sha2", @@ -2197,14 +3751,14 @@ dependencies = [ name = "ethereum-da-client" version = "0.1.0" dependencies = [ - "alloy", + "alloy 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=68952c0)", "async-trait", "c-kzg", "color-eyre", "da-client-interface", "dotenv", "mockall", - "reqwest 0.12.4", + "reqwest 0.12.5", "rstest 0.18.2", "serde", "starknet", @@ -2247,20 +3801,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.2.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -2269,21 +3812,11 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.2.0", + "event-listener 5.3.1", "pin-project-lite", ] @@ -2306,6 +3839,18 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fake" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c25829bde82205da46e1823b2259db6273379f626fc211f126f65654a2669be" +dependencies = [ + "deunicode", + "dummy", + "rand", + "serde_json", +] + [[package]] name = "fastrand" version = "1.9.0" @@ -2317,9 +3862,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fastrlp" @@ -2342,12 +3887,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "fixed-hash" version = "0.8.0" @@ -2367,25 +3906,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] -name = "flate2" -version = "1.0.28" +name = "flagset" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] +checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" [[package]] -name = "flume" -version = "0.10.14" +name = "flate2" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ - "futures-core", - "futures-sink", - "pin-project", - "spin", + "crc32fast", + "libz-sys", + "miniz_oxide", ] [[package]] @@ -2394,7 +3928,9 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ - "spin", + "futures-core", + "futures-sink", + "spin 0.9.8", ] [[package]] @@ -2433,6 +3969,12 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "funty" version = "2.0.0" @@ -2508,7 +4050,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-core", "futures-io", "parking", @@ -2523,7 +4065,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -2568,6 +4110,28 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" +[[package]] +name = "genco" +version = "0.17.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afac3cbb14db69ac9fef9cdb60d8a87e39a7a527f85a81a923436efa40ad42c6" +dependencies = [ + "genco-macros", + "relative-path", + "smallvec", +] + +[[package]] +name = "genco-macros" +version = "0.17.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2581,9 +4145,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -2616,6 +4180,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "good_lp" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3198bd13dea84c76a64621d6ee8ee26a4960a9a0d538eca95ca8f1320a469ac9" +dependencies = [ + "fnv", + "minilp", +] + [[package]] name = "google-cloud-auth" version = "0.13.2" @@ -2704,6 +4278,20 @@ dependencies = [ "async-trait", ] +[[package]] +name = "gps-fact-checker" +version = "0.1.0" +dependencies = [ + "alloy 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "async-trait", + "cairo-vm 1.0.0-rc3", + "itertools 0.13.0", + "starknet", + "thiserror", + "url", + "utils", +] + [[package]] name = "group" version = "0.13.0" @@ -2761,12 +4349,31 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash", + "ahash 0.8.11", "allocator-api2", + "serde", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", ] [[package]] @@ -2775,12 +4382,24 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -2796,6 +4415,51 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hickory-proto" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner 0.6.0", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot 0.12.3", + "rand", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "hmac" version = "0.12.1" @@ -2870,12 +4534,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", + "futures-util", "http 1.1.0", "http-body 1.0.0", "pin-project-lite", @@ -2883,9 +4547,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2908,7 +4572,7 @@ dependencies = [ "crossbeam-utils", "form_urlencoded", "futures-util", - "hyper 0.14.28", + "hyper 0.14.29", "isahc", "lazy_static", "levenshtein", @@ -2922,11 +4586,17 @@ dependencies = [ "url", ] +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", @@ -2939,7 +4609,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -2948,9 +4618,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f24ce812868d86d19daa79bf3bf9175bc44ea323391147a5e3abde2a283871b" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ "bytes", "futures-channel", @@ -2967,6 +4637,21 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-named-pipe" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" +dependencies = [ + "hex", + "hyper 1.3.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", + "winapi", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -2975,12 +4660,48 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.29", + "log", + "rustls 0.21.12", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", "log", - "rustls", - "rustls-native-certs", + "rustls 0.22.4", + "rustls-native-certs 0.7.0", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.25.0", + "tower-service", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls 0.23.10", + "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.0", + "tower-service", ] [[package]] @@ -2989,7 +4710,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.28", + "hyper 0.14.29", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -3002,7 +4723,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.28", + "hyper 0.14.29", "native-tls", "tokio", "tokio-native-tls", @@ -3016,7 +4737,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.3.0", + "hyper 1.3.1", "hyper-util", "native-tls", "tokio", @@ -3026,24 +4747,39 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.3.0", + "hyper 1.3.1", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tower", "tower-service", "tracing", ] +[[package]] +name = "hyperlocal-next" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acf569d43fa9848e510358c07b80f4adf34084ddc28c6a4a651ee8474c070dcc" +dependencies = [ + "hex", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -3067,6 +4803,12 @@ dependencies = [ "cc", ] +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + [[package]] name = "ident_case" version = "1.0.1" @@ -3075,11 +4817,21 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -3132,6 +4884,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "indent" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f1a0777d972970f204fdf8ef319f1f4f8459131636d7e3c96c5d59570d0fa6" + [[package]] name = "indenter" version = "0.3.3" @@ -3156,9 +4914,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", + "serde", ] +[[package]] +name = "indoc" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + [[package]] name = "inout" version = "0.1.3" @@ -3171,9 +4936,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -3184,7 +4949,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -3195,7 +4960,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.6", + "socket2 0.5.7", "widestring", "windows-sys 0.48.0", "winreg 0.50.0", @@ -3207,6 +4972,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "isahc" version = "1.7.2" @@ -3261,12 +5032,30 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.69" @@ -3316,9 +5105,9 @@ dependencies = [ [[package]] name = "keccak-asm" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" +checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758" dependencies = [ "digest 0.10.7", "sha3-asm", @@ -3347,7 +5136,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "string_cache", "term", "tiny-keccak", @@ -3361,24 +5150,46 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.6", + "regex-automata 0.4.7", +] + +[[package]] +name = "lambdaworks-crypto" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fb5d4f22241504f7c7b8d2c3a7d7835d7c07117f10bff2a7d96a9ef6ef217c3" +dependencies = [ + "lambdaworks-math", + "serde", + "sha2", + "sha3", +] + +[[package]] +name = "lambdaworks-math" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "358e172628e713b80a530a59654154bfc45783a6ed70ea284839800cebdf8f97" +dependencies = [ + "serde", + "serde_json", ] [[package]] name = "lapin" -version = "2.3.1" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f3067a1fcfbc3fc46455809c023e69b8f6602463201010f4ae5a3b572adb9dc" +checksum = "fae02c316a8a5922ce7518afa6b6c00e9a099f8e59587567e3331efdd11b8ceb" dependencies = [ "amq-protocol", "async-global-executor-trait", "async-reactor-trait", "async-trait", "executor-trait", - "flume 0.10.14", + "flume", "futures-core", "futures-io", - "parking_lot", + "parking_lot 0.12.3", "pinky-swear", "reactor-trait", "serde", @@ -3391,6 +5202,15 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "levenshtein" @@ -3400,9 +5220,19 @@ checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets 0.52.5", +] [[package]] name = "libm" @@ -3410,6 +5240,16 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libmimalloc-sys" +version = "0.1.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7bb23d733dfcc8af652a78b7bf232f0e967710d044732185e561e47c0336b6" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "libnghttp2-sys" version = "0.1.10+1.61.0" @@ -3432,9 +5272,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.16" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" dependencies = [ "cc", "libc", @@ -3456,15 +5296,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -3485,7 +5325,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -3506,7 +5346,7 @@ dependencies = [ "majin-blob-eip-4844", "majin-blob-types", "num-bigint", - "num-traits", + "num-traits 0.2.19", "serde", "serde_json", ] @@ -3518,7 +5358,7 @@ source = "git+https://github.com/AbdelStark/majin-blob?branch=main#ac23e1584a81e dependencies = [ "lazy_static", "num-bigint", - "num-traits", + "num-traits 0.2.19", "serde", "serde_json", ] @@ -3530,7 +5370,7 @@ source = "git+https://github.com/AbdelStark/majin-blob?branch=main#ac23e1584a81e dependencies = [ "majin-blob-eip-4844", "num-bigint", - "num-traits", + "num-traits 0.2.19", "rstest 0.19.0", "serde", "serde_json", @@ -3563,6 +5403,15 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "matrixmultiply" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" +dependencies = [ + "rawpointer", +] + [[package]] name = "md-5" version = "0.10.6" @@ -3575,9 +5424,40 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "metrics" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849" +dependencies = [ + "ahash 0.7.8", + "metrics-macros", + "portable-atomic 0.3.20", +] + +[[package]] +name = "metrics-macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731f8ecebd9f3a4aa847dfe75455e4757a45da40a7793d2f0b1f9b6ed18b23f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "mimalloc" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "e9186d86b79b52f4a77af65604b51225e8db1d6ee7e3f41aec1e40829c71a176" +dependencies = [ + "libmimalloc-sys", +] [[package]] name = "mime" @@ -3585,6 +5465,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minilp" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82a7750a9e5076c660b7bec5e6457b4dbff402b9863c8d112891434e18fd5385" +dependencies = [ + "log", + "sprs", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -3593,9 +5483,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] @@ -3611,6 +5501,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + [[package]] name = "mockall" version = "0.12.1" @@ -3635,7 +5531,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -3659,11 +5555,11 @@ dependencies = [ "hmac", "lazy_static", "md-5", - "pbkdf2", + "pbkdf2 0.11.0", "percent-encoding", "rand", "rustc_version_runtime", - "rustls", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_bytes", @@ -3672,11 +5568,11 @@ dependencies = [ "sha2", "socket2 0.4.10", "stringprep", - "strsim", + "strsim 0.10.0", "take_mut", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "trust-dns-proto", "trust-dns-resolver", @@ -3687,11 +5583,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -3703,6 +5598,19 @@ dependencies = [ "tempfile", ] +[[package]] +name = "ndarray" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac06db03ec2f46ee0ecdca1a1c34a99c0d188a0d83439b84bf0cb4b386e4ab09" +dependencies = [ + "matrixmultiply", + "num-complex 0.2.4", + "num-integer", + "num-traits 0.2.19", + "rawpointer", +] + [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -3731,37 +5639,47 @@ dependencies = [ [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", - "num-complex", + "num-complex 0.4.6", "num-integer", "num-iter", "num-rational", - "num-traits", + "num-traits 0.2.19", ] [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", - "num-traits", + "num-traits 0.2.19", + "rand", "serde", ] +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits 0.2.19", +] + [[package]] name = "num-complex" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ - "num-traits", + "num-traits 0.2.19", ] [[package]] @@ -3776,7 +5694,7 @@ version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "num-traits", + "num-traits 0.2.19", ] [[package]] @@ -3787,7 +5705,34 @@ checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", - "num-traits", + "num-traits 0.2.19", +] + +[[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 0.2.19", +] + +[[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 0.2.19", + "rand", ] [[package]] @@ -3798,14 +5743,23 @@ checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ "num-bigint", "num-integer", - "num-traits", + "num-traits 0.2.19", ] [[package]] name = "num-traits" -version = "0.2.18" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +dependencies = [ + "num-traits 0.2.19", +] + +[[package]] +name = "num-traits" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -3817,7 +5771,16 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", + "libc", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ "libc", ] @@ -3830,6 +5793,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "oid-registry" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" +dependencies = [ + "asn1-rs", +] + [[package]] name = "omniqueue" version = "0.2.0" @@ -3860,6 +5832,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + [[package]] name = "openssl" version = "0.10.64" @@ -3883,7 +5861,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -3904,6 +5882,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "orchestrator" version = "0.1.0" @@ -3913,13 +5897,14 @@ dependencies = [ "async-trait", "axum 0.7.5", "axum-macros", + "cairo-vm 1.0.0-rc3", "color-eyre", "da-client-interface", "dotenvy", "ethereum-da-client", "futures", "httpmock", - "hyper 0.14.28", + "hyper 0.14.29", "lazy_static", "majin-blob-core", "majin-blob-types", @@ -3927,11 +5912,13 @@ dependencies = [ "mongodb", "num", "num-bigint", - "num-traits", + "num-traits 0.2.19", "omniqueue", + "prover-client-interface", "rstest 0.18.2", "serde", "serde_json", + "sharp-service", "starknet", "starknet-core 0.9.0", "thiserror", @@ -3939,6 +5926,7 @@ dependencies = [ "tracing", "tracing-subscriber", "url", + "utils", "uuid 1.8.0", ] @@ -3961,82 +5949,202 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] -name = "p12" -version = "0.6.3" +name = "p12-keystore" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df7b60d0b2dcace322e6e8c4499c4c8bdf331c1bae046a54be5e4191c3610286" +dependencies = [ + "cbc", + "cms", + "der", + "des", + "hex", + "hmac", + "pkcs12", + "pkcs5", + "rand", + "rc2", + "sha1", + "sha2", + "thiserror", + "x509-parser", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.10", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4873306de53fe82e7e484df31e1e947d61514b6ea2ed6cd7b45d63006fd9224" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cbc", - "cipher", - "des", - "getrandom", - "hmac", - "lazy_static", - "rc2", - "sha1", - "yasna", + "cfg-if", + "libc", + "redox_syscall 0.5.2", + "smallvec", + "windows-targets 0.52.5", ] [[package]] -name = "parity-scale-codec" -version = "3.6.9" +name = "parse-display" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a" dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", + "parse-display-derive", + "regex", + "regex-syntax 0.8.4", ] [[package]] -name = "parity-scale-codec-derive" -version = "3.6.9" +name = "parse-display-derive" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "2ae7800a4c974efd12df917266338e79a7a74415173caf7e70aa0a0707345281" dependencies = [ - "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "regex", + "regex-syntax 0.8.4", + "structmeta", + "syn 2.0.66", ] [[package]] -name = "parking" -version = "2.2.0" +name = "password-hash" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] [[package]] -name = "parking_lot" -version = "0.12.1" +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "path-clean" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" + +[[package]] +name = "pathfinder-common" +version = "0.12.0" +source = "git+https://github.com/Moonsong-Labs/pathfinder?rev=49a2de4ef52726d1fb5ef906ff95f48af8076169#49a2de4ef52726d1fb5ef906ff95f48af8076169" dependencies = [ - "lock_api", - "parking_lot_core", + "anyhow", + "bitvec", + "fake", + "metrics", + "num-bigint", + "paste", + "pathfinder-crypto", + "primitive-types", + "rand", + "serde", + "serde_json", + "serde_with 3.8.1", + "sha3", + "thiserror", + "vergen", ] [[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +name = "pathfinder-crypto" +version = "0.12.0" +source = "git+https://github.com/Moonsong-Labs/pathfinder?rev=49a2de4ef52726d1fb5ef906ff95f48af8076169#49a2de4ef52726d1fb5ef906ff95f48af8076169" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", + "bitvec", + "fake", + "rand", + "serde", ] [[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +name = "pathfinder-serde" +version = "0.12.0" +source = "git+https://github.com/Moonsong-Labs/pathfinder?rev=49a2de4ef52726d1fb5ef906ff95f48af8076169#49a2de4ef52726d1fb5ef906ff95f48af8076169" +dependencies = [ + "anyhow", + "num-bigint", + "pathfinder-common", + "pathfinder-crypto", + "primitive-types", + "serde", + "serde_json", + "serde_with 3.8.1", +] [[package]] name = "pbkdf2" @@ -4045,18 +6153,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest 0.10.7", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", ] [[package]] name = "pem" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "serde", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -4065,9 +6195,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", "thiserror", @@ -4084,6 +6214,39 @@ dependencies = [ "indexmap 2.2.6", ] +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "phf_shared" version = "0.10.0" @@ -4093,6 +6256,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "pico-args" version = "0.5.0" @@ -4116,7 +6288,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -4138,22 +6310,52 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cfae3ead413ca051a681152bd266438d3bfa301c9bdf836939a14c721bb2a21" dependencies = [ "doc-comment", - "flume 0.11.0", - "parking_lot", + "flume", + "parking_lot 0.12.3", "tracing", ] [[package]] name = "piper" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-io", ] +[[package]] +name = "pkcs12" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "695b3df3d3cc1015f12d70235e35b6b79befc5fa7a9b95b951eab1dd07c9efc2" +dependencies = [ + "cms", + "const-oid", + "der", + "digest 0.10.7", + "spki", + "x509-cert", + "zeroize", +] + +[[package]] +name = "pkcs5" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e847e2c91a18bfa887dd028ec33f2fe6f25db77db3619024764914affe8b69a6" +dependencies = [ + "aes", + "cbc", + "der", + "pbkdf2 0.12.2", + "scrypt 0.11.0", + "sha2", + "spki", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -4188,19 +6390,34 @@ dependencies = [ [[package]] name = "polling" -version = "3.6.0" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.32", + "rustix 0.38.34", "tracing", "windows-sys 0.52.0", ] +[[package]] +name = "portable-atomic" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e" +dependencies = [ + "portable-atomic 1.6.0", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + [[package]] name = "powerfmt" version = "0.2.0" @@ -4245,6 +6462,16 @@ dependencies = [ "termtree", ] +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.66", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -4260,12 +6487,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_datetime", - "toml_edit", + "toml_edit 0.21.1", ] [[package]] @@ -4294,9 +6520,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] @@ -4311,11 +6537,11 @@ dependencies = [ "bit-vec", "bitflags 2.5.0", "lazy_static", - "num-traits", + "num-traits 0.2.19", "rand", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "rusty-fork", "tempfile", "unarray", @@ -4323,9 +6549,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", @@ -4333,26 +6559,39 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] name = "prost-types" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] +[[package]] +name = "prover-client-interface" +version = "0.1.0" +dependencies = [ + "async-trait", + "cairo-vm 1.0.0-rc3", + "gps-fact-checker", + "mockall", + "snos", + "thiserror", + "utils", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -4361,9 +6600,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -4413,6 +6652,12 @@ dependencies = [ "rand_core", ] +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + [[package]] name = "rc2" version = "0.8.1" @@ -4462,13 +6707,22 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "redox_users" version = "0.4.5" @@ -4482,14 +6736,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -4503,20 +6757,20 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] name = "regex-lite" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" [[package]] name = "regex-syntax" @@ -4526,15 +6780,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -4550,8 +6804,8 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", - "hyper-rustls", + "hyper 0.14.29", + "hyper-rustls 0.24.2", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -4561,7 +6815,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -4570,7 +6824,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", @@ -4582,9 +6836,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ "base64 0.22.1", "bytes", @@ -4592,10 +6846,12 @@ dependencies = [ "futures-core", "futures-util", "h2 0.4.5", + "hickory-resolver", "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.3.0", + "hyper 1.3.1", + "hyper-rustls 0.27.2", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -4610,7 +6866,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "system-configuration", "tokio", "tokio-native-tls", @@ -4652,7 +6908,7 @@ dependencies = [ "cfg-if", "getrandom", "libc", - "spin", + "spin 0.9.8", "untrusted", "windows-sys 0.52.0", ] @@ -4667,6 +6923,18 @@ dependencies = [ "rustc-hex", ] +[[package]] +name = "rstest" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de1bb486a691878cd320c2f0d319ba91eeaa2e894066d8b5f8f117c000e9d962" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros 0.17.0", + "rustc_version 0.4.0", +] + [[package]] name = "rstest" version = "0.18.2" @@ -4691,6 +6959,20 @@ dependencies = [ "rustc_version 0.4.0", ] +[[package]] +name = "rstest_macros" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290ca1a1c8ca7edb7c3283bd44dc35dd54fdec6253a3912e201ba1072018fca8" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", + "unicode-ident", +] + [[package]] name = "rstest_macros" version = "0.18.2" @@ -4704,7 +6986,7 @@ dependencies = [ "regex", "relative-path", "rustc_version 0.4.0", - "syn 2.0.58", + "syn 2.0.66", "unicode-ident", ] @@ -4721,15 +7003,15 @@ dependencies = [ "regex", "relative-path", "rustc_version 0.4.0", - "syn 2.0.58", + "syn 2.0.66", "unicode-ident", ] [[package]] name = "ruint" -version = "1.12.1" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -4737,7 +7019,7 @@ dependencies = [ "bytes", "fastrlp", "num-bigint", - "num-traits", + "num-traits 0.2.19", "parity-scale-codec", "primitive-types", "proptest", @@ -4751,15 +7033,31 @@ dependencies = [ [[package]] name = "ruint-macro" -version = "1.2.0" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rust_decimal" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" +checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +dependencies = [ + "arrayvec", + "num-traits 0.2.19", +] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hex" @@ -4791,7 +7089,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.22", + "semver 1.0.23", ] [[package]] @@ -4804,6 +7102,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + [[package]] name = "rustix" version = "0.37.27" @@ -4820,39 +7127,69 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.5.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.4", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls" +version = "0.23.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +dependencies = [ + "aws-lc-rs", + "log", + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.102.4", + "subtle", + "zeroize", +] + [[package]] name = "rustls-connector" -version = "0.18.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25da151615461c7347114b1ad1a7458b4cdebc69cb220cd140cd5cb324b1dd37" +checksum = "727a826801254b6cfcd2508a0508c01b7c1bca21d3673e84d86da084781b83d5" dependencies = [ "log", - "rustls", - "rustls-native-certs", - "rustls-webpki", + "rustls 0.23.10", + "rustls-native-certs 0.7.0", + "rustls-pki-types", + "rustls-webpki 0.102.4", ] [[package]] @@ -4867,6 +7204,19 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rustls-native-certs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.1.2", + "rustls-pki-types", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -4902,11 +7252,23 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.102.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rusty-fork" @@ -4922,9 +7284,38 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "salsa" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "4b84d9f96071f3f3be0dc818eae3327625d8ebc95b58da37d6850724f31d3403" +dependencies = [ + "crossbeam-utils", + "indexmap 1.9.3", + "lock_api", + "log", + "oorandom", + "parking_lot 0.11.2", + "rustc-hash", + "salsa-macros", + "smallvec", +] + +[[package]] +name = "salsa-macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3904a4ba0a9d0211816177fd34b04c7095443f8cdacd11175064fe541c8fe2" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "salsa20" @@ -4953,6 +7344,31 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.66", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -4966,7 +7382,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ "hmac", - "pbkdf2", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "pbkdf2 0.12.2", "salsa20", "sha2", ] @@ -4997,11 +7424,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "core-foundation", "core-foundation-sys", "libc", @@ -5010,9 +7437,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -5038,9 +7465,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "semver-parser" @@ -5059,9 +7486,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -5077,20 +7504,31 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "indexmap 2.2.6", "itoa", @@ -5129,6 +7567,26 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5167,6 +7625,24 @@ dependencies = [ "time", ] +[[package]] +name = "serde_with" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros 3.8.1", + "time", +] + [[package]] name = "serde_with_macros" version = "1.5.2" @@ -5185,10 +7661,35 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.9", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +dependencies = [ + "darling 0.20.9", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.2.6", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", ] [[package]] @@ -5253,9 +7754,9 @@ dependencies = [ [[package]] name = "sha3-asm" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" +checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" dependencies = [ "cc", "cfg-if", @@ -5270,11 +7771,40 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "sharp-service" +version = "0.1.0" +dependencies = [ + "alloy 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7373f6db761d5a19888e3a0c527e8a3ca31e7a1e)", + "alloy-primitives 0.7.6", + "async-trait", + "cairo-vm 1.0.0-rc3", + "gps-fact-checker", + "hex", + "prover-client-interface", + "reqwest 0.11.27", + "serde", + "serde_json", + "snos", + "thiserror", + "tokio", + "tracing", + "url", + "utils", + "uuid 1.8.0", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -5302,7 +7832,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint", - "num-traits", + "num-traits 0.2.19", "thiserror", "time", ] @@ -5339,6 +7869,61 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "snos" +version = "0.1.0" +source = "git+https://github.com/keep-starknet-strange/snos#11814f3bb8c8d9b926125aa339ed2926ebc01722" +dependencies = [ + "anyhow", + "assert_matches", + "async-stream", + "base64 0.21.7", + "bitvec", + "blockifier", + "cairo-lang-casm", + "cairo-lang-starknet", + "cairo-lang-starknet-classes", + "cairo-type-derive", + "cairo-vm 1.0.0-rc3", + "env_logger", + "futures", + "futures-util", + "heck 0.4.1", + "hex", + "indexmap 2.2.6", + "indoc", + "lazy_static", + "log", + "num-bigint", + "num-integer", + "num-traits 0.2.19", + "pathfinder-common", + "pathfinder-crypto", + "regex", + "reqwest 0.11.27", + "serde", + "serde_json", + "serde_with 3.8.1", + "serde_yaml", + "starknet-crypto 0.6.2", + "starknet-gateway-types", + "starknet_api", + "thiserror", + "tokio", + "tokio-stream", + "uuid 1.8.0", + "zip", +] + [[package]] name = "socket2" version = "0.4.10" @@ -5351,14 +7936,20 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.8" @@ -5378,6 +7969,17 @@ dependencies = [ "der", ] +[[package]] +name = "sprs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec63571489873d4506683915840eeb1bb16b3198ee4894cc6f2fe3013d505e56" +dependencies = [ + "ndarray", + "num-complex 0.2.4", + "num-traits 0.1.43", +] + [[package]] name = "starknet" version = "0.9.0" @@ -5387,7 +7989,7 @@ dependencies = [ "starknet-accounts", "starknet-contract", "starknet-core 0.9.0", - "starknet-crypto", + "starknet-crypto 0.6.2", "starknet-ff", "starknet-macros", "starknet-providers", @@ -5437,7 +8039,7 @@ dependencies = [ "serde_json_pythonic", "serde_with 2.3.3", "sha3", - "starknet-crypto", + "starknet-crypto 0.6.2", "starknet-ff", ] @@ -5455,10 +8057,30 @@ dependencies = [ "serde_json_pythonic", "serde_with 2.3.3", "sha3", - "starknet-crypto", + "starknet-crypto 0.6.2", "starknet-ff", ] +[[package]] +name = "starknet-crypto" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3f2175b0b3fc24ff2ec6dc07f5a720498994effca7e78b11a6e1c1bd02cad52" +dependencies = [ + "crypto-bigint", + "hex", + "hmac", + "num-bigint", + "num-integer", + "num-traits 0.2.19", + "rfc6979", + "sha2", + "starknet-crypto-codegen", + "starknet-curve 0.3.0", + "starknet-ff", + "zeroize", +] + [[package]] name = "starknet-crypto" version = "0.6.2" @@ -5470,11 +8092,11 @@ dependencies = [ "hmac", "num-bigint", "num-integer", - "num-traits", + "num-traits 0.2.19", "rfc6979", "sha2", "starknet-crypto-codegen", - "starknet-curve", + "starknet-curve 0.4.2", "starknet-ff", "zeroize", ] @@ -5485,9 +8107,18 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ - "starknet-curve", + "starknet-curve 0.4.2", + "starknet-ff", + "syn 2.0.66", +] + +[[package]] +name = "starknet-curve" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252610baff59e4c4332ce3569f7469c5d3f9b415a2240d698fb238b2b4fc0942" +dependencies = [ "starknet-ff", - "syn 2.0.58", ] [[package]] @@ -5514,6 +8145,29 @@ dependencies = [ "serde", ] +[[package]] +name = "starknet-gateway-types" +version = "0.12.0" +source = "git+https://github.com/Moonsong-Labs/pathfinder?rev=49a2de4ef52726d1fb5ef906ff95f48af8076169#49a2de4ef52726d1fb5ef906ff95f48af8076169" +dependencies = [ + "anyhow", + "fake", + "lazy_static", + "pathfinder-common", + "pathfinder-crypto", + "pathfinder-serde", + "primitive-types", + "rand", + "reqwest 0.11.27", + "rstest 0.18.2", + "serde", + "serde_json", + "serde_with 3.8.1", + "sha3", + "thiserror", + "tokio", +] + [[package]] name = "starknet-macros" version = "0.1.7" @@ -5521,7 +8175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95d549d3078bdbe775d0deaa8ddb57a19942989ce7c1f2dfd60beeb322bb4945" dependencies = [ "starknet-core 0.10.0", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -5548,15 +8202,49 @@ dependencies = [ name = "starknet-signers" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c5eb659e66b56ceafb9025cd601226d8f34d273f1b826cd4053ab6333ff0898" +checksum = "8c5eb659e66b56ceafb9025cd601226d8f34d273f1b826cd4053ab6333ff0898" +dependencies = [ + "async-trait", + "auto_impl", + "crypto-bigint", + "eth-keystore", + "rand", + "starknet-core 0.9.0", + "starknet-crypto 0.6.2", + "thiserror", +] + +[[package]] +name = "starknet-types-core" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe29a53d28ff630e4c7827788f14b28f9386d27cb9d05186a5f2e73218c34677" +dependencies = [ + "lambdaworks-crypto", + "lambdaworks-math", + "num-bigint", + "num-integer", + "num-traits 0.2.19", + "serde", +] + +[[package]] +name = "starknet_api" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e6aeb260177f5ca6dde788e844825d8d83782905dbac1b24c0c620743284475" dependencies = [ - "async-trait", - "auto_impl", - "crypto-bigint", - "eth-keystore", - "rand", - "starknet-core 0.9.0", - "starknet-crypto", + "cairo-lang-starknet-classes", + "derive_more", + "hex", + "indexmap 2.2.6", + "once_cell", + "primitive-types", + "serde", + "serde_json", + "starknet-crypto 0.5.2", + "strum", + "strum_macros", "thiserror", ] @@ -5574,20 +8262,20 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot", - "phf_shared", + "parking_lot 0.12.3", + "phf_shared 0.10.0", "precomputed-hash", ] [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -5596,6 +8284,54 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "structmeta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329" +dependencies = [ + "proc-macro2", + "quote", + "structmeta-derive", + "syn 2.0.66", +] + +[[package]] +name = "structmeta-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + [[package]] name = "subtle" version = "2.5.0" @@ -5627,9 +8363,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.58" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -5645,7 +8381,19 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", +] + +[[package]] +name = "syn-solidity" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] @@ -5656,9 +8404,20 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.0" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + +[[package]] +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384595c11a4e2969895cad5a8c4029115f5ab956a9e5ef4de79d11a426e5f20c" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] [[package]] name = "system-configuration" @@ -5695,14 +8454,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tcp-stream" -version = "0.26.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da30af7998f51ee1aa48ab24276fe303a697b004e31ff542b192c088d5630a5" +checksum = "495b0abdce3dc1f8fd27240651c9e68890c14e9d9c61527b1ce44d8a5a7bd3d5" dependencies = [ "cfg-if", - "p12", + "p12-keystore", "rustls-connector", - "rustls-pemfile 1.0.4", + "rustls-pemfile 2.1.2", ] [[package]] @@ -5712,8 +8471,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.2", - "rustix 0.38.32", + "fastrand 2.1.0", + "rustix 0.38.34", "windows-sys 0.52.0", ] @@ -5734,24 +8493,72 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +[[package]] +name = "testcontainers" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c9b71635ab25d4f789a86678d114a4f390467c8b93fd7feeaf7c443732a511" +dependencies = [ + "async-trait", + "bollard", + "bollard-stubs", + "bytes", + "dirs", + "docker_credential", + "either", + "futures", + "log", + "memchr", + "parse-display", + "reqwest 0.12.5", + "serde", + "serde_json", + "serde_with 3.8.1", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util", + "url", +] + [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "thiserror-impl-no-std" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 1.0.109", +] + +[[package]] +name = "thiserror-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +dependencies = [ + "thiserror-impl-no-std", ] [[package]] @@ -5775,13 +8582,15 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "libc", "num-conv", + "num_threads", "powerfmt", "serde", "time-core", @@ -5796,9 +8605,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -5830,19 +8639,19 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", "libc", "mio", "num_cpus", - "parking_lot", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] @@ -5859,13 +8668,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -5895,7 +8704,29 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.10", + "rustls-pki-types", "tokio", ] @@ -5926,9 +8757,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", @@ -5936,26 +8767,53 @@ dependencies = [ "futures-sink", "pin-project-lite", "tokio", - "tracing", +] + +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.14", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.6", "toml_datetime", "winnow 0.5.40", ] +[[package]] +name = "toml_edit" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.13", +] + [[package]] name = "tonic" version = "0.10.2" @@ -5971,15 +8829,15 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.29", "hyper-timeout", "percent-encoding", "pin-project", "prost", - "rustls", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-stream", "tower", "tower-layer", @@ -6040,7 +8898,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] @@ -6111,7 +8969,7 @@ dependencies = [ "async-trait", "cfg-if", "data-encoding", - "enum-as-inner", + "enum-as-inner 0.4.0", "futures-channel", "futures-io", "futures-util", @@ -6139,7 +8997,7 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot", + "parking_lot 0.12.3", "resolv-conf", "smallvec", "thiserror", @@ -6194,6 +9052,15 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unescaper" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0adf6ad32eb5b3cadff915f7b770faaac8f7ff0476633aa29eb0d9584d889d34" +dependencies = [ + "thiserror", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -6215,12 +9082,30 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + [[package]] name = "unicode-xid" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.9.0" @@ -6229,13 +9114,14 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna 0.5.0", "percent-encoding", + "serde", ] [[package]] @@ -6244,11 +9130,19 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "utils" version = "0.1.0" dependencies = [ "color-eyre", + "serde", + "thiserror", ] [[package]] @@ -6289,6 +9183,18 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vergen" +version = "8.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +dependencies = [ + "anyhow", + "cfg-if", + "rustversion", + "time", +] + [[package]] name = "version_check" version = "0.9.4" @@ -6312,9 +9218,9 @@ dependencies = [ [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -6362,7 +9268,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", "wasm-bindgen-shared", ] @@ -6396,7 +9302,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6423,11 +9329,23 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.34", +] + [[package]] name = "widestring" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -6466,7 +9384,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -6484,7 +9402,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -6504,17 +9422,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -6525,9 +9444,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -6537,9 +9456,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -6549,9 +9468,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -6561,9 +9486,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -6573,9 +9498,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -6585,9 +9510,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -6597,9 +9522,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -6612,9 +9537,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -6648,6 +9573,34 @@ dependencies = [ "tap", ] +[[package]] +name = "x509-cert" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" +dependencies = [ + "const-oid", + "der", + "spki", +] + +[[package]] +name = "x509-parser" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + [[package]] name = "xmlparser" version = "0.13.6" @@ -6655,36 +9608,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" [[package]] -name = "yasna" -version = "0.5.2" +name = "xshell" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db0ab86eae739efd1b054a8d3d16041914030ac4e01cd1dca0cf252fd8b6437" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -6697,5 +9659,54 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.66", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.11+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +dependencies = [ + "cc", + "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 1de2544a..af9b485e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,8 +4,12 @@ members = [ "crates/orchestrator", "crates/da_clients/da-client-interface", "crates/da_clients/ethereum", + "crates/prover_services/prover_client_interface", + "crates/prover_services/gps_fact_checker", + "crates/prover_services/sharp_service", "crates/utils", "crates/settlement_clients/settlement-client-interface", + "e2e-tests", ] [workspace.package] @@ -16,32 +20,60 @@ authors = ["Apoorv Sadana <@apoorvsadana>"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [workspace.dependencies] - - num = { version = "0.4.1" } -ethereum-da-client = { path = "crates/da_clients/ethereum" } async-trait = { version = "0.1.77" } -da-client-interface = { path = "crates/da_clients/da-client-interface" } +alloy = { git = "https://github.com/alloy-rs/alloy", rev = "7373f6db761d5a19888e3a0c527e8a3ca31e7a1e" } +alloy-primitives = "0.7.4" axum = { version = "0.7.4" } -axum-macros = { version = "0.4.1" } -color-eyre = { version = "0.6.2" } -dotenvy = { version = "0.15.7" } -futures = { version = "0.3.30" } +axum-macros = "0.4.1" +color-eyre = "0.6.2" +dotenvy = "0.15.7" +futures = "0.3.30" mongodb = { version = "2.8.1" } omniqueue = { version = "0.2.0" } -rstest = { version = "0.18.2" } +reqwest = { version = "0.11.24" } +rstest = "0.18.2" serde = { version = "1.0.197" } -serde_json = { version = "1.0.114" } -starknet = { version = "0.9.0" } -thiserror = { version = "1.0.57" } -tokio = { version = "1.36.0" } -tracing = { version = "0.1.40" } +serde_json = "1.0.114" +starknet = "0.9.0" +tempfile = "3.8.1" +thiserror = "1.0.57" +tokio = { version = "1.37.0" } +tokio-stream = "0.1.15" +tokio-util = "0.7.11" +tracing = "0.1.40" tracing-subscriber = { version = "0.3.18" } -url = { version = "2.5.0" } -uuid = { version = "1.7.0" } -num-bigint = { version = "0.4.4" } +url = { version = "2.5.0", features = ["serde"] } +uuid = { version = "1.7.0", features = ["v4", "serde"] } httpmock = { version = "0.7.0" } -utils = { path = "crates/utils" } +num-bigint = { version = "0.4.4" } arc-swap = { version = "1.7.1" } num-traits = "0.2" lazy_static = "1.4.0" +stark_evm_adapter = "0.1.1" +hex = "0.4" +itertools = "0.13.0" +mockall = "0.12.1" +testcontainers = "0.18.0" + +# Cairo VM +cairo-vm = { git = "https://github.com/lambdaclass/cairo-vm", features = [ + "extensive_hints", + "cairo-1-hints", +] } + +# Sharp (Starkware) +snos = { git = "https://github.com/keep-starknet-strange/snos" } + +# Madara prover API +madara-prover-common = { git = "https://github.com/Moonsong-Labs/madara-prover-api", branch = "od/use-latest-cairo-vm" } +madara-prover-rpc-client = { git = "https://github.com/Moonsong-Labs/madara-prover-api", branch = "od/use-latest-cairo-vm" } + +# Project +da-client-interface = { path = "crates/da_clients/da-client-interface" } +ethereum-da-client = { path = "crates/da_clients/ethereum" } +utils = { path = "crates/utils" } +prover-client-interface = { path = "crates/prover_services/prover_client_interface" } +gps-fact-checker = { path = "crates/prover_services/gps_fact_checker" } +sharp-service = { path = "crates/prover_services/sharp_service" } +orchestrator = { path = "crates/orchestrator" } diff --git a/crates/da_clients/da-client-interface/Cargo.toml b/crates/da_clients/da-client-interface/Cargo.toml index f9dee4ca..d2887a27 100644 --- a/crates/da_clients/da-client-interface/Cargo.toml +++ b/crates/da_clients/da-client-interface/Cargo.toml @@ -9,5 +9,5 @@ edition.workspace = true async-trait = { workspace = true } axum = { workspace = true } color-eyre = { workspace = true } -mockall = "0.12.1" +mockall = { workspace = true } starknet = { workspace = true } diff --git a/crates/da_clients/da-client-interface/src/lib.rs b/crates/da_clients/da-client-interface/src/lib.rs index 5495e8fa..5d36d2ad 100644 --- a/crates/da_clients/da-client-interface/src/lib.rs +++ b/crates/da_clients/da-client-interface/src/lib.rs @@ -1,6 +1,7 @@ use async_trait::async_trait; use color_eyre::Result; -use mockall::{automock, predicate::*}; +use mockall::automock; +use mockall::predicate::*; #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum DaVerificationStatus { diff --git a/crates/da_clients/ethereum/src/lib.rs b/crates/da_clients/ethereum/src/lib.rs index a0cedd08..b77376a0 100644 --- a/crates/da_clients/ethereum/src/lib.rs +++ b/crates/da_clients/ethereum/src/lib.rs @@ -1,9 +1,15 @@ #![allow(missing_docs)] #![allow(clippy::missing_docs_in_private_items)] +use std::env; +use std::path::Path; +use std::str::FromStr; + use alloy::consensus::{ BlobTransactionSidecar, SignableTransaction, TxEip4844, TxEip4844Variant, TxEip4844WithSidecar, TxEnvelope, }; -use alloy::eips::{eip2718::Encodable2718, eip2930::AccessList, eip4844::BYTES_PER_BLOB}; +use alloy::eips::eip2718::Encodable2718; +use alloy::eips::eip2930::AccessList; +use alloy::eips::eip4844::BYTES_PER_BLOB; use alloy::network::{Ethereum, TxSigner}; use alloy::primitives::{bytes, Address, FixedBytes, TxHash, U256, U64}; use alloy::providers::{Provider, ProviderBuilder, RootProvider}; @@ -11,18 +17,15 @@ use alloy::rpc::client::RpcClient; use alloy::signers::wallet::LocalWallet; use alloy::transports::http::Http; use async_trait::async_trait; - -use color_eyre::Result; -use mockall::{automock, predicate::*}; -use reqwest::Client; -use std::str::FromStr; -use url::Url; - use c_kzg::{Blob, KzgCommitment, KzgProof, KzgSettings}; +use color_eyre::Result; use config::EthereumDaConfig; use da_client_interface::{DaClient, DaVerificationStatus}; use dotenv::dotenv; -use std::{env, path::Path}; +use mockall::automock; +use mockall::predicate::*; +use reqwest::Client; +use url::Url; pub mod config; pub struct EthereumDaClient { #[allow(dead_code)] @@ -143,10 +146,11 @@ async fn prepare_sidecar( #[cfg(test)] mod tests { - use super::*; use std::fs::File; use std::io::{self, BufRead}; + use super::*; + #[tokio::test] async fn test_kzg() { let trusted_setup = KzgSettings::load_trusted_setup_file(Path::new("./trusted_setup.txt")) diff --git a/crates/orchestrator/Cargo.toml b/crates/orchestrator/Cargo.toml index 0dd7365b..354571c7 100644 --- a/crates/orchestrator/Cargo.toml +++ b/crates/orchestrator/Cargo.toml @@ -17,6 +17,7 @@ async-std = "1.12.0" async-trait = { workspace = true } axum = { workspace = true, features = ["macros"] } axum-macros = { workspace = true } +cairo-vm = { workspace = true } color-eyre = { workspace = true } da-client-interface = { workspace = true } dotenvy = { workspace = true } @@ -31,8 +32,10 @@ num = { workspace = true } num-bigint = { workspace = true } num-traits = { workspace = true } omniqueue = { workspace = true, optional = true } +prover-client-interface = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } +sharp-service = { workspace = true } starknet = { workspace = true } starknet-core = "0.9.0" thiserror = { workspace = true } @@ -40,6 +43,7 @@ tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } url = { workspace = true } +utils = { workspace = true } uuid = { workspace = true, features = ["v4", "serde"] } [features] diff --git a/crates/orchestrator/src/config.rs b/crates/orchestrator/src/config.rs index ef05d9eb..9d2ff112 100644 --- a/crates/orchestrator/src/config.rs +++ b/crates/orchestrator/src/config.rs @@ -1,19 +1,24 @@ -use crate::database::mongodb::config::MongoDbConfig; -use crate::database::mongodb::MongoDb; -use crate::database::{Database, DatabaseConfig}; -use crate::queue::sqs::SqsQueue; -use crate::queue::QueueProvider; -use crate::utils::env_utils::get_env_var_or_panic; +use std::sync::Arc; + use arc_swap::{ArcSwap, Guard}; -use da_client_interface::DaClient; -use da_client_interface::DaConfig; +use da_client_interface::{DaClient, DaConfig}; use dotenvy::dotenv; use ethereum_da_client::config::EthereumDaConfig; use ethereum_da_client::EthereumDaClient; +use prover_client_interface::ProverClient; +use sharp_service::SharpProverService; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::{JsonRpcClient, Url}; -use std::sync::Arc; use tokio::sync::OnceCell; +use utils::env_utils::get_env_var_or_panic; +use utils::settings::default::DefaultSettingsProvider; +use utils::settings::SettingsProvider; + +use crate::database::mongodb::config::MongoDbConfig; +use crate::database::mongodb::MongoDb; +use crate::database::{Database, DatabaseConfig}; +use crate::queue::sqs::SqsQueue; +use crate::queue::QueueProvider; /// The app config. It can be accessed from anywhere inside the service /// by calling `config` function. @@ -22,6 +27,8 @@ pub struct Config { starknet_client: Arc>, /// The DA client to interact with the DA layer da_client: Box, + /// The service that produces proof and registers it onchain + prover_client: Box, /// The database client database: Box, /// The queue provider @@ -43,7 +50,10 @@ pub async fn init_config() -> Config { // init the queue let queue = Box::new(SqsQueue {}); - Config { starknet_client: Arc::new(provider), da_client: build_da_client(), database, queue } + let settings_provider = DefaultSettingsProvider {}; + let prover = create_prover_service(&settings_provider); + + Config { starknet_client: Arc::new(provider), da_client: build_da_client(), prover_client: prover, database, queue } } impl Config { @@ -51,10 +61,11 @@ impl Config { pub fn new( starknet_client: Arc>, da_client: Box, + prover_client: Box, database: Box, queue: Box, ) -> Self { - Self { starknet_client, da_client, database, queue } + Self { starknet_client, da_client, prover_client, database, queue } } /// Returns the starknet client @@ -67,6 +78,11 @@ impl Config { self.da_client.as_ref() } + /// Returns the proving service + pub fn prover_client(&self) -> &dyn ProverClient { + self.prover_client.as_ref() + } + /// Returns the database client pub fn database(&self) -> &dyn Database { self.database.as_ref() @@ -115,3 +131,11 @@ fn build_da_client() -> Box { _ => panic!("Unsupported DA layer"), } } + +/// Creates prover service based on the environment variable PROVER_SERVICE +fn create_prover_service(settings_provider: &impl SettingsProvider) -> Box { + match get_env_var_or_panic("PROVER_SERVICE").as_str() { + "sharp" => Box::new(SharpProverService::with_settings(settings_provider)), + _ => panic!("Unsupported prover service"), + } +} diff --git a/crates/orchestrator/src/controllers/jobs_controller.rs b/crates/orchestrator/src/controllers/jobs_controller.rs index 4ac8c388..43a67652 100644 --- a/crates/orchestrator/src/controllers/jobs_controller.rs +++ b/crates/orchestrator/src/controllers/jobs_controller.rs @@ -1,8 +1,10 @@ -use crate::controllers::errors::AppError; -use crate::jobs::types::JobType; +use std::collections::HashMap; + use axum::extract::Json; use serde::Deserialize; -use std::collections::HashMap; + +use crate::controllers::errors::AppError; +use crate::jobs::types::JobType; /// Client request to create a job #[derive(Debug, Deserialize)] diff --git a/crates/orchestrator/src/database/mod.rs b/crates/orchestrator/src/database/mod.rs index 3da862af..e5d5f1f7 100644 --- a/crates/orchestrator/src/database/mod.rs +++ b/crates/orchestrator/src/database/mod.rs @@ -1,10 +1,12 @@ -use crate::jobs::types::{JobItem, JobStatus, JobType}; +use std::collections::HashMap; + use async_trait::async_trait; use color_eyre::Result; use mockall::automock; -use std::collections::HashMap; use uuid::Uuid; +use crate::jobs::types::{JobItem, JobStatus, JobType}; + /// MongoDB pub mod mongodb; diff --git a/crates/orchestrator/src/database/mongodb/config.rs b/crates/orchestrator/src/database/mongodb/config.rs index aea02a43..6ec561da 100644 --- a/crates/orchestrator/src/database/mongodb/config.rs +++ b/crates/orchestrator/src/database/mongodb/config.rs @@ -1,5 +1,6 @@ +use utils::env_utils::get_env_var_or_panic; + use crate::database::DatabaseConfig; -use crate::utils::env_utils::get_env_var_or_panic; pub struct MongoDbConfig { pub url: String, diff --git a/crates/orchestrator/src/database/mongodb/mod.rs b/crates/orchestrator/src/database/mongodb/mod.rs index 308fb43e..95a4b763 100644 --- a/crates/orchestrator/src/database/mongodb/mod.rs +++ b/crates/orchestrator/src/database/mongodb/mod.rs @@ -1,19 +1,17 @@ -use crate::database::mongodb::config::MongoDbConfig; -use crate::database::Database; -use crate::jobs::types::{JobItem, JobStatus, JobType}; +use std::collections::HashMap; + use async_trait::async_trait; use color_eyre::eyre::eyre; use color_eyre::Result; -use mongodb::bson::Document; -use mongodb::options::{FindOneOptions, UpdateOptions}; -use mongodb::{ - bson::doc, - options::{ClientOptions, ServerApi, ServerApiVersion}, - Client, Collection, -}; -use std::collections::HashMap; +use mongodb::bson::{doc, Document}; +use mongodb::options::{ClientOptions, FindOneOptions, ServerApi, ServerApiVersion, UpdateOptions}; +use mongodb::{Client, Collection}; use uuid::Uuid; +use crate::database::mongodb::config::MongoDbConfig; +use crate::database::Database; +use crate::jobs::types::{JobItem, JobStatus, JobType}; + pub mod config; pub struct MongoDb { @@ -23,7 +21,8 @@ pub struct MongoDb { impl MongoDb { pub async fn new(config: MongoDbConfig) -> Self { let mut client_options = ClientOptions::parse(config.url).await.expect("Failed to parse MongoDB Url"); - // Set the server_api field of the client_options object to set the version of the Stable API on the client + // Set the server_api field of the client_options object to set the version of the Stable API on the + // client let server_api = ServerApi::builder().version(ServerApiVersion::V1).build(); client_options.server_api = Some(server_api); // Get a handle to the cluster @@ -39,9 +38,9 @@ impl MongoDb { self.client.database("orchestrator").collection("jobs") } - /// Updates the job in the database optimistically. This means that the job is updated only if the - /// version of the job in the database is the same as the version of the job passed in. If the version - /// is different, the update fails. + /// Updates the job in the database optimistically. This means that the job is updated only if + /// the version of the job in the database is the same as the version of the job passed in. + /// If the version is different, the update fails. async fn update_job_optimistically(&self, current_job: &JobItem, update: Document) -> Result<()> { let filter = doc! { "id": current_job.id, diff --git a/crates/orchestrator/src/jobs/constants.rs b/crates/orchestrator/src/jobs/constants.rs index 47a2cae1..0da8587d 100644 --- a/crates/orchestrator/src/jobs/constants.rs +++ b/crates/orchestrator/src/jobs/constants.rs @@ -1,2 +1,3 @@ pub const JOB_PROCESS_ATTEMPT_METADATA_KEY: &str = "process_attempt_no"; pub const JOB_VERIFICATION_ATTEMPT_METADATA_KEY: &str = "verification_attempt_no"; +pub const JOB_METADATA_CAIRO_PIE_PATH_KEY: &str = "cairo_pie_path"; diff --git a/crates/orchestrator/src/jobs/da_job/mod.rs b/crates/orchestrator/src/jobs/da_job/mod.rs index 157a224e..0566beba 100644 --- a/crates/orchestrator/src/jobs/da_job/mod.rs +++ b/crates/orchestrator/src/jobs/da_job/mod.rs @@ -1,24 +1,24 @@ -use crate::config::Config; -use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; -use crate::jobs::Job; +use std::collections::HashMap; +use std::ops::{Add, Mul, Rem}; +use std::result::Result::{Err, Ok as OtherOk}; +use std::str::FromStr; + use async_trait::async_trait; use color_eyre::eyre::{eyre, Ok}; use color_eyre::Result; use lazy_static::lazy_static; use num_bigint::{BigUint, ToBigUint}; -use num_traits::Num; -use num_traits::Zero; -use std::ops::{Add, Mul, Rem}; -use std::result::Result::{Err, Ok as OtherOk}; -use std::str::FromStr; - +use num_traits::{Num, Zero}; // use starknet::core::types::{BlockId, FieldElement, MaybePendingStateUpdate, StateUpdate, StorageEntry}; use starknet::providers::Provider; -use std::collections::HashMap; use tracing::log; use uuid::Uuid; +use super::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; +use super::Job; +use crate::config::Config; + lazy_static! { /// EIP-4844 BLS12-381 modulus. /// @@ -229,7 +229,8 @@ async fn state_update_to_blob_data( let mut nonce = nonces.remove(&addr); - // @note: if nonce is null and there is some len of writes, make an api call to get the contract nonce for the block + // @note: if nonce is null and there is some len of writes, make an api call to get the contract + // nonce for the block if nonce.is_none() && !writes.is_empty() && addr != FieldElement::ONE { let get_current_nonce_result = config.starknet_client().get_nonce(BlockId::Number(block_no), addr).await; @@ -314,19 +315,21 @@ fn da_word(class_flag: bool, nonce_change: Option, num_changes: u6 #[cfg(test)] mod tests { - use super::*; - use crate::tests::common::init_config; + use std::fs; + use std::fs::File; + use std::io::Read; + use ::serde::{Deserialize, Serialize}; use httpmock::prelude::*; use majin_blob_core::blob; - use majin_blob_types::{serde, state_diffs::UnorderedEq}; + use majin_blob_types::serde; + use majin_blob_types::state_diffs::UnorderedEq; // use majin_blob_types::serde; use rstest::rstest; - use serde_json::json; - use std::fs; - use std::fs::File; - use std::io::Read; + + use super::*; + use crate::tests::common::init_config; #[rstest] #[case(false, 1, 1, "18446744073709551617")] @@ -373,7 +376,7 @@ mod tests { ) { let server = MockServer::start(); - let config = init_config(Some(format!("http://localhost:{}", server.port())), None, None, None).await; + let config = init_config(Some(format!("http://localhost:{}", server.port())), None, None, None, None).await; get_nonce_attached(&server, nonce_file_path); diff --git a/crates/orchestrator/src/jobs/mod.rs b/crates/orchestrator/src/jobs/mod.rs index 8e357a0a..c2576480 100644 --- a/crates/orchestrator/src/jobs/mod.rs +++ b/crates/orchestrator/src/jobs/mod.rs @@ -1,20 +1,23 @@ -use crate::config::{config, Config}; -use crate::jobs::constants::{JOB_PROCESS_ATTEMPT_METADATA_KEY, JOB_VERIFICATION_ATTEMPT_METADATA_KEY}; -use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; -use crate::queue::job_queue::{add_job_to_process_queue, add_job_to_verification_queue}; +use std::collections::HashMap; +use std::time::Duration; + use async_trait::async_trait; use color_eyre::eyre::eyre; use color_eyre::Result; -use std::collections::HashMap; -use std::time::Duration; use tracing::log; use uuid::Uuid; +use crate::config::{config, Config}; +use crate::jobs::constants::{JOB_PROCESS_ATTEMPT_METADATA_KEY, JOB_VERIFICATION_ATTEMPT_METADATA_KEY}; +use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; +use crate::queue::job_queue::{add_job_to_process_queue, add_job_to_verification_queue}; + pub mod constants; pub mod da_job; -mod register_proof_job; +pub mod prover_job; +pub mod register_proof_job; pub mod snos_job; -mod state_update_job; +pub mod state_update_job; pub mod types; /// The Job trait is used to define the methods that a job @@ -68,8 +71,8 @@ pub async fn create_job(job_type: JobType, internal_id: String, metadata: HashMa Ok(()) } -/// Processes the job, increments the process attempt count and updates the status of the job in the DB. -/// It then adds the job to the verification queue. +/// Processes the job, increments the process attempt count and updates the status of the job in the +/// DB. It then adds the job to the verification queue. pub async fn process_job(id: Uuid) -> Result<()> { let config = config().await; let job = get_job(id).await?; @@ -86,7 +89,8 @@ pub async fn process_job(id: Uuid) -> Result<()> { } } // this updates the version of the job. this ensures that if another thread was about to process - // the same job, it would fail to update the job in the database because the version would be outdated + // the same job, it would fail to update the job in the database because the version would be + // outdated config.database().update_job_status(&job, JobStatus::LockedForProcessing).await?; let job_handler = get_job_handler(&job.job_type); @@ -104,9 +108,10 @@ pub async fn process_job(id: Uuid) -> Result<()> { Ok(()) } -/// Verifies the job and updates the status of the job in the DB. If the verification fails, it retries -/// processing the job if the max attempts have not been exceeded. If the max attempts have been exceeded, -/// it marks the job as timedout. If the verification is still pending, it pushes the job back to the queue. +/// Verifies the job and updates the status of the job in the DB. If the verification fails, it +/// retries processing the job if the max attempts have not been exceeded. If the max attempts have +/// been exceeded, it marks the job as timedout. If the verification is still pending, it pushes the +/// job back to the queue. pub async fn verify_job(id: Uuid) -> Result<()> { let config = config().await; let job = get_job(id).await?; diff --git a/crates/orchestrator/src/jobs/prover_job/mod.rs b/crates/orchestrator/src/jobs/prover_job/mod.rs new file mode 100644 index 00000000..d4df305a --- /dev/null +++ b/crates/orchestrator/src/jobs/prover_job/mod.rs @@ -0,0 +1,78 @@ +use std::collections::HashMap; +use std::path::PathBuf; +use std::str::FromStr; + +use async_trait::async_trait; +use cairo_vm::vm::runners::cairo_pie::CairoPie; +use color_eyre::eyre::eyre; +use color_eyre::Result; +use prover_client_interface::{Task, TaskStatus}; +use tracing::log::log; +use tracing::log::Level::Error; +use uuid::Uuid; + +use super::constants::JOB_METADATA_CAIRO_PIE_PATH_KEY; +use super::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; +use super::Job; +use crate::config::Config; + +pub struct ProverJob; + +#[async_trait] +impl Job for ProverJob { + async fn create_job( + &self, + _config: &Config, + internal_id: String, + metadata: HashMap, + ) -> Result { + if !metadata.contains_key(JOB_METADATA_CAIRO_PIE_PATH_KEY) { + return Err(eyre!("Cairo PIE path is not specified (prover job #{})", internal_id)); + } + Ok(JobItem { + id: Uuid::new_v4(), + internal_id, + job_type: JobType::ProofCreation, + status: JobStatus::Created, + external_id: String::new().into(), + metadata, + version: 0, + }) + } + + async fn process_job(&self, config: &Config, job: &JobItem) -> Result { + // TODO: allow to donwload PIE from S3 + let cairo_pie_path: PathBuf = job + .metadata + .get(JOB_METADATA_CAIRO_PIE_PATH_KEY) + .map(|s| PathBuf::from_str(s)) + .ok_or_else(|| eyre!("Cairo PIE path is not specified (prover job #{})", job.internal_id))??; + let cairo_pie = CairoPie::read_zip_file(&cairo_pie_path).unwrap(); + let external_id = config.prover_client().submit_task(Task::CairoPie(cairo_pie)).await?; + Ok(external_id) + } + + async fn verify_job(&self, config: &Config, job: &JobItem) -> Result { + let task_id: String = job.external_id.unwrap_string()?.into(); + match config.prover_client().get_task_status(&task_id).await? { + TaskStatus::Processing => Ok(JobVerificationStatus::Pending), + TaskStatus::Succeeded => Ok(JobVerificationStatus::Verified), + TaskStatus::Failed(err) => { + log!(Error, "Prover job #{} failed: {}", job.internal_id, err); + Ok(JobVerificationStatus::Rejected) + } + } + } + + fn max_process_attempts(&self) -> u64 { + 1 + } + + fn max_verification_attempts(&self) -> u64 { + 1 + } + + fn verification_polling_delay_seconds(&self) -> u64 { + 60 + } +} diff --git a/crates/orchestrator/src/jobs/register_proof_job/mod.rs b/crates/orchestrator/src/jobs/register_proof_job/mod.rs index 5f7a36d4..2e9482f7 100644 --- a/crates/orchestrator/src/jobs/register_proof_job/mod.rs +++ b/crates/orchestrator/src/jobs/register_proof_job/mod.rs @@ -1,11 +1,13 @@ -use crate::config::Config; -use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; -use crate::jobs::Job; +use std::collections::HashMap; + use async_trait::async_trait; use color_eyre::Result; -use std::collections::HashMap; use uuid::Uuid; +use crate::config::Config; +use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; +use crate::jobs::Job; + pub struct RegisterProofJob; #[async_trait] diff --git a/crates/orchestrator/src/jobs/snos_job/mod.rs b/crates/orchestrator/src/jobs/snos_job/mod.rs index 50fe0013..13600d4b 100644 --- a/crates/orchestrator/src/jobs/snos_job/mod.rs +++ b/crates/orchestrator/src/jobs/snos_job/mod.rs @@ -1,11 +1,13 @@ -use crate::config::Config; -use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; -use crate::jobs::Job; +use std::collections::HashMap; + use async_trait::async_trait; use color_eyre::Result; -use std::collections::HashMap; use uuid::Uuid; +use crate::config::Config; +use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; +use crate::jobs::Job; + pub struct SnosJob; #[async_trait] diff --git a/crates/orchestrator/src/jobs/state_update_job/mod.rs b/crates/orchestrator/src/jobs/state_update_job/mod.rs index 384eaf71..6eb14bc8 100644 --- a/crates/orchestrator/src/jobs/state_update_job/mod.rs +++ b/crates/orchestrator/src/jobs/state_update_job/mod.rs @@ -1,11 +1,13 @@ -use crate::config::Config; -use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; -use crate::jobs::Job; +use std::collections::HashMap; + use async_trait::async_trait; use color_eyre::Result; -use std::collections::HashMap; use uuid::Uuid; +use crate::config::Config; +use crate::jobs::types::{JobItem, JobStatus, JobType, JobVerificationStatus}; +use crate::jobs::Job; + pub struct StateUpdateJob; #[async_trait] diff --git a/crates/orchestrator/src/jobs/types.rs b/crates/orchestrator/src/jobs/types.rs index 7640ccad..15bb4679 100644 --- a/crates/orchestrator/src/jobs/types.rs +++ b/crates/orchestrator/src/jobs/types.rs @@ -1,9 +1,11 @@ -use color_eyre::{eyre::eyre, Result}; +use std::collections::HashMap; + +use color_eyre::eyre::eyre; +use color_eyre::Result; use da_client_interface::DaVerificationStatus; // TODO: job types shouldn't depend on mongodb use mongodb::bson::serde_helpers::uuid_1_as_binary; use serde::{Deserialize, Serialize}; -use std::collections::HashMap; use uuid::Uuid; /// An external id. @@ -77,7 +79,7 @@ pub enum JobType { /// Verifying the proof on the base layer ProofRegistration, /// Updaing the state root on the base layer - StateUpdation, + StateTransition, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd)] diff --git a/crates/orchestrator/src/lib.rs b/crates/orchestrator/src/lib.rs index 618c8481..4a19222d 100644 --- a/crates/orchestrator/src/lib.rs +++ b/crates/orchestrator/src/lib.rs @@ -12,8 +12,6 @@ pub mod jobs; pub mod queue; /// Contains the routes for the service pub mod routes; -/// Contains the utils -pub mod utils; /// Contains workers which act like cron jobs pub mod workers; diff --git a/crates/orchestrator/src/main.rs b/crates/orchestrator/src/main.rs index 4df82c94..27bdf573 100644 --- a/crates/orchestrator/src/main.rs +++ b/crates/orchestrator/src/main.rs @@ -2,12 +2,12 @@ use dotenvy::dotenv; use orchestrator::config::config; use orchestrator::queue::init_consumers; use orchestrator::routes::app_router; -use orchestrator::utils::env_utils::get_env_var_or_default; use orchestrator::workers::proof_registration::ProofRegistrationWorker; use orchestrator::workers::proving::ProvingWorker; use orchestrator::workers::snos::SnosWorker; use orchestrator::workers::update_state::UpdateStateWorker; use orchestrator::workers::*; +use utils::env_utils::get_env_var_or_default; /// Start the server #[tokio::main] diff --git a/crates/orchestrator/src/queue/job_queue.rs b/crates/orchestrator/src/queue/job_queue.rs index 709d3aa8..9432276f 100644 --- a/crates/orchestrator/src/queue/job_queue.rs +++ b/crates/orchestrator/src/queue/job_queue.rs @@ -1,15 +1,17 @@ -use crate::config::config; -use crate::jobs::{process_job, verify_job}; +use std::future::Future; +use std::time::Duration; + use color_eyre::eyre::eyre; use color_eyre::Result; use omniqueue::QueueError; use serde::{Deserialize, Serialize}; -use std::future::Future; -use std::time::Duration; use tokio::time::sleep; use tracing::log; use uuid::Uuid; +use crate::config::config; +use crate::jobs::{process_job, verify_job}; + const JOB_PROCESSING_QUEUE: &str = "madara_orchestrator_job_processing_queue"; const JOB_VERIFICATION_QUEUE: &str = "madara_orchestrator_job_verification_queue"; diff --git a/crates/orchestrator/src/queue/mod.rs b/crates/orchestrator/src/queue/mod.rs index 74a9808a..01829892 100644 --- a/crates/orchestrator/src/queue/mod.rs +++ b/crates/orchestrator/src/queue/mod.rs @@ -1,12 +1,12 @@ pub mod job_queue; pub mod sqs; +use std::time::Duration; + use async_trait::async_trait; use color_eyre::Result; -use omniqueue::{Delivery, QueueError}; - use mockall::automock; -use std::time::Duration; +use omniqueue::{Delivery, QueueError}; /// The QueueProvider trait is used to define the methods that a queue /// should implement to be used as a queue for the orchestrator. The diff --git a/crates/orchestrator/src/queue/sqs/mod.rs b/crates/orchestrator/src/queue/sqs/mod.rs index 3f9d183a..0ba901fd 100644 --- a/crates/orchestrator/src/queue/sqs/mod.rs +++ b/crates/orchestrator/src/queue/sqs/mod.rs @@ -1,9 +1,11 @@ -use crate::queue::QueueProvider; +use std::time::Duration; + use async_trait::async_trait; use color_eyre::Result; use omniqueue::backends::{SqsBackend, SqsConfig, SqsConsumer, SqsProducer}; use omniqueue::{Delivery, QueueError}; -use std::time::Duration; + +use crate::queue::QueueProvider; pub struct SqsQueue; #[async_trait] diff --git a/crates/orchestrator/src/routes.rs b/crates/orchestrator/src/routes.rs index 41e1803a..39d8f3d4 100644 --- a/crates/orchestrator/src/routes.rs +++ b/crates/orchestrator/src/routes.rs @@ -1,9 +1,10 @@ -use crate::controllers::jobs_controller; use axum::http::StatusCode; use axum::response::IntoResponse; use axum::routing::{get, post}; use axum::Router; +use crate::controllers::jobs_controller; + pub fn app_router() -> Router { Router::new() .route("/health", get(root)) diff --git a/crates/orchestrator/src/tests/artifacts/fibonacci.zip b/crates/orchestrator/src/tests/artifacts/fibonacci.zip new file mode 100644 index 00000000..b5943536 Binary files /dev/null and b/crates/orchestrator/src/tests/artifacts/fibonacci.zip differ diff --git a/crates/orchestrator/src/tests/common/mod.rs b/crates/orchestrator/src/tests/common/mod.rs index a074eb48..f2ce742e 100644 --- a/crates/orchestrator/src/tests/common/mod.rs +++ b/crates/orchestrator/src/tests/common/mod.rs @@ -1,30 +1,30 @@ pub mod constants; -use constants::*; -use rstest::*; - use std::collections::HashMap; use std::sync::Arc; -use crate::{ - config::Config, - jobs::types::{ExternalId, JobItem, JobStatus::Created, JobType::DataSubmission}, -}; - -use crate::database::MockDatabase; -use crate::queue::MockQueueProvider; use ::uuid::Uuid; +use constants::*; use da_client_interface::MockDaClient; +use prover_client_interface::MockProverClient; +use rstest::*; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::JsonRpcClient; - use url::Url; +use crate::config::Config; +use crate::database::MockDatabase; +use crate::jobs::types::JobStatus::Created; +use crate::jobs::types::JobType::DataSubmission; +use crate::jobs::types::{ExternalId, JobItem}; +use crate::queue::MockQueueProvider; + pub async fn init_config( rpc_url: Option, database: Option, queue: Option, da_client: Option, + prover_client: Option, ) -> Config { let _ = tracing_subscriber::fmt().with_max_level(tracing::Level::INFO).with_target(false).try_init(); @@ -32,11 +32,12 @@ pub async fn init_config( let database = database.unwrap_or_default(); let queue = queue.unwrap_or_default(); let da_client = da_client.unwrap_or_default(); + let prover_client = prover_client.unwrap_or_default(); // init starknet client let provider = JsonRpcClient::new(HttpTransport::new(Url::parse(rpc_url.as_str()).expect("Failed to parse URL"))); - Config::new(Arc::new(provider), Box::new(da_client), Box::new(database), Box::new(queue)) + Config::new(Arc::new(provider), Box::new(da_client), Box::new(prover_client), Box::new(database), Box::new(queue)) } #[fixture] diff --git a/crates/orchestrator/src/tests/jobs/da_job/mod.rs b/crates/orchestrator/src/tests/jobs/da_job/mod.rs index d6548f2d..6aab1ea3 100644 --- a/crates/orchestrator/src/tests/jobs/da_job/mod.rs +++ b/crates/orchestrator/src/tests/jobs/da_job/mod.rs @@ -1,30 +1,22 @@ -use rstest::*; -use starknet::core::types::StateUpdate; - use std::collections::HashMap; +use da_client_interface::{DaVerificationStatus, MockDaClient}; use httpmock::prelude::*; +use rstest::*; use serde_json::json; - -use super::super::common::{ - constants::{ETHEREUM_MAX_BLOB_PER_TXN, ETHEREUM_MAX_BYTES_PER_BLOB}, - default_job_item, init_config, -}; -use starknet_core::types::{FieldElement, MaybePendingStateUpdate, StateDiff}; +use starknet_core::types::{FieldElement, MaybePendingStateUpdate, StateDiff, StateUpdate}; use uuid::Uuid; -use crate::jobs::types::ExternalId; -use crate::jobs::{ - da_job::DaJob, - types::{JobItem, JobStatus, JobType}, - Job, -}; -use da_client_interface::{DaVerificationStatus, MockDaClient}; +use super::super::common::constants::{ETHEREUM_MAX_BLOB_PER_TXN, ETHEREUM_MAX_BYTES_PER_BLOB}; +use super::super::common::{default_job_item, init_config}; +use crate::jobs::da_job::DaJob; +use crate::jobs::types::{ExternalId, JobItem, JobStatus, JobType}; +use crate::jobs::Job; #[rstest] #[tokio::test] async fn test_create_job() { - let config = init_config(None, None, None, None).await; + let config = init_config(None, None, None, None, None).await; let job = DaJob.create_job(&config, String::from("0"), HashMap::new()).await; assert!(job.is_ok()); @@ -44,7 +36,7 @@ async fn test_verify_job(#[from(default_job_item)] job_item: JobItem) { let mut da_client = MockDaClient::new(); da_client.expect_verify_inclusion().times(1).returning(|_| Ok(DaVerificationStatus::Verified)); - let config = init_config(None, None, None, Some(da_client)).await; + let config = init_config(None, None, None, Some(da_client), None).await; assert!(DaJob.verify_job(&config, &job_item).await.is_ok()); } @@ -60,7 +52,8 @@ async fn test_process_job() { da_client.expect_max_bytes_per_blob().times(1).returning(move || ETHEREUM_MAX_BYTES_PER_BLOB); da_client.expect_max_blob_per_txn().times(1).returning(move || ETHEREUM_MAX_BLOB_PER_TXN); - let config = init_config(Some(format!("http://localhost:{}", server.port())), None, None, Some(da_client)).await; + let config = + init_config(Some(format!("http://localhost:{}", server.port())), None, None, Some(da_client), None).await; let state_update = MaybePendingStateUpdate::Update(StateUpdate { block_hash: FieldElement::default(), new_root: FieldElement::default(), diff --git a/crates/orchestrator/src/tests/jobs/mod.rs b/crates/orchestrator/src/tests/jobs/mod.rs index 487732dd..f99e374a 100644 --- a/crates/orchestrator/src/tests/jobs/mod.rs +++ b/crates/orchestrator/src/tests/jobs/mod.rs @@ -3,6 +3,9 @@ use rstest::rstest; #[cfg(test)] pub mod da_job; +#[cfg(test)] +pub mod prover_job; + #[rstest] #[tokio::test] async fn create_job_fails_job_already_exists() { diff --git a/crates/orchestrator/src/tests/jobs/prover_job/mod.rs b/crates/orchestrator/src/tests/jobs/prover_job/mod.rs new file mode 100644 index 00000000..17e28dc4 --- /dev/null +++ b/crates/orchestrator/src/tests/jobs/prover_job/mod.rs @@ -0,0 +1,78 @@ +use std::collections::HashMap; + +use httpmock::prelude::*; +use prover_client_interface::{MockProverClient, TaskStatus}; +use rstest::*; +use uuid::Uuid; + +use super::super::common::{default_job_item, init_config}; +use crate::jobs::constants::JOB_METADATA_CAIRO_PIE_PATH_KEY; +use crate::jobs::prover_job::ProverJob; +use crate::jobs::types::{JobItem, JobStatus, JobType}; +use crate::jobs::Job; + +#[rstest] +#[tokio::test] +async fn test_create_job() { + let config = init_config(None, None, None, None, None).await; + let job = ProverJob + .create_job( + &config, + String::from("0"), + HashMap::from([(JOB_METADATA_CAIRO_PIE_PATH_KEY.into(), "pie.zip".into())]), + ) + .await; + assert!(job.is_ok()); + + let job = job.unwrap(); + + let job_type = job.job_type; + assert_eq!(job_type, JobType::ProofCreation, "job_type should be ProofCreation"); + assert!(!(job.id.is_nil()), "id should not be nil"); + assert_eq!(job.status, JobStatus::Created, "status should be Created"); + assert_eq!(job.version, 0_i32, "version should be 0"); + assert_eq!(job.external_id.unwrap_string().unwrap(), String::new(), "external_id should be empty string"); +} + +#[rstest] +#[tokio::test] +async fn test_verify_job(#[from(default_job_item)] job_item: JobItem) { + let mut prover_client = MockProverClient::new(); + prover_client.expect_get_task_status().times(1).returning(|_| Ok(TaskStatus::Succeeded)); + + let config = init_config(None, None, None, None, Some(prover_client)).await; + assert!(ProverJob.verify_job(&config, &job_item).await.is_ok()); +} + +#[rstest] +#[tokio::test] +async fn test_process_job() { + let server = MockServer::start(); + + let mut prover_client = MockProverClient::new(); + prover_client.expect_submit_task().times(1).returning(|_| Ok("task_id".to_string())); + + let config = + init_config(Some(format!("http://localhost:{}", server.port())), None, None, None, Some(prover_client)).await; + + let cairo_pie_path = format!("{}/src/tests/artifacts/fibonacci.zip", env!("CARGO_MANIFEST_DIR")); + + assert_eq!( + ProverJob + .process_job( + &config, + &JobItem { + id: Uuid::default(), + internal_id: "0".into(), + job_type: JobType::ProofCreation, + status: JobStatus::Created, + external_id: String::new().into(), + metadata: HashMap::from([(JOB_METADATA_CAIRO_PIE_PATH_KEY.into(), cairo_pie_path)]), + version: 0, + } + ) + .await + .unwrap(), + "task_id".to_string() + ); +} diff --git a/crates/orchestrator/src/tests/server/mod.rs b/crates/orchestrator/src/tests/server/mod.rs index 79b427e6..bab1a5d0 100644 --- a/crates/orchestrator/src/tests/server/mod.rs +++ b/crates/orchestrator/src/tests/server/mod.rs @@ -1,18 +1,19 @@ -use std::{io::Read, net::SocketAddr}; +use std::io::Read; +use std::net::SocketAddr; use axum::http::StatusCode; - -use hyper::{body::Buf, Body, Request}; - +use hyper::body::Buf; +use hyper::{Body, Request}; use rstest::*; - -use crate::{queue::init_consumers, routes::app_router, utils::env_utils::get_env_var_or_default}; +use utils::env_utils::get_env_var_or_default; use super::common::init_config; +use crate::queue::init_consumers; +use crate::routes::app_router; #[fixture] pub async fn setup_server() -> SocketAddr { - let _config = init_config(Some("http://localhost:9944".to_string()), None, None, None).await; + let _config = init_config(Some("http://localhost:9944".to_string()), None, None, None, None).await; let host = get_env_var_or_default("HOST", "127.0.0.1"); let port = get_env_var_or_default("PORT", "3000").parse::().expect("PORT must be a u16"); diff --git a/crates/orchestrator/src/tests/workers/mod.rs b/crates/orchestrator/src/tests/workers/mod.rs index 18f0ee87..cd3a1243 100644 --- a/crates/orchestrator/src/tests/workers/mod.rs +++ b/crates/orchestrator/src/tests/workers/mod.rs @@ -1,3 +1,13 @@ +use std::collections::HashMap; +use std::error::Error; + +use da_client_interface::MockDaClient; +use httpmock::MockServer; +use mockall::predicate::eq; +use rstest::rstest; +use serde_json::json; +use uuid::Uuid; + use crate::config::config_force_init; use crate::database::MockDatabase; use crate::jobs::types::{ExternalId, JobItem, JobStatus, JobType}; @@ -5,14 +15,6 @@ use crate::queue::MockQueueProvider; use crate::tests::common::init_config; use crate::workers::snos::SnosWorker; use crate::workers::Worker; -use da_client_interface::MockDaClient; -use httpmock::MockServer; -use mockall::predicate::eq; -use rstest::rstest; -use serde_json::json; -use std::collections::HashMap; -use std::error::Error; -use uuid::Uuid; #[rstest] #[case(false)] @@ -69,7 +71,8 @@ async fn test_snos_worker(#[case] db_val: bool) -> Result<(), Box> { let rpc_response_block_number = block; let response = json!({ "id": 1,"jsonrpc":"2.0","result": rpc_response_block_number }); let config = - init_config(Some(format!("http://localhost:{}", server.port())), Some(db), Some(queue), Some(da_client)).await; + init_config(Some(format!("http://localhost:{}", server.port())), Some(db), Some(queue), Some(da_client), None) + .await; config_force_init(config).await; // mocking block call diff --git a/crates/orchestrator/src/utils/env_utils.rs b/crates/orchestrator/src/utils/env_utils.rs deleted file mode 100644 index 78e11609..00000000 --- a/crates/orchestrator/src/utils/env_utils.rs +++ /dev/null @@ -1,13 +0,0 @@ -use color_eyre::Result; - -pub fn get_env_var(key: &str) -> Result { - std::env::var(key).map_err(|e| e.into()) -} - -pub fn get_env_var_or_panic(key: &str) -> String { - get_env_var(key).unwrap_or_else(|e| panic!("Failed to get env var {}: {}", key, e)) -} - -pub fn get_env_var_or_default(key: &str, default: &str) -> String { - get_env_var(key).unwrap_or(default.to_string()) -} diff --git a/crates/orchestrator/src/utils/mod.rs b/crates/orchestrator/src/utils/mod.rs deleted file mode 100644 index 6a65fdce..00000000 --- a/crates/orchestrator/src/utils/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod env_utils; diff --git a/crates/orchestrator/src/workers/mod.rs b/crates/orchestrator/src/workers/mod.rs index 7d198c0c..ba833b7e 100644 --- a/crates/orchestrator/src/workers/mod.rs +++ b/crates/orchestrator/src/workers/mod.rs @@ -1,6 +1,7 @@ -use async_trait::async_trait; use std::error::Error; +use async_trait::async_trait; + pub mod proof_registration; pub mod proving; pub mod snos; diff --git a/crates/orchestrator/src/workers/proof_registration.rs b/crates/orchestrator/src/workers/proof_registration.rs index a51bd412..ea6e5544 100644 --- a/crates/orchestrator/src/workers/proof_registration.rs +++ b/crates/orchestrator/src/workers/proof_registration.rs @@ -1,7 +1,9 @@ -use crate::workers::Worker; -use async_trait::async_trait; use std::error::Error; +use async_trait::async_trait; + +use crate::workers::Worker; + pub struct ProofRegistrationWorker; #[async_trait] diff --git a/crates/orchestrator/src/workers/proving.rs b/crates/orchestrator/src/workers/proving.rs index 61bc19c2..608d211a 100644 --- a/crates/orchestrator/src/workers/proving.rs +++ b/crates/orchestrator/src/workers/proving.rs @@ -1,7 +1,9 @@ -use crate::workers::Worker; -use async_trait::async_trait; use std::error::Error; +use async_trait::async_trait; + +use crate::workers::Worker; + pub struct ProvingWorker; #[async_trait] diff --git a/crates/orchestrator/src/workers/snos.rs b/crates/orchestrator/src/workers/snos.rs index f116cf67..139d79e1 100644 --- a/crates/orchestrator/src/workers/snos.rs +++ b/crates/orchestrator/src/workers/snos.rs @@ -1,11 +1,13 @@ +use std::collections::HashMap; +use std::error::Error; + +use async_trait::async_trait; +use starknet::providers::Provider; + use crate::config::config; use crate::jobs::create_job; use crate::jobs::types::JobType; use crate::workers::Worker; -use async_trait::async_trait; -use starknet::providers::Provider; -use std::collections::HashMap; -use std::error::Error; pub struct SnosWorker; diff --git a/crates/orchestrator/src/workers/update_state.rs b/crates/orchestrator/src/workers/update_state.rs index faca16ab..7933a675 100644 --- a/crates/orchestrator/src/workers/update_state.rs +++ b/crates/orchestrator/src/workers/update_state.rs @@ -1,7 +1,9 @@ -use crate::workers::Worker; -use async_trait::async_trait; use std::error::Error; +use async_trait::async_trait; + +use crate::workers::Worker; + pub struct UpdateStateWorker; #[async_trait] diff --git a/crates/prover_services/gps_fact_checker/Cargo.toml b/crates/prover_services/gps_fact_checker/Cargo.toml new file mode 100644 index 00000000..fb0e7478 --- /dev/null +++ b/crates/prover_services/gps_fact_checker/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "gps-fact-checker" +version.workspace = true +edition.workspace = true + +[dependencies] +alloy = { workspace = true, features = [ + "sol-types", + "json", + "contract", + "providers", + "rpc-client", + "transport-http", + "reqwest", +] } +async-trait.workspace = true +cairo-vm.workspace = true +itertools.workspace = true +starknet.workspace = true +thiserror.workspace = true +url.workspace = true +utils.workspace = true diff --git a/crates/prover_services/gps_fact_checker/src/error.rs b/crates/prover_services/gps_fact_checker/src/error.rs new file mode 100644 index 00000000..166011be --- /dev/null +++ b/crates/prover_services/gps_fact_checker/src/error.rs @@ -0,0 +1,53 @@ +use cairo_vm::program_hash::ProgramHashError; + +#[derive(Debug, thiserror::Error)] +pub enum FactCheckerError { + #[error("Fact registry call failed: {0}")] + FactRegistry(#[source] alloy::contract::Error), + #[error("Failed to compute program hash: {0}")] + ProgramHashCompute(#[from] ProgramHashError), + #[error("There is no additional data for the output builtin in Cairo PIE")] + OutputBuiltinNoAdditionalData, + #[error("There is no segment info for the output builtin in Cairo PIE")] + OutputBuiltinNoSegmentInfo, + #[error("Tree structure length is not even")] + TreeStructureLenOdd, + #[error("Tree structure is empty")] + TreeStructureEmpty, + #[error("Tree structure is too large")] + TreeStructureTooLarge, + #[error("Tree structure contains invalid values")] + TreeStructureInvalid, + #[error("Output pages length is unexpected")] + OutputPagesLenUnexpected, + #[error("Output page {0} has invalid start {1} (expected 0 < x < {2})")] + OutputPagesInvalidStart(usize, usize, usize), + #[error("Output page {0} has expected start {1} (expected{2})")] + OutputPagesUnexpectedStart(usize, usize, usize), + #[error("Output page {0} has invalid size {1} (expected 0 < x < {2})")] + OutputPagesInvalidSize(usize, usize, usize), + #[error("Output page {0} has unexpected id (expected {1})")] + OutputPagesUnexpectedId(usize, usize), + #[error("Output pages cover only {0} out of {1} output elements")] + OutputPagesUncoveredOutput(usize, usize), + #[error("Output segment is not found in the memory")] + OutputSegmentNotFound, + #[error("Output segment does not fit into the memory")] + OutputSegmentInvalidRange, + #[error("Output segment contains inconsistent offset {0} (expected {1})")] + OutputSegmentInconsistentOffset(usize, usize), + #[error("Output segment contains unexpected relocatable at position {0}")] + OutputSegmentUnexpectedRelocatable(usize), + #[error("Tree structure: pages count {0} is in invalid range (expected <= {1})")] + TreeStructurePagesCountOutOfRange(usize, usize), + #[error("Tree structure: nodes count {0} is in invalid range (expected <= {1})")] + TreeStructureNodesCountOutOfRange(usize, usize), + #[error("Tree structure: node stack contains more than one node")] + TreeStructureRootInvalid, + #[error("Tree structure: {0} pages were not processed")] + TreeStructurePagesNotProcessed(usize), + #[error("Tree structure: end offset {0} does not match the output length {1}")] + TreeStructureEndOffsetInvalid(usize, usize), + #[error("Tree structure: root offset {0} does not match the output length {1}")] + TreeStructureRootOffsetInvalid(usize, usize), +} diff --git a/crates/prover_services/gps_fact_checker/src/fact_info.rs b/crates/prover_services/gps_fact_checker/src/fact_info.rs new file mode 100644 index 00000000..e7156ef9 --- /dev/null +++ b/crates/prover_services/gps_fact_checker/src/fact_info.rs @@ -0,0 +1,98 @@ +//! Fact info structure and helpers. +//! +//! Port of https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/cairo/bootloaders/generate_fact.py + +use alloy::primitives::{keccak256, B256}; +use cairo_vm::program_hash::compute_program_hash_chain; +use cairo_vm::types::builtin_name::BuiltinName; +use cairo_vm::types::relocatable::MaybeRelocatable; +use cairo_vm::vm::runners::cairo_pie::CairoPie; +use cairo_vm::Felt252; +use starknet::core::types::FieldElement; +use utils::ensure; + +use super::error::FactCheckerError; +use super::fact_node::generate_merkle_root; +use super::fact_topology::{get_fact_topology, FactTopology}; + +/// Default bootloader program version. +/// +/// https://github.com/starkware-libs/cairo-lang/blob/efa9648f57568aad8f8a13fbf027d2de7c63c2c0/src/starkware/cairo/bootloaders/hash_program.py#L11 +pub const BOOTLOADER_VERSION: usize = 0; + +pub struct FactInfo { + pub program_output: Vec, + pub fact_topology: FactTopology, + pub fact: B256, +} + +pub fn get_fact_info(cairo_pie: &CairoPie, program_hash: Option) -> Result { + let program_output = get_program_output(cairo_pie)?; + let fact_topology = get_fact_topology(cairo_pie, program_output.len())?; + let program_hash = match program_hash { + Some(hash) => hash, + None => compute_program_hash_chain(&cairo_pie.metadata.program, BOOTLOADER_VERSION)?, + }; + let output_root = generate_merkle_root(&program_output, &fact_topology)?; + let fact = keccak256([program_hash.to_bytes_be(), *output_root.node_hash].concat()); + Ok(FactInfo { program_output, fact_topology, fact }) +} + +pub fn get_program_output(cairo_pie: &CairoPie) -> Result, FactCheckerError> { + let segment_info = cairo_pie + .metadata + .builtin_segments + .get(&BuiltinName::output) + .ok_or(FactCheckerError::OutputBuiltinNoSegmentInfo)?; + + let segment_start = cairo_pie + .memory + .0 + .iter() + .enumerate() + .find_map(|(ptr, ((index, _), _))| if *index == segment_info.index as usize { Some(ptr) } else { None }) + .ok_or(FactCheckerError::OutputSegmentNotFound)?; + + let mut output = Vec::with_capacity(segment_info.size); + let mut expected_offset = 0; + + #[allow(clippy::explicit_counter_loop)] + for i in segment_start..segment_start + segment_info.size { + let ((_, offset), value) = cairo_pie.memory.0.get(i).ok_or(FactCheckerError::OutputSegmentInvalidRange)?; + + ensure!( + *offset == expected_offset, + FactCheckerError::OutputSegmentInconsistentOffset(*offset, expected_offset) + ); + match value { + MaybeRelocatable::Int(felt) => output.push(*felt), + MaybeRelocatable::RelocatableValue(_) => { + return Err(FactCheckerError::OutputSegmentUnexpectedRelocatable(*offset)); + } + } + + expected_offset += 1; + } + + Ok(output) +} + +#[cfg(test)] +mod tests { + use std::path::PathBuf; + + use cairo_vm::vm::runners::cairo_pie::CairoPie; + + use super::get_fact_info; + + #[test] + fn test_fact_info() { + // Generated using the get_fact.py script + let expected_fact = "0xca15503f02f8406b599cb220879e842394f5cf2cef753f3ee430647b5981b782"; + let cairo_pie_path: PathBuf = + [env!("CARGO_MANIFEST_DIR"), "tests", "artifacts", "fibonacci.zip"].iter().collect(); + let cairo_pie = CairoPie::read_zip_file(&cairo_pie_path).unwrap(); + let fact_info = get_fact_info(&cairo_pie, None).unwrap(); + assert_eq!(expected_fact, fact_info.fact.to_string()); + } +} diff --git a/crates/prover_services/gps_fact_checker/src/fact_node.rs b/crates/prover_services/gps_fact_checker/src/fact_node.rs new file mode 100644 index 00000000..2d66fbac --- /dev/null +++ b/crates/prover_services/gps_fact_checker/src/fact_node.rs @@ -0,0 +1,117 @@ +//! Fact node structure and helpers. +//! +//! The fact of each task is stored as a (non-binary) Merkle tree. +//! Leaf nodes are labeled with the hash of their data. +//! Each non-leaf node is labeled as 1 + the hash of (node0, end0, node1, end1, ...) +//! where node* is a label of a child children and end* is the total number of data words up to +//! and including that node and its children (including the previous sibling nodes). +//! We add 1 to the result of the hash to prevent an attacker from using a preimage of a leaf node +//! as a preimage of a non-leaf hash and vice versa. +//! +//! The structure of the tree is passed as a list of pairs (n_pages, n_nodes), and the tree is +//! constructed using a stack of nodes (initialized to an empty stack) by repeating for each pair: +//! 1. Add #n_pages lead nodes to the stack. +//! 2. Pop the top #n_nodes, construct a parent node for them, and push it back to the stack. +//! After applying the steps above, the stack must contain exactly one node, which will +//! constitute the root of the Merkle tree. +//! +//! For example, [(2, 2)] will create a Merkle tree with a root and two direct children, while +//! [(3, 2), (0, 2)] will create a Merkle tree with a root whose left child is a leaf and +//! right child has two leaf children. +//! +//! Port of https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/cairo/bootloaders/compute_fact.py + +use alloy::primitives::{keccak256, B256}; +use cairo_vm::Felt252; +use itertools::Itertools; +use utils::ensure; + +use super::error::FactCheckerError; +use super::fact_topology::FactTopology; + +/// Node of the fact tree +#[derive(Debug, Clone)] +pub struct FactNode { + /// Page hash (leaf) or 1 + keccak{children} (non-leaf) + pub node_hash: B256, + /// Total number of data words up to that node (including it and its children) + pub end_offset: usize, + /// Page size + pub page_size: usize, + /// Child nodes + pub children: Vec, +} + +/// Generates the root of the output Merkle tree for the program fact computation. +/// +/// Basically it transforms the flat fact topology into a non-binary Merkle tree and then computes +/// its root, enriching the nodes with metadata such as page sizes and hashes. +pub fn generate_merkle_root( + program_output: &[Felt252], + fact_topology: &FactTopology, +) -> Result { + let FactTopology { tree_structure, mut page_sizes } = fact_topology.clone(); + + let mut end_offset: usize = 0; + let mut node_stack: Vec = Vec::with_capacity(page_sizes.len()); + let mut output_iter = program_output.iter(); + + for (n_pages, n_nodes) in tree_structure.into_iter().tuples() { + ensure!( + n_pages <= page_sizes.len(), + FactCheckerError::TreeStructurePagesCountOutOfRange(n_pages, page_sizes.len()) + ); + + // Push n_pages (leaves) to the stack + for _ in 0..n_pages { + let page_size = page_sizes.remove(0); + // Page size is already validated upon retrieving the topology + let page = output_iter.by_ref().take(page_size).map(|felt| felt.to_bytes_be().to_vec()).concat(); + let node_hash = keccak256(&page); + end_offset += page_size; + // Add lead node (no children) + node_stack.push(FactNode { node_hash, end_offset, page_size, children: vec![] }) + } + + ensure!( + n_nodes <= node_stack.len(), + FactCheckerError::TreeStructureNodesCountOutOfRange(n_nodes, node_stack.len()) + ); + + if n_nodes > 0 { + // Create a parent node to the last n_nodes in the head of the stack. + let children: Vec = node_stack.drain(node_stack.len() - n_nodes..).collect(); + let mut node_data = Vec::with_capacity(2 * 32 * children.len()); + let mut total_page_size = 0; + let mut child_end_offset = 0; + + for node in children.iter() { + node_data.copy_from_slice(node.node_hash.as_slice()); + node_data.copy_from_slice(&[0; 32 - (usize::BITS / 8) as usize]); // pad usize to 32 bytes + node_data.copy_from_slice(&node.page_size.to_be_bytes()); + total_page_size += node.page_size; + child_end_offset = node.end_offset; + } + + node_stack.push(FactNode { + node_hash: keccak256(&node_data), + end_offset: child_end_offset, + page_size: total_page_size, + children, + }) + } + + ensure!(node_stack.len() == 1, FactCheckerError::TreeStructureRootInvalid); + ensure!(page_sizes.is_empty(), FactCheckerError::TreeStructurePagesNotProcessed(page_sizes.len())); + ensure!( + end_offset == program_output.len(), + FactCheckerError::TreeStructureEndOffsetInvalid(end_offset, program_output.len()) + ); + ensure!( + node_stack[0].end_offset == program_output.len(), + FactCheckerError::TreeStructureRootOffsetInvalid(node_stack[0].end_offset, program_output.len(),) + ); + } + + Ok(node_stack.remove(0)) +} diff --git a/crates/prover_services/gps_fact_checker/src/fact_topology.rs b/crates/prover_services/gps_fact_checker/src/fact_topology.rs new file mode 100644 index 00000000..e2d7127c --- /dev/null +++ b/crates/prover_services/gps_fact_checker/src/fact_topology.rs @@ -0,0 +1,102 @@ +//! Fact topology type and helpers. +//! +//! Ported from https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/cairo/bootloaders/fact_topology.py + +use std::collections::HashMap; + +use cairo_vm::types::builtin_name::BuiltinName; +use cairo_vm::vm::runners::cairo_pie::{BuiltinAdditionalData, CairoPie, PublicMemoryPage}; +use utils::ensure; + +use super::error::FactCheckerError; + +pub const GPS_FACT_TOPOLOGY: &str = "gps_fact_topology"; + +/// Flattened fact tree +#[derive(Debug, Clone)] +pub struct FactTopology { + /// List of pairs (n_pages, n_nodes) + pub tree_structure: Vec, + /// Page sizes (pages are leaf nodes) + pub page_sizes: Vec, +} + +/// Returns the fact topology from the additional data of the output builtin. +pub fn get_fact_topology(cairo_pie: &CairoPie, output_size: usize) -> Result { + if let Some(BuiltinAdditionalData::Output(additional_data)) = cairo_pie.additional_data.0.get(&BuiltinName::output) + { + let tree_structure = match additional_data.attributes.get(GPS_FACT_TOPOLOGY) { + Some(tree_structure) => { + ensure!(!tree_structure.is_empty(), FactCheckerError::TreeStructureEmpty); + ensure!(tree_structure.len() % 2 == 0, FactCheckerError::TreeStructureLenOdd); + ensure!(tree_structure.len() <= 10, FactCheckerError::TreeStructureTooLarge); + ensure!(tree_structure.iter().all(|&x| x < 2 << 30), FactCheckerError::TreeStructureInvalid); + tree_structure.clone() + } + None => { + ensure!(additional_data.pages.is_empty(), FactCheckerError::OutputPagesLenUnexpected); + vec![1, 0] + } + }; + let page_sizes = get_page_sizes(&additional_data.pages, output_size)?; + Ok(FactTopology { tree_structure, page_sizes }) + } else { + Err(FactCheckerError::OutputBuiltinNoAdditionalData) + } +} + +/// Returns the sizes of the program output pages, given the pages dictionary that appears +/// in the additional attributes of the output builtin. +pub fn get_page_sizes( + pages: &HashMap, + output_size: usize, +) -> Result, FactCheckerError> { + let mut pages_list: Vec<(usize, usize, usize)> = + pages.iter().map(|(&id, page)| (id, page.start, page.size)).collect(); + pages_list.sort(); + + // The first page id is expected to be 1. + let mut expected_page_id = 1; + // We don't expect anything on its start value. + let mut expected_page_start = None; + + let mut page_sizes = Vec::with_capacity(pages_list.len() + 1); + // The size of page 0 is output_size if there are no other pages, or the start of page 1 otherwise. + page_sizes.push(output_size); + + for (page_id, page_start, page_size) in pages_list { + ensure!(page_id == expected_page_id, FactCheckerError::OutputPagesUnexpectedId(page_id, expected_page_id)); + + if page_id == 1 { + ensure!( + page_start > 0 && page_start < output_size, + FactCheckerError::OutputPagesInvalidStart(page_id, page_start, output_size) + ); + page_sizes[0] = page_start; + } else { + ensure!( + Some(page_start) == expected_page_start, + FactCheckerError::OutputPagesUnexpectedStart( + page_id, + page_start, + expected_page_start.unwrap_or_default(), + ) + ); + } + + ensure!( + page_size > 0 && page_size < output_size, + FactCheckerError::OutputPagesInvalidSize(page_id, page_size, output_size) + ); + expected_page_start = Some(page_start + page_size); + expected_page_id += 1; + + page_sizes.push(page_size); + } + + ensure!( + pages.is_empty() || expected_page_start == Some(output_size), + FactCheckerError::OutputPagesUncoveredOutput(expected_page_start.unwrap_or_default(), output_size) + ); + Ok(page_sizes) +} diff --git a/crates/prover_services/gps_fact_checker/src/lib.rs b/crates/prover_services/gps_fact_checker/src/lib.rs new file mode 100644 index 00000000..239e7556 --- /dev/null +++ b/crates/prover_services/gps_fact_checker/src/lib.rs @@ -0,0 +1,40 @@ +pub mod error; +pub mod fact_info; +pub mod fact_node; +pub mod fact_topology; + +use alloy::primitives::{Address, B256}; +use alloy::providers::{ProviderBuilder, RootProvider}; +use alloy::sol; +use alloy::transports::http::{Client, Http}; +use url::Url; + +use self::error::FactCheckerError; + +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + FactRegistry, + "tests/artifacts/FactRegistry.json" +); + +pub struct FactChecker { + fact_registry: FactRegistry::FactRegistryInstance, +} + +type TransportT = Http; +type ProviderT = RootProvider; + +impl FactChecker { + pub fn new(rpc_node_url: Url, verifier_address: Address) -> Self { + let provider = ProviderBuilder::new().on_http(rpc_node_url); + let fact_registry = FactRegistry::new(verifier_address, provider); + Self { fact_registry } + } + + pub async fn is_valid(&self, fact: &B256) -> Result { + let FactRegistry::isValidReturn { _0 } = + self.fact_registry.isValid(*fact).call().await.map_err(FactCheckerError::FactRegistry)?; + Ok(_0) + } +} diff --git a/crates/prover_services/gps_fact_checker/tests/artifacts/FactRegistry.json b/crates/prover_services/gps_fact_checker/tests/artifacts/FactRegistry.json new file mode 100644 index 00000000..c687ed7e --- /dev/null +++ b/crates/prover_services/gps_fact_checker/tests/artifacts/FactRegistry.json @@ -0,0 +1,863 @@ +{ + "abi": [ + { + "type": "function", + "name": "hasRegisteredFact", + "inputs": [], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValid", + "inputs": [ + { "name": "fact", "type": "bytes32", "internalType": "bytes32" } + ], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "view" + } + ], + "bytecode": { + "object": "0x608060405234801561001057600080fd5b5060ce8061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80636a938567146037578063d6354e15146065575b600080fd5b605160048036036020811015604b57600080fd5b5035606b565b604080519115158252519081900360200190f35b6051607a565b60006074826083565b92915050565b60015460ff1690565b60009081526020819052604090205460ff169056fea2646970667358221220553e722d7d055d1334a20223ec1ae1a12bf73d8488850f4be28de564102b902764736f6c634300060c0033", + "sourceMap": "118:1279:8:-:0;;;;;;;;;;;;;;;;;;;", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c80636a938567146037578063d6354e15146065575b600080fd5b605160048036036020811015604b57600080fd5b5035606b565b604080519115158252519081900360200190f35b6051607a565b60006074826083565b92915050565b60015460ff1690565b60009081526020819052604090205460ff169056fea2646970667358221220553e722d7d055d1334a20223ec1ae1a12bf73d8488850f4be28de564102b902764736f6c634300060c0033", + "sourceMap": "118:1279:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;421:109;;;;;;;;;;;;;;;;-1:-1:-1;421:109:8;;:::i;:::-;;;;;;;;;;;;;;;;;;1287:108;;;:::i;421:109::-;484:4;507:16;518:4;507:10;:16::i;:::-;500:23;421:109;-1:-1:-1;;421:109:8:o;1287:108::-;1371:17;;;;1287:108;:::o;826:105::-;883:4;906:18;;;;;;;;;;;;;;826:105::o", + "linkReferences": {} + }, + "methodIdentifiers": { + "hasRegisteredFact()": "d6354e15", + "isValid(bytes32)": "6a938567" + }, + "rawMetadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"hasRegisteredFact\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fact\",\"type\":\"bytes32\"}],\"name\":\"isValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/src/components/FactRegistry.sol\":\"FactRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/src/components/FactRegistry.sol\":{\"keccak256\":\"0xf1dde737bfeb616fad002bb7ad229c73fec98f1e539420566fa89805c5bb120d\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://1952c89d683c9f58ce06cf222f42772131113b3dd2442c6dc9150a2bde6d4d34\",\"dweb:/ipfs/QmT8u7c1gAYRVF4kCdW7v9QiE65TwwdVu76pdvsFzXnZWg\"]},\"contracts/src/interfaces/IFactRegistry.sol\":{\"keccak256\":\"0xab04b296b506dfb0b4a8828f3dc463072fd50449a5ad8327d1baf01438b0fb35\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://e451abe007f98081d1adfd759cc4168f81982992d8c0554650b94d37bc009e64\",\"dweb:/ipfs/QmVBNUWFhNX8PqSMcqRkHVaTbcm7KNpgSg91Sj6MepFG6u\"]},\"contracts/src/interfaces/IQueryableFactRegistry.sol\":{\"keccak256\":\"0x9689f96215bae9da993a5f1b16a7c1460b1abd478569d969d5b901fa4520b4b6\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://cfe2f9ca69bffdfaad8cdea188f0e6e385fbd2f5b1ee2194f989f25c76a30250\",\"dweb:/ipfs/QmSffz94BEf9MuqrQ41LuAcBL6FnsxqY4pxfxM8b4s3iSi\"]}},\"version\":1}", + "metadata": { + "compiler": { "version": "0.6.12+commit.27d51765" }, + "language": "Solidity", + "output": { + "abi": [ + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "hasRegisteredFact", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }] + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "fact", "type": "bytes32" } + ], + "stateMutability": "view", + "type": "function", + "name": "isValid", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }] + } + ], + "devdoc": { "kind": "dev", "methods": {}, "version": 1 }, + "userdoc": { "kind": "user", "methods": {}, "version": 1 } + }, + "settings": { + "remappings": [], + "optimizer": { "enabled": true, "runs": 200 }, + "metadata": { "bytecodeHash": "ipfs" }, + "compilationTarget": { + "contracts/src/components/FactRegistry.sol": "FactRegistry" + }, + "libraries": {} + }, + "sources": { + "contracts/src/components/FactRegistry.sol": { + "keccak256": "0xf1dde737bfeb616fad002bb7ad229c73fec98f1e539420566fa89805c5bb120d", + "urls": [ + "bzz-raw://1952c89d683c9f58ce06cf222f42772131113b3dd2442c6dc9150a2bde6d4d34", + "dweb:/ipfs/QmT8u7c1gAYRVF4kCdW7v9QiE65TwwdVu76pdvsFzXnZWg" + ], + "license": "Apache-2.0." + }, + "contracts/src/interfaces/IFactRegistry.sol": { + "keccak256": "0xab04b296b506dfb0b4a8828f3dc463072fd50449a5ad8327d1baf01438b0fb35", + "urls": [ + "bzz-raw://e451abe007f98081d1adfd759cc4168f81982992d8c0554650b94d37bc009e64", + "dweb:/ipfs/QmVBNUWFhNX8PqSMcqRkHVaTbcm7KNpgSg91Sj6MepFG6u" + ], + "license": "Apache-2.0." + }, + "contracts/src/interfaces/IQueryableFactRegistry.sol": { + "keccak256": "0x9689f96215bae9da993a5f1b16a7c1460b1abd478569d969d5b901fa4520b4b6", + "urls": [ + "bzz-raw://cfe2f9ca69bffdfaad8cdea188f0e6e385fbd2f5b1ee2194f989f25c76a30250", + "dweb:/ipfs/QmSffz94BEf9MuqrQ41LuAcBL6FnsxqY4pxfxM8b4s3iSi" + ], + "license": "Apache-2.0." + } + }, + "version": 1 + }, + "ast": { + "absolutePath": "contracts/src/components/FactRegistry.sol", + "id": 1175, + "exportedSymbols": { "FactRegistry": [1174] }, + "nodeType": "SourceUnit", + "src": "40:1358:8", + "nodes": [ + { + "id": 1110, + "nodeType": "PragmaDirective", + "src": "40:24:8", + "nodes": [], + "literals": ["solidity", "^", "0.6", ".12"] + }, + { + "id": 1111, + "nodeType": "ImportDirective", + "src": "66:50:8", + "nodes": [], + "absolutePath": "contracts/src/interfaces/IQueryableFactRegistry.sol", + "file": "../interfaces/IQueryableFactRegistry.sol", + "scope": 1175, + "sourceUnit": 6348, + "symbolAliases": [], + "unitAlias": "" + }, + { + "id": 1174, + "nodeType": "ContractDefinition", + "src": "118:1279:8", + "nodes": [ + { + "id": 1117, + "nodeType": "VariableDeclaration", + "src": "207:45:8", + "nodes": [], + "constant": false, + "mutability": "mutable", + "name": "verifiedFact", + "overrides": null, + "scope": 1174, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 1116, + "keyType": { + "id": 1114, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "215:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "207:24:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 1115, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "226:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "id": 1119, + "nodeType": "VariableDeclaration", + "src": "336:22:8", + "nodes": [], + "constant": false, + "mutability": "mutable", + "name": "anyFactRegistered", + "overrides": null, + "scope": 1174, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "336:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "id": 1132, + "nodeType": "FunctionDefinition", + "src": "421:109:8", + "nodes": [], + "body": { + "id": 1131, + "nodeType": "Block", + "src": "490:40:8", + "nodes": [], + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1128, + "name": "fact", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "518:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1127, + "name": "_factCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1144, + "src": "507:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32) view returns (bool)" + } + }, + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "507:16:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1126, + "id": 1130, + "nodeType": "Return", + "src": "500:23:8" + } + ] + }, + "baseFunctions": [6327], + "documentation": null, + "functionSelector": "6a938567", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isValid", + "overrides": { + "id": 1123, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "466:8:8" + }, + "parameters": { + "id": 1122, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1121, + "mutability": "mutable", + "name": "fact", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1132, + "src": "438:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1120, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "438:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "437:14:8" + }, + "returnParameters": { + "id": 1126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1125, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1132, + "src": "484:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1124, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "484:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "483:6:8" + }, + "scope": 1174, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 1144, + "nodeType": "FunctionDefinition", + "src": "826:105:8", + "nodes": [], + "body": { + "id": 1143, + "nodeType": "Block", + "src": "889:42:8", + "nodes": [], + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1139, + "name": "verifiedFact", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "906:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 1141, + "indexExpression": { + "argumentTypes": null, + "id": 1140, + "name": "fact", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1134, + "src": "919:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "906:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1138, + "id": 1142, + "nodeType": "Return", + "src": "899:25:8" + } + ] + }, + "documentation": null, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_factCheck", + "overrides": null, + "parameters": { + "id": 1135, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1134, + "mutability": "mutable", + "name": "fact", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1144, + "src": "846:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1133, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "846:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "845:14:8" + }, + "returnParameters": { + "id": 1138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1137, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1144, + "src": "883:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1136, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "883:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "882:6:8" + }, + "scope": 1174, + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 1164, + "nodeType": "FunctionDefinition", + "src": "937:272:8", + "nodes": [], + "body": { + "id": 1163, + "nodeType": "Block", + "src": "986:223:8", + "nodes": [], + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1149, + "name": "verifiedFact", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "1058:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 1151, + "indexExpression": { + "argumentTypes": null, + "id": 1150, + "name": "factHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1146, + "src": "1071:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1058:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1083:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1058:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1154, + "nodeType": "ExpressionStatement", + "src": "1058:29:8" + }, + { + "condition": { + "argumentTypes": null, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1134:18:8", + "subExpression": { + "argumentTypes": null, + "id": 1155, + "name": "anyFactRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "1135:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1162, + "nodeType": "IfStatement", + "src": "1130:73:8", + "trueBody": { + "id": 1161, + "nodeType": "Block", + "src": "1154:49:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1157, + "name": "anyFactRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "1168:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1188:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1168:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1160, + "nodeType": "ExpressionStatement", + "src": "1168:24:8" + } + ] + } + } + ] + }, + "documentation": null, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "registerFact", + "overrides": null, + "parameters": { + "id": 1147, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1146, + "mutability": "mutable", + "name": "factHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1164, + "src": "959:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1145, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "959:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "958:18:8" + }, + "returnParameters": { + "id": 1148, + "nodeType": "ParameterList", + "parameters": [], + "src": "986:0:8" + }, + "scope": 1174, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 1173, + "nodeType": "FunctionDefinition", + "src": "1287:108:8", + "nodes": [], + "body": { + "id": 1172, + "nodeType": "Block", + "src": "1354:41:8", + "nodes": [], + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1170, + "name": "anyFactRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "1371:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1169, + "id": 1171, + "nodeType": "Return", + "src": "1364:24:8" + } + ] + }, + "baseFunctions": [6346], + "documentation": null, + "functionSelector": "d6354e15", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasRegisteredFact", + "overrides": { + "id": 1166, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1330:8:8" + }, + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "1313:2:8" + }, + "returnParameters": { + "id": 1169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1168, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "1348:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1167, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1348:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1347:6:8" + }, + "scope": 1174, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1112, + "name": "IQueryableFactRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6347, + "src": "143:22:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IQueryableFactRegistry_$6347", + "typeString": "contract IQueryableFactRegistry" + } + }, + "id": 1113, + "nodeType": "InheritanceSpecifier", + "src": "143:22:8" + } + ], + "contractDependencies": [6328, 6347], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [1174, 6347, 6328], + "name": "FactRegistry", + "scope": 1175 + } + ], + "license": "Apache-2.0." + }, + "id": 8 +} diff --git a/crates/prover_services/gps_fact_checker/tests/artifacts/README.md b/crates/prover_services/gps_fact_checker/tests/artifacts/README.md new file mode 100644 index 00000000..a9d4d435 --- /dev/null +++ b/crates/prover_services/gps_fact_checker/tests/artifacts/README.md @@ -0,0 +1,39 @@ +# How to generate artifacts + +## Solidity output for GPS verifier + +Clone and build the repo +using Foundry. + +## Cairo PIEs + +In order to generate zip compressed Cairo PIEs follow the instructions at + + +Few things to note: + +- Use `--cairo_pie_output` flag to specify the output path for the zipped PIE + file +- Use `--append_return_values` flag to write program output to the related + builtin segment +- Use the according layout (that includes `output` builtin at the very least, + so by default `small`) depending on what particular program uses + +Example: + +```sh +cargo run ../cairo_programs/cairo-1-programs/fibonacci.cairo --append_return_values --cairo_pie_output fibonacci.zip --layout small +``` + +### Generate facts + +To create test vectors for SHARP facts you would need to install the Cairo0 +toolchain as described here: + +Then use the `get_fact.py` script to get the fact of the according zipped PIE. + +Example: + +```sh +python3 get_fact.py fibonacci.zip +``` diff --git a/crates/prover_services/gps_fact_checker/tests/artifacts/fibonacci.zip b/crates/prover_services/gps_fact_checker/tests/artifacts/fibonacci.zip new file mode 100644 index 00000000..b5943536 Binary files /dev/null and b/crates/prover_services/gps_fact_checker/tests/artifacts/fibonacci.zip differ diff --git a/crates/prover_services/gps_fact_checker/tests/artifacts/get_fact.py b/crates/prover_services/gps_fact_checker/tests/artifacts/get_fact.py new file mode 100644 index 00000000..3f4e9206 --- /dev/null +++ b/crates/prover_services/gps_fact_checker/tests/artifacts/get_fact.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 + +import sys +from starkware.cairo.lang.vm.cairo_pie import CairoPie +from starkware.cairo.bootloaders.generate_fact import get_cairo_pie_fact_info +from starkware.cairo.bootloaders.hash_program import compute_program_hash_chain + +cairo_pie = CairoPie.from_file(sys.argv[1]) + +program_hash = compute_program_hash_chain(program=cairo_pie.program, use_poseidon=False) +print("Program hash: ", program_hash) + +fact_info = get_cairo_pie_fact_info(cairo_pie, program_hash) +print("Fact: ", fact_info.fact) diff --git a/crates/prover_services/prover_client_interface/Cargo.toml b/crates/prover_services/prover_client_interface/Cargo.toml new file mode 100644 index 00000000..5f7045c0 --- /dev/null +++ b/crates/prover_services/prover_client_interface/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "prover-client-interface" +version.workspace = true +edition.workspace = true + +[dependencies] +async-trait.workspace = true +cairo-vm.workspace = true +gps-fact-checker.workspace = true +mockall.workspace = true +snos.workspace = true +thiserror.workspace = true +utils.workspace = true diff --git a/crates/prover_services/prover_client_interface/src/lib.rs b/crates/prover_services/prover_client_interface/src/lib.rs new file mode 100644 index 00000000..b8ecdf55 --- /dev/null +++ b/crates/prover_services/prover_client_interface/src/lib.rs @@ -0,0 +1,45 @@ +use async_trait::async_trait; +use cairo_vm::vm::runners::cairo_pie::CairoPie; +use mockall::automock; + +/// Prover client provides an abstraction over different proving services that do the following: +/// - Accept a task containing Cairo intermediate execution artifacts (in PIE format) +/// - Aggregate multiple tasks and prove the execution (of the bootloader program where PIEs are +/// inputs) +/// - Register the proof onchain (individiual proof facts available for each task) +/// +/// A common Madara workflow would be single task per block (SNOS execution result) or per block +/// span (SNAR). +#[automock] +#[async_trait] +pub trait ProverClient: Send + Sync { + async fn submit_task(&self, task: Task) -> Result; + async fn get_task_status(&self, task_id: &TaskId) -> Result; +} + +pub enum Task { + CairoPie(CairoPie), +} + +pub type TaskId = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum TaskStatus { + Processing, + Succeeded, + Failed(String), +} + +#[derive(Debug, thiserror::Error)] +pub enum ProverClientError { + #[error("Internal prover error: {0}")] + Internal(#[source] Box), + #[error("Settings provider error: {0}")] + SettingsProvider(#[from] utils::settings::SettingsProviderError), + #[error("Task is invalid: {0}")] + TaskInvalid(TaskId), + #[error("Fact checker error: {0}")] + FactChecker(#[from] gps_fact_checker::error::FactCheckerError), + #[error("Failed to encode Cairo PIE: {0}")] + PieEncoding(#[source] snos::error::SnOsError), +} diff --git a/crates/prover_services/sharp_service/Cargo.toml b/crates/prover_services/sharp_service/Cargo.toml new file mode 100644 index 00000000..572ff8b5 --- /dev/null +++ b/crates/prover_services/sharp_service/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "sharp-service" +version.workspace = true +edition.workspace = true + +[dependencies] +alloy.workspace = true +alloy-primitives.workspace = true +async-trait.workspace = true +cairo-vm.workspace = true +gps-fact-checker.workspace = true +hex.workspace = true +prover-client-interface.workspace = true +reqwest.workspace = true +serde.workspace = true +serde_json.workspace = true +snos.workspace = true +thiserror.workspace = true +tracing.workspace = true +url.workspace = true +utils.workspace = true +uuid.workspace = true + +[dev-dependencies] +tokio.workspace = true diff --git a/crates/prover_services/sharp_service/src/client.rs b/crates/prover_services/sharp_service/src/client.rs new file mode 100644 index 00000000..e1aa8c14 --- /dev/null +++ b/crates/prover_services/sharp_service/src/client.rs @@ -0,0 +1,49 @@ +use serde_json::json; +use snos::sharp::{CairoJobResponse, CairoStatusResponse}; +use url::Url; +use uuid::Uuid; + +use crate::error::SharpError; + +/// SHARP endpoint for Sepolia testnet +pub const DEFAULT_SHARP_URL: &str = "https://testnet.provingservice.io"; + +/// SHARP API async wrapper +pub struct SharpClient { + base_url: Url, + client: reqwest::Client, +} + +impl SharpClient { + pub fn new(url: Url) -> Self { + Self { base_url: url, client: reqwest::Client::new() } + } + + pub async fn add_job(&self, encoded_pie: &str) -> Result { + let data = json!({ "action": "add_job", "request": { "cairo_pie": encoded_pie } }); + let url = self.base_url.join("add_job").unwrap(); + let res = self.client.post(url).json(&data).send().await.map_err(SharpError::AddJobFailure)?; + + match res.status() { + reqwest::StatusCode::OK => res.json().await.map_err(SharpError::AddJobFailure), + code => Err(SharpError::SharpService(code)), + } + } + + pub async fn get_job_status(&self, job_key: &Uuid) -> Result { + let data = json!({ "action": "get_status", "request": { "cairo_job_key": job_key } }); + let url = self.base_url.join("get_status").unwrap(); + let res = self.client.post(url).json(&data).send().await.map_err(SharpError::GetJobStatusFailure)?; + + match res.status() { + reqwest::StatusCode::OK => res.json().await.map_err(SharpError::GetJobStatusFailure), + code => Err(SharpError::SharpService(code)), + } + } +} + +impl Default for SharpClient { + fn default() -> Self { + Self::new(DEFAULT_SHARP_URL.parse().unwrap()) + } +} diff --git a/crates/prover_services/sharp_service/src/config.rs b/crates/prover_services/sharp_service/src/config.rs new file mode 100644 index 00000000..6567448c --- /dev/null +++ b/crates/prover_services/sharp_service/src/config.rs @@ -0,0 +1,27 @@ +use alloy::primitives::Address; +use serde::{Deserialize, Serialize}; +use url::Url; + +use crate::client::DEFAULT_SHARP_URL; + +/// SHARP proving service configuration +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SharpConfig { + /// SHARP service url + pub service_url: Url, + /// EVM RPC node url + pub rpc_node_url: Url, + /// GPS verifier contract address (implements FactRegistry) + pub verifier_address: Address, +} + +impl Default for SharpConfig { + /// Default config for Sepolia testnet + fn default() -> Self { + Self { + service_url: DEFAULT_SHARP_URL.parse().unwrap(), + rpc_node_url: "https://sepolia.drpc.org".parse().unwrap(), + verifier_address: "0x07ec0D28e50322Eb0C159B9090ecF3aeA8346DFe".parse().unwrap(), + } + } +} diff --git a/crates/prover_services/sharp_service/src/error.rs b/crates/prover_services/sharp_service/src/error.rs new file mode 100644 index 00000000..082d6690 --- /dev/null +++ b/crates/prover_services/sharp_service/src/error.rs @@ -0,0 +1,30 @@ +use alloy_primitives::hex::FromHexError; +use gps_fact_checker::error::FactCheckerError; +use prover_client_interface::ProverClientError; +use reqwest::StatusCode; + +#[derive(Debug, thiserror::Error)] +pub enum SharpError { + #[error("Failed to to add SHARP job: {0}")] + AddJobFailure(#[source] reqwest::Error), + #[error("Failed to to get status of a SHARP job: {0}")] + GetJobStatusFailure(#[source] reqwest::Error), + #[error("Fact checker error: {0}")] + FactChecker(#[from] FactCheckerError), + #[error("SHARP service returned an error {0}")] + SharpService(StatusCode), + #[error("Failed to parse job key: {0}")] + JobKeyParse(uuid::Error), + #[error("Failed to parse fact: {0}")] + FactParse(FromHexError), + #[error("Failed to split task id into job key and fact")] + TaskIdSplit, + #[error("Failed to encode PIE")] + PieEncode(#[source] snos::error::SnOsError), +} + +impl From for ProverClientError { + fn from(value: SharpError) -> Self { + Self::Internal(Box::new(value)) + } +} diff --git a/crates/prover_services/sharp_service/src/lib.rs b/crates/prover_services/sharp_service/src/lib.rs new file mode 100644 index 00000000..800fc835 --- /dev/null +++ b/crates/prover_services/sharp_service/src/lib.rs @@ -0,0 +1,140 @@ +pub mod client; +pub mod config; +pub mod error; + +use std::str::FromStr; + +use alloy::primitives::B256; +use async_trait::async_trait; +use gps_fact_checker::fact_info::get_fact_info; +use gps_fact_checker::FactChecker; +use prover_client_interface::{ProverClient, ProverClientError, Task, TaskId, TaskStatus}; +use snos::sharp::CairoJobStatus; +use utils::settings::SettingsProvider; +use uuid::Uuid; + +use crate::client::SharpClient; +use crate::config::SharpConfig; +use crate::error::SharpError; + +pub const SHARP_SETTINGS_NAME: &str = "sharp"; + +/// SHARP (aka GPS) is a shared proving service hosted by Starkware. +pub struct SharpProverService { + sharp_client: SharpClient, + fact_checker: FactChecker, +} + +#[async_trait] +impl ProverClient for SharpProverService { + async fn submit_task(&self, task: Task) -> Result { + match task { + Task::CairoPie(cairo_pie) => { + let fact_info = get_fact_info(&cairo_pie, None)?; + let encoded_pie = + snos::sharp::pie::encode_pie_mem(cairo_pie).map_err(ProverClientError::PieEncoding)?; + let res = self.sharp_client.add_job(&encoded_pie).await?; + if let Some(job_key) = res.cairo_job_key { + Ok(combine_task_id(&job_key, &fact_info.fact)) + } else { + Err(ProverClientError::TaskInvalid(res.error_message.unwrap_or_default())) + } + } + } + } + + async fn get_task_status(&self, task_id: &TaskId) -> Result { + let (job_key, fact) = split_task_id(task_id)?; + let res = self.sharp_client.get_job_status(&job_key).await?; + match res.status { + CairoJobStatus::FAILED => Ok(TaskStatus::Failed(res.error_log.unwrap_or_default())), + CairoJobStatus::INVALID => { + Ok(TaskStatus::Failed(format!("Task is invalid: {:?}", res.invalid_reason.unwrap_or_default()))) + } + CairoJobStatus::UNKNOWN => Ok(TaskStatus::Failed(format!("Task not found: {}", task_id))), + CairoJobStatus::IN_PROGRESS | CairoJobStatus::NOT_CREATED | CairoJobStatus::PROCESSED => { + Ok(TaskStatus::Processing) + } + CairoJobStatus::ONCHAIN => { + if self.fact_checker.is_valid(&fact).await? { + Ok(TaskStatus::Succeeded) + } else { + Ok(TaskStatus::Failed(format!("Fact {} is not valid or not registed", hex::encode(fact)))) + } + } + } + } +} + +impl SharpProverService { + pub fn new(sharp_client: SharpClient, fact_checker: FactChecker) -> Self { + Self { sharp_client, fact_checker } + } + + pub fn with_settings(settings: &impl SettingsProvider) -> Self { + let sharp_cfg: SharpConfig = settings.get_settings(SHARP_SETTINGS_NAME).unwrap(); + let sharp_client = SharpClient::new(sharp_cfg.service_url); + let fact_checker = FactChecker::new(sharp_cfg.rpc_node_url, sharp_cfg.verifier_address); + Self::new(sharp_client, fact_checker) + } +} + +/// Construct SHARP specific task ID from job key and proof fact +pub fn combine_task_id(job_key: &Uuid, fact: &B256) -> TaskId { + format!("{}:{}", job_key, fact) +} + +/// Split task ID into SHARP job key and proof fact +pub fn split_task_id(task_id: &TaskId) -> Result<(Uuid, B256), SharpError> { + let (job_key_str, fact_str) = task_id.split_once(':').ok_or(SharpError::TaskIdSplit)?; + let job_key = Uuid::from_str(job_key_str).map_err(SharpError::JobKeyParse)?; + let fact = B256::from_str(fact_str).map_err(SharpError::FactParse)?; + Ok((job_key, fact)) +} + +#[cfg(test)] +mod tests { + use std::path::PathBuf; + use std::time::Duration; + + use cairo_vm::vm::runners::cairo_pie::CairoPie; + use prover_client_interface::{ProverClient, Task, TaskStatus}; + use tracing::log::log; + use tracing::log::Level::{Error, Info}; + use utils::settings::default::DefaultSettingsProvider; + + use crate::SharpProverService; + + #[ignore] + #[tokio::test] + async fn sharp_reproduce_rate_limiting_issue() { + // TODO: leaving this test to check if the issue still reproduces (504 error after 8th job status + // query) + let sharp_service = SharpProverService::with_settings(&DefaultSettingsProvider {}); + let cairo_pie_path: PathBuf = + [env!("CARGO_MANIFEST_DIR"), "tests", "artifacts", "fibonacci.zip"].iter().collect(); + let cairo_pie = CairoPie::read_zip_file(&cairo_pie_path).unwrap(); + // Submit task to the testnet prover + let task_id = sharp_service.submit_task(Task::CairoPie(cairo_pie)).await.unwrap(); + log!(Info, "SHARP: task {} submitted", task_id); + for attempt in 0..10 { + tokio::time::sleep(Duration::from_millis((attempt + 1) * 1000)).await; + match sharp_service.get_task_status(&task_id).await.unwrap() { + TaskStatus::Failed(err) => { + log!(Error, "SHARP: task failed with {}", err); + panic!("Task failed"); + } + TaskStatus::Processing => { + log!(Info, "SHARP: task is processing (attempt {})", attempt); + continue; + } + TaskStatus::Succeeded => { + log!(Info, "SHARP: task is completed"); + return; + } + } + } + log!(Error, "SHARP: waiting timeout"); + panic!("Out of attempts"); + } +} diff --git a/crates/prover_services/sharp_service/tests/artifacts/fibonacci.zip b/crates/prover_services/sharp_service/tests/artifacts/fibonacci.zip new file mode 100644 index 00000000..b5943536 Binary files /dev/null and b/crates/prover_services/sharp_service/tests/artifacts/fibonacci.zip differ diff --git a/crates/settlement_clients/settlement-client-interface/src/lib.rs b/crates/settlement_clients/settlement-client-interface/src/lib.rs index da5a471c..7fc51a65 100644 --- a/crates/settlement_clients/settlement-client-interface/src/lib.rs +++ b/crates/settlement_clients/settlement-client-interface/src/lib.rs @@ -1,6 +1,7 @@ use async_trait::async_trait; use color_eyre::Result; -use mockall::{automock, predicate::*}; +use mockall::automock; +use mockall::predicate::*; use starknet::core::types::FieldElement; #[derive(Debug, Copy, Clone, PartialEq, Eq)] diff --git a/crates/utils/Cargo.toml b/crates/utils/Cargo.toml index 8fea4db4..1061637d 100644 --- a/crates/utils/Cargo.toml +++ b/crates/utils/Cargo.toml @@ -7,3 +7,5 @@ edition.workspace = true [dependencies] color-eyre = { workspace = true } +serde.workspace = true +thiserror.workspace = true diff --git a/crates/utils/src/lib.rs b/crates/utils/src/lib.rs index 6a65fdce..277ce5ab 100644 --- a/crates/utils/src/lib.rs +++ b/crates/utils/src/lib.rs @@ -1 +1,14 @@ pub mod env_utils; +pub mod settings; + +/// Evaluate `$x:expr` and if not true return `Err($y:expr)`. +/// +/// Used as `ensure!(expression_to_ensure, expression_to_return_on_false)`. +#[macro_export] +macro_rules! ensure { + ($x:expr, $y:expr $(,)?) => {{ + if !$x { + return Err($y); + } + }}; +} diff --git a/crates/utils/src/settings/default.rs b/crates/utils/src/settings/default.rs new file mode 100644 index 00000000..3166ab6e --- /dev/null +++ b/crates/utils/src/settings/default.rs @@ -0,0 +1,13 @@ +use super::SettingsProvider; + +#[derive(Debug, Clone, Default)] +pub struct DefaultSettingsProvider {} + +impl SettingsProvider for DefaultSettingsProvider { + fn get_settings( + &self, + _section: &'static str, + ) -> Result { + Ok(T::default()) + } +} diff --git a/crates/utils/src/settings/mod.rs b/crates/utils/src/settings/mod.rs new file mode 100644 index 00000000..cbf87c43 --- /dev/null +++ b/crates/utils/src/settings/mod.rs @@ -0,0 +1,13 @@ +pub mod default; + +use serde::de::DeserializeOwned; + +#[derive(Debug, thiserror::Error)] +pub enum SettingsProviderError { + #[error("Internal settings error: {0}")] + Internal(#[source] Box), +} + +pub trait SettingsProvider { + fn get_settings(&self, name: &'static str) -> Result; +} diff --git a/e2e-tests/Cargo.toml b/e2e-tests/Cargo.toml new file mode 100644 index 00000000..03ffa215 --- /dev/null +++ b/e2e-tests/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "e2e-tests" +version = "0.1.0" +edition = "2021" + +[dependencies] +orchestrator.workspace = true +reqwest = { workspace = true, features = ["json"] } +serde_json.workspace = true +testcontainers.workspace = true +tokio = { workspace = true, features = ["full"] } +tokio-stream.workspace = true +tokio-util.workspace = true +url.workspace = true + +[[test]] +name = "test_samples" +path = "test_samples.rs" diff --git a/e2e-tests/src/lib.rs b/e2e-tests/src/lib.rs new file mode 100644 index 00000000..4e4b2ae1 --- /dev/null +++ b/e2e-tests/src/lib.rs @@ -0,0 +1,28 @@ +pub mod mongodb; +pub mod node; + +use std::net::TcpListener; +use std::path::{Path, PathBuf}; + +pub use mongodb::MongoDbServer; +pub use node::Orchestrator; +pub use orchestrator::database::mongodb::MongoDb as MongoDbClient; + +const MIN_PORT: u16 = 49_152; +const MAX_PORT: u16 = 65_535; + +fn get_free_port() -> u16 { + for port in MIN_PORT..=MAX_PORT { + if let Ok(listener) = TcpListener::bind(("127.0.0.1", port)) { + return listener.local_addr().expect("No local addr").port(); + } + // otherwise port is occupied + } + panic!("No free ports available"); +} + +fn get_repository_root() -> PathBuf { + let manifest_path = Path::new(&env!("CARGO_MANIFEST_DIR")); + let repository_root = manifest_path.parent().expect("Failed to get parent directory of CARGO_MANIFEST_DIR"); + repository_root.to_path_buf() +} diff --git a/e2e-tests/src/mongodb.rs b/e2e-tests/src/mongodb.rs new file mode 100644 index 00000000..0d99020f --- /dev/null +++ b/e2e-tests/src/mongodb.rs @@ -0,0 +1,34 @@ +use testcontainers::core::{ContainerPort, WaitFor}; +use testcontainers::runners::AsyncRunner; +use testcontainers::{ContainerAsync, GenericImage, ImageExt}; +use url::Url; + +use crate::get_free_port; + +const MONGODB_DEFAULT_PORT: u16 = 27017; +const MONGODB_IMAGE_NAME: &str = "mongo"; +const MONGODB_IMAGE_TAG: &str = "8.0-rc"; + +#[allow(dead_code)] +pub struct MongoDbServer { + container: ContainerAsync, + endpoint: Url, +} + +impl MongoDbServer { + pub async fn run() -> Self { + let host_port = get_free_port(); + + let container = GenericImage::new(MONGODB_IMAGE_NAME, MONGODB_IMAGE_TAG) + .with_wait_for(WaitFor::message_on_stdout("Waiting for connections")) + .with_mapped_port(host_port, ContainerPort::Tcp(MONGODB_DEFAULT_PORT)) + .start() + .await + .expect("Failed to create docker container"); + Self { container, endpoint: Url::parse(&format!("http://127.0.0.1:{}", host_port)).unwrap() } + } + + pub fn endpoint(&self) -> &Url { + &self.endpoint + } +} diff --git a/e2e-tests/src/node.rs b/e2e-tests/src/node.rs new file mode 100644 index 00000000..3a00d67a --- /dev/null +++ b/e2e-tests/src/node.rs @@ -0,0 +1,89 @@ +use std::fs::{create_dir_all, File}; +use std::path::Path; +use std::process::{Child, Command, ExitStatus, Stdio}; +use std::time::Duration; + +use tokio::net::TcpStream; +use url::Url; + +use crate::{get_free_port, get_repository_root}; + +const CONNECTION_ATTEMPTS: usize = 360; +const CONNECTION_ATTEMPT_DELAY_MS: u64 = 500; + +#[derive(Debug)] +pub struct Orchestrator { + process: Child, + address: String, +} + +impl Drop for Orchestrator { + fn drop(&mut self) { + let mut kill = + Command::new("kill").args(["-s", "TERM", &self.process.id().to_string()]).spawn().expect("Failed to kill"); + kill.wait().expect("Failed to kill the process"); + } +} + +impl Orchestrator { + fn cargo_run(root_dir: &Path, binary: &str, args: Vec<&str>, envs: Vec<(&str, &str)>) -> Child { + let arguments = [vec!["run", "--bin", binary, "--release", "--"], args].concat(); + + let logs_dir = Path::join(root_dir, Path::new("target/logs")); + create_dir_all(logs_dir.clone()).expect("Failed to create logs dir"); + + let stdout = Stdio::from(File::create(logs_dir.join(format!("{}-stdout.txt", binary))).unwrap()); + let stderr = Stdio::from(File::create(logs_dir.join(format!("{}-stderr.txt", binary))).unwrap()); + + Command::new("cargo") + .stdout(stdout) + .stderr(stderr) + .envs(envs) + .args(arguments) + .spawn() + .expect("Could not run orchestrator node") + } + + pub fn run(envs: Vec<(&str, &str)>) -> Self { + let port = get_free_port(); + let address = format!("127.0.0.1:{}", port); + let repository_root = &get_repository_root(); + + std::env::set_current_dir(repository_root).expect("Failed to change working directory"); + + let port_str = format!("{}", port); + let envs = [envs, vec![("PORT", port_str.as_str())]].concat(); + + let process = Self::cargo_run(repository_root.as_path(), "orchestrator", vec![], envs); + + Self { process, address } + } + + pub fn endpoint(&self) -> Url { + Url::parse(&format!("http://{}", self.address)).unwrap() + } + + pub fn has_exited(&mut self) -> Option { + self.process.try_wait().expect("Failed to get orchestrator node exit status") + } + + pub async fn wait_till_started(&mut self) { + let mut attempts = CONNECTION_ATTEMPTS; + loop { + match TcpStream::connect(&self.address).await { + Ok(_) => return, + Err(err) => { + if let Some(status) = self.has_exited() { + panic!("Orchestrator node exited early with {}", status); + } + if attempts == 0 { + panic!("Failed to connect to {}: {}", self.address, err); + } + } + }; + + attempts -= 1; + tokio::time::sleep(Duration::from_millis(CONNECTION_ATTEMPT_DELAY_MS)).await; + } + } +} diff --git a/e2e-tests/test_samples.rs b/e2e-tests/test_samples.rs new file mode 100644 index 00000000..d593fa08 --- /dev/null +++ b/e2e-tests/test_samples.rs @@ -0,0 +1,15 @@ +use e2e_tests::{MongoDbServer, Orchestrator}; + +extern crate e2e_tests; + +#[ignore = "requires DOCKER_HOST set to run"] +#[tokio::test] +async fn test_orchestrator_launches() { + let mongodb = MongoDbServer::run().await; + let mut orchestrator = Orchestrator::run(vec![ + // TODO: mock Madara RPC API + ("MADARA_RPC_URL", "http://localhost"), + ("MONGODB_CONNECTION_STRING", mongodb.endpoint().as_str()), + ]); + orchestrator.wait_till_started().await; +} diff --git a/migrations/.DS_Store b/migrations/.DS_Store deleted file mode 100644 index 60e51e56..00000000 Binary files a/migrations/.DS_Store and /dev/null differ