Skip to content

Commit

Permalink
Merge pull request #3447 from ElrondNetwork/power-in-decentralization
Browse files Browse the repository at this point in the history
Power in decentralization
  • Loading branch information
sasurobert authored Sep 21, 2021
2 parents 3480081 + 0a86875 commit 15fa38e
Show file tree
Hide file tree
Showing 32 changed files with 447 additions and 4 deletions.
3 changes: 3 additions & 0 deletions cmd/node/config/enableEpochs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
# BuiltInFunctionOnMetaEnableEpoch represents the epoch when built in function processing on metachain is enabled
BuiltInFunctionOnMetaEnableEpoch = 5

# StakeLimitsEnableEpoch represents the epoch when stake limits on validators are enabled
StakeLimitsEnableEpoch = 5

# MaxNodesChangeEnableEpoch holds configuration for changing the maximum number of nodes and the enabling epoch
MaxNodesChangeEnableEpoch = [
{ EpochEnable = 0, MaxNumNodes = 36, NodesToShufflePerShard = 4 },
Expand Down
2 changes: 2 additions & 0 deletions cmd/node/config/systemSmartContractsConfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
MaxNumberOfNodesForStake = 36
UnJailValue = "2500000000000000000" #0.1% of genesis node price
ActivateBLSPubKeyMessageVerification = false
StakeLimitPercentage = 0.01 #fraction of value 0.01 - 1%
NodeLimitPercentage = 0.005 #fraction of value 0.005 - 0.5%

[ESDTSystemSCConfig]
BaseIssuingCost = "5000000000000000000" #5 eGLD
Expand Down
1 change: 1 addition & 0 deletions config/epochConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ type EnableEpochs struct {
GlobalMintBurnDisableEpoch uint32
ESDTTransferRoleEnableEpoch uint32
BuiltInFunctionOnMetaEnableEpoch uint32
StakeLimitsEnableEpoch uint32
}

// GasScheduleByEpochs represents a gas schedule toml entry that will be applied from the provided epoch
Expand Down
2 changes: 2 additions & 0 deletions config/systemSmartContractsConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ type StakingSystemSCConfig struct {
BleedPercentagePerRound float64
MaxNumberOfNodesForStake uint64
ActivateBLSPubKeyMessageVerification bool
StakeLimitPercentage float64
NodeLimitPercentage float64
}

// ESDTSystemSCConfig defines a set of constant to initialize the esdt system smart contract
Expand Down
4 changes: 4 additions & 0 deletions epochStart/metachain/systemSCs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,8 @@ func createFullArgumentsForSystemSCProcessing(stakingV2EnableEpoch uint32, trieS
MaxNumberOfNodesForStake: 5,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand All @@ -987,9 +989,11 @@ func createFullArgumentsForSystemSCProcessing(stakingV2EnableEpoch uint32, trieS
StakeEnableEpoch: 0,
DelegationManagerEnableEpoch: 0,
DelegationSmartContractEnableEpoch: 0,
StakeLimitsEnableEpoch: 10,
},
},
ShardCoordinator: &mock.ShardCoordinatorStub{},
NodesCoordinator: &mock.NodesCoordinatorStub{},
}
metaVmFactory, _ := metaProcess.NewVMContainerFactory(argsNewVMContainerFactory)

Expand Down
4 changes: 4 additions & 0 deletions epochStart/mock/nodesCoordinatorStub.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type NodesCoordinatorStub struct {
GetValidatorWithPublicKeyCalled func(publicKey []byte) (validator sharding.Validator, shardId uint32, err error)
GetAllValidatorsPublicKeysCalled func() (map[uint32][][]byte, error)
ConsensusGroupSizeCalled func(shardID uint32) int
GetNumTotalEligibleCalled func() uint64
}

