Skip to content

Commit 10ff47f

Browse files
authored
Merge pull request #853 from multiversx/update_go_1.22
update go to 1.23
2 parents 9fc1aa9 + 604d44b commit 10ff47f

File tree

15 files changed

+182
-72
lines changed

15 files changed

+182
-72
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ jobs:
1111
test:
1212
strategy:
1313
matrix:
14-
go-version: [1.20.7]
14+
go-version: [1.23.6]
1515
os: [ubuntu-latest, macos-13]
1616
runs-on: ${{ matrix.os }}
1717
steps:
1818
- name: Install Go
19-
uses: actions/setup-go@v2
19+
uses: actions/setup-go@v5
2020
with:
2121
go-version: ${{ matrix.go-version }}
2222
- name: Checkout code
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2424

2525
- name: Test (Linux)
2626
if: runner.os == 'Linux'

.github/workflows/code-coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
name: Build
1717
steps:
1818
- name: Set up Go 1.x
19-
uses: actions/setup-go@v2
19+
uses: actions/setup-go@v5
2020
with:
21-
go-version: 1.20.7
21+
go-version: 1.23.6
2222
id: go
2323

2424
- name: Check out code into the Go module directory
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626

2727
- name: Get dependencies
2828
run: |

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
name: golangci linter
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/setup-go@v3
17+
- uses: actions/setup-go@v5
1818
with:
19-
go-version: 1.20.7
20-
- uses: actions/checkout@v3
19+
go-version: 1.23.6
20+
- uses: actions/checkout@v4
2121
- name: golangci-lint
22-
uses: golangci/golangci-lint-action@v3
22+
uses: golangci/golangci-lint-action@v6
2323
with:
2424
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
25-
version: v1.53.2
25+
version: v1.64.5
2626

2727
# Optional: working directory, useful for monorepos
2828
# working-directory: somedir

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
module github.com/multiversx/mx-chain-vm-go
22

3-
go 1.20
3+
go 1.23
44

