diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..6cf29f5 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[env] +# These environment variables are needed because dependency `sequencer` requires llvm-18 installed. +LLVM_SYS_181_PREFIX = "/usr/lib/llvm-18/" +MLIR_SYS_180_PREFIX = "/usr/lib/llvm-18/" +TABLEGEN_180_PREFIX = "/usr/lib/llvm-18/" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d9996b..f31f623 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Push Checks on: push env: - RUST_VERSION: 1.78.0 # If this is updated, update `Cargo.toml`. + RUST_VERSION: 1.81.0 # If this is updated, update `Cargo.toml`. CARGO_TERM_COLOR: always RUSTDOCFLAGS: "-D warnings" # Fail on `cargo doc` warnings. @@ -10,6 +10,7 @@ jobs: build: name: Test strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} @@ -26,6 +27,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ + - name: Install LLVM + run: bash dependencies.sh - name: Build run: cargo build --locked - name: Run tests @@ -47,6 +50,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ + - name: Install LLVM + run: bash dependencies.sh - name: Cargo clippy run: cargo clippy --locked --all-targets --all-features -- -D warnings @@ -92,5 +97,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ + - name: Install LLVM + run: bash dependencies.sh - name: Cargo doc run: cargo doc --no-deps --document-private-items --locked diff --git a/Cargo.lock b/Cargo.lock index a4de440..aa5ad47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aes" @@ -72,9 +72,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -87,33 +87,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -121,9 +121,23 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" + +[[package]] +name = "aquamarine" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.79", +] [[package]] name = "ark-ec" @@ -255,9 +269,9 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii-canvas" @@ -276,13 +290,13 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -293,35 +307,35 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] -name = "base64" -version = "0.13.1" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -329,6 +343,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64ct" version = "1.6.0" @@ -344,6 +364,29 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.79", + "which", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -394,8 +437,8 @@ dependencies = [ [[package]] name = "blockifier" -version = "0.8.0-rc.1" -source = "git+https://github.com/reilabs/blockifier.git?rev=e3141f67338cbb03595f24984b615042877229e0#e3141f67338cbb03595f24984b615042877229e0" +version = "0.0.0" +source = "git+https://github.com/reilabs/sequencer.git?rev=6b019bc1a0b1da471fd0d5aabe1c71759c26ee9e#6b019bc1a0b1da471fd0d5aabe1c71759c26ee9e" dependencies = [ "anyhow", "ark-ec", @@ -405,21 +448,24 @@ dependencies = [ "cached", "cairo-lang-casm", "cairo-lang-runner", + "cairo-lang-sierra", "cairo-lang-starknet-classes", "cairo-lang-utils", + "cairo-native", "cairo-vm", "derive_more", - "indexmap 2.2.6", - "itertools 0.10.5", + "indexmap 2.6.0", + "itertools 0.12.1", "keccak", "log", "num-bigint", "num-integer", "num-rational", "num-traits 0.2.19", - "once_cell", + "papyrus_config", "paste", "phf", + "semver", "serde", "serde_json", "sha2", @@ -428,14 +474,16 @@ dependencies = [ "starknet_api", "strum", "strum_macros", + "tempfile", "thiserror", + "toml", ] [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -455,9 +503,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" [[package]] name = "byteorder" @@ -467,9 +515,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "bzip2" @@ -530,9 +578,9 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cairo-lang-casm" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4425280959f189d8a5ebf1f5363c10663bc9f843a4819253e6be87d183b583e" +checksum = "fd4d6659539ace9649c8e8a7434e51b0c50a7a700111d0a2b967dde220ddff49" dependencies = [ "cairo-lang-utils", "indoc", @@ -544,9 +592,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2698e2ca73db964e6d496a648fcbb2ace5559941b5179ab3310c9a0b6872b348" +checksum = "5852668d1c6966b34d6e4fe249732769ab9cb2012c201e3889d8119f206760a0" dependencies = [ "anyhow", "cairo-lang-defs", @@ -561,7 +609,8 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "indoc", - "salsa", + "rayon", + "rust-analyzer-salsa", "semver", "smol_str", "thiserror", @@ -569,18 +618,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac7332f2b041ca28b24b0311a0b4a35f426bb52836a2d268a8374ea262e9e6b" +checksum = "50c804649297ca417206435ee3e8041d2100cc31ebf4a95bc4b92ed02dc63469" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079a34b560a82b463cd12ae62022d70981e8ab56b6505f9499348ebeaf460de8" +checksum = "e8fbda467ac36f73bb1879e1f741898fc719d6f9239a01cc422e6a023281319b" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -589,15 +638,15 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-diagnostics" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c29625349297ad791942377763f5b04c779ea694f436488dc6ad194720b89487" +checksum = "c843ef4715e3d21de5388d02206db2506e2d2ec0e80e2629e0ae9900a08b8674" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -607,9 +656,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb26cd75126db6eaf94d5dffe0ce750d030ac879a88de5a621551969e9b59e3" +checksum = "33a416c5871960fb4823160ebef2abc51e0c1b86fef1e97a1ebb2e5f3c3795d3" dependencies = [ "cairo-lang-utils", "good_lp", @@ -617,14 +666,14 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "651012f2956bea884c7a3ab9df21dc76112d7edd3f403b37ca5be62fc3f41b09" +checksum = "47189e0cb84b21defd201af4cf24a94c6b0d09f48706cf659c9ffa0def8a7a43" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", "path-clean", - "salsa", + "rust-analyzer-salsa", "semver", "serde", "smol_str", @@ -632,9 +681,9 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d09ffb9498368cf4e95d0b28662596331aef1677e4f759ab5e609d27dfcb587" +checksum = "6409ff1f4a93ce7c0968d9d857d2a8c03657617a827159d33f978110b718b31d" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -645,7 +694,7 @@ dependencies = [ "diffy", "ignore", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "serde", "smol_str", "thiserror", @@ -653,9 +702,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4ffe6c197c35dec665029fcf695422f02c55b5118b4da1142e182b9fe77f87" +checksum = "1e224e006c82ef21bd9e243390992de2be25ae6fbbdaa8544067b3f0c31977f1" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -671,16 +720,15 @@ dependencies = [ "log", "num-bigint", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-parser" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f262ad5f1110ff70c93deb81cce024cf160f4a4518762e7deb2047fe73846789" +checksum = "afb260ba349c2b699639e56f9b64deb969ff01179a0253087e2c8ceec7e32157" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -691,16 +739,16 @@ dependencies = [ "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", - "salsa", + "rust-analyzer-salsa", "smol_str", "unescaper", ] [[package]] name = "cairo-lang-plugins" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18024b44b5edbc1f378ba85c1a4ff04e880ea465a33251053aec507f08250668" +checksum = "05a2e500dc8ddea4d25a866d8a839158b0e4c41a6c023f21911e2da252bd91b3" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -711,26 +759,26 @@ dependencies = [ "indent", "indoc", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-proc-macros" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "124402d8fad2a033bb36910dd7d0651f3100845c63dce679c58797a8cb0448c2" +checksum = "d72f17373740f242d6995e896b9195c2cedff7e8b14e496afdd16b405039d1fb" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] name = "cairo-lang-project" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f37dba9653eabf4dcb43a5e1436cd6bc093b5ad6f28ff42eaaef12549014213" +checksum = "13294f08d2013fcd6e815e7235935680963dec3390e5baf454f33da866fc44b6" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -742,9 +790,9 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.7.0-rc.3" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ab7b0e0640adaed21b9d9b9b94b3edf7f7ab95514b1dd40c679317a33dabea" +checksum = "528a247ac59cb35b2f99d64605a81de815fa5fb0b0e7f7ece1d4e7fcf267d4ea" dependencies = [ "ark-ff", "ark-secp256k1", @@ -773,9 +821,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1612476b548e9ab8ae89ee38a73d9875339f62f2f59d9ce8a719bc1761c54c3" +checksum = "6936215bca75c23e71873998420a3d46c322507a09917ce676c8d39f8c1bd6fe" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -792,17 +840,16 @@ dependencies = [ "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "smol_str", "toml", ] [[package]] name = "cairo-lang-sierra" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8209be8cf22263bf8a55df334a642b74fe563beecbbbefa55cda39fa4b131a61" +checksum = "891488c1a3184ce91679f5bdb63015a1d24769a48bd07e5d51a1779d0031dfbe" dependencies = [ "anyhow", "cairo-lang-utils", @@ -815,9 +862,8 @@ dependencies = [ "num-bigint", "num-integer", "num-traits 0.2.19", - "once_cell", "regex", - "salsa", + "rust-analyzer-salsa", "serde", "serde_json", "sha3", @@ -828,9 +874,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c9d1350366c23e4a9f6e18ea95939f18df52df455f06c0e3d7889f80ce18a94" +checksum = "ea7752cd48c86b2cde8603b753a6df4da086dacd16a73d288854d5f040b51171" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -844,9 +890,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fe1ff15052b173537360b7dca5f9b2ccb10392b2a1c11af99add35d42632115" +checksum = "340892a09c9421414b2ac45b03c705f16e2bd737e4559dfd98ee1d20718dec9e" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -860,9 +906,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3802e7b6722fabc9cc0a61c86e7ad53138f6f41880aca80a60f889739fbf55" +checksum = "c5cc616e8df44c4d685fe3c5f81f35ebbda57225098b35cea8602457c45c9e96" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -876,8 +922,7 @@ dependencies = [ "cairo-lang-utils", "itertools 0.12.1", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "serde", "serde_json", "smol_str", @@ -885,9 +930,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355bde3b0a835bac2457af133a9042a7d039c934e678905b843bb6b420884428" +checksum = "1c22ff7e8113a46a907f82f191096c96935cc48247e3079971ddf536ccc2f4f8" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -906,9 +951,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ddddaacc814e0ffda9f176c913fb2a9cd74fe6594dea789e8281eef10cac201" +checksum = "5bf41941776e7410a8853a8e2a116292fc24d219df1989a92ffe5ab0e98037eb" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -916,9 +961,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10be5fd5fe78db232b032e25e4be786f8061606be4ab26371c869c5ab267699c" +checksum = "b5508fa5ee8d24adf7d2c65505d0ac35efc892eac16d1449c6f7e314a0288cb8" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -937,7 +982,6 @@ dependencies = [ "indent", "indoc", "itertools 0.12.1", - "once_cell", "serde", "serde_json", "smol_str", @@ -947,9 +991,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.7.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7bf919d0919fce727c6d53ee5cb37459c9db35c258521284523c53f5f907c07" +checksum = "482b8f9d7f8cc7140f1260ee71f3308a66d15bd228a06281067ca3f8f4410db2" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -960,7 +1004,6 @@ dependencies = [ "num-bigint", "num-integer", "num-traits 0.2.19", - "once_cell", "serde", "serde_json", "sha3", @@ -971,35 +1014,62 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a376f88d815b63505be54a6afa93d75b67cfd65835922ec648cfcbb0a5e4b4" +checksum = "cebe67c0d68f9acf8709d170c1308ca57a778d22f70da38a57f74ae250eee28a" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", "cairo-lang-utils", "num-bigint", "num-traits 0.2.19", - "salsa", + "rust-analyzer-salsa", "smol_str", "unescaper", ] [[package]] name = "cairo-lang-syntax-codegen" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f276bc28f6302fc63032046a12b60d18498906e65f646acb963244eed97f7c" +checksum = "31cef5b4347626e61bad8f070495cd35d637a5cb6744c34d20dd382c7431aff8" dependencies = [ "genco", "xshell", ] +[[package]] +name = "cairo-lang-test-plugin" +version = "2.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74f1597b8229a3649183ff33b19f0aeca5d86505253ebbbce377b271d1732835" +dependencies = [ + "anyhow", + "cairo-lang-compiler", + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-starknet", + "cairo-lang-starknet-classes", + "cairo-lang-syntax", + "cairo-lang-utils", + "indoc", + "itertools 0.12.1", + "num-bigint", + "num-traits 0.2.19", + "serde", + "starknet-types-core", +] + [[package]] name = "cairo-lang-test-utils" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e90b6236439e19077ec913351a17a33c7be199dcafdacd8389c4c5199400d6" +checksum = "060c61ac4a3ae0428771244ff8db903105f127392b7d725d919fe3fb1ec4132f" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1010,12 +1080,12 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.7.1" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a394e545f1500bea093d01be40895d3234faaa24d9585d08a509c514cabd88" +checksum = "8bfc6372538143afad658c853a35bdc9f5210c5cb54e0c8f04ab78e268139466" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.2.6", + "indexmap 2.6.0", "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", @@ -1024,11 +1094,76 @@ dependencies = [ "serde", ] +[[package]] +name = "cairo-native" +version = "0.2.0" +source = "git+https://github.com/lambdaclass/cairo_native?rev=2be717cba74c63628cb68b619ff2022c70d0cdd2#2be717cba74c63628cb68b619ff2022c70d0cdd2" +dependencies = [ + "anyhow", + "aquamarine", + "bumpalo", + "cairo-lang-compiler", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-runner", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-gas", + "cairo-lang-sierra-generator", + "cairo-lang-starknet", + "cairo-lang-starknet-classes", + "cairo-lang-test-plugin", + "cairo-lang-utils", + "cairo-native-runtime", + "cc", + "clap", + "colored", + "educe", + "itertools 0.13.0", + "k256", + "keccak", + "lazy_static", + "libc", + "libloading", + "llvm-sys", + "melior", + "mlir-sys", + "num-bigint", + "num-traits 0.2.19", + "p256", + "sec1", + "serde", + "serde_json", + "sha2", + "starknet-types-core", + "stats_alloc", + "tempfile", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "cairo-native-runtime" +version = "0.2.0" +source = "git+https://github.com/lambdaclass/cairo_native?rev=2be717cba74c63628cb68b619ff2022c70d0cdd2#2be717cba74c63628cb68b619ff2022c70d0cdd2" +dependencies = [ + "cairo-lang-sierra-gas", + "lazy_static", + "libc", + "rand", + "starknet-crypto 0.7.2", + "starknet-curve 0.5.1", + "starknet-types-core", +] + [[package]] name = "cairo-vm" -version = "1.0.0-rc5" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e09134ea1e0be6c1fbd330f0945df0512fa70944fd0b3ecc2f74a6008f01e9da" +checksum = "58363ad8065ed891e3b14a8191b707677c7c7cb5b9d10030822506786d8d8108" dependencies = [ "anyhow", "ark-ff", @@ -1060,15 +1195,34 @@ dependencies = [ "zip", ] +[[package]] +name = "caseless" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808dab3318747be122cb31d36de18d4d1c81277a76f8332a02b81a3d73463d7f" +dependencies = [ + "regex", + "unicode-normalization", +] + [[package]] name = "cc" -version = "1.0.106" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066fce287b1d4eafef758e89e09d724a24808a9196fe9756b8ca90e86d0719a2" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", ] [[package]] @@ -1102,11 +1256,22 @@ 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 = "clap" -version = "4.5.9" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -1114,9 +1279,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -1126,21 +1291,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cli" @@ -1165,9 +1330,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -1179,6 +1344,23 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "comrak" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d061c6d53fe98c25efda0d91b7f6b4b4020a51dad78a3eac5028710aa26f8e7" +dependencies = [ + "caseless", + "derive_builder", + "entities", + "memchr", + "once_cell", + "regex", + "slug", + "typed-arena", + "unicode_categories", +] + [[package]] name = "const-cstr" version = "0.3.0" @@ -1191,20 +1373,26 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" dependencies = [ "proc-macro2", "quote", @@ -1244,9 +1432,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" @@ -1286,9 +1474,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -1340,6 +1528,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", + "rand_core", "subtle", "zeroize", ] @@ -1361,7 +1550,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -1376,12 +1565,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.9", - "darling_macro 0.20.9", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1400,16 +1589,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -1425,13 +1614,38 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.9", + "darling_core 0.20.10", "quote", - "syn 2.0.70", + "syn 2.0.79", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", ] [[package]] @@ -1455,6 +1669,37 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn 2.0.79", +] + [[package]] name = "derive_more" version = "0.99.18" @@ -1465,9 +1710,15 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.70", + "syn 2.0.79", ] +[[package]] +name = "deunicode" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" + [[package]] name = "diff" version = "0.1.13" @@ -1490,6 +1741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] @@ -1526,9 +1778,9 @@ dependencies = [ [[package]] name = "dwrote" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +checksum = "70182709525a3632b2ba96b6569225467b18ecb4a77f46d255f713a6bebf05fd" dependencies = [ "lazy_static", "libc", @@ -1542,12 +1794,58 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "educe" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4bd92664bf78c4d3dba9b7cdafce6fa15b13ed3ed16175218196942e99168a8" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "either" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pem-rfc7468", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "ena" version = "0.14.3" @@ -1566,20 +1864,46 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "entities" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", ] [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ "anstream", "anstyle", @@ -1593,6 +1917,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -1626,15 +1960,31 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de853764b47027c2e862a995c34978ffa63c1501f2e15f987ba11bd4f9bba193" +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + [[package]] name = "fdeflate" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +checksum = "d8090f921a24b04994d9929e204f50b498a33ea6ba559ffaa05e04f7ee7fb5ab" dependencies = [ "simd-adler32", ] +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + [[package]] name = "fixed-hash" version = "0.8.0" @@ -1655,9 +2005,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -1675,6 +2025,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "font-kit" version = "0.11.0" @@ -1753,9 +2109,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1767,9 +2123,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1777,33 +2133,33 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-sink", @@ -1831,7 +2187,7 @@ checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -1842,6 +2198,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -1869,21 +2226,27 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -1896,6 +2259,17 @@ dependencies = [ "minilp", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + [[package]] name = "h2" version = "0.3.26" @@ -1908,7 +2282,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -1942,12 +2316,14 @@ dependencies = [ ] [[package]] -name = "heck" -version = "0.3.3" +name = "hashbrown" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" dependencies = [ - "unicode-segmentation", + "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -1983,6 +2359,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "http" version = "0.2.12" @@ -2007,9 +2392,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -2019,9 +2404,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -2057,9 +2442,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2090,6 +2475,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +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.5.0" @@ -2100,17 +2496,23 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "if_chain" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" + [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.8", "same-file", "walkdir", "winapi-util", @@ -2168,6 +2570,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indent" version = "0.1.1" @@ -2187,12 +2608,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -2222,15 +2643,15 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -2259,6 +2680,15 @@ 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" @@ -2287,9 +2717,9 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -2302,13 +2732,27 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + [[package]] name = "keccak" version = "0.1.5" @@ -2332,7 +2776,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "string_cache", "term", "tiny-keccak", @@ -2346,14 +2790,14 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.7", + "regex-automata 0.4.8", ] [[package]] name = "lambdaworks-crypto" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb5d4f22241504f7c7b8d2c3a7d7835d7c07117f10bff2a7d96a9ef6ef217c3" +checksum = "bbc2a4da0d9e52ccfe6306801a112e81a8fc0c76aa3e4449fefeda7fef72bb34" dependencies = [ "lambdaworks-math", "serde", @@ -2363,9 +2807,9 @@ dependencies = [ [[package]] name = "lambdaworks-math" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "358e172628e713b80a530a59654154bfc45783a6ed70ea284839800cebdf8f97" +checksum = "d1bd2632acbd9957afc5aeec07ad39f078ae38656654043bf16e046fa2730e23" dependencies = [ "serde", "serde_json", @@ -2380,17 +2824,23 @@ dependencies = [ "spin", ] +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" -version = "0.2.155" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libloading" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", "windows-targets 0.52.6", @@ -2406,6 +2856,26 @@ dependencies = [ "libc", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "llvm-sys" +version = "181.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320f9d2723c97d4b78f9190a61ed25cc7cfbe456668c08e6e7dd8e50ceb8500" +dependencies = [ + "anyhow", + "cc", + "lazy_static", + "libc", + "regex-lite", + "semver", +] + [[package]] name = "lock_api" version = "0.4.12" @@ -2424,11 +2894,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] @@ -2440,6 +2910,12 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + [[package]] name = "matrixmultiply" version = "0.2.4" @@ -2449,6 +2925,35 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "melior" +version = "0.18.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3085c0169aa3b735d8e7df582baee23c2aeb280ea62cc7f71effda28d8e281" +dependencies = [ + "dashmap", + "melior-macro", + "mlir-sys", + "once_cell", +] + +[[package]] +name = "melior-macro" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d58c356ebaa7855da67aad1306a0d032b68919d3c65b0b5dcecf10d9bdf6a9" +dependencies = [ + "comrak", + "convert_case 0.6.0", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.79", + "tblgen-alt", + "unindent", +] + [[package]] name = "memchr" version = "2.7.4" @@ -2479,23 +2984,33 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", "simd-adler32", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "mlir-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1b5806a63bc959cd5c4e5db8cadd20e40045d41969d325132748db8af11b7f" +dependencies = [ + "bindgen", ] [[package]] @@ -2631,30 +3146,20 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.36.1" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -2668,6 +3173,32 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "papyrus_config" +version = "0.0.0" +source = "git+https://github.com/reilabs/sequencer.git?rev=6b019bc1a0b1da471fd0d5aabe1c71759c26ee9e#6b019bc1a0b1da471fd0d5aabe1c71759c26ee9e" +dependencies = [ + "clap", + "itertools 0.12.1", + "serde", + "serde_json", + "strum_macros", + "thiserror", + "validator", +] + [[package]] name = "parity-scale-codec" version = "3.6.12" @@ -2694,17 +3225,6 @@ dependencies = [ "syn 1.0.109", ] -[[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" @@ -2712,21 +3232,7 @@ 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", + "parking_lot_core", ] [[package]] @@ -2737,7 +3243,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -2796,6 +3302,15 @@ dependencies = [ "sha2", ] +[[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" @@ -2809,7 +3324,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.6.0", ] [[package]] @@ -2842,7 +3357,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -2881,11 +3396,21 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" @@ -2931,9 +3456,9 @@ dependencies = [ [[package]] name = "png" -version = "0.17.13" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" +checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -2950,9 +3475,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -2962,14 +3490,33 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", ] +[[package]] +name = "prettyplease" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +dependencies = [ + "proc-macro2", + "syn 2.0.79", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -2985,27 +3532,51 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3074,27 +3645,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.2" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -3103,14 +3665,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -3124,15 +3686,21 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.6.29" @@ -3141,9 +3709,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "relative-path" @@ -3227,11 +3795,40 @@ dependencies = [ "rustc-hex", ] +[[package]] +name = "rust-analyzer-salsa" +version = "0.17.0-pre.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d" +dependencies = [ + "indexmap 2.6.0", + "lock_api", + "oorandom", + "parking_lot", + "rust-analyzer-salsa-macros", + "rustc-hash", + "smallvec", + "tracing", + "triomphe", +] + +[[package]] +name = "rust-analyzer-salsa-macros" +version = "0.17.0-pre.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d96498e9684848c6676c399032ebc37c52da95ecbefa83d71ccc53b9f8a4a8e" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "rust_decimal" -version = "1.35.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", "num-traits 0.2.19", @@ -3257,13 +3854,26 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" version = "0.21.12" @@ -3297,9 +3907,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -3307,35 +3917,6 @@ 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 = "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 = "same-file" version = "1.0.6" @@ -3367,7 +3948,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -3386,6 +3967,20 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "semver" version = "1.0.23" @@ -3397,22 +3992,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.204" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -3423,16 +4018,17 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.131" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "67d42a0bd4ac281beff598909bb56a86acaf979b84483e1c79c10dcaf98f8cf3" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -3450,9 +4046,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -3471,15 +4067,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "2.3.3" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", + "indexmap 2.6.0", "serde", + "serde_derive", "serde_json", "serde_with_macros", "time", @@ -3487,14 +4085,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "2.3.3" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ - "darling 0.20.9", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -3538,6 +4136,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -3547,6 +4151,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + [[package]] name = "simd-adler32" version = "0.3.7" @@ -3568,6 +4182,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slug" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" +dependencies = [ + "deunicode", + "wasm-bindgen", +] + [[package]] name = "smallvec" version = "1.13.2" @@ -3599,6 +4223,16 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "sprs" version = "0.7.1" @@ -3610,11 +4244,17 @@ dependencies = [ "num-traits 0.1.43", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "starknet-core" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d506e02a4083290d13b427dfe437fd95aa8b56315c455bb2f9cdeca76620d457" +checksum = "2538240cbe6663c673fe77465f294da707080f39678dd7066761554899e46100" dependencies = [ "base64 0.21.7", "crypto-bigint", @@ -3625,30 +4265,10 @@ dependencies = [ "serde_json_pythonic", "serde_with", "sha3", - "starknet-crypto 0.7.1", + "starknet-crypto 0.7.2", "starknet-types-core", ] -[[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 0.3.3", - "starknet-curve 0.3.0", - "starknet-ff", - "zeroize", -] - [[package]] name = "starknet-crypto" version = "0.6.2" @@ -3663,7 +4283,7 @@ dependencies = [ "num-traits 0.2.19", "rfc6979", "sha2", - "starknet-crypto-codegen 0.3.3", + "starknet-crypto-codegen", "starknet-curve 0.4.2", "starknet-ff", "zeroize", @@ -3671,9 +4291,9 @@ dependencies = [ [[package]] name = "starknet-crypto" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2a821ad8d98c6c3e4d0e5097f3fe6e2ed120ada9d32be87cd1330c7923a2f0" +checksum = "60a5064173a8e8d2675e67744fd07f310de44573924b6b7af225a6bdd8102913" dependencies = [ "crypto-bigint", "hex", @@ -3683,8 +4303,7 @@ dependencies = [ "num-traits 0.2.19", "rfc6979", "sha2", - "starknet-crypto-codegen 0.4.0", - "starknet-curve 0.5.0", + "starknet-curve 0.5.1", "starknet-types-core", "zeroize", ] @@ -3697,27 +4316,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.70", -] - -[[package]] -name = "starknet-crypto-codegen" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e179dedc3fa6da064e56811d3e05d446aa2f7459e4eb0e3e49378a337235437" -dependencies = [ - "starknet-curve 0.5.0", - "starknet-types-core", - "syn 2.0.70", -] - -[[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.79", ] [[package]] @@ -3731,9 +4330,9 @@ dependencies = [ [[package]] name = "starknet-curve" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56935b306dcf0b8f14bb2a1257164b8478bb8be4801dfae0923f5b266d1b457c" +checksum = "bcde6bd74269b8161948190ace6cf069ef20ac6e79cd2ba09b320efa7500b6de" dependencies = [ "starknet-types-core", ] @@ -3752,9 +4351,9 @@ dependencies = [ [[package]] name = "starknet-providers" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c85e0a0f4563ae95dfeae14ea0f0c70610efc0ec2462505c64eff5765e7b97" +checksum = "60e8e69ba7a36dea2d28333be82b4011f8784333d3ae5618482b6587c1ffb66c" dependencies = [ "async-trait", "auto_impl", @@ -3792,7 +4391,6 @@ dependencies = [ "hex", "indoc", "itertools 0.12.1", - "once_cell", "plotters", "primitive-types", "rand", @@ -3812,9 +4410,9 @@ dependencies = [ [[package]] name = "starknet-types-core" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6bacf0ba19bc721e518bc4bf389ff13daa8a7c5db5fd320600473b8aa9fcbd" +checksum = "fa1b9e01ccb217ab6d475c5cda05dbb22c30029f7bb52b192a010a00d77a3d74" dependencies = [ "lambdaworks-crypto", "lambdaworks-math", @@ -3827,22 +4425,23 @@ dependencies = [ [[package]] name = "starknet_api" -version = "0.13.0-rc.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a80f50db7439ceb65de759fcbadb1695c82aec82126b2313413632e40d4eec" +version = "0.0.0" +source = "git+https://github.com/reilabs/sequencer.git?rev=6b019bc1a0b1da471fd0d5aabe1c71759c26ee9e#6b019bc1a0b1da471fd0d5aabe1c71759c26ee9e" dependencies = [ "bitvec", "cairo-lang-starknet-classes", "derive_more", "hex", - "indexmap 2.2.6", + "indexmap 2.6.0", "itertools 0.12.1", - "once_cell", + "log", + "num-bigint", + "pretty_assertions", "primitive-types", "serde", "serde_json", "sha3", - "starknet-crypto 0.5.2", + "starknet-crypto 0.7.2", "starknet-types-core", "strum", "strum_macros", @@ -3855,6 +4454,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "stats_alloc" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0e04424e733e69714ca1bbb9204c1a57f09f5493439520f9f68c132ad25eec" + [[package]] name = "string_cache" version = "0.8.7" @@ -3863,7 +4468,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.3", + "parking_lot", "phf_shared 0.10.0", "precomputed-hash", ] @@ -3882,21 +4487,21 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum_macros" -version = "0.24.3" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] @@ -3918,9 +4523,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.70" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -3960,6 +4565,31 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "tblgen-alt" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ae726d43658a13a9cd479de814be1311fea69236cd821e931a4fb9ca4d70e50" +dependencies = [ + "bindgen", + "cc", + "paste", + "thiserror", +] + +[[package]] +name = "tempfile" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + [[package]] name = "term" version = "0.7.0" @@ -3990,27 +4620,27 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -4100,32 +4730,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", - "parking_lot 0.12.3", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -4140,9 +4769,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -4153,54 +4782,43 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.15", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.15" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -4221,7 +4839,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -4245,6 +4863,16 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -4255,6 +4883,8 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", + "serde", + "serde_json", "sharded-slab", "smallvec", "thread_local", @@ -4262,6 +4892,17 @@ dependencies = [ "tracing", "tracing-core", "tracing-log", + "tracing-serde", +] + +[[package]] +name = "triomphe" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" +dependencies = [ + "serde", + "stable_deref_trait", ] [[package]] @@ -4276,6 +4917,12 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typenum" version = "1.17.0" @@ -4305,36 +4952,48 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "unicode_categories" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + +[[package]] +name = "unindent" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" [[package]] name = "untrusted" @@ -4349,7 +5008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna", + "idna 0.5.0", "percent-encoding", ] @@ -4359,6 +5018,45 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "validator" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249" +dependencies = [ + "idna 0.2.3", + "lazy_static", + "regex", + "serde", + "serde_derive", + "serde_json", + "url", + "validator_derive", + "validator_types", +] + +[[package]] +name = "validator_derive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4286b4497f270f59276a89ae0ad109d5f8f18c69b613e3fb22b61201aadb0c4d" +dependencies = [ + "if_chain", + "lazy_static", + "proc-macro-error", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "validator_types", +] + +[[package]] +name = "validator_types" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a" + [[package]] name = "valuable" version = "0.1.0" @@ -4367,9 +5065,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -4398,34 +5096,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -4435,9 +5134,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4445,28 +5144,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -4484,6 +5183,18 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" +[[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", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4502,11 +5213,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4542,6 +5253,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -4665,18 +5385,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.6.13" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -4726,9 +5437,9 @@ checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yeslogic-fontconfig-sys" @@ -4748,6 +5459,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -4759,7 +5471,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -4779,7 +5491,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.79", ] [[package]] @@ -4823,9 +5535,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 4c2fc44..57eb89c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,9 +9,8 @@ members = [ [workspace.package] # Edition 2021 is chosen to support async. edition = "2021" -# Version 1.80.1 or higher is not compatible because it enforces check of `cfg` names and values. The dependency `blockifier` currently uses unknown values for `target_pointer_width`. # If this version is changed, amend the version set in `build.yml` and `rust-toolchain.toml`. -rust-version = "1.78.0" +rust-version = "1.81.0" license = "Apache-2.0" repository = "https://github.com/reilabs/starknet-replay" keywords = ["cairo", "starknet"] diff --git a/README.md b/README.md index 97907cd..a591c28 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,19 @@ histogram in the file named `"histogram.svg"`. ## Requirements -This crate is compatible with Rust 1.78. Both x86 and ARM are supported. +This crate is tested with Rust 1.81. Both x86 and ARM are supported. -`blockifier` dependency is not compatible with Rust 1.81+. `pathfinder_simp` -dependency is not compatible with Rust 1.83+ on ARM. +`llvm-config-18` is required to build this tool. It can be installed using the +script `dependencies.sh`. + +Not compatible with Rust 1.83+ on ARM because of `pathfinder_simd`. + +## Testing + +Testing requires the correct version of `corelib`. It's automatically downloaded +using the `Makefile` in `starknet-replay` when starting a profilertest. If an +old version of `corelib` is already installed, manual deletion of the folder +`starknet-replay/corelib` is required. ## Useful links diff --git a/dependencies.sh b/dependencies.sh new file mode 100644 index 0000000..58b9778 --- /dev/null +++ b/dependencies.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +set -e + +[[ ${UID} == "0" ]] || SUDO="sudo" + +function install_essential_deps_linux() { + $SUDO bash -c ' + apt update && apt install -y \ + ca-certificates \ + curl \ + git \ + gnupg \ + jq \ + libssl-dev \ + lsb-release \ + pkg-config \ + ripgrep \ + software-properties-common \ + zstd \ + wget + ' +} + +function setup_llvm_deps() { + case "$(uname)" in + Darwin) + brew update + brew install llvm@18 + + llvm_prefix=$(brew --prefix llvm@18) + echo TABLEGEN_180_PREFIX=$llvm_prefix >> $GITHUB_ENV + echo PATH=$llvm_prefix/bin:$PATH >> $GITHUB_ENV + echo LIBRARY_PATH=$(brew --prefix)/lib:$LIBRARY_PATH >> $GITHUB_ENV + echo LD_LIBRARY_PATH=$(brew --prefix)/lib:$LD_LIBRARY_PATH >> $GITHUB_ENV + echo MLIR_SYS_180_PREFIX=$llvm_prefix >> $GITHUB_ENV + ;; + Linux) + $SUDO bash -c 'curl https://apt.llvm.org/llvm.sh -Lo llvm.sh + bash ./llvm.sh 18 all + apt update && apt install -y \ + libgmp3-dev \ + libmlir-18-dev \ + libpolly-18-dev \ + libzstd-dev \ + mlir-18-tools + ' + ;; + *) + echo "Error: Unsupported operating system" + exit 1 + ;; + esac +} + +function main() { + [ "$(uname)" = "Linux" ] && install_essential_deps_linux + setup_llvm_deps + echo "LLVM dependencies installed successfully." +} + +main "$@" diff --git a/starknet-replay/Cargo.toml b/starknet-replay/Cargo.toml index e55f7c1..8d4c319 100644 --- a/starknet-replay/Cargo.toml +++ b/starknet-replay/Cargo.toml @@ -14,35 +14,34 @@ keywords.workspace = true publish = false [dependencies] -cairo-vm = { version = "1.0.0-rc5", features = ["cairo-1-hints"] } -cairo-lang-starknet-classes = "~2.7.0" -cairo-lang-sierra-to-casm = "~2.7.0" -cairo-lang-casm = "~2.7.0" -cairo-lang-runner = "2.7.0-rc.3" -cairo-lang-compiler = "~2.7.0" -cairo-lang-sierra = "~2.7.0" -cairo-lang-utils = "~2.7.0" -cairo-lang-sierra-generator = "~2.7.0" -# Some changes are required to `starkware-libs/blockifier`. These changes are -# in the branch `extract_libfunc` of Reilabs' fork and need to be merged +cairo-vm = { version = "1.0.1", features = ["cairo-1-hints"] } +cairo-lang-starknet-classes = "2.8.2" +cairo-lang-sierra-to-casm = "2.8.2" +cairo-lang-casm = "2.8.2" +cairo-lang-runner = "2.8.2" +cairo-lang-compiler = "2" +cairo-lang-sierra = "2" +cairo-lang-utils = "2.8.2" +cairo-lang-sierra-generator = "2.8.2" +# Some changes are required to `starkware-libs/sequencer`. These changes are +# in the branch `visited_pcs_trait` of Reilabs' fork and need to be merged # into the main branch. # Hardcoding the commit hash for the time being. -blockifier = { git = "https://github.com/reilabs/blockifier.git", rev = "e3141f67338cbb03595f24984b615042877229e0" } +blockifier = { git = "https://github.com/reilabs/sequencer.git", rev = "6b019bc1a0b1da471fd0d5aabe1c71759c26ee9e" } # `plotters` is using the latest (as of 30-May-2024) commit on the branch # `next-release-devel` because it contains the fix for bug #551 related to # anchoring of labels when rotated. Issue #26. plotters = { git = "https://github.com/plotters-rs/plotters.git", rev = "a7a3f8989af20931dd9e7e1f204d5254de3a8053" } flate2 = "1.0.25" rayon = "1.8.0" -starknet_api = "0.13.0-rc.0" -starknet-core = "0.11.0" -starknet-providers = "0.11.0" +starknet_api = { git = "https://github.com/reilabs/sequencer.git", rev = "6b019bc1a0b1da471fd0d5aabe1c71759c26ee9e", features = ["testing"] } +starknet-core = "0.12.0" +starknet-providers = "0.12.0" serde = "1.0.192" serde_json = "1.0.105" thiserror = "1.0.61" url = "2.5.2" hex = "0.4.3" -once_cell = "1.17.1" tokio = { version = "1.27.0", features = ["full"] } primitive-types = "0.12.2" anyhow.workspace = true @@ -50,7 +49,7 @@ tracing.workspace = true itertools.workspace = true [dev-dependencies] -cairo-lang-starknet = "~2.7.0" +cairo-lang-starknet = "2" ctor = "0.2.8" indoc = "2.0.5" rand = "0.8.4" diff --git a/starknet-replay/Makefile b/starknet-replay/Makefile index 7999cd3..945fcff 100644 --- a/starknet-replay/Makefile +++ b/starknet-replay/Makefile @@ -1,5 +1,5 @@ deps: - git clone --depth=1 -b v2.7.1 https://github.com/starkware-libs/cairo.git \ + git clone --depth=1 -b v2.8.4 https://github.com/starkware-libs/cairo.git \ && mv cairo/corelib/ . \ && rm -rf cairo/ diff --git a/starknet-replay/resources/versioned_constants_13_0.json b/starknet-replay/resources/versioned_constants_13_0.json deleted file mode 100644 index 1531f6f..0000000 --- a/starknet-replay/resources/versioned_constants_13_0.json +++ /dev/null @@ -1,544 +0,0 @@ -{ - "gateway": { - "max_calldata_length": 4000, - "max_contract_bytecode_size": 61440 - }, - "invoke_tx_max_n_steps": 3000000, - "max_recursion_depth": 50, - "os_constants": { - "nop_entry_point_offset": -1, - "entry_point_type_external": 0, - "entry_point_type_l1_handler": 1, - "entry_point_type_constructor": 2, - "l1_handler_version": 0, - "sierra_array_len_bound": 4294967296, - "constructor_entry_point_selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194", - "execute_entry_point_selector": "0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad", - "validate_entry_point_selector": "0x162da33a4585851fe8d3af3c2a9c60b557814e221e0d4f30ff0b2189d9c7775", - "validate_declare_entry_point_selector": "0x289da278a8dc833409cabfdad1581e8e7d40e42dcaed693fa4008dcdb4963b3", - "validate_deploy_entry_point_selector": "0x36fcbf06cd96843058359e1a75928beacfac10727dab22a3972f0af8aa92895", - "transfer_entry_point_selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e", - "default_entry_point_selector": 0, - "block_hash_contract_address": 1, - "stored_block_hash_buffer": 10, - "step_gas_cost": 100, - "range_check_gas_cost": 70, - "memory_hole_gas_cost": 10, - "initial_gas_cost": { - "step_gas_cost": 100000000 - }, - "entry_point_initial_budget": { - "step_gas_cost": 100 - }, - "syscall_base_gas_cost": { - "step_gas_cost": 100 - }, - "entry_point_gas_cost": { - "entry_point_initial_budget": 1, - "step_gas_cost": 500 - }, - "fee_transfer_gas_cost": { - "entry_point_gas_cost": 1, - "step_gas_cost": 100 - }, - "transaction_gas_cost": { - "entry_point_gas_cost": 2, - "fee_transfer_gas_cost": 1, - "step_gas_cost": 100 - }, - "call_contract_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 10, - "entry_point_gas_cost": 1 - }, - "deploy_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 200, - "entry_point_gas_cost": 1 - }, - "get_block_hash_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "get_execution_info_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 10 - }, - "library_call_gas_cost": { - "call_contract_gas_cost": 1 - }, - "replace_class_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "storage_read_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "storage_write_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "emit_event_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 10 - }, - "send_message_to_l1_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "secp256k1_add_gas_cost": { - "step_gas_cost": 406, - "range_check_gas_cost": 29 - }, - "secp256k1_get_point_from_x_gas_cost": { - "step_gas_cost": 391, - "range_check_gas_cost": 30, - "memory_hole_gas_cost": 20 - }, - "secp256k1_get_xy_gas_cost": { - "step_gas_cost": 239, - "range_check_gas_cost": 11, - "memory_hole_gas_cost": 40 - }, - "secp256k1_mul_gas_cost": { - "step_gas_cost": 76401, - "range_check_gas_cost": 7045 - }, - "secp256k1_new_gas_cost": { - "step_gas_cost": 475, - "range_check_gas_cost": 35, - "memory_hole_gas_cost": 40 - }, - "secp256r1_add_gas_cost": { - "step_gas_cost": 589, - "range_check_gas_cost": 57 - }, - "secp256r1_get_point_from_x_gas_cost": { - "step_gas_cost": 510, - "range_check_gas_cost": 44, - "memory_hole_gas_cost": 20 - }, - "secp256r1_get_xy_gas_cost": { - "step_gas_cost": 241, - "range_check_gas_cost": 11, - "memory_hole_gas_cost": 40 - }, - "secp256r1_mul_gas_cost": { - "step_gas_cost": 125240, - "range_check_gas_cost": 13961 - }, - "secp256r1_new_gas_cost": { - "step_gas_cost": 594, - "range_check_gas_cost": 49, - "memory_hole_gas_cost": 40 - }, - "keccak_gas_cost": { - "syscall_base_gas_cost": 1 - }, - "keccak_round_cost_gas_cost": 180000, - "sha256_process_block_gas_cost": { - "step_gas_cost": 0, - "range_check_gas_cost": 0, - "syscall_base_gas_cost": 0 - }, - "error_block_number_out_of_range": "Block number out of range", - "error_out_of_gas": "Out of gas", - "error_invalid_input_len": "Invalid input length", - "error_invalid_argument": "Invalid argument", - "validated": "VALID", - "l1_gas": "L1_GAS", - "l2_gas": "L2_GAS", - "l1_gas_index": 0, - "l2_gas_index": 1 - }, - "os_resources": { - "execute_syscalls": { - "CallContract": { - "builtin_instance_counter": { - "range_check_builtin": 19 - }, - "n_memory_holes": 0, - "n_steps": 691 - }, - "DelegateCall": { - "builtin_instance_counter": { - "range_check_builtin": 19 - }, - "n_memory_holes": 0, - "n_steps": 713 - }, - "DelegateL1Handler": { - "builtin_instance_counter": { - "range_check_builtin": 15 - }, - "n_memory_holes": 0, - "n_steps": 692 - }, - "Deploy": { - "builtin_instance_counter": { - "pedersen_builtin": 7, - "range_check_builtin": 18 - }, - "n_memory_holes": 0, - "n_steps": 944 - }, - "EmitEvent": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 19 - }, - "GetBlockHash": { - "builtin_instance_counter": { - "range_check_builtin": 2 - }, - "n_memory_holes": 0, - "n_steps": 74 - }, - "GetBlockNumber": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 40 - }, - "GetBlockTimestamp": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 38 - }, - "GetCallerAddress": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 32 - }, - "GetContractAddress": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 36 - }, - "GetExecutionInfo": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 29 - }, - "GetSequencerAddress": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 34 - }, - "GetTxInfo": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 29 - }, - "GetTxSignature": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 44 - }, - "Keccak": { - "builtin_instance_counter": { - "bitwise_builtin": 6, - "keccak_builtin": 1, - "range_check_builtin": 56 - }, - "n_memory_holes": 0, - "n_steps": 381 - }, - "LibraryCall": { - "builtin_instance_counter": { - "range_check_builtin": 19 - }, - "n_memory_holes": 0, - "n_steps": 680 - }, - "LibraryCallL1Handler": { - "builtin_instance_counter": { - "range_check_builtin": 15 - }, - "n_memory_holes": 0, - "n_steps": 659 - }, - "ReplaceClass": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 73 - }, - "Secp256k1Add": { - "builtin_instance_counter": { - "range_check_builtin": 29 - }, - "n_memory_holes": 0, - "n_steps": 406 - }, - "Secp256k1GetPointFromX": { - "builtin_instance_counter": { - "range_check_builtin": 30 - }, - "n_memory_holes": 20, - "n_steps": 391 - }, - "Secp256k1GetXy": { - "builtin_instance_counter": { - "range_check_builtin": 11 - }, - "n_memory_holes": 40, - "n_steps": 239 - }, - "Secp256k1Mul": { - "builtin_instance_counter": { - "range_check_builtin": 7045 - }, - "n_memory_holes": 0, - "n_steps": 76401 - }, - "Secp256k1New": { - "builtin_instance_counter": { - "range_check_builtin": 35 - }, - "n_memory_holes": 40, - "n_steps": 475 - }, - "Secp256r1Add": { - "builtin_instance_counter": { - "range_check_builtin": 57 - }, - "n_memory_holes": 0, - "n_steps": 589 - }, - "Secp256r1GetPointFromX": { - "builtin_instance_counter": { - "range_check_builtin": 44 - }, - "n_memory_holes": 20, - "n_steps": 510 - }, - "Secp256r1GetXy": { - "builtin_instance_counter": { - "range_check_builtin": 11 - }, - "n_memory_holes": 40, - "n_steps": 241 - }, - "Secp256r1Mul": { - "builtin_instance_counter": { - "range_check_builtin": 13961 - }, - "n_memory_holes": 0, - "n_steps": 125240 - }, - "Secp256r1New": { - "builtin_instance_counter": { - "range_check_builtin": 49 - }, - "n_memory_holes": 40, - "n_steps": 594 - }, - "SendMessageToL1": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 84 - }, - "Sha256ProcessBlock": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 0 - }, - "StorageRead": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 44 - }, - "StorageWrite": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 46 - } - }, - "execute_txs_inner": { - "Declare": { - "resources": { - "constant": { - "builtin_instance_counter": { - "pedersen_builtin": 15, - "range_check_builtin": 63 - }, - "n_memory_holes": 0, - "n_steps": 2711 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - }, - "deprecated_resources": { - "constant": { - "builtin_instance_counter": { - "pedersen_builtin": 15, - "range_check_builtin": 63 - }, - "n_memory_holes": 0, - "n_steps": 2711 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - } - }, - "DeployAccount": { - "resources": { - "constant": { - "builtin_instance_counter": { - "pedersen_builtin": 23, - "range_check_builtin": 83 - }, - "n_memory_holes": 0, - "n_steps": 3628 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - }, - "deprecated_resources": { - "constant": { - "builtin_instance_counter": { - "pedersen_builtin": 23, - "range_check_builtin": 83 - }, - "n_memory_holes": 0, - "n_steps": 3628 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - } - }, - "InvokeFunction": { - "resources": { - "constant": { - "builtin_instance_counter": { - "pedersen_builtin": 16, - "range_check_builtin": 80 - }, - "n_memory_holes": 0, - "n_steps": 3382 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - }, - "deprecated_resources": { - "constant": { - "builtin_instance_counter": { - "pedersen_builtin": 16, - "range_check_builtin": 80 - }, - "n_memory_holes": 0, - "n_steps": 3382 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - } - }, - "L1Handler": { - "resources": { - "constant": { - "builtin_instance_counter": { - "pedersen_builtin": 11, - "range_check_builtin": 17 - }, - "n_memory_holes": 0, - "n_steps": 1069 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - }, - "deprecated_resources": { - "constant": { - "builtin_instance_counter": { - "pedersen_builtin": 11, - "range_check_builtin": 17 - }, - "n_memory_holes": 0, - "n_steps": 1069 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - } - } - }, - "compute_os_kzg_commitment_info": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - }, - "validate_max_n_steps": 1000000, - "vm_resource_fee_cost": { - "add_mod_builtin": [ - 0, - 1 - ], - "bitwise_builtin": [ - 32, - 100 - ], - "ec_op_builtin": [ - 512, - 100 - ], - "ecdsa_builtin": [ - 1024, - 100 - ], - "keccak_builtin": [ - 1024, - 100 - ], - "mul_mod_builtin": [ - 0, - 1 - ], - "n_steps": [ - 5, - 1000 - ], - "output_builtin": [ - 0, - 1 - ], - "pedersen_builtin": [ - 16, - 100 - ], - "poseidon_builtin": [ - 16, - 100 - ], - "range_check_builtin": [ - 8, - 100 - ], - "range_check96_builtin": [ - 0, - 1 - ] - } -} diff --git a/starknet-replay/resources/versioned_constants_13_1.json b/starknet-replay/resources/versioned_constants_13_1.json deleted file mode 100644 index 4e28f7b..0000000 --- a/starknet-replay/resources/versioned_constants_13_1.json +++ /dev/null @@ -1,599 +0,0 @@ -{ - "tx_event_limits": { - "max_data_length": 300, - "max_keys_length": 50, - "max_n_emitted_events": 1000 - }, - "gateway": { - "max_calldata_length": 4000, - "max_contract_bytecode_size": 81920 - }, - "invoke_tx_max_n_steps": 4000000, - "l2_resource_gas_costs": { - "gas_per_data_felt": [ - 128, - 1000 - ], - "event_key_factor": [ - 2, - 1 - ], - "gas_per_code_byte": [ - 875, - 1000 - ] - }, - "max_recursion_depth": 50, - "os_constants": { - "nop_entry_point_offset": -1, - "entry_point_type_external": 0, - "entry_point_type_l1_handler": 1, - "entry_point_type_constructor": 2, - "l1_handler_version": 0, - "sierra_array_len_bound": 4294967296, - "constructor_entry_point_selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194", - "execute_entry_point_selector": "0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad", - "validate_entry_point_selector": "0x162da33a4585851fe8d3af3c2a9c60b557814e221e0d4f30ff0b2189d9c7775", - "validate_declare_entry_point_selector": "0x289da278a8dc833409cabfdad1581e8e7d40e42dcaed693fa4008dcdb4963b3", - "validate_deploy_entry_point_selector": "0x36fcbf06cd96843058359e1a75928beacfac10727dab22a3972f0af8aa92895", - "transfer_entry_point_selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e", - "default_entry_point_selector": 0, - "block_hash_contract_address": 1, - "stored_block_hash_buffer": 10, - "step_gas_cost": 100, - "range_check_gas_cost": 70, - "memory_hole_gas_cost": 10, - "initial_gas_cost": { - "step_gas_cost": 100000000 - }, - "entry_point_initial_budget": { - "step_gas_cost": 100 - }, - "syscall_base_gas_cost": { - "step_gas_cost": 100 - }, - "entry_point_gas_cost": { - "entry_point_initial_budget": 1, - "step_gas_cost": 500 - }, - "fee_transfer_gas_cost": { - "entry_point_gas_cost": 1, - "step_gas_cost": 100 - }, - "transaction_gas_cost": { - "entry_point_gas_cost": 2, - "fee_transfer_gas_cost": 1, - "step_gas_cost": 100 - }, - "call_contract_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 10, - "entry_point_gas_cost": 1 - }, - "deploy_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 200, - "entry_point_gas_cost": 1 - }, - "get_block_hash_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "get_execution_info_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 10 - }, - "library_call_gas_cost": { - "call_contract_gas_cost": 1 - }, - "replace_class_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "storage_read_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "storage_write_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "emit_event_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 10 - }, - "send_message_to_l1_gas_cost": { - "syscall_base_gas_cost": 1, - "step_gas_cost": 50 - }, - "secp256k1_add_gas_cost": { - "step_gas_cost": 406, - "range_check_gas_cost": 29 - }, - "secp256k1_get_point_from_x_gas_cost": { - "step_gas_cost": 391, - "range_check_gas_cost": 30, - "memory_hole_gas_cost": 20 - }, - "secp256k1_get_xy_gas_cost": { - "step_gas_cost": 239, - "range_check_gas_cost": 11, - "memory_hole_gas_cost": 40 - }, - "secp256k1_mul_gas_cost": { - "step_gas_cost": 76501, - "range_check_gas_cost": 7045, - "memory_hole_gas_cost": 2 - }, - "secp256k1_new_gas_cost": { - "step_gas_cost": 475, - "range_check_gas_cost": 35, - "memory_hole_gas_cost": 40 - }, - "secp256r1_add_gas_cost": { - "step_gas_cost": 589, - "range_check_gas_cost": 57 - }, - "secp256r1_get_point_from_x_gas_cost": { - "step_gas_cost": 510, - "range_check_gas_cost": 44, - "memory_hole_gas_cost": 20 - }, - "secp256r1_get_xy_gas_cost": { - "step_gas_cost": 241, - "range_check_gas_cost": 11, - "memory_hole_gas_cost": 40 - }, - "secp256r1_mul_gas_cost": { - "step_gas_cost": 125340, - "range_check_gas_cost": 13961, - "memory_hole_gas_cost": 2 - }, - "secp256r1_new_gas_cost": { - "step_gas_cost": 594, - "range_check_gas_cost": 49, - "memory_hole_gas_cost": 40 - }, - "keccak_gas_cost": { - "syscall_base_gas_cost": 1 - }, - "keccak_round_cost_gas_cost": 180000, - "sha256_process_block_gas_cost": { - "step_gas_cost": 0, - "range_check_gas_cost": 0, - "syscall_base_gas_cost": 0 - }, - "error_block_number_out_of_range": "Block number out of range", - "error_out_of_gas": "Out of gas", - "error_invalid_input_len": "Invalid input length", - "error_invalid_argument": "Invalid argument", - "validated": "VALID", - "l1_gas": "L1_GAS", - "l2_gas": "L2_GAS", - "l1_gas_index": 0, - "l2_gas_index": 1, - "validate_rounding_consts": { - "validate_block_number_rounding": 100, - "validate_timestamp_rounding": 3600 - } - }, - "os_resources": { - "execute_syscalls": { - "CallContract": { - "n_steps": 760, - "builtin_instance_counter": { - "range_check_builtin": 20 - }, - "n_memory_holes": 0 - }, - "DelegateCall": { - "n_steps": 713, - "builtin_instance_counter": { - "range_check_builtin": 19 - }, - "n_memory_holes": 0 - }, - "DelegateL1Handler": { - "n_steps": 692, - "builtin_instance_counter": { - "range_check_builtin": 15 - }, - "n_memory_holes": 0 - }, - "Deploy": { - "n_steps": 1012, - "builtin_instance_counter": { - "pedersen_builtin": 7, - "range_check_builtin": 19 - }, - "n_memory_holes": 0 - }, - "EmitEvent": { - "n_steps": 61, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - }, - "GetBlockHash": { - "n_steps": 104, - "builtin_instance_counter": { - "range_check_builtin": 2 - }, - "n_memory_holes": 0 - }, - "GetBlockNumber": { - "n_steps": 40, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - }, - "GetBlockTimestamp": { - "n_steps": 38, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - }, - "GetCallerAddress": { - "n_steps": 64, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - }, - "GetContractAddress": { - "n_steps": 64, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - }, - "GetExecutionInfo": { - "n_steps": 64, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - }, - "GetSequencerAddress": { - "n_steps": 34, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - }, - "GetTxInfo": { - "n_steps": 64, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - }, - "GetTxSignature": { - "n_steps": 44, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - }, - "Keccak": { - "n_steps": 381, - "builtin_instance_counter": { - "bitwise_builtin": 6, - "keccak_builtin": 1, - "range_check_builtin": 56 - }, - "n_memory_holes": 0 - }, - "LibraryCall": { - "n_steps": 751, - "builtin_instance_counter": { - "range_check_builtin": 20 - }, - "n_memory_holes": 0 - }, - "LibraryCallL1Handler": { - "n_steps": 659, - "builtin_instance_counter": { - "range_check_builtin": 15 - }, - "n_memory_holes": 0 - }, - "ReplaceClass": { - "n_steps": 98, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - }, - "Secp256k1Add": { - "n_steps": 408, - "builtin_instance_counter": { - "range_check_builtin": 29 - }, - "n_memory_holes": 0 - }, - "Secp256k1GetPointFromX": { - "n_steps": 393, - "builtin_instance_counter": { - "range_check_builtin": 30 - }, - "n_memory_holes": 0 - }, - "Secp256k1GetXy": { - "n_steps": 205, - "builtin_instance_counter": { - "range_check_builtin": 11 - }, - "n_memory_holes": 0 - }, - "Secp256k1Mul": { - "n_steps": 76503, - "builtin_instance_counter": { - "range_check_builtin": 7045 - }, - "n_memory_holes": 0 - }, - "Secp256k1New": { - "n_steps": 459, - "builtin_instance_counter": { - "range_check_builtin": 35 - }, - "n_memory_holes": 0 - }, - "Secp256r1Add": { - "n_steps": 591, - "builtin_instance_counter": { - "range_check_builtin": 57 - }, - "n_memory_holes": 0 - }, - "Secp256r1GetPointFromX": { - "n_steps": 512, - "builtin_instance_counter": { - "range_check_builtin": 44 - }, - "n_memory_holes": 0 - }, - "Secp256r1GetXy": { - "n_steps": 207, - "builtin_instance_counter": { - "range_check_builtin": 11 - }, - "n_memory_holes": 0 - }, - "Secp256r1Mul": { - "n_steps": 125342, - "builtin_instance_counter": { - "range_check_builtin": 13961 - }, - "n_memory_holes": 0 - }, - "Secp256r1New": { - "n_steps": 578, - "builtin_instance_counter": { - "range_check_builtin": 49 - }, - "n_memory_holes": 0 - }, - "SendMessageToL1": { - "n_steps": 139, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - }, - "Sha256ProcessBlock": { - "builtin_instance_counter": {}, - "n_memory_holes": 0, - "n_steps": 0 - }, - "StorageRead": { - "n_steps": 87, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - }, - "StorageWrite": { - "n_steps": 89, - "builtin_instance_counter": { - "range_check_builtin": 1 - }, - "n_memory_holes": 0 - } - }, - "execute_txs_inner": { - "Declare": { - "resources": { - "constant": { - "n_steps": 2839, - "builtin_instance_counter": { - "pedersen_builtin": 16, - "range_check_builtin": 63 - }, - "n_memory_holes": 0 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - }, - "deprecated_resources": { - "constant": { - "n_steps": 2839, - "builtin_instance_counter": { - "pedersen_builtin": 16, - "range_check_builtin": 63 - }, - "n_memory_holes": 0 - }, - "calldata_factor": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - } - }, - "DeployAccount": { - "resources": { - "constant": { - "n_steps": 3792, - "builtin_instance_counter": { - "pedersen_builtin": 23, - "range_check_builtin": 83 - }, - "n_memory_holes": 0 - }, - "calldata_factor": { - "n_steps": 21, - "builtin_instance_counter": { - "pedersen_builtin": 2 - }, - "n_memory_holes": 0 - } - }, - "deprecated_resources": { - "constant": { - "n_steps": 3792, - "builtin_instance_counter": { - "pedersen_builtin": 23, - "range_check_builtin": 83 - }, - "n_memory_holes": 0 - }, - "calldata_factor": { - "n_steps": 21, - "builtin_instance_counter": { - "pedersen_builtin": 2 - }, - "n_memory_holes": 0 - } - } - }, - "InvokeFunction": { - "resources": { - "constant": { - "n_steps": 3546, - "builtin_instance_counter": { - "pedersen_builtin": 14, - "range_check_builtin": 80 - }, - "n_memory_holes": 0 - }, - "calldata_factor": { - "n_steps": 8, - "builtin_instance_counter": { - "pedersen_builtin": 1 - }, - "n_memory_holes": 0 - } - }, - "deprecated_resources": { - "constant": { - "n_steps": 3546, - "builtin_instance_counter": { - "pedersen_builtin": 14, - "range_check_builtin": 80 - }, - "n_memory_holes": 0 - }, - "calldata_factor": { - "n_steps": 8, - "builtin_instance_counter": { - "pedersen_builtin": 1 - }, - "n_memory_holes": 0 - } - } - }, - "L1Handler": { - "resources": { - "constant": { - "n_steps": 1146, - "builtin_instance_counter": { - "pedersen_builtin": 11, - "range_check_builtin": 17 - }, - "n_memory_holes": 0 - }, - "calldata_factor": { - "n_steps": 13, - "builtin_instance_counter": { - "pedersen_builtin": 1 - }, - "n_memory_holes": 0 - } - }, - "deprecated_resources": { - "constant": { - "n_steps": 1146, - "builtin_instance_counter": { - "pedersen_builtin": 11, - "range_check_builtin": 17 - }, - "n_memory_holes": 0 - }, - "calldata_factor": { - "n_steps": 13, - "builtin_instance_counter": { - "pedersen_builtin": 1 - }, - "n_memory_holes": 0 - } - } - } - }, - "compute_os_kzg_commitment_info": { - "n_steps": 0, - "builtin_instance_counter": {}, - "n_memory_holes": 0 - } - }, - "validate_max_n_steps": 1000000, - "vm_resource_fee_cost": { - "add_mod_builtin": [ - 0, - 1 - ], - "bitwise_builtin": [ - 16, - 100 - ], - "ec_op_builtin": [ - 256, - 100 - ], - "ecdsa_builtin": [ - 512, - 100 - ], - "keccak_builtin": [ - 512, - 100 - ], - "mul_mod_builtin": [ - 0, - 1 - ], - "n_steps": [ - 25, - 10000 - ], - "output_builtin": [ - 0, - 1 - ], - "pedersen_builtin": [ - 8, - 100 - ], - "poseidon_builtin": [ - 8, - 100 - ], - "range_check_builtin": [ - 4, - 100 - ], - "range_check96_builtin": [ - 0, - 1 - ] - } -} diff --git a/starknet-replay/src/profiler/analysis.rs b/starknet-replay/src/profiler/analysis.rs index 0fd5568..4516c99 100644 --- a/starknet-replay/src/profiler/analysis.rs +++ b/starknet-replay/src/profiler/analysis.rs @@ -315,7 +315,7 @@ mod tests { // Load calldata let calldata_start = runner.vm.add_memory_segment(); - let calldata_end = runner.vm.load_data(calldata_start, &args.to_vec()).unwrap(); + let calldata_end = runner.vm.load_data(calldata_start, args).unwrap(); // Create entrypoint_args diff --git a/starknet-replay/src/runner/mod.rs b/starknet-replay/src/runner/mod.rs index af22653..8900ba3 100644 --- a/starknet-replay/src/runner/mod.rs +++ b/starknet-replay/src/runner/mod.rs @@ -184,7 +184,8 @@ where (storage, trace_out, sender), |(storage, trace_out, sender), block| -> anyhow::Result<()> { let block_transaction_traces = storage.execute_block(block, trace_out)?; - let block_number = BlockNumber::new(block.header.block_number.0); + let block_number = + BlockNumber::new(block.header.block_header_without_hash.block_number.0); info!("Replay completed block {block_number}"); let visited_pcs = process_transaction_traces(block_transaction_traces); sender.send(visited_pcs)?; @@ -233,7 +234,7 @@ where let mut cumulative_visited_pcs = VisitedPcs::default(); for block in replay_work { let block_transaction_traces = storage.execute_block(block, trace_out)?; - let block_number = BlockNumber::new(block.header.block_number.0); + let block_number = BlockNumber::new(block.header.block_header_without_hash.block_number.0); info!("Replay completed block {block_number}"); let visited_pcs = process_transaction_traces(block_transaction_traces); cumulative_visited_pcs.extend(visited_pcs.into_iter()); diff --git a/starknet-replay/src/runner/report.rs b/starknet-replay/src/runner/report.rs index 0085179..dd42a86 100644 --- a/starknet-replay/src/runner/report.rs +++ b/starknet-replay/src/runner/report.rs @@ -295,18 +295,8 @@ fn create_transaction_trace( ); let data_resources = DataResources { data_availability: DataAvailabilityResources { - l1_gas: execution_info - .transaction_receipt - .da_gas - .l1_gas - .try_into() - .unwrap_or_default(), - l1_data_gas: execution_info - .transaction_receipt - .da_gas - .l1_data_gas - .try_into() - .unwrap_or_default(), + l1_gas: execution_info.receipt.da_gas.l1_gas.0, + l1_data_gas: execution_info.receipt.da_gas.l1_data_gas.0, }, }; let execution_resources = ExecutionResources { diff --git a/starknet-replay/src/storage/rpc/mod.rs b/starknet-replay/src/storage/rpc/mod.rs index f7ee0eb..b847ce1 100644 --- a/starknet-replay/src/storage/rpc/mod.rs +++ b/starknet-replay/src/storage/rpc/mod.rs @@ -6,7 +6,6 @@ // `VisitedPcsRaw` in `visited_pcs. rs`, `RpcStorage` in `mod.rs` use std::collections::BTreeMap; -use std::num::NonZeroU128; use std::path::PathBuf; use blockifier::blockifier::block::{pre_process_block, BlockInfo, BlockNumberHashPair, GasPrices}; @@ -19,8 +18,7 @@ use blockifier::transaction::transaction_execution::Transaction as BlockifierTra use blockifier::transaction::transaction_types::TransactionType; use blockifier::transaction::transactions::ExecutableTransaction; use blockifier::versioned_constants::VersionedConstants; -use once_cell::sync::Lazy; -use starknet_api::block::{BlockHeader, StarknetVersion}; +use starknet_api::block::{BlockHeader, NonzeroGasPrice, StarknetVersion}; use starknet_api::core::{ClassHash, ContractAddress, PatriciaKey}; use starknet_api::data_availability::L1DataAvailabilityMode; use starknet_api::transaction::{Transaction, TransactionExecutionStatus}; @@ -55,28 +53,6 @@ pub mod contract_class; pub mod state; pub mod visited_pcs; -/// These versioned constants are needed to replay transactions executed with -/// older Starknet versions. -/// This is for Starknet 0.13.1.0 -static VERSIONED_CONSTANTS_13_0: Lazy = Lazy::new(|| { - // I am not using relative path to avoid IoError 36 "File name too long" - serde_json::from_str(include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/resources/versioned_constants_13_0.json" - ))) - .expect("Versioned constants JSON file is malformed") -}); - -/// This is for Starknet 0.13.1.1 -static VERSIONED_CONSTANTS_13_1: Lazy = Lazy::new(|| { - // I am not using relative path to avoid IoError 36 "File name too long" - serde_json::from_str(include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/resources/versioned_constants_13_1.json" - ))) - .expect("Versioned constants JSON file is malformed") -}); - /// This structure partially implements the trait [`crate::storage::Storage`] /// using the RPC protocol to query blockchain data. /// @@ -133,34 +109,47 @@ impl RpcStorage { /// - `header`: the block header of the block replay. /// - `allow_use_kzg_data`: use KZG commitments. fn block_info(header: &BlockHeader, allow_use_kzg_data: bool) -> BlockInfo { - let price_one: NonZeroU128 = NonZeroU128::MIN; + let eth_l1_gas_price: NonzeroGasPrice = + NonzeroGasPrice::new(header.block_header_without_hash.l1_gas_price.price_in_wei) + .unwrap_or_default(); + let strk_l1_gas_price: NonzeroGasPrice = + NonzeroGasPrice::new(header.block_header_without_hash.l1_gas_price.price_in_fri) + .unwrap_or_default(); + let eth_l1_data_gas_price: NonzeroGasPrice = NonzeroGasPrice::new( + header + .block_header_without_hash + .l1_data_gas_price + .price_in_wei, + ) + .unwrap_or_default(); + let strk_l1_data_gas_price: NonzeroGasPrice = NonzeroGasPrice::new( + header + .block_header_without_hash + .l1_data_gas_price + .price_in_wei, + ) + .unwrap_or_default(); + let eth_l2_gas_price: NonzeroGasPrice = + NonzeroGasPrice::new(header.block_header_without_hash.l2_gas_price.price_in_wei) + .unwrap_or_default(); + let strk_l2_gas_price: NonzeroGasPrice = + NonzeroGasPrice::new(header.block_header_without_hash.l2_gas_price.price_in_fri) + .unwrap_or_default(); + let gas_prices: GasPrices = GasPrices::new( + eth_l1_gas_price, + strk_l1_gas_price, + eth_l1_data_gas_price, + strk_l1_data_gas_price, + eth_l2_gas_price, + strk_l2_gas_price, + ); BlockInfo { - block_number: header.block_number, - block_timestamp: header.timestamp, - sequencer_address: header.sequencer.0, - gas_prices: GasPrices { - // Bad API design - the genesis block has 0 gas price, but - // blockifier doesn't allow for it. This isn't critical for - // consensus, so we just use 1. - eth_l1_gas_price: NonZeroU128::new(header.l1_gas_price.price_in_wei.0) - .unwrap_or(price_one), - // Bad API design - the genesis block has 0 gas price, but - // blockifier doesn't allow for it. This isn't critical for - // consensus, so we just use 1. - strk_l1_gas_price: NonZeroU128::new(header.l1_gas_price.price_in_fri.0) - .unwrap_or(price_one), - // Bad API design - pre-v0.13.1 blocks have 0 data gas price, but - // blockifier doesn't allow for it. This value is ignored for those - // transactions. - eth_l1_data_gas_price: NonZeroU128::new(header.l1_data_gas_price.price_in_wei.0) - .unwrap_or(price_one), - // Bad API design - pre-v0.13.1 blocks have 0 data gas price, but - // blockifier doesn't allow for it. This value is ignored for those - // transactions. - strk_l1_data_gas_price: NonZeroU128::new(header.l1_data_gas_price.price_in_fri.0) - .unwrap_or(price_one), - }, - use_kzg_da: allow_use_kzg_data && header.l1_da_mode == L1DataAvailabilityMode::Blob, + block_number: header.block_header_without_hash.block_number, + block_timestamp: header.block_header_without_hash.timestamp, + sequencer_address: header.block_header_without_hash.sequencer.0, + gas_prices, + use_kzg_da: allow_use_kzg_data + && header.block_header_without_hash.l1_da_mode == L1DataAvailabilityMode::Blob, } } @@ -172,10 +161,15 @@ impl RpcStorage { /// /// - `starknet_version`: the starknet version of the block to replay. fn versioned_constants(starknet_version: &StarknetVersion) -> &'static VersionedConstants { - if starknet_version < &StarknetVersion("0.13.1.0".to_string()) { - &VERSIONED_CONSTANTS_13_0 - } else if starknet_version < &StarknetVersion("0.13.1.1".to_string()) { - &VERSIONED_CONSTANTS_13_1 + // We use 0.13.0 for all blocks _before_ 0.13.1. + if starknet_version < &StarknetVersion("0.13.1.0".into()) { + VersionedConstants::get(blockifier::versioned_constants::StarknetVersion::V0_13_0) + } else if starknet_version < &StarknetVersion("0.13.1.1".into()) { + VersionedConstants::get(blockifier::versioned_constants::StarknetVersion::V0_13_1) + } else if starknet_version < &StarknetVersion("0.13.2.0".into()) { + VersionedConstants::get(blockifier::versioned_constants::StarknetVersion::V0_13_1_1) + } else if starknet_version < &StarknetVersion("0.13.2.1".into()) { + VersionedConstants::get(blockifier::versioned_constants::StarknetVersion::V0_13_2) } else { VersionedConstants::latest_constants() } @@ -194,7 +188,7 @@ impl RpcStorage { transaction: &blockifier::transaction::transaction_execution::Transaction, ) -> Option { match transaction { - BlockifierTransaction::AccountTransaction( + BlockifierTransaction::Account( blockifier::transaction::account_transaction::AccountTransaction::Declare(tx), ) => match tx.tx() { starknet_api::transaction::DeclareTransaction::V0(_) @@ -306,7 +300,7 @@ impl RpcStorage { transaction: &blockifier::transaction::transaction_execution::Transaction, ) -> TransactionType { match transaction { - BlockifierTransaction::AccountTransaction(tx) => match tx { + BlockifierTransaction::Account(tx) => match tx { blockifier::transaction::account_transaction::AccountTransaction::Declare(_) => { TransactionType::Declare } @@ -317,7 +311,7 @@ impl RpcStorage { TransactionType::InvokeFunction } }, - BlockifierTransaction::L1HandlerTransaction(_) => TransactionType::L1Handler, + BlockifierTransaction::L1Handler(_) => TransactionType::L1Handler, } } @@ -336,7 +330,7 @@ impl RpcStorage { work: &ReplayBlock, ) -> Result, RunnerError> { let mut transactions = Vec::with_capacity(work.transactions.len()); - let block_number = BlockNumber::new(work.header.block_number.0); + let block_number = BlockNumber::new(work.header.block_header_without_hash.block_number.0); for (transaction, receipt) in work.transactions.iter().zip(work.receipts.iter()) { let tx = transaction; let tx_hash = receipt.transaction_hash; @@ -408,13 +402,14 @@ impl ReplayStorage for RpcStorage { work: &ReplayBlock, trace_out: &Option, ) -> Result, RunnerError> { - let block_number = BlockNumber::new(work.header.block_number.0); + let block_number = BlockNumber::new(work.header.block_header_without_hash.block_number.0); info!("Replay started block {block_number}"); // Transactions are replayed with the call to `ExecutableTransaction::execute`. // When simulating transactions, the storage layer should match the data of the // parent block (i.e. before the transaction is executed) - let block_number_minus_one = BlockNumber::new(work.header.block_number.0 - 1); + let block_number_minus_one = + BlockNumber::new(work.header.block_header_without_hash.block_number.0 - 1); // rpc_client --> permanent_state --> state_reader --> state let state_reader = ReplayStateReader::new(&self.permanent_state, block_number_minus_one); let charge_fee = true; @@ -422,24 +417,29 @@ impl ReplayStorage for RpcStorage { let allow_use_kzg_data = true; let chain_info = self.chain_info()?; let block_info = Self::block_info(&work.header, allow_use_kzg_data); - let old_block_number_and_hash = if work.header.block_number.0 >= 10 { - let block_number_whose_hash_becomes_available = - BlockNumber::new(work.header.block_number.0 - 10); - // TODO: in case of multiple blocks replay, the block hash is already queried - // when the vector of `ReplayBlock` is generated. This data could be reused in a - // shared variabled. - let block_hash = self - .get_block_header(block_number_whose_hash_becomes_available)? - .block_hash; - - Some(BlockNumberHashPair::new( - block_number_whose_hash_becomes_available.get(), - block_hash.0, - )) - } else { - None - }; - let starknet_version = work.header.starknet_version.clone(); + let old_block_number_and_hash = + if work.header.block_header_without_hash.block_number.0 >= 10 { + let block_number_whose_hash_becomes_available = + BlockNumber::new(work.header.block_header_without_hash.block_number.0 - 10); + // TODO: in case of multiple blocks replay, the block hash is already queried + // when the vector of `ReplayBlock` is generated. This data could be reused in a + // shared variabled. + let block_hash = self + .get_block_header(block_number_whose_hash_becomes_available)? + .block_hash; + + Some(BlockNumberHashPair::new( + block_number_whose_hash_becomes_available.get(), + block_hash.0, + )) + } else { + None + }; + let starknet_version = work + .header + .block_header_without_hash + .starknet_version + .clone(); let versioned_constants = Self::versioned_constants(&starknet_version); let mut state: CachedState<_, VisitedPcsRaw> = CachedState::new(state_reader); let block_context = BlockContext::new( @@ -451,7 +451,7 @@ impl ReplayStorage for RpcStorage { pre_process_block( &mut state, old_block_number_and_hash, - work.header.block_number, + work.header.block_header_without_hash.block_number, )?; let mut transaction_result: Vec<_> = Vec::with_capacity(work.transactions.len()); @@ -525,9 +525,9 @@ impl ReplayStorage for RpcStorage { mod tests { use starknet_api::core::{ChainId, Nonce}; - use starknet_api::felt; use starknet_api::hash::StarkHash; use starknet_api::state::StorageKey; + use starknet_api::{contract_address, felt, patricia_key}; use super::*; @@ -586,7 +586,10 @@ mod tests { .permanent_state .starknet_get_block_with_tx_hashes(&block_number) .unwrap(); - assert_eq!(block_header.timestamp.0, 1_713_168_820); + assert_eq!( + block_header.block_header_without_hash.timestamp.0, + 1_713_168_820 + ); } #[test] @@ -683,11 +686,11 @@ mod tests { #[test] fn test_versioned_constants() { - let starknet_version = StarknetVersion("0.13.0.0".to_string()); + let starknet_version = StarknetVersion("0.13.0.0".into()); let constants = RpcStorage::versioned_constants(&starknet_version); assert_eq!(constants.invoke_tx_max_n_steps, 3_000_000); - let starknet_version = StarknetVersion("0.13.1.0".to_string()); + let starknet_version = StarknetVersion("0.13.1.0".into()); let constants = RpcStorage::versioned_constants(&starknet_version); assert_eq!(constants.invoke_tx_max_n_steps, 4_000_000); } diff --git a/starknet-replay/src/storage/rpc/state/receipt.rs b/starknet-replay/src/storage/rpc/state/receipt.rs index 081829e..5fc0c3f 100644 --- a/starknet-replay/src/storage/rpc/state/receipt.rs +++ b/starknet-replay/src/storage/rpc/state/receipt.rs @@ -6,8 +6,8 @@ use std::collections::HashMap; use primitive_types::H160; use starknet_api::block::BlockHash; use starknet_api::core::{ContractAddress, EthAddress}; +use starknet_api::execution_resources::{Builtin, ExecutionResources, GasVector}; use starknet_api::transaction::{ - Builtin, DeclareTransactionOutput, DeployAccountTransactionOutput, DeployTransactionOutput, @@ -15,9 +15,7 @@ use starknet_api::transaction::{ EventContent, EventData, EventKey, - ExecutionResources, Fee, - GasVector, InvokeTransactionOutput, L1HandlerTransactionOutput, L2ToL1Payload, @@ -40,7 +38,7 @@ use crate::error::RpcClientError; /// This function generates a hashmap of builtins usage in a transaction. /// /// It is needed to generate the object -/// [`starknet_api::transaction::ExecutionResources`]. +/// [`starknet_api::execution_resources::ExecutionResources`]. /// /// # Arguments /// @@ -48,49 +46,49 @@ use crate::error::RpcClientError; fn generate_builtin_counter(computation_resources: &ComputationResources) -> HashMap { let mut builtin_instance_counter = HashMap::default(); builtin_instance_counter.insert( - starknet_api::transaction::Builtin::RangeCheck, + starknet_api::execution_resources::Builtin::RangeCheck, computation_resources .range_check_builtin_applications .unwrap_or_default(), ); builtin_instance_counter.insert( - starknet_api::transaction::Builtin::Pedersen, + starknet_api::execution_resources::Builtin::Pedersen, computation_resources .pedersen_builtin_applications .unwrap_or_default(), ); builtin_instance_counter.insert( - starknet_api::transaction::Builtin::Poseidon, + starknet_api::execution_resources::Builtin::Poseidon, computation_resources .poseidon_builtin_applications .unwrap_or_default(), ); builtin_instance_counter.insert( - starknet_api::transaction::Builtin::EcOp, + starknet_api::execution_resources::Builtin::EcOp, computation_resources .ec_op_builtin_applications .unwrap_or_default(), ); builtin_instance_counter.insert( - starknet_api::transaction::Builtin::Ecdsa, + starknet_api::execution_resources::Builtin::Ecdsa, computation_resources .ecdsa_builtin_applications .unwrap_or_default(), ); builtin_instance_counter.insert( - starknet_api::transaction::Builtin::Bitwise, + starknet_api::execution_resources::Builtin::Bitwise, computation_resources .bitwise_builtin_applications .unwrap_or_default(), ); builtin_instance_counter.insert( - starknet_api::transaction::Builtin::Keccak, + starknet_api::execution_resources::Builtin::Keccak, computation_resources .keccak_builtin_applications .unwrap_or_default(), ); builtin_instance_counter.insert( - starknet_api::transaction::Builtin::SegmentArena, + starknet_api::execution_resources::Builtin::SegmentArena, computation_resources .segment_arena_builtin .unwrap_or_default(), @@ -160,7 +158,7 @@ fn generate_messages(input: Vec) -> Result, RpcClientE } /// This function converts [`starknet_core::types::ExecutionResources`] into -/// [`starknet_api::transaction::ExecutionResources`]. +/// [`starknet_api::execution_resources::ExecutionResources`]. /// /// # Arguments /// @@ -178,15 +176,22 @@ fn generate_execution_resources( .memory_holes .unwrap_or_default(), da_gas_consumed: GasVector { - l1_gas: 0, // Where do I get this data? - l1_data_gas: 0, // Where do I get this data? + l1_gas: 0_u32.into(), // Where do I get this data? + l1_data_gas: 0_u32.into(), // Where do I get this data? + l2_gas: 0_u32.into(), // Where do I get this data? }, gas_consumed: GasVector { - l1_gas: execution_resources.data_resources.data_availability.l1_gas, + l1_gas: execution_resources + .data_resources + .data_availability + .l1_gas + .into(), l1_data_gas: execution_resources .data_resources .data_availability - .l1_data_gas, + .l1_data_gas + .into(), + l2_gas: 0_u32.into(), }, } } diff --git a/starknet-replay/src/storage/rpc/state/rpc_client.rs b/starknet-replay/src/storage/rpc/state/rpc_client.rs index 0237195..dd9c26f 100644 --- a/starknet-replay/src/storage/rpc/state/rpc_client.rs +++ b/starknet-replay/src/storage/rpc/state/rpc_client.rs @@ -4,6 +4,7 @@ use starknet_api::block::{ BlockHash, BlockHeader, + BlockHeaderWithoutHash, BlockTimestamp, GasPrice, GasPricePerToken, @@ -40,6 +41,7 @@ use crate::block_number::BlockNumber; use crate::contract_address::to_field_element; use crate::error::RpcClientError; use crate::runner::replay_class_hash::ReplayClassHash; +use crate::storage::rpc::RpcStorage; use crate::storage::BlockWithReceipts; /// This structure partially implements a Starknet RPC client. @@ -160,34 +162,39 @@ impl RpcClient { let block_header = BlockHeader { block_hash: BlockHash(Felt::from_bytes_be(&block.block_hash.to_bytes_be())), - parent_hash: BlockHash(Felt::from_bytes_be(&block.parent_hash.to_bytes_be())), - block_number: starknet_api::block::BlockNumber(block.block_number), - l1_gas_price: GasPricePerToken { - price_in_fri: GasPrice(price_in_fri), - price_in_wei: GasPrice(price_in_wei), - }, - l1_data_gas_price: GasPricePerToken { - price_in_fri: GasPrice(data_price_in_fri), - price_in_wei: GasPrice(data_price_in_wei), - }, - state_root: GlobalRoot(Felt::from_bytes_be(&block.new_root.to_bytes_be())), - sequencer: SequencerContractAddress(sequencer.try_into()?), - timestamp: BlockTimestamp(block.timestamp), - l1_da_mode: match block.l1_da_mode { - starknet_core::types::L1DataAvailabilityMode::Blob => { - L1DataAvailabilityMode::Blob - } - starknet_core::types::L1DataAvailabilityMode::Calldata => { - L1DataAvailabilityMode::Calldata - } + block_header_without_hash: BlockHeaderWithoutHash { + parent_hash: BlockHash(Felt::from_bytes_be( + &block.parent_hash.to_bytes_be(), + )), + block_number: starknet_api::block::BlockNumber(block.block_number), + l1_gas_price: GasPricePerToken { + price_in_fri: GasPrice(price_in_fri), + price_in_wei: GasPrice(price_in_wei), + }, + l1_data_gas_price: GasPricePerToken { + price_in_fri: GasPrice(data_price_in_fri), + price_in_wei: GasPrice(data_price_in_wei), + }, + l2_gas_price: GasPricePerToken::default(), + state_root: GlobalRoot(Felt::from_bytes_be(&block.new_root.to_bytes_be())), + sequencer: SequencerContractAddress(sequencer.try_into()?), + timestamp: BlockTimestamp(block.timestamp), + l1_da_mode: match block.l1_da_mode { + starknet_core::types::L1DataAvailabilityMode::Blob => { + L1DataAvailabilityMode::Blob + } + starknet_core::types::L1DataAvailabilityMode::Calldata => { + L1DataAvailabilityMode::Calldata + } + }, + starknet_version: StarknetVersion(block.starknet_version.into()), }, state_diff_commitment: None, + state_diff_length: None, transaction_commitment: None, event_commitment: None, n_transactions: block.transactions.len(), n_events: 0, - starknet_version: StarknetVersion(block.starknet_version), - state_diff_length: None, receipt_commitment: None, }; Ok(block_header) @@ -223,6 +230,14 @@ impl RpcClient { let price_in_fri: u128 = block.l1_gas_price.price_in_fri.to_string().parse()?; let price_in_wei: u128 = block.l1_gas_price.price_in_wei.to_string().parse()?; + let starknet_version = StarknetVersion(block.starknet_version.into()); + let versioned_constants = RpcStorage::versioned_constants(&starknet_version); + + let l2_price_in_fri: GasPrice = + versioned_constants.convert_l1_to_l2_gas_price_round_up(price_in_fri.into()); + let l2_price_in_wei: GasPrice = + versioned_constants.convert_l1_to_l2_gas_price_round_up(price_in_wei.into()); + let data_price_in_fri: u128 = block.l1_data_gas_price.price_in_fri.to_string().parse()?; let data_price_in_wei: u128 = @@ -230,34 +245,42 @@ impl RpcClient { let block_header = BlockHeader { block_hash: BlockHash(Felt::from_bytes_be(&block.block_hash.to_bytes_be())), - parent_hash: BlockHash(Felt::from_bytes_be(&block.parent_hash.to_bytes_be())), - block_number: starknet_api::block::BlockNumber(block.block_number), - l1_gas_price: GasPricePerToken { - price_in_fri: GasPrice(price_in_fri), - price_in_wei: GasPrice(price_in_wei), - }, - l1_data_gas_price: GasPricePerToken { - price_in_fri: GasPrice(data_price_in_fri), - price_in_wei: GasPrice(data_price_in_wei), - }, - state_root: GlobalRoot(Felt::from_bytes_be(&block.new_root.to_bytes_be())), - sequencer: SequencerContractAddress(sequencer.try_into()?), - timestamp: BlockTimestamp(block.timestamp), - l1_da_mode: match block.l1_da_mode { - starknet_core::types::L1DataAvailabilityMode::Blob => { - L1DataAvailabilityMode::Blob - } - starknet_core::types::L1DataAvailabilityMode::Calldata => { - L1DataAvailabilityMode::Calldata - } + block_header_without_hash: BlockHeaderWithoutHash { + parent_hash: BlockHash(Felt::from_bytes_be( + &block.parent_hash.to_bytes_be(), + )), + block_number: starknet_api::block::BlockNumber(block.block_number), + l1_gas_price: GasPricePerToken { + price_in_fri: GasPrice(price_in_fri), + price_in_wei: GasPrice(price_in_wei), + }, + l1_data_gas_price: GasPricePerToken { + price_in_fri: GasPrice(data_price_in_fri), + price_in_wei: GasPrice(data_price_in_wei), + }, + l2_gas_price: GasPricePerToken { + price_in_fri: l2_price_in_fri, + price_in_wei: l2_price_in_wei, + }, + state_root: GlobalRoot(Felt::from_bytes_be(&block.new_root.to_bytes_be())), + sequencer: SequencerContractAddress(sequencer.try_into()?), + timestamp: BlockTimestamp(block.timestamp), + l1_da_mode: match block.l1_da_mode { + starknet_core::types::L1DataAvailabilityMode::Blob => { + L1DataAvailabilityMode::Blob + } + starknet_core::types::L1DataAvailabilityMode::Calldata => { + L1DataAvailabilityMode::Calldata + } + }, + starknet_version, }, state_diff_commitment: None, + state_diff_length: None, transaction_commitment: None, event_commitment: None, n_transactions: block.transactions.len(), n_events: 0, - starknet_version: StarknetVersion(block.starknet_version), - state_diff_length: None, receipt_commitment: None, }; diff --git a/starknet-replay/src/storage/rpc/state/transaction.rs b/starknet-replay/src/storage/rpc/state/transaction.rs index 209fe9d..7c336e0 100644 --- a/starknet-replay/src/storage/rpc/state/transaction.rs +++ b/starknet-replay/src/storage/rpc/state/transaction.rs @@ -27,12 +27,12 @@ use starknet_api::transaction::{ InvokeTransactionV3, L1HandlerTransaction, PaymasterData, - Resource, ResourceBounds, Tip, Transaction as StarknetApiTransaction, TransactionSignature, TransactionVersion, + ValidResourceBounds, }; use starknet_core::types::{ResourceBoundsMapping, Transaction as StarknetCoreTransaction}; @@ -44,27 +44,15 @@ use crate::error::RpcClientError; /// # Arguments /// /// - `resource_bounds_mapping`: The input object. -fn convert_resource_bounds( - resource_bounds_mapping: &ResourceBoundsMapping, -) -> Vec<(Resource, ResourceBounds)> { - let mut resource_bounds = Vec::new(); - let l1_resource = ( - Resource::L1Gas, - ResourceBounds { - max_amount: resource_bounds_mapping.l1_gas.max_amount, - max_price_per_unit: resource_bounds_mapping.l1_gas.max_price_per_unit, - }, - ); - let l2_resource = ( - Resource::L2Gas, - ResourceBounds { - max_amount: resource_bounds_mapping.l2_gas.max_amount, - max_price_per_unit: resource_bounds_mapping.l2_gas.max_price_per_unit, - }, - ); - resource_bounds.push(l1_resource); - resource_bounds.push(l2_resource); - resource_bounds +fn convert_resource_bounds(resource_bounds_mapping: &ResourceBoundsMapping) -> ValidResourceBounds { + let l1_resource = ResourceBounds { + max_amount: resource_bounds_mapping.l1_gas.max_amount.into(), + max_price_per_unit: resource_bounds_mapping.l1_gas.max_price_per_unit.into(), + }; + + // resource_bounds_mapping.l2_gas is always 0. Therefore I am returning + // [`ValidResourceBounds::L1Gas`] + ValidResourceBounds::L1Gas(l1_resource) } /// This function converts [`starknet_core::types::DataAvailabilityMode`] into @@ -127,7 +115,7 @@ fn convert_invoke_transaction( } starknet_core::types::InvokeTransaction::V3(tx) => { let invoke_tx = InvokeTransactionV3 { - resource_bounds: convert_resource_bounds(&tx.resource_bounds).try_into()?, + resource_bounds: convert_resource_bounds(&tx.resource_bounds), tip: Tip(tx.tip), signature: TransactionSignature(tx.signature), nonce: Nonce(tx.nonce), @@ -227,7 +215,7 @@ fn convert_declare_transaction( } starknet_core::types::DeclareTransaction::V3(tx) => { let declare_tx = DeclareTransactionV3 { - resource_bounds: convert_resource_bounds(&tx.resource_bounds).try_into()?, + resource_bounds: convert_resource_bounds(&tx.resource_bounds), tip: Tip(tx.tip), signature: TransactionSignature(tx.signature), nonce: Nonce(tx.nonce), @@ -298,7 +286,7 @@ fn convert_deploy_account_transaction( } starknet_core::types::DeployAccountTransaction::V3(tx) => { let deploy_account_tx = DeployAccountTransactionV3 { - resource_bounds: convert_resource_bounds(&tx.resource_bounds).try_into()?, + resource_bounds: convert_resource_bounds(&tx.resource_bounds), tip: Tip(tx.tip), signature: TransactionSignature(tx.signature), nonce: Nonce(tx.nonce),