// GetChance -
Expand Down Expand Up @@ -52,6 +53,9 @@ func (ncm *NodesCoordinatorStub) GetAllWaitingValidatorsPublicKeys(_ uint32) (ma

// GetNumTotalEligible -
func (ncm *NodesCoordinatorStub) GetNumTotalEligible() uint64 {
if ncm.GetNumTotalEligibleCalled != nil {
return ncm.GetNumTotalEligibleCalled()
}
return 1
}

Expand Down
1 change: 1 addition & 0 deletions factory/apiResolverFactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ func createScQueryElement(
EpochNotifier: args.coreComponents.EpochNotifier(),
EpochConfig: args.epochConfig,
ShardCoordinator: args.processComponents.ShardCoordinator(),
NodesCoordinator: args.processComponents.NodesCoordinator(),
}
vmFactory, err = metachain.NewVMContainerFactory(argsNewVmFactory)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions factory/blockProcessorCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ func (pcf *processComponentsFactory) newMetaBlockProcessor(
EpochNotifier: pcf.coreData.EpochNotifier(),
EpochConfig: &pcf.epochConfig,
ShardCoordinator: pcf.bootstrapComponents.ShardCoordinator(),
NodesCoordinator: pcf.nodesCoordinator,
}
vmFactory, err := metachain.NewVMContainerFactory(argsNewVMContainer)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions factory/processComponents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ func getProcessArgs(
MaxNumberOfNodesForStake: 10,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand Down
15 changes: 15 additions & 0 deletions genesis/process/disabled/nodesCoordinator.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package disabled

// NodesCoordinator implements the NodesCoordinator interface, it does nothing as it is disabled
type NodesCoordinator struct {
}

// GetNumTotalEligible -
func (n *NodesCoordinator) GetNumTotalEligible() uint64 {
return 1600
}

// IsInterfaceNil -
func (n *NodesCoordinator) IsInterfaceNil() bool {
return n == nil
}
3 changes: 3 additions & 0 deletions genesis/process/genesisBlockCreator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func createMockArgument(
MaxNumberOfNodesForStake: 10,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand All @@ -129,6 +131,7 @@ func createMockArgument(
SCDeployEnableEpoch: 0,
RelayedTransactionsEnableEpoch: 0,
PenalizedTooMuchGasEnableEpoch: 0,
StakeLimitsEnableEpoch: 10,
},
},
}
Expand Down
1 change: 1 addition & 0 deletions genesis/process/metaGenesisBlockCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ func createProcessorsForMetaGenesisBlock(arg ArgsGenesisBlockCreator, enableEpoc
EpochNotifier: epochNotifier,
EpochConfig: arg.EpochConfig,
ShardCoordinator: arg.ShardCoordinator,
NodesCoordinator: &disabled.NodesCoordinator{},
}
virtualMachineFactory, err := metachain.NewVMContainerFactory(argsNewVMContainerFactory)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions genesis/process/shardGenesisBlockCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func createGenesisConfig() config.EnableEpochs {
RelayedTransactionsV2EnableEpoch: unreachableEpoch,
BuiltInFunctionOnMetaEnableEpoch: unreachableEpoch,
IncrementSCRNonceInMultiTransferEnableEpoch: unreachableEpoch,
StakeLimitsEnableEpoch: unreachableEpoch,
}
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ require (
github.com/ElrondNetwork/arwen-wasm-vm/v1_4 v1.4.12
github.com/ElrondNetwork/concurrent-map v0.1.3
github.com/ElrondNetwork/elastic-indexer-go v1.0.8
github.com/ElrondNetwork/elrond-go-core v1.0.1-0.20210802100738-75f99b3e75a0
github.com/ElrondNetwork/elrond-go-core v1.1.0
github.com/ElrondNetwork/elrond-go-crypto v1.0.1
github.com/ElrondNetwork/elrond-go-logger v1.0.5
github.com/ElrondNetwork/elrond-vm-common v1.1.9
github.com/ElrondNetwork/elrond-vm-common v1.2.1
github.com/ElrondNetwork/notifier-go v0.0.0-20210726084028-a78b3bbabc41
github.com/beevik/ntp v0.3.0
github.com/btcsuite/btcd v0.22.0-beta
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ github.com/ElrondNetwork/elastic-indexer-go v1.0.8/go.mod h1:AUBtHo9tk/cTx0YBftb
github.com/ElrondNetwork/elrond-go-core v1.0.0/go.mod h1:FQMem7fFF4+8pQ6lVsBZq6yO+smD0nV23P4bJpmPjTo=
github.com/ElrondNetwork/elrond-go-core v1.0.1-0.20210721164025-65cf7f169349/go.mod h1:O9FkkTT2H9kxCzfn40TbhoCDXzGmUrRVusMomhK/Y3g=
github.com/ElrondNetwork/elrond-go-core v1.0.1-0.20210729104455-83307d046997/go.mod h1:O9FkkTT2H9kxCzfn40TbhoCDXzGmUrRVusMomhK/Y3g=
github.com/ElrondNetwork/elrond-go-core v1.0.1-0.20210802100738-75f99b3e75a0 h1:G6kfIpyYe7m0jo11JrJAFuFkFHfour8qOOOm1gFh5/Q=
github.com/ElrondNetwork/elrond-go-core v1.0.1-0.20210802100738-75f99b3e75a0/go.mod h1:O9FkkTT2H9kxCzfn40TbhoCDXzGmUrRVusMomhK/Y3g=
github.com/ElrondNetwork/elrond-go-core v1.1.0 h1:sWy+r6/KPuXaGpCvHNNuhObui4GmxD6GmDIyi5EEf4U=
github.com/ElrondNetwork/elrond-go-core v1.1.0/go.mod h1:O9FkkTT2H9kxCzfn40TbhoCDXzGmUrRVusMomhK/Y3g=
github.com/ElrondNetwork/elrond-go-crypto v1.0.0/go.mod h1:DGiR7/j1xv729Xg8SsjYaUzWXL5svMd44REXjWS/gAc=
github.com/ElrondNetwork/elrond-go-crypto v1.0.1 h1:xJUUshIZQ7h+rG7Art/9QHVyaPRV1wEjrxXYBdpmRlM=
github.com/ElrondNetwork/elrond-go-crypto v1.0.1/go.mod h1:uunsvweBrrhVojL8uiQSaTPsl3YIQ9iBqtYGM6xs4s0=
Expand All @@ -37,8 +38,9 @@ github.com/ElrondNetwork/elrond-go-logger v1.0.5 h1:tB/HBvV9IVeCaSrGakX+GLGu7K5U
github.com/ElrondNetwork/elrond-go-logger v1.0.5/go.mod h1:cBfgx0ST/CJx8jrxJSC5aiSrvkGzcnF7sK06RD8mFxQ=
github.com/ElrondNetwork/elrond-vm-common v1.1.0/go.mod h1:w3i6f8uiuRkE68Ie/gebRcLgTuHqvruJSYrFyZWuLrE=
github.com/ElrondNetwork/elrond-vm-common v1.1.3/go.mod h1:09cTlI5tYUzD1bb8GEt0FcCm/qfQlidu4tIF3Dy+cWs=
github.com/ElrondNetwork/elrond-vm-common v1.1.9 h1:cGVmB6jpEoXisUUa1QV1dBOfVLJpRpcGqwaNW3QyS7A=
github.com/ElrondNetwork/elrond-vm-common v1.1.9/go.mod h1:09cTlI5tYUzD1bb8GEt0FcCm/qfQlidu4tIF3Dy+cWs=
github.com/ElrondNetwork/elrond-vm-common v1.2.1 h1:UbenCVOZYBDiEgLIgBPf+Gwo3X5ycJz9btnYTVdzk24=
github.com/ElrondNetwork/elrond-vm-common v1.2.1/go.mod h1:07N31evc3GKh+tcmOXpc3xz/YsgV4yUHMo3LSlF0DIs=
github.com/ElrondNetwork/notifier-go v0.0.0-20210726084028-a78b3bbabc41 h1:heGvUbSMCg+Ngir82E5dL9WYvzEK1UpmmDdthJBJzNI=
github.com/ElrondNetwork/notifier-go v0.0.0-20210726084028-a78b3bbabc41/go.mod h1:VkblRkTnCWB2ITwSYsj2q6Kyzm4hRtUBH3Ezl9nxuds=
github.com/ElrondNetwork/protobuf v1.3.2 h1:qoCSYiO+8GtXBEZWEjw0WPcZfM3g7QuuJrwpN+y6Mvg=
Expand Down
2 changes: 2 additions & 0 deletions integrationTests/multiShard/hardFork/hardFork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ func hardForkImport(
MaxNumberOfNodesForStake: 100,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand Down
6 changes: 6 additions & 0 deletions integrationTests/testInitializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ func CreateFullGenesisBlocks(
MaxNumberOfNodesForStake: 100,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand Down Expand Up @@ -634,6 +636,7 @@ func CreateFullGenesisBlocks(
StakeEnableEpoch: 0,
DelegationSmartContractEnableEpoch: 0,
DelegationManagerEnableEpoch: 0,
StakeLimitsEnableEpoch: 10,
},
},
}
Expand Down Expand Up @@ -719,6 +722,8 @@ func CreateGenesisMetaBlock(
MaxNumberOfNodesForStake: 100,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand All @@ -743,6 +748,7 @@ func CreateGenesisMetaBlock(
StakeEnableEpoch: 0,
DelegationManagerEnableEpoch: 0,
DelegationSmartContractEnableEpoch: 0,
StakeLimitsEnableEpoch: 10,
},
},
}
Expand Down
6 changes: 6 additions & 0 deletions integrationTests/testProcessorNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,8 @@ func (tpn *TestProcessorNode) createFullSCQueryService() {
MaxNumberOfNodesForStake: 100,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand All @@ -872,6 +874,7 @@ func (tpn *TestProcessorNode) createFullSCQueryService() {
},
},
ShardCoordinator: tpn.ShardCoordinator,
NodesCoordinator: tpn.NodesCoordinator,
}
vmFactory, _ = metaProcess.NewVMContainerFactory(argsNewVmFactory)
} else {
Expand Down Expand Up @@ -1617,6 +1620,8 @@ func (tpn *TestProcessorNode) initMetaInnerProcessors() {
MaxNumberOfNodesForStake: 100,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand All @@ -1635,6 +1640,7 @@ func (tpn *TestProcessorNode) initMetaInnerProcessors() {
EnableEpochs: tpn.EnableEpochs,
},
ShardCoordinator: tpn.ShardCoordinator,
NodesCoordinator: tpn.NodesCoordinator,
}
vmFactory, _ := metaProcess.NewVMContainerFactory(argsVMContainerFactory)

Expand Down
3 changes: 3 additions & 0 deletions integrationTests/vm/testInitializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ func CreateVMAndBlockchainHookMeta(
EpochNotifier: &mock.EpochNotifierStub{},
EpochConfig: createEpochConfig(),
ShardCoordinator: mock.NewMultiShardsCoordinatorMock(1),
NodesCoordinator: &mock.NodesCoordinatorMock{},
}
argVMContainer.EpochConfig.EnableEpochs.UnbondTokensV2EnableEpoch = arg.UnbondTokensV2EnableEpoch
vmFactory, err := metachain.NewVMContainerFactory(argVMContainer)
Expand Down Expand Up @@ -719,6 +720,8 @@ func createSystemSCConfig() *config.SystemSmartContractsConfig {
BleedPercentagePerRound: 0.00001,
MaxNumberOfNodesForStake: 36,
ActivateBLSPubKeyMessageVerification: false,
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "1250000000000000000000",
Expand Down
1 change: 1 addition & 0 deletions node/nodeRunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func printEnableEpochs(configs *config.Configs) {
log.Debug(readEpochFor("contract global mint and burn"), "epoch", enableEpochs.GlobalMintBurnDisableEpoch)
log.Debug(readEpochFor("contract transfer role"), "epoch", enableEpochs.ESDTTransferRoleEnableEpoch)
log.Debug(readEpochFor("built in functions on metachain"), "epoch", enableEpochs.BuiltInFunctionOnMetaEnableEpoch)
log.Debug(readEpochFor("limit validators"), "epoch", enableEpochs.StakeLimitsEnableEpoch)

gasSchedule := configs.EpochConfig.GasSchedule

Expand Down
7 changes: 7 additions & 0 deletions process/factory/metachain/vmContainerFactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type vmContainerFactory struct {
scFactory vm.SystemSCContainerFactory
epochConfig *config.EpochConfig
shardCoordinator sharding.Coordinator
nodesCoordinator vm.NodesCoordinator
}

// ArgsNewVMContainerFactory defines the arguments needed to create a new VM container factory
Expand All @@ -59,6 +60,7 @@ type ArgsNewVMContainerFactory struct {
EpochNotifier process.EpochNotifier
EpochConfig *config.EpochConfig
ShardCoordinator sharding.Coordinator
NodesCoordinator vm.NodesCoordinator
}

// NewVMContainerFactory is responsible for creating a new virtual machine factory object
Expand Down Expand Up @@ -96,6 +98,9 @@ func NewVMContainerFactory(args ArgsNewVMContainerFactory) (*vmContainerFactory,
if check.IfNil(args.ShardCoordinator) {
return nil, fmt.Errorf("%w in NewVMContainerFactory", vm.ErrNilShardCoordinator)
}
if check.IfNil(args.NodesCoordinator) {
return nil, fmt.Errorf("%w in NewVMContainerFactory", process.ErrNilNodesCoordinator)
}

blockChainHookImpl, err := hooks.NewBlockChainHookImpl(args.ArgBlockChainHook)
if err != nil {
Expand All @@ -119,6 +124,7 @@ func NewVMContainerFactory(args ArgsNewVMContainerFactory) (*vmContainerFactory,
addressPubKeyConverter: args.ArgBlockChainHook.PubkeyConv,
epochConfig: args.EpochConfig,
shardCoordinator: args.ShardCoordinator,
nodesCoordinator: args.NodesCoordinator,
}, nil
}

Expand Down Expand Up @@ -190,6 +196,7 @@ func (vmf *vmContainerFactory) createSystemVMFactoryAndEEI() (vm.SystemSCContain
AddressPubKeyConverter: vmf.addressPubKeyConverter,
EpochConfig: vmf.epochConfig,
ShardCoordinator: vmf.shardCoordinator,
NodesCoordinator: vmf.nodesCoordinator,
}
scFactory, err := systemVMFactory.NewSystemSCFactory(argsNewSystemScFactory)
if err != nil {
Expand Down
22 changes: 22 additions & 0 deletions process/factory/metachain/vmContainerFactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ func createVmContainerMockArgument(gasSchedule core.GasScheduleNotifier) ArgsNew
BleedPercentagePerRound: 1,
MaxNumberOfNodesForStake: 1,
ActivateBLSPubKeyMessageVerification: false,
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
},
ValidatorAccountsDB: &stateMock.AccountsStub{},
Expand All @@ -92,6 +94,9 @@ func createVmContainerMockArgument(gasSchedule core.GasScheduleNotifier) ArgsNew
},
},
ShardCoordinator: &mock.ShardCoordinatorStub{},
NodesCoordinator: &mock.NodesCoordinatorMock{GetNumTotalEligibleCalled: func() uint64 {
return 1000
}},
}
}