55
require (
66
github.com/awalterschulze/gographviz v2.0.3+incompatible
77
github.com/btcsuite/btcd/btcec/v2 v2.3.2
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.22
12-
github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f
13-
github.com/multiversx/mx-chain-logger-go v1.0.15
14-
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218130524-4d5a15e117af
15-
github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf
16-
github.com/multiversx/mx-chain-vm-common-go v1.5.17-0.20241021074004-c2bdb78da54a
17-
github.com/multiversx/mx-components-big-int v1.0.0
11+
github.com/multiversx/mx-chain-core-go v1.2.25-0.20250218161123-121084ae9840
12+
github.com/multiversx/mx-chain-crypto-go v1.2.13-0.20250218161752-9482d9a22234
13+
github.com/multiversx/mx-chain-logger-go v1.0.16-0.20250218161408-6a0c19d0da48
14+
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218162624-877d8b9870a4
15+
github.com/multiversx/mx-chain-storage-go v1.0.20-0.20250218162234-85e60acebb43
16+
github.com/multiversx/mx-chain-vm-common-go v1.5.17-0.20250218162215-88938774627c
17+
github.com/multiversx/mx-components-big-int v1.0.1-0.20250218162530-b4e4d7442408
1818
github.com/pelletier/go-toml v1.9.3
1919
github.com/stretchr/testify v1.8.1
2020
github.com/urfave/cli/v2 v2.27.1

go.sum

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,20 @@ 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.22 h1:yDYrvoQOBbsDerEp7L3+de5AfMy3pTF333gWPpd+FNk=
87-
github.com/multiversx/mx-chain-core-go v1.2.22/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE=
88-
github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f h1:jydjrmVFvSllBOTppveOAkLITpOYKk0kma5z0bfDImI=
89-
github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f/go.mod h1:9aSp//uBSvqFdzh4gvYISraoruhr1FCTXgPQalQ687k=
90-
github.com/multiversx/mx-chain-logger-go v1.0.15 h1:HlNdK8etyJyL9NQ+6mIXyKPEBo+wRqOwi3n+m2QIHXc=
91-
github.com/multiversx/mx-chain-logger-go v1.0.15/go.mod h1:t3PRKaWB1M+i6gUfD27KXgzLJJC+mAQiN+FLlL1yoGQ=
92-
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218130524-4d5a15e117af h1:6ORdoM22EjKrzPXU14ddCpqmP++v9Pz3vGo+lNPv1ac=
93-
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218130524-4d5a15e117af/go.mod h1:sLKkfFGXK8EtnjBKmPcTZ0pbVGPsnUVFKOc2kWhGdFU=
94-
github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf h1:L9K7Xzq5SZz6k55R7HrafiRcU+c8/PqozJxys65G4bI=
95-
github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf/go.mod h1:ptvW/8r6bam55mVpeVZbyvvvydYM0DQwcPOH0W4Xyx8=
96-
github.com/multiversx/mx-chain-vm-common-go v1.5.17-0.20241021074004-c2bdb78da54a h1:+D5GR9SkHTkKU6fIMZLdSQHeIzbDzOT6fSJfKBG80+g=
97-
github.com/multiversx/mx-chain-vm-common-go v1.5.17-0.20241021074004-c2bdb78da54a/go.mod h1:1rSkXreUZNXyPTTdhj47M+Fy62yjxbu3aAsXEtKN3UY=
98-
github.com/multiversx/mx-components-big-int v1.0.0 h1:Wkr8lSzK2nDqixOrrBa47VNuqdhV1m/aJhaP1EMaiS8=
99-
github.com/multiversx/mx-components-big-int v1.0.0/go.mod h1:maIEMgHlNE2u78JaDD0oLzri+ShgU4okHfzP3LWGdQM=
86+
github.com/multiversx/mx-chain-core-go v1.2.25-0.20250218161123-121084ae9840 h1:rwIljKJpbNLWNBj/oMdcbCKU910JytOXJoBqDYnfres=
87+
github.com/multiversx/mx-chain-core-go v1.2.25-0.20250218161123-121084ae9840/go.mod h1:IO+vspNan+gT0WOHnJ95uvWygiziHZvfXpff6KnxV7g=
88+
github.com/multiversx/mx-chain-crypto-go v1.2.13-0.20250218161752-9482d9a22234 h1:NNI7kYxzsq+4mTPSUJo0cK1+iPxjUX+gRJDaBRwEQ7M=
89+
github.com/multiversx/mx-chain-crypto-go v1.2.13-0.20250218161752-9482d9a22234/go.mod h1:QZAw2bZcOxGQRgYACTrmP8pfTa3NyxENIL+00G6nM5E=
90+
github.com/multiversx/mx-chain-logger-go v1.0.16-0.20250218161408-6a0c19d0da48 h1:Of8RfTBNqJMvfWrDEpAkCAmNjYciM/Hul+yECQMBSHY=
91+
github.com/multiversx/mx-chain-logger-go v1.0.16-0.20250218161408-6a0c19d0da48/go.mod h1:PZMaAr6nhEWgOV04JKBwFNrws0gvHzHW0WaeqnBlGlc=
92+
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218162624-877d8b9870a4 h1:Q/iRXtZ6HhPQ6mV5/KWzg9WeamM90JV/WNQj8uP93ls=
93+
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218162624-877d8b9870a4/go.mod h1:9WV9g7ZOf+7ytXri7KRGInNbJSExUpcZ1BUKbWkJKps=
94+
github.com/multiversx/mx-chain-storage-go v1.0.20-0.20250218162234-85e60acebb43 h1:gmd10vRDOK3QJ7njD/iafV/uaNXl/6QEZf+s+CH9k4c=
95+
github.com/multiversx/mx-chain-storage-go v1.0.20-0.20250218162234-85e60acebb43/go.mod h1:tTVMcXx0UWdMymMv3N8b1D1P1XSQwfyGK6xwMlRoONo=
96+
github.com/multiversx/mx-chain-vm-common-go v1.5.17-0.20250218162215-88938774627c h1:4L3SY1so6MwfmfO7+MGOhGtDxhVW5PtW6JG48sZmHNE=
97+
github.com/multiversx/mx-chain-vm-common-go v1.5.17-0.20250218162215-88938774627c/go.mod h1:NGcFCdOnbpEdk042ixTgD6xavRFQ7ap0z3kBhTXKlDQ=
98+
github.com/multiversx/mx-components-big-int v1.0.1-0.20250218162530-b4e4d7442408 h1:FbpVQJg14ry25DiBBZIvBoKiSrTHWkUSlYMOOW/iQJQ=
99+
github.com/multiversx/mx-components-big-int v1.0.1-0.20250218162530-b4e4d7442408/go.mod h1:kcWw7hDe6cSz1wcBAqj/6sFH6ouSPsNeH9P7XlpZRcw=
100100
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
101101
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
102102
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=

test/features/big-float-features/scenarios/big_float_operator_checks.scen.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"expect": {
3333
"out": [],
3434
"status": "10",
35-
"message": "str:this big Float operation is not permitted while doing float.Add"
35+
"message": "str:big float decode error"
3636
}
3737
},
3838
{
@@ -72,7 +72,7 @@
7272
"expect": {
7373
"out": [],
7474
"status": "10",
75-
"message": "str:this big Float operation is not permitted while doing float.Sub"
75+
"message": "str:big float decode error"
7676
}
7777
}
7878
]

