From abe973a26b7e72aad1537628cb84621b1d961d56 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Thu, 18 Jul 2024 21:08:19 +0300 Subject: [PATCH 1/4] integration of executor v1.7.next1 --- Cargo.lock | 75 ++++++++++++++++---------------- framework/scenario/Cargo.toml | 4 +- vm/Cargo.toml | 4 +- vm/src/vm_hooks/vh_dispatcher.rs | 49 +++++++++++++++++++++ 4 files changed, 92 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 815470d026..5a348bfd06 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -378,15 +378,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "cc" -version = "1.0.104" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" +checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" [[package]] name = "cfg-if" @@ -431,9 +431,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.8" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -441,9 +441,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.8" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", @@ -1378,9 +1378,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -1413,9 +1413,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -1916,8 +1916,7 @@ dependencies = [ [[package]] name = "multiversx-chain-vm-executor" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" +source = "git+https://github.com/multiversx/mx-vm-executor-rs?branch=rc/v1.7.next1#95acf80fb611fb51a8b7e20f5e7086e4aae68539" [[package]] name = "multiversx-price-aggregator-sc" @@ -2718,9 +2717,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] @@ -2913,9 +2912,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" dependencies = [ "once_cell", "rustls-pki-types", @@ -3016,9 +3015,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -3029,9 +3028,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3078,18 +3077,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -3349,18 +3348,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -3369,9 +3368,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6b6a2fb3a985e99cebfaefa9faa3024743da73304ca1c683a36429613d3d22" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -3400,9 +3399,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.38.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", @@ -3464,9 +3463,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" dependencies = [ "indexmap", "serde", @@ -3486,9 +3485,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" dependencies = [ "indexmap", "serde", diff --git a/framework/scenario/Cargo.toml b/framework/scenario/Cargo.toml index e58e6d9255..25e43afdef 100644 --- a/framework/scenario/Cargo.toml +++ b/framework/scenario/Cargo.toml @@ -50,7 +50,9 @@ version = "0.22.3" path = "../../sdk/scenario-format" [dependencies.multiversx-chain-vm-executor] -version = "0.2.0" +# version = "0.2.0" +git = "https://github.com/multiversx/mx-vm-executor-rs" +branch = "rc/v1.7.next1" [dependencies.multiversx-chain-vm] version = "=0.9.0" diff --git a/vm/Cargo.toml b/vm/Cargo.toml index baf8ec3894..2da432d240 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -35,4 +35,6 @@ rand_seeder = { version= "0.2.2", optional = true } ed25519-dalek = { version = "1.0.1" , optional = true } [dependencies.multiversx-chain-vm-executor] -version = "0.2.0" +# version = "0.2.0" +git = "https://github.com/multiversx/mx-vm-executor-rs" +branch = "rc/v1.7.next1" diff --git a/vm/src/vm_hooks/vh_dispatcher.rs b/vm/src/vm_hooks/vh_dispatcher.rs index 0dbfc54051..46c5153819 100644 --- a/vm/src/vm_hooks/vh_dispatcher.rs +++ b/vm/src/vm_hooks/vh_dispatcher.rs @@ -1859,4 +1859,53 @@ impl VMHooks for VMHooksDispatcher { ) -> i32 { panic!("Unavailable: elliptic_curve_get_values") } + + fn is_reserved_function_name(&self, name_handle: i32) -> i32 { + panic!("Unavailable: is_reserved_function_name") + } + + fn managed_get_original_caller_addr(&self, destination_handle: i32) { + panic!("Unavailable: managed_get_original_caller_addr") + } + + fn managed_get_relayer_addr(&self, destination_handle: i32) { + panic!("Unavailable: managed_get_relayer_addr") + } + + fn managed_multi_transfer_esdt_nft_execute_by_user( + &self, + user_handle: i32, + dst_handle: i32, + token_transfers_handle: i32, + gas_limit: i64, + function_handle: i32, + arguments_handle: i32, + ) -> i32 { + panic!("Unavailable: managed_multi_transfer_esdt_nft_execute_by_user") + } + + fn managed_verify_secp256r1( + &self, + key_handle: i32, + message_handle: i32, + sig_handle: i32, + ) -> i32 { + panic!("Unavailable: managed_verify_secp256r1") + } + fn managed_verify_blssignature_share( + &self, + key_handle: i32, + message_handle: i32, + sig_handle: i32, + ) -> i32 { + panic!("Unavailable: managed_verify_blssignature_share") + } + fn managed_verify_blsaggregated_signature( + &self, + key_handle: i32, + message_handle: i32, + sig_handle: i32, + ) -> i32 { + panic!("Unavailable: managed_verify_blsaggregated_signature") + } } From 9eac9fd1f9e300c25d39eb99684ece8678956552 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Fri, 15 Nov 2024 09:54:08 +0200 Subject: [PATCH 2/4] cargo fmt --- chain/vm/src/vm_hooks/vh_dispatcher.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/vm/src/vm_hooks/vh_dispatcher.rs b/chain/vm/src/vm_hooks/vh_dispatcher.rs index 46c5153819..1af9bfbb6a 100644 --- a/chain/vm/src/vm_hooks/vh_dispatcher.rs +++ b/chain/vm/src/vm_hooks/vh_dispatcher.rs @@ -1883,7 +1883,7 @@ impl VMHooks for VMHooksDispatcher { ) -> i32 { panic!("Unavailable: managed_multi_transfer_esdt_nft_execute_by_user") } - + fn managed_verify_secp256r1( &self, key_handle: i32, From f6d62d14df7a9fe2c9fb40c94aa8bd91027c2491 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Fri, 15 Nov 2024 09:56:07 +0200 Subject: [PATCH 3/4] using multiversx-chain-vm-executor v0.3.0 --- Cargo.lock | 5 +++-- chain/vm/Cargo.toml | 4 +--- framework/scenario/Cargo.toml | 4 +--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95a73a2974..25a922d7a1 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -2428,8 +2428,9 @@ dependencies = [ [[package]] name = "multiversx-chain-vm-executor" -version = "0.2.0" -source = "git+https://github.com/multiversx/mx-vm-executor-rs?branch=rc/v1.7.next1#009e15459c023ec3b94fcebd826b381f7706229c" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51cce7ae386960fbf5e85afe40ca16d63f926f0620ed1a36b019212b28e17219" [[package]] name = "multiversx-price-aggregator-sc" diff --git a/chain/vm/Cargo.toml b/chain/vm/Cargo.toml index e412a709af..96d8b25926 100644 --- a/chain/vm/Cargo.toml +++ b/chain/vm/Cargo.toml @@ -39,6 +39,4 @@ version = "=0.11.0" path = "../core" [dependencies.multiversx-chain-vm-executor] -# version = "0.2.0" -git = "https://github.com/multiversx/mx-vm-executor-rs" -branch = "rc/v1.7.next1" +version = "0.3.0" diff --git a/framework/scenario/Cargo.toml b/framework/scenario/Cargo.toml index c019233953..a0982451ca 100644 --- a/framework/scenario/Cargo.toml +++ b/framework/scenario/Cargo.toml @@ -50,9 +50,7 @@ version = "0.23.0" path = "../../sdk/scenario-format" [dependencies.multiversx-chain-vm-executor] -# version = "0.2.0" -git = "https://github.com/multiversx/mx-vm-executor-rs" -branch = "rc/v1.7.next1" +version = "0.3.0" [dependencies.multiversx-chain-vm] version = "=0.11.0" From 57a580b741c5e09f4e2c415c198882f61c1419e8 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Fri, 15 Nov 2024 10:06:45 +0200 Subject: [PATCH 4/4] EI version comment --- framework/meta-lib/src/ei/ei_version.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/meta-lib/src/ei/ei_version.rs b/framework/meta-lib/src/ei/ei_version.rs index 6ba2444a6e..33fe86e254 100644 --- a/framework/meta-lib/src/ei/ei_version.rs +++ b/framework/meta-lib/src/ei/ei_version.rs @@ -29,7 +29,7 @@ pub enum EIVersion { #[default] V1_3, - /// Version to be released to mainnet in August 2024. + /// Hooks made available in the Spica release, November 12, 2024: https://multiversx.com/release/release-spica-v1-8-4-0 V1_4, /// Version planned for Q3 2024.