diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20ecfefe05..8f6ecdfbd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -223,7 +223,7 @@ jobs: - name: Install scarb uses: software-mansion/setup-scarb@v1 with: - scarb-version: "2.10.1" + scarb-version: "2.11.1" - name: Install deps run: make deps - name: Run tests @@ -291,7 +291,7 @@ jobs: - name: Install scarb uses: software-mansion/setup-scarb@v1 with: - scarb-version: "2.10.1" + scarb-version: "2.11.1" - name: Install deps run: make deps - name: Build alexandria diff --git a/.github/workflows/starknet-blocks.yml b/.github/workflows/starknet-blocks.yml index 00a28acf4a..2fd8b4d01c 100644 --- a/.github/workflows/starknet-blocks.yml +++ b/.github/workflows/starknet-blocks.yml @@ -32,7 +32,7 @@ jobs: with: repository: lambdaclass/starknet-replay path: starknet-replay - ref: 99f57191880562e83628e2d320bfd4eaf24e6c95 + ref: c95ab2bb8c09926b7e8a36d6e0bad89d9e299327 # We need native to use the linux deps ci action - name: Checkout Native uses: actions/checkout@v4 @@ -43,7 +43,7 @@ jobs: with: repository: lambdaclass/sequencer path: sequencer - ref: 12ea9447b8ea1763bd23efa7a573333e4e057f0d + ref: 056bf87a45a197f0501169af9c836eb0732d4467 - name: Cache RPC Calls uses: actions/cache@v4.2.0 @@ -67,9 +67,9 @@ jobs: # Updates sequencer dependency to local path name='[[:alnum:]_-]+' sequencer_url='"https:\/\/github.com\/lambdaclass\/sequencer\.git"' - rev='"[[:alnum:]]+"' + rev='"[^"]+"' new_path='"..\/sequencer\/crates\/\1"' - sed -i'' -r "s/^($name) = \{ git = $sequencer_url, rev = $rev/\1 = { path = $new_path/" Cargo.toml + sed -i'' -r "s/^($name) = \{ git = $sequencer_url, (rev|branch) = $rev/\1 = { path = $new_path/" Cargo.toml # Updates native dependency to local path new_path='"..\/cairo_native"' diff --git a/Cargo.lock b/Cargo.lock index b506f2458c..3d8765df26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,7 +88,7 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -99,7 +99,7 @@ checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", "once_cell", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -119,24 +119,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.99", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "zeroize", + "syn 2.0.100", ] [[package]] @@ -147,7 +130,7 @@ checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" dependencies = [ "ahash", "ark-ff 0.5.0", - "ark-poly 0.5.0", + "ark-poly", "ark-serialize 0.5.0", "ark-std 0.5.0", "educe 0.6.0", @@ -217,7 +200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -243,20 +226,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.99", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", + "syn 2.0.100", ] [[package]] @@ -274,46 +244,24 @@ dependencies = [ "hashbrown 0.15.2", ] -[[package]] -name = "ark-secp256k1" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c02e954eaeb4ddb29613fee20840c2bbc85ca4396d53e33837e11905363c5f2" -dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - [[package]] name = "ark-secp256k1" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8bd211c48debd3037b48873a7aa22c3aba034e83388aa4124795c9f220b88c7" dependencies = [ - "ark-ec 0.5.0", + "ark-ec", "ark-ff 0.5.0", "ark-std 0.5.0", ] -[[package]] -name = "ark-secp256r1" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3975a01b0a6e3eae0f72ec7ca8598a6620fc72fa5981f6f5cca33b7cd788f633" -dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - [[package]] name = "ark-secp256r1" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cf8be5820de567729bfa73a410ddd07cec8ad102d9a4bf61fd6b2e60db264e8" dependencies = [ - "ark-ec 0.5.0", + "ark-ec", "ark-ff 0.5.0", "ark-std 0.5.0", ] @@ -324,7 +272,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "ark-serialize-derive 0.4.2", "ark-std 0.4.0", "digest", "num-bigint", @@ -336,24 +283,13 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ - "ark-serialize-derive 0.5.0", + "ark-serialize-derive", "ark-std 0.5.0", "arrayvec", "digest", "num-bigint", ] -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-serialize-derive" version = "0.5.0" @@ -362,7 +298,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -393,9 +329,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii-canvas" -version = "3.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +checksum = "ef1e3e699d84ab1b0911a1010c5c106aa34ae89aeac103be5ce0c3859db1e891" dependencies = [ "term", ] @@ -414,15 +350,24 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "bincode" -version = "2.0.0" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bincode" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad1fa75f77bbd06f187540aa1d70ca50b80b27ce85e7f41c0ce7ff42b34ed3b" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" dependencies = [ "serde", "unty", @@ -445,16 +390,7 @@ dependencies = [ "regex", "rustc-hash 2.1.1", "shlex", - "syn 2.0.99", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec 0.6.3", + "syn 2.0.100", ] [[package]] @@ -463,15 +399,9 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec 0.8.0", + "bit-vec", ] -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bit-vec" version = "0.8.0" @@ -555,9 +485,9 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff11aec4eb39d670efa69d8a6bda5803661578e9dc1be54ea948fe82fb39995" +checksum = "9fd285350180106409ee63a7098f074bc93b3d1f9c522e58a066354e5917d94b" dependencies = [ "cairo-lang-utils", "indoc", @@ -569,9 +499,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f704af3ba7499d63a695688d2f5b40109820f8ca38d78092a4aa4a64ec600d2" +checksum = "16fd34920920a4e22de5a8bb4b50f1764c044d98b5706f9bb43daaaa60113471" dependencies = [ "anyhow", "cairo-lang-defs", @@ -590,23 +520,23 @@ dependencies = [ "rust-analyzer-salsa", "semver", "smol_str", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-debug" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b22020eb5184ceab861f249ca9fb5d17dbc1278fa88216663e1711da64fbe5a" +checksum = "a2cb099c7fda2abd48aee356ff583fca8e66cf0d06efaec7f28e004eab49bbf9" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2322f996ea69a064a9cbad43b996e0352bf0218c6a27b8ff1423ad7942faaa29" +checksum = "be28c63e383b9c0ae0dcac069e0c3d6245424cbde5dff3b90dd9014e359db1ba" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -614,28 +544,28 @@ dependencies = [ "cairo-lang-parser", "cairo-lang-syntax", "cairo-lang-utils", - "itertools 0.12.1", + "itertools 0.14.0", "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-diagnostics" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d4751c8b3835df963f9aed56a2dba2bb000af824809b2694c0876e3e9f7dee" +checksum = "25677b40c2f9f0fa488d0c015e73fa8706974c0f766646679a11552e17f41bfb" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", "cairo-lang-utils", - "itertools 0.12.1", + "itertools 0.14.0", ] [[package]] name = "cairo-lang-eq-solver" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed621df2fcc246a81a71ace26fd1be34bbd19aeb60535c85d8e794710a2bef5e" +checksum = "1390d00c5e22b72d71cfe3b800ebd9b684c97c43edbf8e640106f7a0c9a952d4" dependencies = [ "cairo-lang-utils", "good_lp", @@ -643,9 +573,9 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0baa53250acf692f7214e997ec864a529d4aad7392f5a7798805659c195ac321" +checksum = "e9b636791fec1fa11ca6ac63af146dd05a3eb5fc6f8baf1effd820a6d99e4454" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -659,9 +589,9 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb00211393a7f992bcf33a17bbe189e1a9dbe247a2de04fe22a313d6b684f746" +checksum = "79db7448e78a71a638bb6346936935ff546a24087bc0a95b1f579c60acdac835" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -671,18 +601,19 @@ dependencies = [ "cairo-lang-utils", "diffy", "ignore", - "itertools 0.12.1", + "itertools 0.14.0", "rust-analyzer-salsa", "serde", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-lowering" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949be6b96044de47aaa2ecf99167a5ffa893de2ca21b1a869cb726cf90f37eec" +checksum = "8294f7d9d89cf87a4fcbda26bdaeb76c332a85e6cdcb9b07d0d463cd03a4d3a6" dependencies = [ + "bincode 1.3.3", "cairo-lang-debug", "cairo-lang-defs", "cairo-lang-diagnostics", @@ -693,28 +624,30 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "id-arena", - "itertools 0.12.1", + "itertools 0.14.0", "log", "num-bigint", "num-integer", "num-traits", "rust-analyzer-salsa", + "serde", "smol_str", ] [[package]] name = "cairo-lang-parser" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3dcc5e85867b0f715b30d62585ac750a4c7ab1f92813599ba17cc29e1d0a1d1" +checksum = "bd0bde29b6bf6bff82c6aba80026e43e87d4239f1f21230e391fb390aec1abda" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", + "cairo-lang-primitive-token", "cairo-lang-syntax", "cairo-lang-syntax-codegen", "cairo-lang-utils", - "colored", - "itertools 0.12.1", + "colored 3.0.0", + "itertools 0.14.0", "num-bigint", "num-traits", "rust-analyzer-salsa", @@ -724,9 +657,9 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239cebcb9024d9e8eb26496055ffa325e5c2d868f798637fc69f25ac3b2ab5ca" +checksum = "4468692f81a90505f4e999756df23a2463e617b50a40977e41895fcd97f2fb74" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -736,7 +669,7 @@ dependencies = [ "cairo-lang-utils", "indent", "indoc", - "itertools 0.12.1", + "itertools 0.14.0", "rust-analyzer-salsa", "smol_str", ] @@ -749,33 +682,33 @@ checksum = "123ac0ecadf31bacae77436d72b88fa9caef2b8e92c89ce63a125ae911a12fae" [[package]] name = "cairo-lang-proc-macros" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a98a058656493f4ef4b7fc51ed4fa46cc9b2834262815959746bf1696f1c50f" +checksum = "ef642f3694cd7aee3d2ec9ebe55dfe3b7edecf00a54888314b24a3b91e688bcf" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "cairo-lang-project" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d111a3ffe3b463e79af5d6049a6e23fc5c7048e0bacea5ebd268107ded21012" +checksum = "590494781a31f1757f195695c13e7923c52bfec3ac28df169cfab9dc2deb8e68" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", "serde", - "thiserror 1.0.69", + "thiserror 2.0.12", "toml", ] [[package]] name = "cairo-lang-runnable-utils" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dae123904bb7831433868377bb6e7d0a054504b6ea00535cc192abb1a364950" +checksum = "9998568fa7b7e5934c9b9e8530dd965040f10a729abd6ad2f466da5fbfb65379" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -785,19 +718,19 @@ dependencies = [ "cairo-lang-sierra-type-size", "cairo-lang-utils", "cairo-vm 1.0.2", - "itertools 0.12.1", - "thiserror 1.0.69", + "itertools 0.14.0", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-runner" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b00e638356ca1b6073fad36d95131ebe62ee8bc0cc2cb31880e0b17f5e38c39" +checksum = "9812ce5aa64d148ce6f428edd3df1ee722361c7b7a63c227059bed7999f73088" dependencies = [ - "ark-ff 0.4.2", - "ark-secp256k1 0.4.0", - "ark-secp256r1 0.4.0", + "ark-ff 0.5.0", + "ark-secp256k1", + "ark-secp256r1", "cairo-lang-casm", "cairo-lang-lowering", "cairo-lang-runnable-utils", @@ -807,23 +740,23 @@ dependencies = [ "cairo-lang-starknet", "cairo-lang-utils", "cairo-vm 1.0.2", - "itertools 0.12.1", + "itertools 0.14.0", "keccak", "num-bigint", "num-integer", "num-traits", - "rand 0.8.5", + "rand 0.9.0", "sha2", "smol_str", "starknet-types-core", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-semantic" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5aedc89a6324b3dbdd6cf6827258c50035b7459cf818d88296d6d88c1a46cfd" +checksum = "caf53837960f20b95091b6a26b4bcf7a12e1d5b974e99e3b3f58bbade7c6dd2a" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -837,7 +770,7 @@ dependencies = [ "cairo-lang-utils", "id-arena", "indoc", - "itertools 0.12.1", + "itertools 0.14.0", "num-bigint", "num-traits", "rust-analyzer-salsa", @@ -848,16 +781,16 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cfdac5d0a0be84e9247414b552905967e06feaef48633af4ca6e80240acb09" +checksum = "59477bd2dacb420b9d60d94ab53947d267b0bc7ecdcc05ca9a7fe3c84edb4cc0" dependencies = [ "anyhow", "cairo-lang-utils", "const-fnv1a-hash", - "convert_case 0.6.0", + "convert_case", "derivative", - "itertools 0.12.1", + "itertools 0.14.0", "lalrpop", "lalrpop-util", "num-bigint", @@ -870,46 +803,46 @@ dependencies = [ "sha3", "smol_str", "starknet-types-core", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a923105c63704b7371f4ee92a17b3037c8be88f0c7021eb764d8f974a397ff5" +checksum = "6dd34b6d11d53f2b730aac15b23c3f3b8aedaf84c39e6daf8329e7e6de9eb02d" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", "cairo-lang-sierra-type-size", "cairo-lang-utils", - "itertools 0.12.1", + "itertools 0.14.0", "num-bigint", "num-traits", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-sierra-gas" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa8dc62dfa49f57dcdb092f551bcba42d0123f4d0f0763087b3b41142543ecf" +checksum = "c3e4f829dc68364f3479710a4bac28cf8445d41ced6d814cefeb795eea09bbf2" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", "cairo-lang-sierra-type-size", "cairo-lang-utils", - "itertools 0.12.1", + "itertools 0.14.0", "num-bigint", "num-traits", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-sierra-generator" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4526593827287b39af72c0d12698007a9fe693d8a8e9fc4e481885634e9c1601" +checksum = "e047ad26ac7ae708f10690aa657a9a44e940610f0613f6787683a9432fd2bf1f" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -921,7 +854,7 @@ dependencies = [ "cairo-lang-sierra", "cairo-lang-syntax", "cairo-lang-utils", - "itertools 0.12.1", + "itertools 0.14.0", "num-traits", "rust-analyzer-salsa", "serde", @@ -931,9 +864,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4357f1cadb6a713c85560aacba92a794eac1f5c82021c0f28ce3a6810c4e334" +checksum = "56bc33070453d938e9c0215946e729640022e0836e7115586e71cde2ad32be4f" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -943,18 +876,18 @@ dependencies = [ "cairo-lang-sierra-type-size", "cairo-lang-utils", "indoc", - "itertools 0.12.1", + "itertools 0.14.0", "num-bigint", "num-traits", "starknet-types-core", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-sierra-type-size" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2963c5eea0778ba7f00e41916dc347b988ca73458edc3e460954e597484bc95" +checksum = "a5b271327e76ef9983c2f026b0d77a3ccfaba15281cf7fb144f0b132c7f4ab9c" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -962,9 +895,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07a18683311c0976fbff8ac237e1f0940707695efee77438b56c1604d1db9b5e" +checksum = "15583fe71edfbe49f371e2d66ad567f1504f7b3bbb9f0b5599172856efc1dee1" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -982,26 +915,26 @@ dependencies = [ "const_format", "indent", "indoc", - "itertools 0.12.1", + "itertools 0.14.0", "serde", "serde_json", "smol_str", "starknet-types-core", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-starknet-classes" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467bf061c5a43844880d5566931d6d2866b714b4451c61072301ce40b484cda4" +checksum = "f8b1e830041e8ef3092ec0675dd3f755d301dd980a6694841fe4593342192236" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", "cairo-lang-sierra-to-casm", "cairo-lang-utils", - "convert_case 0.6.0", - "itertools 0.12.1", + "convert_case", + "itertools 0.14.0", "num-bigint", "num-integer", "num-traits", @@ -1010,14 +943,14 @@ dependencies = [ "sha3", "smol_str", "starknet-types-core", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "cairo-lang-syntax" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a45ff877463d52565f056a6e9f4689c3a2cea59fde66f9853f2f7ce9e44dc3" +checksum = "ed44747e2f36de724204b9c7e74292488a8b9e4c56f199d78eb66f8b6e96935f" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1026,15 +959,16 @@ dependencies = [ "num-bigint", "num-traits", "rust-analyzer-salsa", + "serde", "smol_str", "unescaper", ] [[package]] name = "cairo-lang-syntax-codegen" -version = "2.10.1" +version = "2.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee2959e743f241b66ea3f6c743a96b1d44162aedf5cb960a04b3d25b1e7ce68" +checksum = "ef844093fbe46c1e2ead60316591f5be2d3e4b8fad93194a7302a8bb977328ab" dependencies = [ "genco", "xshell", @@ -1042,9 +976,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61348e6f51d666bf82ec8c536c9f5be22bd86f18a3b357ec3014223df01c81" +checksum = "bcabfa86cb0410d5005ec45ec8f95640b3a6ae1e4fe00b408885fa45b8210fee" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1060,7 +994,7 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "indoc", - "itertools 0.12.1", + "itertools 0.14.0", "num-bigint", "num-traits", "serde", @@ -1069,26 +1003,26 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a4f3e42fc818474f3767308159548ddbedc95a6fb857a04ebb95da725203ca" +checksum = "039d5a6ac4d1c0b08f3de5624283636f8afdd1c23b0061e69eb3c0a23296fb1a" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", - "colored", + "colored 3.0.0", "log", "pretty_assertions", ] [[package]] name = "cairo-lang-utils" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d000fa1b86f07587b9dcabdaed00878464944b96c8c1f3f5006e890a5a8870" +checksum = "a10413a200666e296ea47d2e2e551b00e9bae0d825b896fb02b7c460f453b0fd" dependencies = [ - "hashbrown 0.14.5", - "indexmap 2.7.1", - "itertools 0.12.1", + "hashbrown 0.15.2", + "indexmap 2.8.0", + "itertools 0.14.0", "num-bigint", "num-traits", "schemars", @@ -1101,10 +1035,10 @@ version = "0.3.4" dependencies = [ "anyhow", "aquamarine", - "ark-ec 0.5.0", + "ark-ec", "ark-ff 0.5.0", - "ark-secp256k1 0.5.0", - "ark-secp256r1 0.5.0", + "ark-secp256k1", + "ark-secp256r1", "bumpalo", "cairo-lang-compiler", "cairo-lang-defs", @@ -1122,7 +1056,7 @@ dependencies = [ "cairo-vm 2.0.0-rc3", "cc", "clap", - "colored", + "colored 2.2.0", "criterion", "educe 0.5.11", "itertools 0.14.0", @@ -1166,7 +1100,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fa8b4b56ee66cebcade4d85128e55b2bfdf046502187aeaa8c2768a427684dc" dependencies = [ "anyhow", - "bincode", + "bincode 2.0.1", "bitvec", "generic-array", "hashbrown 0.14.5", @@ -1199,7 +1133,7 @@ dependencies = [ "anyhow", "ark-ff 0.4.2", "ark-std 0.4.0", - "bincode", + "bincode 2.0.1", "bitvec", "cairo-lang-casm", "cairo-lang-starknet", @@ -1253,9 +1187,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.16" +version = "1.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" +checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" dependencies = [ "jobserver", "libc", @@ -1327,9 +1261,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.31" +version = "4.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" +checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" dependencies = [ "clap_builder", "clap_derive", @@ -1337,9 +1271,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.31" +version = "4.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" +checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" dependencies = [ "anstream", "anstyle", @@ -1349,14 +1283,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.28" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1378,7 +1312,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "colored" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" +dependencies = [ + "windows-sys 0.59.0", ] [[package]] @@ -1405,7 +1348,7 @@ dependencies = [ "libc", "once_cell", "unicode-width", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1440,15 +1383,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "convert_case" version = "0.7.1" @@ -1578,9 +1512,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" dependencies = [ "powerfmt", ] @@ -1598,9 +1532,9 @@ dependencies = [ [[package]] name = "deunicode" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" +checksum = "dc55fe0d1f6c107595572ec8b107c0999bb1a2e0b75e37429a4fb0d6474a0e7d" [[package]] name = "diff" @@ -1610,11 +1544,11 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "diffy" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e616e59155c92257e84970156f506287853355f58cd4a6eb167385722c32b790" +checksum = "b545b8c50194bdd008283985ab0b31dba153cfd5b3066a92770634fbc0d7d291" dependencies = [ - "nu-ansi-term", + "nu-ansi-term 0.50.1", ] [[package]] @@ -1628,27 +1562,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dyn-clone" version = "1.0.19" @@ -1664,7 +1577,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1676,7 +1589,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1723,7 +1636,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1739,7 +1652,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1750,9 +1663,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fixedbitset" -version = "0.4.2" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" @@ -1772,9 +1685,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "funty" @@ -1796,7 +1709,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1844,7 +1757,7 @@ checksum = "43eaff6bbc0b3a878361aced5ec6a2818ee7c541c5b33b5880dfa9a86c23e9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1872,14 +1785,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "libc", - "wasi 0.13.3+wasi-0.2.2", - "windows-targets", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -1913,9 +1826,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1" dependencies = [ "cfg-if", "crunchy", @@ -1927,15 +1840,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -1973,9 +1877,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" [[package]] name = "hex" @@ -1992,6 +1896,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "html-escape" version = "0.2.13" @@ -2031,7 +1944,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2072,9 +1985,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -2111,13 +2024,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", "libc", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -2135,24 +2048,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -2206,33 +2101,34 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.20.2" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +checksum = "7047a26de42016abf8f181b46b398aef0b77ad46711df41847f6ed869a2a1d5b" dependencies = [ "ascii-canvas", - "bit-set 0.5.3", + "bit-set", "ena", - "itertools 0.11.0", + "itertools 0.14.0", "lalrpop-util", "petgraph", "pico-args", "regex", "regex-syntax 0.8.5", + "sha3", "string_cache", "term", - "tiny-keccak", "unicode-xid", "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.20.2" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +checksum = "e8d05b3fe34b8bd562c338db725dfa9beb9451a48f65f129ccb9538b48d2c93b" dependencies = [ "regex-automata 0.4.9", + "rustversion", ] [[package]] @@ -2279,9 +2175,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.170" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libloading" @@ -2293,21 +2189,11 @@ dependencies = [ "windows-targets", ] -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags", - "libc", -] - [[package]] name = "linux-raw-sys" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9" +checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" [[package]] name = "llvm-sys" @@ -2335,9 +2221,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.26" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "lru" @@ -2384,11 +2270,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a99671327250df8e24e56d8304474a970e7a2c6bb8f6dc71382d188136fe4d1b" dependencies = [ "comrak", - "convert_case 0.7.1", + "convert_case", "proc-macro2", "quote", "regex", - "syn 2.0.99", + "syn 2.0.100", "tblgen", "unindent", ] @@ -2474,6 +2360,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "nu-ansi-term" +version = "0.50.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -2554,15 +2449,15 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "once_cell" -version = "1.20.3" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "oorandom" -version = "11.1.4" +version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "ordered-float" @@ -2604,7 +2499,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2667,12 +2562,12 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset", - "indexmap 2.7.1", + "indexmap 2.8.0", ] [[package]] @@ -2759,11 +2654,11 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.7.35", + "zerocopy 0.8.24", ] [[package]] @@ -2794,12 +2689,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.30" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ccf34da56fc294e7d4ccf69a85992b7dfb826b7cf57bac6a70bba3494cc08a" +checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" dependencies = [ "proc-macro2", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2847,8 +2742,8 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ - "bit-set 0.8.0", - "bit-vec 0.8.0", + "bit-set", + "bit-vec", "bitflags", "lazy_static", "num-traits", @@ -2869,13 +2764,19 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "radium" version = "0.7.0" @@ -2901,7 +2802,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", - "zerocopy 0.8.23", + "zerocopy 0.8.24", ] [[package]] @@ -2939,7 +2840,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.1", + "getrandom 0.3.2", ] [[package]] @@ -2986,17 +2887,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.15", - "libredox", - "thiserror 1.0.69", -] - [[package]] name = "regex" version = "1.11.1" @@ -3089,7 +2979,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.99", + "syn 2.0.100", "unicode-ident", ] @@ -3099,7 +2989,7 @@ version = "0.17.0-pre.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "lock_api", "oorandom", "parking_lot", @@ -3119,14 +3009,14 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "rust_decimal" -version = "1.36.0" +version = "1.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" +checksum = "faa7de2ba56ac291bd90c6b9bece784a52ae1411f9506544b3eae36dd2356d50" dependencies = [ "arrayvec", "num-traits", @@ -3155,15 +3045,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8dcd64f141950290e45c99f7710ede1b600297c91818bb30b3667c0f45dc0" +checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -3251,7 +3141,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3271,22 +3161,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.218" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.218" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3297,7 +3187,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3479,7 +3369,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3535,9 +3425,9 @@ checksum = "5c0e04424e733e69714ca1bbb9204c1a57f09f5493439520f9f68c132ad25eec" [[package]] name = "string_cache" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938d512196766101d333398efde81bc1f37b00cb42c2f8350e5df639f040bbbe" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", "parking_lot", @@ -3570,9 +3460,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.99" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -3599,27 +3489,25 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.18.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c317e0a526ee6120d8dabad239c8dadca62b24b6f168914bbbc8e2fb1f0e567" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ - "cfg-if", "fastrand", - "getrandom 0.3.1", + "getrandom 0.3.2", "once_cell", "rustix", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "term" -version = "0.7.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +checksum = "a3bb6001afcea98122260987f8b7b5da969ecad46dbf0b5453702f776b491a41" dependencies = [ - "dirs-next", - "rustversion", - "winapi", + "home", + "windows-sys 0.52.0", ] [[package]] @@ -3640,7 +3528,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3651,7 +3539,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "test-case-core", ] @@ -3681,7 +3569,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3692,7 +3580,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3727,9 +3615,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.39" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "num-conv", @@ -3740,18 +3628,9 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" - -[[package]] -name = "tiny-keccak" -version = "2.0.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "tinytemplate" @@ -3805,7 +3684,7 @@ version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_spanned", "toml_datetime", @@ -3831,7 +3710,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3872,7 +3751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", - "nu-ansi-term", + "nu-ansi-term 0.46.0", "once_cell", "regex", "serde", @@ -3970,9 +3849,9 @@ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" [[package]] name = "unty" -version = "0.0.3" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a88342087869553c259588a3ec9ca73ce9b2d538b7051ba5789ff236b6c129" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" [[package]] name = "utf8-width" @@ -4031,9 +3910,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" -version = "0.13.3+wasi-0.2.2" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] @@ -4059,7 +3938,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "wasm-bindgen-shared", ] @@ -4081,7 +3960,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4134,7 +4013,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -4143,6 +4022,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.59.0" @@ -4218,18 +4106,18 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" dependencies = [ "memchr", ] [[package]] name = "wit-bindgen-rt" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ "bitflags", ] @@ -4270,17 +4158,16 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "byteorder", "zerocopy-derive 0.7.35", ] [[package]] name = "zerocopy" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" dependencies = [ - "zerocopy-derive 0.8.23", + "zerocopy-derive 0.8.24", ] [[package]] @@ -4291,18 +4178,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "zerocopy-derive" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -4322,7 +4209,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -4366,9 +4253,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.14+zstd.1.5.7" +version = "2.0.15+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5" +checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index e095c0bc68..b6cb12a2a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,13 +63,13 @@ normal = ["aquamarine"] [dependencies] aquamarine = "0.6.0" bumpalo = "3.16.0" -cairo-lang-compiler = "=2.10.0" -cairo-lang-defs = "=2.10.0" -cairo-lang-filesystem = "=2.10.0" -cairo-lang-runner = "=2.10.0" -cairo-lang-semantic = "=2.10.0" -cairo-lang-sierra = "=2.10.0" -cairo-lang-sierra-generator = "=2.10.0" +cairo-lang-compiler = "=2.11.1" +cairo-lang-defs = "=2.11.1" +cairo-lang-filesystem = "=2.11.1" +cairo-lang-runner = "=2.11.1" +cairo-lang-semantic = "=2.11.1" +cairo-lang-sierra = "=2.11.1" +cairo-lang-sierra-generator = "=2.11.1" educe = "0.5.11" # can't update until https://github.com/magiclen/educe/issues/27 itertools = "0.14.0" lazy_static = "1.5" @@ -91,11 +91,11 @@ utf8_iter = "1.0.4" # CLI dependencies -cairo-lang-sierra-ap-change = "=2.10.0" -cairo-lang-sierra-gas = "=2.10.0" -cairo-lang-starknet = "=2.10.0" -cairo-lang-utils = "=2.10.0" -cairo-lang-starknet-classes = "=2.10.0" +cairo-lang-sierra-ap-change = "=2.11.1" +cairo-lang-sierra-gas = "=2.11.1" +cairo-lang-starknet = "=2.11.1" +cairo-lang-utils = "=2.11.1" +cairo-lang-starknet-classes = "=2.11.1" clap = { version = "4.5.23", features = ["derive"], optional = true } libloading = "0.8.6" tracing-subscriber = { version = "0.3.19", features = [ @@ -105,7 +105,7 @@ tracing-subscriber = { version = "0.3.19", features = [ ], optional = true } serde = { version = "1.0", features = ["derive"] } anyhow = { version = "1.0", optional = true } -cairo-lang-test-plugin = { version = "=2.10.0", optional = true } +cairo-lang-test-plugin = { version = "=2.11.1", optional = true } colored = { version = "2.1.0", optional = true } # needed to interface with cairo-lang-* keccak = "0.1.5" @@ -128,7 +128,7 @@ starknet-curve = "0.5.1" [dev-dependencies] cairo-vm = { version = "=2.0.0-rc3", features = ["cairo-1-hints"] } -cairo-lang-semantic = { version = "=2.10.0", features = ["testing"] } +cairo-lang-semantic = { version = "=2.11.1", features = ["testing"] } criterion = { version = "0.5.1", features = ["html_reports"] } lambdaworks-math = "0.11.0" pretty_assertions_sorted = "1.2.3" diff --git a/Makefile b/Makefile index cbcedc9115..079af19054 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ # Environment detection. UNAME := $(shell uname) -CAIRO_2_VERSION = 2.10.0 -SCARB_VERSION = 2.10.1 +CAIRO_2_VERSION = 2.11.1 +SCARB_VERSION = 2.11.1 # Usage is the default target for newcomers running `make`. .PHONY: usage @@ -66,7 +66,10 @@ test: check-llvm needs-cairo2 build-alexandria .PHONY: test-cairo test-cairo: check-llvm needs-cairo2 - cargo r --profile ci --bin cairo-native-test -- corelib + cargo r --profile ci --bin cairo-native-test -- corelib \ + --skip-compilation core::test::dict_test::test_array_from_squash_dict \ + --skip-compilation core::test::hash_test::test_blake2s \ + --skip-compilation core::test::testing_test::test_get_unspent_gas .PHONY: proptest proptest: check-llvm needs-cairo2 diff --git a/README.md b/README.md index f1a3bb8c71..f806297cff 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ corelib is found, and then list available targets. ```bash % make LLVM is correctly set at /opt/homebrew/opt/llvm. -./scripts/check-corelib-version.sh 2.10.0-rc1 +./scripts/check-corelib-version.sh 2.11.1 Usage: deps: Installs the necesary dependencies. build: Builds the cairo-native library and binaries in release mode. @@ -349,7 +349,7 @@ Options: ### Requirements - [hyperfine](https://github.com/sharkdp/hyperfine): `cargo install hyperfine` -- [cairo 2.10.0-rc1](https://github.com/starkware-libs/cairo) +- [cairo 2.11.1](https://github.com/starkware-libs/cairo) - Cairo Corelibs - LLVM 19 with MLIR diff --git a/src/arch.rs b/src/arch.rs index 37bde46da5..400a7b0059 100644 --- a/src/arch.rs +++ b/src/arch.rs @@ -10,7 +10,7 @@ use bumpalo::Bump; use cairo_lang_sierra::{ extensions::{ core::{CoreLibfunc, CoreType, CoreTypeConcrete}, - starknet::{secp256::Secp256PointTypeConcrete, StarkNetTypeConcrete}, + starknet::{secp256::Secp256PointTypeConcrete, StarknetTypeConcrete}, }, ids::ConcreteTypeId, program_registry::ProgramRegistry, @@ -169,11 +169,11 @@ impl AbiArgument for ValueWithInfoWrapper<'_> { ( Value::Felt252(value), CoreTypeConcrete::Felt252(_) - | CoreTypeConcrete::StarkNet( - StarkNetTypeConcrete::ClassHash(_) - | StarkNetTypeConcrete::ContractAddress(_) - | StarkNetTypeConcrete::StorageAddress(_) - | StarkNetTypeConcrete::StorageBaseAddress(_), + | CoreTypeConcrete::Starknet( + StarknetTypeConcrete::ClassHash(_) + | StarknetTypeConcrete::ContractAddress(_) + | StarknetTypeConcrete::StorageAddress(_) + | StarknetTypeConcrete::StorageBaseAddress(_), ), ) => value.to_bytes(buffer, find_dict_drop_override)?, (Value::Felt252Dict { .. }, CoreTypeConcrete::Felt252Dict(_)) => { @@ -191,13 +191,13 @@ impl AbiArgument for ValueWithInfoWrapper<'_> { } ( Value::Secp256K1Point(Secp256k1Point { x, y, is_infinity }), - CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::Secp256Point( + CoreTypeConcrete::Starknet(StarknetTypeConcrete::Secp256Point( Secp256PointTypeConcrete::K1(_), )), ) | ( Value::Secp256R1Point(Secp256r1Point { x, y, is_infinity }), - CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::Secp256Point( + CoreTypeConcrete::Starknet(StarknetTypeConcrete::Secp256Point( Secp256PointTypeConcrete::R1(_), )), ) => { diff --git a/src/bin/cairo-native-dump.rs b/src/bin/cairo-native-dump.rs index dccf053d8f..2361530b3b 100644 --- a/src/bin/cairo-native-dump.rs +++ b/src/bin/cairo-native-dump.rs @@ -6,7 +6,7 @@ use cairo_lang_semantic::plugin::PluginSuite; use cairo_lang_sierra::{program::Program, ProgramParser}; use cairo_lang_starknet::{ compile::compile_contract_in_prepared_db, inline_macros::selector::SelectorMacro, - plugin::StarkNetPlugin, + plugin::StarknetPlugin, }; use cairo_native::context::NativeContext; use clap::Parser; @@ -70,11 +70,11 @@ fn load_program(path: &Path, is_contract: bool) -> Result() + .add_plugin::() .add_inline_macro_plugin_ex(SelectorMacro::NAME, Arc::new(SelectorMacro)); let mut db = RootDatabase::builder() .detect_corelib() - .with_plugin_suite(plugins) + .with_default_plugin_suite(plugins) .build()?; let main_crate_ids = setup_project(&mut db, Path::new(&path))?; diff --git a/src/bin/cairo-native-test.rs b/src/bin/cairo-native-test.rs index cb39f4f8d8..760ace24c5 100644 --- a/src/bin/cairo-native-test.rs +++ b/src/bin/cairo-native-test.rs @@ -6,7 +6,9 @@ use cairo_lang_compiler::{ }; use cairo_lang_filesystem::cfg::{Cfg, CfgSet}; use cairo_lang_starknet::starknet_plugin_suite; -use cairo_lang_test_plugin::{compile_test_prepared_db, test_plugin_suite, TestsCompilationConfig}; +use cairo_lang_test_plugin::{ + compile_test_prepared_db, test_plugin_suite, TestCompilation, TestsCompilationConfig, +}; use clap::Parser; use colored::Colorize; use std::path::PathBuf; @@ -34,6 +36,13 @@ struct Args { /// The filter for the tests, running only tests containing the filter string. #[arg(short, long, default_value_t = String::default())] filter: String, + /// Skips compilation for tests/functions containing any of the given filters. + /// Unlike `--filter`, the matching tests are not even compiled by native. + /// + /// DISCLAIMER: This is a hacky and temporary flag, used to run corelib tests + /// when not all libfuncs are implemented. + #[arg(long)] + skip_compilation: Vec, /// Should we run ignored tests as well. #[arg(long, default_value_t = false)] include_ignored: bool, @@ -68,9 +77,9 @@ fn main() -> anyhow::Result<()> { let mut b = RootDatabase::builder(); b.detect_corelib(); b.with_cfg(CfgSet::from_iter([Cfg::name("test")])); - b.with_plugin_suite(test_plugin_suite()); + b.with_default_plugin_suite(test_plugin_suite()); if args.starknet { - b.with_plugin_suite(starknet_plugin_suite()); + b.with_default_plugin_suite(starknet_plugin_suite()); } b.build()? @@ -104,6 +113,8 @@ fn main() -> anyhow::Result<()> { args.filter.clone(), ); + let compiled = filter_test_case_compilation(compiled, &args.skip_compilation); + let summary = run_tests( compiled.metadata.named_tests, compiled.sierra_program.program, @@ -127,3 +138,50 @@ fn main() -> anyhow::Result<()> { Ok(()) } + +/// Removes matching tests from `TestCompilation`. This not only includes the +/// test cases, but also the function definition in the inner sierra program. +/// This means that the matching tests are not even compiled. +/// +/// DISCLAIMER: This is a hacky and temporary function, used to run corelib tests +/// when not all libfuncs are implemented. +fn filter_test_case_compilation( + mut compiled: TestCompilation, + compilation_filter: &[String], +) -> TestCompilation { + let should_skip_test = |name: &str| -> bool { + compilation_filter + .iter() + .any(|filter| name.contains(filter)) + }; + + // Remove matching function definitions. + compiled.sierra_program.program.funcs.retain(|f| { + let name = + f.id.debug_name + .as_ref() + .map(|s| s.as_str()) + .unwrap_or_default(); + + let skipped = should_skip_test(name); + + if skipped { + println!("skipping compilation of: {}", name); + } + + !skipped + }); + + // Ignore matching test cases. + compiled + .metadata + .named_tests + .iter_mut() + .for_each(|(test, case)| { + if should_skip_test(test) { + case.ignored = true + } + }); + + compiled +} diff --git a/src/debug.rs b/src/debug.rs index 53db70f480..ea8390eae5 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -28,7 +28,7 @@ use cairo_lang_sierra::extensions::{ starknet::{ secp256::{Secp256ConcreteLibfunc, Secp256OpConcreteLibfunc}, testing::TestingConcreteLibfunc, - StarkNetConcreteLibfunc, + StarknetConcreteLibfunc, }, structure::StructConcreteLibfunc, }; @@ -126,6 +126,7 @@ pub const fn libfunc_to_name(value: &CoreConcreteLibfunc) -> &'static str { GasConcreteLibfunc::GetAvailableGas(_) => "get_available_gas", GasConcreteLibfunc::BuiltinWithdrawGas(_) => "builtin_withdraw_gas", GasConcreteLibfunc::GetBuiltinCosts(_) => "get_builtin_costs", + GasConcreteLibfunc::GetUnspentGas(_) => "get_unspent_gas", }, CoreConcreteLibfunc::Uint8(value) => match value { UintConcrete::Const(_) => "u8_const", @@ -311,49 +312,50 @@ pub const fn libfunc_to_name(value: &CoreConcreteLibfunc) -> &'static str { Felt252DictEntryConcreteLibfunc::Get(_) => "felt252dict_get", Felt252DictEntryConcreteLibfunc::Finalize(_) => "felt252dict_finalize", }, + CoreConcreteLibfunc::Felt252SquashedDict(_) => "felt252_squashed_dict", CoreConcreteLibfunc::Pedersen(value) => match value { PedersenConcreteLibfunc::PedersenHash(_) => "pedersen_hash", }, CoreConcreteLibfunc::Poseidon(value) => match value { PoseidonConcreteLibfunc::HadesPermutation(_) => "hades_permutation", }, - CoreConcreteLibfunc::StarkNet(value) => match value { - StarkNetConcreteLibfunc::CallContract(_) => "call_contract", - StarkNetConcreteLibfunc::ClassHashConst(_) => "class_hash_const", - StarkNetConcreteLibfunc::ClassHashTryFromFelt252(_) => "class_hash_try_from_felt252", - StarkNetConcreteLibfunc::ClassHashToFelt252(_) => "class_hash_to_felt252", - StarkNetConcreteLibfunc::ContractAddressConst(_) => "contract_address_const", - StarkNetConcreteLibfunc::ContractAddressTryFromFelt252(_) => { + CoreConcreteLibfunc::Starknet(value) => match value { + StarknetConcreteLibfunc::CallContract(_) => "call_contract", + StarknetConcreteLibfunc::ClassHashConst(_) => "class_hash_const", + StarknetConcreteLibfunc::ClassHashTryFromFelt252(_) => "class_hash_try_from_felt252", + StarknetConcreteLibfunc::ClassHashToFelt252(_) => "class_hash_to_felt252", + StarknetConcreteLibfunc::ContractAddressConst(_) => "contract_address_const", + StarknetConcreteLibfunc::ContractAddressTryFromFelt252(_) => { "contract_address_try_from_felt252" } - StarkNetConcreteLibfunc::ContractAddressToFelt252(_) => "contract_address_to_felt252", - StarkNetConcreteLibfunc::StorageRead(_) => "storage_read", - StarkNetConcreteLibfunc::StorageWrite(_) => "storage_write", - StarkNetConcreteLibfunc::StorageBaseAddressConst(_) => "storage_base_address_const", - StarkNetConcreteLibfunc::StorageBaseAddressFromFelt252(_) => { + StarknetConcreteLibfunc::ContractAddressToFelt252(_) => "contract_address_to_felt252", + StarknetConcreteLibfunc::StorageRead(_) => "storage_read", + StarknetConcreteLibfunc::StorageWrite(_) => "storage_write", + StarknetConcreteLibfunc::StorageBaseAddressConst(_) => "storage_base_address_const", + StarknetConcreteLibfunc::StorageBaseAddressFromFelt252(_) => { "storage_base_address_from_felt252" } - StarkNetConcreteLibfunc::StorageAddressFromBase(_) => "storage_address_from_base", - StarkNetConcreteLibfunc::StorageAddressFromBaseAndOffset(_) => { + StarknetConcreteLibfunc::StorageAddressFromBase(_) => "storage_address_from_base", + StarknetConcreteLibfunc::StorageAddressFromBaseAndOffset(_) => { "storage_address_from_base_and_offset" } - StarkNetConcreteLibfunc::StorageAddressToFelt252(_) => "storage_address_to_felt252", - StarkNetConcreteLibfunc::StorageAddressTryFromFelt252(_) => { + StarknetConcreteLibfunc::StorageAddressToFelt252(_) => "storage_address_to_felt252", + StarknetConcreteLibfunc::StorageAddressTryFromFelt252(_) => { "storage_address_try_from_felt252" } - StarkNetConcreteLibfunc::EmitEvent(_) => "emit_event", - StarkNetConcreteLibfunc::GetBlockHash(_) => "get_block_hash", - StarkNetConcreteLibfunc::GetExecutionInfo(_) => "get_exec_info_v1", - StarkNetConcreteLibfunc::GetExecutionInfoV2(_) => "get_exec_info_v2", - StarkNetConcreteLibfunc::Deploy(_) => "deploy", - StarkNetConcreteLibfunc::Keccak(_) => "keccak", - StarkNetConcreteLibfunc::LibraryCall(_) => "library_call", - StarkNetConcreteLibfunc::ReplaceClass(_) => "replace_class", - StarkNetConcreteLibfunc::SendMessageToL1(_) => "send_message_to_l1", - StarkNetConcreteLibfunc::Testing(value) => match value { + StarknetConcreteLibfunc::EmitEvent(_) => "emit_event", + StarknetConcreteLibfunc::GetBlockHash(_) => "get_block_hash", + StarknetConcreteLibfunc::GetExecutionInfo(_) => "get_exec_info_v1", + StarknetConcreteLibfunc::GetExecutionInfoV2(_) => "get_exec_info_v2", + StarknetConcreteLibfunc::Deploy(_) => "deploy", + StarknetConcreteLibfunc::Keccak(_) => "keccak", + StarknetConcreteLibfunc::LibraryCall(_) => "library_call", + StarknetConcreteLibfunc::ReplaceClass(_) => "replace_class", + StarknetConcreteLibfunc::SendMessageToL1(_) => "send_message_to_l1", + StarknetConcreteLibfunc::Testing(value) => match value { TestingConcreteLibfunc::Cheatcode(_) => "cheatcode", }, - StarkNetConcreteLibfunc::Secp256(value) => match value { + StarknetConcreteLibfunc::Secp256(value) => match value { Secp256ConcreteLibfunc::K1(value) => match value { Secp256OpConcreteLibfunc::New(_) => "secp256k1_new", Secp256OpConcreteLibfunc::Add(_) => "secp256k1_add", @@ -369,14 +371,16 @@ pub const fn libfunc_to_name(value: &CoreConcreteLibfunc) -> &'static str { Secp256OpConcreteLibfunc::GetXy(_) => "secp256r1_get_xy", }, }, - StarkNetConcreteLibfunc::Sha256ProcessBlock(_) => "sha256_process_block", - StarkNetConcreteLibfunc::Sha256StateHandleInit(_) => "sha256_state_handle_init", - StarkNetConcreteLibfunc::Sha256StateHandleDigest(_) => "sha256_state_handle_digest", - StarkNetConcreteLibfunc::GetClassHashAt(_) => "get_class_hash_at_syscall", + StarknetConcreteLibfunc::Sha256ProcessBlock(_) => "sha256_process_block", + StarknetConcreteLibfunc::Sha256StateHandleInit(_) => "sha256_state_handle_init", + StarknetConcreteLibfunc::Sha256StateHandleDigest(_) => "sha256_state_handle_digest", + StarknetConcreteLibfunc::GetClassHashAt(_) => "get_class_hash_at_syscall", + StarknetConcreteLibfunc::MetaTxV0(_) => "meta_tx_v0", }, CoreConcreteLibfunc::Debug(value) => match value { DebugConcreteLibfunc::Print(_) => "debug_print", }, + CoreConcreteLibfunc::Trace(_) => "trace", CoreConcreteLibfunc::SnapshotTake(_) => "snapshot_take", CoreConcreteLibfunc::Bytes31(value) => match value { Bytes31ConcreteLibfunc::Const(_) => "bytes31_const", @@ -415,5 +419,6 @@ pub const fn libfunc_to_name(value: &CoreConcreteLibfunc) -> &'static str { IntRangeConcreteLibfunc::TryNew(_) => "int_range_try_new", IntRangeConcreteLibfunc::PopFront(_) => "int_range_pop_front", }, + CoreConcreteLibfunc::Blake(_) => "blake", } } diff --git a/src/executor.rs b/src/executor.rs index 0b39431b42..e298713ae0 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -20,7 +20,7 @@ use cairo_lang_sierra::{ extensions::{ circuit::CircuitTypeConcrete, core::{CoreLibfunc, CoreType, CoreTypeConcrete}, - starknet::StarkNetTypeConcrete, + starknet::StarknetTypeConcrete, ConcreteType, }, ids::ConcreteTypeId, @@ -162,7 +162,7 @@ fn invoke_dynamic( CoreTypeConcrete::GasBuiltin(_) => { gas.to_bytes(&mut invoke_data, |_| unreachable!())? } - CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::System(_)) => { + CoreTypeConcrete::Starknet(StarknetTypeConcrete::System(_)) => { let syscall_handler = syscall_handler .as_mut() .to_native_assert_error("syscall handler should be available")?; @@ -254,7 +254,7 @@ fn invoke_dynamic( } }); } - CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::System(_)) => { + CoreTypeConcrete::Starknet(StarknetTypeConcrete::System(_)) => { if let Some(return_ptr) = &mut return_ptr { unsafe { let ptr = return_ptr.cast::<*mut ()>(); @@ -420,11 +420,11 @@ fn parse_result( true, )?), CoreTypeConcrete::Felt252(_) - | CoreTypeConcrete::StarkNet( - StarkNetTypeConcrete::ClassHash(_) - | StarkNetTypeConcrete::ContractAddress(_) - | StarkNetTypeConcrete::StorageAddress(_) - | StarkNetTypeConcrete::StorageBaseAddress(_), + | CoreTypeConcrete::Starknet( + StarknetTypeConcrete::ClassHash(_) + | StarknetTypeConcrete::ContractAddress(_) + | StarknetTypeConcrete::StorageAddress(_) + | StarknetTypeConcrete::StorageBaseAddress(_), ) => match return_ptr { Some(return_ptr) => Ok(Value::from_ptr(return_ptr, type_id, registry, true)?), None => { @@ -642,7 +642,7 @@ fn parse_result( | CoreTypeConcrete::Pedersen(_) | CoreTypeConcrete::Poseidon(_) | CoreTypeConcrete::SegmentArena(_) - | CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::System(_)) => { + | CoreTypeConcrete::Starknet(StarknetTypeConcrete::System(_)) => { native_panic!("builtins should have been handled before") } @@ -650,12 +650,14 @@ fn parse_result( | CoreTypeConcrete::Span(_) | CoreTypeConcrete::Uninitialized(_) | CoreTypeConcrete::Coupon(_) - | CoreTypeConcrete::StarkNet(_) + | CoreTypeConcrete::Starknet(_) | CoreTypeConcrete::Uint128MulGuarantee(_) | CoreTypeConcrete::Circuit(_) | CoreTypeConcrete::RangeCheck96(_) => native_panic!("not yet implemented as results"), // 2.9.0 CoreTypeConcrete::IntRange(_) => native_panic!("not yet implemented as results"), + // 2.11.1 + CoreTypeConcrete::Blake(_) => native_panic!("not yet implemented as results"), } } @@ -673,7 +675,7 @@ mod tests { #[fixture] fn program() -> Program { let (_, program) = load_cairo! { - use core::starknet::{SyscallResultTrait, get_block_hash_syscall}; + use starknet::{SyscallResultTrait, get_block_hash_syscall}; fn run_test() -> felt252 { 42 @@ -754,10 +756,15 @@ mod tests { .expect("failed to compile context"); let executor = AotNativeExecutor::from_native_module(module, OptLevel::default()).unwrap(); - // The last function in the program is the `get` wrapper function. let entrypoint_function_id = &starknet_program .funcs - .last() + .iter() + .find(|f| { + f.id.debug_name + .as_ref() + .map(|name| name.contains("__wrapper__ISimpleStorageImpl__get")) + .unwrap_or_default() + }) .expect("should have a function") .id; @@ -781,10 +788,15 @@ mod tests { .expect("failed to compile context"); let executor = JitNativeExecutor::from_native_module(module, OptLevel::default()).unwrap(); - // The last function in the program is the `get` wrapper function. let entrypoint_function_id = &starknet_program .funcs - .last() + .iter() + .find(|f| { + f.id.debug_name + .as_ref() + .map(|name| name.contains("__wrapper__ISimpleStorageImpl__get")) + .unwrap_or_default() + }) .expect("should have a function") .id; diff --git a/src/executor/aot.rs b/src/executor/aot.rs index 6095e906c2..ab16c33ae2 100644 --- a/src/executor/aot.rs +++ b/src/executor/aot.rs @@ -207,7 +207,7 @@ mod tests { #[fixture] fn program() -> Program { let (_, program) = load_cairo! { - use core::starknet::{SyscallResultTrait, get_block_hash_syscall}; + use starknet::{SyscallResultTrait, get_block_hash_syscall}; fn run_test() -> felt252 { 42 @@ -315,10 +315,15 @@ mod tests { .expect("failed to compile context"); let executor = AotNativeExecutor::from_native_module(module, optlevel).unwrap(); - // The last function in the program is the `get` wrapper function. let entrypoint_function_id = &starknet_program .funcs - .last() + .iter() + .find(|f| { + f.id.debug_name + .as_ref() + .map(|name| name.contains("__wrapper__ISimpleStorageImpl__get")) + .unwrap_or_default() + }) .expect("should have a function") .id; diff --git a/src/executor/contract.rs b/src/executor/contract.rs index be12c69780..ae2334bd5e 100644 --- a/src/executor/contract.rs +++ b/src/executor/contract.rs @@ -54,7 +54,7 @@ use cairo_lang_sierra::{ circuit::CircuitTypeConcrete, core::{CoreLibfunc, CoreType, CoreTypeConcrete}, gas::CostTokenType, - starknet::StarkNetTypeConcrete, + starknet::StarknetTypeConcrete, }, ids::FunctionId, program::{GenFunction, Program, StatementIdx}, @@ -627,7 +627,7 @@ fn find_entrypoint_builtins( BuiltinType::CircuitMul } CoreTypeConcrete::GasBuiltin(_) => BuiltinType::Gas, - CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::System(_)) => BuiltinType::System, + CoreTypeConcrete::Starknet(StarknetTypeConcrete::System(_)) => BuiltinType::System, _ => native_panic!("unknown builtin type for function {}", function), }) }) @@ -872,7 +872,7 @@ mod tests { ) .unwrap(); assert_eq!(result.return_values, vec![Felt::from(3628800)]); - assert_eq!(result.remaining_gas, 18446744073709537615); + assert_eq!(result.remaining_gas, 18446744073709538015); } #[rstest] @@ -893,7 +893,6 @@ mod tests { ) .unwrap(); - // The last function in the program is the `get` wrapper function. // The last function in the program is the `get` wrapper function. let selector = starknet_program_empty .entry_points_by_type diff --git a/src/libfuncs.rs b/src/libfuncs.rs index 16cc7be30b..9277e2c2e0 100644 --- a/src/libfuncs.rs +++ b/src/libfuncs.rs @@ -5,6 +5,7 @@ use crate::{ error::{panic::ToNativeAssertError, Error as CoreLibfuncBuilderError, Result}, metadata::MetadataStorage, + native_panic, types::TypeBuilder, utils::BlockExt, }; @@ -17,7 +18,7 @@ use cairo_lang_sierra::{ unsigned::{Uint16Traits, Uint32Traits, Uint64Traits, Uint8Traits}, }, lib_func::ParamSignature, - starknet::StarkNetTypeConcrete, + starknet::StarknetTypeConcrete, ConcreteLibfunc, }, ids::FunctionId, @@ -144,6 +145,7 @@ impl LibfuncBuilder for CoreConcreteLibfunc { Self::Debug(selector) => self::debug::build( context, registry, entry, location, helper, metadata, selector, ), + Self::Trace(_) => native_panic!("Implement trace libfunc"), Self::Drop(info) => { self::drop::build(context, registry, entry, location, helper, metadata, info) } @@ -162,6 +164,9 @@ impl LibfuncBuilder for CoreConcreteLibfunc { Self::Felt252Dict(selector) => self::felt252_dict::build( context, registry, entry, location, helper, metadata, selector, ), + Self::Felt252SquashedDict(_) => { + native_panic!("Implement felt252_squashed_dict libfunc") + } Self::Felt252DictEntry(selector) => self::felt252_dict_entry::build( context, registry, entry, location, helper, metadata, selector, ), @@ -174,6 +179,7 @@ impl LibfuncBuilder for CoreConcreteLibfunc { Self::IntRange(selector) => self::int_range::build( context, registry, entry, location, helper, metadata, selector, ), + Self::Blake(_) => native_panic!("Implement blake libfunc"), Self::Mem(selector) => self::mem::build( context, registry, entry, location, helper, metadata, selector, ), @@ -201,7 +207,7 @@ impl LibfuncBuilder for CoreConcreteLibfunc { Self::Sint128(selector) => self::int::build_i128( context, registry, entry, location, helper, metadata, selector, ), - Self::StarkNet(selector) => self::starknet::build( + Self::Starknet(selector) => self::starknet::build( context, registry, entry, location, helper, metadata, selector, ), Self::Struct(selector) => self::r#struct::build( @@ -471,7 +477,7 @@ fn build_noop<'ctx, 'this, const N: usize, const PROCESS_BUILTINS: bool>( CoreTypeConcrete::BuiltinCosts(_) | CoreTypeConcrete::Coupon(_) | CoreTypeConcrete::GasBuiltin(_) - | CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::System(_)) + | CoreTypeConcrete::Starknet(StarknetTypeConcrete::System(_)) ) { param_val = increment_builtin_counter(context, entry, location, param_val)?; diff --git a/src/libfuncs/const.rs b/src/libfuncs/const.rs index a136228335..92ec36d310 100644 --- a/src/libfuncs/const.rs +++ b/src/libfuncs/const.rs @@ -17,7 +17,7 @@ use cairo_lang_sierra::{ ConstConcreteType, }, core::{CoreLibfunc, CoreType, CoreTypeConcrete}, - starknet::StarkNetTypeConcrete, + starknet::StarknetTypeConcrete, }, program::GenericArg, program_registry::ProgramRegistry, @@ -269,8 +269,8 @@ pub fn build_const_type_value<'ctx, 'this>( entry.const_int_from_type(context, location, value, inner_ty) } - CoreTypeConcrete::StarkNet( - StarkNetTypeConcrete::ClassHash(_) | StarkNetTypeConcrete::ContractAddress(_), + CoreTypeConcrete::Starknet( + StarknetTypeConcrete::ClassHash(_) | StarknetTypeConcrete::ContractAddress(_), ) => { let value = match &info.inner_data.as_slice() { [GenericArg::Value(value)] => value.clone(), diff --git a/src/libfuncs/gas.rs b/src/libfuncs/gas.rs index d1132e00eb..07be1f195e 100644 --- a/src/libfuncs/gas.rs +++ b/src/libfuncs/gas.rs @@ -47,6 +47,9 @@ pub fn build<'ctx, 'this>( GasConcreteLibfunc::GetBuiltinCosts(info) => { build_get_builtin_costs(context, registry, entry, location, helper, metadata, info) } + GasConcreteLibfunc::GetUnspentGas(_) => { + native_panic!("Implement GetUnspentGas libfunc"); + } } } diff --git a/src/libfuncs/int_range.rs b/src/libfuncs/int_range.rs index 9e3a4023c9..de2f00e0c1 100644 --- a/src/libfuncs/int_range.rs +++ b/src/libfuncs/int_range.rs @@ -149,8 +149,9 @@ mod test { lazy_static! { static ref INT_RANGE_TRY_NEW: (String, Program) = load_cairo! { - #[derive(Copy, Drop)] pub extern type IntRange; + impl IntRangeDrop of Drop>; + pub extern fn int_range_try_new( x: T, y: T ) -> Result, IntRange> implicits(core::RangeCheck) nopanic; diff --git a/src/libfuncs/starknet.rs b/src/libfuncs/starknet.rs index 966180a6cf..512ac90805 100644 --- a/src/libfuncs/starknet.rs +++ b/src/libfuncs/starknet.rs @@ -5,6 +5,7 @@ use crate::{ error::{Error, Result}, ffi::get_struct_field_type_at, metadata::{drop_overrides::DropOverridesMeta, MetadataStorage}, + native_panic, starknet::handler::StarknetSyscallHandlerCallbacks, utils::{get_integer_layout, BlockExt, GepIndex, ProgramRegistryExt, PRIME}, }; @@ -13,7 +14,7 @@ use cairo_lang_sierra::{ consts::SignatureAndConstConcreteLibfunc, core::{CoreLibfunc, CoreType}, lib_func::SignatureOnlyConcreteLibfunc, - starknet::{testing::TestingConcreteLibfunc, StarkNetConcreteLibfunc}, + starknet::{testing::TestingConcreteLibfunc, StarknetConcreteLibfunc}, ConcreteLibfunc, }, program_registry::ProgramRegistry, @@ -43,15 +44,15 @@ pub fn build<'ctx, 'this>( location: Location<'ctx>, helper: &LibfuncHelper<'ctx, 'this>, metadata: &mut MetadataStorage, - selector: &StarkNetConcreteLibfunc, + selector: &StarknetConcreteLibfunc, ) -> Result<()> { match selector { - StarkNetConcreteLibfunc::ClassHashToFelt252(info) - | StarkNetConcreteLibfunc::ContractAddressToFelt252(info) - | StarkNetConcreteLibfunc::StorageAddressFromBase(info) - | StarkNetConcreteLibfunc::StorageAddressToFelt252(info) - | StarkNetConcreteLibfunc::Sha256StateHandleInit(info) - | StarkNetConcreteLibfunc::Sha256StateHandleDigest(info) => super::build_noop::<1, true>( + StarknetConcreteLibfunc::ClassHashToFelt252(info) + | StarknetConcreteLibfunc::ContractAddressToFelt252(info) + | StarknetConcreteLibfunc::StorageAddressFromBase(info) + | StarknetConcreteLibfunc::StorageAddressToFelt252(info) + | StarknetConcreteLibfunc::Sha256StateHandleInit(info) + | StarknetConcreteLibfunc::Sha256StateHandleDigest(info) => super::build_noop::<1, true>( context, registry, entry, @@ -60,91 +61,94 @@ pub fn build<'ctx, 'this>( metadata, &info.signature.param_signatures, ), - StarkNetConcreteLibfunc::CallContract(info) => { + StarknetConcreteLibfunc::CallContract(info) => { build_call_contract(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::ClassHashConst(info) => { + StarknetConcreteLibfunc::ClassHashConst(info) => { build_class_hash_const(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::ClassHashTryFromFelt252(info) => { + StarknetConcreteLibfunc::ClassHashTryFromFelt252(info) => { build_class_hash_try_from_felt252( context, registry, entry, location, helper, metadata, info, ) } - StarkNetConcreteLibfunc::ContractAddressConst(info) => { + StarknetConcreteLibfunc::ContractAddressConst(info) => { build_contract_address_const(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::ContractAddressTryFromFelt252(info) => { + StarknetConcreteLibfunc::ContractAddressTryFromFelt252(info) => { build_contract_address_try_from_felt252( context, registry, entry, location, helper, metadata, info, ) } - StarkNetConcreteLibfunc::StorageRead(info) => { + StarknetConcreteLibfunc::StorageRead(info) => { build_storage_read(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::StorageWrite(info) => { + StarknetConcreteLibfunc::StorageWrite(info) => { build_storage_write(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::StorageBaseAddressConst(info) => build_storage_base_address_const( + StarknetConcreteLibfunc::StorageBaseAddressConst(info) => build_storage_base_address_const( context, registry, entry, location, helper, metadata, info, ), - StarkNetConcreteLibfunc::StorageBaseAddressFromFelt252(info) => { + StarknetConcreteLibfunc::StorageBaseAddressFromFelt252(info) => { build_storage_base_address_from_felt252( context, registry, entry, location, helper, metadata, info, ) } - StarkNetConcreteLibfunc::StorageAddressFromBaseAndOffset(info) => { + StarknetConcreteLibfunc::StorageAddressFromBaseAndOffset(info) => { build_storage_address_from_base_and_offset( context, registry, entry, location, helper, metadata, info, ) } - StarkNetConcreteLibfunc::StorageAddressTryFromFelt252(info) => { + StarknetConcreteLibfunc::StorageAddressTryFromFelt252(info) => { build_storage_address_try_from_felt252( context, registry, entry, location, helper, metadata, info, ) } - StarkNetConcreteLibfunc::EmitEvent(info) => { + StarknetConcreteLibfunc::EmitEvent(info) => { build_emit_event(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::GetBlockHash(info) => { + StarknetConcreteLibfunc::GetBlockHash(info) => { build_get_block_hash(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::GetClassHashAt(info) => { + StarknetConcreteLibfunc::GetClassHashAt(info) => { build_get_class_hash_at(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::GetExecutionInfo(info) => { + StarknetConcreteLibfunc::GetExecutionInfo(info) => { build_get_execution_info(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::GetExecutionInfoV2(info) => { + StarknetConcreteLibfunc::GetExecutionInfoV2(info) => { build_get_execution_info_v2(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::Deploy(info) => { + StarknetConcreteLibfunc::Deploy(info) => { build_deploy(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::Keccak(info) => { + StarknetConcreteLibfunc::Keccak(info) => { build_keccak(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::LibraryCall(info) => { + StarknetConcreteLibfunc::LibraryCall(info) => { build_library_call(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::ReplaceClass(info) => { + StarknetConcreteLibfunc::ReplaceClass(info) => { build_replace_class(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::SendMessageToL1(info) => { + StarknetConcreteLibfunc::SendMessageToL1(info) => { build_send_message_to_l1(context, registry, entry, location, helper, metadata, info) } - StarkNetConcreteLibfunc::Secp256(selector) => self::secp256::build( + StarknetConcreteLibfunc::Secp256(selector) => self::secp256::build( context, registry, entry, location, helper, metadata, selector, ), - StarkNetConcreteLibfunc::Sha256ProcessBlock(info) => build_sha256_process_block_syscall( + StarknetConcreteLibfunc::Sha256ProcessBlock(info) => build_sha256_process_block_syscall( context, registry, entry, location, helper, metadata, info, ), + StarknetConcreteLibfunc::MetaTxV0(_) => { + native_panic!("Implement MetaTxV0 libfunc"); + } #[cfg(feature = "with-cheatcode")] - StarkNetConcreteLibfunc::Testing(TestingConcreteLibfunc::Cheatcode(info)) => { + StarknetConcreteLibfunc::Testing(TestingConcreteLibfunc::Cheatcode(info)) => { self::testing::build(context, registry, entry, location, helper, metadata, info) } #[cfg(not(feature = "with-cheatcode"))] - StarkNetConcreteLibfunc::Testing(TestingConcreteLibfunc::Cheatcode(_)) => { + StarknetConcreteLibfunc::Testing(TestingConcreteLibfunc::Cheatcode(_)) => { crate::native_panic!( "feature 'with-cheatcode' is required to compile with cheatcode syscall" ) @@ -2789,17 +2793,18 @@ mod test { } }; static ref CLASS_HASH_CONST: (String, Program) = load_cairo! { - use starknet::class_hash::{class_hash_const, ClassHash}; + use starknet::class_hash::ClassHash; fn run_program() -> ClassHash { - class_hash_const::<0>() + 0.try_into().unwrap() } }; } #[test] fn class_hash_const() { - run_program_assert_output(&CLASS_HASH_CONST, "run_program", &[], Felt::ZERO.into()) + let expected = jit_enum!(0, jit_struct!(Felt::ZERO.into())); + run_program_assert_output(&CLASS_HASH_CONST, "run_program", &[], expected) } #[test] diff --git a/src/types.rs b/src/types.rs index 94c3f68d39..6469f85fb2 100644 --- a/src/types.rs +++ b/src/types.rs @@ -13,7 +13,7 @@ use cairo_lang_sierra::{ extensions::{ circuit::CircuitTypeConcrete, core::{CoreLibfunc, CoreType, CoreTypeConcrete}, - starknet::StarkNetTypeConcrete, + starknet::StarknetTypeConcrete, utils::Range, }, ids::{ConcreteTypeId, UserTypeId}, @@ -352,7 +352,7 @@ impl TypeBuilder for CoreTypeConcrete { metadata, WithSelf::new(self_ty, info), ), - Self::StarkNet(selector) => self::starknet::build( + Self::Starknet(selector) => self::starknet::build( context, module, registry, @@ -436,6 +436,7 @@ impl TypeBuilder for CoreTypeConcrete { metadata, WithSelf::new(self_ty, info), ), + Self::Blake(_) => native_panic!("Build Blake type"), } } @@ -451,7 +452,7 @@ impl TypeBuilder for CoreTypeConcrete { | CoreTypeConcrete::Pedersen(_) | CoreTypeConcrete::Poseidon(_) | CoreTypeConcrete::Coupon(_) - | CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::System(_)) + | CoreTypeConcrete::Starknet(StarknetTypeConcrete::System(_)) | CoreTypeConcrete::SegmentArena(_) | CoreTypeConcrete::Circuit(CircuitTypeConcrete::AddMod(_)) | CoreTypeConcrete::Circuit(CircuitTypeConcrete::MulMod(_)) @@ -472,7 +473,7 @@ impl TypeBuilder for CoreTypeConcrete { | CoreTypeConcrete::Pedersen(_) | CoreTypeConcrete::Poseidon(_) | CoreTypeConcrete::RangeCheck96(_) - | CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::System(_)) // u64 is not complex + | CoreTypeConcrete::Starknet(StarknetTypeConcrete::System(_)) // u64 is not complex | CoreTypeConcrete::SegmentArena(_) => false, CoreTypeConcrete::Box(_) @@ -498,11 +499,11 @@ impl TypeBuilder for CoreTypeConcrete { CoreTypeConcrete::Felt252(_) | CoreTypeConcrete::Bytes31(_) - | CoreTypeConcrete::StarkNet( - StarkNetTypeConcrete::ClassHash(_) - | StarkNetTypeConcrete::ContractAddress(_) - | StarkNetTypeConcrete::StorageAddress(_) - | StarkNetTypeConcrete::StorageBaseAddress(_) + | CoreTypeConcrete::Starknet( + StarknetTypeConcrete::ClassHash(_) + | StarknetTypeConcrete::ContractAddress(_) + | StarknetTypeConcrete::StorageAddress(_) + | StarknetTypeConcrete::StorageBaseAddress(_) ) => { #[cfg(target_arch = "x86_64")] let value = true; @@ -535,13 +536,14 @@ impl TypeBuilder for CoreTypeConcrete { }, CoreTypeConcrete::Const(_) => native_panic!("todo: check Const is complex"), CoreTypeConcrete::Span(_) => native_panic!("todo: check Span is complex"), - CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::Secp256Point(_)) - | CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::Sha256StateHandle(_)) => native_panic!("todo: check Sha256StateHandle is complex"), + CoreTypeConcrete::Starknet(StarknetTypeConcrete::Secp256Point(_)) + | CoreTypeConcrete::Starknet(StarknetTypeConcrete::Sha256StateHandle(_)) => native_panic!("todo: check Sha256StateHandle is complex"), CoreTypeConcrete::Coupon(_) => false, CoreTypeConcrete::Circuit(info) => circuit::is_complex(info), - CoreTypeConcrete::IntRange(_info) => false + CoreTypeConcrete::IntRange(_info) => false, + CoreTypeConcrete::Blake(_info) => native_panic!("Implement is_complex for Blake type") }) } @@ -586,7 +588,7 @@ impl TypeBuilder for CoreTypeConcrete { | CoreTypeConcrete::Felt252Dict(_) | CoreTypeConcrete::Felt252DictEntry(_) | CoreTypeConcrete::SquashedFelt252Dict(_) - | CoreTypeConcrete::StarkNet(_) + | CoreTypeConcrete::Starknet(_) | CoreTypeConcrete::Nullable(_) => false, // Containers: @@ -626,6 +628,7 @@ impl TypeBuilder for CoreTypeConcrete { let type_info = registry.get_type(&info.ty)?; type_info.is_zst(registry)? } + CoreTypeConcrete::Blake(_info) => native_panic!("Implement is_zst for Blake type"), }) } @@ -700,20 +703,20 @@ impl TypeBuilder for CoreTypeConcrete { CoreTypeConcrete::Pedersen(_) => Layout::new::(), CoreTypeConcrete::Poseidon(_) => Layout::new::(), CoreTypeConcrete::Span(_) => native_panic!("todo: create layout for Span"), - CoreTypeConcrete::StarkNet(info) => match info { - StarkNetTypeConcrete::ClassHash(_) => get_integer_layout(252), - StarkNetTypeConcrete::ContractAddress(_) => get_integer_layout(252), - StarkNetTypeConcrete::StorageBaseAddress(_) => get_integer_layout(252), - StarkNetTypeConcrete::StorageAddress(_) => get_integer_layout(252), - StarkNetTypeConcrete::System(_) => Layout::new::<*mut ()>(), - StarkNetTypeConcrete::Secp256Point(_) => { + CoreTypeConcrete::Starknet(info) => match info { + StarknetTypeConcrete::ClassHash(_) => get_integer_layout(252), + StarknetTypeConcrete::ContractAddress(_) => get_integer_layout(252), + StarknetTypeConcrete::StorageBaseAddress(_) => get_integer_layout(252), + StarknetTypeConcrete::StorageAddress(_) => get_integer_layout(252), + StarknetTypeConcrete::System(_) => Layout::new::<*mut ()>(), + StarknetTypeConcrete::Secp256Point(_) => { get_integer_layout(256) .extend(get_integer_layout(256))? .0 .extend(get_integer_layout(1))? .0 } - StarkNetTypeConcrete::Sha256StateHandle(_) => Layout::new::<*mut ()>(), + StarknetTypeConcrete::Sha256StateHandle(_) => Layout::new::<*mut ()>(), }, CoreTypeConcrete::SegmentArena(_) => Layout::new::(), CoreTypeConcrete::Snapshot(info) => registry.get_type(&info.ty)?.layout(registry)?, @@ -736,6 +739,7 @@ impl TypeBuilder for CoreTypeConcrete { let inner = registry.get_type(&info.ty)?.layout(registry)?; inner.extend(inner)?.0 } + CoreTypeConcrete::Blake(_info) => native_panic!("Implement layout for Blake type"), } .pad_to_align()) } @@ -748,6 +752,9 @@ impl TypeBuilder for CoreTypeConcrete { // arguments. Ok(match self { CoreTypeConcrete::IntRange(_) => false, + CoreTypeConcrete::Blake(_info) => { + native_panic!("Implement is_memory_allocated for Blake type") + } CoreTypeConcrete::Array(_) => false, CoreTypeConcrete::Bitwise(_) => false, CoreTypeConcrete::Box(_) => false, @@ -810,7 +817,7 @@ impl TypeBuilder for CoreTypeConcrete { CoreTypeConcrete::Pedersen(_) => false, CoreTypeConcrete::Poseidon(_) => false, CoreTypeConcrete::Span(_) => false, - CoreTypeConcrete::StarkNet(_) => false, + CoreTypeConcrete::Starknet(_) => false, CoreTypeConcrete::SegmentArena(_) => false, CoreTypeConcrete::Snapshot(info) => { registry.get_type(&info.ty)?.is_memory_allocated(registry)? diff --git a/src/types/starknet.rs b/src/types/starknet.rs index f5f2b38450..c99a473631 100644 --- a/src/types/starknet.rs +++ b/src/types/starknet.rs @@ -33,7 +33,7 @@ use crate::{ use cairo_lang_sierra::{ extensions::{ core::{CoreLibfunc, CoreType}, - starknet::{secp256::Secp256PointTypeConcrete, StarkNetTypeConcrete}, + starknet::{secp256::Secp256PointTypeConcrete, StarknetTypeConcrete}, types::InfoOnlyConcreteType, }, program_registry::ProgramRegistry, @@ -55,52 +55,52 @@ pub fn build<'ctx>( module: &Module<'ctx>, registry: &ProgramRegistry, metadata: &mut MetadataStorage, - selector: WithSelf, + selector: WithSelf, ) -> Result> { match &*selector { - StarkNetTypeConcrete::ClassHash(info) => build_class_hash( + StarknetTypeConcrete::ClassHash(info) => build_class_hash( context, module, registry, metadata, WithSelf::new(selector.self_ty(), info), ), - StarkNetTypeConcrete::ContractAddress(info) => build_contract_address( + StarknetTypeConcrete::ContractAddress(info) => build_contract_address( context, module, registry, metadata, WithSelf::new(selector.self_ty(), info), ), - StarkNetTypeConcrete::StorageBaseAddress(info) => build_storage_base_address( + StarknetTypeConcrete::StorageBaseAddress(info) => build_storage_base_address( context, module, registry, metadata, WithSelf::new(selector.self_ty(), info), ), - StarkNetTypeConcrete::StorageAddress(info) => build_storage_address( + StarknetTypeConcrete::StorageAddress(info) => build_storage_address( context, module, registry, metadata, WithSelf::new(selector.self_ty(), info), ), - StarkNetTypeConcrete::System(info) => build_system( + StarknetTypeConcrete::System(info) => build_system( context, module, registry, metadata, WithSelf::new(selector.self_ty(), info), ), - StarkNetTypeConcrete::Secp256Point(info) => build_secp256_point( + StarknetTypeConcrete::Secp256Point(info) => build_secp256_point( context, module, registry, metadata, WithSelf::new(selector.self_ty(), info), ), - StarkNetTypeConcrete::Sha256StateHandle(info) => build_sha256_state_handle( + StarknetTypeConcrete::Sha256StateHandle(info) => build_sha256_state_handle( context, module, registry, diff --git a/src/utils.rs b/src/utils.rs index b05c1a3f96..43beaba058 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -495,7 +495,7 @@ pub mod test { compile_program( program_str, RootDatabase::builder() - .with_plugin_suite(starknet_plugin_suite()) + .with_default_plugin_suite(starknet_plugin_suite()) .build() .unwrap(), ) @@ -505,7 +505,7 @@ pub mod test { compile_contract( program_str, RootDatabase::builder() - .with_plugin_suite(starknet_plugin_suite()) + .with_default_plugin_suite(starknet_plugin_suite()) .build() .unwrap(), ) diff --git a/src/values.rs b/src/values.rs index 88961322fb..531a529069 100644 --- a/src/values.rs +++ b/src/values.rs @@ -16,7 +16,7 @@ use bumpalo::Bump; use cairo_lang_sierra::{ extensions::{ core::{CoreLibfunc, CoreType, CoreTypeConcrete}, - starknet::{secp256::Secp256PointTypeConcrete, StarkNetTypeConcrete}, + starknet::{secp256::Secp256PointTypeConcrete, StarknetTypeConcrete}, utils::Range, }, ids::ConcreteTypeId, @@ -911,21 +911,21 @@ impl Value { native_panic!("handled before: {:?}", type_id) } // Does it make sense for programs to return this? Should it be implemented - CoreTypeConcrete::StarkNet(selector) => match selector { - StarkNetTypeConcrete::ClassHash(_) - | StarkNetTypeConcrete::ContractAddress(_) - | StarkNetTypeConcrete::StorageBaseAddress(_) - | StarkNetTypeConcrete::StorageAddress(_) => { + CoreTypeConcrete::Starknet(selector) => match selector { + StarknetTypeConcrete::ClassHash(_) + | StarknetTypeConcrete::ContractAddress(_) + | StarknetTypeConcrete::StorageBaseAddress(_) + | StarknetTypeConcrete::StorageAddress(_) => { // felt values let data = ptr.cast::<[u8; 32]>().as_mut(); data[31] &= 0x0F; // Filter out first 4 bits (they're outside an i252). let data = Felt::from_bytes_le(data); Self::Felt252(data) } - StarkNetTypeConcrete::System(_) => { + StarknetTypeConcrete::System(_) => { native_panic!("should be handled before") } - StarkNetTypeConcrete::Secp256Point(info) => match info { + StarknetTypeConcrete::Secp256Point(info) => match info { Secp256PointTypeConcrete::K1(_) => { let data = ptr.cast::().as_ref(); Self::Secp256K1Point(*data) @@ -935,7 +935,7 @@ impl Value { Self::Secp256R1Point(*data) } }, - StarkNetTypeConcrete::Sha256StateHandle(_) => { + StarknetTypeConcrete::Sha256StateHandle(_) => { native_panic!("todo: implement Sha256StateHandle from_ptr") } }, @@ -998,6 +998,7 @@ impl Value { y: y.into(), } } + CoreTypeConcrete::Blake(_) => native_panic!("Implement from_ptr for Blake type"), } }) } diff --git a/tests/alexandria/Scarb.lock b/tests/alexandria/Scarb.lock index d69d332215..04f59cdf6d 100644 --- a/tests/alexandria/Scarb.lock +++ b/tests/alexandria/Scarb.lock @@ -12,8 +12,8 @@ dependencies = [ [[package]] name = "alexandria_bytes" -version = "0.1.0" -source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=74cafd429eef374730f2c6fed9a74753103c6fdb#74cafd429eef374730f2c6fed9a74753103c6fdb" +version = "0.5.0" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8#adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8" dependencies = [ "alexandria_data_structures", "alexandria_math", @@ -21,16 +21,13 @@ dependencies = [ [[package]] name = "alexandria_data_structures" -version = "0.2.0" -source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=74cafd429eef374730f2c6fed9a74753103c6fdb#74cafd429eef374730f2c6fed9a74753103c6fdb" -dependencies = [ - "alexandria_encoding", -] +version = "0.5.0" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8#adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8" [[package]] name = "alexandria_encoding" -version = "0.1.0" -source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=74cafd429eef374730f2c6fed9a74753103c6fdb#74cafd429eef374730f2c6fed9a74753103c6fdb" +version = "0.5.0" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8#adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8" dependencies = [ "alexandria_bytes", "alexandria_data_structures", @@ -40,13 +37,13 @@ dependencies = [ [[package]] name = "alexandria_math" -version = "0.2.1" -source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=74cafd429eef374730f2c6fed9a74753103c6fdb#74cafd429eef374730f2c6fed9a74753103c6fdb" +version = "0.5.0" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8#adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8" [[package]] name = "alexandria_numeric" -version = "0.1.0" -source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=74cafd429eef374730f2c6fed9a74753103c6fdb#74cafd429eef374730f2c6fed9a74753103c6fdb" +version = "0.5.0" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8#adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8" dependencies = [ "alexandria_math", "alexandria_searching", @@ -54,8 +51,8 @@ dependencies = [ [[package]] name = "alexandria_searching" -version = "0.1.0" -source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=74cafd429eef374730f2c6fed9a74753103c6fdb#74cafd429eef374730f2c6fed9a74753103c6fdb" +version = "0.5.0" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8#adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8" dependencies = [ "alexandria_data_structures", ] diff --git a/tests/alexandria/Scarb.toml b/tests/alexandria/Scarb.toml index cfe08728fc..bc0c222ea6 100644 --- a/tests/alexandria/Scarb.toml +++ b/tests/alexandria/Scarb.toml @@ -6,6 +6,6 @@ edition = "2024_07" # See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html [dependencies] -alexandria_math = { rev = "74cafd429eef374730f2c6fed9a74753103c6fdb", git = "https://github.com/keep-starknet-strange/alexandria.git" } -alexandria_data_structures = { rev = "74cafd429eef374730f2c6fed9a74753103c6fdb", git = "https://github.com/keep-starknet-strange/alexandria.git" } -alexandria_encoding = { rev = "74cafd429eef374730f2c6fed9a74753103c6fdb", git = "https://github.com/keep-starknet-strange/alexandria.git" } +alexandria_math = { rev = "adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8", git = "https://github.com/keep-starknet-strange/alexandria.git" } +alexandria_data_structures = { rev = "adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8", git = "https://github.com/keep-starknet-strange/alexandria.git" } +alexandria_encoding = { rev = "adf6c44f5c0f8a7fdca30ffb8f1cc79207cb4ae8", git = "https://github.com/keep-starknet-strange/alexandria.git" } diff --git a/tests/cases/stack.cairo b/tests/cases/stack.cairo index 191ddc1fac..7cd364ae00 100644 --- a/tests/cases/stack.cairo +++ b/tests/cases/stack.cairo @@ -1,6 +1,6 @@ use core::nullable::{NullableTrait}; use core::num::traits::Bounded; -use core::starknet::EthAddress; +use starknet::EthAddress; use core::dict::{Felt252Dict, Felt252DictTrait}; #[derive(Destruct, Default)] diff --git a/tests/common.rs b/tests/common.rs index d28b02aa74..3d43aa75d7 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -14,7 +14,7 @@ use cairo_lang_sierra::{ extensions::{ circuit::CircuitTypeConcrete, core::{CoreLibfunc, CoreType, CoreTypeConcrete}, - starknet::StarkNetTypeConcrete, + starknet::StarknetTypeConcrete, ConcreteType, }, ids::{ConcreteTypeId, FunctionId}, @@ -194,7 +194,7 @@ pub fn load_cairo_path(program_path: &str) -> (String, Program, SierraCasmRunner pub fn load_cairo_contract_path(path: &str) -> ContractClass { let mut db = RootDatabase::builder() .detect_corelib() - .with_plugin_suite(starknet_plugin_suite()) + .with_default_plugin_suite(starknet_plugin_suite()) .build() .expect("failed to build database"); @@ -766,7 +766,7 @@ pub fn compare_outputs( | CoreTypeConcrete::Pedersen(_) | CoreTypeConcrete::Poseidon(_) | CoreTypeConcrete::Coupon(_) - | CoreTypeConcrete::StarkNet(StarkNetTypeConcrete::System(_)) + | CoreTypeConcrete::Starknet(StarknetTypeConcrete::System(_)) | CoreTypeConcrete::SegmentArena(_) | CoreTypeConcrete::Circuit(CircuitTypeConcrete::AddMod(_)) | CoreTypeConcrete::Circuit(CircuitTypeConcrete::MulMod(_)) diff --git a/tests/tests/starknet/programs/secp256.cairo b/tests/tests/starknet/programs/secp256.cairo index daea83a7f5..2faa450b0e 100644 --- a/tests/tests/starknet/programs/secp256.cairo +++ b/tests/tests/starknet/programs/secp256.cairo @@ -1,4 +1,4 @@ -use core::starknet::{ +use starknet::{ secp256k1::{ Secp256k1Point, secp256k1_new_syscall, secp256k1_add_syscall, secp256k1_mul_syscall, secp256k1_get_point_from_x_syscall, secp256k1_get_xy_syscall, diff --git a/tests/tests/starknet/programs/syscalls.cairo b/tests/tests/starknet/programs/syscalls.cairo index 72d6d5266a..b4a15e5792 100644 --- a/tests/tests/starknet/programs/syscalls.cairo +++ b/tests/tests/starknet/programs/syscalls.cairo @@ -1,48 +1,53 @@ -use core::starknet::{ - call_contract_syscall, class_hash_const, contract_address_const, ContractAddress, +use starknet::{ + call_contract_syscall, ContractAddress, deploy_syscall, emit_event_syscall, ExecutionInfo, get_block_hash_syscall, keccak_syscall, library_call_syscall, replace_class_syscall, send_message_to_l1_syscall, storage_address_try_from_felt252, storage_read_syscall, storage_write_syscall, SyscallResult, testing::cheatcode, class_hash::ClassHash }; -use core::starknet::syscalls::get_execution_info_syscall; -use core::starknet::syscalls::get_execution_info_v2_syscall; -use core::starknet::syscalls::get_class_hash_at_syscall; +use starknet::syscalls::get_execution_info_syscall; +use starknet::syscalls::get_execution_info_v2_syscall; +use starknet::syscalls::get_class_hash_at_syscall; use core::sha256::{sha256_state_handle_init, sha256_state_handle_digest, SHA256_INITIAL_STATE}; use core::box::BoxTrait; -use core::starknet::SyscallResultTrait; +use starknet::SyscallResultTrait; + +const ZERO_CLASS_HASH: ClassHash = 0x0.try_into().unwrap(); + +const ZERO_CONTRACT_ADDRESS: ContractAddress = 0x0.try_into().unwrap(); +const TWO_CONTRACT_ADDRESS: ContractAddress = 0x2.try_into().unwrap(); fn get_block_hash() -> SyscallResult { get_block_hash_syscall(0) } fn get_class_hash_at() -> SyscallResult { - get_class_hash_at_syscall(contract_address_const::<2>()) + get_class_hash_at_syscall(TWO_CONTRACT_ADDRESS) } -fn get_execution_info() -> SyscallResult> { +fn get_execution_info() -> SyscallResult> { get_execution_info_syscall() } -fn get_execution_info_v2() -> SyscallResult> { +fn get_execution_info_v2() -> SyscallResult> { get_execution_info_v2_syscall() } fn deploy() -> SyscallResult<(ContractAddress, Span)> { - deploy_syscall(class_hash_const::<0>(), 0, array![].span(), false) + deploy_syscall(ZERO_CLASS_HASH, 0, array![].span(), false) } fn replace_class() -> SyscallResult<()> { - replace_class_syscall(class_hash_const::<0>()) + replace_class_syscall(ZERO_CLASS_HASH) } fn library_call() -> SyscallResult> { - library_call_syscall(class_hash_const::<0>(), 0, array![].span()) + library_call_syscall(ZERO_CLASS_HASH, 0, array![].span()) } fn call_contract() -> SyscallResult> { - call_contract_syscall(contract_address_const::<0>(), 0, array![].span()) + call_contract_syscall(ZERO_CONTRACT_ADDRESS, 0, array![].span()) } fn storage_read() -> felt252 { diff --git a/tests/tests/starknet/u256.rs b/tests/tests/starknet/u256.rs index 62295dfc65..26e95c5321 100644 --- a/tests/tests/starknet/u256.rs +++ b/tests/tests/starknet/u256.rs @@ -41,5 +41,5 @@ fn u256_test() { result.return_values, vec![Felt::from_hex("0xf70cba9bb86caa97b086fdfa3df602ed").unwrap()] ); - assert_eq!(result.remaining_gas, 18446744073709532255); + assert_eq!(result.remaining_gas, 18446744073709532215); }