Skip to content

Commit

Permalink
feat: include EL client info in graffiti (#6753)
Browse files Browse the repository at this point in the history
* Define ClientCode and engine_getClientVersionV1

* Default graffiti in beacon node

* Update packages/beacon-node/src/api/impl/validator/index.ts

Co-authored-by: Nico Flaig <[email protected]>

* Fix rebase

* Make graffiti optional in validator store

* Fix merge

* Fix lint

* Update packages/beacon-node/src/execution/engine/types.ts

Co-authored-by: Cayman <[email protected]>

* Add fallback graffiti

* Address comment

* Address comment

* Cache client version in ExecutionEngine

* Hide graffiti if private flag is set

* Improve readability

* Partially address comment

* Partially address comment

* Partially address comment

* Refactor

* Update packages/beacon-node/src/execution/engine/http.ts

Co-authored-by: Nico Flaig <[email protected]>

* Partial address comment

* Add unit test

* Fix unit test

* Review PR, mostly cosmetic

* Fix graffiti tests

* Add workaround to test code instead of src

* Set client version to null if not supported by EL

* Log failed client version updates as debug

* Throw error if EL client returns empty client versions array

* Update engine mock

* Set client version to null initially to avoid fetching multiple times

* Reorder statements

---------

Co-authored-by: Nico Flaig <[email protected]>
Co-authored-by: Cayman <[email protected]>
  • Loading branch information
3 people authored Jul 30, 2024
1 parent 0cd43cc commit 2f9275e
Show file tree
Hide file tree
Showing 28 changed files with 249 additions and 62 deletions.
12 changes: 6 additions & 6 deletions packages/api/src/beacon/routes/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,13 @@ export type Endpoints = {
/** The validator's randao reveal value */
randaoReveal: BLSSignature;
/** Arbitrary data validator wants to include in block */
graffiti: string;
graffiti?: string;
} & Omit<ExtraProduceBlockOpts, "blindedLocal">,
{
params: {slot: number};
query: {
randao_reveal: string;
graffiti: string;
graffiti?: string;
fee_recipient?: string;
builder_selection?: string;
strict_fee_recipient_check?: boolean;
Expand All @@ -333,15 +333,15 @@ export type Endpoints = {
/** The validator's randao reveal value */
randaoReveal: BLSSignature;
/** Arbitrary data validator wants to include in block */
graffiti: string;
graffiti?: string;
skipRandaoVerification?: boolean;
builderBoostFactor?: UintBn64;
} & ExtraProduceBlockOpts,
{
params: {slot: number};
query: {
randao_reveal: string;
graffiti: string;
graffiti?: string;
skip_randao_verification?: string;
fee_recipient?: string;
builder_selection?: string;
Expand All @@ -359,9 +359,9 @@ export type Endpoints = {
{
slot: Slot;
randaoReveal: BLSSignature;
graffiti: string;
graffiti?: string;
},
{params: {slot: number}; query: {randao_reveal: string; graffiti: string}},
{params: {slot: number}; query: {randao_reveal: string; graffiti?: string}},
BlindedBeaconBlock,
VersionMeta
>;
Expand Down
11 changes: 9 additions & 2 deletions packages/api/src/utils/serdes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ export function fromValidatorIdsStr(ids?: string[]): (string | number)[] | undef

const GRAFFITI_HEX_LENGTH = 66;

export function toGraffitiHex(utf8: string): string {
export function toGraffitiHex(utf8?: string): string | undefined {
if (utf8 === undefined) {
return undefined;
}

const hex = toHexString(new TextEncoder().encode(utf8));

if (hex.length > GRAFFITI_HEX_LENGTH) {
Expand All @@ -93,7 +97,10 @@ export function toGraffitiHex(utf8: string): string {
return hex;
}

export function fromGraffitiHex(hex: string): string {
export function fromGraffitiHex(hex?: string): string | undefined {
if (hex === undefined) {
return undefined;
}
try {
return new TextDecoder("utf8").decode(fromHexString(hex));
} catch {
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/src/api/impl/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ export function getApi(opts: ApiOptions, modules: ApiModules): BeaconApiMethods
lodestar: getLodestarApi(modules),
node: getNodeApi(opts, modules),
proof: getProofApi(opts, modules),
validator: getValidatorApi(modules),
validator: getValidatorApi(opts, modules),
};
}
34 changes: 19 additions & 15 deletions packages/beacon-node/src/api/impl/validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import {validateApiAggregateAndProof} from "../../../chain/validation/index.js";
import {ZERO_HASH} from "../../../constants/index.js";
import {SyncState} from "../../../sync/index.js";
import {isOptimisticBlock} from "../../../util/forkChoice.js";
import {toGraffitiBuffer} from "../../../util/graffiti.js";
import {getDefaultGraffiti, toGraffitiBuffer} from "../../../util/graffiti.js";
import {ApiError, NodeIsSyncing, OnlySupportedByDVT} from "../errors.js";
import {validateSyncCommitteeGossipContributionAndProof} from "../../../chain/validation/syncCommitteeContributionAndProof.js";
import {CommitteeSubscription} from "../../../network/subnets/index.js";
Expand All @@ -63,6 +63,8 @@ import {getValidatorStatus} from "../beacon/state/utils.js";
import {validateGossipFnRetryUnknownRoot} from "../../../network/processor/gossipHandlers.js";
import {SCHEDULER_LOOKAHEAD_FACTOR} from "../../../chain/prepareNextSlot.js";
import {ChainEvent, CheckpointHex, CommonBlockBody} from "../../../chain/index.js";
import {ApiOptions} from "../../options.js";
import {getLodestarClientVersion} from "../../../util/metadata.js";
import {computeSubnetForCommitteesAtSlot, getPubkeysForIndices, selectBlockProductionSource} from "./utils.js";

/**
Expand Down Expand Up @@ -110,14 +112,10 @@ type ProduceFullOrBlindedBlockOrContentsRes = {executionPayloadSource: ProducedB
* Server implementation for handling validator duties.
* See `@lodestar/validator/src/api` for the client implementation).
*/
export function getValidatorApi({
chain,
config,
logger,
metrics,
network,
sync,
}: ApiModules): ApplicationMethods<routes.validator.Endpoints> {
export function getValidatorApi(
opts: ApiOptions,
{chain, config, logger, metrics, network, sync}: ApiModules
): ApplicationMethods<routes.validator.Endpoints> {
let genesisBlockRoot: Root | null = null;

/**
Expand Down Expand Up @@ -348,7 +346,7 @@ export function getValidatorApi({
async function produceBuilderBlindedBlock(
slot: Slot,
randaoReveal: BLSSignature,
graffiti: string,
graffiti?: string,
// as of now fee recipient checks can not be performed because builder does not return bid recipient
{
skipHeadChecksAndUpdate,
Expand Down Expand Up @@ -406,7 +404,9 @@ export function getValidatorApi({
slot,
parentBlockRoot,
randaoReveal,
graffiti: toGraffitiBuffer(graffiti || ""),
graffiti: toGraffitiBuffer(
graffiti ?? getDefaultGraffiti(getLodestarClientVersion(opts), chain.executionEngine.clientVersion, opts)
),
commonBlockBody,
});

Expand All @@ -432,7 +432,7 @@ export function getValidatorApi({
async function produceEngineFullBlockOrContents(
slot: Slot,
randaoReveal: BLSSignature,
graffiti: string,
graffiti?: string,
{
feeRecipient,
strictFeeRecipientCheck,
Expand Down Expand Up @@ -474,7 +474,9 @@ export function getValidatorApi({
slot,
parentBlockRoot,
randaoReveal,
graffiti: toGraffitiBuffer(graffiti || ""),
graffiti: toGraffitiBuffer(
graffiti ?? getDefaultGraffiti(getLodestarClientVersion(opts), chain.executionEngine.clientVersion, opts)
),
feeRecipient,
commonBlockBody,
});
Expand Down Expand Up @@ -522,7 +524,7 @@ export function getValidatorApi({
async function produceEngineOrBuilderBlock(
slot: Slot,
randaoReveal: BLSSignature,
graffiti: string,
graffiti?: string,
// TODO deneb: skip randao verification
_skipRandaoVerification?: boolean,
builderBoostFactor?: bigint,
Expand Down Expand Up @@ -585,7 +587,9 @@ export function getValidatorApi({
slot,
parentBlockRoot,
randaoReveal,
graffiti: toGraffitiBuffer(graffiti || ""),
graffiti: toGraffitiBuffer(
graffiti ?? getDefaultGraffiti(getLodestarClientVersion(opts), chain.executionEngine.clientVersion, opts)
),
});
logger.debug("Produced common block body", loggerContext);

Expand Down
3 changes: 3 additions & 0 deletions packages/beacon-node/src/api/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import {beaconRestApiServerOpts, BeaconRestApiServerOpts} from "./rest/index.js"
export type ApiOptions = {
maxGindicesInProof?: number;
rest: BeaconRestApiServerOpts;
commit?: string;
version?: string;
private?: boolean;
};

export const defaultApiOptions: ApiOptions = {
maxGindicesInProof: 512,
rest: beaconRestApiServerOpts,
version: "dev",
private: false,
};
51 changes: 50 additions & 1 deletion packages/beacon-node/src/execution/engine/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {Metrics} from "../../metrics/index.js";
import {JobItemQueue} from "../../util/queue/index.js";
import {EPOCHS_PER_BATCH} from "../../sync/constants.js";
import {numToQuantity} from "../../eth1/provider/utils.js";
import {getLodestarClientVersion} from "../../util/metadata.js";
import {
ExecutionPayloadStatus,
ExecutePayloadResponse,
Expand All @@ -21,6 +22,8 @@ import {
BlobsBundle,
VersionedHashes,
ExecutionEngineState,
ClientVersion,
ClientCode,
} from "./interface.js";
import {PayloadIdCache} from "./payloadIdCache.js";
import {
Expand Down Expand Up @@ -63,6 +66,14 @@ export type ExecutionEngineHttpOpts = {
* A version string that will be set in `clv` field of jwt claims
*/
jwtVersion?: string;
/**
* Lodestar version to be used for `ClientVersion`
*/
version?: string;
/**
* Lodestar commit to be used for `ClientVersion`
*/
commit?: string;
};

export const defaultExecutionEngineHttpOpts: ExecutionEngineHttpOpts = {
Expand Down Expand Up @@ -105,6 +116,9 @@ export class ExecutionEngineHttp implements IExecutionEngine {
// It's safer to to avoid false positives and assume that the EL is syncing until we receive the first payload
state: ExecutionEngineState = ExecutionEngineState.ONLINE;

/** Cached EL client version from the latest getClientVersion call */
clientVersion?: ClientVersion | null;

readonly payloadIdCache = new PayloadIdCache();
/**
* A queue to serialize the fcUs and newPayloads calls:
Expand All @@ -126,7 +140,8 @@ export class ExecutionEngineHttp implements IExecutionEngine {

constructor(
private readonly rpc: IJsonRpcHttpClient,
{metrics, signal, logger}: ExecutionEngineModules
{metrics, signal, logger}: ExecutionEngineModules,
private readonly opts?: ExecutionEngineHttpOpts
) {
this.rpcFetchQueue = new JobItemQueue<[EngineRequest], EngineResponse>(
this.jobQueueProcessor,
Expand All @@ -140,6 +155,13 @@ export class ExecutionEngineHttp implements IExecutionEngine {
});

this.rpc.emitter.on(JsonRpcHttpClientEvent.RESPONSE, () => {
if (this.clientVersion === undefined) {
this.clientVersion = null;
// This statement should only be called first time receiving response after startup
this.getClientVersion(getLodestarClientVersion(this.opts)).catch((e) => {
this.logger.debug("Unable to get execution client version", {}, e);
});
}
this.updateEngineState(getExecutionEngineState({targetState: ExecutionEngineState.ONLINE, oldState: this.state}));
});
}
Expand Down Expand Up @@ -417,6 +439,29 @@ export class ExecutionEngineHttp implements IExecutionEngine {
return response.map(deserializeExecutionPayloadBody);
}

private async getClientVersion(clientVersion: ClientVersion): Promise<ClientVersion[]> {
const method = "engine_getClientVersionV1";

const response = await this.rpc.fetchWithRetries<
EngineApiRpcReturnTypes[typeof method],
EngineApiRpcParamTypes[typeof method]
>({method, params: [clientVersion]});

const clientVersions = response.map((cv) => {
const code = cv.code in ClientCode ? ClientCode[cv.code as keyof typeof ClientCode] : ClientCode.XX;
return {code, name: cv.name, version: cv.version, commit: cv.commit};
});

if (clientVersions.length === 0) {
throw Error("Received empty client versions array");
}

this.clientVersion = clientVersions[0];
this.logger.debug("Execution client version updated", this.clientVersion);

return clientVersions;
}

private updateEngineState(newState: ExecutionEngineState): void {
const oldState = this.state;

Expand All @@ -425,6 +470,10 @@ export class ExecutionEngineHttp implements IExecutionEngine {
switch (newState) {
case ExecutionEngineState.ONLINE:
this.logger.info("Execution client became online", {oldState, newState});
this.getClientVersion(getLodestarClientVersion(this.opts)).catch((e) => {
this.logger.debug("Unable to get execution client version", {}, e);
this.clientVersion = null;
});
break;
case ExecutionEngineState.OFFLINE:
this.logger.error("Execution client went offline", {oldState, newState});
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/src/execution/engine/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function getExecutionEngineHttp(
jwtVersion: opts.jwtVersion,
});
modules.logger.info("Execution client", {urls: opts.urls.map(toPrintableUrl).toString()});
return new ExecutionEngineHttp(rpc, modules);
return new ExecutionEngineHttp(rpc, modules, opts);
}

export function initializeExecutionEngine(
Expand Down
29 changes: 29 additions & 0 deletions packages/beacon-node/src/execution/engine/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ export enum ExecutionEngineState {
AUTH_FAILED = "AUTH_FAILED",
}

/**
* Client code as defined in https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/engine/identification.md#clientcode
* ClientCode.XX is dedicated to other clients which do not have their own code
*/
export enum ClientCode {
BU = "BU", // besu
EJ = "EJ", // ethereumJS
EG = "EG", // erigon
GE = "GE", // go-ethereum
GR = "GR", // grandine
LH = "LH", // lighthouse
LS = "LS", // lodestar
NM = "NM", // nethermind
NB = "NB", // nimbus
TK = "TK", // teku
PM = "PM", // prysm
RH = "RH", // reth
XX = "XX", // unknown
}

export type ExecutePayloadResponse =
| {
status: ExecutionPayloadStatus.SYNCING | ExecutionPayloadStatus.ACCEPTED;
Expand Down Expand Up @@ -80,6 +100,13 @@ export type BlobsBundle = {
proofs: KZGProof[];
};

export type ClientVersion = {
code: ClientCode;
name: string;
version: string;
commit: string;
};

export type VersionedHashes = Uint8Array[];

/**
Expand All @@ -91,6 +118,8 @@ export type VersionedHashes = Uint8Array[];
export interface IExecutionEngine {
readonly state: ExecutionEngineState;

readonly clientVersion?: ClientVersion | null;

payloadIdCache: PayloadIdCache;
/**
* A state transition function which applies changes to the self.execution_state.
Expand Down
9 changes: 8 additions & 1 deletion packages/beacon-node/src/execution/engine/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
BlobsBundleRpc,
ExecutionPayloadBodyRpc,
} from "./types.js";
import {ExecutionPayloadStatus, PayloadIdCache} from "./interface.js";
import {ClientCode, ExecutionPayloadStatus, PayloadIdCache} from "./interface.js";
import {JsonRpcBackend} from "./utils.js";

const INTEROP_GAS_LIMIT = 30e6;
Expand Down Expand Up @@ -96,6 +96,7 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
engine_getPayloadV3: this.getPayload.bind(this),
engine_getPayloadBodiesByHashV1: this.getPayloadBodiesByHash.bind(this),
engine_getPayloadBodiesByRangeV1: this.getPayloadBodiesByRange.bind(this),
engine_getClientVersionV1: this.getClientVersionV1.bind(this),
};
}

Expand Down Expand Up @@ -386,6 +387,12 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
return payload.executionPayload;
}

private getClientVersionV1(
_clientVersion: EngineApiRpcParamTypes["engine_getClientVersionV1"][0]
): EngineApiRpcReturnTypes["engine_getClientVersionV1"] {
return [{code: ClientCode.XX, name: "mock", version: "", commit: ""}];
}

private timestampToFork(timestamp: number): ForkExecution {
if (timestamp > (this.opts.denebForkTimestamp ?? Infinity)) return ForkName.deneb;
if (timestamp > (this.opts.capellaForkTimestamp ?? Infinity)) return ForkName.capella;
Expand Down
Loading

1 comment on commit 2f9275e

@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: 2f9275e Previous: 4c3199a Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 38.057 ms/op 12.224 ms/op 3.11
Full benchmark results
Benchmark suite Current: 2f9275e Previous: 4c3199a Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.2796 ms/op 1.8768 ms/op 1.21
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 75.703 us/op 42.358 us/op 1.79
BLS verify - blst 1.1976 ms/op 876.35 us/op 1.37
BLS verifyMultipleSignatures 3 - blst 1.6033 ms/op 1.3549 ms/op 1.18
BLS verifyMultipleSignatures 8 - blst 2.7859 ms/op 1.9832 ms/op 1.40
BLS verifyMultipleSignatures 32 - blst 7.5233 ms/op 4.4891 ms/op 1.68
BLS verifyMultipleSignatures 64 - blst 11.184 ms/op 8.3271 ms/op 1.34
BLS verifyMultipleSignatures 128 - blst 21.257 ms/op 15.825 ms/op 1.34
BLS deserializing 10000 signatures 725.46 ms/op 603.60 ms/op 1.20
BLS deserializing 100000 signatures 7.2438 s/op 6.3866 s/op 1.13
BLS verifyMultipleSignatures - same message - 3 - blst 1.1073 ms/op 1.0054 ms/op 1.10
BLS verifyMultipleSignatures - same message - 8 - blst 1.3271 ms/op 1.0078 ms/op 1.32
BLS verifyMultipleSignatures - same message - 32 - blst 2.1415 ms/op 1.7437 ms/op 1.23
BLS verifyMultipleSignatures - same message - 64 - blst 3.1279 ms/op 2.6275 ms/op 1.19
BLS verifyMultipleSignatures - same message - 128 - blst 4.9380 ms/op 4.2252 ms/op 1.17
BLS aggregatePubkeys 32 - blst 22.213 us/op 19.321 us/op 1.15
BLS aggregatePubkeys 128 - blst 77.945 us/op 64.983 us/op 1.20
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 97.851 ms/op 73.288 ms/op 1.34
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 71.535 ms/op 65.452 ms/op 1.09
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 41.009 ms/op 42.185 ms/op 0.97
getSlashingsAndExits - default max 209.93 us/op 199.76 us/op 1.05
getSlashingsAndExits - 2k 392.34 us/op 327.09 us/op 1.20
proposeBlockBody type=full, size=empty 6.6661 ms/op 5.6711 ms/op 1.18
isKnown best case - 1 super set check 632.00 ns/op 510.00 ns/op 1.24
isKnown normal case - 2 super set checks 607.00 ns/op 483.00 ns/op 1.26
isKnown worse case - 16 super set checks 671.00 ns/op 475.00 ns/op 1.41
InMemoryCheckpointStateCache - add get delete 7.3250 us/op 4.6070 us/op 1.59
validate api signedAggregateAndProof - struct 2.2059 ms/op 1.5412 ms/op 1.43
validate gossip signedAggregateAndProof - struct 1.9908 ms/op 1.5519 ms/op 1.28
validate gossip attestation - vc 640000 1.2236 ms/op 1.0054 ms/op 1.22
batch validate gossip attestation - vc 640000 - chunk 32 161.86 us/op 133.57 us/op 1.21
batch validate gossip attestation - vc 640000 - chunk 64 143.11 us/op 110.19 us/op 1.30
batch validate gossip attestation - vc 640000 - chunk 128 139.86 us/op 106.39 us/op 1.31
batch validate gossip attestation - vc 640000 - chunk 256 126.04 us/op 102.42 us/op 1.23
pickEth1Vote - no votes 1.4203 ms/op 854.75 us/op 1.66
pickEth1Vote - max votes 12.037 ms/op 5.8723 ms/op 2.05
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.864 ms/op 9.9916 ms/op 1.79
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.451 ms/op 14.319 ms/op 1.57
pickEth1Vote - Eth1Data fastSerialize value x2048 646.75 us/op 385.69 us/op 1.68
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.2550 ms/op 3.0543 ms/op 1.72
bytes32 toHexString 675.00 ns/op 624.00 ns/op 1.08
bytes32 Buffer.toString(hex) 282.00 ns/op 496.00 ns/op 0.57
bytes32 Buffer.toString(hex) from Uint8Array 496.00 ns/op 708.00 ns/op 0.70
bytes32 Buffer.toString(hex) + 0x 282.00 ns/op 467.00 ns/op 0.60
Object access 1 prop 0.19300 ns/op 0.36800 ns/op 0.52
Map access 1 prop 0.16300 ns/op 0.35700 ns/op 0.46
Object get x1000 7.0350 ns/op 5.4290 ns/op 1.30
Map get x1000 7.2980 ns/op 5.9730 ns/op 1.22
Object set x1000 53.878 ns/op 23.372 ns/op 2.31
Map set x1000 40.568 ns/op 19.861 ns/op 2.04
Return object 10000 times 0.35570 ns/op 0.33170 ns/op 1.07
Throw Error 10000 times 3.6382 us/op 2.8014 us/op 1.30
fastMsgIdFn sha256 / 200 bytes 2.4250 us/op 2.2070 us/op 1.10
fastMsgIdFn h32 xxhash / 200 bytes 331.00 ns/op 489.00 ns/op 0.68
fastMsgIdFn h64 xxhash / 200 bytes 323.00 ns/op 491.00 ns/op 0.66
fastMsgIdFn sha256 / 1000 bytes 8.3090 us/op 6.1730 us/op 1.35
fastMsgIdFn h32 xxhash / 1000 bytes 459.00 ns/op 622.00 ns/op 0.74
fastMsgIdFn h64 xxhash / 1000 bytes 387.00 ns/op 558.00 ns/op 0.69
fastMsgIdFn sha256 / 10000 bytes 69.494 us/op 52.046 us/op 1.34
fastMsgIdFn h32 xxhash / 10000 bytes 2.0800 us/op 2.0460 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.3310 us/op 1.4020 us/op 0.95
send data - 1000 256B messages 15.166 ms/op 10.916 ms/op 1.39
send data - 1000 512B messages 22.265 ms/op 16.991 ms/op 1.31
send data - 1000 1024B messages 31.073 ms/op 27.038 ms/op 1.15
send data - 1000 1200B messages 30.564 ms/op 25.779 ms/op 1.19
send data - 1000 2048B messages 38.385 ms/op 33.545 ms/op 1.14
send data - 1000 4096B messages 36.239 ms/op 30.060 ms/op 1.21
send data - 1000 16384B messages 82.293 ms/op 67.599 ms/op 1.22
send data - 1000 65536B messages 300.80 ms/op 299.18 ms/op 1.01
enrSubnets - fastDeserialize 64 bits 1.8510 us/op 1.3620 us/op 1.36
enrSubnets - ssz BitVector 64 bits 503.00 ns/op 670.00 ns/op 0.75
enrSubnets - fastDeserialize 4 bits 229.00 ns/op 395.00 ns/op 0.58
enrSubnets - ssz BitVector 4 bits 501.00 ns/op 657.00 ns/op 0.76
prioritizePeers score -10:0 att 32-0.1 sync 2-0 256.96 us/op 147.23 us/op 1.75
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 315.16 us/op 173.11 us/op 1.82
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 436.21 us/op 247.61 us/op 1.76
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 652.12 us/op 419.72 us/op 1.55
prioritizePeers score 0:0 att 64-1 sync 4-1 978.30 us/op 497.82 us/op 1.97
array of 16000 items push then shift 1.9625 us/op 1.2810 us/op 1.53
LinkedList of 16000 items push then shift 8.7780 ns/op 6.6980 ns/op 1.31
array of 16000 items push then pop 147.40 ns/op 109.94 ns/op 1.34
LinkedList of 16000 items push then pop 9.6440 ns/op 6.3740 ns/op 1.51
array of 24000 items push then shift 2.6862 us/op 2.0728 us/op 1.30
LinkedList of 24000 items push then shift 9.4620 ns/op 8.3240 ns/op 1.14
array of 24000 items push then pop 196.09 ns/op 164.80 ns/op 1.19
LinkedList of 24000 items push then pop 10.649 ns/op 6.4970 ns/op 1.64
intersect bitArray bitLen 8 10.050 ns/op 6.3510 ns/op 1.58
intersect array and set length 8 86.901 ns/op 40.339 ns/op 2.15
intersect bitArray bitLen 128 32.819 ns/op 27.002 ns/op 1.22
intersect array and set length 128 1.0200 us/op 625.94 ns/op 1.63
bitArray.getTrueBitIndexes() bitLen 128 2.3430 us/op 1.4600 us/op 1.60
bitArray.getTrueBitIndexes() bitLen 248 4.6830 us/op 2.5500 us/op 1.84
bitArray.getTrueBitIndexes() bitLen 512 8.8770 us/op 5.1420 us/op 1.73
Buffer.concat 32 items 1.0780 us/op 1.0430 us/op 1.03
Uint8Array.set 32 items 1.8460 us/op 1.8310 us/op 1.01
Buffer.copy 2.0230 us/op 1.8530 us/op 1.09
Uint8Array.set - with subarray 3.4070 us/op 2.0270 us/op 1.68
Uint8Array.set - without subarray 2.1070 us/op 1.6710 us/op 1.26
getUint32 - dataview 353.00 ns/op 436.00 ns/op 0.81
getUint32 - manual 280.00 ns/op 359.00 ns/op 0.78
Set add up to 64 items then delete first 3.5214 us/op 1.7798 us/op 1.98
OrderedSet add up to 64 items then delete first 5.8423 us/op 2.7735 us/op 2.11
Set add up to 64 items then delete last 3.5945 us/op 2.0413 us/op 1.76
OrderedSet add up to 64 items then delete last 5.6129 us/op 3.1596 us/op 1.78
Set add up to 64 items then delete middle 3.5372 us/op 2.0341 us/op 1.74
OrderedSet add up to 64 items then delete middle 7.4286 us/op 4.5062 us/op 1.65
Set add up to 128 items then delete first 6.6644 us/op 3.9977 us/op 1.67
OrderedSet add up to 128 items then delete first 10.801 us/op 6.2923 us/op 1.72
Set add up to 128 items then delete last 7.0812 us/op 4.0701 us/op 1.74
OrderedSet add up to 128 items then delete last 11.579 us/op 5.9620 us/op 1.94
Set add up to 128 items then delete middle 7.0729 us/op 4.0162 us/op 1.76
OrderedSet add up to 128 items then delete middle 17.654 us/op 11.919 us/op 1.48
Set add up to 256 items then delete first 14.182 us/op 7.8886 us/op 1.80
OrderedSet add up to 256 items then delete first 20.834 us/op 13.113 us/op 1.59
Set add up to 256 items then delete last 14.069 us/op 7.9540 us/op 1.77
OrderedSet add up to 256 items then delete last 21.691 us/op 11.881 us/op 1.83
Set add up to 256 items then delete middle 13.773 us/op 7.6002 us/op 1.81
OrderedSet add up to 256 items then delete middle 49.451 us/op 35.089 us/op 1.41
transfer serialized Status (84 B) 1.7920 us/op 1.5470 us/op 1.16
copy serialized Status (84 B) 1.4830 us/op 1.2550 us/op 1.18
transfer serialized SignedVoluntaryExit (112 B) 1.8320 us/op 1.4960 us/op 1.22
copy serialized SignedVoluntaryExit (112 B) 1.4420 us/op 1.2530 us/op 1.15
transfer serialized ProposerSlashing (416 B) 2.1520 us/op 1.5910 us/op 1.35
copy serialized ProposerSlashing (416 B) 1.9620 us/op 1.4890 us/op 1.32
transfer serialized Attestation (485 B) 2.8140 us/op 1.7270 us/op 1.63
copy serialized Attestation (485 B) 2.4620 us/op 1.5060 us/op 1.63
transfer serialized AttesterSlashing (33232 B) 2.4030 us/op 1.7570 us/op 1.37
copy serialized AttesterSlashing (33232 B) 7.7490 us/op 3.6210 us/op 2.14
transfer serialized Small SignedBeaconBlock (128000 B) 2.5300 us/op 1.9370 us/op 1.31
copy serialized Small SignedBeaconBlock (128000 B) 25.636 us/op 8.4790 us/op 3.02
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6800 us/op 2.0150 us/op 1.83
copy serialized Avg SignedBeaconBlock (200000 B) 37.322 us/op 12.816 us/op 2.91
transfer serialized BlobsSidecar (524380 B) 5.1260 us/op 3.1850 us/op 1.61
copy serialized BlobsSidecar (524380 B) 133.23 us/op 74.856 us/op 1.78
transfer serialized Big SignedBeaconBlock (1000000 B) 4.9450 us/op 3.7260 us/op 1.33
copy serialized Big SignedBeaconBlock (1000000 B) 438.61 us/op 147.03 us/op 2.98
pass gossip attestations to forkchoice per slot 3.5550 ms/op 3.1944 ms/op 1.11
forkChoice updateHead vc 100000 bc 64 eq 0 705.95 us/op 469.09 us/op 1.50
forkChoice updateHead vc 600000 bc 64 eq 0 3.8516 ms/op 3.0187 ms/op 1.28
forkChoice updateHead vc 1000000 bc 64 eq 0 6.2350 ms/op 4.3287 ms/op 1.44
forkChoice updateHead vc 600000 bc 320 eq 0 3.7794 ms/op 2.5295 ms/op 1.49
forkChoice updateHead vc 600000 bc 1200 eq 0 3.9140 ms/op 2.6593 ms/op 1.47
forkChoice updateHead vc 600000 bc 7200 eq 0 4.1992 ms/op 3.2139 ms/op 1.31
forkChoice updateHead vc 600000 bc 64 eq 1000 11.642 ms/op 10.017 ms/op 1.16
forkChoice updateHead vc 600000 bc 64 eq 10000 15.412 ms/op 10.111 ms/op 1.52
forkChoice updateHead vc 600000 bc 64 eq 300000 38.057 ms/op 12.224 ms/op 3.11
computeDeltas 500000 validators 300 proto nodes 5.2607 ms/op 3.2141 ms/op 1.64
computeDeltas 500000 validators 1200 proto nodes 5.1954 ms/op 3.0907 ms/op 1.68
computeDeltas 500000 validators 7200 proto nodes 4.3635 ms/op 3.0656 ms/op 1.42
computeDeltas 750000 validators 300 proto nodes 6.6479 ms/op 4.6672 ms/op 1.42
computeDeltas 750000 validators 1200 proto nodes 5.8892 ms/op 4.4447 ms/op 1.32
computeDeltas 750000 validators 7200 proto nodes 6.1006 ms/op 4.5900 ms/op 1.33
computeDeltas 1400000 validators 300 proto nodes 10.602 ms/op 8.3154 ms/op 1.27
computeDeltas 1400000 validators 1200 proto nodes 10.134 ms/op 8.2134 ms/op 1.23
computeDeltas 1400000 validators 7200 proto nodes 9.8308 ms/op 7.8450 ms/op 1.25
computeDeltas 2100000 validators 300 proto nodes 15.055 ms/op 12.412 ms/op 1.21
computeDeltas 2100000 validators 1200 proto nodes 14.817 ms/op 12.066 ms/op 1.23
computeDeltas 2100000 validators 7200 proto nodes 14.740 ms/op 12.026 ms/op 1.23
altair processAttestation - 250000 vs - 7PWei normalcase 1.6383 ms/op 1.3405 ms/op 1.22
altair processAttestation - 250000 vs - 7PWei worstcase 2.4063 ms/op 2.0511 ms/op 1.17
altair processAttestation - setStatus - 1/6 committees join 87.221 us/op 64.651 us/op 1.35
altair processAttestation - setStatus - 1/3 committees join 170.20 us/op 138.64 us/op 1.23
altair processAttestation - setStatus - 1/2 committees join 235.03 us/op 201.11 us/op 1.17
altair processAttestation - setStatus - 2/3 committees join 307.38 us/op 264.80 us/op 1.16
altair processAttestation - setStatus - 4/5 committees join 445.61 us/op 379.93 us/op 1.17
altair processAttestation - setStatus - 100% committees join 530.46 us/op 463.23 us/op 1.15
altair processBlock - 250000 vs - 7PWei normalcase 5.4065 ms/op 2.9863 ms/op 1.81
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.883 ms/op 25.390 ms/op 1.14
altair processBlock - 250000 vs - 7PWei worstcase 44.607 ms/op 34.963 ms/op 1.28
altair processBlock - 250000 vs - 7PWei worstcase hashState 90.626 ms/op 78.704 ms/op 1.15
phase0 processBlock - 250000 vs - 7PWei normalcase 2.8757 ms/op 1.6369 ms/op 1.76
phase0 processBlock - 250000 vs - 7PWei worstcase 36.274 ms/op 20.869 ms/op 1.74
altair processEth1Data - 250000 vs - 7PWei normalcase 271.41 us/op 246.96 us/op 1.10
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.6040 us/op 4.6530 us/op 1.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 28.199 us/op 17.116 us/op 1.65
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.296 us/op 7.1940 us/op 1.57
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.6010 us/op 4.2510 us/op 2.02
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 122.70 us/op 82.845 us/op 1.48
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1898 ms/op 822.49 us/op 1.45
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5378 ms/op 672.68 us/op 2.29
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5814 ms/op 1.0482 ms/op 1.51
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.4107 ms/op 1.8612 ms/op 1.30
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3596 ms/op 1.2112 ms/op 1.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6442 ms/op 2.7257 ms/op 1.34
Tree 40 250000 create 199.17 ms/op 181.98 ms/op 1.09
Tree 40 250000 get(125000) 146.06 ns/op 108.13 ns/op 1.35
Tree 40 250000 set(125000) 623.10 ns/op 565.33 ns/op 1.10
Tree 40 250000 toArray() 14.813 ms/op 12.811 ms/op 1.16
Tree 40 250000 iterate all - toArray() + loop 14.981 ms/op 17.322 ms/op 0.86
Tree 40 250000 iterate all - get(i) 50.548 ms/op 43.406 ms/op 1.16
MutableVector 250000 create 13.523 ms/op 10.408 ms/op 1.30
MutableVector 250000 get(125000) 6.1100 ns/op 5.8710 ns/op 1.04
MutableVector 250000 set(125000) 202.66 ns/op 186.26 ns/op 1.09
MutableVector 250000 toArray() 3.3873 ms/op 2.5990 ms/op 1.30
MutableVector 250000 iterate all - toArray() + loop 3.4887 ms/op 2.7078 ms/op 1.29
MutableVector 250000 iterate all - get(i) 1.6081 ms/op 1.4181 ms/op 1.13
Array 250000 create 2.8859 ms/op 2.3829 ms/op 1.21
Array 250000 clone - spread 1.5587 ms/op 1.3384 ms/op 1.16
Array 250000 get(125000) 0.41100 ns/op 0.57000 ns/op 0.72
Array 250000 set(125000) 0.43000 ns/op 0.58100 ns/op 0.74
Array 250000 iterate all - loop 107.03 us/op 77.341 us/op 1.38
effectiveBalanceIncrements clone Uint8Array 300000 30.917 us/op 15.177 us/op 2.04
effectiveBalanceIncrements clone MutableVector 300000 126.00 ns/op 306.00 ns/op 0.41
effectiveBalanceIncrements rw all Uint8Array 300000 197.61 us/op 167.36 us/op 1.18
effectiveBalanceIncrements rw all MutableVector 300000 67.844 ms/op 60.122 ms/op 1.13
phase0 afterProcessEpoch - 250000 vs - 7PWei 89.174 ms/op 75.829 ms/op 1.18
Array.fill - length 1000000 3.5087 ms/op 2.4434 ms/op 1.44
Array push - length 1000000 17.743 ms/op 14.650 ms/op 1.21
Array.get 0.27479 ns/op 0.25987 ns/op 1.06
Uint8Array.get 0.44002 ns/op 0.33874 ns/op 1.30
phase0 beforeProcessEpoch - 250000 vs - 7PWei 22.384 ms/op 18.466 ms/op 1.21
altair processEpoch - mainnet_e81889 332.44 ms/op 311.15 ms/op 1.07
mainnet_e81889 - altair beforeProcessEpoch 31.238 ms/op 30.780 ms/op 1.01
mainnet_e81889 - altair processJustificationAndFinalization 13.005 us/op 10.998 us/op 1.18
mainnet_e81889 - altair processInactivityUpdates 5.6992 ms/op 4.6991 ms/op 1.21
mainnet_e81889 - altair processRewardsAndPenalties 64.632 ms/op 42.161 ms/op 1.53
mainnet_e81889 - altair processRegistryUpdates 2.4720 us/op 2.0620 us/op 1.20
mainnet_e81889 - altair processSlashings 574.00 ns/op 886.00 ns/op 0.65
mainnet_e81889 - altair processEth1DataReset 445.00 ns/op 828.00 ns/op 0.54
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.2654 ms/op 1.0323 ms/op 3.16
mainnet_e81889 - altair processSlashingsReset 5.8600 us/op 3.8950 us/op 1.50
mainnet_e81889 - altair processRandaoMixesReset 4.1250 us/op 4.3920 us/op 0.94
mainnet_e81889 - altair processHistoricalRootsUpdate 723.00 ns/op 1.1200 us/op 0.65
mainnet_e81889 - altair processParticipationFlagUpdates 3.0850 us/op 3.2030 us/op 0.96
mainnet_e81889 - altair processSyncCommitteeUpdates 606.00 ns/op 954.00 ns/op 0.64
mainnet_e81889 - altair afterProcessEpoch 100.95 ms/op 76.634 ms/op 1.32
capella processEpoch - mainnet_e217614 1.4790 s/op 1.2200 s/op 1.21
mainnet_e217614 - capella beforeProcessEpoch 142.71 ms/op 111.62 ms/op 1.28
mainnet_e217614 - capella processJustificationAndFinalization 24.465 us/op 14.598 us/op 1.68
mainnet_e217614 - capella processInactivityUpdates 20.004 ms/op 16.334 ms/op 1.22
mainnet_e217614 - capella processRewardsAndPenalties 278.89 ms/op 250.73 ms/op 1.11
mainnet_e217614 - capella processRegistryUpdates 23.569 us/op 12.489 us/op 1.89
mainnet_e217614 - capella processSlashings 708.00 ns/op 864.00 ns/op 0.82
mainnet_e217614 - capella processEth1DataReset 708.00 ns/op 826.00 ns/op 0.86
mainnet_e217614 - capella processEffectiveBalanceUpdates 18.124 ms/op 15.265 ms/op 1.19
mainnet_e217614 - capella processSlashingsReset 4.9250 us/op 3.5480 us/op 1.39
mainnet_e217614 - capella processRandaoMixesReset 9.2940 us/op 3.6210 us/op 2.57
mainnet_e217614 - capella processHistoricalRootsUpdate 1.2320 us/op 688.00 ns/op 1.79
mainnet_e217614 - capella processParticipationFlagUpdates 3.9980 us/op 1.6360 us/op 2.44
mainnet_e217614 - capella afterProcessEpoch 326.25 ms/op 242.40 ms/op 1.35
phase0 processEpoch - mainnet_e58758 519.17 ms/op 353.19 ms/op 1.47
mainnet_e58758 - phase0 beforeProcessEpoch 130.45 ms/op 92.431 ms/op 1.41
mainnet_e58758 - phase0 processJustificationAndFinalization 37.275 us/op 15.370 us/op 2.43
mainnet_e58758 - phase0 processRewardsAndPenalties 47.064 ms/op 37.585 ms/op 1.25
mainnet_e58758 - phase0 processRegistryUpdates 9.5010 us/op 7.3570 us/op 1.29
mainnet_e58758 - phase0 processSlashings 848.00 ns/op 818.00 ns/op 1.04
mainnet_e58758 - phase0 processEth1DataReset 1.0680 us/op 756.00 ns/op 1.41
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9280 ms/op 1.3126 ms/op 1.47
mainnet_e58758 - phase0 processSlashingsReset 8.1490 us/op 2.7480 us/op 2.97
mainnet_e58758 - phase0 processRandaoMixesReset 11.824 us/op 3.9740 us/op 2.98
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.1810 us/op 1.0520 us/op 1.12
mainnet_e58758 - phase0 processParticipationRecordUpdates 7.2690 us/op 3.4180 us/op 2.13
mainnet_e58758 - phase0 afterProcessEpoch 99.996 ms/op 65.670 ms/op 1.52
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9405 ms/op 785.33 us/op 2.47
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.8795 ms/op 1.4447 ms/op 2.69
altair processInactivityUpdates - 250000 normalcase 21.661 ms/op 18.797 ms/op 1.15
altair processInactivityUpdates - 250000 worstcase 20.684 ms/op 18.121 ms/op 1.14
phase0 processRegistryUpdates - 250000 normalcase 15.316 us/op 6.7030 us/op 2.28
phase0 processRegistryUpdates - 250000 badcase_full_deposits 440.13 us/op 252.72 us/op 1.74
phase0 processRegistryUpdates - 250000 worstcase 0.5 164.30 ms/op 111.42 ms/op 1.47
altair processRewardsAndPenalties - 250000 normalcase 65.249 ms/op 39.636 ms/op 1.65
altair processRewardsAndPenalties - 250000 worstcase 68.409 ms/op 33.412 ms/op 2.05
phase0 getAttestationDeltas - 250000 normalcase 14.460 ms/op 5.8571 ms/op 2.47
phase0 getAttestationDeltas - 250000 worstcase 14.143 ms/op 6.7376 ms/op 2.10
phase0 processSlashings - 250000 worstcase 148.35 us/op 90.204 us/op 1.64
altair processSyncCommitteeUpdates - 250000 189.11 ms/op 93.707 ms/op 2.02
BeaconState.hashTreeRoot - No change 538.00 ns/op 566.00 ns/op 0.95
BeaconState.hashTreeRoot - 1 full validator 204.14 us/op 88.819 us/op 2.30
BeaconState.hashTreeRoot - 32 full validator 2.1294 ms/op 953.29 us/op 2.23
BeaconState.hashTreeRoot - 512 full validator 18.972 ms/op 9.5045 ms/op 2.00
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 198.96 us/op 144.22 us/op 1.38
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 3.6114 ms/op 2.4519 ms/op 1.47
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 59.056 ms/op 29.779 ms/op 1.98
BeaconState.hashTreeRoot - 1 balances 174.88 us/op 97.791 us/op 1.79
BeaconState.hashTreeRoot - 32 balances 2.3006 ms/op 1.0080 ms/op 2.28
BeaconState.hashTreeRoot - 512 balances 14.541 ms/op 8.9638 ms/op 1.62
BeaconState.hashTreeRoot - 250000 balances 269.41 ms/op 207.62 ms/op 1.30
aggregationBits - 2048 els - zipIndexesInBitList 57.054 us/op 36.616 us/op 1.56
byteArrayEquals 32 64.080 ns/op 48.819 ns/op 1.31
Buffer.compare 32 24.770 ns/op 15.628 ns/op 1.58
byteArrayEquals 1024 2.0251 us/op 1.2969 us/op 1.56
Buffer.compare 1024 34.263 ns/op 23.740 ns/op 1.44
byteArrayEquals 16384 29.955 us/op 23.644 us/op 1.27
Buffer.compare 16384 247.59 ns/op 180.45 ns/op 1.37
byteArrayEquals 123687377 239.79 ms/op 150.17 ms/op 1.60
Buffer.compare 123687377 10.916 ms/op 4.6341 ms/op 2.36
byteArrayEquals 32 - diff last byte 59.654 ns/op 47.598 ns/op 1.25
Buffer.compare 32 - diff last byte 22.194 ns/op 16.302 ns/op 1.36
byteArrayEquals 1024 - diff last byte 1.7526 us/op 1.2610 us/op 1.39
Buffer.compare 1024 - diff last byte 29.522 ns/op 24.472 ns/op 1.21
byteArrayEquals 16384 - diff last byte 27.526 us/op 20.815 us/op 1.32
Buffer.compare 16384 - diff last byte 189.68 ns/op 204.69 ns/op 0.93
byteArrayEquals 123687377 - diff last byte 206.23 ms/op 144.13 ms/op 1.43
Buffer.compare 123687377 - diff last byte 9.0447 ms/op 5.1784 ms/op 1.75
byteArrayEquals 32 - random bytes 5.5500 ns/op 4.5670 ns/op 1.22
Buffer.compare 32 - random bytes 18.425 ns/op 14.577 ns/op 1.26
byteArrayEquals 1024 - random bytes 5.8490 ns/op 4.6410 ns/op 1.26
Buffer.compare 1024 - random bytes 18.833 ns/op 14.521 ns/op 1.30
byteArrayEquals 16384 - random bytes 5.4710 ns/op 4.6030 ns/op 1.19
Buffer.compare 16384 - random bytes 18.162 ns/op 14.425 ns/op 1.26
byteArrayEquals 123687377 - random bytes 7.1200 ns/op 7.3400 ns/op 0.97
Buffer.compare 123687377 - random bytes 20.650 ns/op 17.190 ns/op 1.20
regular array get 100000 times 40.781 us/op 28.972 us/op 1.41
wrappedArray get 100000 times 40.466 us/op 28.692 us/op 1.41
arrayWithProxy get 100000 times 13.240 ms/op 10.521 ms/op 1.26
ssz.Root.equals 47.436 ns/op 46.253 ns/op 1.03
byteArrayEquals 46.993 ns/op 43.166 ns/op 1.09
Buffer.compare 11.356 ns/op 9.4330 ns/op 1.20
shuffle list - 16384 els 6.8753 ms/op 5.5691 ms/op 1.23
shuffle list - 250000 els 100.33 ms/op 81.938 ms/op 1.22
processSlot - 1 slots 16.805 us/op 12.920 us/op 1.30
processSlot - 32 slots 3.5031 ms/op 2.3312 ms/op 1.50
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.612 ms/op 38.519 ms/op 1.05
getCommitteeAssignments - req 1 vs - 250000 vc 2.3273 ms/op 1.7033 ms/op 1.37
getCommitteeAssignments - req 100 vs - 250000 vc 4.4643 ms/op 3.4535 ms/op 1.29
getCommitteeAssignments - req 1000 vs - 250000 vc 5.0935 ms/op 3.7435 ms/op 1.36
findModifiedValidators - 10000 modified validators 321.82 ms/op 248.13 ms/op 1.30
findModifiedValidators - 1000 modified validators 187.48 ms/op 146.17 ms/op 1.28
findModifiedValidators - 100 modified validators 156.52 ms/op 149.12 ms/op 1.05
findModifiedValidators - 10 modified validators 158.91 ms/op 152.06 ms/op 1.05
findModifiedValidators - 1 modified validators 169.77 ms/op 171.29 ms/op 0.99
findModifiedValidators - no difference 164.24 ms/op 154.33 ms/op 1.06
compare ViewDUs 3.2287 s/op 3.0110 s/op 1.07
compare each validator Uint8Array 1.5521 s/op 1.2171 s/op 1.28
compare ViewDU to Uint8Array 1.0562 s/op 762.50 ms/op 1.39
migrate state 1000000 validators, 24 modified, 0 new 624.85 ms/op 580.99 ms/op 1.08
migrate state 1000000 validators, 1700 modified, 1000 new 882.78 ms/op 822.76 ms/op 1.07
migrate state 1000000 validators, 3400 modified, 2000 new 1.1435 s/op 874.01 ms/op 1.31
migrate state 1500000 validators, 24 modified, 0 new 684.48 ms/op 548.78 ms/op 1.25
migrate state 1500000 validators, 1700 modified, 1000 new 888.53 ms/op 801.71 ms/op 1.11
migrate state 1500000 validators, 3400 modified, 2000 new 1.1063 s/op 1.0891 s/op 1.02
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.4200 ns/op 7.0900 ns/op 0.76
state getBlockRootAtSlot - 250000 vs - 7PWei 994.93 ns/op 402.08 ns/op 2.47
computeProposers - vc 250000 8.6604 ms/op 5.9863 ms/op 1.45
computeEpochShuffling - vc 250000 104.07 ms/op 87.175 ms/op 1.19
getNextSyncCommittee - vc 250000 139.26 ms/op 107.39 ms/op 1.30
computeSigningRoot for AttestationData 25.997 us/op 29.180 us/op 0.89
hash AttestationData serialized data then Buffer.toString(base64) 1.7342 us/op 1.2135 us/op 1.43
toHexString serialized data 1.2017 us/op 797.36 ns/op 1.51
Buffer.toString(base64) 214.16 ns/op 145.61 ns/op 1.47

Please sign in to comment.