Skip to content

Commit

Permalink
Lightclient e2e: increase validator client (#4006)
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths authored May 11, 2022
1 parent 5142ba3 commit 29a3789
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/lodestar/test/e2e/chain/lightclient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe("chain / lightclient", function () {
*/
const maxLcHeadTrackingDiffSlots = 4;
const validatorCount = 8;
const validatorClientCount = 4;
const targetSyncCommittee = 3;
/** N sync committee periods + 1 epoch of margin */
const finalizedEpochToReach = targetSyncCommittee * EPOCHS_PER_SYNC_COMMITTEE_PERIOD + 1;
Expand Down Expand Up @@ -72,7 +73,7 @@ describe("chain / lightclient", function () {
network: {allowPublishToZeroPeers: true},
api: {rest: {enabled: true, api: ["lightclient"], port: restPort}},
},
validatorCount,
validatorCount: validatorCount * validatorClientCount,
genesisTime,
logger: loggerNodeA,
});
Expand All @@ -84,7 +85,7 @@ describe("chain / lightclient", function () {
const {validators} = await getAndInitDevValidators({
node: bn,
validatorsPerClient: validatorCount,
validatorClientCount: 1,
validatorClientCount,
startIndex: 0,
useRestApi: false,
testLoggerOpts: {...testLoggerOpts, logLevel: LogLevel.error},
Expand Down
4 changes: 2 additions & 2 deletions packages/lodestar/test/utils/node/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ export async function getAndInitDevValidators({
const validators: Promise<Validator>[] = [];
const secretKeys: SecretKey[] = [];

for (let i = 0; i < validatorClientCount; i++) {
const startIndexVc = startIndex + i * validatorClientCount;
for (let clientIndex = 0; clientIndex < validatorClientCount; clientIndex++) {
const startIndexVc = startIndex + clientIndex * validatorsPerClient;
const endIndex = startIndexVc + validatorsPerClient - 1;
const logger = testLogger(`Vali ${startIndexVc}-${endIndex}`, testLoggerOpts);
const tmpDir = tmp.dirSync({unsafeCleanup: true});
Expand Down

0 comments on commit 29a3789

Please sign in to comment.