Skip to content

Commit

Permalink
Merge 85365ed into b596000
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Jul 10, 2023
2 parents b596000 + 85365ed commit f72e6bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/validator/src/services/indices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {Metrics} from "../metrics.js";

/**
* URLs have a limitation on size, adding an unbounded num of pubkeys will break the request.
* For reasoning on the specific number see: https://github.com/ChainSafe/lodestar/pull/2730#issuecomment-866749083
* For reasoning on the specific number see: https://github.com/ethereum/beacon-APIs/pull/328
*/
const PUBKEYS_PER_REQUEST = 10;
const PUBKEYS_PER_REQUEST = 64;

// To assist with readability
type PubkeyHex = string;
Expand Down
3 changes: 1 addition & 2 deletions packages/validator/src/util/batch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* Divide pubkeys into batches, each batch contains at most 5 http requests,
* each request can work on at most 40 pubkeys.
* Convert array of items into array of batched item arrays
*/
export function batchItems<T>(items: T[], opts: {batchSize: number; maxBatches?: number}): T[][] {
const batches: T[][] = [];
Expand Down

0 comments on commit f72e6bd

Please sign in to comment.