Expand Down Expand Up @@ -239,6 +244,18 @@ func TestNewVMContainerFactory_NilShardCoordinator(t *testing.T) {
assert.True(t, errors.Is(err, vm.ErrNilShardCoordinator))
}

func TestNewVMContainerFactory_NilNodesCoordinatorFails(t *testing.T) {
t.Parallel()

gasSchedule := makeGasSchedule()
argsNewVmContainerFactory := createVmContainerMockArgument(gasSchedule)
argsNewVmContainerFactory.NodesCoordinator = nil
vmf, err := NewVMContainerFactory(argsNewVmContainerFactory)

assert.True(t, check.IfNil(vmf))
assert.True(t, errors.Is(err, process.ErrNilNodesCoordinator))
}

func TestNewVMContainerFactory_OkValues(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -327,6 +344,8 @@ func TestVmContainerFactory_Create(t *testing.T) {
MaxNumberOfNodesForStake: 100,
ActivateBLSPubKeyMessageVerification: false,
MinUnstakeTokensValue: "1",
StakeLimitPercentage: 100.0,
NodeLimitPercentage: 100.0,
},
DelegationManagerSystemSCConfig: config.DelegationManagerSystemSCConfig{
MinCreationDeposit: "100",
Expand All @@ -350,6 +369,9 @@ func TestVmContainerFactory_Create(t *testing.T) {
},
},
ShardCoordinator: mock.NewMultiShardsCoordinatorMock(1),
NodesCoordinator: &mock.NodesCoordinatorMock{GetNumTotalEligibleCalled: func() uint64 {
return 1000
}},
}
vmf, err := NewVMContainerFactory(argsNewVMContainerFactory)
assert.NotNil(t, vmf)
Expand Down
Loading

0 comments on commit 15fa38e

Please sign in to comment.