Skip to content

Commit

Permalink
feat: optimistically verify blocks even before all blobs available (#…
Browse files Browse the repository at this point in the history
…6087)

* feat: optimistically verify blocks even before all blobs available

cleanup pr and add metrics to track

simplify

improvements and type fixes

increase bucket precision

time fixes

improve metrics collection

improve metrics collection

some comments improv

fix the missing writing blobs for blobspromise

rebase fixes

rebase fixes

remove artifact

apply feedback

add more meta info to error

separate out the blockinput cache and attach to chain

rename the cache

apply more feedback

add unittest for seengossipblockinput

add comments

* check type fixes
  • Loading branch information
g11tech authored Dec 19, 2023
1 parent 6670c08 commit be92973
Show file tree
Hide file tree
Showing 18 changed files with 635 additions and 232 deletions.
21 changes: 7 additions & 14 deletions 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,6 @@ import {
computeTimeAtSlot,
parseSignedBlindedBlockOrContents,
reconstructFullBlockOrContents,
DataAvailableStatus,
} from "@lodestar/state-transition";
import {SLOTS_PER_HISTORICAL_ROOT} from "@lodestar/params";
import {sleep, toHex} from "@lodestar/utils";
Expand Down Expand Up @@ -121,19 +120,13 @@ export function getBeaconBlockApi({
}

try {
await verifyBlocksInEpoch.call(
chain as BeaconChain,
parentBlock,
[blockForImport],
[DataAvailableStatus.available],
{
...opts,
verifyOnly: true,
skipVerifyBlockSignatures: true,
skipVerifyExecutionPayload: true,
seenTimestampSec,
}
);
await verifyBlocksInEpoch.call(chain as BeaconChain, parentBlock, [blockForImport], {
...opts,
verifyOnly: true,
skipVerifyBlockSignatures: true,
skipVerifyExecutionPayload: true,
seenTimestampSec,
});
} catch (error) {
chain.logger.error("Consensus checks failed while publishing the block", valLogMeta, error as Error);
chain.persistInvalidSszValue(
Expand Down
15 changes: 3 additions & 12 deletions packages/beacon-node/src/chain/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ export async function processBlocks(
}

try {
const {relevantBlocks, dataAvailabilityStatuses, parentSlots, parentBlock} = verifyBlocksSanityChecks(
this,
blocks,
opts
);
const {relevantBlocks, parentSlots, parentBlock} = verifyBlocksSanityChecks(this, blocks, opts);

// No relevant blocks, skip verifyBlocksInEpoch()
if (relevantBlocks.length === 0 || parentBlock === null) {
Expand All @@ -72,13 +68,8 @@ 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, proposerBalanceDeltas, segmentExecStatus} = await verifyBlocksInEpoch.call(
this,
parentBlock,
relevantBlocks,
dataAvailabilityStatuses,
opts
);
const {postStates, dataAvailabilityStatuses, proposerBalanceDeltas, segmentExecStatus} =
await verifyBlocksInEpoch.call(this, parentBlock, relevantBlocks, opts);

// If segmentExecStatus has lvhForkchoice then, the entire segment should be invalid
// and we need to further propagate
Expand Down
155 changes: 33 additions & 122 deletions packages/beacon-node/src/chain/blocks/types.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import {toHexString} from "@chainsafe/ssz";
import {CachedBeaconStateAllForks, computeEpochAtSlot, DataAvailableStatus} from "@lodestar/state-transition";
import {MaybeValidExecutionStatus} from "@lodestar/fork-choice";
import {allForks, deneb, Slot, RootHex} from "@lodestar/types";
import {allForks, deneb, Slot} from "@lodestar/types";
import {ForkSeq, MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS} from "@lodestar/params";
import {ChainForkConfig} from "@lodestar/config";
import {pruneSetToMax} from "@lodestar/utils";

export enum BlockInputType {
preDeneb = "preDeneb",
postDeneb = "postDeneb",
blobsPromise = "blobsPromise",
}

/** Enum to represent where blocks come from */
Expand All @@ -19,9 +18,18 @@ export enum BlockSource {
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 BlockInput = {block: allForks.SignedBeaconBlock; source: BlockSource; blockBytes: Uint8Array | null} & (
| {type: BlockInputType.preDeneb}
| {type: BlockInputType.postDeneb; blobs: deneb.BlobSidecars; blobsBytes: (Uint8Array | null)[]}
| ({type: BlockInputType.postDeneb} & BlockInputBlobs)
| {type: BlockInputType.blobsPromise; blobsCache: BlobsCache; availabilityPromise: Promise<BlockInputBlobs>}
);

export function blockRequiresBlobs(config: ChainForkConfig, blockSlot: Slot, clockSlot: Slot): boolean {
Expand All @@ -32,125 +40,7 @@ export function blockRequiresBlobs(config: ChainForkConfig, blockSlot: Slot, clo
);
}

export enum GossipedInputType {
block = "block",
blob = "blob",
}
type GossipedBlockInput =
| {type: GossipedInputType.block; signedBlock: allForks.SignedBeaconBlock; blockBytes: Uint8Array | null}
| {type: GossipedInputType.blob; signedBlob: deneb.SignedBlobSidecar; blobBytes: Uint8Array | null};
type BlockInputCacheType = {
block?: allForks.SignedBeaconBlock;
blockBytes?: Uint8Array | null;
blobs: Map<number, deneb.BlobSidecar>;
blobsBytes: Map<number, Uint8Array | null>;
};

const MAX_GOSSIPINPUT_CACHE = 5;
// ssz.deneb.BlobSidecars.elementType.fixedSize;
const BLOBSIDECAR_FIXED_SIZE = 131256;

export const getBlockInput = {
blockInputCache: new Map<RootHex, BlockInputCacheType>(),

getGossipBlockInput(
config: ChainForkConfig,
gossipedInput: GossipedBlockInput
):
| {blockInput: BlockInput; blockInputMeta: {pending: null; haveBlobs: number; expectedBlobs: number}}
| {blockInput: null; blockInputMeta: {pending: GossipedInputType.block; haveBlobs: number; expectedBlobs: null}}
| {blockInput: null; blockInputMeta: {pending: GossipedInputType.blob; haveBlobs: number; expectedBlobs: number}} {
let blockHex;
let blockCache;

if (gossipedInput.type === GossipedInputType.block) {
const {signedBlock, blockBytes} = gossipedInput;

blockHex = toHexString(
config.getForkTypes(signedBlock.message.slot).BeaconBlock.hashTreeRoot(signedBlock.message)
);
blockCache = this.blockInputCache.get(blockHex) ?? {
blobs: new Map<number, deneb.BlobSidecar>(),
blobsBytes: new Map<number, Uint8Array | null>(),
};

blockCache.block = signedBlock;
blockCache.blockBytes = blockBytes;
} else {
const {signedBlob, blobBytes} = gossipedInput;
blockHex = toHexString(signedBlob.message.blockRoot);
blockCache = this.blockInputCache.get(blockHex);

// If a new entry is going to be inserted, prune out old ones
if (blockCache === undefined) {
pruneSetToMax(this.blockInputCache, MAX_GOSSIPINPUT_CACHE);
blockCache = {blobs: new Map<number, deneb.BlobSidecar>(), blobsBytes: new Map<number, Uint8Array | null>()};
}

// TODO: freetheblobs check if its the same blob or a duplicate and throw/take actions
blockCache.blobs.set(signedBlob.message.index, signedBlob.message);
// easily splice out the unsigned message as blob is a fixed length type
blockCache.blobsBytes.set(signedBlob.message.index, blobBytes?.slice(0, BLOBSIDECAR_FIXED_SIZE) ?? null);
}

this.blockInputCache.set(blockHex, blockCache);
const {block: signedBlock, blockBytes} = blockCache;

if (signedBlock !== undefined) {
// block is available, check if all blobs have shown up
const {slot, body} = signedBlock.message;
const {blobKzgCommitments} = body as deneb.BeaconBlockBody;
const blockInfo = `blockHex=${blockHex}, slot=${slot}`;

if (blobKzgCommitments.length < blockCache.blobs.size) {
throw Error(
`Received more blobs=${blockCache.blobs.size} than commitments=${blobKzgCommitments.length} for ${blockInfo}`
);
}
if (blobKzgCommitments.length === blockCache.blobs.size) {
const blobSidecars = [];
const blobsBytes = [];

for (let index = 0; index < blobKzgCommitments.length; index++) {
const blobSidecar = blockCache.blobs.get(index);
if (blobSidecar === undefined) {
throw Error(`Missing blobSidecar at index=${index} for ${blockInfo}`);
}
blobSidecars.push(blobSidecar);
blobsBytes.push(blockCache.blobsBytes.get(index) ?? null);
}

return {
// TODO freetheblobs: collate and add serialized data for the postDeneb blockinput
blockInput: getBlockInput.postDeneb(
config,
signedBlock,
BlockSource.gossip,
blobSidecars,
blockBytes ?? null,
blobsBytes
),
blockInputMeta: {pending: null, haveBlobs: blockCache.blobs.size, expectedBlobs: blobKzgCommitments.length},
};
} else {
return {
blockInput: null,
blockInputMeta: {
pending: GossipedInputType.blob,
haveBlobs: blockCache.blobs.size,
expectedBlobs: blobKzgCommitments.length,
},
};
}
} else {
// will need to wait for the block to showup
return {
blockInput: null,
blockInputMeta: {pending: GossipedInputType.block, haveBlobs: blockCache.blobs.size, expectedBlobs: null},
};
}
},

preDeneb(
config: ChainForkConfig,
block: allForks.SignedBeaconBlock,
Expand Down Expand Up @@ -188,6 +78,27 @@ export const getBlockInput = {
blobsBytes,
};
},

blobsPromise(
config: ChainForkConfig,
block: allForks.SignedBeaconBlock,
source: BlockSource,
blobsCache: BlobsCache,
blockBytes: Uint8Array | null,
availabilityPromise: Promise<BlockInputBlobs>
): BlockInput {
if (config.getForkSeq(block.message.slot) < ForkSeq.deneb) {
throw Error(`Pre Deneb block slot ${block.message.slot}`);
}
return {
type: BlockInputType.blobsPromise,
block,
source,
blobsCache,
blockBytes,
availabilityPromise,
};
},
};

export enum AttestationImportOpt {
Expand Down
52 changes: 45 additions & 7 deletions packages/beacon-node/src/chain/blocks/verifyBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
isStateValidatorsNodesPopulated,
DataAvailableStatus,
} from "@lodestar/state-transition";
import {bellatrix} from "@lodestar/types";
import {bellatrix, deneb} from "@lodestar/types";
import {ForkName} from "@lodestar/params";
import {ProtoBlock, ExecutionStatus} from "@lodestar/fork-choice";
import {ChainForkConfig} from "@lodestar/config";
Expand All @@ -14,13 +14,14 @@ import {BlockError, BlockErrorCode} from "../errors/index.js";
import {BlockProcessOpts} from "../options.js";
import {RegenCaller} from "../regen/index.js";
import type {BeaconChain} from "../chain.js";
import {BlockInput, ImportBlockOpts} from "./types.js";
import {BlockInput, ImportBlockOpts, BlockInputType} from "./types.js";
import {POS_PANDA_MERGE_TRANSITION_BANNER} from "./utils/pandaMergeTransitionBanner.js";
import {CAPELLA_OWL_BANNER} from "./utils/ownBanner.js";
import {DENEB_BLOWFISH_BANNER} from "./utils/blowfishBanner.js";
import {verifyBlocksStateTransitionOnly} from "./verifyBlocksStateTransitionOnly.js";
import {verifyBlocksSignatures} from "./verifyBlocksSignatures.js";
import {verifyBlocksExecutionPayload, SegmentExecStatus} from "./verifyBlocksExecutionPayloads.js";
import {verifyBlocksDataAvailability} from "./verifyBlocksDataAvailability.js";
import {writeBlockInputToDb} from "./writeBlockInputToDb.js";

/**
Expand All @@ -38,12 +39,12 @@ export async function verifyBlocksInEpoch(
this: BeaconChain,
parentBlock: ProtoBlock,
blocksInput: BlockInput[],
dataAvailabilityStatuses: DataAvailableStatus[],
opts: BlockProcessOpts & ImportBlockOpts
): Promise<{
postStates: CachedBeaconStateAllForks[];
proposerBalanceDeltas: number[];
segmentExecStatus: SegmentExecStatus;
dataAvailabilityStatuses: DataAvailableStatus[];
}> {
const blocks = blocksInput.map(({block}) => block);
if (blocks.length === 0) {
Expand Down Expand Up @@ -88,7 +89,12 @@ export async function verifyBlocksInEpoch(

try {
// batch all I/O operations to reduce overhead
const [segmentExecStatus, {postStates, proposerBalanceDeltas}] = await Promise.all([
const [
segmentExecStatus,
{dataAvailabilityStatuses, availableTime},
{postStates, proposerBalanceDeltas, verifyStateTime},
{verifySignaturesTime},
] = await Promise.all([
// Execution payloads
opts.skipVerifyExecutionPayload !== true
? verifyBlocksExecutionPayload(this, parentBlock, blocks, preState0, abortController.signal, opts)
Expand All @@ -98,12 +104,16 @@ export async function verifyBlocksInEpoch(
mergeBlockFound: null,
} as SegmentExecStatus),

// data availability for the blobs
verifyBlocksDataAvailability(this, blocksInput, opts),

// Run state transition only
// TODO: Ensure it yields to allow flushing to workers and engine API
verifyBlocksStateTransitionOnly(
preState0,
blocksInput,
dataAvailabilityStatuses,
// hack availability for state transition eval as availability is separately determined
blocks.map(() => DataAvailableStatus.available),
this.logger,
this.metrics,
abortController.signal,
Expand All @@ -113,7 +123,7 @@ export async function verifyBlocksInEpoch(
// All signatures at once
opts.skipVerifyBlockSignatures !== true
? verifyBlocksSignatures(this.bls, this.logger, this.metrics, preState0, blocks, opts)
: Promise.resolve(),
: Promise.resolve({verifySignaturesTime: Date.now()}),

// ideally we want to only persist blocks after verifying them however the reality is there are
// rarely invalid blocks we'll batch all I/O operation here to reduce the overhead if there's
Expand Down Expand Up @@ -151,7 +161,35 @@ export async function verifyBlocksInEpoch(
}
}

return {postStates, proposerBalanceDeltas, segmentExecStatus};
if (segmentExecStatus.execAborted === null) {
const {executionStatuses, executionTime} = segmentExecStatus;
if (
blocksInput.length === 1 &&
// gossip blocks have seenTimestampSec
opts.seenTimestampSec !== undefined &&
blocksInput[0].type !== BlockInputType.preDeneb &&
executionStatuses[0] === ExecutionStatus.Valid
) {
// Find the max time when the block was actually verified
const fullyVerifiedTime = Math.max(executionTime, verifyStateTime, verifySignaturesTime);
const recvTofullyVerifedTime = fullyVerifiedTime / 1000 - opts.seenTimestampSec;
this.metrics?.gossipBlock.receivedToFullyVerifiedTime.observe(recvTofullyVerifedTime);

const verifiedToBlobsAvailabiltyTime = Math.max(availableTime - fullyVerifiedTime, 0) / 1000;
const numBlobs = (blocksInput[0].block as deneb.SignedBeaconBlock).message.body.blobKzgCommitments.length;

this.metrics?.gossipBlock.verifiedToBlobsAvailabiltyTime.observe({numBlobs}, verifiedToBlobsAvailabiltyTime);
this.logger.verbose("Verified blockInput fully with blobs availability", {
slot: blocksInput[0].block.message.slot,
recvTofullyVerifedTime,
verifiedToBlobsAvailabiltyTime,
type: blocksInput[0].type,
numBlobs,
});
}
}

return {postStates, dataAvailabilityStatuses, proposerBalanceDeltas, segmentExecStatus};
} finally {
abortController.abort();
}
Expand Down
Loading

1 comment on commit be92973

@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: be92973 Previous: d3005bf Ratio
Object access 1 prop 3.7830 ns/op 0.15900 ns/op 23.79
Full benchmark results
Benchmark suite Current: be92973 Previous: d3005bf Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 676.52 us/op 617.22 us/op 1.10
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 173.50 us/op 84.778 us/op 2.05
BLS verify - blst-native 1.6263 ms/op 1.3312 ms/op 1.22
BLS verifyMultipleSignatures 3 - blst-native 3.0409 ms/op 2.8139 ms/op 1.08
BLS verifyMultipleSignatures 8 - blst-native 6.6036 ms/op 6.1753 ms/op 1.07
BLS verifyMultipleSignatures 32 - blst-native 24.051 ms/op 22.547 ms/op 1.07
BLS verifyMultipleSignatures 64 - blst-native 47.895 ms/op 44.476 ms/op 1.08
BLS verifyMultipleSignatures 128 - blst-native 96.930 ms/op 88.753 ms/op 1.09
BLS deserializing 10000 signatures 1.0833 s/op 920.68 ms/op 1.18
BLS deserializing 100000 signatures 10.279 s/op 9.6734 s/op 1.06
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.4994 ms/op 1.3640 ms/op 1.10
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.7266 ms/op 1.6998 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.7370 ms/op 2.9494 ms/op 0.93
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.8638 ms/op 4.2028 ms/op 0.92
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.9098 ms/op 7.2895 ms/op 0.95
BLS aggregatePubkeys 32 - blst-native 28.859 us/op 27.930 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 110.87 us/op 101.14 us/op 1.10
getAttestationsForBlock 81.908 ms/op 53.125 ms/op 1.54
getSlashingsAndExits - default max 360.11 us/op 159.65 us/op 2.26
getSlashingsAndExits - 2k 827.38 us/op 423.24 us/op 1.95
proposeBlockBody type=full, size=empty 9.6730 ms/op 5.4065 ms/op 1.79
isKnown best case - 1 super set check 841.00 ns/op 328.00 ns/op 2.56
isKnown normal case - 2 super set checks 876.00 ns/op 309.00 ns/op 2.83
isKnown worse case - 16 super set checks 859.00 ns/op 312.00 ns/op 2.75
CheckpointStateCache - add get delete 8.7370 us/op 5.6810 us/op 1.54
validate api signedAggregateAndProof - struct 3.9800 ms/op 2.7903 ms/op 1.43
validate gossip signedAggregateAndProof - struct 3.6056 ms/op 2.8286 ms/op 1.27
validate gossip attestation - vc 640000 1.7202 ms/op 1.3615 ms/op 1.26
batch validate gossip attestation - vc 640000 - chunk 32 225.45 us/op 164.73 us/op 1.37
batch validate gossip attestation - vc 640000 - chunk 64 205.35 us/op 144.69 us/op 1.42
batch validate gossip attestation - vc 640000 - chunk 128 192.66 us/op 136.49 us/op 1.41
batch validate gossip attestation - vc 640000 - chunk 256 173.17 us/op 138.43 us/op 1.25
pickEth1Vote - no votes 1.8674 ms/op 1.1773 ms/op 1.59
pickEth1Vote - max votes 21.842 ms/op 10.561 ms/op 2.07
pickEth1Vote - Eth1Data hashTreeRoot value x2048 24.800 ms/op 21.590 ms/op 1.15
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 43.341 ms/op 29.080 ms/op 1.49
pickEth1Vote - Eth1Data fastSerialize value x2048 825.13 us/op 613.04 us/op 1.35
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.6991 ms/op 4.5670 ms/op 1.47
bytes32 toHexString 1.0250 us/op 506.00 ns/op 2.03
bytes32 Buffer.toString(hex) 399.00 ns/op 293.00 ns/op 1.36
bytes32 Buffer.toString(hex) from Uint8Array 637.00 ns/op 451.00 ns/op 1.41
bytes32 Buffer.toString(hex) + 0x 440.00 ns/op 285.00 ns/op 1.54
Object access 1 prop 3.7830 ns/op 0.15900 ns/op 23.79
Map access 1 prop 0.20800 ns/op 0.15000 ns/op 1.39
Object get x1000 9.3240 ns/op 7.4470 ns/op 1.25
Map get x1000 1.4170 ns/op 0.78500 ns/op 1.81
Object set x1000 143.68 ns/op 52.329 ns/op 2.75
Map set x1000 82.262 ns/op 40.201 ns/op 2.05
Return object 10000 times 0.33500 ns/op 0.24360 ns/op 1.38
Throw Error 10000 times 4.6768 us/op 3.8881 us/op 1.20
fastMsgIdFn sha256 / 200 bytes 3.8620 us/op 3.3250 us/op 1.16
fastMsgIdFn h32 xxhash / 200 bytes 515.00 ns/op 278.00 ns/op 1.85
fastMsgIdFn h64 xxhash / 200 bytes 559.00 ns/op 338.00 ns/op 1.65
fastMsgIdFn sha256 / 1000 bytes 12.887 us/op 11.364 us/op 1.13
fastMsgIdFn h32 xxhash / 1000 bytes 724.00 ns/op 409.00 ns/op 1.77
fastMsgIdFn h64 xxhash / 1000 bytes 634.00 ns/op 408.00 ns/op 1.55
fastMsgIdFn sha256 / 10000 bytes 112.14 us/op 106.47 us/op 1.05
fastMsgIdFn h32 xxhash / 10000 bytes 2.4860 us/op 2.0190 us/op 1.23
fastMsgIdFn h64 xxhash / 10000 bytes 1.5900 us/op 1.3740 us/op 1.16
send data - 1000 256B messages 27.547 ms/op 19.153 ms/op 1.44
send data - 1000 512B messages 34.917 ms/op 25.787 ms/op 1.35
send data - 1000 1024B messages 50.280 ms/op 41.459 ms/op 1.21
send data - 1000 1200B messages 57.433 ms/op 36.869 ms/op 1.56
send data - 1000 2048B messages 72.626 ms/op 43.427 ms/op 1.67
send data - 1000 4096B messages 57.893 ms/op 40.855 ms/op 1.42
send data - 1000 16384B messages 176.56 ms/op 110.65 ms/op 1.60
send data - 1000 65536B messages 626.73 ms/op 393.80 ms/op 1.59
enrSubnets - fastDeserialize 64 bits 2.0080 us/op 1.3990 us/op 1.44
enrSubnets - ssz BitVector 64 bits 597.00 ns/op 436.00 ns/op 1.37
enrSubnets - fastDeserialize 4 bits 257.00 ns/op 178.00 ns/op 1.44
enrSubnets - ssz BitVector 4 bits 566.00 ns/op 498.00 ns/op 1.14
prioritizePeers score -10:0 att 32-0.1 sync 2-0 121.67 us/op 112.36 us/op 1.08
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 161.08 us/op 138.33 us/op 1.16
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 218.99 us/op 210.82 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 421.89 us/op 328.38 us/op 1.28
prioritizePeers score 0:0 att 64-1 sync 4-1 423.73 us/op 363.63 us/op 1.17
array of 16000 items push then shift 1.9482 us/op 1.6982 us/op 1.15
LinkedList of 16000 items push then shift 11.852 ns/op 9.2030 ns/op 1.29
array of 16000 items push then pop 143.10 ns/op 92.952 ns/op 1.54
LinkedList of 16000 items push then pop 11.393 ns/op 9.1290 ns/op 1.25
array of 24000 items push then shift 2.7338 us/op 2.5526 us/op 1.07
LinkedList of 24000 items push then shift 11.493 ns/op 9.1850 ns/op 1.25
array of 24000 items push then pop 177.29 ns/op 139.72 ns/op 1.27
LinkedList of 24000 items push then pop 9.7100 ns/op 9.3410 ns/op 1.04
intersect bitArray bitLen 8 7.0370 ns/op 6.5000 ns/op 1.08
intersect array and set length 8 94.136 ns/op 64.549 ns/op 1.46
intersect bitArray bitLen 128 36.756 ns/op 34.527 ns/op 1.06
intersect array and set length 128 1.1258 us/op 913.79 ns/op 1.23
bitArray.getTrueBitIndexes() bitLen 128 1.8560 us/op 1.5750 us/op 1.18
bitArray.getTrueBitIndexes() bitLen 248 3.2400 us/op 2.6710 us/op 1.21
bitArray.getTrueBitIndexes() bitLen 512 6.7930 us/op 5.0820 us/op 1.34
Buffer.concat 32 items 1.1480 us/op 995.00 ns/op 1.15
Uint8Array.set 32 items 2.1090 us/op 1.9390 us/op 1.09
Set add up to 64 items then delete first 5.5080 us/op 4.3020 us/op 1.28
OrderedSet add up to 64 items then delete first 7.1044 us/op 5.4105 us/op 1.31
Set add up to 64 items then delete last 5.6438 us/op 4.5840 us/op 1.23
OrderedSet add up to 64 items then delete last 7.5520 us/op 5.7861 us/op 1.31
Set add up to 64 items then delete middle 5.6438 us/op 4.6169 us/op 1.22
OrderedSet add up to 64 items then delete middle 9.0011 us/op 7.0188 us/op 1.28
Set add up to 128 items then delete first 11.267 us/op 9.3565 us/op 1.20
OrderedSet add up to 128 items then delete first 15.818 us/op 12.271 us/op 1.29
Set add up to 128 items then delete last 11.196 us/op 9.2541 us/op 1.21
OrderedSet add up to 128 items then delete last 14.856 us/op 11.698 us/op 1.27
Set add up to 128 items then delete middle 11.111 us/op 9.1948 us/op 1.21
OrderedSet add up to 128 items then delete middle 20.951 us/op 16.720 us/op 1.25
Set add up to 256 items then delete first 23.141 us/op 18.887 us/op 1.23
OrderedSet add up to 256 items then delete first 33.038 us/op 25.468 us/op 1.30
Set add up to 256 items then delete last 22.434 us/op 18.273 us/op 1.23
OrderedSet add up to 256 items then delete last 30.329 us/op 23.172 us/op 1.31
Set add up to 256 items then delete middle 22.524 us/op 18.396 us/op 1.22
OrderedSet add up to 256 items then delete middle 55.099 us/op 44.760 us/op 1.23
transfer serialized Status (84 B) 2.0740 us/op 1.7380 us/op 1.19
copy serialized Status (84 B) 1.9210 us/op 1.5060 us/op 1.28
transfer serialized SignedVoluntaryExit (112 B) 2.1090 us/op 1.9820 us/op 1.06
copy serialized SignedVoluntaryExit (112 B) 1.7890 us/op 1.5850 us/op 1.13
transfer serialized ProposerSlashing (416 B) 2.4560 us/op 2.2780 us/op 1.08
copy serialized ProposerSlashing (416 B) 2.4560 us/op 3.1300 us/op 0.78
transfer serialized Attestation (485 B) 2.4420 us/op 3.2250 us/op 0.76
copy serialized Attestation (485 B) 2.5860 us/op 3.1250 us/op 0.83
transfer serialized AttesterSlashing (33232 B) 2.4080 us/op 3.2180 us/op 0.75
copy serialized AttesterSlashing (33232 B) 9.2310 us/op 6.6130 us/op 1.40
transfer serialized Small SignedBeaconBlock (128000 B) 3.0470 us/op 3.0560 us/op 1.00
copy serialized Small SignedBeaconBlock (128000 B) 28.186 us/op 17.824 us/op 1.58
transfer serialized Avg SignedBeaconBlock (200000 B) 3.7180 us/op 3.1870 us/op 1.17
copy serialized Avg SignedBeaconBlock (200000 B) 44.898 us/op 21.438 us/op 2.09
transfer serialized BlobsSidecar (524380 B) 4.4980 us/op 3.1260 us/op 1.44
copy serialized BlobsSidecar (524380 B) 182.14 us/op 97.942 us/op 1.86
transfer serialized Big SignedBeaconBlock (1000000 B) 6.0090 us/op 3.2070 us/op 1.87
copy serialized Big SignedBeaconBlock (1000000 B) 310.00 us/op 219.30 us/op 1.41
pass gossip attestations to forkchoice per slot 4.1430 ms/op 4.2704 ms/op 0.97
forkChoice updateHead vc 100000 bc 64 eq 0 717.88 us/op 686.62 us/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 0 4.7244 ms/op 4.6733 ms/op 1.01
forkChoice updateHead vc 1000000 bc 64 eq 0 8.4111 ms/op 7.1046 ms/op 1.18
forkChoice updateHead vc 600000 bc 320 eq 0 5.4608 ms/op 4.2697 ms/op 1.28
forkChoice updateHead vc 600000 bc 1200 eq 0 5.6627 ms/op 4.3061 ms/op 1.32
forkChoice updateHead vc 600000 bc 7200 eq 0 6.0159 ms/op 5.5790 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 1000 12.051 ms/op 11.315 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 10000 12.756 ms/op 12.085 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 300000 20.116 ms/op 16.275 ms/op 1.24
computeDeltas 500000 validators 300 proto nodes 7.2426 ms/op 6.8184 ms/op 1.06
computeDeltas 500000 validators 1200 proto nodes 7.1439 ms/op 6.6462 ms/op 1.07
computeDeltas 500000 validators 7200 proto nodes 6.7809 ms/op 6.4632 ms/op 1.05
computeDeltas 750000 validators 300 proto nodes 10.407 ms/op 9.7178 ms/op 1.07
computeDeltas 750000 validators 1200 proto nodes 10.318 ms/op 9.6766 ms/op 1.07
computeDeltas 750000 validators 7200 proto nodes 10.368 ms/op 9.9186 ms/op 1.05
computeDeltas 1400000 validators 300 proto nodes 19.654 ms/op 18.761 ms/op 1.05
computeDeltas 1400000 validators 1200 proto nodes 19.654 ms/op 19.513 ms/op 1.01
computeDeltas 1400000 validators 7200 proto nodes 20.595 ms/op 19.919 ms/op 1.03
computeDeltas 2100000 validators 300 proto nodes 31.185 ms/op 29.037 ms/op 1.07
computeDeltas 2100000 validators 1200 proto nodes 31.095 ms/op 29.040 ms/op 1.07
computeDeltas 2100000 validators 7200 proto nodes 29.021 ms/op 29.548 ms/op 0.98
computeProposerBoostScoreFromBalances 500000 validators 3.8599 ms/op 3.8326 ms/op 1.01
computeProposerBoostScoreFromBalances 750000 validators 3.8495 ms/op 3.8195 ms/op 1.01
computeProposerBoostScoreFromBalances 1400000 validators 3.9573 ms/op 3.8045 ms/op 1.04
computeProposerBoostScoreFromBalances 2100000 validators 3.9261 ms/op 3.7577 ms/op 1.04
altair processAttestation - 250000 vs - 7PWei normalcase 2.7516 ms/op 2.2627 ms/op 1.22
altair processAttestation - 250000 vs - 7PWei worstcase 3.8126 ms/op 3.4085 ms/op 1.12
altair processAttestation - setStatus - 1/6 committees join 188.87 us/op 144.29 us/op 1.31
altair processAttestation - setStatus - 1/3 committees join 362.31 us/op 294.06 us/op 1.23
altair processAttestation - setStatus - 1/2 committees join 481.09 us/op 383.54 us/op 1.25
altair processAttestation - setStatus - 2/3 committees join 618.78 us/op 481.10 us/op 1.29
altair processAttestation - setStatus - 4/5 committees join 823.87 us/op 676.40 us/op 1.22
altair processAttestation - setStatus - 100% committees join 994.67 us/op 811.41 us/op 1.23
altair processBlock - 250000 vs - 7PWei normalcase 11.382 ms/op 9.9211 ms/op 1.15
altair processBlock - 250000 vs - 7PWei normalcase hashState 40.281 ms/op 34.756 ms/op 1.16
altair processBlock - 250000 vs - 7PWei worstcase 46.154 ms/op 37.009 ms/op 1.25
altair processBlock - 250000 vs - 7PWei worstcase hashState 103.41 ms/op 95.838 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei normalcase 3.2833 ms/op 3.2664 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei worstcase 34.401 ms/op 33.923 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 650.16 us/op 599.97 us/op 1.08
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 14.075 us/op 11.181 us/op 1.26
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 80.026 us/op 62.899 us/op 1.27
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 28.784 us/op 16.665 us/op 1.73
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 11.603 us/op 11.500 us/op 1.01
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 193.69 us/op 189.38 us/op 1.02
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4625 ms/op 1.4632 ms/op 1.00
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9270 ms/op 1.6798 ms/op 1.15
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9655 ms/op 2.9176 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.9471 ms/op 3.9795 ms/op 1.24
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.3483 ms/op 2.6734 ms/op 1.25
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.1110 ms/op 5.7619 ms/op 1.06
Tree 40 250000 create 429.79 ms/op 369.36 ms/op 1.16
Tree 40 250000 get(125000) 213.49 ns/op 211.84 ns/op 1.01
Tree 40 250000 set(125000) 1.0717 us/op 1.0979 us/op 0.98
Tree 40 250000 toArray() 21.282 ms/op 21.738 ms/op 0.98
Tree 40 250000 iterate all - toArray() + loop 22.362 ms/op 20.062 ms/op 1.11
Tree 40 250000 iterate all - get(i) 78.890 ms/op 67.584 ms/op 1.17
MutableVector 250000 create 17.294 ms/op 17.852 ms/op 0.97
MutableVector 250000 get(125000) 7.2090 ns/op 6.6380 ns/op 1.09
MutableVector 250000 set(125000) 330.93 ns/op 281.89 ns/op 1.17
MutableVector 250000 toArray() 4.4025 ms/op 3.3645 ms/op 1.31
MutableVector 250000 iterate all - toArray() + loop 4.3176 ms/op 3.9873 ms/op 1.08
MutableVector 250000 iterate all - get(i) 1.6118 ms/op 1.5522 ms/op 1.04
Array 250000 create 4.1464 ms/op 4.0630 ms/op 1.02
Array 250000 clone - spread 1.2422 ms/op 1.2261 ms/op 1.01
Array 250000 get(125000) 1.1010 ns/op 1.0260 ns/op 1.07
Array 250000 set(125000) 4.4140 ns/op 4.1370 ns/op 1.07
Array 250000 iterate all - loop 169.36 us/op 167.68 us/op 1.01
effectiveBalanceIncrements clone Uint8Array 300000 33.829 us/op 30.217 us/op 1.12
effectiveBalanceIncrements clone MutableVector 300000 361.00 ns/op 346.00 ns/op 1.04
effectiveBalanceIncrements rw all Uint8Array 300000 210.31 us/op 202.79 us/op 1.04
effectiveBalanceIncrements rw all MutableVector 300000 84.206 ms/op 83.258 ms/op 1.01
phase0 afterProcessEpoch - 250000 vs - 7PWei 114.41 ms/op 114.51 ms/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 55.683 ms/op 54.807 ms/op 1.02
altair processEpoch - mainnet_e81889 525.59 ms/op 557.44 ms/op 0.94
mainnet_e81889 - altair beforeProcessEpoch 91.645 ms/op 86.784 ms/op 1.06
mainnet_e81889 - altair processJustificationAndFinalization 16.437 us/op 15.000 us/op 1.10
mainnet_e81889 - altair processInactivityUpdates 7.4256 ms/op 6.5800 ms/op 1.13
mainnet_e81889 - altair processRewardsAndPenalties 64.738 ms/op 73.486 ms/op 0.88
mainnet_e81889 - altair processRegistryUpdates 4.0970 us/op 2.2140 us/op 1.85
mainnet_e81889 - altair processSlashings 740.00 ns/op 504.00 ns/op 1.47
mainnet_e81889 - altair processEth1DataReset 618.00 ns/op 596.00 ns/op 1.04
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4583 ms/op 1.7281 ms/op 0.84
mainnet_e81889 - altair processSlashingsReset 5.6420 us/op 7.3270 us/op 0.77
mainnet_e81889 - altair processRandaoMixesReset 5.3850 us/op 7.5840 us/op 0.71
mainnet_e81889 - altair processHistoricalRootsUpdate 909.00 ns/op 820.00 ns/op 1.11
mainnet_e81889 - altair processParticipationFlagUpdates 1.9680 us/op 1.8720 us/op 1.05
mainnet_e81889 - altair processSyncCommitteeUpdates 904.00 ns/op 744.00 ns/op 1.22
mainnet_e81889 - altair afterProcessEpoch 124.14 ms/op 121.97 ms/op 1.02
capella processEpoch - mainnet_e217614 2.3133 s/op 2.3516 s/op 0.98
mainnet_e217614 - capella beforeProcessEpoch 529.50 ms/op 509.63 ms/op 1.04
mainnet_e217614 - capella processJustificationAndFinalization 18.709 us/op 25.358 us/op 0.74
mainnet_e217614 - capella processInactivityUpdates 22.006 ms/op 20.848 ms/op 1.06
mainnet_e217614 - capella processRewardsAndPenalties 439.06 ms/op 424.85 ms/op 1.03
mainnet_e217614 - capella processRegistryUpdates 26.687 us/op 30.864 us/op 0.86
mainnet_e217614 - capella processSlashings 470.00 ns/op 651.00 ns/op 0.72
mainnet_e217614 - capella processEth1DataReset 541.00 ns/op 500.00 ns/op 1.08
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.9817 ms/op 5.5342 ms/op 0.90
mainnet_e217614 - capella processSlashingsReset 4.0150 us/op 4.7140 us/op 0.85
mainnet_e217614 - capella processRandaoMixesReset 5.9460 us/op 5.2700 us/op 1.13
mainnet_e217614 - capella processHistoricalRootsUpdate 746.00 ns/op 506.00 ns/op 1.47
mainnet_e217614 - capella processParticipationFlagUpdates 2.4580 us/op 1.8630 us/op 1.32
mainnet_e217614 - capella afterProcessEpoch 310.68 ms/op 336.52 ms/op 0.92
phase0 processEpoch - mainnet_e58758 440.72 ms/op 519.63 ms/op 0.85
mainnet_e58758 - phase0 beforeProcessEpoch 118.99 ms/op 159.54 ms/op 0.75
mainnet_e58758 - phase0 processJustificationAndFinalization 15.490 us/op 21.727 us/op 0.71
mainnet_e58758 - phase0 processRewardsAndPenalties 51.760 ms/op 67.684 ms/op 0.76
mainnet_e58758 - phase0 processRegistryUpdates 10.915 us/op 16.654 us/op 0.66
mainnet_e58758 - phase0 processSlashings 698.00 ns/op 674.00 ns/op 1.04
mainnet_e58758 - phase0 processEth1DataReset 396.00 ns/op 638.00 ns/op 0.62
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1676 ms/op 2.1456 ms/op 0.54
mainnet_e58758 - phase0 processSlashingsReset 3.2350 us/op 4.3970 us/op 0.74
mainnet_e58758 - phase0 processRandaoMixesReset 5.1230 us/op 7.6070 us/op 0.67
mainnet_e58758 - phase0 processHistoricalRootsUpdate 520.00 ns/op 678.00 ns/op 0.77
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.1150 us/op 5.8900 us/op 0.70
mainnet_e58758 - phase0 afterProcessEpoch 97.731 ms/op 93.071 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4170 ms/op 2.5930 ms/op 0.55
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4884 ms/op 1.5247 ms/op 0.98
altair processInactivityUpdates - 250000 normalcase 23.628 ms/op 30.993 ms/op 0.76
altair processInactivityUpdates - 250000 worstcase 25.011 ms/op 32.809 ms/op 0.76
phase0 processRegistryUpdates - 250000 normalcase 8.1640 us/op 12.953 us/op 0.63
phase0 processRegistryUpdates - 250000 badcase_full_deposits 407.58 us/op 643.69 us/op 0.63
phase0 processRegistryUpdates - 250000 worstcase 0.5 138.57 ms/op 138.76 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 55.050 ms/op 72.214 ms/op 0.76
altair processRewardsAndPenalties - 250000 worstcase 56.415 ms/op 69.276 ms/op 0.81
phase0 getAttestationDeltas - 250000 normalcase 10.504 ms/op 9.3050 ms/op 1.13
phase0 getAttestationDeltas - 250000 worstcase 10.644 ms/op 9.3875 ms/op 1.13
phase0 processSlashings - 250000 worstcase 100.30 us/op 131.98 us/op 0.76
altair processSyncCommitteeUpdates - 250000 160.40 ms/op 152.37 ms/op 1.05
BeaconState.hashTreeRoot - No change 286.00 ns/op 255.00 ns/op 1.12
BeaconState.hashTreeRoot - 1 full validator 157.10 us/op 189.73 us/op 0.83
BeaconState.hashTreeRoot - 32 full validator 1.5663 ms/op 1.6575 ms/op 0.94
BeaconState.hashTreeRoot - 512 full validator 16.558 ms/op 18.921 ms/op 0.88
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 175.06 us/op 176.72 us/op 0.99
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 3.1193 ms/op 2.9053 ms/op 1.07
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 31.098 ms/op 32.017 ms/op 0.97
BeaconState.hashTreeRoot - 1 balances 129.58 us/op 139.72 us/op 0.93
BeaconState.hashTreeRoot - 32 balances 1.3675 ms/op 1.2460 ms/op 1.10
BeaconState.hashTreeRoot - 512 balances 13.746 ms/op 13.688 ms/op 1.00
BeaconState.hashTreeRoot - 250000 balances 214.19 ms/op 226.81 ms/op 0.94
aggregationBits - 2048 els - zipIndexesInBitList 20.799 us/op 17.145 us/op 1.21
byteArrayEquals 32 78.107 ns/op 75.458 ns/op 1.04
Buffer.compare 32 57.839 ns/op 55.700 ns/op 1.04
byteArrayEquals 1024 2.1131 us/op 2.0285 us/op 1.04
Buffer.compare 1024 75.671 ns/op 71.235 ns/op 1.06
byteArrayEquals 16384 36.372 us/op 32.605 us/op 1.12
Buffer.compare 16384 268.48 ns/op 262.48 ns/op 1.02
byteArrayEquals 123687377 282.97 ms/op 260.36 ms/op 1.09
Buffer.compare 123687377 8.5672 ms/op 9.0453 ms/op 0.95
byteArrayEquals 32 - diff last byte 78.238 ns/op 81.448 ns/op 0.96
Buffer.compare 32 - diff last byte 58.140 ns/op 62.322 ns/op 0.93
byteArrayEquals 1024 - diff last byte 2.1362 us/op 2.2273 us/op 0.96
Buffer.compare 1024 - diff last byte 77.436 ns/op 75.671 ns/op 1.02
byteArrayEquals 16384 - diff last byte 33.278 us/op 35.119 us/op 0.95
Buffer.compare 16384 - diff last byte 281.53 ns/op 311.74 ns/op 0.90
byteArrayEquals 123687377 - diff last byte 257.19 ms/op 268.16 ms/op 0.96
Buffer.compare 123687377 - diff last byte 7.9948 ms/op 8.8174 ms/op 0.91
byteArrayEquals 32 - random bytes 5.6500 ns/op 6.5850 ns/op 0.86
Buffer.compare 32 - random bytes 63.936 ns/op 64.080 ns/op 1.00
byteArrayEquals 1024 - random bytes 5.9780 ns/op 6.5200 ns/op 0.92
Buffer.compare 1024 - random bytes 63.751 ns/op 63.601 ns/op 1.00
byteArrayEquals 16384 - random bytes 6.5970 ns/op 6.5320 ns/op 1.01
Buffer.compare 16384 - random bytes 63.761 ns/op 63.880 ns/op 1.00
byteArrayEquals 123687377 - random bytes 9.6300 ns/op 10.140 ns/op 0.95
Buffer.compare 123687377 - random bytes 74.880 ns/op 77.620 ns/op 0.96
regular array get 100000 times 48.058 us/op 47.681 us/op 1.01
wrappedArray get 100000 times 46.711 us/op 50.827 us/op 0.92
arrayWithProxy get 100000 times 14.414 ms/op 14.774 ms/op 0.98
ssz.Root.equals 56.193 ns/op 60.890 ns/op 0.92
byteArrayEquals 54.494 ns/op 59.525 ns/op 0.92
Buffer.compare 11.278 ns/op 12.994 ns/op 0.87
shuffle list - 16384 els 7.2124 ms/op 7.4534 ms/op 0.97
shuffle list - 250000 els 105.28 ms/op 113.34 ms/op 0.93
processSlot - 1 slots 18.042 us/op 21.388 us/op 0.84
processSlot - 32 slots 3.4111 ms/op 4.1495 ms/op 0.82
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 59.049 ms/op 60.627 ms/op 0.97
getCommitteeAssignments - req 1 vs - 250000 vc 2.5459 ms/op 2.6066 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 3.7312 ms/op 3.8584 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0960 ms/op 4.1734 ms/op 0.98
findModifiedValidators - 10000 modified validators 547.41 ms/op 597.54 ms/op 0.92
findModifiedValidators - 1000 modified validators 482.22 ms/op 496.45 ms/op 0.97
findModifiedValidators - 100 modified validators 477.49 ms/op 492.26 ms/op 0.97
findModifiedValidators - 10 modified validators 449.90 ms/op 470.94 ms/op 0.96
findModifiedValidators - 1 modified validators 564.19 ms/op 473.01 ms/op 1.19
findModifiedValidators - no difference 537.96 ms/op 488.08 ms/op 1.10
compare ViewDUs 5.2351 s/op 5.1864 s/op 1.01
compare each validator Uint8Array 1.8480 s/op 1.7828 s/op 1.04
compare ViewDU to Uint8Array 1.4478 s/op 1.3830 s/op 1.05
migrate state 1000000 validators, 24 modified, 0 new 787.67 ms/op 900.06 ms/op 0.88
migrate state 1000000 validators, 1700 modified, 1000 new 1.0146 s/op 1.3101 s/op 0.77
migrate state 1000000 validators, 3400 modified, 2000 new 1.2156 s/op 1.5017 s/op 0.81
migrate state 1500000 validators, 24 modified, 0 new 776.73 ms/op 1.0023 s/op 0.77
migrate state 1500000 validators, 1700 modified, 1000 new 1.1085 s/op 1.2620 s/op 0.88
migrate state 1500000 validators, 3400 modified, 2000 new 1.2729 s/op 1.3991 s/op 0.91
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3500 ns/op 5.2500 ns/op 0.83
state getBlockRootAtSlot - 250000 vs - 7PWei 586.17 ns/op 939.23 ns/op 0.62
computeProposers - vc 250000 9.0838 ms/op 10.659 ms/op 0.85
computeEpochShuffling - vc 250000 106.34 ms/op 109.01 ms/op 0.98
getNextSyncCommittee - vc 250000 160.23 ms/op 159.40 ms/op 1.01
computeSigningRoot for AttestationData 30.214 us/op 30.713 us/op 0.98
hash AttestationData serialized data then Buffer.toString(base64) 2.3833 us/op 2.3574 us/op 1.01
toHexString serialized data 1.1160 us/op 1.1396 us/op 0.98
Buffer.toString(base64) 248.97 ns/op 233.54 ns/op 1.07

Please sign in to comment.