From 247a786193dc36ea7b095c0a662dc513613f8c85 Mon Sep 17 00:00:00 2001 From: Sorin Stanculeanu Date: Fri, 2 Aug 2024 13:37:27 +0300 Subject: [PATCH] Revert "Merge pull request #861 from multiversx/merge_rc17next1_into_rc172_2024.07.30" This reverts commit 1bbf7253fb0d20f458191ea9efdb7b40ed5d8559, reversing changes made to 791c302dcbd48ea5979db8ac1cf7bf727214d202. --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ vmhost/flags.go | 3 --- vmhost/hostCore/host.go | 5 ----- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index c5188845e..577d833a7 100644 --- a/go.mod +++ b/go.mod @@ -8,12 +8,12 @@ require ( github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 github.com/gogo/protobuf v1.3.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/multiversx/mx-chain-core-go v1.2.21 - github.com/multiversx/mx-chain-crypto-go v1.2.12 - github.com/multiversx/mx-chain-logger-go v1.0.15 - github.com/multiversx/mx-chain-scenario-go v1.4.5-0.20240730075009-580861ec046b - github.com/multiversx/mx-chain-storage-go v1.0.16 - github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240729085843-b5bdcbe337f9 + github.com/multiversx/mx-chain-core-go v1.2.21-0.20240725065431-6e9bfee5a4c6 + github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f + github.com/multiversx/mx-chain-logger-go v1.0.15-0.20240725065747-176bd697c775 + github.com/multiversx/mx-chain-scenario-go v1.4.4-0.20240725072925-89c927c8b6a6 + github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf + github.com/multiversx/mx-chain-vm-common-go v1.5.13-0.20240725072715-8806f1301087 github.com/multiversx/mx-components-big-int v1.0.0 github.com/pelletier/go-toml v1.9.3 github.com/stretchr/testify v1.8.1 diff --git a/go.sum b/go.sum index fc36cd0fd..2ab212384 100644 --- a/go.sum +++ b/go.sum @@ -83,18 +83,18 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiversx/mx-chain-core-go v1.2.21 h1:+XVKznPTlUU5EFS1A8chtS8fStW60upRIyF4Pgml19I= -github.com/multiversx/mx-chain-core-go v1.2.21/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE= -github.com/multiversx/mx-chain-crypto-go v1.2.12 h1:zWip7rpUS4CGthJxfKn5MZfMfYPjVjIiCID6uX5BSOk= -github.com/multiversx/mx-chain-crypto-go v1.2.12/go.mod h1:HzcPpCm1zanNct/6h2rIh+MFrlXbjA5C8+uMyXj3LI4= -github.com/multiversx/mx-chain-logger-go v1.0.15 h1:HlNdK8etyJyL9NQ+6mIXyKPEBo+wRqOwi3n+m2QIHXc= -github.com/multiversx/mx-chain-logger-go v1.0.15/go.mod h1:t3PRKaWB1M+i6gUfD27KXgzLJJC+mAQiN+FLlL1yoGQ= -github.com/multiversx/mx-chain-scenario-go v1.4.5-0.20240730075009-580861ec046b h1:u8T5KH/xQ2c7PSQPwEeBkOVXYGPbWn+HBalcGWt96bI= -github.com/multiversx/mx-chain-scenario-go v1.4.5-0.20240730075009-580861ec046b/go.mod h1:rf+svhT2ffjBhHQjZyoxkpla+x/nj+kwjo3QYBF9+f4= -github.com/multiversx/mx-chain-storage-go v1.0.16 h1:l2lJq+EAN3YwLbjJrnoKfFd1/1Xmo9DcAUECND2obLs= -github.com/multiversx/mx-chain-storage-go v1.0.16/go.mod h1:uM/z7YyqTOD3wgyH8TfapyEl5sb+7x/Jaxne4cfG4HI= -github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240729085843-b5bdcbe337f9 h1:8njAzsFUUAMkj7TxTT0Zco5h6LzCvTcZMioHYtySNyc= -github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240729085843-b5bdcbe337f9/go.mod h1:OSvFbzdWThfRbLZbUsEr7bikBSaLrPJQ2iUm9jw9nXQ= +github.com/multiversx/mx-chain-core-go v1.2.21-0.20240725065431-6e9bfee5a4c6 h1:Q7uUjTYTrt8Mw9oq5JWPv+WHhpxHTv6lhZZlhPuNcoQ= +github.com/multiversx/mx-chain-core-go v1.2.21-0.20240725065431-6e9bfee5a4c6/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE= +github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f h1:jydjrmVFvSllBOTppveOAkLITpOYKk0kma5z0bfDImI= +github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f/go.mod h1:9aSp//uBSvqFdzh4gvYISraoruhr1FCTXgPQalQ687k= +github.com/multiversx/mx-chain-logger-go v1.0.15-0.20240725065747-176bd697c775 h1:a8LOfz3p4MQfRtbF00rGDAJiebziwtSfVmBHIaHBDdY= +github.com/multiversx/mx-chain-logger-go v1.0.15-0.20240725065747-176bd697c775/go.mod h1:owPYyrK7RcsLx9eOCAZQ22fIyW6BE7ttJr4XIhFIbQw= +github.com/multiversx/mx-chain-scenario-go v1.4.4-0.20240725072925-89c927c8b6a6 h1:QGQjSlPix5nBtCkcdyKo0b2sRYXwYF/GBtccOqDbU6Y= +github.com/multiversx/mx-chain-scenario-go v1.4.4-0.20240725072925-89c927c8b6a6/go.mod h1:MvJiMtuyGq43aS9eOgF+xQUWk0hYxvCQqLrT77bhBaE= +github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf h1:L9K7Xzq5SZz6k55R7HrafiRcU+c8/PqozJxys65G4bI= +github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf/go.mod h1:ptvW/8r6bam55mVpeVZbyvvvydYM0DQwcPOH0W4Xyx8= +github.com/multiversx/mx-chain-vm-common-go v1.5.13-0.20240725072715-8806f1301087 h1:ovxs8X50iBL9TOkn0qHrkuXrBS1Y/EWfQOYmFEaXRNs= +github.com/multiversx/mx-chain-vm-common-go v1.5.13-0.20240725072715-8806f1301087/go.mod h1:nNGN+rdLRN8Nd6OhFGrkEZS5Ipj5IQCvFT0L/iQbOpU= github.com/multiversx/mx-components-big-int v1.0.0 h1:Wkr8lSzK2nDqixOrrBa47VNuqdhV1m/aJhaP1EMaiS8= github.com/multiversx/mx-components-big-int v1.0.0/go.mod h1:maIEMgHlNE2u78JaDD0oLzri+ShgU4okHfzP3LWGdQM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= diff --git a/vmhost/flags.go b/vmhost/flags.go index b329b1b6e..b9f4d008b 100644 --- a/vmhost/flags.go +++ b/vmhost/flags.go @@ -5,7 +5,4 @@ import "github.com/multiversx/mx-chain-core-go/core" const ( // CryptoOpcodesV2Flag defines the flag that activates the new crypto APIs for RC1.7 CryptoOpcodesV2Flag core.EnableEpochFlag = "CryptoOpcodesV2Flag" - - // MultiESDTNFTTransferAndExecuteByUserFlag defines the flag that activates the enshrined sovereign functions - MultiESDTNFTTransferAndExecuteByUserFlag core.EnableEpochFlag = "MultiESDTNFTTransferAndExecuteByUserFlag" ) diff --git a/vmhost/hostCore/host.go b/vmhost/hostCore/host.go index 8fe028ab5..8ba4ec040 100644 --- a/vmhost/hostCore/host.go +++ b/vmhost/hostCore/host.go @@ -40,7 +40,6 @@ const internalVMErrors = "internalVMErrors" // allFlags must have all flags used by mx-chain-vm-go in the current version var allFlags = []core.EnableEpochFlag{ vmhost.CryptoOpcodesV2Flag, - vmhost.MultiESDTNFTTransferAndExecuteByUserFlag, } // vmHost implements HostContext interface. @@ -545,10 +544,6 @@ func (host *vmHost) AreInSameShard(leftAddress []byte, rightAddress []byte) bool // IsAllowedToExecute returns true if the special opcode is allowed to be run by the address func (host *vmHost) IsAllowedToExecute(opcode string) bool { - if !host.enableEpochsHandler.IsFlagEnabled(vmhost.MultiESDTNFTTransferAndExecuteByUserFlag) { - return false - } - mapAddresses, ok := host.mapOpcodeAddressIsAllowed[opcode] if !ok { return false