Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests staking v4 #3951

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5133860
FEAT: Add file placeholder
mariusmihaic Mar 30, 2022
8ebc25f
FEAT: Add intermediary code
mariusmihaic Mar 31, 2022
6cb1275
FEAT: Refactor
mariusmihaic Mar 31, 2022
4ebd97e
FEAT: Refactor 2
mariusmihaic Mar 31, 2022
fca992d
FEAT: Refactor 3
mariusmihaic Mar 31, 2022
d4e9a1e
FEAT: Refactor 4
mariusmihaic Apr 1, 2022
f3dbe32
FEAT: Refactor 5
mariusmihaic Apr 1, 2022
1856d58
FEAT: Ugly version with 2 committed blocks
mariusmihaic Apr 4, 2022
4ea2b9d
FEAT: Test with epoch start prepare
mariusmihaic Apr 4, 2022
1449bcc
FEAT: Register bls keys + bugfixes
mariusmihaic Apr 5, 2022
3c26053
FEAT: Add Process for num of rounds
mariusmihaic Apr 5, 2022
53a59e0
FIX: Sub bug, add safeSub
mariusmihaic Apr 5, 2022
65d9a69
FIX: Waiting list + stubs
mariusmihaic Apr 7, 2022
23407f8
FIX: Refactor 1
mariusmihaic Apr 7, 2022
28b4285
FIX: Refactor 2
mariusmihaic Apr 7, 2022
cda1ce3
FIX: Refactor 3
mariusmihaic Apr 7, 2022
b37fc76
FIX: Refactor 4
mariusmihaic Apr 7, 2022
da98d43
FIX: Refactor 5
mariusmihaic Apr 8, 2022
0869a57
FIX: Refactor6
mariusmihaic Apr 8, 2022
4226a2d
FIX: Refactor 7
mariusmihaic Apr 8, 2022
16efa27
FIX: Refactor 8
mariusmihaic Apr 11, 2022
11f7dc5
FIX: Refactor 9
mariusmihaic Apr 11, 2022
cd02f3a
FIX: Refactor 10
mariusmihaic Apr 12, 2022
f1bd22b
FIX: Refactor 11
mariusmihaic Apr 12, 2022
82a4a3a
FIX: Import cycle
mariusmihaic Apr 13, 2022
a0e443a
FIX: Race condition + add StakingV4DistributeAuctionToWaiting enable …
mariusmihaic Apr 13, 2022
e0d68a7
FIX: Staking v4 complete test
mariusmihaic Apr 13, 2022
9d5cee2
FIX: Roothash mismatch
mariusmihaic Apr 14, 2022
9de7aec
FIX: Minor fixes
mariusmihaic Apr 14, 2022
149bd22
FIX: Rename StakingV4DistributeAuctionToWaiting epoch
mariusmihaic Apr 15, 2022
1cf4bb0
FIX: Package names
mariusmihaic Apr 15, 2022
b32c79f
Merge branch 'feat/liquid-staking' into EN-11927-integration-tests-st…
mariusmihaic Apr 19, 2022
0f3e91a
FIX: Delete error condition for maxNumNodes decrease
mariusmihaic Apr 20, 2022
07ff0da
Merge branch 'feat/liquid-staking' into EN-11927-integration-tests-st…
mariusmihaic Apr 20, 2022
e9b8e72
FIX: Linter errors
mariusmihaic Apr 20, 2022
f3fe6c5
FIX: Review findings
mariusmihaic Apr 27, 2022
063a1c3
FIX: Simplify logic in calcNormRand
mariusmihaic Apr 28, 2022
2e921fa
Merge branch 'feat/liquid-staking' into EN-11927-integration-tests-st…
mariusmihaic Apr 28, 2022
c1f8aec
FIX: Merge conflict
mariusmihaic Apr 28, 2022
a98dcee
FIX: Build after merge
mariusmihaic Apr 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/epochConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type EnableEpochs struct {
StakeLimitsEnableEpoch uint32
StakingV4InitEnableEpoch uint32
StakingV4EnableEpoch uint32
StakingV4DistributeAuctionToWaiting uint32
StakingV4DistributeAuctionToWaitingEpoch uint32
}

