Skip to content

Commit db3113f

Browse files
Merge pull request #783 from multiversx/rc/v1.7.0
Rc/v1.7.0
2 parents 2b2ede9 + 2e39b23 commit db3113f

34 files changed

+315
-189
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build and run tests (MacOS ARM64)
2+
3+
on:
4+
push:
5+
branches: [master, rc/*, feat/*]
6+
pull_request:
7+
branches: [master, feat/*, rc/*]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
strategy:
13+
matrix:
14+
go-version: [1.20.7]
15+
runs-on: macos-13-xlarge
16+
steps:
17+
- name: Install Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: ${{ matrix.go-version }}
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
- name: Test
24+
run: |
25+
make test-w2

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
go-version: [1.20.7]
15-
os: [ubuntu-latest]
15+
os: [ubuntu-latest, macos-latest]
1616
runs-on: ${{ matrix.os }}
1717
steps:
1818
- name: Install Go

.travis.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

go.mod

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ require (
88
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
99
github.com/gogo/protobuf v1.3.2
1010
github.com/mitchellh/mapstructure v1.5.0
11-
github.com/multiversx/mx-chain-core-go v1.2.18
12-
github.com/multiversx/mx-chain-crypto-go v1.2.9
13-
github.com/multiversx/mx-chain-logger-go v1.0.13
14-
github.com/multiversx/mx-chain-scenario-go v1.4.1
15-
github.com/multiversx/mx-chain-vm-common-go v1.5.11
11+
github.com/multiversx/mx-chain-core-go v1.2.19
12+
github.com/multiversx/mx-chain-crypto-go v1.2.11
13+
github.com/multiversx/mx-chain-logger-go v1.0.14
14+
github.com/multiversx/mx-chain-scenario-go v1.4.3
15+
github.com/multiversx/mx-chain-storage-go v1.0.15
16+
github.com/multiversx/mx-chain-vm-common-go v1.5.12
1617
github.com/multiversx/mx-components-big-int v1.0.0
1718
github.com/pelletier/go-toml v1.9.3
1819
github.com/stretchr/testify v1.8.1

go.sum

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,18 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
8383
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
8484
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
8585
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
86-
github.com/multiversx/mx-chain-core-go v1.2.18 h1:fnub2eFL7XYOLrKKVZAPPsaM1TWEnaK5qqY3FLUv168=
87-
github.com/multiversx/mx-chain-core-go v1.2.18/go.mod h1:BILOGHUOIG5dNNX8cgkzCNfDaVtoYrJRYcPnpxRMH84=
88-
github.com/multiversx/mx-chain-crypto-go v1.2.9 h1:OEfF2kOQrtzUl273Z3DEcshjlTVUfPpJMd0R0SvTrlU=
89-
github.com/multiversx/mx-chain-crypto-go v1.2.9/go.mod h1:fkaWKp1rbQN9wPKya5jeoRyC+c/SyN/NfggreyeBw+8=
90-
github.com/multiversx/mx-chain-logger-go v1.0.13 h1:eru/TETo0MkO4ZTnXsQDKf4PBRpAXmqjT02klNT/JnY=
91-
github.com/multiversx/mx-chain-logger-go v1.0.13/go.mod h1:MZJhTAtZTJxT+yK2EHc4ZW3YOHUc1UdjCD0iahRNBZk=
92-
github.com/multiversx/mx-chain-scenario-go v1.4.1 h1:CrVXb1aNBRiFfSfpoMAUoGUy2aNXke5WnoesLdFxC2g=
93-
github.com/multiversx/mx-chain-scenario-go v1.4.1/go.mod h1:Sdgz8nzA9Ki/pdY/e2a4k90LALBKQB1Eo8HeCV3Bkzo=
94-
github.com/multiversx/mx-chain-vm-common-go v1.5.11 h1:rAQR00ALKOmWAuNA8XW8hR02M9gmrAE4WZwyJH4dMMU=
95-
github.com/multiversx/mx-chain-vm-common-go v1.5.11/go.mod h1:T04rZt/VdwjPXcXVxltMmDmrhxNXsqlByYbWNWcNLYA=
86+
github.com/multiversx/mx-chain-core-go v1.2.19 h1:2BaVHkB0tro3cjs5ay2pmLup1loCV0e1p9jV5QW0xqc=
87+
github.com/multiversx/mx-chain-core-go v1.2.19/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE=
88+
github.com/multiversx/mx-chain-crypto-go v1.2.11 h1:MNPJoiTJA5/tedYrI0N22OorbsKDESWG0SF8MCJwcJI=
89+
github.com/multiversx/mx-chain-crypto-go v1.2.11/go.mod h1:pcZutPdfLiAFytzCU3LxU3s8cXkvpNqquyitFSfoF3o=
90+
github.com/multiversx/mx-chain-logger-go v1.0.14 h1:PRMpAvXE7Nec2d//QNmbYfKVHMomOKmcN4UXurQWX9o=
91+
github.com/multiversx/mx-chain-logger-go v1.0.14/go.mod h1:bDfHSdwqIimn7Gp8w+SH5KlDuGzJ//nlyEANAaTSc3o=
92+
github.com/multiversx/mx-chain-scenario-go v1.4.3 h1:9xeVB8TOsolXS4YEr1CZ/VZr5Qk0X+nde8nRGnxJICo=
93+
github.com/multiversx/mx-chain-scenario-go v1.4.3/go.mod h1:Bd7/Xs3mWM6pX/REHK5dfpf3MUfjMZ7li09cfCxg2ac=
94+
github.com/multiversx/mx-chain-storage-go v1.0.15 h1:PDyP1uouAVjR32dFgM+7iaQBdReD/tKBJj10JbxXvaE=
95+
github.com/multiversx/mx-chain-storage-go v1.0.15/go.mod h1:GZUK3sqf5onsWS/0ZPWjDCBjAL22FigQPUh252PAVk0=
96+
github.com/multiversx/mx-chain-vm-common-go v1.5.12 h1:Q8F6DE7XhgHtWgg2rozSv4Tv5fE3ENkJz6mjRoAfht8=
97+
github.com/multiversx/mx-chain-vm-common-go v1.5.12/go.mod h1:Sv6iS1okB6gy3HAsW6KHYtAxShNAfepKLtu//AURI8c=
9698
github.com/multiversx/mx-components-big-int v1.0.0 h1:Wkr8lSzK2nDqixOrrBa47VNuqdhV1m/aJhaP1EMaiS8=
9799
github.com/multiversx/mx-components-big-int v1.0.0/go.mod h1:maIEMgHlNE2u78JaDD0oLzri+ShgU4okHfzP3LWGdQM=
98100
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=

integrationTests/json/scenariosAdderLog_test.go

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,26 @@ GetPointsUsed: 5291
7575
SetPointsUsed: 6291
7676
GetPointsUsed: 6291
7777
GetPointsUsed: 6291
78-
SetPointsUsed: 56291
78+
SetPointsUsed: 21578
7979
VM hook end: MBufferStorageLoad(-101, -102)
8080
VM hook begin: MBufferToBigIntUnsigned(-102, -103)
81-
GetPointsUsed: 56324
82-
SetPointsUsed: 60324
81+
GetPointsUsed: 21611
82+
SetPointsUsed: 25611
8383
VM hook end: MBufferToBigIntUnsigned(-102, -103)
8484
VM hook begin: BigIntFinishUnsigned(-103)
85-
GetPointsUsed: 60335
86-
SetPointsUsed: 61335
87-
GetPointsUsed: 61335
88-
SetPointsUsed: 71335
85+
GetPointsUsed: 25622
86+
SetPointsUsed: 26622
87+
GetPointsUsed: 26622
88+
SetPointsUsed: 36622
8989
VM hook end: BigIntFinishUnsigned(-103)
90-
GetPointsUsed: 71337
91-
GetPointsUsed: 71337
92-
GetPointsUsed: 71337
93-
GetPointsUsed: 71337
94-
GetPointsUsed: 71337
95-
GetPointsUsed: 71337
96-
GetPointsUsed: 71337
97-
GetPointsUsed: 71337
90+
GetPointsUsed: 36624
91+
GetPointsUsed: 36624
92+
GetPointsUsed: 36624
93+
GetPointsUsed: 36624
94+
GetPointsUsed: 36624
95+
GetPointsUsed: 36624
96+
GetPointsUsed: 36624
97+
GetPointsUsed: 36624
9898
Reset: true
9999
SetPointsUsed: 0
100100
SetGasLimit: 3790900
@@ -124,38 +124,38 @@ GetPointsUsed: 6333
124124
SetPointsUsed: 7333
125125
GetPointsUsed: 7333
126126
GetPointsUsed: 7333
127-
SetPointsUsed: 57333
127+
SetPointsUsed: 22620
128128
VM hook end: MBufferStorageLoad(-102, -103)
129129
VM hook begin: MBufferToBigIntUnsigned(-103, -104)
130-
GetPointsUsed: 57366
131-
SetPointsUsed: 61366
130+
GetPointsUsed: 22653
131+
SetPointsUsed: 26653
132132
VM hook end: MBufferToBigIntUnsigned(-103, -104)
133133
VM hook begin: BigIntAdd(-104, -104, -101)
134-
GetPointsUsed: 61386
135-
SetPointsUsed: 63386
134+
GetPointsUsed: 26673
135+
SetPointsUsed: 28673
136136
VM hook end: BigIntAdd(-104, -104, -101)
137137
VM hook begin: MBufferFromBigIntUnsigned(-105, -104)
138-
GetPointsUsed: 63425
139-
SetPointsUsed: 67425
138+
GetPointsUsed: 28712
139+
SetPointsUsed: 32712
140140
VM hook end: MBufferFromBigIntUnsigned(-105, -104)
141141
VM hook begin: MBufferStorageStore(-102, -105)
142-
GetPointsUsed: 67437
143-
SetPointsUsed: 142437
144-
GetPointsUsed: 142437
145-
GetPointsUsed: 142437
146-
SetPointsUsed: 142437
147-
GetPointsUsed: 142437
148-
GetPointsUsed: 142437
149-
SetPointsUsed: 142437
142+
GetPointsUsed: 32724
143+
SetPointsUsed: 107724
144+
GetPointsUsed: 107724
145+
GetPointsUsed: 107724
146+
SetPointsUsed: 107724
147+
GetPointsUsed: 107724
148+
GetPointsUsed: 107724
149+
SetPointsUsed: 107724
150150
VM hook end: MBufferStorageStore(-102, -105)
151-
GetPointsUsed: 142444
152-
GetPointsUsed: 142444
153-
GetPointsUsed: 142444
154-
GetPointsUsed: 142444
155-
GetPointsUsed: 142444
156-
GetPointsUsed: 142444
157-
GetPointsUsed: 142444
158-
GetPointsUsed: 142444
151+
GetPointsUsed: 107731
152+
GetPointsUsed: 107731
153+
GetPointsUsed: 107731
154+
GetPointsUsed: 107731
155+
GetPointsUsed: 107731
156+
GetPointsUsed: 107731
157+
GetPointsUsed: 107731
158+
GetPointsUsed: 107731
159159
Clean: true
160160
`
161161

integrationTests/json/scenariosDelegation_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
package vmjsonintegrationtest
22

33
import (
4+
"runtime"
45
"testing"
56
)
67

78
func TestDelegation_v0_2(t *testing.T) {
89
if testing.Short() {
910
t.Skip("not a short test")
1011
}
12+
if runtime.GOARCH == "arm64" {
13+
t.Skip("skipping test on arm64")
14+
}
1115

1216
ScenariosTest(t).
1317
Folder("delegation/v0_2").
@@ -19,6 +23,9 @@ func TestDelegation_v0_3(t *testing.T) {
1923
if testing.Short() {
2024
t.Skip("not a short test")
2125
}
26+
if runtime.GOARCH == "arm64" {
27+
t.Skip("skipping test on arm64")
28+
}
2229

2330
ScenariosTest(t).
2431
Folder("delegation/v0_3").
@@ -31,6 +38,9 @@ func TestDelegation_v0_4_genesis(t *testing.T) {
3138
if testing.Short() {
3239
t.Skip("not a short test")
3340
}
41+
if runtime.GOARCH == "arm64" {
42+
t.Skip("skipping test on arm64")
43+
}
3444

3545
ScenariosTest(t).
3646
Folder("delegation/v0_4_genesis").
@@ -42,6 +52,9 @@ func TestDelegation_v0_5_latest(t *testing.T) {
4252
if testing.Short() {
4353
t.Skip("not a short test")
4454
}
55+
if runtime.GOARCH == "arm64" {
56+
t.Skip("skipping test on arm64")
57+
}
4558

4659
ScenariosTest(t).
4760
Folder("delegation/v0_5_latest").

integrationTests/json/scenariosExecutorVersions_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package vmjsonintegrationtest
22

33
import (
4+
"runtime"
45
"testing"
56

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

1112
func TestCErc20Executors_TwiceW1ThenTwiceW2(t *testing.T) {
13+
if runtime.GOARCH == "arm64" {
14+
t.Skip("skipping test on arm64")
15+
}
16+
1217
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
1318
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
1419
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
1520
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
1621
}
1722

1823
func TestCErc20Executors_W1W2W1W2(t *testing.T) {
24+
if runtime.GOARCH == "arm64" {
25+
t.Skip("skipping test on arm64")
26+
}
27+
1928
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
2029
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
2130
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
2231
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
2332
}
2433

2534
func TestCErc20Executors_W1W2W2W1W2(t *testing.T) {
35+
if runtime.GOARCH == "arm64" {
36+
t.Skip("skipping test on arm64")
37+
}
38+
2639
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
2740
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
2841
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
@@ -31,12 +44,20 @@ func TestCErc20Executors_W1W2W2W1W2(t *testing.T) {
3144
}
3245

3346
func TestCErc20Executors_W2W1W2(t *testing.T) {
47+
if runtime.GOARCH == "arm64" {
48+
t.Skip("skipping test on arm64")
49+
}
50+
3451
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
3552
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())
3653
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
3754
}
3855

3956
func TestCErc20Executors_W2W2W1W2(t *testing.T) {
57+
if runtime.GOARCH == "arm64" {
58+
t.Skip("skipping test on arm64")
59+
}
60+
4061
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
4162
testCERC20WithExecutorFactory(t, wasmer2.ExecutorFactory())
4263
testCERC20WithExecutorFactory(t, wasmer.ExecutorFactory())

mock/context/vmHostMock.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type VMHostMock struct {
2323
OutputContext vmhost.OutputContext
2424
MeteringContext vmhost.MeteringContext
2525
StorageContext vmhost.StorageContext
26-
EnableEpochsHandlerField vmcommon.EnableEpochsHandler
26+
EnableEpochsHandlerField vmhost.EnableEpochsHandler
2727
ManagedTypesContext vmhost.ManagedTypesContext
2828

2929
IsBuiltinFunc bool
@@ -71,7 +71,7 @@ func (host *VMHostMock) Storage() vmhost.StorageContext {
7171
}
7272

7373
// EnableEpochsHandler mocked method
74-
func (host *VMHostMock) EnableEpochsHandler() vmcommon.EnableEpochsHandler {
74+
func (host *VMHostMock) EnableEpochsHandler() vmhost.EnableEpochsHandler {
7575
return host.EnableEpochsHandlerField
7676
}
7777

0 commit comments

Comments
 (0)