diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml index 13d37a37..ae0d30c7 100644 --- a/.github/workflows/deploy-website.yml +++ b/.github/workflows/deploy-website.yml @@ -12,7 +12,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: read diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1fb4b87..4be18639 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ on: jobs: build-and-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout diff --git a/.github/workflows/release-scenexec.yml b/.github/workflows/release-scenexec.yml index d6901a66..4e97b851 100644 --- a/.github/workflows/release-scenexec.yml +++ b/.github/workflows/release-scenexec.yml @@ -10,9 +10,9 @@ jobs: build: strategy: matrix: - os: [ubuntu-20.04, macos-12] + os: [ubuntu-22.04, macos-12] include: - - os: ubuntu-20.04 + - os: ubuntu-22.04 wasmer_lib: libwasmer_linux_amd64.so wasmer2_lib: libvmexeccapi.so flags: -ldflags "-extldflags '-Wl,-rpath,\$ORIGIN'" @@ -56,7 +56,7 @@ jobs: strategy: matrix: - os: [ubuntu-20.04, macos-12] + os: [ubuntu-22.04, macos-12] runs-on: ${{ matrix.os }} @@ -75,7 +75,7 @@ jobs: release: needs: test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Download binaries diff --git a/.github/workflows/release-xsuite-fullsimulnet.yml b/.github/workflows/release-xsuite-fullsimulnet.yml index 67b1889c..32778393 100644 --- a/.github/workflows/release-xsuite-fullsimulnet.yml +++ b/.github/workflows/release-xsuite-fullsimulnet.yml @@ -7,7 +7,7 @@ jobs: build: strategy: matrix: - os: [macos-12, ubuntu-20.04] + os: [macos-12, ubuntu-22.04] runs-on: ${{ matrix.os }} @@ -40,7 +40,7 @@ jobs: strategy: matrix: - os: [macos-12, ubuntu-20.04] + os: [macos-12, ubuntu-22.04] runs-on: ${{ matrix.os }} @@ -63,7 +63,7 @@ jobs: publish: needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout diff --git a/.github/workflows/release-xsuite-lightsimulnet.yml b/.github/workflows/release-xsuite-lightsimulnet.yml index 6a26e0cf..d639c389 100644 --- a/.github/workflows/release-xsuite-lightsimulnet.yml +++ b/.github/workflows/release-xsuite-lightsimulnet.yml @@ -7,7 +7,7 @@ jobs: build: strategy: matrix: - os: [macos-12, ubuntu-20.04] + os: [macos-12, ubuntu-22.04] runs-on: ${{ matrix.os }} @@ -40,7 +40,7 @@ jobs: strategy: matrix: - os: [macos-12, ubuntu-20.04] + os: [macos-12, ubuntu-22.04] runs-on: ${{ matrix.os }} @@ -63,7 +63,7 @@ jobs: publish: needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout diff --git a/.github/workflows/release-xsuite.yml b/.github/workflows/release-xsuite.yml index b1b70cc5..ead6915d 100644 --- a/.github/workflows/release-xsuite.yml +++ b/.github/workflows/release-xsuite.yml @@ -5,7 +5,7 @@ on: jobs: build-and-publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout diff --git a/xsuite-fullsimulnet/build-binary.mjs b/xsuite-fullsimulnet/build-binary.mjs index cfd5bf1a..e60a877a 100644 --- a/xsuite-fullsimulnet/build-binary.mjs +++ b/xsuite-fullsimulnet/build-binary.mjs @@ -10,5 +10,5 @@ if (process.env.CI) { ]); } -await $`GOBIN="$(pwd)" go install -ldflags ${argv.ldflags} github.com/multiversx/mx-chain-simulator-go/cmd/chainsimulator@v1.7.13-patch2-fix1`; +await $`GOBIN="$(pwd)" go install -ldflags ${argv.ldflags} github.com/multiversx/mx-chain-simulator-go/cmd/chainsimulator@v1.8.4-fix1`; await $`mv ./chainsimulator ../xsuite-fullsimulnet-${argv.os}-${argv.arch}/bin/fsproxy`; diff --git a/xsuite-fullsimulnet/config/node/config/config.toml b/xsuite-fullsimulnet/config/node/config/config.toml index 0ca25114..6e1205d5 100644 --- a/xsuite-fullsimulnet/config/node/config/config.toml +++ b/xsuite-fullsimulnet/config/node/config/config.toml @@ -672,7 +672,11 @@ TimeOutForSCExecutionInMilliseconds = 10000 # 10 seconds = 10000 milliseconds WasmerSIGSEGVPassthrough = false # must be false for release WasmVMVersions = [ - { StartEpoch = 0, Version = "v1.5" }, # TODO: set also the RoundActivations.DisableAsyncCallV1 accordingly + { StartEpoch = 0, Version = "v1.4" }, + { StartEpoch = 1, Version = "v1.5" }, # TODO: set also the RoundActivations.DisableAsyncCallV1 accordingly + ] + TransferAndExecuteByUserAddresses = [ # TODO: set real contract addresses for all shards + "erd1qqqqqqqqqqqqqpgqr46jrxr6r2unaqh75ugd308dwx5vgnhwh47qtvepe3", #shard 0 ] [VirtualMachine.Querying] @@ -680,7 +684,11 @@ TimeOutForSCExecutionInMilliseconds = 10000 # 10 seconds = 10000 milliseconds WasmerSIGSEGVPassthrough = false # must be false for release WasmVMVersions = [ - { StartEpoch = 0, Version = "v1.5" }, # TODO: set also the RoundActivations.DisableAsyncCallV1 accordingly + { StartEpoch = 0, Version = "v1.4" }, + { StartEpoch = 1, Version = "v1.5" }, # TODO: set also the RoundActivations.DisableAsyncCallV1 accordingly + ] + TransferAndExecuteByUserAddresses = [ # TODO: set real contract addresses for all shards + "erd1qqqqqqqqqqqqqpgqr46jrxr6r2unaqh75ugd308dwx5vgnhwh47qtvepe3", ] [VirtualMachine.GasConfig] diff --git a/xsuite-fullsimulnet/config/node/config/enableEpochs.toml b/xsuite-fullsimulnet/config/node/config/enableEpochs.toml index dce2d48b..9ca2083a 100644 --- a/xsuite-fullsimulnet/config/node/config/enableEpochs.toml +++ b/xsuite-fullsimulnet/config/node/config/enableEpochs.toml @@ -309,6 +309,30 @@ # AlwaysMergeContextsInEEIEnableEpoch represents the epoch in which the EEI will always merge the contexts AlwaysMergeContextsInEEIEnableEpoch = 1 + # UseGasBoundedShouldFailExecutionEnableEpoch represents the epoch when use bounded gas function should fail execution in case of error + UseGasBoundedShouldFailExecutionEnableEpoch = 1 + + # DynamicESDTEnableEpoch represents the epoch when dynamic NFT feature is enabled + DynamicESDTEnableEpoch = 4 + + # EGLDInMultiTransferEnableEpoch represents the epoch when EGLD in multitransfer is enabled + EGLDInMultiTransferEnableEpoch = 4 + + # CryptoOpcodesV2EnableEpoch represents the epoch when BLSMultiSig, Secp256r1 and other opcodes are enabled + CryptoOpcodesV2EnableEpoch = 4 + + # UnjailCleanupEnableEpoch represents the epoch when the cleanup of the unjailed nodes is enabled + UnJailCleanupEnableEpoch = 4 + + # FixRelayedBaseCostEnableEpoch represents the epoch when the fix for relayed base cost will be enabled + FixRelayedBaseCostEnableEpoch = 4 + + # MultiESDTNFTTransferAndExecuteByUserEnableEpoch represents the epoch when enshrined sovereign cross chain opcodes are enabled + MultiESDTNFTTransferAndExecuteByUserEnableEpoch = 9999999 + + # FixRelayedMoveBalanceToNonPayableSCEnableEpoch represents the epoch when the fix for relayed move balance to non payable sc will be enabled + FixRelayedMoveBalanceToNonPayableSCEnableEpoch = 4 + # BLSMultiSignerEnableEpoch represents the activation epoch for different types of BLS multi-signers BLSMultiSignerEnableEpoch = [ { EnableEpoch = 0, Type = "no-KOSK" }, diff --git a/xsuite-fullsimulnet/config/node/config/external.toml b/xsuite-fullsimulnet/config/node/config/external.toml index 1058e0c3..6fbbbb19 100644 --- a/xsuite-fullsimulnet/config/node/config/external.toml +++ b/xsuite-fullsimulnet/config/node/config/external.toml @@ -51,7 +51,7 @@ # URL for the WebSocket client/server connection # This value represents the IP address and port number that the WebSocket client or server will use to establish a connection. - URL = "127.0.0.1:22111" + URL = "ws://127.0.0.1:22111" # After a message will be sent it will wait for an ack message if this flag is enabled WithAcknowledge = true diff --git a/xsuite-fullsimulnet/config/node/config/fullArchiveP2P.toml b/xsuite-fullsimulnet/config/node/config/fullArchiveP2P.toml index 6e9010a4..927eb0eb 100644 --- a/xsuite-fullsimulnet/config/node/config/fullArchiveP2P.toml +++ b/xsuite-fullsimulnet/config/node/config/fullArchiveP2P.toml @@ -49,9 +49,12 @@ # RefreshIntervalInSec represents the time in seconds between querying for new peers RefreshIntervalInSec = 10 - # ProtocolID represents the protocol that this node will advertize to other peers - # To connect to other nodes, those nodes should have the same ProtocolID string - ProtocolID = "/erd/kad/1.0.0" + # ProtocolIDs represents the protocols that this node will advertise to other peers + # To connect to other nodes, those nodes should have at least one common protocol string + ProtocolIDs = [ + "/erd/kad/1.0.0", + "mvx-full-archive", + ] # InitialPeerList represents the list of strings of some known nodes that will bootstrap this node # The address will be in a self-describing addressing format. diff --git a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV1.toml b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV1.toml index 52175a22..7fca1d6a 100644 --- a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV1.toml +++ b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV1.toml @@ -15,6 +15,11 @@ ESDTNFTAddUri = 500000 ESDTNFTUpdateAttributes = 500000 ESDTNFTMultiTransfer = 1000000 + ESDTModifyRoyalties = 500000 + ESDTModifyCreator = 500000 + ESDTNFTRecreate = 1000000 + ESDTNFTUpdate = 1000000 + ESDTNFTSetNewURIs = 500000 SetGuardian = 250000 GuardAccount = 250000 UnGuardAccount = 250000 @@ -107,6 +112,7 @@ GetCallbackClosure = 10000 GetCodeMetadata = 10000 IsBuiltinFunction = 10000 + IsReservedFunctionName = 10000 [EthAPICost] UseGas = 100 @@ -206,6 +212,9 @@ UnmarshalCompressedECC = 270000 GenerateKeyECC = 7000000 EncodeDERSig = 10000000 + VerifySecp256r1 = 2000000 + VerifyBLSSignatureShare = 2000000 + VerifyBLSMultiSig = 2000000 [ManagedBufferAPICost] MBufferNew = 2000 diff --git a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV2.toml b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV2.toml index 38157aeb..bfc53d1b 100644 --- a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV2.toml +++ b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV2.toml @@ -15,6 +15,11 @@ ESDTNFTAddUri = 500000 ESDTNFTUpdateAttributes = 500000 ESDTNFTMultiTransfer = 1000000 + ESDTModifyRoyalties = 500000 + ESDTModifyCreator = 500000 + ESDTNFTRecreate = 1000000 + ESDTNFTUpdate = 1000000 + ESDTNFTSetNewURIs = 500000 SetGuardian = 250000 GuardAccount = 250000 UnGuardAccount = 250000 @@ -107,6 +112,7 @@ GetCallbackClosure = 10000 GetCodeMetadata = 10000 IsBuiltinFunction = 10000 + IsReservedFunctionName = 10000 [EthAPICost] UseGas = 100 @@ -206,6 +212,9 @@ UnmarshalCompressedECC = 270000 GenerateKeyECC = 7000000 EncodeDERSig = 10000000 + VerifySecp256r1 = 2000000 + VerifyBLSSignatureShare = 2000000 + VerifyBLSMultiSig = 2000000 [ManagedBufferAPICost] MBufferNew = 2000 diff --git a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV3.toml b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV3.toml index 3767f028..eb88204b 100644 --- a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV3.toml +++ b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV3.toml @@ -15,6 +15,11 @@ ESDTNFTAddUri = 500000 ESDTNFTUpdateAttributes = 500000 ESDTNFTMultiTransfer = 1000000 + ESDTModifyRoyalties = 500000 + ESDTModifyCreator = 500000 + ESDTNFTRecreate = 1000000 + ESDTNFTUpdate = 1000000 + ESDTNFTSetNewURIs = 500000 SetGuardian = 250000 GuardAccount = 250000 UnGuardAccount = 250000 @@ -107,6 +112,7 @@ GetCallbackClosure = 10000 GetCodeMetadata = 10000 IsBuiltinFunction = 10000 + IsReservedFunctionName = 10000 [EthAPICost] UseGas = 100 @@ -206,6 +212,9 @@ UnmarshalCompressedECC = 270000 GenerateKeyECC = 7000000 EncodeDERSig = 10000000 + VerifySecp256r1 = 2000000 + VerifyBLSSignatureShare = 2000000 + VerifyBLSMultiSig = 2000000 [ManagedBufferAPICost] MBufferNew = 2000 diff --git a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV4.toml b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV4.toml index f7d8e3a0..f41a7a8d 100644 --- a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV4.toml +++ b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV4.toml @@ -15,6 +15,11 @@ ESDTNFTAddUri = 50000 ESDTNFTUpdateAttributes = 50000 ESDTNFTMultiTransfer = 200000 + ESDTModifyRoyalties = 500000 + ESDTModifyCreator = 500000 + ESDTNFTRecreate = 1000000 + ESDTNFTUpdate = 1000000 + ESDTNFTSetNewURIs = 500000 SetGuardian = 250000 GuardAccount = 250000 UnGuardAccount = 250000 @@ -107,6 +112,7 @@ GetCallbackClosure = 10000 GetCodeMetadata = 10000 IsBuiltinFunction = 10000 + IsReservedFunctionName = 10000 [EthAPICost] UseGas = 100 @@ -206,6 +212,9 @@ UnmarshalCompressedECC = 270000 GenerateKeyECC = 7000000 EncodeDERSig = 10000000 + VerifySecp256r1 = 2000000 + VerifyBLSSignatureShare = 2000000 + VerifyBLSMultiSig = 2000000 [ManagedBufferAPICost] MBufferNew = 2000 diff --git a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV5.toml b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV5.toml index 9e2b3ae7..34b4336b 100644 --- a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV5.toml +++ b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV5.toml @@ -15,6 +15,11 @@ ESDTNFTAddUri = 50000 ESDTNFTUpdateAttributes = 50000 ESDTNFTMultiTransfer = 200000 + ESDTModifyRoyalties = 500000 + ESDTModifyCreator = 500000 + ESDTNFTRecreate = 1000000 + ESDTNFTUpdate = 1000000 + ESDTNFTSetNewURIs = 500000 SetGuardian = 250000 GuardAccount = 250000 UnGuardAccount = 250000 @@ -107,6 +112,7 @@ GetCallbackClosure = 10000 GetCodeMetadata = 10000 IsBuiltinFunction = 10000 + IsReservedFunctionName = 10000 [EthAPICost] UseGas = 100 @@ -206,6 +212,9 @@ UnmarshalCompressedECC = 270000 GenerateKeyECC = 7000000 EncodeDERSig = 10000000 + VerifySecp256r1 = 2000000 + VerifyBLSSignatureShare = 2000000 + VerifyBLSMultiSig = 2000000 [ManagedBufferAPICost] MBufferNew = 2000 diff --git a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV6.toml b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV6.toml index 82c658a1..99ff15c8 100644 --- a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV6.toml +++ b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV6.toml @@ -15,6 +15,11 @@ ESDTNFTAddUri = 50000 ESDTNFTUpdateAttributes = 50000 ESDTNFTMultiTransfer = 200000 + ESDTModifyRoyalties = 500000 + ESDTModifyCreator = 500000 + ESDTNFTRecreate = 1000000 + ESDTNFTUpdate = 1000000 + ESDTNFTSetNewURIs = 500000 SetGuardian = 250000 GuardAccount = 250000 UnGuardAccount = 250000 @@ -107,6 +112,7 @@ GetCallbackClosure = 10000 GetCodeMetadata = 10000 IsBuiltinFunction = 10000 + IsReservedFunctionName = 10000 [EthAPICost] UseGas = 100 @@ -206,6 +212,9 @@ UnmarshalCompressedECC = 270000 GenerateKeyECC = 7000000 EncodeDERSig = 10000000 + VerifySecp256r1 = 2000000 + VerifyBLSSignatureShare = 2000000 + VerifyBLSMultiSig = 2000000 [ManagedBufferAPICost] MBufferNew = 2000 diff --git a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV7.toml b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV7.toml index f3930be8..250d8911 100644 --- a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV7.toml +++ b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV7.toml @@ -16,6 +16,11 @@ ESDTNFTUpdateAttributes = 50000 ESDTNFTMultiTransfer = 200000 MultiESDTNFTTransfer = 200000 # should be the same value with the ESDTNFTMultiTransfer + ESDTModifyRoyalties = 500000 + ESDTModifyCreator = 500000 + ESDTNFTRecreate = 1000000 + ESDTNFTUpdate = 1000000 + ESDTNFTSetNewURIs = 500000 SetGuardian = 250000 GuardAccount = 250000 UnGuardAccount = 250000 @@ -108,6 +113,7 @@ GetCallbackClosure = 10000 GetCodeMetadata = 10000 IsBuiltinFunction = 10000 + IsReservedFunctionName = 10000 [EthAPICost] UseGas = 100 @@ -207,6 +213,9 @@ UnmarshalCompressedECC = 270000 GenerateKeyECC = 7000000 EncodeDERSig = 10000000 + VerifySecp256r1 = 2000000 + VerifyBLSSignatureShare = 2000000 + VerifyBLSMultiSig = 2000000 [ManagedBufferAPICost] MBufferNew = 2000 diff --git a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV8.toml b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV8.toml index 3f30d694..7a0c11de 100644 --- a/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV8.toml +++ b/xsuite-fullsimulnet/config/node/config/gasSchedules/gasScheduleV8.toml @@ -16,6 +16,11 @@ ESDTNFTUpdateAttributes = 50000 ESDTNFTMultiTransfer = 200000 MultiESDTNFTTransfer = 200000 # should be the same value with the ESDTNFTMultiTransfer + ESDTModifyRoyalties = 500000 + ESDTModifyCreator = 500000 + ESDTNFTRecreate = 1000000 + ESDTNFTUpdate = 1000000 + ESDTNFTSetNewURIs = 500000 SetGuardian = 250000 GuardAccount = 250000 UnGuardAccount = 250000 @@ -108,6 +113,7 @@ GetCallbackClosure = 10000 GetCodeMetadata = 10000 IsBuiltinFunction = 10000 + IsReservedFunctionName = 10000 [EthAPICost] UseGas = 100 @@ -190,23 +196,26 @@ CopyPerByteForTooBig = 1000 [CryptoAPICost] - SHA256 = 1000000 - Keccak256 = 1000000 - Ripemd160 = 1000000 - VerifyBLS = 5000000 - VerifyEd25519 = 2000000 - VerifySecp256k1 = 2000000 - EllipticCurveNew = 10000 - AddECC = 75000 - DoubleECC = 65000 - IsOnCurveECC = 10000 - ScalarMultECC = 400000 - MarshalECC = 13000 - MarshalCompressedECC = 15000 - UnmarshalECC = 20000 - UnmarshalCompressedECC = 270000 - GenerateKeyECC = 7000000 - EncodeDERSig = 10000000 + SHA256 = 1000000 + Keccak256 = 1000000 + Ripemd160 = 1000000 + VerifyBLS = 5000000 + VerifyEd25519 = 2000000 + VerifySecp256k1 = 2000000 + EllipticCurveNew = 10000 + AddECC = 75000 + DoubleECC = 65000 + IsOnCurveECC = 10000 + ScalarMultECC = 400000 + MarshalECC = 13000 + MarshalCompressedECC = 15000 + UnmarshalECC = 20000 + UnmarshalCompressedECC = 270000 + GenerateKeyECC = 7000000 + EncodeDERSig = 10000000 + VerifySecp256r1 = 2000000 + VerifyBLSSignatureShare = 2000000 + VerifyBLSMultiSig = 2000000 [ManagedBufferAPICost] MBufferNew = 2000 diff --git a/xsuite-fullsimulnet/config/node/config/p2p.toml b/xsuite-fullsimulnet/config/node/config/p2p.toml index 519b7684..5d08f4be 100644 --- a/xsuite-fullsimulnet/config/node/config/p2p.toml +++ b/xsuite-fullsimulnet/config/node/config/p2p.toml @@ -49,9 +49,12 @@ # RefreshIntervalInSec represents the time in seconds between querying for new peers RefreshIntervalInSec = 10 - # ProtocolID represents the protocol that this node will advertize to other peers - # To connect to other nodes, those nodes should have the same ProtocolID string - ProtocolID = "/erd/kad/1.0.0" + # ProtocolIDs represents the protocols that this node will advertise to other peers + # To connect to other nodes, those nodes should have at least one common protocol string + ProtocolIDs = [ + "/erd/kad/1.0.0", + "mvx-main", + ] # InitialPeerList represents the list of strings of some known nodes that will bootstrap this node # The address will be in a self-describing addressing format. diff --git a/xsuite-fullsimulnet/config/node/config/prefs.toml b/xsuite-fullsimulnet/config/node/config/prefs.toml index 47a43922..8f3a2343 100644 --- a/xsuite-fullsimulnet/config/node/config/prefs.toml +++ b/xsuite-fullsimulnet/config/node/config/prefs.toml @@ -38,18 +38,22 @@ # so that certain config values need to remain the same during upgrades. # (for example, an Elasticsearch user wants external.toml->ElasticSearchConnector.Enabled to remain true all the time during upgrades, while the default # configuration of the node has the false value) - # The Path indicates what value to change, while Value represents the new value in string format. The node operator must make sure - # to follow the same type of the original value (ex: uint32: "37", float32: "37.0", bool: "true") + # The Path indicates what value to change, while Value represents the new value. The node operator must make sure + # to follow the same type of the original value (ex: uint32: 37, float32: 37.0, bool: true) + # Also, the Value can be a struct (ex: { StartEpoch = 0, Version = "1.5" }) or an array (ex: [{ StartEpoch = 0, Version = "1.4" }, { StartEpoch = 1, Version = "1.5" }]) # File represents the file name that holds the configuration. Currently, the supported files are: # api.toml, config.toml, economics.toml, enableEpochs.toml, enableRounds.toml, external.toml, fullArchiveP2P.toml, p2p.toml, ratings.toml, systemSmartContractsConfig.toml # ------------------------------- # Un-comment and update the following section in order to enable config values overloading # ------------------------------- # OverridableConfigTomlValues = [ - # { File = "config.toml", Path = "StoragePruning.NumEpochsToKeep", Value = "4" }, - # { File = "config.toml", Path = "MiniBlocksStorage.Cache.Name", Value = "MiniBlocksStorage" }, - # { File = "external.toml", Path = "ElasticSearchConnector.Enabled", Value = "true" } - #] + # { File = "config.toml", Path = "StoragePruning.NumEpochsToKeep", Value = 4 }, + # { File = "config.toml", Path = "MiniBlocksStorage.Cache.Name", Value = "MiniBlocksStorage" }, + # { File = "external.toml", Path = "ElasticSearchConnector.Enabled", Value = true }, + # { File = "external.toml", Path = "HostDriversConfig", Value = [ + # { Enabled = false, URL = "127.0.0.1:22111" }, + # ] }, + # ] # BlockProcessingCutoff can be used to stop processing blocks at a certain round, nonce or epoch. # This can be useful for snapshotting different stuff and also for debugging purposes. diff --git a/xsuite-fullsimulnet/config/nodeOverride.toml b/xsuite-fullsimulnet/config/nodeOverride.toml index abb1d7d3..4f8b433b 100644 --- a/xsuite-fullsimulnet/config/nodeOverride.toml +++ b/xsuite-fullsimulnet/config/nodeOverride.toml @@ -10,99 +10,108 @@ # Un-comment and update the following section in order to enable config values overloading # ------------------------------- OverridableConfigTomlValues = [ - { File = "enableEpochs.toml", Path = "EnableEpochs.SCDeployEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.BuiltInFunctionsEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RelayedTransactionsEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.PenalizedTooMuchGasEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SwitchJailWaitingEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.BelowSignedThresholdEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SwitchHysteresisForMinNodesEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.TransactionSignedWithTxHashEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.MetaProtectionEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.AheadOfTimeGasUsageEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.GasPriceModifierEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RepairCallbackEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.BlockGasAndFeesReCheckEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.BalanceWaitingListsEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ReturnDataToLastTransferEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SenderInOutTransferEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.StakeEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.StakingV2EnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.DoubleKeyProtectionEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.GovernanceEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.DelegationManagerEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.DelegationSmartContractEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CorrectLastUnjailedEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RelayedTransactionsV2EnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.UnbondTokensV2EnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SaveJailedAlwaysEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ReDelegateBelowMinCheckEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ValidatorToDelegationEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.IncrementSCRNonceInMultiTransferEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTMultiTransferEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.GlobalMintBurnDisableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTTransferRoleEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ComputeRewardCheckpointEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SCRSizeInvariantCheckEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.BackwardCompSaveKeyValueEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTNFTCreateOnMultiShardEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.MetaESDTSetEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.AddTokensToDelegationEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.MultiESDTTransferFixOnCallBackOnEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.OptimizeGasUsedInCrossMiniBlocksEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CorrectFirstQueuedEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.DeleteDelegatorAfterClaimRewardsEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.FixOOGReturnCodeEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RemoveNonUpdatedStorageEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.OptimizeNFTStoreEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CreateNFTThroughExecByCallerEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.StopDecreasingValidatorRatingWhenStuckEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.FrontRunningProtectionEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.IsPayableBySCEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CleanUpInformativeSCRsEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.StorageAPICostOptimizationEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.TransformToMultiShardCreateEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTRegisterAndSetAllRolesEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ScheduledMiniBlocksEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CorrectJailedNotUnstakedEmptyQueueEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.DoNotReturnOldBlockInBlockchainHookEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.AddFailedRelayedTxToInvalidMBsDisableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SCRSizeInvariantOnBuiltInResultEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CheckCorrectTokenIDForTransferRoleEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.DisableExecByCallerEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RefactorContextEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.FailExecutionOnEveryAPIErrorEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ManagedCryptoAPIsEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CheckFunctionArgumentEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CheckExecuteOnReadOnlyEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTMetadataContinuousCleanupEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.MiniBlockPartialExecutionEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.FixAsyncCallBackArgsListEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.FixOldTokenLiquidityEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RuntimeMemStoreLimitEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SetSenderInEeiOutputTransferEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RefactorPeersMiniBlocksEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.MaxBlockchainHookCountersEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.WipeSingleNFTLiquidityDecreaseEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.AlwaysSaveTokenMetaDataEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RuntimeCodeSizeFixEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.RelayedNonceFixEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SetGuardianEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.DeterministicSortOnValidatorsInfoEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.SCProcessorV2EnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.AutoBalanceDataTriesEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.MigrateDataTrieEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.KeepExecOrderOnCreatedSCRsEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.MultiClaimOnDelegationEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ChangeUsernameEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ConsistentTokensValuesLengthCheckEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.FixDelegationChangeOwnerOnAccountEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.DynamicGasCostForDataTrieStorageLoadEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ScToScLogEventEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.NFTStopCreateEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.ChangeOwnerAddressCrossShardThroughSCEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.FixGasRemainingForSaveKeyValueBuiltinFunctionEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.CurrentRandomnessOnSortingEnableEpoch", Value = "0" }, - { File = "enableEpochs.toml", Path = "EnableEpochs.AlwaysMergeContextsInEEIEnableEpoch", Value = "0" }, + { File = "config.toml", Path = "VirtualMachine.Execution.WasmVMVersions", Value = [{ StartEpoch = 0, Version = "v1.5" }] }, + { File = "config.toml", Path = "VirtualMachine.Querying.WasmVMVersions", Value = [{ StartEpoch = 0, Version = "v1.5" }] }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SCDeployEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.BuiltInFunctionsEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RelayedTransactionsEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.PenalizedTooMuchGasEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SwitchJailWaitingEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.BelowSignedThresholdEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SwitchHysteresisForMinNodesEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.TransactionSignedWithTxHashEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.MetaProtectionEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.AheadOfTimeGasUsageEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.GasPriceModifierEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RepairCallbackEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.BlockGasAndFeesReCheckEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.BalanceWaitingListsEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ReturnDataToLastTransferEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SenderInOutTransferEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.StakeEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.StakingV2EnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DoubleKeyProtectionEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.GovernanceEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DelegationManagerEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DelegationSmartContractEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CorrectLastUnjailedEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RelayedTransactionsV2EnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.UnbondTokensV2EnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SaveJailedAlwaysEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ReDelegateBelowMinCheckEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ValidatorToDelegationEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.IncrementSCRNonceInMultiTransferEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTMultiTransferEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.GlobalMintBurnDisableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTTransferRoleEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ComputeRewardCheckpointEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SCRSizeInvariantCheckEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.BackwardCompSaveKeyValueEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTNFTCreateOnMultiShardEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.MetaESDTSetEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.AddTokensToDelegationEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.MultiESDTTransferFixOnCallBackOnEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.OptimizeGasUsedInCrossMiniBlocksEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CorrectFirstQueuedEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DeleteDelegatorAfterClaimRewardsEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FixOOGReturnCodeEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RemoveNonUpdatedStorageEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.OptimizeNFTStoreEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CreateNFTThroughExecByCallerEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.StopDecreasingValidatorRatingWhenStuckEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FrontRunningProtectionEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.IsPayableBySCEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CleanUpInformativeSCRsEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.StorageAPICostOptimizationEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.TransformToMultiShardCreateEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTRegisterAndSetAllRolesEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ScheduledMiniBlocksEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CorrectJailedNotUnstakedEmptyQueueEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DoNotReturnOldBlockInBlockchainHookEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.AddFailedRelayedTxToInvalidMBsDisableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SCRSizeInvariantOnBuiltInResultEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CheckCorrectTokenIDForTransferRoleEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DisableExecByCallerEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RefactorContextEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FailExecutionOnEveryAPIErrorEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ManagedCryptoAPIsEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CheckFunctionArgumentEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CheckExecuteOnReadOnlyEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ESDTMetadataContinuousCleanupEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.MiniBlockPartialExecutionEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FixAsyncCallBackArgsListEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FixOldTokenLiquidityEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RuntimeMemStoreLimitEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SetSenderInEeiOutputTransferEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RefactorPeersMiniBlocksEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.MaxBlockchainHookCountersEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.WipeSingleNFTLiquidityDecreaseEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.AlwaysSaveTokenMetaDataEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RuntimeCodeSizeFixEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.RelayedNonceFixEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SetGuardianEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DeterministicSortOnValidatorsInfoEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.SCProcessorV2EnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.AutoBalanceDataTriesEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.MigrateDataTrieEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.KeepExecOrderOnCreatedSCRsEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.MultiClaimOnDelegationEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ChangeUsernameEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ConsistentTokensValuesLengthCheckEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FixDelegationChangeOwnerOnAccountEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DynamicGasCostForDataTrieStorageLoadEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ScToScLogEventEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.NFTStopCreateEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.ChangeOwnerAddressCrossShardThroughSCEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FixGasRemainingForSaveKeyValueBuiltinFunctionEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CurrentRandomnessOnSortingEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.AlwaysMergeContextsInEEIEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.UseGasBoundedShouldFailExecutionEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.DynamicESDTEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.EGLDInMultiTransferEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.CryptoOpcodesV2EnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.UnJailCleanupEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FixRelayedBaseCostEnableEpoch", Value = 0 }, + { File = "enableEpochs.toml", Path = "EnableEpochs.FixRelayedMoveBalanceToNonPayableSCEnableEpoch", Value = 0 }, ] diff --git a/xsuite-fullsimulnet/config/nodeOverrideDefault.toml b/xsuite-fullsimulnet/config/nodeOverrideDefault.toml index 5fb030d9..cbca1fdb 100644 --- a/xsuite-fullsimulnet/config/nodeOverrideDefault.toml +++ b/xsuite-fullsimulnet/config/nodeOverrideDefault.toml @@ -1,11 +1,12 @@ # System overrides, DO NOT EDIT THIS FILE OverridableConfigTomlValues = [ - # the following line will disable stake limits (so the stake operations will accept as many nodes as desired) - { File = "enableEpochs.toml", Path = "EnableEpochs.StakeLimitsEnableEpoch", Value = "1000000" }, # disable stake limits { File = "systemSmartContractsConfig.toml", Path = "ESDTSystemSCConfig.BaseIssuingCost", Value = "50000000000000000" }, # (0.05 EGLD) - { File = "config.toml", Path = "Debug.Process.Enabled", Value = "false" }, # disable process debugger component that might alter the log levels + { File = "config.toml", Path = "Debug.Process.Enabled", Value = false }, # disable process debugger component that might alter the log levels + # the following 2 lines will set the VM 1.5 spaceVM version at the genesis time onward + { File = "config.toml", Path = "VirtualMachine.Execution.WasmVMVersions", Value = [{ StartEpoch = 0, Version = "1.5" }]}, + { File = "config.toml", Path = "VirtualMachine.Querying.WasmVMVersions", Value = [{ StartEpoch = 0, Version = "1.5" }]}, # the folowing 3 lines will disable the web antiflooding (useful to send a large transaction batch to the chain simulator) - { File = "config.toml", Path = "WebServerAntiflood.WebServerAntifloodEnabled", Value = "false"}, - { File = "config.toml", Path = "WebServerAntiflood.SimultaneousRequests", Value = "100000"}, - { File = "config.toml", Path = "WebServerAntiflood.SameSourceRequests", Value = "1000000"} + { File = "config.toml", Path = "WebServerAntiflood.WebServerAntifloodEnabled", Value = false}, + { File = "config.toml", Path = "WebServerAntiflood.SimultaneousRequests", Value = 100000}, + { File = "config.toml", Path = "WebServerAntiflood.SameSourceRequests", Value = 1000000} ] diff --git a/xsuite-fullsimulnet/config/proxy/config/apiConfig/v1_0.toml b/xsuite-fullsimulnet/config/proxy/config/apiConfig/v1_0.toml index 1f5d2aed..f90ee4ae 100644 --- a/xsuite-fullsimulnet/config/proxy/config/apiConfig/v1_0.toml +++ b/xsuite-fullsimulnet/config/proxy/config/apiConfig/v1_0.toml @@ -45,7 +45,6 @@ Routes = [ { Name = "/:address/registered-nfts", Open = true, Secured = false, RateLimit = 0 }, { Name = "/:address/nft/:tokenIdentifier/nonce/:nonce", Open = true, Secured = false, RateLimit = 0 }, { Name = "/:address/shard", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/transactions", Open = true, Secured = false, RateLimit = 0 }, { Name = "/:address/guardian-data", Open = true, Secured = false, RateLimit = 0 }, { Name = "/:address/is-data-trie-migrated", Open = true, Secured = false, RateLimit = 0 } ] @@ -116,11 +115,6 @@ Routes = [ { Name = "/by-round/:round", Secured = false, Open = true, RateLimit = 0 }, ] -[APIPackages.block-atlas] -Routes = [ - { Name = "/:shard/:nonce", Secured = false, Open = true, RateLimit = 0 } -] - [APIPackages.proof] Routes = [ { Name = "/root-hash/:roothash/address/:address", Secured = false, Open = false, RateLimit = 0 }, diff --git a/xsuite-fullsimulnet/config/proxy/config/apiConfig/v_next.toml b/xsuite-fullsimulnet/config/proxy/config/apiConfig/v_next.toml index 1bdf4e85..fbb7c733 100644 --- a/xsuite-fullsimulnet/config/proxy/config/apiConfig/v_next.toml +++ b/xsuite-fullsimulnet/config/proxy/config/apiConfig/v_next.toml @@ -45,7 +45,6 @@ Routes = [ { Name = "/:address/registered-nfts", Open = true, Secured = false, RateLimit = 0 }, { Name = "/:address/nft/:tokenIdentifier/nonce/:nonce", Open = true, Secured = false, RateLimit = 0 }, { Name = "/:address/shard", Open = true, Secured = false, RateLimit = 0 }, - { Name = "/:address/transactions", Open = true, Secured = false, RateLimit = 0 }, { Name = "/:address/guardian-data", Open = true, Secured = false, RateLimit = 0 }, { Name = "/:address/is-data-trie-migrated", Open = true, Secured = false, RateLimit = 0 } ] @@ -116,11 +115,6 @@ Routes = [ { Name = "/by-round/:round", Secured = false, Open = true, RateLimit = 0 }, ] -[APIPackages.block-atlas] -Routes = [ - { Name = "/:shard/:nonce", Secured = false, Open = true, RateLimit = 0 } -] - [APIPackages.proof] Routes = [ { Name = "/root-hash/:roothash/address/:address", Secured = false, Open = false, RateLimit = 0 }, diff --git a/xsuite-fullsimulnet/config/proxy/config/config.toml b/xsuite-fullsimulnet/config/proxy/config/config.toml index 9cf47be2..03ef65fc 100644 --- a/xsuite-fullsimulnet/config/proxy/config/config.toml +++ b/xsuite-fullsimulnet/config/proxy/config/config.toml @@ -39,12 +39,18 @@ # With this flag disabled, /transaction/pool route will return an error AllowEntireTxPoolFetch = false + # NumShardsTimeoutInSec represents the maximum number of seconds to wait for at least one observer online until throwing an error + NumShardsTimeoutInSec = 90 + + # TimeBetweenNodesRequestsInSec represents time to wait before retry to get the number of shards from observers + TimeBetweenNodesRequestsInSec = 2 + [AddressPubkeyConverter] - #Length specifies the length in bytes of an address - Length = 32 + #Length specifies the length in bytes of an address + Length = 32 - # Type specifies the type of public keys: hex or bech32 - Type = "bech32" + # Type specifies the type of public keys: hex or bech32 + Type = "bech32" [Marshalizer] Type = "gogo protobuf" diff --git a/xsuite-fullsimulnet/config/proxy/config/external.toml b/xsuite-fullsimulnet/config/proxy/config/external.toml deleted file mode 100644 index 9bc54b1a..00000000 --- a/xsuite-fullsimulnet/config/proxy/config/external.toml +++ /dev/null @@ -1,4 +0,0 @@ -# ElasticSearchConnector defines settings related to ElasticSearch such as login information or URL -[ElasticSearchConnector] - Enabled = false - URL = "" diff --git a/xsuite-lightsimulnet/src/go.mod b/xsuite-lightsimulnet/src/go.mod index a3a5a25a..4dd12ade 100644 --- a/xsuite-lightsimulnet/src/go.mod +++ b/xsuite-lightsimulnet/src/go.mod @@ -4,11 +4,11 @@ go 1.20 require ( github.com/go-chi/chi v1.5.4 - github.com/multiversx/mx-chain-core-go v1.2.20 - github.com/multiversx/mx-chain-logger-go v1.0.14 - github.com/multiversx/mx-chain-scenario-go v1.4.4-0.20240708183543-61f6e1880d1d - github.com/multiversx/mx-chain-vm-common-go v1.5.12 - github.com/multiversx/mx-chain-vm-go v1.5.30-0.20240713084912-93532045748c + github.com/multiversx/mx-chain-core-go v1.2.22 + github.com/multiversx/mx-chain-logger-go v1.0.15 + github.com/multiversx/mx-chain-scenario-go v1.4.4 + github.com/multiversx/mx-chain-vm-common-go v1.5.16 + github.com/multiversx/mx-chain-vm-go v1.5.37 ) require ( @@ -24,8 +24,8 @@ require ( github.com/herumi/bls-go-binary v1.28.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect - github.com/multiversx/mx-chain-crypto-go v1.2.11 // indirect - github.com/multiversx/mx-chain-storage-go v1.0.15 // indirect + github.com/multiversx/mx-chain-crypto-go v1.2.12 // indirect + github.com/multiversx/mx-chain-storage-go v1.0.16 // indirect github.com/multiversx/mx-components-big-int v1.0.0 // indirect github.com/pelletier/go-toml v1.9.3 // indirect golang.org/x/crypto v0.3.0 // indirect diff --git a/xsuite-lightsimulnet/src/go.sum b/xsuite-lightsimulnet/src/go.sum index 9611a762..cde8b084 100644 --- a/xsuite-lightsimulnet/src/go.sum +++ b/xsuite-lightsimulnet/src/go.sum @@ -72,24 +72,20 @@ 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.20 h1:jOQ10LxxUqECnuqUYeBBT6VoZcpJDdYgOvsSGtifDdI= -github.com/multiversx/mx-chain-core-go v1.2.20/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE= -github.com/multiversx/mx-chain-crypto-go v1.2.11 h1:MNPJoiTJA5/tedYrI0N22OorbsKDESWG0SF8MCJwcJI= -github.com/multiversx/mx-chain-crypto-go v1.2.11/go.mod h1:pcZutPdfLiAFytzCU3LxU3s8cXkvpNqquyitFSfoF3o= -github.com/multiversx/mx-chain-logger-go v1.0.14 h1:PRMpAvXE7Nec2d//QNmbYfKVHMomOKmcN4UXurQWX9o= -github.com/multiversx/mx-chain-logger-go v1.0.14/go.mod h1:bDfHSdwqIimn7Gp8w+SH5KlDuGzJ//nlyEANAaTSc3o= -github.com/multiversx/mx-chain-scenario-go v1.4.3 h1:9xeVB8TOsolXS4YEr1CZ/VZr5Qk0X+nde8nRGnxJICo= -github.com/multiversx/mx-chain-scenario-go v1.4.3/go.mod h1:Bd7/Xs3mWM6pX/REHK5dfpf3MUfjMZ7li09cfCxg2ac= -github.com/multiversx/mx-chain-scenario-go v1.4.4-0.20240708183543-61f6e1880d1d h1:N7OWMPevqD2E2O4cnOKe0N+Qs3BPfSLHdxhY0E14/lU= -github.com/multiversx/mx-chain-scenario-go v1.4.4-0.20240708183543-61f6e1880d1d/go.mod h1:Bd7/Xs3mWM6pX/REHK5dfpf3MUfjMZ7li09cfCxg2ac= -github.com/multiversx/mx-chain-storage-go v1.0.15 h1:PDyP1uouAVjR32dFgM+7iaQBdReD/tKBJj10JbxXvaE= -github.com/multiversx/mx-chain-storage-go v1.0.15/go.mod h1:GZUK3sqf5onsWS/0ZPWjDCBjAL22FigQPUh252PAVk0= -github.com/multiversx/mx-chain-vm-common-go v1.5.12 h1:Q8F6DE7XhgHtWgg2rozSv4Tv5fE3ENkJz6mjRoAfht8= -github.com/multiversx/mx-chain-vm-common-go v1.5.12/go.mod h1:Sv6iS1okB6gy3HAsW6KHYtAxShNAfepKLtu//AURI8c= -github.com/multiversx/mx-chain-vm-go v1.5.29 h1:Ovz5/WM9KbD3YKRafdKI4RwtsNN36AGeNw81LZAhE70= -github.com/multiversx/mx-chain-vm-go v1.5.29/go.mod h1:n0SbVEAhIflreAGi7BnfWg4p4VHh4G8ArbvYQZsZsKQ= -github.com/multiversx/mx-chain-vm-go v1.5.30-0.20240713084912-93532045748c h1:Cj4smHBKeHB346IeRFcEVIMsoxeT80HEn3zIMruEY+I= -github.com/multiversx/mx-chain-vm-go v1.5.30-0.20240713084912-93532045748c/go.mod h1:n0SbVEAhIflreAGi7BnfWg4p4VHh4G8ArbvYQZsZsKQ= +github.com/multiversx/mx-chain-core-go v1.2.22 h1:yDYrvoQOBbsDerEp7L3+de5AfMy3pTF333gWPpd+FNk= +github.com/multiversx/mx-chain-core-go v1.2.22/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.4 h1:DVE2V+FPeyD/yWoC+KEfPK3jsFzHeruelESfpTlf460= +github.com/multiversx/mx-chain-scenario-go v1.4.4/go.mod h1:kI+TWR3oIEgUkbwkHCPo2CQ3VjIge+ezGTibiSGwMxo= +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.16 h1:g1SqYjxl7K66Y1O/q6tvDJ37fzpzlxCSfRzSm/woQQY= +github.com/multiversx/mx-chain-vm-common-go v1.5.16/go.mod h1:1rSkXreUZNXyPTTdhj47M+Fy62yjxbu3aAsXEtKN3UY= +github.com/multiversx/mx-chain-vm-go v1.5.37 h1:Iy3KCvM+DOq1f9UPA7uYK/rI3ZbBOXc2CVNO2/vm5zw= +github.com/multiversx/mx-chain-vm-go v1.5.37/go.mod h1:nzLrWeXvfxCIiwj5uNBZq3d7stkXyeY+Fktfr4tTaiY= 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/xsuite-lightsimulnet/src/handleAddress.go b/xsuite-lightsimulnet/src/handleAddress.go index c19b072a..2fca9ebf 100644 --- a/xsuite-lightsimulnet/src/handleAddress.go +++ b/xsuite-lightsimulnet/src/handleAddress.go @@ -16,15 +16,13 @@ func (e *Executor) HandleAddress(r *http.Request) (interface{}, error) { return nil, err } worldAccount := e.getWorldAccount(address) - accountData, err := e.getAccountData(worldAccount, false) + withKeys := r.URL.Query().Get("withKeys") == "true" + accountData, err := e.getAccountData(worldAccount, withKeys) if err != nil { return nil, err } jData := map[string]interface{}{ - "data": map[string]interface{}{ - "account": accountData, - }, - "code": "successful", + "account": accountData, } return jData, nil } @@ -37,10 +35,7 @@ func (e *Executor) HandleAddressNonce(r *http.Request) (interface{}, error) { } worldAccount := e.getWorldAccount(address) jData := map[string]interface{}{ - "data": map[string]interface{}{ - "nonce": worldAccount.Nonce, - }, - "code": "successful", + "nonce": worldAccount.Nonce, } return jData, nil } @@ -53,10 +48,7 @@ func (e *Executor) HandleAddressBalance(r *http.Request) (interface{}, error) { } worldAccount := e.getWorldAccount(address) jData := map[string]interface{}{ - "data": map[string]interface{}{ - "balance": worldAccount.Balance.String(), - }, - "code": "successful", + "balance": worldAccount.Balance.String(), } return jData, nil } @@ -75,10 +67,7 @@ func (e *Executor) HandleAddressKey(r *http.Request) (interface{}, error) { worldAccount := e.getWorldAccount(address) value := e.getAccountValueData(worldAccount, bytesKey) jData := map[string]interface{}{ - "data": map[string]interface{}{ - "value": value, - }, - "code": "successful", + "value": value, } return jData, nil } @@ -92,10 +81,7 @@ func (e *Executor) HandleAddressKeys(r *http.Request) (interface{}, error) { worldAccount := e.getWorldAccount(address) accountKeysData := e.getAccountKvsData(worldAccount) jData := map[string]interface{}{ - "data": map[string]interface{}{ - "pairs": accountKeysData, - }, - "code": "successful", + "pairs": accountKeysData, } return jData, nil } diff --git a/xsuite-lightsimulnet/src/handleAdmin.go b/xsuite-lightsimulnet/src/handleAdmin.go index f129803b..da1009c4 100644 --- a/xsuite-lightsimulnet/src/handleAdmin.go +++ b/xsuite-lightsimulnet/src/handleAdmin.go @@ -27,10 +27,7 @@ func (e *Executor) HandleAdminGetAllAccounts() (interface{}, error) { return iAddress < jAddress }) jData := map[string]interface{}{ - "data": map[string]interface{}{ - "accounts": accountsData, - }, - "code": "successful", + "accounts": accountsData, } return jData, nil } @@ -48,9 +45,7 @@ func (e *Executor) HandleAdminSetAccounts(r *http.Request) (interface{}, error) return nil, err } } - jData := map[string]interface{}{ - "code": "successful", - } + jData := map[string]interface{}{} return jData, nil } @@ -67,9 +62,7 @@ func (e *Executor) HandleAdminUpdateAccounts(r *http.Request) (interface{}, erro return nil, err } } - jData := map[string]interface{}{ - "code": "successful", - } + jData := map[string]interface{}{} return jData, nil } @@ -87,9 +80,7 @@ func (e *Executor) HandleAdminSetCurrentBlockInfo(r *http.Request) (interface{}, BlockEpoch: block.Epoch, RandomSeed: nil, } - jData := map[string]interface{}{ - "code": "successful", - } + jData := map[string]interface{}{} return jData, nil } @@ -107,9 +98,7 @@ func (e *Executor) HandleAdminSetPreviousBlockInfo(r *http.Request) (interface{} BlockEpoch: block.Epoch, RandomSeed: nil, } - jData := map[string]interface{}{ - "code": "successful", - } + jData := map[string]interface{}{} return jData, nil } diff --git a/xsuite-lightsimulnet/src/handleNetwork.go b/xsuite-lightsimulnet/src/handleNetwork.go index 519a3d29..0a2eeca6 100644 --- a/xsuite-lightsimulnet/src/handleNetwork.go +++ b/xsuite-lightsimulnet/src/handleNetwork.go @@ -2,22 +2,19 @@ package main func (e *Executor) HandleNetworkStatus() (interface{}, error) { jData := map[string]interface{}{ - "data": map[string]interface{}{ - "status": map[string]interface{}{ - "erd_block_timestamp": e.scenexec.World.CurrentTimeStamp(), - "erd_cross_check_block_height": "-1", - "erd_current_round": e.scenexec.World.CurrentRound(), - "erd_epoch_number": e.scenexec.World.CurrentEpoch(), - "erd_highest_final_nonce": -1, - "erd_nonce": e.scenexec.World.CurrentNonce(), - "erd_nonce_at_epoch_start": -1, - "erd_nonces_passed_in_current_epoch": -1, - "erd_round_at_epoch_start": -1, - "erd_rounds_passed_in_current_epoch": -1, - "erd_rounds_per_epoch": -1, - }, + "status": map[string]interface{}{ + "erd_block_timestamp": e.scenexec.World.CurrentTimeStamp(), + "erd_cross_check_block_height": "-1", + "erd_current_round": e.scenexec.World.CurrentRound(), + "erd_epoch_number": e.scenexec.World.CurrentEpoch(), + "erd_highest_final_nonce": -1, + "erd_nonce": e.scenexec.World.CurrentNonce(), + "erd_nonce_at_epoch_start": -1, + "erd_nonces_passed_in_current_epoch": -1, + "erd_round_at_epoch_start": -1, + "erd_rounds_passed_in_current_epoch": -1, + "erd_rounds_per_epoch": -1, }, - "code": "successful", } return jData, nil } diff --git a/xsuite-lightsimulnet/src/handleTransaction.go b/xsuite-lightsimulnet/src/handleTransaction.go index ab86bf9d..463352bd 100644 --- a/xsuite-lightsimulnet/src/handleTransaction.go +++ b/xsuite-lightsimulnet/src/handleTransaction.go @@ -31,10 +31,7 @@ func (e *Executor) HandleTransactionSend(r *http.Request) (interface{}, error) { return nil, err } jOutput := map[string]interface{}{ - "data": map[string]interface{}{ - "txHash": txHash, - }, - "code": "successful", + "txHash": txHash, } return jOutput, nil } @@ -56,10 +53,7 @@ func (e *Executor) HandleTransactionSendMultiple(r *http.Request) (interface{}, } } jOutput := map[string]interface{}{ - "data": map[string]interface{}{ - "txsHashes": txsHashes, - }, - "code": "successful", + "txsHashes": txsHashes, } return jOutput, nil } @@ -295,28 +289,22 @@ func (e *Executor) executeTx(txHash string, rawTx RawTx) (error) { new(big.Int).SetUint64(rawTx.GasPrice), ) e.txResps[txHash] = map[string]interface{}{ - "data": map[string]interface{}{ - "transaction": map[string]interface{}{ - "hash": txHash, - "status": "success", - "logs": logs, - "smartContractResults": smartContractResults, - "executionReceipt": map[string]interface{}{ - "returnCode": vmOutput.ReturnCode, - "returnMessage": vmOutput.ReturnMessage, - }, - "executionLogs": logger.StopAndCollect(), - "gasUsed": rawTx.GasLimit - vmOutput.GasRemaining, - "fee": fee.String(), + "transaction": map[string]interface{}{ + "hash": txHash, + "status": "success", + "logs": logs, + "smartContractResults": smartContractResults, + "executionReceipt": map[string]interface{}{ + "returnCode": vmOutput.ReturnCode, + "returnMessage": vmOutput.ReturnMessage, }, + "executionLogs": logger.StopAndCollect(), + "gasUsed": rawTx.GasLimit - vmOutput.GasRemaining, + "fee": fee.String(), }, - "code": "successful", } e.txProcessStatusResps[txHash] = map[string]interface{}{ - "data": map[string]interface{}{ - "status": processStatus, - }, - "code": "successful", + "status": processStatus, } e.hashesOfTxsToKeep = append(e.hashesOfTxsToKeep, txHash) if len(e.hashesOfTxsToKeep) > e.numberOfTxsToKeep { diff --git a/xsuite-lightsimulnet/src/handleVm.go b/xsuite-lightsimulnet/src/handleVm.go index 2bc3b8ba..d5be99fb 100644 --- a/xsuite-lightsimulnet/src/handleVm.go +++ b/xsuite-lightsimulnet/src/handleVm.go @@ -71,14 +71,11 @@ func (e *Executor) HandleVmQuery(r *http.Request) (interface{}, error) { } jOutput := map[string]interface{}{ "data": map[string]interface{}{ - "data": map[string]interface{}{ - "returnData": b64ReturnData, - "returnCode": vmOutput.ReturnCode, - "returnMessage": vmOutput.ReturnMessage, - "executionLogs": logger.StopAndCollect(), - }, + "returnData": b64ReturnData, + "returnCode": vmOutput.ReturnCode, + "returnMessage": vmOutput.ReturnMessage, + "executionLogs": logger.StopAndCollect(), }, - "code": "successful", } return jOutput, nil } diff --git a/xsuite-lightsimulnet/src/main.go b/xsuite-lightsimulnet/src/main.go index 3ab0977c..8da8e8dd 100644 --- a/xsuite-lightsimulnet/src/main.go +++ b/xsuite-lightsimulnet/src/main.go @@ -28,83 +28,83 @@ func main() { router := chi.NewRouter() router.Get("/address/{address}", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAddress(r) - respond(w, resBody, err) + data, err := executor.HandleAddress(r) + respond(w, data, err) }) router.Get("/address/{address}/nonce", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAddressNonce(r) - respond(w, resBody, err) + data, err := executor.HandleAddressNonce(r) + respond(w, data, err) }) router.Get("/address/{address}/balance", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAddressBalance(r) - respond(w, resBody, err) + data, err := executor.HandleAddressBalance(r) + respond(w, data, err) }) router.Get("/address/{address}/keys", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAddressKeys(r) - respond(w, resBody, err) + data, err := executor.HandleAddressKeys(r) + respond(w, data, err) }) router.Get("/address/{address}/key/{key}", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAddressKey(r) - respond(w, resBody, err) + data, err := executor.HandleAddressKey(r) + respond(w, data, err) }) router.Post("/transaction/send", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleTransactionSend(r) - respond(w, resBody, err) + data, err := executor.HandleTransactionSend(r) + respond(w, data, err) }) router.Post("/transaction/send-multiple", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleTransactionSendMultiple(r) - respond(w, resBody, err) + data, err := executor.HandleTransactionSendMultiple(r) + respond(w, data, err) }) router.Get("/transaction/{txHash}", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleTransaction(r) - respond(w, resBody, err) + data, err := executor.HandleTransaction(r) + respond(w, data, err) }) router.Get("/transaction/{txHash}/process-status", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleTransactionProcessStatus(r) - respond(w, resBody, err) + data, err := executor.HandleTransactionProcessStatus(r) + respond(w, data, err) }) router.Post("/vm-values/query", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleVmQuery(r) - respond(w, resBody, err) + data, err := executor.HandleVmQuery(r) + respond(w, data, err) }) router.Get("/admin/get-all-accounts", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAdminGetAllAccounts() - respond(w, resBody, err) + data, err := executor.HandleAdminGetAllAccounts() + respond(w, data, err) }) router.Post("/admin/set-accounts", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAdminSetAccounts(r) - respond(w, resBody, err) + data, err := executor.HandleAdminSetAccounts(r) + respond(w, data, err) }) router.Post("/admin/update-accounts", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAdminUpdateAccounts(r) - respond(w, resBody, err) + data, err := executor.HandleAdminUpdateAccounts(r) + respond(w, data, err) }) router.Post("/admin/set-current-block-info", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAdminSetCurrentBlockInfo(r) - respond(w, resBody, err) + data, err := executor.HandleAdminSetCurrentBlockInfo(r) + respond(w, data, err) }) router.Post("/admin/set-previous-block-info", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleAdminSetPreviousBlockInfo(r) - respond(w, resBody, err) + data, err := executor.HandleAdminSetPreviousBlockInfo(r) + respond(w, data, err) }) router.Get("/network/status/{shard}", func(w http.ResponseWriter, r *http.Request) { - resBody, err := executor.HandleNetworkStatus() - respond(w, resBody, err) + data, err := executor.HandleNetworkStatus() + respond(w, data, err) }) fmt.Printf("Server running on http://%s\n", listener.Addr().String()) @@ -113,10 +113,13 @@ func main() { } } -func respond(w http.ResponseWriter, resBody interface{}, err error) { +func respond(w http.ResponseWriter, data interface{}, err error) { var resBodyJson []byte if err == nil { - resBodyJson, err = json.Marshal(resBody) + resBodyJson, err = json.Marshal(map[string]interface{}{ + "data": data, + "code": "successful", + }) } if err != nil { resBodyJson, _ = json.Marshal(map[string]interface{}{ diff --git a/xsuite/src/proxy/fsproxy.ts b/xsuite/src/proxy/fsproxy.ts index c71ce49f..f43ff6bd 100644 --- a/xsuite/src/proxy/fsproxy.ts +++ b/xsuite/src/proxy/fsproxy.ts @@ -70,7 +70,7 @@ const encodableAccountToSettableAccount = (account: EncodableAccount) => { codeHash: codeHash !== undefined ? hexToBase64(codeHash) : undefined, codeMetadata: codeMetadata !== undefined ? hexToBase64(codeMetadata) : undefined, - keys: kvs, // TODO-MvX: better if called "pairs" + pairs: kvs, ownerAddress: owner, }; }; diff --git a/xsuite/src/proxy/proxy.ts b/xsuite/src/proxy/proxy.ts index d33438aa..002249c6 100644 --- a/xsuite/src/proxy/proxy.ts +++ b/xsuite/src/proxy/proxy.ts @@ -351,95 +351,69 @@ export class Proxy { return res.status as string; } - async getAccountNonce( - address: AddressLike, - { shardId }: GetAccountOptions = {}, - ) { + async getAccountNonce(address: AddressLike) { const res = await this.fetch( - makePath(`/address/${addressLikeToBech(address)}/nonce`, { - "forced-shard-id": shardId, - }), + `/address/${addressLikeToBech(address)}/nonce`, ); return res.nonce as number; } - async getAccountBalance( - address: AddressLike, - { shardId }: GetAccountOptions = {}, - ) { + async getAccountBalance(address: AddressLike) { const res = await this.fetch( - makePath(`/address/${addressLikeToBech(address)}/balance`, { - "forced-shard-id": shardId, - }), + `/address/${addressLikeToBech(address)}/balance`, ); return BigInt(res.balance); } - async getAccountValue( - address: AddressLike, - key: BytesLike, - { shardId }: GetAccountOptions = {}, - ): Promise { + async getAccountValue(address: AddressLike, key: BytesLike): Promise { const res = await this.fetch( - makePath( - `/address/${addressLikeToBech(address)}/key/${bytesLikeToHex(key)}`, - { - "forced-shard-id": shardId, - }, - ), + `/address/${addressLikeToBech(address)}/key/${bytesLikeToHex(key)}`, ); return res.value; } - async getAccountKvs( - address: AddressLike, - { shardId }: GetAccountOptions = {}, - ) { - const res = await this.fetch( - makePath(`/address/${addressLikeToBech(address)}/keys`, { - "forced-shard-id": shardId, - }), - ); + async getAccountKvs(address: AddressLike) { + const res = await this.fetch(`/address/${addressLikeToBech(address)}/keys`); return res.pairs as Kvs; } - async getSerializableAccountWithoutKvs( + getSerializableAccountWithoutKvs(address: AddressLike) { + return this._getSerializableAccount(address); + } + + getSerializableAccount(address: AddressLike) { + return this._getSerializableAccount(address, { withKeys: true }); + } + + private async _getSerializableAccount( address: AddressLike, - options?: GetAccountOptions, + { withKeys }: GetAccountRawOptions = {}, ) { const res = await this.fetch( - makePath(`/address/${addressLikeToBech(address)}`, options), + makePath(`/address/${addressLikeToBech(address)}`, { withKeys }), ); return getSerializableAccount(res.account); } - getSerializableAccount(address: AddressLike, options?: GetAccountOptions) { - // TODO-MvX: When ?withKeys=true out, rewrite this part - return Promise.all([ - this.getSerializableAccountWithoutKvs(address, options), - this.getAccountKvs(address, options), - ]).then(([account, kvs]) => ({ ...account, kvs })); + getAccountWithoutKvs(address: AddressLike) { + return this._getAccount(address); } - async getAccountWithoutKvs( + getAccount(address: AddressLike) { + return this._getAccount(address, { withKeys: true }); + } + + private async _getAccount( address: AddressLike, - options?: GetAccountOptions, + options?: GetAccountRawOptions, ) { - const { balance, ...account } = await this.getSerializableAccountWithoutKvs( + const { balance, ...account } = await this._getSerializableAccount( address, options, ); return { balance: BigInt(balance), ...account }; } - getAccount(address: AddressLike, options?: GetAccountOptions) { - // TODO-MvX: When ?withKeys=true out, rewrite this part - return Promise.all([ - this.getAccountWithoutKvs(address, options), - this.getAccountKvs(address, options), - ]).then(([account, kvs]) => ({ ...account, kvs })); - } - /** * @deprecated Use `.getSerializableAccount` instead. */ @@ -843,7 +817,7 @@ type RawQuery = { type GetTxRawOptions = { withResults?: boolean }; -type GetAccountOptions = { shardId?: number }; +type GetAccountRawOptions = { withKeys?: boolean }; type TxResult = Prettify<{ hash: string; diff --git a/xsuite/src/world/fsworld.test.ts b/xsuite/src/world/fsworld.test.ts index b60bba8f..f5b50f56 100644 --- a/xsuite/src/world/fsworld.test.ts +++ b/xsuite/src/world/fsworld.test.ts @@ -912,6 +912,22 @@ test.concurrent("FSWallet.transfer - EGLD", async () => { }); }); +test.concurrent("FSWorld.transfer - EGLD as ESDT", async () => { + using world = await FSWorld.start(); + const { wallet, wallet2 } = await createAccounts(world); + const { fee } = await wallet.transfer({ + receiver: wallet2, + esdts: [{ id: "EGLD-000000", amount: 10n ** 17n }], + gasLimit: 10_000_000, + }); + assertAccount(await wallet.getAccount(), { + balance: 9n * 10n ** 17n - fee, + }); + assertAccount(await wallet2.getAccount(), { + balance: 10n ** 17n, + }); +}); + test.concurrent("FSWallet.transfer - ESDTs", async () => { using world = await FSWorld.start(); const { wallet, wallet2 } = await createAccounts(world); diff --git a/xsuite/src/world/lsworld.test.ts b/xsuite/src/world/lsworld.test.ts index 1e33fc16..2647d400 100644 --- a/xsuite/src/world/lsworld.test.ts +++ b/xsuite/src/world/lsworld.test.ts @@ -955,6 +955,23 @@ test.concurrent("LSWallet.transfer - EGLD", async () => { }); }); +// TODO-MvX: To run once Mandos is fixed +test.todo("LSWallet.transfer - EGLD as ESDT", async () => { + using world = await LSWorld.start(); + const { wallet, wallet2 } = await createAccounts(world); + const { fee } = await wallet.transfer({ + receiver: wallet2, + esdts: [{ id: "EGLD-000000", amount: 10n ** 17n }], + gasLimit: 10_000_000, + }); + assertAccount(await wallet.getAccount(), { + balance: 9n * 10n ** 17n - fee, + }); + assertAccount(await wallet2.getAccount(), { + balance: 10n ** 17n, + }); +}); + test.concurrent("LSWallet.transfer - ESDTs", async () => { using world = await LSWorld.start(); const { wallet, wallet2 } = await createAccounts(world);