Skip to content

Commit

Permalink
Merge pull request #783 from multiversx/rc/v1.7.0
Browse files Browse the repository at this point in the history
Rc/v1.7.0
  • Loading branch information
iulianpascalau authored May 10, 2024
2 parents 2b2ede9 + 2e39b23 commit db3113f
Show file tree
Hide file tree
Showing 34 changed files with 315 additions and 189 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build-test-macos-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and run tests (MacOS ARM64)

on:
push:
branches: [master, rc/*, feat/*]
pull_request:
branches: [master, feat/*, rc/*]
workflow_dispatch:

jobs:
test:
strategy:
matrix:
go-version: [1.20.7]
runs-on: macos-13-xlarge
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Test
run: |
make test-w2
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
go-version: [1.20.7]
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
Expand Down
72 changes: 0 additions & 72 deletions .travis.yml

This file was deleted.

11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +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.18
github.com/multiversx/mx-chain-crypto-go v1.2.9
github.com/multiversx/mx-chain-logger-go v1.0.13
github.com/multiversx/mx-chain-scenario-go v1.4.1
github.com/multiversx/mx-chain-vm-common-go v1.5.11
github.com/multiversx/mx-chain-core-go v1.2.19
github.com/multiversx/mx-chain-crypto-go v1.2.11
github.com/multiversx/mx-chain-logger-go v1.0.14
github.com/multiversx/mx-chain-scenario-go v1.4.3
github.com/multiversx/mx-chain-storage-go v1.0.15
github.com/multiversx/mx-chain-vm-common-go v1.5.12
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
Expand Down
22 changes: 12 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +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.18 h1:fnub2eFL7XYOLrKKVZAPPsaM1TWEnaK5qqY3FLUv168=
github.com/multiversx/mx-chain-core-go v1.2.18/go.mod h1:BILOGHUOIG5dNNX8cgkzCNfDaVtoYrJRYcPnpxRMH84=
github.com/multiversx/mx-chain-crypto-go v1.2.9 h1:OEfF2kOQrtzUl273Z3DEcshjlTVUfPpJMd0R0SvTrlU=
github.com/multiversx/mx-chain-crypto-go v1.2.9/go.mod h1:fkaWKp1rbQN9wPKya5jeoRyC+c/SyN/NfggreyeBw+8=
github.com/multiversx/mx-chain-logger-go v1.0.13 h1:eru/TETo0MkO4ZTnXsQDKf4PBRpAXmqjT02klNT/JnY=
github.com/multiversx/mx-chain-logger-go v1.0.13/go.mod h1:MZJhTAtZTJxT+yK2EHc4ZW3YOHUc1UdjCD0iahRNBZk=
github.com/multiversx/mx-chain-scenario-go v1.4.1 h1:CrVXb1aNBRiFfSfpoMAUoGUy2aNXke5WnoesLdFxC2g=
github.com/multiversx/mx-chain-scenario-go v1.4.1/go.mod h1:Sdgz8nzA9Ki/pdY/e2a4k90LALBKQB1Eo8HeCV3Bkzo=
github.com/multiversx/mx-chain-vm-common-go v1.5.11 h1:rAQR00ALKOmWAuNA8XW8hR02M9gmrAE4WZwyJH4dMMU=
github.com/multiversx/mx-chain-vm-common-go v1.5.11/go.mod h1:T04rZt/VdwjPXcXVxltMmDmrhxNXsqlByYbWNWcNLYA=
github.com/multiversx/mx-chain-core-go v1.2.19 h1:2BaVHkB0tro3cjs5ay2pmLup1loCV0e1p9jV5QW0xqc=
github.com/multiversx/mx-chain-core-go v1.2.19/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-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-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=
Expand Down
76 changes: 38 additions & 38 deletions integrationTests/json/scenariosAdderLog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,26 @@ GetPointsUsed: 5291
SetPointsUsed: 6291
GetPointsUsed: 6291
GetPointsUsed: 6291
SetPointsUsed: 56291
SetPointsUsed: 21578
VM hook end: MBufferStorageLoad(-101, -102)
VM hook begin: MBufferToBigIntUnsigned(-102, -103)
GetPointsUsed: 56324
SetPointsUsed: 60324
GetPointsUsed: 21611
SetPointsUsed: 25611
VM hook end: MBufferToBigIntUnsigned(-102, -103)
VM hook begin: BigIntFinishUnsigned(-103)
GetPointsUsed: 60335
SetPointsUsed: 61335
GetPointsUsed: 61335
SetPointsUsed: 71335
GetPointsUsed: 25622
SetPointsUsed: 26622
GetPointsUsed: 26622
SetPointsUsed: 36622
VM hook end: BigIntFinishUnsigned(-103)
GetPointsUsed: 71337
GetPointsUsed: 71337
GetPointsUsed: 71337
GetPointsUsed: 71337
GetPointsUsed: 71337
GetPointsUsed: 71337
GetPointsUsed: 71337
GetPointsUsed: 71337
GetPointsUsed: 36624
GetPointsUsed: 36624
GetPointsUsed: 36624
GetPointsUsed: 36624
GetPointsUsed: 36624
GetPointsUsed: 36624
GetPointsUsed: 36624
GetPointsUsed: 36624
Reset: true
SetPointsUsed: 0
SetGasLimit: 3790900
Expand Down Expand Up @@ -124,38 +124,38 @@ GetPointsUsed: 6333
SetPointsUsed: 7333
GetPointsUsed: 7333
GetPointsUsed: 7333
SetPointsUsed: 57333
SetPointsUsed: 22620
VM hook end: MBufferStorageLoad(-102, -103)
VM hook begin: MBufferToBigIntUnsigned(-103, -104)
GetPointsUsed: 57366
SetPointsUsed: 61366
GetPointsUsed: 22653
SetPointsUsed: 26653
VM hook end: MBufferToBigIntUnsigned(-103, -104)
VM hook begin: BigIntAdd(-104, -104, -101)
GetPointsUsed: 61386
SetPointsUsed: 63386
GetPointsUsed: 26673
SetPointsUsed: 28673
VM hook end: BigIntAdd(-104, -104, -101)
VM hook begin: MBufferFromBigIntUnsigned(-105, -104)
GetPointsUsed: 63425
SetPointsUsed: 67425
GetPointsUsed: 28712
SetPointsUsed: 32712
VM hook end: MBufferFromBigIntUnsigned(-105, -104)
VM hook begin: MBufferStorageStore(-102, -105)
GetPointsUsed: 67437
SetPointsUsed: 142437
GetPointsUsed: 142437
GetPointsUsed: 142437
SetPointsUsed: 142437
GetPointsUsed: 142437
GetPointsUsed: 142437
SetPointsUsed: 142437
GetPointsUsed: 32724
SetPointsUsed: 107724
GetPointsUsed: 107724
GetPointsUsed: 107724
SetPointsUsed: 107724
GetPointsUsed: 107724
GetPointsUsed: 107724
SetPointsUsed: 107724
VM hook end: MBufferStorageStore(-102, -105)
GetPointsUsed: 142444
GetPointsUsed: 142444
GetPointsUsed: 142444
GetPointsUsed: 142444
GetPointsUsed: 142444
GetPointsUsed: 142444
GetPointsUsed: 142444
GetPointsUsed: 142444
GetPointsUsed: 107731
GetPointsUsed: 107731
GetPointsUsed: 107731
GetPointsUsed: 107731
GetPointsUsed: 107731
GetPointsUsed: 107731
GetPointsUsed: 107731
GetPointsUsed: 107731
Clean: true
`

Expand Down
13 changes: 13 additions & 0 deletions integrationTests/json/scenariosDelegation_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package vmjsonintegrationtest

import (
"runtime"
"testing"
)

func TestDelegation_v0_2(t *testing.T) {
if testing.Short() {
t.Skip("not a short test")
}
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

ScenariosTest(t).
Folder("delegation/v0_2").
Expand All @@ -19,6 +23,9 @@ func TestDelegation_v0_3(t *testing.T) {
if testing.Short() {
t.Skip("not a short test")
}
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

ScenariosTest(t).
Folder("delegation/v0_3").
Expand All @@ -31,6 +38,9 @@ func TestDelegation_v0_4_genesis(t *testing.T) {
if testing.Short() {
t.Skip("not a short test")
}
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

ScenariosTest(t).
Folder("delegation/v0_4_genesis").
Expand All @@ -42,6 +52,9 @@ func TestDelegation_v0_5_latest(t *testing.T) {
if testing.Short() {
t.Skip("not a short test")
}
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

ScenariosTest(t).
Folder("delegation/v0_5_latest").
Expand Down
21 changes: 21 additions & 0 deletions integrationTests/json/scenariosExecutorVersions_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package vmjsonintegrationtest

import (
"runtime"
"testing"

"github.com/multiversx/mx-chain-vm-go/executor"
Expand All @@ -9,20 +10,32 @@ import (
)

func TestCErc20Executors_TwiceW1ThenTwiceW2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
}

func TestCErc20Executors_W1W2W1W2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
}

func TestCErc20Executors_W1W2W2W1W2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
Expand All @@ -31,12 +44,20 @@ func TestCErc20Executors_W1W2W2W1W2(t *testing.T) {
}

func TestCErc20Executors_W2W1W2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
}

func TestCErc20Executors_W2W2W1W2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("skipping test on arm64")
}

testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
Expand Down
4 changes: 2 additions & 2 deletions mock/context/vmHostMock.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type VMHostMock struct {
OutputContext vmhost.OutputContext
MeteringContext vmhost.MeteringContext
StorageContext vmhost.StorageContext
EnableEpochsHandlerField vmcommon.EnableEpochsHandler
EnableEpochsHandlerField vmhost.EnableEpochsHandler
ManagedTypesContext vmhost.ManagedTypesContext

IsBuiltinFunc bool
Expand Down Expand Up @@ -71,7 +71,7 @@ func (host *VMHostMock) Storage() vmhost.StorageContext {
}

// EnableEpochsHandler mocked method
func (host *VMHostMock) EnableEpochsHandler() vmcommon.EnableEpochsHandler {
func (host *VMHostMock) EnableEpochsHandler() vmhost.EnableEpochsHandler {
return host.EnableEpochsHandlerField
}

Expand Down
Loading

0 comments on commit db3113f

Please sign in to comment.