testcommon/instanceSmartContractCallerTest.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ func (template *InstanceCallTestTemplate) WithWasmerSIGSEGVPassthrough(passthrou
123123
return template
124124
}
125125

126+
// WithEnableEpochsHandler provides the enable epochs handler to be used by the mock contract call test
127+
func (template *InstanceCallTestTemplate) WithEnableEpochsHandler(handler vmhost.EnableEpochsHandler) *InstanceCallTestTemplate {
128+
template.hostBuilder.WithEnableEpochsHandler(handler)
129+
return template
130+
}
131+
126132
// GetVMHost returns the inner VMHost
127133
func (template *InstanceCallTestTemplate) GetVMHost() vmhost.VMHost {
128134
return template.host

testcommon/instanceSmartContractCreatorTest.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ func (template *InstanceCreatorTestTemplate) WithWasmerSIGSEGVPassthrough(passth
5858
return template
5959
}
6060

61+
// WithEnableEpochsHandler sets the enableEpochsHandler
62+
func (template *InstanceCreatorTestTemplate) WithEnableEpochsHandler(enableEpochsHandler vmcommon.EnableEpochsHandler) *InstanceCreatorTestTemplate {
63+
template.hostBuilder.WithEnableEpochsHandler(enableEpochsHandler)
64+
return template
65+
}
66+
6167
// WithAddress provides the address for a TestCreateTemplateConfig
6268
func (template *InstanceCreatorTestTemplate) WithAddress(address []byte) *InstanceCreatorTestTemplate {
6369
template.address = address

testcommon/testHostBuilder.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ func (thb *TestHostBuilder) WithGasSchedule(gasSchedule config.GasScheduleMap) *
112112
return thb
113113
}
114114

115+
// WithEnableEpochsHandler sets an enable epochs handler for the VM to work with.
116+
func (thb *TestHostBuilder) WithEnableEpochsHandler(handler vmcommon.EnableEpochsHandler) *TestHostBuilder {
117+
thb.vmHostParameters.EnableEpochsHandler = handler
118+
return thb
119+
}
120+
115121
// Build initializes the VM host with all configured options.
116122
func (thb *TestHostBuilder) Build() vmhost.VMHost {
117123
thb.initializeHost()

vmhost/contexts/runtime.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import (
44
"bytes"
55
"errors"
66
"fmt"
7+
builtinMath "math"
8+
"math/big"
9+
710
"github.com/multiversx/mx-chain-core-go/core/check"
811
logger "github.com/multiversx/mx-chain-logger-go"
912
vmcommon "github.com/multiversx/mx-chain-vm-common-go"
1013
"github.com/multiversx/mx-chain-vm-go/executor"
1114
"github.com/multiversx/mx-chain-vm-go/vmhost"
12-
builtinMath "math"
13-
"math/big"
1415
)
1516

1617
var logRuntime = logger.GetOrCreate("vm/runtime")

0 commit comments

Comments
 (0)