Skip to content

Commit

Permalink
feat: add and track blob source for metrics (#6628)
Browse files Browse the repository at this point in the history
* feat: add and track blob source for metrics

* adding blobsSource for blobsPromise

* address feedback

* apply feedback

* updates

* only allow non blobspromise blocks to be imported
  • Loading branch information
g11tech committed Apr 26, 2024
1 parent 1a7ea75 commit e1bc926
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 29 deletions.
3 changes: 2 additions & 1 deletion packages/beacon-node/src/api/impl/beacon/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {computeEpochAtSlot, computeTimeAtSlot, reconstructFullBlockOrContents} f
import {SLOTS_PER_HISTORICAL_ROOT} from "@lodestar/params";
import {sleep, toHex} from "@lodestar/utils";
import {allForks, deneb, isSignedBlockContents, ProducedBlockSource} from "@lodestar/types";
import {BlockSource, getBlockInput, ImportBlockOpts, BlockInput} from "../../../../chain/blocks/types.js";
import {BlockSource, getBlockInput, ImportBlockOpts, BlockInput, BlobsSource} from "../../../../chain/blocks/types.js";
import {promiseAllMaybeAsync} from "../../../../util/promises.js";
import {isOptimisticBlock} from "../../../../util/forkChoice.js";
import {computeBlobSidecars} from "../../../../util/blobs.js";
Expand Down Expand Up @@ -52,6 +52,7 @@ export function getBeaconBlockApi({
signedBlock,
BlockSource.api,
blobSidecars,
BlobsSource.api,
// don't bundle any bytes for block and blobs
null,
blobSidecars.map(() => null)
Expand Down
15 changes: 13 additions & 2 deletions packages/beacon-node/src/chain/blocks/importBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ export async function importBlock(
const blockDelaySec = (fullyVerifiedBlock.seenTimestampSec - postState.genesisTime) % this.config.SECONDS_PER_SLOT;
const recvToValLatency = Date.now() / 1000 - (opts.seenTimestampSec ?? Date.now() / 1000);

// this is just a type assertion since blockinput with blobsPromise type will not end up here
if (blockInput.type === BlockInputType.blobsPromise) {
throw Error("Unavailable block can not be imported in forkchoice");
}

// 1. Persist block to hot DB (pre-emptively)
// If eagerPersistBlock = true we do that in verifyBlocksInEpoch to batch all I/O operations to save block time to head
if (!opts.eagerPersistBlock) {
Expand All @@ -95,15 +100,21 @@ export async function importBlock(
this.logger.verbose("Added block to forkchoice and state cache", {slot: blockSlot, root: blockRootHex});

// We want to import block asap so call all event handler in the next event loop
setTimeout(() => {
setTimeout(async () => {
this.emitter.emit(routes.events.EventType.block, {
block: blockRootHex,
slot: blockSlot,
executionOptimistic: blockSummary != null && isOptimisticBlock(blockSummary),
});

// blobsPromise will not end up here, but preDeneb could. In future we might also allow syncing
// out of data range blocks and import then in forkchoice although one would not be able to
// attest and propose with such head similar to optimistic sync
if (blockInput.type === BlockInputType.postDeneb) {
for (const blobSidecar of blockInput.blobs) {
const {blobsSource, blobs} = blockInput;

this.metrics?.importBlock.blobsBySource.inc({blobsSource});
for (const blobSidecar of blobs) {
const {index, kzgCommitment} = blobSidecar;
this.emitter.emit(routes.events.EventType.blobSidecar, {
blockRoot: blockRootHex,
Expand Down
4 changes: 2 additions & 2 deletions packages/beacon-node/src/chain/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function processBlocks(

// Fully verify a block to be imported immediately after. Does not produce any side-effects besides adding intermediate
// states in the state cache through regen.
const {postStates, dataAvailabilityStatuses, proposerBalanceDeltas, segmentExecStatus} =
const {postStates, dataAvailabilityStatuses, proposerBalanceDeltas, segmentExecStatus, availableBlockInputs} =
await verifyBlocksInEpoch.call(this, parentBlock, relevantBlocks, opts);

// If segmentExecStatus has lvhForkchoice then, the entire segment should be invalid
Expand All @@ -81,7 +81,7 @@ export async function processBlocks(
}

const {executionStatuses} = segmentExecStatus;
const fullyVerifiedBlocks = relevantBlocks.map(
const fullyVerifiedBlocks = availableBlockInputs.map(
(block, i): FullyVerifiedBlock => ({
blockInput: block,
postState: postStates[i],
Expand Down
15 changes: 13 additions & 2 deletions packages/beacon-node/src/chain/blocks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ export enum BlockSource {
byRoot = "req_resp_by_root",
}

/** Enum to represent where blobs come from */
export enum BlobsSource {
gossip = "gossip",
api = "api",
byRange = "req_resp_by_range",
byRoot = "req_resp_by_root",
}

export enum GossipedInputType {
block = "block",
blob = "blob",
}

export type BlobsCache = Map<number, {blobSidecar: deneb.BlobSidecar; blobBytes: Uint8Array | null}>;
export type BlockInputBlobs = {blobs: deneb.BlobSidecars; blobsBytes: (Uint8Array | null)[]};
export type BlockInputBlobs = {blobs: deneb.BlobSidecars; blobsBytes: (Uint8Array | null)[]; blobsSource: BlobsSource};
type CachedBlobs = {
blobsCache: BlobsCache;
availabilityPromise: Promise<BlockInputBlobs>;
Expand All @@ -34,6 +42,7 @@ type CachedBlobs = {
export type BlockInput = {block: allForks.SignedBeaconBlock; source: BlockSource; blockBytes: Uint8Array | null} & (
| {type: BlockInputType.preDeneb}
| ({type: BlockInputType.postDeneb} & BlockInputBlobs)
// the blobsSource here is added to BlockInputBlobs when availability is resolved
| ({type: BlockInputType.blobsPromise} & CachedBlobs)
);
export type NullBlockInput = {block: null; blockRootHex: RootHex; blockInputPromise: Promise<BlockInput>} & CachedBlobs;
Expand Down Expand Up @@ -69,6 +78,7 @@ export const getBlockInput = {
block: allForks.SignedBeaconBlock,
source: BlockSource,
blobs: deneb.BlobSidecars,
blobsSource: BlobsSource,
blockBytes: Uint8Array | null,
blobsBytes: (Uint8Array | null)[]
): BlockInput {
Expand All @@ -80,6 +90,7 @@ export const getBlockInput = {
block,
source,
blobs,
blobsSource,
blockBytes,
blobsBytes,
};
Expand Down Expand Up @@ -109,7 +120,7 @@ export const getBlockInput = {
},
};

export function getBlockInputBlobs(blobsCache: BlobsCache): BlockInputBlobs {
export function getBlockInputBlobs(blobsCache: BlobsCache): Omit<BlockInputBlobs, "blobsSource"> {
const blobs = [];
const blobsBytes = [];

Expand Down
5 changes: 3 additions & 2 deletions packages/beacon-node/src/chain/blocks/verifyBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export async function verifyBlocksInEpoch(
proposerBalanceDeltas: number[];
segmentExecStatus: SegmentExecStatus;
dataAvailabilityStatuses: DataAvailableStatus[];
availableBlockInputs: BlockInput[];
}> {
const blocks = blocksInput.map(({block}) => block);
if (blocks.length === 0) {
Expand Down Expand Up @@ -92,7 +93,7 @@ export async function verifyBlocksInEpoch(
// batch all I/O operations to reduce overhead
const [
segmentExecStatus,
{dataAvailabilityStatuses, availableTime},
{dataAvailabilityStatuses, availableTime, availableBlockInputs},
{postStates, proposerBalanceDeltas, verifyStateTime},
{verifySignaturesTime},
] = await Promise.all([
Expand Down Expand Up @@ -190,7 +191,7 @@ export async function verifyBlocksInEpoch(
}
}

return {postStates, dataAvailabilityStatuses, proposerBalanceDeltas, segmentExecStatus};
return {postStates, dataAvailabilityStatuses, proposerBalanceDeltas, segmentExecStatus, availableBlockInputs};
} finally {
abortController.abort();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Logger} from "@lodestar/utils";
import {BlockError, BlockErrorCode} from "../errors/index.js";
import {validateBlobSidecars} from "../validation/blobSidecar.js";
import {Metrics} from "../../metrics/metrics.js";
import {BlockInput, BlockInputType, ImportBlockOpts, BlobSidecarValidation} from "./types.js";
import {BlockInput, BlockInputType, ImportBlockOpts, BlobSidecarValidation, getBlockInput} from "./types.js";

// we can now wait for full 12 seconds because unavailable block sync will try pulling
// the blobs from the network anyway after 500ms of seeing the block
Expand All @@ -27,19 +27,26 @@ export async function verifyBlocksDataAvailability(
chain: {config: ChainForkConfig; genesisTime: UintNum64; logger: Logger; metrics: Metrics | null},
blocks: BlockInput[],
opts: ImportBlockOpts
): Promise<{dataAvailabilityStatuses: DataAvailableStatus[]; availableTime: number}> {
): Promise<{
dataAvailabilityStatuses: DataAvailableStatus[];
availableTime: number;
availableBlockInputs: BlockInput[];
}> {
if (blocks.length === 0) {
throw Error("Empty partiallyVerifiedBlocks");
}

const dataAvailabilityStatuses: DataAvailableStatus[] = [];
const seenTime = opts.seenTimestampSec !== undefined ? opts.seenTimestampSec * 1000 : Date.now();

const availableBlockInputs: BlockInput[] = [];

for (const blockInput of blocks) {
// Validate status of only not yet finalized blocks, we don't need yet to propogate the status
// as it is not used upstream anywhere
const dataAvailabilityStatus = await maybeValidateBlobs(chain, blockInput, opts);
const {dataAvailabilityStatus, availableBlockInput} = await maybeValidateBlobs(chain, blockInput, opts);
dataAvailabilityStatuses.push(dataAvailabilityStatus);
availableBlockInputs.push(availableBlockInput);
}

const availableTime = blocks[blocks.length - 1].type === BlockInputType.blobsPromise ? Date.now() : seenTime;
Expand All @@ -55,21 +62,21 @@ export async function verifyBlocksDataAvailability(
});
}

return {dataAvailabilityStatuses, availableTime};
return {dataAvailabilityStatuses, availableTime, availableBlockInputs};
}

async function maybeValidateBlobs(
chain: {config: ChainForkConfig; genesisTime: UintNum64; logger: Logger},
blockInput: BlockInput,
opts: ImportBlockOpts
): Promise<DataAvailableStatus> {
): Promise<{dataAvailabilityStatus: DataAvailableStatus; availableBlockInput: BlockInput}> {
switch (blockInput.type) {
case BlockInputType.preDeneb:
return DataAvailableStatus.preDeneb;
return {dataAvailabilityStatus: DataAvailableStatus.preDeneb, availableBlockInput: blockInput};

case BlockInputType.postDeneb:
if (opts.validBlobSidecars === BlobSidecarValidation.Full) {
return DataAvailableStatus.available;
return {dataAvailabilityStatus: DataAvailableStatus.available, availableBlockInput: blockInput};
}

// eslint-disable-next-line no-fallthrough
Expand All @@ -82,7 +89,7 @@ async function maybeValidateBlobs(
blockInput.type === BlockInputType.postDeneb
? blockInput
: await raceWithCutoff(chain, blockInput, blockInput.availabilityPromise);
const {blobs} = blobsData;
const {blobs, blobsBytes, blobsSource} = blobsData;

const {blobKzgCommitments} = (block as deneb.SignedBeaconBlock).message.body;
const beaconBlockRoot = chain.config.getForkTypes(blockSlot).BeaconBlock.hashTreeRoot(block.message);
Expand All @@ -92,7 +99,16 @@ async function maybeValidateBlobs(
const skipProofsCheck = opts.validBlobSidecars === BlobSidecarValidation.Individual;
validateBlobSidecars(blockSlot, beaconBlockRoot, blobKzgCommitments, blobs, {skipProofsCheck});

return DataAvailableStatus.available;
const availableBlockInput = getBlockInput.postDeneb(
chain.config,
blockInput.block,
blockInput.source,
blobs,
blobsSource,
blockInput.blockBytes,
blobsBytes
);
return {dataAvailabilityStatus: DataAvailableStatus.available, availableBlockInput: availableBlockInput};
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
BlobsCache,
GossipedInputType,
getBlockInputBlobs,
BlobsSource,
} from "../blocks/types.js";
import {Metrics} from "../../metrics/index.js";

Expand Down Expand Up @@ -135,14 +136,15 @@ export class SeenGossipBlockInput {

if (blobKzgCommitments.length === blobsCache.size) {
const allBlobs = getBlockInputBlobs(blobsCache);
resolveAvailability(allBlobs);
resolveAvailability({...allBlobs, blobsSource: BlobsSource.gossip});
metrics?.syncUnknownBlock.resolveAvailabilitySource.inc({source: BlockInputAvailabilitySource.GOSSIP});
const {blobs, blobsBytes} = allBlobs;
const blockInput = getBlockInput.postDeneb(
config,
signedBlock,
BlockSource.gossip,
blobs,
BlobsSource.gossip,
blockBytes ?? null,
blobsBytes
);
Expand Down
7 changes: 6 additions & 1 deletion packages/beacon-node/src/metrics/metrics/lodestar.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {EpochTransitionStep, StateCloneSource, StateHashTreeRootSource} from "@lodestar/state-transition";
import {allForks} from "@lodestar/types";
import {BlockSource} from "../../chain/blocks/types.js";
import {BlockSource, BlobsSource} from "../../chain/blocks/types.js";
import {JobQueueItemType} from "../../chain/bls/index.js";
import {BlockErrorCode} from "../../chain/errors/index.js";
import {InsertOutcome} from "../../chain/opPools/types.js";
Expand Down Expand Up @@ -800,6 +800,11 @@ export function createLodestarMetrics(
help: "Total number of imported blocks by source",
labelNames: ["source"],
}),
blobsBySource: register.gauge<{blobsSource: BlobsSource}>({
name: "lodestar_import_blobs_by_source_total",
help: "Total number of imported blobs by source",
labelNames: ["blobsSource"],
}),
},
engineNotifyNewPayloadResult: register.gauge<{result: ExecutionPayloadStatus}>({
name: "lodestar_execution_engine_notify_new_payload_result_total",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {deneb, Epoch, phase0, allForks, Slot} from "@lodestar/types";
import {ForkSeq} from "@lodestar/params";
import {computeEpochAtSlot} from "@lodestar/state-transition";

import {BlockInput, BlockSource, getBlockInput} from "../../chain/blocks/types.js";
import {BlobsSource, BlockInput, BlockSource, getBlockInput} from "../../chain/blocks/types.js";
import {PeerIdStr} from "../../util/peerId.js";
import {INetwork, WithBytes} from "../interface.js";

Expand Down Expand Up @@ -43,7 +43,7 @@ export async function beaconBlocksMaybeBlobsByRange(
network.sendBlobSidecarsByRange(peerId, request),
]);

return matchBlockWithBlobs(config, allBlocks, allBlobSidecars, endSlot, BlockSource.byRange);
return matchBlockWithBlobs(config, allBlocks, allBlobSidecars, endSlot, BlockSource.byRange, BlobsSource.byRange);
}

// Post Deneb but old blobs
Expand All @@ -58,7 +58,8 @@ export function matchBlockWithBlobs(
allBlocks: WithBytes<allForks.SignedBeaconBlock>[],
allBlobSidecars: deneb.BlobSidecar[],
endSlot: Slot,
blockSource: BlockSource
blockSource: BlockSource,
blobsSource: BlobsSource
): BlockInput[] {
const blockInputs: BlockInput[] = [];
let blobSideCarIndex = 0;
Expand Down Expand Up @@ -101,6 +102,7 @@ export function matchBlockWithBlobs(
block.data,
blockSource,
blobSidecars,
blobsSource,
null,
Array.from({length: blobKzgCommitmentsLen}, () => null)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
getBlockInputBlobs,
getBlockInput,
NullBlockInput,
BlobsSource,
} from "../../chain/blocks/types.js";
import {PeerIdStr} from "../../util/peerId.js";
import {INetwork} from "../interface.js";
Expand Down Expand Up @@ -47,7 +48,7 @@ export async function beaconBlocksMaybeBlobsByRoot(

// The last arg is to provide slot to which all blobs should be exausted in matching
// and here it should be infinity since all bobs should match
return matchBlockWithBlobs(config, allBlocks, allBlobSidecars, Infinity, BlockSource.byRoot);
return matchBlockWithBlobs(config, allBlocks, allBlobSidecars, Infinity, BlockSource.byRoot, BlobsSource.byRoot);
}

export async function unavailableBeaconBlobsByRoot(
Expand Down Expand Up @@ -104,7 +105,7 @@ export async function unavailableBeaconBlobsByRoot(
throw Error(`Not all blobs fetched missingBlobs=${blobKzgCommitmentsLen - blobs.length}`);
}

resolveAvailability(allBlobs);
resolveAvailability({...allBlobs, blobsSource: BlobsSource.byRoot});
metrics?.syncUnknownBlock.resolveAvailabilitySource.inc({source: BlockInputAvailabilitySource.UNKNOWN_SYNC});
return getBlockInput.postDeneb(config, block, BlockSource.byRoot, blobs, blockBytes, blobsBytes);
return getBlockInput.postDeneb(config, block, BlockSource.byRoot, blobs, BlobsSource.byRoot, blockBytes, blobsBytes);
}
11 changes: 9 additions & 2 deletions packages/beacon-node/test/spec/presets/fork_choice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
AttestationImportOpt,
BlockSource,
BlobSidecarValidation,
BlobsSource,
} from "../../../src/chain/blocks/types.js";
import {ZERO_HASH_HEX} from "../../../src/constants/constants.js";
import {PowMergeBlock} from "../../../src/eth1/interface.js";
Expand Down Expand Up @@ -209,9 +210,15 @@ const forkChoiceTest =
};
});

blockImport = getBlockInput.postDeneb(config, signedBlock, BlockSource.gossip, blobSidecars, null, [
blockImport = getBlockInput.postDeneb(
config,
signedBlock,
BlockSource.gossip,
blobSidecars,
BlobsSource.gossip,
null,
]);
[null]
);
} else {
blockImport = getBlockInput.preDeneb(config, signedBlock, BlockSource.gossip, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ssz, deneb} from "@lodestar/types";
import {createBeaconConfig, createChainForkConfig, defaultChainConfig} from "@lodestar/config";

import {beaconBlocksMaybeBlobsByRange} from "../../../src/network/reqresp/index.js";
import {BlockInputType, BlockSource} from "../../../src/chain/blocks/types.js";
import {BlockInputType, BlockSource, BlobsSource} from "../../../src/chain/blocks/types.js";
import {initCKZG, loadEthereumTrustedSetup} from "../../../src/util/kzg.js";
import {INetwork} from "../../../src/network/interface.js";
import {ZERO_HASH} from "../../../src/constants/constants.js";
Expand Down Expand Up @@ -104,6 +104,7 @@ describe("beaconBlocksMaybeBlobsByRange", () => {
block,
source: BlockSource.byRange,
blobs,
blobsSource: BlobsSource.byRange,
blockBytes: null,
blobsBytes: blobs.map(() => null),
};
Expand Down

1 comment on commit e1bc926

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: e1bc926 Previous: de3988d Ratio
Map set x1000 56.855 ns/op 18.623 ns/op 3.05

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: e1bc926 Previous: de3988d Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 22.424 ms/op 75.831 ms/op 0.30
Full benchmark results
Benchmark suite Current: e1bc926 Previous: de3988d Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.1203 ms/op 822.00 us/op 1.36
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 119.50 us/op 60.006 us/op 1.99
BLS verify - blst-native 1.3233 ms/op 1.1126 ms/op 1.19
BLS verifyMultipleSignatures 3 - blst-native 2.5253 ms/op 2.1530 ms/op 1.17
BLS verifyMultipleSignatures 8 - blst-native 5.3955 ms/op 4.6756 ms/op 1.15
BLS verifyMultipleSignatures 32 - blst-native 19.586 ms/op 16.956 ms/op 1.16
BLS verifyMultipleSignatures 64 - blst-native 38.329 ms/op 33.354 ms/op 1.15
BLS verifyMultipleSignatures 128 - blst-native 76.210 ms/op 66.218 ms/op 1.15
BLS deserializing 10000 signatures 895.54 ms/op 782.90 ms/op 1.14
BLS deserializing 100000 signatures 8.9673 s/op 7.9994 s/op 1.12
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3323 ms/op 1.1408 ms/op 1.17
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5062 ms/op 1.2848 ms/op 1.17
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3657 ms/op 2.0333 ms/op 1.16
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.5534 ms/op 3.0234 ms/op 1.18
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.7959 ms/op 5.0201 ms/op 1.15
BLS aggregatePubkeys 32 - blst-native 30.095 us/op 25.053 us/op 1.20
BLS aggregatePubkeys 128 - blst-native 113.00 us/op 96.319 us/op 1.17
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 61.098 ms/op 46.069 ms/op 1.33
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 75.638 ms/op 48.891 ms/op 1.55
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 37.285 ms/op 27.930 ms/op 1.33
getSlashingsAndExits - default max 194.55 us/op 298.26 us/op 0.65
getSlashingsAndExits - 2k 597.71 us/op 551.40 us/op 1.08
proposeBlockBody type=full, size=empty 6.3240 ms/op 4.2313 ms/op 1.49
isKnown best case - 1 super set check 548.00 ns/op 417.00 ns/op 1.31
isKnown normal case - 2 super set checks 601.00 ns/op 468.00 ns/op 1.28
isKnown worse case - 16 super set checks 582.00 ns/op 516.00 ns/op 1.13
InMemoryCheckpointStateCache - add get delete 7.9930 us/op 4.7490 us/op 1.68
validate api signedAggregateAndProof - struct 2.4577 ms/op 2.0121 ms/op 1.22
validate gossip signedAggregateAndProof - struct 2.4946 ms/op 1.9950 ms/op 1.25
validate gossip attestation - vc 640000 1.4302 ms/op 1.1479 ms/op 1.25
batch validate gossip attestation - vc 640000 - chunk 32 177.76 us/op 137.20 us/op 1.30
batch validate gossip attestation - vc 640000 - chunk 64 158.08 us/op 123.49 us/op 1.28
batch validate gossip attestation - vc 640000 - chunk 128 157.64 us/op 121.69 us/op 1.30
batch validate gossip attestation - vc 640000 - chunk 256 154.37 us/op 118.50 us/op 1.30
pickEth1Vote - no votes 1.4003 ms/op 962.10 us/op 1.46
pickEth1Vote - max votes 12.469 ms/op 6.7686 ms/op 1.84
pickEth1Vote - Eth1Data hashTreeRoot value x2048 22.857 ms/op 14.400 ms/op 1.59
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 32.452 ms/op 19.379 ms/op 1.67
pickEth1Vote - Eth1Data fastSerialize value x2048 815.40 us/op 429.94 us/op 1.90
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.8754 ms/op 4.7909 ms/op 1.23
bytes32 toHexString 895.00 ns/op 450.00 ns/op 1.99
bytes32 Buffer.toString(hex) 323.00 ns/op 325.00 ns/op 0.99
bytes32 Buffer.toString(hex) from Uint8Array 589.00 ns/op 425.00 ns/op 1.39
bytes32 Buffer.toString(hex) + 0x 343.00 ns/op 302.00 ns/op 1.14
Object access 1 prop 0.22600 ns/op 0.19900 ns/op 1.14
Map access 1 prop 0.17200 ns/op 0.20700 ns/op 0.83
Object get x1000 8.5980 ns/op 5.0680 ns/op 1.70
Map get x1000 0.93100 ns/op 0.79200 ns/op 1.18
Object set x1000 73.009 ns/op 27.242 ns/op 2.68
Map set x1000 56.855 ns/op 18.623 ns/op 3.05
Return object 10000 times 0.25730 ns/op 0.24290 ns/op 1.06
Throw Error 10000 times 4.0551 us/op 2.7895 us/op 1.45
fastMsgIdFn sha256 / 200 bytes 3.5930 us/op 1.9630 us/op 1.83
fastMsgIdFn h32 xxhash / 200 bytes 361.00 ns/op 300.00 ns/op 1.20
fastMsgIdFn h64 xxhash / 200 bytes 442.00 ns/op 440.00 ns/op 1.00
fastMsgIdFn sha256 / 1000 bytes 12.038 us/op 6.5770 us/op 1.83
fastMsgIdFn h32 xxhash / 1000 bytes 503.00 ns/op 471.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 1000 bytes 513.00 ns/op 420.00 ns/op 1.22
fastMsgIdFn sha256 / 10000 bytes 106.31 us/op 52.900 us/op 2.01
fastMsgIdFn h32 xxhash / 10000 bytes 2.0500 us/op 1.8590 us/op 1.10
fastMsgIdFn h64 xxhash / 10000 bytes 1.4510 us/op 1.2450 us/op 1.17
send data - 1000 256B messages 26.444 ms/op 13.107 ms/op 2.02
send data - 1000 512B messages 27.568 ms/op 15.547 ms/op 1.77
send data - 1000 1024B messages 47.254 ms/op 22.493 ms/op 2.10
send data - 1000 1200B messages 46.171 ms/op 16.573 ms/op 2.79
send data - 1000 2048B messages 53.782 ms/op 37.701 ms/op 1.43
send data - 1000 4096B messages 46.971 ms/op 38.851 ms/op 1.21
send data - 1000 16384B messages 121.17 ms/op 99.264 ms/op 1.22
send data - 1000 65536B messages 485.87 ms/op 437.09 ms/op 1.11
enrSubnets - fastDeserialize 64 bits 1.2720 us/op 1.5700 us/op 0.81
enrSubnets - ssz BitVector 64 bits 443.00 ns/op 627.00 ns/op 0.71
enrSubnets - fastDeserialize 4 bits 176.00 ns/op 306.00 ns/op 0.58
enrSubnets - ssz BitVector 4 bits 451.00 ns/op 653.00 ns/op 0.69
prioritizePeers score -10:0 att 32-0.1 sync 2-0 235.82 us/op 177.93 us/op 1.33
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 299.39 us/op 247.16 us/op 1.21
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 398.78 us/op 311.68 us/op 1.28
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 624.14 us/op 464.84 us/op 1.34
prioritizePeers score 0:0 att 64-1 sync 4-1 730.21 us/op 611.07 us/op 1.19
array of 16000 items push then shift 1.6789 us/op 1.5156 us/op 1.11
LinkedList of 16000 items push then shift 9.5980 ns/op 9.0970 ns/op 1.06
array of 16000 items push then pop 110.00 ns/op 121.48 ns/op 0.91
LinkedList of 16000 items push then pop 9.0450 ns/op 6.9930 ns/op 1.29
array of 24000 items push then shift 2.5623 us/op 1.9921 us/op 1.29
LinkedList of 24000 items push then shift 9.6570 ns/op 8.3560 ns/op 1.16
array of 24000 items push then pop 154.00 ns/op 156.63 ns/op 0.98
LinkedList of 24000 items push then pop 8.7710 ns/op 6.2030 ns/op 1.41
intersect bitArray bitLen 8 5.8720 ns/op 4.9210 ns/op 1.19
intersect array and set length 8 63.452 ns/op 49.528 ns/op 1.28
intersect bitArray bitLen 128 35.642 ns/op 29.503 ns/op 1.21
intersect array and set length 128 878.53 ns/op 682.82 ns/op 1.29
bitArray.getTrueBitIndexes() bitLen 128 1.5660 us/op 1.2260 us/op 1.28
bitArray.getTrueBitIndexes() bitLen 248 2.7460 us/op 2.1080 us/op 1.30
bitArray.getTrueBitIndexes() bitLen 512 6.0810 us/op 5.2480 us/op 1.16
Buffer.concat 32 items 1.0560 us/op 1.0550 us/op 1.00
Uint8Array.set 32 items 1.9290 us/op 1.6390 us/op 1.18
Set add up to 64 items then delete first 4.9368 us/op 1.7849 us/op 2.77
OrderedSet add up to 64 items then delete first 6.7410 us/op 4.7230 us/op 1.43
Set add up to 64 items then delete last 5.2878 us/op 3.7687 us/op 1.40
OrderedSet add up to 64 items then delete last 6.0619 us/op 6.2658 us/op 0.97
Set add up to 64 items then delete middle 4.9312 us/op 4.1778 us/op 1.18
OrderedSet add up to 64 items then delete middle 7.5483 us/op 8.4672 us/op 0.89
Set add up to 128 items then delete first 10.489 us/op 8.7006 us/op 1.21
OrderedSet add up to 128 items then delete first 14.393 us/op 13.087 us/op 1.10
Set add up to 128 items then delete last 10.833 us/op 8.5226 us/op 1.27
OrderedSet add up to 128 items then delete last 12.191 us/op 13.420 us/op 0.91
Set add up to 128 items then delete middle 9.3318 us/op 8.6079 us/op 1.08
OrderedSet add up to 128 items then delete middle 18.877 us/op 21.395 us/op 0.88
Set add up to 256 items then delete first 19.332 us/op 17.907 us/op 1.08
OrderedSet add up to 256 items then delete first 25.585 us/op 29.829 us/op 0.86
Set add up to 256 items then delete last 21.456 us/op 12.680 us/op 1.69
OrderedSet add up to 256 items then delete last 24.659 us/op 26.855 us/op 0.92
Set add up to 256 items then delete middle 19.801 us/op 14.458 us/op 1.37
OrderedSet add up to 256 items then delete middle 49.481 us/op 45.634 us/op 1.08
transfer serialized Status (84 B) 1.8620 us/op 2.3080 us/op 0.81
copy serialized Status (84 B) 1.4580 us/op 1.8300 us/op 0.80
transfer serialized SignedVoluntaryExit (112 B) 1.9770 us/op 2.8470 us/op 0.69
copy serialized SignedVoluntaryExit (112 B) 1.4170 us/op 2.1080 us/op 0.67
transfer serialized ProposerSlashing (416 B) 2.1420 us/op 4.0440 us/op 0.53
copy serialized ProposerSlashing (416 B) 2.0090 us/op 4.0680 us/op 0.49
transfer serialized Attestation (485 B) 2.4450 us/op 4.0010 us/op 0.61
copy serialized Attestation (485 B) 2.0360 us/op 3.3630 us/op 0.61
transfer serialized AttesterSlashing (33232 B) 2.2340 us/op 3.5450 us/op 0.63
copy serialized AttesterSlashing (33232 B) 7.8520 us/op 13.101 us/op 0.60
transfer serialized Small SignedBeaconBlock (128000 B) 2.6490 us/op 4.8870 us/op 0.54
copy serialized Small SignedBeaconBlock (128000 B) 21.836 us/op 40.020 us/op 0.55
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5300 us/op 4.7100 us/op 0.75
copy serialized Avg SignedBeaconBlock (200000 B) 31.074 us/op 40.806 us/op 0.76
transfer serialized BlobsSidecar (524380 B) 3.7080 us/op 8.9980 us/op 0.41
copy serialized BlobsSidecar (524380 B) 120.87 us/op 230.18 us/op 0.53
transfer serialized Big SignedBeaconBlock (1000000 B) 4.2850 us/op 8.7290 us/op 0.49
copy serialized Big SignedBeaconBlock (1000000 B) 181.91 us/op 318.65 us/op 0.57
pass gossip attestations to forkchoice per slot 4.7392 ms/op 4.6851 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 756.99 us/op 874.96 us/op 0.87
forkChoice updateHead vc 600000 bc 64 eq 0 6.9367 ms/op 3.6292 ms/op 1.91
forkChoice updateHead vc 1000000 bc 64 eq 0 7.8579 ms/op 6.2683 ms/op 1.25
forkChoice updateHead vc 600000 bc 320 eq 0 4.4736 ms/op 3.8145 ms/op 1.17
forkChoice updateHead vc 600000 bc 1200 eq 0 4.5946 ms/op 3.6223 ms/op 1.27
forkChoice updateHead vc 600000 bc 7200 eq 0 5.8008 ms/op 6.0723 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 1000 11.646 ms/op 11.614 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 13.484 ms/op 11.772 ms/op 1.15
forkChoice updateHead vc 600000 bc 64 eq 300000 22.424 ms/op 75.831 ms/op 0.30
computeDeltas 500000 validators 300 proto nodes 7.6478 ms/op 4.7473 ms/op 1.61
computeDeltas 500000 validators 1200 proto nodes 7.0795 ms/op 4.7166 ms/op 1.50
computeDeltas 500000 validators 7200 proto nodes 6.8581 ms/op 4.2616 ms/op 1.61
computeDeltas 750000 validators 300 proto nodes 10.019 ms/op 6.4645 ms/op 1.55
computeDeltas 750000 validators 1200 proto nodes 9.9164 ms/op 5.2062 ms/op 1.90
computeDeltas 750000 validators 7200 proto nodes 9.9342 ms/op 4.6188 ms/op 2.15
computeDeltas 1400000 validators 300 proto nodes 18.558 ms/op 9.0023 ms/op 2.06
computeDeltas 1400000 validators 1200 proto nodes 19.851 ms/op 8.9994 ms/op 2.21
computeDeltas 1400000 validators 7200 proto nodes 20.013 ms/op 8.5698 ms/op 2.34
computeDeltas 2100000 validators 300 proto nodes 28.851 ms/op 13.190 ms/op 2.19
computeDeltas 2100000 validators 1200 proto nodes 29.614 ms/op 13.474 ms/op 2.20
computeDeltas 2100000 validators 7200 proto nodes 28.543 ms/op 13.449 ms/op 2.12
altair processAttestation - 250000 vs - 7PWei normalcase 2.7828 ms/op 2.2966 ms/op 1.21
altair processAttestation - 250000 vs - 7PWei worstcase 4.5102 ms/op 3.4349 ms/op 1.31
altair processAttestation - setStatus - 1/6 committees join 208.66 us/op 82.634 us/op 2.53
altair processAttestation - setStatus - 1/3 committees join 399.80 us/op 294.96 us/op 1.36
altair processAttestation - setStatus - 1/2 committees join 502.51 us/op 389.75 us/op 1.29
altair processAttestation - setStatus - 2/3 committees join 649.02 us/op 311.49 us/op 2.08
altair processAttestation - setStatus - 4/5 committees join 866.44 us/op 461.57 us/op 1.88
altair processAttestation - setStatus - 100% committees join 1.0783 ms/op 515.56 us/op 2.09
altair processBlock - 250000 vs - 7PWei normalcase 8.9681 ms/op 9.5987 ms/op 0.93
altair processBlock - 250000 vs - 7PWei normalcase hashState 36.494 ms/op 34.994 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase 47.454 ms/op 37.983 ms/op 1.25
altair processBlock - 250000 vs - 7PWei worstcase hashState 94.505 ms/op 92.905 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei normalcase 2.7337 ms/op 2.2330 ms/op 1.22
phase0 processBlock - 250000 vs - 7PWei worstcase 32.340 ms/op 27.972 ms/op 1.16
altair processEth1Data - 250000 vs - 7PWei normalcase 573.83 us/op 529.26 us/op 1.08
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 17.466 us/op 7.3710 us/op 2.37
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 83.299 us/op 49.794 us/op 1.67
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 24.354 us/op 22.347 us/op 1.09
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 18.497 us/op 10.869 us/op 1.70
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 272.20 us/op 133.94 us/op 2.03
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.8580 ms/op 1.2299 ms/op 1.51
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.2505 ms/op 917.31 us/op 2.45
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.5309 ms/op 1.0601 ms/op 2.39
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8619 ms/op 2.4222 ms/op 1.59
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.0729 ms/op 2.2413 ms/op 1.37
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.4759 ms/op 4.4494 ms/op 1.46
Tree 40 250000 create 693.74 ms/op 310.54 ms/op 2.23
Tree 40 250000 get(125000) 223.97 ns/op 119.85 ns/op 1.87
Tree 40 250000 set(125000) 1.2973 us/op 910.80 ns/op 1.42
Tree 40 250000 toArray() 23.771 ms/op 22.542 ms/op 1.05
Tree 40 250000 iterate all - toArray() + loop 24.888 ms/op 22.603 ms/op 1.10
Tree 40 250000 iterate all - get(i) 82.777 ms/op 53.739 ms/op 1.54
MutableVector 250000 create 19.502 ms/op 13.450 ms/op 1.45
MutableVector 250000 get(125000) 7.0760 ns/op 5.7080 ns/op 1.24
MutableVector 250000 set(125000) 336.60 ns/op 224.72 ns/op 1.50
MutableVector 250000 toArray() 3.8228 ms/op 2.2647 ms/op 1.69
MutableVector 250000 iterate all - toArray() + loop 4.1505 ms/op 2.5664 ms/op 1.62
MutableVector 250000 iterate all - get(i) 1.7203 ms/op 1.3383 ms/op 1.29
Array 250000 create 3.8479 ms/op 2.1031 ms/op 1.83
Array 250000 clone - spread 1.5510 ms/op 1.1955 ms/op 1.30
Array 250000 get(125000) 1.3250 ns/op 1.0780 ns/op 1.23
Array 250000 set(125000) 4.8440 ns/op 1.2730 ns/op 3.81
Array 250000 iterate all - loop 170.22 us/op 153.95 us/op 1.11
effectiveBalanceIncrements clone Uint8Array 300000 42.643 us/op 14.712 us/op 2.90
effectiveBalanceIncrements clone MutableVector 300000 463.00 ns/op 439.00 ns/op 1.05
effectiveBalanceIncrements rw all Uint8Array 300000 209.49 us/op 185.52 us/op 1.13
effectiveBalanceIncrements rw all MutableVector 300000 102.29 ms/op 66.755 ms/op 1.53
phase0 afterProcessEpoch - 250000 vs - 7PWei 121.75 ms/op 76.719 ms/op 1.59
phase0 beforeProcessEpoch - 250000 vs - 7PWei 62.490 ms/op 47.247 ms/op 1.32
altair processEpoch - mainnet_e81889 525.15 ms/op 388.15 ms/op 1.35
mainnet_e81889 - altair beforeProcessEpoch 88.546 ms/op 73.375 ms/op 1.21
mainnet_e81889 - altair processJustificationAndFinalization 17.258 us/op 11.341 us/op 1.52
mainnet_e81889 - altair processInactivityUpdates 5.9194 ms/op 4.1120 ms/op 1.44
mainnet_e81889 - altair processRewardsAndPenalties 86.144 ms/op 64.184 ms/op 1.34
mainnet_e81889 - altair processRegistryUpdates 2.4490 us/op 3.9500 us/op 0.62
mainnet_e81889 - altair processSlashings 583.00 ns/op 610.00 ns/op 0.96
mainnet_e81889 - altair processEth1DataReset 472.00 ns/op 862.00 ns/op 0.55
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5867 ms/op 1.0573 ms/op 1.50
mainnet_e81889 - altair processSlashingsReset 4.0850 us/op 5.2800 us/op 0.77
mainnet_e81889 - altair processRandaoMixesReset 7.2810 us/op 3.7450 us/op 1.94
mainnet_e81889 - altair processHistoricalRootsUpdate 749.00 ns/op 1.1300 us/op 0.66
mainnet_e81889 - altair processParticipationFlagUpdates 1.6460 us/op 3.6060 us/op 0.46
mainnet_e81889 - altair processSyncCommitteeUpdates 777.00 ns/op 790.00 ns/op 0.98
mainnet_e81889 - altair afterProcessEpoch 121.79 ms/op 84.951 ms/op 1.43
capella processEpoch - mainnet_e217614 2.4277 s/op 2.4311 s/op 1.00
mainnet_e217614 - capella beforeProcessEpoch 498.83 ms/op 511.81 ms/op 0.97
mainnet_e217614 - capella processJustificationAndFinalization 17.702 us/op 20.344 us/op 0.87
mainnet_e217614 - capella processInactivityUpdates 22.341 ms/op 22.777 ms/op 0.98
mainnet_e217614 - capella processRewardsAndPenalties 559.97 ms/op 520.06 ms/op 1.08
mainnet_e217614 - capella processRegistryUpdates 21.769 us/op 25.650 us/op 0.85
mainnet_e217614 - capella processSlashings 553.00 ns/op 778.00 ns/op 0.71
mainnet_e217614 - capella processEth1DataReset 516.00 ns/op 773.00 ns/op 0.67
mainnet_e217614 - capella processEffectiveBalanceUpdates 7.9661 ms/op 3.9747 ms/op 2.00
mainnet_e217614 - capella processSlashingsReset 3.4460 us/op 6.0270 us/op 0.57
mainnet_e217614 - capella processRandaoMixesReset 4.2390 us/op 7.6260 us/op 0.56
mainnet_e217614 - capella processHistoricalRootsUpdate 670.00 ns/op 993.00 ns/op 0.67
mainnet_e217614 - capella processParticipationFlagUpdates 1.4250 us/op 2.9260 us/op 0.49
mainnet_e217614 - capella afterProcessEpoch 316.89 ms/op 244.46 ms/op 1.30
phase0 processEpoch - mainnet_e58758 521.49 ms/op 525.41 ms/op 0.99
mainnet_e58758 - phase0 beforeProcessEpoch 134.71 ms/op 176.87 ms/op 0.76
mainnet_e58758 - phase0 processJustificationAndFinalization 16.007 us/op 27.588 us/op 0.58
mainnet_e58758 - phase0 processRewardsAndPenalties 69.606 ms/op 63.808 ms/op 1.09
mainnet_e58758 - phase0 processRegistryUpdates 14.387 us/op 14.981 us/op 0.96
mainnet_e58758 - phase0 processSlashings 767.00 ns/op 1.1500 us/op 0.67
mainnet_e58758 - phase0 processEth1DataReset 556.00 ns/op 1.1270 us/op 0.49
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3065 ms/op 938.96 us/op 1.39
mainnet_e58758 - phase0 processSlashingsReset 3.9930 us/op 5.3230 us/op 0.75
mainnet_e58758 - phase0 processRandaoMixesReset 7.6160 us/op 8.5550 us/op 0.89
mainnet_e58758 - phase0 processHistoricalRootsUpdate 954.00 ns/op 1.0420 us/op 0.92
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.8770 us/op 7.8330 us/op 0.62
mainnet_e58758 - phase0 afterProcessEpoch 102.16 ms/op 75.022 ms/op 1.36
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9390 ms/op 1.1755 ms/op 1.65
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5096 ms/op 1.4923 ms/op 1.01
altair processInactivityUpdates - 250000 normalcase 34.890 ms/op 35.452 ms/op 0.98
altair processInactivityUpdates - 250000 worstcase 29.297 ms/op 30.065 ms/op 0.97
phase0 processRegistryUpdates - 250000 normalcase 13.274 us/op 17.108 us/op 0.78
phase0 processRegistryUpdates - 250000 badcase_full_deposits 496.81 us/op 512.92 us/op 0.97
phase0 processRegistryUpdates - 250000 worstcase 0.5 154.90 ms/op 153.02 ms/op 1.01
altair processRewardsAndPenalties - 250000 normalcase 93.881 ms/op 62.284 ms/op 1.51
altair processRewardsAndPenalties - 250000 worstcase 69.186 ms/op 62.555 ms/op 1.11
phase0 getAttestationDeltas - 250000 normalcase 9.9947 ms/op 9.7674 ms/op 1.02
phase0 getAttestationDeltas - 250000 worstcase 9.8642 ms/op 6.9002 ms/op 1.43
phase0 processSlashings - 250000 worstcase 94.494 us/op 92.676 us/op 1.02
altair processSyncCommitteeUpdates - 250000 171.20 ms/op 120.80 ms/op 1.42
BeaconState.hashTreeRoot - No change 735.00 ns/op 805.00 ns/op 0.91
BeaconState.hashTreeRoot - 1 full validator 178.67 us/op 131.61 us/op 1.36
BeaconState.hashTreeRoot - 32 full validator 1.5230 ms/op 1.2179 ms/op 1.25
BeaconState.hashTreeRoot - 512 full validator 16.386 ms/op 12.612 ms/op 1.30
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 180.11 us/op 132.39 us/op 1.36
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5968 ms/op 2.5676 ms/op 1.01
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 35.223 ms/op 34.073 ms/op 1.03
BeaconState.hashTreeRoot - 1 balances 165.92 us/op 145.12 us/op 1.14
BeaconState.hashTreeRoot - 32 balances 1.5656 ms/op 1.2697 ms/op 1.23
BeaconState.hashTreeRoot - 512 balances 14.922 ms/op 13.432 ms/op 1.11
BeaconState.hashTreeRoot - 250000 balances 226.61 ms/op 178.67 ms/op 1.27
aggregationBits - 2048 els - zipIndexesInBitList 32.563 us/op 25.751 us/op 1.26
byteArrayEquals 32 84.114 ns/op 65.488 ns/op 1.28
Buffer.compare 32 59.203 ns/op 38.670 ns/op 1.53
byteArrayEquals 1024 2.1418 us/op 1.7847 us/op 1.20
Buffer.compare 1024 71.892 ns/op 48.208 ns/op 1.49
byteArrayEquals 16384 34.669 us/op 29.095 us/op 1.19
Buffer.compare 16384 263.80 ns/op 211.86 ns/op 1.25
byteArrayEquals 123687377 271.47 ms/op 211.28 ms/op 1.28
Buffer.compare 123687377 10.845 ms/op 6.7638 ms/op 1.60
byteArrayEquals 32 - diff last byte 76.029 ns/op 64.900 ns/op 1.17
Buffer.compare 32 - diff last byte 59.018 ns/op 41.747 ns/op 1.41
byteArrayEquals 1024 - diff last byte 2.3970 us/op 1.7699 us/op 1.35
Buffer.compare 1024 - diff last byte 74.676 ns/op 46.026 ns/op 1.62
byteArrayEquals 16384 - diff last byte 34.415 us/op 27.855 us/op 1.24
Buffer.compare 16384 - diff last byte 290.66 ns/op 204.13 ns/op 1.42
byteArrayEquals 123687377 - diff last byte 283.27 ms/op 205.55 ms/op 1.38
Buffer.compare 123687377 - diff last byte 9.0192 ms/op 6.4447 ms/op 1.40
byteArrayEquals 32 - random bytes 6.5690 ns/op 4.7830 ns/op 1.37
Buffer.compare 32 - random bytes 64.829 ns/op 37.235 ns/op 1.74
byteArrayEquals 1024 - random bytes 6.6690 ns/op 4.7920 ns/op 1.39
Buffer.compare 1024 - random bytes 64.668 ns/op 35.343 ns/op 1.83
byteArrayEquals 16384 - random bytes 6.7320 ns/op 4.6240 ns/op 1.46
Buffer.compare 16384 - random bytes 65.066 ns/op 36.384 ns/op 1.79
byteArrayEquals 123687377 - random bytes 10.910 ns/op 8.0300 ns/op 1.36
Buffer.compare 123687377 - random bytes 74.600 ns/op 40.130 ns/op 1.86
regular array get 100000 times 47.009 us/op 40.697 us/op 1.16
wrappedArray get 100000 times 46.996 us/op 41.168 us/op 1.14
arrayWithProxy get 100000 times 14.800 ms/op 9.1546 ms/op 1.62
ssz.Root.equals 55.693 ns/op 54.237 ns/op 1.03
byteArrayEquals 56.502 ns/op 53.740 ns/op 1.05
Buffer.compare 13.024 ns/op 10.192 ns/op 1.28
shuffle list - 16384 els 9.6550 ms/op 6.2070 ms/op 1.56
shuffle list - 250000 els 131.52 ms/op 88.629 ms/op 1.48
processSlot - 1 slots 19.910 us/op 19.709 us/op 1.01
processSlot - 32 slots 3.5677 ms/op 2.6665 ms/op 1.34
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 69.698 ms/op 44.937 ms/op 1.55
getCommitteeAssignments - req 1 vs - 250000 vc 2.9163 ms/op 2.4458 ms/op 1.19
getCommitteeAssignments - req 100 vs - 250000 vc 4.1051 ms/op 3.6741 ms/op 1.12
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5100 ms/op 3.8804 ms/op 1.16
findModifiedValidators - 10000 modified validators 415.09 ms/op 333.11 ms/op 1.25
findModifiedValidators - 1000 modified validators 239.76 ms/op 238.26 ms/op 1.01
findModifiedValidators - 100 modified validators 302.08 ms/op 189.42 ms/op 1.59
findModifiedValidators - 10 modified validators 277.77 ms/op 159.35 ms/op 1.74
findModifiedValidators - 1 modified validators 263.35 ms/op 181.39 ms/op 1.45
findModifiedValidators - no difference 332.13 ms/op 206.42 ms/op 1.61
compare ViewDUs 5.8522 s/op 4.4654 s/op 1.31
compare each validator Uint8Array 1.6977 s/op 1.8490 s/op 0.92
compare ViewDU to Uint8Array 1.5546 s/op 1.0553 s/op 1.47
migrate state 1000000 validators, 24 modified, 0 new 995.02 ms/op 671.77 ms/op 1.48
migrate state 1000000 validators, 1700 modified, 1000 new 1.3296 s/op 1.1495 s/op 1.16
migrate state 1000000 validators, 3400 modified, 2000 new 1.6944 s/op 1.8288 s/op 0.93
migrate state 1500000 validators, 24 modified, 0 new 954.89 ms/op 986.41 ms/op 0.97
migrate state 1500000 validators, 1700 modified, 1000 new 1.4351 s/op 1.2212 s/op 1.18
migrate state 1500000 validators, 3400 modified, 2000 new 1.7685 s/op 1.5738 s/op 1.12
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0300 ns/op 5.7900 ns/op 0.87
state getBlockRootAtSlot - 250000 vs - 7PWei 784.93 ns/op 883.38 ns/op 0.89
computeProposers - vc 250000 10.264 ms/op 8.5925 ms/op 1.19
computeEpochShuffling - vc 250000 133.83 ms/op 90.442 ms/op 1.48
getNextSyncCommittee - vc 250000 174.24 ms/op 126.89 ms/op 1.37
computeSigningRoot for AttestationData 29.321 us/op 28.100 us/op 1.04
hash AttestationData serialized data then Buffer.toString(base64) 2.5152 us/op 1.5042 us/op 1.67
toHexString serialized data 1.3027 us/op 1.7349 us/op 0.75
Buffer.toString(base64) 248.10 ns/op 229.00 ns/op 1.08

Please sign in to comment.