Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ jobs:
echo "mx-chain-simulator-go target branch: ${{ env.MX_CHAIN_SIMULATOR_TARGET_BRANCH }}"
echo "mx-chain-testing-suite target branch: ${{ env.MX_CHAIN_TESTING_SUITE_TARGET_BRANCH }}"

- name: Set up Go 1.20.7
uses: actions/setup-go@v3
- name: Set up Go 1.23.6
uses: actions/setup-go@v5
with:
go-version: 1.20.7
go-version: 1.23.6
id: go

- name: Checkout mx-chain-go
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
runs-on: ${{ matrix.runs-on }}
name: Build
steps:
- name: Set up Go 1.20.7
uses: actions/setup-go@v3
- name: Set up Go 1.23.6
uses: actions/setup-go@v5
with:
go-version: 1.20.7
go-version: 1.23.6
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get dependencies
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check-cli-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
runs-on: ${{ matrix.runs-on }}
name: Check CLI.md
steps:
- name: Set up Go 1.20.7
uses: actions/setup-go@v3
- name: Set up Go 1.23.6
uses: actions/setup-go@v5
with:
go-version: 1.20.7
go-version: 1.23.6
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get dependencies
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
runs-on: ${{ matrix.runs-on }}
name: Build
steps:
- name: Set up Go 1.20.7
uses: actions/setup-go@v3
- name: Set up Go 1.23.6
uses: actions/setup-go@v5
with:
go-version: 1.20.7
go-version: 1.23.6
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get dependencies
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
runs-on: ${{ matrix.runs-on }}
name: Build
steps:
- name: Set up Go 1.20.7
uses: actions/setup-go@v3
- name: Set up Go 1.23.6
uses: actions/setup-go@v5
with:
go-version: 1.20.7
go-version: 1.23.6
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: "0"

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
name: golangci linter
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.20.7
- uses: actions/checkout@v3
go-version: 1.23.6
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.53.2
version: v1.64.5

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/enableEpochs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@
# FixBackTransferOPCODEEnableEpoch represents the epoch when the fix for back transfers opcode will be enabled
FixBackTransferOPCODEEnableEpoch = 2

# ValidationOnGobDecodeEnableEpoch represents the epoch when validation on GobDecode will be taken into account
ValidationOnGobDecodeEnableEpoch = 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

epoch = 2 ?


# BLSMultiSignerEnableEpoch represents the activation epoch for different types of BLS multi-signers
BLSMultiSignerEnableEpoch = [
{ EnableEpoch = 0, Type = "no-KOSK" },
Expand Down
2 changes: 2 additions & 0 deletions cmd/node/config/fullArchiveP2P.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
Type = "default autoscale" #available options "default autoscale", "infinite", "default with manual scale".
ManualSystemMemoryInMB = 0 # not taken into account if the type is not "default with manual scale"
ManualMaximumFD = 0 # not taken into account if the type is not "default with manual scale"
# Ipv4ConnLimit = [] default values will be used
# Ipv6ConnLimit = [] default values will be used

# P2P peer discovery section

Expand Down
2 changes: 2 additions & 0 deletions cmd/node/config/p2p.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
Type = "default autoscale" #available options "default autoscale", "infinite", "default with manual scale".
ManualSystemMemoryInMB = 0 # not taken into account if the type is not "default with manual scale"
ManualMaximumFD = 0 # not taken into account if the type is not "default with manual scale"
# Ipv4ConnLimit = [] default values will be used, details here: https://github.com/libp2p/go-libp2p/pull/2872
# Ipv6ConnLimit = [] default values will be used, details here: https://github.com/libp2p/go-libp2p/pull/2872

# P2P peer discovery section

Expand Down
2 changes: 2 additions & 0 deletions cmd/seednode/config/p2p.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
Type = "default with manual scale"
ManualSystemMemoryInMB = 65536 # pretend that the host running the seeder has more RAM so it can handle more connections
ManualMaximumFD = 1048576
# Ipv4ConnLimit = [] default values will be used
# Ipv6ConnLimit = [] default values will be used

# P2P peer discovery section

Expand Down
4 changes: 4 additions & 0 deletions common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,9 @@ const (
// MetricFixBackTransferOPCODEEnableEpoch represents the epoch when the fix for back transfers opcode will be enabled
MetricFixBackTransferOPCODEEnableEpoch = "erd_fix_back_transfer_opcode_enable_epoch"

// MetricValidationOnGobDecodeEnableEpoch represents the epoch when validation on GobDecode will be taken into account
MetricValidationOnGobDecodeEnableEpoch = "erd_validation_on_gobdecode_enable_epoch"

// MetricMaxNodesChangeEnableEpoch holds configuration for changing the maximum number of nodes and the enabling epoch
MetricMaxNodesChangeEnableEpoch = "erd_max_nodes_change_enable_epoch"

Expand Down Expand Up @@ -1253,5 +1256,6 @@ const (
RelayedTransactionsV3FixESDTTransferFlag core.EnableEpochFlag = "RelayedTransactionsV3FixESDTTransferFlag"
MaskInternalDependenciesErrorsFlag core.EnableEpochFlag = "MaskInternalDependenciesErrorsFlag"
FixBackTransferOPCODEFlag core.EnableEpochFlag = "FixBackTransferOPCODEFlag"
ValidationOnGobDecodeFlag core.EnableEpochFlag = "ValidationOnGobDecodeFlag"
// all new flags must be added to createAllFlagsMap method, as part of enableEpochsHandler allFlagsDefined
)
6 changes: 6 additions & 0 deletions common/enablers/enableEpochsHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,12 @@ func (handler *enableEpochsHandler) createAllFlagsMap() {
},
activationEpoch: handler.enableEpochsConfig.FixBackTransferOPCODEEnableEpoch,
},
common.ValidationOnGobDecodeFlag: {
isActiveInEpoch: func(epoch uint32) bool {
return epoch >= handler.enableEpochsConfig.ValidationOnGobDecodeEnableEpoch
},
activationEpoch: handler.enableEpochsConfig.ValidationOnGobDecodeEnableEpoch,
},
}
}

