diff --git a/Cargo.lock b/Cargo.lock index fdb085e494..4fa706dd36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -129,9 +129,15 @@ dependencies = [ [[package]] name = "anstyle" +<<<<<<< HEAD +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" +======= version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 [[package]] name = "anstyle-parse" @@ -163,9 +169,15 @@ dependencies = [ [[package]] name = "anyhow" +<<<<<<< HEAD +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +======= version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 [[package]] name = "aquamarine" @@ -178,7 +190,11 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -360,7 +376,11 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "synstructure", ] @@ -372,7 +392,11 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -562,7 +586,11 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -628,7 +656,11 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -645,7 +677,11 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -710,7 +746,11 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -890,7 +930,11 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -912,7 +956,11 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "which", ] @@ -933,7 +981,11 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -1374,7 +1426,11 @@ checksum = "d72f17373740f242d6995e896b9195c2cedff7e8b14e496afdd16b405039d1fb" dependencies = [ "cairo-lang-debug", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -1700,7 +1756,11 @@ dependencies = [ [[package]] name = "cairo-native" version = "0.2.0-alpha.4" +<<<<<<< HEAD +source = "git+https://github.com/lambdaclass/cairo_native?rev=da47a0fbafbab6b53725a582fef6173f342417e2#da47a0fbafbab6b53725a582fef6173f342417e2" +======= source = "git+https://github.com/lambdaclass/cairo_native?rev=acc3a3b8c38c5ae52bad56c3388bad660bfadca6#acc3a3b8c38c5ae52bad56c3388bad660bfadca6" +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 dependencies = [ "anyhow", "aquamarine", @@ -1753,13 +1813,21 @@ dependencies = [ [[package]] name = "cairo-native-runtime" version = "0.2.0-alpha.4" +<<<<<<< HEAD +source = "git+https://github.com/lambdaclass/cairo_native?rev=da47a0fbafbab6b53725a582fef6173f342417e2#da47a0fbafbab6b53725a582fef6173f342417e2" +======= source = "git+https://github.com/lambdaclass/cairo_native?rev=acc3a3b8c38c5ae52bad56c3388bad660bfadca6#acc3a3b8c38c5ae52bad56c3388bad660bfadca6" +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 dependencies = [ + "cairo-lang-sierra", "cairo-lang-sierra-gas", + "cairo-lang-utils", "itertools 0.13.0", "lazy_static", + "num-bigint 0.4.6", "num-traits 0.2.19", "rand 0.8.5", + "sierra-emu", "starknet-curve 0.5.1", "starknet-types-core", ] @@ -2000,7 +2068,11 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2432,7 +2504,11 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2480,7 +2556,11 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2502,7 +2582,11 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2624,7 +2708,11 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2634,7 +2722,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2647,7 +2739,11 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2667,7 +2763,11 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2762,7 +2862,11 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2843,7 +2947,11 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2929,7 +3037,11 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2960,7 +3072,11 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -2980,7 +3096,11 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -3156,7 +3276,11 @@ dependencies = [ "reqwest", "serde", "serde_json", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "toml", "walkdir", ] @@ -3174,7 +3298,11 @@ dependencies = [ "proc-macro2", "quote", "serde_json", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -3200,7 +3328,11 @@ dependencies = [ "serde", "serde_json", "strum 0.26.3", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "tempfile", "thiserror", "tiny-keccak", @@ -3664,7 +3796,11 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -3757,7 +3893,11 @@ checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -5428,7 +5568,11 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -5708,7 +5852,11 @@ dependencies = [ "proc-macro2", "quote", "regex", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "tblgen-alt", "unindent 0.2.3", ] @@ -5794,7 +5942,11 @@ checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -5903,7 +6055,11 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -6400,10 +6556,14 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -6499,7 +6659,11 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -6847,7 +7011,11 @@ dependencies = [ "papyrus_test_utils", "prometheus-parse", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "tracing", ] @@ -7225,7 +7393,11 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -7269,7 +7441,11 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -7463,7 +7639,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -7584,7 +7764,11 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -7642,7 +7826,11 @@ dependencies = [ "prost", "prost-types", "regex", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "tempfile", ] @@ -7656,7 +7844,11 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -8384,7 +8576,11 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -8602,7 +8798,11 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -8636,7 +8836,11 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -8727,15 +8931,30 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" +<<<<<<< HEAD +version = "1.0.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +======= version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" +<<<<<<< HEAD +version = "1.0.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +======= version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" @@ -8743,6 +8962,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -8753,7 +8973,11 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -8797,7 +9021,11 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -8845,7 +9073,11 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -9257,7 +9489,11 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -9734,7 +9970,11 @@ dependencies = [ "proc-macro2", "quote", "rustversion", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -9747,7 +9987,11 @@ dependencies = [ "proc-macro2", "quote", "rustversion", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -9789,9 +10033,15 @@ dependencies = [ [[package]] name = "syn" +<<<<<<< HEAD +version = "2.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +======= version = "2.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89275301d38033efb81a6e60e3497e734dfcc62571f2854bf4b16690398824c" +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 dependencies = [ "proc-macro2", "quote", @@ -9812,7 +10062,11 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -9928,7 +10182,11 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -9939,7 +10197,11 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "test-case-core", ] @@ -9962,7 +10224,11 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -9975,21 +10241,40 @@ dependencies = [ "proc-macro2", "quote", "regex", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "which", ] [[package]] name = "thiserror" +<<<<<<< HEAD +version = "1.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +======= version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d171f59dbaa811dbbb1aee1e73db92ec2b122911a48e1390dfe327a821ddede" +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" +<<<<<<< HEAD +version = "1.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +======= version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" @@ -9997,6 +10282,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -10142,7 +10428,11 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -10327,7 +10617,11 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -10410,7 +10704,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -10744,7 +11042,11 @@ dependencies = [ "once_cell", "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "wasm-bindgen-shared", ] @@ -10778,7 +11080,11 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -11273,7 +11579,11 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] @@ -11293,7 +11603,11 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", +<<<<<<< HEAD + "syn 2.0.85", +======= "syn 2.0.86", +>>>>>>> 71afaca0b2884e100ce4adc21f058493f4cee664 ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d861f2184b..fe9895b262 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,7 +81,8 @@ cairo-lang-sierra-to-casm = "2.8.4" cairo-lang-starknet-classes = "2.8.4" cairo-lang-utils = "2.8.4" # This is a temporary dependency, will be removed once the new version of cairo-native is released to main. -cairo-native = { git = "https://github.com/lambdaclass/cairo_native", rev = "acc3a3b8c38c5ae52bad56c3388bad660bfadca6" } +cairo-native = { git = "https://github.com/lambdaclass/cairo_native", rev = "99accfb34309ea70233666aa5e105022a0c921f3" } +sierra-emu = { git = "https://github.com/lambdaclass/sierra-emu.git" } cairo-vm = "1.0.1" camelpaste = "0.1.0" chrono = "0.4.26" @@ -171,7 +172,6 @@ serde_repr = "0.1.19" serde_yaml = "0.9.16" sha2 = "0.10.8" sha3 = "0.10.8" -sierra-emu = { git = "https://github.com/lambdaclass/sierra-emu.git" } simple_logger = "4.0.0" starknet-core = "0.6.0" starknet-crypto = "0.5.1" diff --git a/crates/blockifier/Cargo.toml b/crates/blockifier/Cargo.toml index 2bcd38b52a..e8339979a6 100644 --- a/crates/blockifier/Cargo.toml +++ b/crates/blockifier/Cargo.toml @@ -14,6 +14,7 @@ concurrency = [] jemalloc = ["dep:tikv-jemallocator"] testing = ["rand", "rstest"] use-sierra-emu = [] +with-trace-dump = ["cairo-native/with-trace-dump"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/blockifier/src/execution/native/entry_point_execution.rs b/crates/blockifier/src/execution/native/entry_point_execution.rs index dce0b1dd59..4a1f1adfa9 100644 --- a/crates/blockifier/src/execution/native/entry_point_execution.rs +++ b/crates/blockifier/src/execution/native/entry_point_execution.rs @@ -47,7 +47,83 @@ pub fn execute_entry_point_call( ); run_sierra_emu_executor(vm, function_id, call.clone()) } else { - run_native_executor(&contract_class.executor, call.entry_point_selector.0, call, syscall_handler) + #[cfg(feature = "with-trace-dump")] + { + use std::collections::HashMap; + use std::sync::atomic::AtomicUsize; + use std::sync::Mutex; + + use cairo_lang_sierra::program_registry::ProgramRegistry; + use cairo_native::runtime::trace_dump::TraceDump; + use cairo_native::types::TypeBuilder; + + // Since the library is statically linked, then dynamically loaded, each instance of + // `TRACE_DUMP` for each contract is separate (probably). That's why we need this + // getter and cannot use `cairo_native::runtime::TRACE_DUMP` directly. + let trace_dump = unsafe { + let fn_ptr = contract_class + .executor + .library + .get:: &'static Mutex>>( + b"get_trace_dump_ptr\0", + ) + .unwrap(); + + fn_ptr() + }; + let mut trace_dump = trace_dump.lock().unwrap(); + + static COUNTER: AtomicUsize = AtomicUsize::new(0); + let counter_value = COUNTER.fetch_add(1, std::sync::atomic::Ordering::Relaxed); + trace_dump.insert( + u64::try_from(counter_value).unwrap(), + TraceDump::new( + ProgramRegistry::new(&contract_class.program).unwrap(), + |x, registry| x.layout(registry).unwrap(), + ), + ); + + // Set the active trace id. + let trace_id_ref = unsafe { + contract_class + .executor + .library + .get::(b"TRACE_DUMP__TRACE_ID\0") + .unwrap() + .try_as_raw_ptr() + .unwrap() + .cast::() + .as_mut() + .unwrap() + }; + let old_trace_id = *trace_id_ref; + + *trace_id_ref = u64::try_from(counter_value).unwrap(); + + println!("Execution started for trace #{counter_value}."); + dbg!(trace_dump.keys().collect::>()); + + drop(trace_dump); + + let x = run_native_executor( + &contract_class.executor, + function_id, + call, + syscall_handler, + counter_value, + ); + + println!("Execution finished for trace #{counter_value}."); + + *trace_id_ref = old_trace_id; + + println!("Resetting to trace #{old_trace_id}."); + + x + } + + #[cfg(not(feature = "with-trace-dump"))] + run_native_executor(&contract_class.executor, function_id, call, syscall_handler) }; let execution_time = pre_execution_instant.elapsed().as_millis(); tracing::info!(time = execution_time, "native contract execution finished"); diff --git a/crates/blockifier/src/execution/native/utils.rs b/crates/blockifier/src/execution/native/utils.rs index ea76c4a80e..037813678f 100644 --- a/crates/blockifier/src/execution/native/utils.rs +++ b/crates/blockifier/src/execution/native/utils.rs @@ -51,15 +51,42 @@ pub fn run_native_executor( selector: Felt, call: CallEntryPoint, mut syscall_handler: NativeSyscallHandler<'_>, + #[cfg(feature = "with-trace-dump")] trace_id: usize, ) -> EntryPointExecutionResult { let execution_result = native_executor.run( selector, &call.calldata.0, Some(call.initial_gas.into()), - None, &mut syscall_handler, ); + #[cfg(feature = "with-trace-dump")] + #[allow(warnings)] + { + use std::sync::Mutex; + + use cairo_native::runtime::trace_dump::TraceDump; + + let trace = serde_json::to_string_pretty(&{ + let trace_dump = unsafe { + let fn_ptr = native_executor + .library + .get:: &'static Mutex>>( + b"get_trace_dump_ptr\0", + ) + .unwrap(); + + fn_ptr() + }; + let mut trace_dump = trace_dump.lock().unwrap(); + + trace_dump.remove(&u64::try_from(trace_id).unwrap()).unwrap().trace + }) + .unwrap(); + std::fs::create_dir_all("traces/native/").unwrap(); + std::fs::write(&format!("traces/native/trace_{}.json", trace_id), trace).unwrap(); + } + let run_result = match execution_result { Ok(res) if res.failure_flag => Err(EntryPointExecutionError::NativeExecutionError { info: if !res.return_values.is_empty() { @@ -101,6 +128,9 @@ pub fn run_sierra_emu_executor( std::fs::create_dir_all("traces/emu/").unwrap(); std::fs::write(format!("traces/emu/trace_{}.json", counter_value), trace).unwrap(); + std::fs::write(format!("traces/program_{}.sierra", counter_value), format!("{}", vm.program)) + .unwrap(); + if execution_result.failure_flag { Err(EntryPointExecutionError::NativeExecutionError { info: if !execution_result.return_values.is_empty() { @@ -130,8 +160,8 @@ fn create_callinfo( syscall_handler: NativeSyscallHandler<'_>, ) -> Result { let gas_consumed = { - let low: u64 = run_result.remaining_gas.try_into().unwrap(); - let high: u64 = (run_result.remaining_gas >> 64).try_into().unwrap(); + let low = u64::try_from(run_result.remaining_gas & u128::from(u64::MAX)).unwrap(); + let high = u64::try_from(run_result.remaining_gas >> 64).unwrap(); if high != 0 { return Err(EntryPointExecutionError::NativeExecutionError { info: "Overflow: gas consumed bigger than 64 bit".into(), @@ -170,8 +200,8 @@ pub fn create_callinfo_emu( accessed_storage_keys: HashSet, ) -> Result { let gas_consumed = { - let low: u64 = run_result.remaining_gas.try_into().unwrap(); - let high: u64 = (run_result.remaining_gas >> 64).try_into().unwrap(); + let low = u64::try_from(run_result.remaining_gas & u128::from(u64::MAX)).unwrap(); + let high = u64::try_from(run_result.remaining_gas >> 64).unwrap(); if high != 0 { return Err(EntryPointExecutionError::NativeExecutionError { info: "Overflow: gas consumed bigger than 64 bit".into(),