// GasScheduleByEpochs represents a gas schedule toml entry that will be applied from the provided epoch
Expand Down
45 changes: 24 additions & 21 deletions epochStart/metachain/systemSCs.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,17 @@ func getAuctionListAndNumOfValidators(validatorsInfoMap state.ShardValidatorsInf
}

func (s *systemSCProcessor) sortAuctionList(auctionList []state.ValidatorInfoHandler, randomness []byte) error {
if len(auctionList) == 0 {
return nil
}

validatorTopUpMap, err := s.getValidatorTopUpMap(auctionList)
if err != nil {
return fmt.Errorf("%w: %v", epochStart.ErrSortAuctionList, err)
}

pubKeyLen := len(auctionList[0].GetPublicKey())
normRandomness := calcNormRand(randomness, pubKeyLen)
sort.SliceStable(auctionList, func(i, j int) bool {
pubKey1 := auctionList[i].GetPublicKey()
pubKey2 := auctionList[j].GetPublicKey()
Expand All @@ -242,7 +248,7 @@ func (s *systemSCProcessor) sortAuctionList(auctionList []state.ValidatorInfoHan
nodeTopUpPubKey2 := validatorTopUpMap[string(pubKey2)]

if nodeTopUpPubKey1.Cmp(nodeTopUpPubKey2) == 0 {
return compareByXORWithRandomness(pubKey1, pubKey2, randomness)
return compareByXORWithRandomness(pubKey1, pubKey2, normRandomness)
}

return nodeTopUpPubKey1.Cmp(nodeTopUpPubKey2) > 0
Expand All @@ -267,35 +273,32 @@ func (s *systemSCProcessor) getValidatorTopUpMap(validators []state.ValidatorInf
return ret, nil
}

func compareByXORWithRandomness(pubKey1, pubKey2, randomness []byte) bool {
lenPubKey := len(pubKey1)
func calcNormRand(randomness []byte, expectedLen int) []byte {
lenRand := len(randomness)

minLen := core.MinInt(lenPubKey, lenRand)
maxLen := core.MaxInt(lenPubKey, lenRand)
repeatedCt := maxLen/minLen + 1
minLen := core.MinInt(expectedLen, lenRand)
AdoAdoAdo marked this conversation as resolved.
Show resolved Hide resolved
maxLen := core.MaxInt(expectedLen, lenRand)

rnd := randomness
pk1 := pubKey1
pk2 := pubKey2

if lenPubKey > lenRand {
if expectedLen > lenRand {
repeatedCt := maxLen/minLen + 1
rnd = bytes.Repeat(randomness, repeatedCt)
rnd = rnd[:maxLen]
} else {
pk1 = bytes.Repeat(pk1, repeatedCt)
pk2 = bytes.Repeat(pk2, repeatedCt)

pk1 = pk1[:maxLen]
pk2 = pk2[:maxLen]
rnd = rnd[:minLen]
}

key1Xor := make([]byte, maxLen)
key2Xor := make([]byte, maxLen)
return rnd
}

func compareByXORWithRandomness(pubKey1, pubKey2, randomness []byte) bool {
xorLen := len(randomness)

key1Xor := make([]byte, xorLen)
key2Xor := make([]byte, xorLen)

for idx := 0; idx < maxLen; idx++ {
key1Xor[idx] = pk1[idx] ^ rnd[idx]
key2Xor[idx] = pk2[idx] ^ rnd[idx]
for idx := 0; idx < xorLen; idx++ {
key1Xor[idx] = pubKey1[idx] ^ randomness[idx]
key2Xor[idx] = pubKey2[idx] ^ randomness[idx]
}

return bytes.Compare(key1Xor, key2Xor) == 1
Expand Down
17 changes: 7 additions & 10 deletions factory/coreComponents.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,13 @@ func (ccf *coreComponentsFactory) Create() (*coreComponents, error) {
}

argsNodesShuffler := &nodesCoordinator.NodesShufflerArgs{
NodesShard: genesisNodesConfig.MinNumberOfShardNodes(),
NodesMeta: genesisNodesConfig.MinNumberOfMetaNodes(),
Hysteresis: genesisNodesConfig.GetHysteresis(),
Adaptivity: genesisNodesConfig.GetAdaptivity(),
ShuffleBetweenShards: true,
MaxNodesEnableConfig: ccf.epochConfig.EnableEpochs.MaxNodesChangeEnableEpoch,
BalanceWaitingListsEnableEpoch: ccf.epochConfig.EnableEpochs.BalanceWaitingListsEnableEpoch,
WaitingListFixEnableEpoch: ccf.epochConfig.EnableEpochs.WaitingListFixEnableEpoch,
StakingV4EnableEpoch: ccf.epochConfig.EnableEpochs.StakingV4EnableEpoch,
StakingV4DistributeAuctionToWaitingEpoch: ccf.epochConfig.EnableEpochs.StakingV4DistributeAuctionToWaiting,
NodesShard: genesisNodesConfig.MinNumberOfShardNodes(),
NodesMeta: genesisNodesConfig.MinNumberOfMetaNodes(),
Hysteresis: genesisNodesConfig.GetHysteresis(),
Adaptivity: genesisNodesConfig.GetAdaptivity(),
ShuffleBetweenShards: true,
MaxNodesEnableConfig: ccf.epochConfig.EnableEpochs.MaxNodesChangeEnableEpoch,
EnableEpochs: ccf.epochConfig.EnableEpochs,
}

nodesShuffler, err := nodesCoordinator.NewHashValidatorsShuffler(argsNodesShuffler)
Expand Down
28 changes: 12 additions & 16 deletions integrationTests/nodesCoordinatorFactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ func (tpn *IndexHashedNodesCoordinatorFactory) CreateNodesCoordinator(arg ArgInd
pubKeyBytes, _ := keys.Pk.ToByteArray()

nodeShufflerArgs := &nodesCoordinator.NodesShufflerArgs{
NodesShard: uint32(arg.nodesPerShard),
NodesMeta: uint32(arg.nbMetaNodes),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
WaitingListFixEnableEpoch: 0,
BalanceWaitingListsEnableEpoch: 0,
NodesShard: uint32(arg.nodesPerShard),
NodesMeta: uint32(arg.nbMetaNodes),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
}

nodeShuffler, _ := nodesCoordinator.NewHashValidatorsShuffler(nodeShufflerArgs)
Expand Down Expand Up @@ -102,14 +100,12 @@ func (ihncrf *IndexHashedNodesCoordinatorWithRaterFactory) CreateNodesCoordinato
pubKeyBytes, _ := keys.Pk.ToByteArray()

shufflerArgs := &nodesCoordinator.NodesShufflerArgs{
NodesShard: uint32(arg.nodesPerShard),
NodesMeta: uint32(arg.nbMetaNodes),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
BalanceWaitingListsEnableEpoch: 0,
WaitingListFixEnableEpoch: 0,
NodesShard: uint32(arg.nodesPerShard),
NodesMeta: uint32(arg.nbMetaNodes),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
}

nodeShuffler, _ := nodesCoordinator.NewHashValidatorsShuffler(shufflerArgs)
Expand Down
14 changes: 6 additions & 8 deletions integrationTests/testProcessorNodeWithMultisigner.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,14 +477,12 @@ func CreateNodesWithNodesCoordinatorAndHeaderSigVerifier(
nodesMap := make(map[uint32][]*TestProcessorNode)

shufflerArgs := &nodesCoordinator.NodesShufflerArgs{
NodesShard: uint32(nodesPerShard),
NodesMeta: uint32(nbMetaNodes),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
WaitingListFixEnableEpoch: 0,
BalanceWaitingListsEnableEpoch: 0,
NodesShard: uint32(nodesPerShard),
NodesMeta: uint32(nbMetaNodes),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
}
nodeShuffler, _ := nodesCoordinator.NewHashValidatorsShuffler(shufflerArgs)
epochStartSubscriber := notifier.NewEpochStartSubscriptionHandler()
Expand Down
15 changes: 10 additions & 5 deletions integrationTests/vm/staking/metaBlockProcessorCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/ElrondNetwork/elrond-go-core/data"
"github.com/ElrondNetwork/elrond-go-core/data/block"
"github.com/ElrondNetwork/elrond-go/dataRetriever"
"github.com/ElrondNetwork/elrond-go/dataRetriever/dataPool"
"github.com/ElrondNetwork/elrond-go/epochStart"
"github.com/ElrondNetwork/elrond-go/epochStart/metachain"
"github.com/ElrondNetwork/elrond-go/factory"
Expand Down Expand Up @@ -86,11 +87,15 @@ func createMetaBlockProcessor(
VMContainersFactory: metaVMFactory,
VmContainer: vmContainer,
},
SCToProtocol: &mock.SCToProtocolStub{},
PendingMiniBlocksHandler: &mock.PendingMiniBlocksHandlerStub{},
EpochStartDataCreator: epochStartDataCreator,
EpochEconomics: &mock.EpochEconomicsStub{},
EpochRewardsCreator: &testscommon.RewardsCreatorStub{},
SCToProtocol: &mock.SCToProtocolStub{},
PendingMiniBlocksHandler: &mock.PendingMiniBlocksHandlerStub{},
EpochStartDataCreator: epochStartDataCreator,
EpochEconomics: &mock.EpochEconomicsStub{},
EpochRewardsCreator: &testscommon.RewardsCreatorStub{
GetLocalTxCacheCalled: func() epochStart.TransactionCacher {
return dataPool.NewCurrentBlockPool()
},
},
EpochValidatorInfoCreator: valInfoCreator,
ValidatorStatisticsProcessor: validatorsInfoCreator,
EpochSystemSCProcessor: systemSCProcessor,
Expand Down
18 changes: 10 additions & 8 deletions integrationTests/vm/staking/nodesCoordiantorCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ func createNodesCoordinator(
)

shufflerArgs := &nodesCoordinator.NodesShufflerArgs{
NodesShard: numOfEligibleNodesPerShard,
NodesMeta: numOfMetaNodes,
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: maxNodesConfig,
StakingV4EnableEpoch: stakingV4EnableEpoch,
StakingV4DistributeAuctionToWaitingEpoch: stakingV4DistributeAuctionToWaitingEpoch,
NodesShard: numOfEligibleNodesPerShard,
NodesMeta: numOfMetaNodes,
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: maxNodesConfig,
EnableEpochs: config.EnableEpochs{
StakingV4EnableEpoch: stakingV4EnableEpoch,
StakingV4DistributeAuctionToWaitingEpoch: stakingV4DistributeAuctionToWaitingEpoch,
},
}
nodeShuffler, _ := nodesCoordinator.NewHashValidatorsShuffler(shufflerArgs)

Expand Down
31 changes: 14 additions & 17 deletions sharding/nodesCoordinator/hashValidatorShuffler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ var _ NodesShuffler = (*randHashShuffler)(nil)

// NodesShufflerArgs defines the arguments required to create a nodes shuffler
type NodesShufflerArgs struct {
NodesShard uint32
NodesMeta uint32
Hysteresis float32
Adaptivity bool
ShuffleBetweenShards bool
MaxNodesEnableConfig []config.MaxNodesChangeConfig
BalanceWaitingListsEnableEpoch uint32
WaitingListFixEnableEpoch uint32
StakingV4EnableEpoch uint32
StakingV4DistributeAuctionToWaitingEpoch uint32
NodesShard uint32
NodesMeta uint32
Hysteresis float32
Adaptivity bool
ShuffleBetweenShards bool
MaxNodesEnableConfig []config.MaxNodesChangeConfig
EnableEpochs config.EnableEpochs
}

type shuffleNodesArg struct {
Expand Down Expand Up @@ -82,9 +79,9 @@ func NewHashValidatorsShuffler(args *NodesShufflerArgs) (*randHashShuffler, erro
var configs []config.MaxNodesChangeConfig

log.Debug("hashValidatorShuffler: enable epoch for max nodes change", "epoch", args.MaxNodesEnableConfig)
log.Debug("hashValidatorShuffler: enable epoch for balance waiting lists", "epoch", args.BalanceWaitingListsEnableEpoch)
log.Debug("hashValidatorShuffler: enable epoch for staking v4", "epoch", args.StakingV4EnableEpoch)
log.Debug("hashValidatorShuffler: enable epoch for staking v4 distribute auction list to waiting list", "epoch", args.StakingV4DistributeAuctionToWaitingEpoch)
log.Debug("hashValidatorShuffler: enable epoch for balance waiting lists", "epoch", args.EnableEpochs.BalanceWaitingListsEnableEpoch)
log.Debug("hashValidatorShuffler: enable epoch for staking v4", "epoch", args.EnableEpochs.StakingV4EnableEpoch)
log.Debug("hashValidatorShuffler: enable epoch for staking v4 distribute auction list to waiting list", "epoch", args.EnableEpochs.StakingV4DistributeAuctionToWaitingEpoch)

if args.MaxNodesEnableConfig != nil {
configs = make([]config.MaxNodesChangeConfig, len(args.MaxNodesEnableConfig))
Expand All @@ -95,10 +92,10 @@ func NewHashValidatorsShuffler(args *NodesShufflerArgs) (*randHashShuffler, erro
rxs := &randHashShuffler{
shuffleBetweenShards: args.ShuffleBetweenShards,
availableNodesConfigs: configs,
balanceWaitingListsEnableEpoch: args.BalanceWaitingListsEnableEpoch,
waitingListFixEnableEpoch: args.WaitingListFixEnableEpoch,
stakingV4DistributeAuctionToWaitingEpoch: args.StakingV4DistributeAuctionToWaitingEpoch,
stakingV4EnableEpoch: args.StakingV4EnableEpoch,
balanceWaitingListsEnableEpoch: args.EnableEpochs.BalanceWaitingListsEnableEpoch,
waitingListFixEnableEpoch: args.EnableEpochs.WaitingListFixEnableEpoch,
stakingV4DistributeAuctionToWaitingEpoch: args.EnableEpochs.StakingV4DistributeAuctionToWaitingEpoch,
stakingV4EnableEpoch: args.EnableEpochs.StakingV4EnableEpoch,
}

log.Debug("randHashShuffler: enable epoch for balance waiting list", "epoch", rxs.balanceWaitingListsEnableEpoch)
Expand Down
76 changes: 42 additions & 34 deletions sharding/nodesCoordinator/hashValidatorShuffler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,15 @@ func testShuffledOut(

func createHashShufflerInter() (*randHashShuffler, error) {
shufflerArgs := &NodesShufflerArgs{
NodesShard: eligiblePerShard,
NodesMeta: eligiblePerShard,
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: true,
MaxNodesEnableConfig: nil,
StakingV4EnableEpoch: 443,
StakingV4DistributeAuctionToWaitingEpoch: 444,
NodesShard: eligiblePerShard,
NodesMeta: eligiblePerShard,
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: true,
EnableEpochs: config.EnableEpochs{
StakingV4EnableEpoch: 443,
StakingV4DistributeAuctionToWaitingEpoch: 444,
},
}

shuffler, err := NewHashValidatorsShuffler(shufflerArgs)
Expand All @@ -203,14 +204,15 @@ func createHashShufflerInter() (*randHashShuffler, error) {

func createHashShufflerIntraShards() (*randHashShuffler, error) {
shufflerArgs := &NodesShufflerArgs{
NodesShard: eligiblePerShard,
NodesMeta: eligiblePerShard,
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
StakingV4EnableEpoch: 443,
StakingV4DistributeAuctionToWaitingEpoch: 444,
NodesShard: eligiblePerShard,
NodesMeta: eligiblePerShard,
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
EnableEpochs: config.EnableEpochs{
StakingV4EnableEpoch: 443,
StakingV4DistributeAuctionToWaitingEpoch: 444,
},
}
shuffler, err := NewHashValidatorsShuffler(shufflerArgs)

Expand Down Expand Up @@ -1333,7 +1335,9 @@ func testUpdateNodesAndCheckNumLeaving(t *testing.T, beforeFix bool) {
NodesToShufflePerShard: uint32(numNodesToShuffle),
},
},
WaitingListFixEnableEpoch: uint32(waitingListFixEnableEpoch),
EnableEpochs: config.EnableEpochs{
WaitingListFixEnableEpoch: uint32(waitingListFixEnableEpoch),
},
}

shuffler, err := NewHashValidatorsShuffler(shufflerArgs)
Expand Down Expand Up @@ -1403,7 +1407,9 @@ func testUpdateNodeListsAndCheckWaitingList(t *testing.T, beforeFix bool) {
NodesToShufflePerShard: uint32(numNodesToShuffle),
},
},
WaitingListFixEnableEpoch: uint32(waitingListFixEnableEpoch),
EnableEpochs: config.EnableEpochs{
WaitingListFixEnableEpoch: uint32(waitingListFixEnableEpoch),
},
}

shuffler, err := NewHashValidatorsShuffler(shufflerArgs)
Expand Down Expand Up @@ -2379,14 +2385,15 @@ func TestRandHashShuffler_UpdateNodeLists_All(t *testing.T) {
unstakeLeavingList, additionalLeavingList := prepareListsFromMaps(unstakeLeaving, additionalLeaving)

shufflerArgs := &NodesShufflerArgs{
NodesShard: uint32(eligiblePerShard),
NodesMeta: uint32(eligiblePerShard),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
StakingV4EnableEpoch: 443,
StakingV4DistributeAuctionToWaitingEpoch: 444,
NodesShard: uint32(eligiblePerShard),
NodesMeta: uint32(eligiblePerShard),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
EnableEpochs: config.EnableEpochs{
StakingV4EnableEpoch: 443,
StakingV4DistributeAuctionToWaitingEpoch: 444,
},
}
shuffler, err := NewHashValidatorsShuffler(shufflerArgs)
require.Nil(t, err)
Expand Down Expand Up @@ -2728,14 +2735,15 @@ func TestRandHashShuffler_UpdateNodeLists_WithNewNodes_WithWaiting_WithLeaving(t
}

shufflerArgs := &NodesShufflerArgs{
NodesShard: uint32(numEligiblePerShard),
NodesMeta: uint32(numEligiblePerShard),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
MaxNodesEnableConfig: nil,
StakingV4EnableEpoch: 443,
StakingV4DistributeAuctionToWaitingEpoch: 444,
NodesShard: uint32(numEligiblePerShard),
NodesMeta: uint32(numEligiblePerShard),
Hysteresis: hysteresis,
Adaptivity: adaptivity,
ShuffleBetweenShards: shuffleBetweenShards,
EnableEpochs: config.EnableEpochs{
StakingV4EnableEpoch: 443,
StakingV4DistributeAuctionToWaitingEpoch: 444,
},
}
shuffler, err := NewHashValidatorsShuffler(shufflerArgs)
require.Nil(t, err)
Expand Down