Expand Down
3 changes: 3 additions & 0 deletions common/enablers/enableEpochsHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func createEnableEpochsConfig() config.EnableEpochs {
RelayedTransactionsV3FixESDTTransferEnableEpoch: 110,
MaskVMInternalDependenciesErrorsEnableEpoch: 111,
FixBackTransferOPCODEEnableEpoch: 112,
ValidationOnGobDecodeEnableEpoch: 113,
}
}

Expand Down Expand Up @@ -329,6 +330,7 @@ func TestEnableEpochsHandler_IsFlagEnabled(t *testing.T) {
require.True(t, handler.IsFlagEnabled(common.DynamicESDTFlag))
require.True(t, handler.IsFlagEnabled(common.FixRelayedBaseCostFlag))
require.True(t, handler.IsFlagEnabled(common.FixRelayedMoveBalanceToNonPayableSCFlag))
require.True(t, handler.IsFlagEnabled(common.DynamicESDTFlag))
}

func TestEnableEpochsHandler_GetActivationEpoch(t *testing.T) {
Expand Down Expand Up @@ -456,6 +458,7 @@ func TestEnableEpochsHandler_GetActivationEpoch(t *testing.T) {
require.Equal(t, cfg.RelayedTransactionsV3FixESDTTransferEnableEpoch, handler.GetActivationEpoch(common.RelayedTransactionsV3FixESDTTransferFlag))
require.Equal(t, cfg.MaskVMInternalDependenciesErrorsEnableEpoch, handler.GetActivationEpoch(common.MaskInternalDependenciesErrorsFlag))
require.Equal(t, cfg.FixBackTransferOPCODEEnableEpoch, handler.GetActivationEpoch(common.FixBackTransferOPCODEFlag))
require.Equal(t, cfg.ValidationOnGobDecodeEnableEpoch, handler.GetActivationEpoch(common.ValidationOnGobDecodeFlag))
}

func TestEnableEpochsHandler_IsInterfaceNil(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions config/epochConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ type EnableEpochs struct {
RelayedTransactionsV3FixESDTTransferEnableEpoch uint32
MaskVMInternalDependenciesErrorsEnableEpoch uint32
FixBackTransferOPCODEEnableEpoch uint32
ValidationOnGobDecodeEnableEpoch uint32
BLSMultiSignerEnableEpoch []MultiSignerConfig
}

Expand Down
4 changes: 4 additions & 0 deletions config/tomlConfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,9 @@ func TestEnableEpochConfig(t *testing.T) {
# FixBackTransferOPCODEEnableEpoch represents the epoch when the fix for back transfers opcode will be enabled
FixBackTransferOPCODEEnableEpoch = 106

# ValidationOnGobDecodeEnableEpoch represents the epoch when validation on GobDecode will be taken into account
ValidationOnGobDecodeEnableEpoch = 107

# MaxNodesChangeEnableEpoch holds configuration for changing the maximum number of nodes and the enabling epoch
MaxNodesChangeEnableEpoch = [
{ EpochEnable = 44, MaxNumNodes = 2169, NodesToShufflePerShard = 80 },
Expand Down Expand Up @@ -1023,6 +1026,7 @@ func TestEnableEpochConfig(t *testing.T) {
RelayedTransactionsV3FixESDTTransferEnableEpoch: 104,
MaskVMInternalDependenciesErrorsEnableEpoch: 105,
FixBackTransferOPCODEEnableEpoch: 106,
ValidationOnGobDecodeEnableEpoch: 107,
MaxNodesChangeEnableEpoch: []MaxNodesChangeConfig{
{
EpochEnable: 44,
Expand Down
14 changes: 7 additions & 7 deletions dataRetriever/txpool/memorytests/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ func TestShardedTxPool_MemoryFootprint(t *testing.T) {
journals = append(journals, runScenario(t, newScenario(10, 1000, 20480, "0"), memoryAssertion{190, 205}, memoryAssertion{1, 4}))
journals = append(journals, runScenario(t, newScenario(10000, 1, 1024, "0"), memoryAssertion{10, 16}, memoryAssertion{0, 10}))
journals = append(journals, runScenario(t, newScenario(1, 60000, 256, "0"), memoryAssertion{30, 40}, memoryAssertion{10, 24}))
journals = append(journals, runScenario(t, newScenario(10, 10000, 100, "0"), memoryAssertion{36, 52}, memoryAssertion{16, 36}))
journals = append(journals, runScenario(t, newScenario(100000, 1, 1024, "0"), memoryAssertion{120, 138}, memoryAssertion{32, 60}))
journals = append(journals, runScenario(t, newScenario(10, 10000, 100, "0"), memoryAssertion{36, 53}, memoryAssertion{16, 36}))
journals = append(journals, runScenario(t, newScenario(100000, 1, 1024, "0"), memoryAssertion{120, 140}, memoryAssertion{32, 60}))

// With larger memory footprint

journals = append(journals, runScenario(t, newScenario(100000, 3, 650, "0"), memoryAssertion{290, 335}, memoryAssertion{80, 148}))
journals = append(journals, runScenario(t, newScenario(150000, 2, 650, "0"), memoryAssertion{290, 335}, memoryAssertion{90, 160}))
journals = append(journals, runScenario(t, newScenario(300000, 1, 650, "0"), memoryAssertion{290, 335}, memoryAssertion{100, 190}))
journals = append(journals, runScenario(t, newScenario(30, 10000, 650, "0"), memoryAssertion{290, 335}, memoryAssertion{60, 132}))
journals = append(journals, runScenario(t, newScenario(300, 1000, 650, "0"), memoryAssertion{290, 335}, memoryAssertion{60, 148}))
journals = append(journals, runScenario(t, newScenario(100000, 3, 650, "0"), memoryAssertion{290, 340}, memoryAssertion{80, 148}))
journals = append(journals, runScenario(t, newScenario(150000, 2, 650, "0"), memoryAssertion{290, 340}, memoryAssertion{90, 160}))
journals = append(journals, runScenario(t, newScenario(300000, 1, 650, "0"), memoryAssertion{290, 340}, memoryAssertion{100, 190}))
journals = append(journals, runScenario(t, newScenario(30, 10000, 650, "0"), memoryAssertion{290, 340}, memoryAssertion{60, 132}))
journals = append(journals, runScenario(t, newScenario(300, 1000, 650, "0"), memoryAssertion{290, 340}, memoryAssertion{60, 148}))
Comment on lines +41 to +50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to relayed v3, I think, right?


// Scenarios where destination == me

Expand Down
2 changes: 1 addition & 1 deletion docker/keygenerator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.7 AS builder
FROM golang:1.23.6 AS builder

RUN apt-get update && apt-get install -y
WORKDIR /go/mx-chain-go
Expand Down
2 changes: 1 addition & 1 deletion docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.7 AS builder
FROM golang:1.23.6 AS builder

RUN apt-get update && apt-get upgrade -y
WORKDIR /go/mx-chain-go
Expand Down
2 changes: 1 addition & 1 deletion docker/seednode/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.7 AS builder
FROM golang:1.23.6 AS builder

RUN apt-get update && apt-get install -y
WORKDIR /go/mx-chain-go
Expand Down
2 changes: 1 addition & 1 deletion docker/termui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.7 AS builder
FROM golang:1.23.6 AS builder
RUN apt-get update && apt-get install -y
WORKDIR /go/mx-chain-go
COPY . .
Expand Down
Loading
Loading