Skip to content

Commit

Permalink
feat: electra fork (#6986)
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain authored Aug 28, 2024
2 parents 5d2e1a7 + 03f7396 commit a7286bd
Show file tree
Hide file tree
Showing 205 changed files with 6,093 additions and 938 deletions.
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
},
"dependencies": {
"@chainsafe/persistent-merkle-tree": "^0.8.0",
"@chainsafe/ssz": "^0.17.0",
"@chainsafe/ssz": "^0.17.1",
"@lodestar/config": "^1.21.0",
"@lodestar/params": "^1.21.0",
"@lodestar/types": "^1.21.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/beacon/client/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type ApiClient = ApiClientMethods<Endpoints>;
*/
export function getClient(config: ChainForkConfig, baseUrl: string): ApiClient {
const definitions = getDefinitions(config);
const eventSerdes = getEventSerdes();
const eventSerdes = getEventSerdes(config);

return {
eventstream: async ({topics, signal, onEvent, onError, onClose}) => {
Expand Down
25 changes: 23 additions & 2 deletions packages/api/src/beacon/routes/beacon/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
SignedBlockContents,
sszTypesFor,
} from "@lodestar/types";
import {ForkName, ForkPreExecution, isForkBlobs, isForkExecution} from "@lodestar/params";
import {ForkName, ForkPreElectra, ForkPreExecution, isForkBlobs, isForkExecution} from "@lodestar/params";
import {Endpoint, RequestCodec, RouteDefinitions, Schema} from "../../../utils/index.js";
import {EmptyMeta, EmptyResponseCodec, EmptyResponseData, WithVersion} from "../../../utils/codecs.js";
import {
Expand Down Expand Up @@ -101,10 +101,22 @@ export type Endpoints = {
"GET",
BlockArgs,
{params: {block_id: string}},
BeaconBlockBody["attestations"],
BeaconBlockBody<ForkPreElectra>["attestations"],
ExecutionOptimisticAndFinalizedMeta
>;

/**
* Get block attestations
* Retrieves attestation included in requested block.
*/
getBlockAttestationsV2: Endpoint<
"GET",
BlockArgs,
{params: {block_id: string}},
BeaconBlockBody["attestations"],
ExecutionOptimisticFinalizedAndVersionMeta
>;

/**
* Get block header
* Retrieves block header for given block id.
Expand Down Expand Up @@ -251,6 +263,15 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
meta: ExecutionOptimisticAndFinalizedCodec,
},
},
getBlockAttestationsV2: {
url: "/eth/v2/beacon/blocks/{block_id}/attestations",
method: "GET",
req: blockIdOnlyReq,
resp: {
data: WithVersion((fork) => ssz[fork].BeaconBlockBody.fields.attestations),
meta: ExecutionOptimisticFinalizedAndVersionCodec,
},
},
getBlockHeader: {
url: "/eth/v1/beacon/headers/{block_id}",
method: "GET",
Expand Down
210 changes: 195 additions & 15 deletions packages/api/src/beacon/routes/beacon/pool.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {ValueOf} from "@chainsafe/ssz";
import {ChainForkConfig} from "@lodestar/config";
import {phase0, capella, CommitteeIndex, Slot, ssz} from "@lodestar/types";
import {isForkPostElectra} from "@lodestar/params";
import {phase0, capella, CommitteeIndex, Slot, ssz, electra, AttesterSlashing} from "@lodestar/types";
import {Schema, Endpoint, RouteDefinitions} from "../../../utils/index.js";
import {
ArrayOf,
Expand All @@ -12,19 +13,31 @@ import {
EmptyRequest,
EmptyResponseCodec,
EmptyResponseData,
WithVersion,
} from "../../../utils/codecs.js";
import {MetaHeader, VersionCodec, VersionMeta} from "../../../utils/metadata.js";
import {toForkName} from "../../../utils/fork.js";
import {fromHeaders} from "../../../utils/headers.js";

// See /packages/api/src/routes/index.ts for reasoning and instructions to add new routes

const AttestationListType = ArrayOf(ssz.phase0.Attestation);
const AttesterSlashingListType = ArrayOf(ssz.phase0.AttesterSlashing);
const AttestationListTypePhase0 = ArrayOf(ssz.phase0.Attestation);
const AttestationListTypeElectra = ArrayOf(ssz.electra.Attestation);
const AttesterSlashingListTypePhase0 = ArrayOf(ssz.phase0.AttesterSlashing);
const AttesterSlashingListTypeElectra = ArrayOf(ssz.electra.AttesterSlashing);
const ProposerSlashingListType = ArrayOf(ssz.phase0.ProposerSlashing);
const SignedVoluntaryExitListType = ArrayOf(ssz.phase0.SignedVoluntaryExit);
const SignedBLSToExecutionChangeListType = ArrayOf(ssz.capella.SignedBLSToExecutionChange);
const SyncCommitteeMessageListType = ArrayOf(ssz.altair.SyncCommitteeMessage);

type AttestationList = ValueOf<typeof AttestationListType>;
type AttesterSlashingList = ValueOf<typeof AttesterSlashingListType>;
type AttestationListPhase0 = ValueOf<typeof AttestationListTypePhase0>;
type AttestationListElectra = ValueOf<typeof AttestationListTypeElectra>;
type AttestationList = AttestationListPhase0 | AttestationListElectra;

type AttesterSlashingListPhase0 = ValueOf<typeof AttesterSlashingListTypePhase0>;
type AttesterSlashingListElectra = ValueOf<typeof AttesterSlashingListTypeElectra>;
type AttesterSlashingList = AttesterSlashingListPhase0 | AttesterSlashingListElectra;

type ProposerSlashingList = ValueOf<typeof ProposerSlashingListType>;
type SignedVoluntaryExitList = ValueOf<typeof SignedVoluntaryExitListType>;
type SignedBLSToExecutionChangeList = ValueOf<typeof SignedBLSToExecutionChangeListType>;
Expand All @@ -39,10 +52,22 @@ export type Endpoints = {
"GET",
{slot?: Slot; committeeIndex?: CommitteeIndex},
{query: {slot?: number; committee_index?: number}},
AttestationList,
AttestationListPhase0,
EmptyMeta
>;

/**
* Get Attestations from operations pool
* Retrieves attestations known by the node but not necessarily incorporated into any block
*/
getPoolAttestationsV2: Endpoint<
"GET",
{slot?: Slot; committeeIndex?: CommitteeIndex},
{query: {slot?: number; committee_index?: number}},
AttestationList,
VersionMeta
>;

/**
* Get AttesterSlashings from operations pool
* Retrieves attester slashings known by the node but not necessarily incorporated into any block
Expand All @@ -52,10 +77,23 @@ export type Endpoints = {
"GET",
EmptyArgs,
EmptyRequest,
AttesterSlashingList,
AttesterSlashingListPhase0,
EmptyMeta
>;

/**
* Get AttesterSlashings from operations pool
* Retrieves attester slashings known by the node but not necessarily incorporated into any block
*/
getPoolAttesterSlashingsV2: Endpoint<
// ⏎
"GET",
EmptyArgs,
EmptyRequest,
AttesterSlashingList,
VersionMeta
>;

/**
* Get ProposerSlashings from operations pool
* Retrieves proposer slashings known by the node but not necessarily incorporated into any block
Expand Down Expand Up @@ -105,12 +143,28 @@ export type Endpoints = {
*/
submitPoolAttestations: Endpoint<
"POST",
{signedAttestations: AttestationList},
{signedAttestations: AttestationListPhase0},
{body: unknown},
EmptyResponseData,
EmptyMeta
>;

/**
* Submit Attestation objects to node
* Submits Attestation objects to the node. Each attestation in the request body is processed individually.
*
* If an attestation is validated successfully the node MUST publish that attestation on the appropriate subnet.
*
* If one or more attestations fail validation the node MUST return a 400 error with details of which attestations have failed, and why.
*/
submitPoolAttestationsV2: Endpoint<
"POST",
{signedAttestations: AttestationList},
{body: unknown; headers: {[MetaHeader.Version]: string}},
EmptyResponseData,
EmptyMeta
>;

/**
* Submit AttesterSlashing object to node's pool
* Submits AttesterSlashing object to node's pool and if passes validation node MUST broadcast it to network.
Expand All @@ -123,6 +177,18 @@ export type Endpoints = {
EmptyMeta
>;

/**
* Submit AttesterSlashing object to node's pool
* Submits AttesterSlashing object to node's pool and if passes validation node MUST broadcast it to network.
*/
submitPoolAttesterSlashingsV2: Endpoint<
"POST",
{attesterSlashing: AttesterSlashing},
{body: unknown; headers: {[MetaHeader.Version]: string}},
EmptyResponseData,
EmptyMeta
>;

/**
* Submit ProposerSlashing object to node's pool
* Submits ProposerSlashing object to node's pool and if passes validation node MUST broadcast it to network.
Expand Down Expand Up @@ -172,7 +238,7 @@ export type Endpoints = {
>;
};

export function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpoints> {
export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoints> {
return {
getPoolAttestations: {
url: "/eth/v1/beacon/pool/attestations",
Expand All @@ -183,19 +249,43 @@ export function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpo
schema: {query: {slot: Schema.Uint, committee_index: Schema.Uint}},
},
resp: {
data: AttestationListType,
data: AttestationListTypePhase0,
meta: EmptyMetaCodec,
},
},
getPoolAttestationsV2: {
url: "/eth/v2/beacon/pool/attestations",
method: "GET",
req: {
writeReq: ({slot, committeeIndex}) => ({query: {slot, committee_index: committeeIndex}}),
parseReq: ({query}) => ({slot: query.slot, committeeIndex: query.committee_index}),
schema: {query: {slot: Schema.Uint, committee_index: Schema.Uint}},
},
resp: {
data: WithVersion((fork) => (isForkPostElectra(fork) ? AttestationListTypeElectra : AttestationListTypePhase0)),
meta: VersionCodec,
},
},
getPoolAttesterSlashings: {
url: "/eth/v1/beacon/pool/attester_slashings",
method: "GET",
req: EmptyRequestCodec,
resp: {
data: AttesterSlashingListType,
data: AttesterSlashingListTypePhase0,
meta: EmptyMetaCodec,
},
},
getPoolAttesterSlashingsV2: {
url: "/eth/v2/beacon/pool/attester_slashings",
method: "GET",
req: EmptyRequestCodec,
resp: {
data: WithVersion((fork) =>
isForkPostElectra(fork) ? AttesterSlashingListTypeElectra : AttesterSlashingListTypePhase0
),
meta: VersionCodec,
},
},
getPoolProposerSlashings: {
url: "/eth/v1/beacon/pool/proposer_slashings",
method: "GET",
Expand Down Expand Up @@ -227,16 +317,61 @@ export function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpo
url: "/eth/v1/beacon/pool/attestations",
method: "POST",
req: {
writeReqJson: ({signedAttestations}) => ({body: AttestationListType.toJson(signedAttestations)}),
parseReqJson: ({body}) => ({signedAttestations: AttestationListType.fromJson(body)}),
writeReqSsz: ({signedAttestations}) => ({body: AttestationListType.serialize(signedAttestations)}),
parseReqSsz: ({body}) => ({signedAttestations: AttestationListType.deserialize(body)}),
writeReqJson: ({signedAttestations}) => ({body: AttestationListTypePhase0.toJson(signedAttestations)}),
parseReqJson: ({body}) => ({signedAttestations: AttestationListTypePhase0.fromJson(body)}),
writeReqSsz: ({signedAttestations}) => ({body: AttestationListTypePhase0.serialize(signedAttestations)}),
parseReqSsz: ({body}) => ({signedAttestations: AttestationListTypePhase0.deserialize(body)}),
schema: {
body: Schema.ObjectArray,
},
},
resp: EmptyResponseCodec,
},
submitPoolAttestationsV2: {
url: "/eth/v2/beacon/pool/attestations",
method: "POST",
req: {
writeReqJson: ({signedAttestations}) => {
const fork = config.getForkName(signedAttestations[0]?.data.slot ?? 0);
return {
body: isForkPostElectra(fork)
? AttestationListTypeElectra.toJson(signedAttestations as AttestationListElectra)
: AttestationListTypePhase0.toJson(signedAttestations as AttestationListPhase0),
headers: {[MetaHeader.Version]: fork},
};
},
parseReqJson: ({body, headers}) => {
const fork = toForkName(fromHeaders(headers, MetaHeader.Version));
return {
signedAttestations: isForkPostElectra(fork)
? AttestationListTypeElectra.fromJson(body)
: AttestationListTypePhase0.fromJson(body),
};
},
writeReqSsz: ({signedAttestations}) => {
const fork = config.getForkName(signedAttestations[0]?.data.slot ?? 0);
return {
body: isForkPostElectra(fork)
? AttestationListTypeElectra.serialize(signedAttestations as AttestationListElectra)
: AttestationListTypePhase0.serialize(signedAttestations as AttestationListPhase0),
headers: {[MetaHeader.Version]: fork},
};
},
parseReqSsz: ({body, headers}) => {
const fork = toForkName(fromHeaders(headers, MetaHeader.Version));
return {
signedAttestations: isForkPostElectra(fork)
? AttestationListTypeElectra.deserialize(body)
: AttestationListTypePhase0.deserialize(body),
};
},
schema: {
body: Schema.ObjectArray,
headers: {[MetaHeader.Version]: Schema.String},
},
},
resp: EmptyResponseCodec,
},
submitPoolAttesterSlashings: {
url: "/eth/v1/beacon/pool/attester_slashings",
method: "POST",
Expand All @@ -251,6 +386,51 @@ export function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpo
},
resp: EmptyResponseCodec,
},
submitPoolAttesterSlashingsV2: {
url: "/eth/v2/beacon/pool/attester_slashings",
method: "POST",
req: {
writeReqJson: ({attesterSlashing}) => {
const fork = config.getForkName(Number(attesterSlashing.attestation1.data.slot));
return {
body: isForkPostElectra(fork)
? ssz.electra.AttesterSlashing.toJson(attesterSlashing)
: ssz.phase0.AttesterSlashing.toJson(attesterSlashing),
headers: {[MetaHeader.Version]: fork},
};
},
parseReqJson: ({body, headers}) => {
const fork = toForkName(fromHeaders(headers, MetaHeader.Version));
return {
attesterSlashing: isForkPostElectra(fork)
? ssz.electra.AttesterSlashing.fromJson(body)
: ssz.phase0.AttesterSlashing.fromJson(body),
};
},
writeReqSsz: ({attesterSlashing}) => {
const fork = config.getForkName(Number(attesterSlashing.attestation1.data.slot));
return {
body: isForkPostElectra(fork)
? ssz.electra.AttesterSlashing.serialize(attesterSlashing as electra.AttesterSlashing)
: ssz.phase0.AttesterSlashing.serialize(attesterSlashing as phase0.AttesterSlashing),
headers: {[MetaHeader.Version]: fork},
};
},
parseReqSsz: ({body, headers}) => {
const fork = toForkName(fromHeaders(headers, MetaHeader.Version));
return {
attesterSlashing: isForkPostElectra(fork)
? ssz.electra.AttesterSlashing.deserialize(body)
: ssz.phase0.AttesterSlashing.deserialize(body),
};
},
schema: {
body: Schema.Object,
headers: {[MetaHeader.Version]: Schema.String},
},
},
resp: EmptyResponseCodec,
},
submitPoolProposerSlashings: {
url: "/eth/v1/beacon/pool/proposer_slashings",
method: "POST",
Expand Down
Loading

1 comment on commit a7286bd

@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: a7286bd Previous: 5d2e1a7 Ratio
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.4280 ms/op 747.70 us/op 3.25
Full benchmark results
Benchmark suite Current: a7286bd Previous: 5d2e1a7 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8684 ms/op 2.1060 ms/op 0.89
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 52.979 us/op 55.538 us/op 0.95
BLS verify - blst 836.65 us/op 961.58 us/op 0.87
BLS verifyMultipleSignatures 3 - blst 1.2496 ms/op 1.3817 ms/op 0.90
BLS verifyMultipleSignatures 8 - blst 1.8937 ms/op 1.9178 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst 5.5644 ms/op 4.8652 ms/op 1.14
BLS verifyMultipleSignatures 64 - blst 10.646 ms/op 9.2313 ms/op 1.15
BLS verifyMultipleSignatures 128 - blst 17.132 ms/op 17.152 ms/op 1.00
BLS deserializing 10000 signatures 682.50 ms/op 698.07 ms/op 0.98
BLS deserializing 100000 signatures 6.9444 s/op 6.9835 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst 1.1431 ms/op 908.14 us/op 1.26
BLS verifyMultipleSignatures - same message - 8 - blst 1.2822 ms/op 1.1394 ms/op 1.13
BLS verifyMultipleSignatures - same message - 32 - blst 1.8101 ms/op 1.8498 ms/op 0.98
BLS verifyMultipleSignatures - same message - 64 - blst 2.7219 ms/op 2.6303 ms/op 1.03
BLS verifyMultipleSignatures - same message - 128 - blst 4.4256 ms/op 4.3425 ms/op 1.02
BLS aggregatePubkeys 32 - blst 20.915 us/op 21.077 us/op 0.99
BLS aggregatePubkeys 128 - blst 72.912 us/op 73.300 us/op 0.99
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 66.855 ms/op 65.692 ms/op 1.02
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 64.202 ms/op 65.548 ms/op 0.98
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 44.047 ms/op 34.443 ms/op 1.28
getSlashingsAndExits - default max 131.34 us/op 92.771 us/op 1.42
getSlashingsAndExits - 2k 337.50 us/op 368.79 us/op 0.92
proposeBlockBody type=full, size=empty 6.2324 ms/op 6.3791 ms/op 0.98
isKnown best case - 1 super set check 585.00 ns/op 548.00 ns/op 1.07
isKnown normal case - 2 super set checks 533.00 ns/op 544.00 ns/op 0.98
isKnown worse case - 16 super set checks 567.00 ns/op 495.00 ns/op 1.15
InMemoryCheckpointStateCache - add get delete 4.2160 us/op 3.3460 us/op 1.26
updateUnfinalizedPubkeys - updating 10 pubkeys 1.3204 ms/op
updateUnfinalizedPubkeys - updating 100 pubkeys 2.7468 ms/op
updateUnfinalizedPubkeys - updating 1000 pubkeys 59.030 ms/op
validate api signedAggregateAndProof - struct 2.0050 ms/op 1.5182 ms/op 1.32
validate gossip signedAggregateAndProof - struct 1.6528 ms/op 1.5438 ms/op 1.07
validate gossip attestation - vc 640000 1.1038 ms/op 944.04 us/op 1.17
batch validate gossip attestation - vc 640000 - chunk 32 138.27 us/op 134.10 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 64 124.21 us/op 120.83 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 128 122.86 us/op 114.26 us/op 1.08
batch validate gossip attestation - vc 640000 - chunk 256 116.33 us/op 116.15 us/op 1.00
pickEth1Vote - no votes 1.1817 ms/op 1.1466 ms/op 1.03
pickEth1Vote - max votes 8.4919 ms/op 8.3843 ms/op 1.01
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.626 ms/op 18.825 ms/op 0.83
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 25.559 ms/op 24.938 ms/op 1.02
pickEth1Vote - Eth1Data fastSerialize value x2048 479.75 us/op 614.60 us/op 0.78
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.8751 ms/op 4.0200 ms/op 0.96
bytes32 toHexString 501.00 ns/op 715.00 ns/op 0.70
bytes32 Buffer.toString(hex) 283.00 ns/op 278.00 ns/op 1.02
bytes32 Buffer.toString(hex) from Uint8Array 402.00 ns/op 479.00 ns/op 0.84
bytes32 Buffer.toString(hex) + 0x 266.00 ns/op 264.00 ns/op 1.01
Object access 1 prop 0.15400 ns/op 0.19100 ns/op 0.81
Map access 1 prop 0.14200 ns/op 0.14400 ns/op 0.99
Object get x1000 6.0750 ns/op 6.5020 ns/op 0.93
Map get x1000 6.4870 ns/op 6.6910 ns/op 0.97
Object set x1000 34.282 ns/op 57.953 ns/op 0.59
Map set x1000 24.039 ns/op 38.152 ns/op 0.63
Return object 10000 times 0.29710 ns/op 0.32200 ns/op 0.92
Throw Error 10000 times 3.5130 us/op 3.5894 us/op 0.98
toHex 154.11 ns/op 175.26 ns/op 0.88
Buffer.from 142.38 ns/op 169.25 ns/op 0.84
shared Buffer 95.284 ns/op 106.39 ns/op 0.90
fastMsgIdFn sha256 / 200 bytes 2.2730 us/op 2.4660 us/op 0.92
fastMsgIdFn h32 xxhash / 200 bytes 292.00 ns/op 322.00 ns/op 0.91
fastMsgIdFn h64 xxhash / 200 bytes 282.00 ns/op 295.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 7.6370 us/op 7.7460 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 425.00 ns/op 442.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 1000 bytes 358.00 ns/op 365.00 ns/op 0.98
fastMsgIdFn sha256 / 10000 bytes 66.539 us/op 67.017 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.9320 us/op 2.0060 us/op 0.96
fastMsgIdFn h64 xxhash / 10000 bytes 1.2470 us/op 1.2770 us/op 0.98
send data - 1000 256B messages 13.623 ms/op 14.790 ms/op 0.92
send data - 1000 512B messages 19.819 ms/op 19.559 ms/op 1.01
send data - 1000 1024B messages 30.882 ms/op 34.545 ms/op 0.89
send data - 1000 1200B messages 27.900 ms/op 35.769 ms/op 0.78
send data - 1000 2048B messages 37.836 ms/op 43.542 ms/op 0.87
send data - 1000 4096B messages 36.460 ms/op 48.025 ms/op 0.76
send data - 1000 16384B messages 78.014 ms/op 79.058 ms/op 0.99
send data - 1000 65536B messages 249.57 ms/op 213.37 ms/op 1.17
enrSubnets - fastDeserialize 64 bits 1.3400 us/op 1.4000 us/op 0.96
enrSubnets - ssz BitVector 64 bits 417.00 ns/op 456.00 ns/op 0.91
enrSubnets - fastDeserialize 4 bits 184.00 ns/op 204.00 ns/op 0.90
enrSubnets - ssz BitVector 4 bits 408.00 ns/op 455.00 ns/op 0.90
prioritizePeers score -10:0 att 32-0.1 sync 2-0 193.35 us/op 206.55 us/op 0.94
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 174.32 us/op 248.29 us/op 0.70
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 313.59 us/op 388.33 us/op 0.81
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 445.74 us/op 425.95 us/op 1.05
prioritizePeers score 0:0 att 64-1 sync 4-1 796.47 us/op 750.92 us/op 1.06
array of 16000 items push then shift 1.7019 us/op 1.8121 us/op 0.94
LinkedList of 16000 items push then shift 8.1480 ns/op 8.2770 ns/op 0.98
array of 16000 items push then pop 134.93 ns/op 144.35 ns/op 0.93
LinkedList of 16000 items push then pop 7.5860 ns/op 8.2240 ns/op 0.92
array of 24000 items push then shift 2.5431 us/op 2.8984 us/op 0.88
LinkedList of 24000 items push then shift 7.7780 ns/op 9.7990 ns/op 0.79
array of 24000 items push then pop 154.32 ns/op 199.49 ns/op 0.77
LinkedList of 24000 items push then pop 7.9950 ns/op 8.1670 ns/op 0.98
intersect bitArray bitLen 8 6.7190 ns/op 6.8000 ns/op 0.99
intersect array and set length 8 50.030 ns/op 81.699 ns/op 0.61
intersect bitArray bitLen 128 31.303 ns/op 33.337 ns/op 0.94
intersect array and set length 128 731.95 ns/op 963.31 ns/op 0.76
bitArray.getTrueBitIndexes() bitLen 128 2.0620 us/op 2.6430 us/op 0.78
bitArray.getTrueBitIndexes() bitLen 248 3.7960 us/op 3.7350 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 512 8.8520 us/op 8.5250 us/op 1.04
Buffer.concat 32 items 1.0990 us/op 1.1490 us/op 0.96
Uint8Array.set 32 items 2.3440 us/op 2.3420 us/op 1.00
Buffer.copy 2.1280 us/op 1.9960 us/op 1.07
Uint8Array.set - with subarray 3.2110 us/op 3.1020 us/op 1.04
Uint8Array.set - without subarray 2.0420 us/op 1.8120 us/op 1.13
getUint32 - dataview 272.00 ns/op 318.00 ns/op 0.86
getUint32 - manual 202.00 ns/op 240.00 ns/op 0.84
Set add up to 64 items then delete first 2.9766 us/op 2.6394 us/op 1.13
OrderedSet add up to 64 items then delete first 3.4024 us/op 3.9113 us/op 0.87
Set add up to 64 items then delete last 2.6425 us/op 2.5850 us/op 1.02
OrderedSet add up to 64 items then delete last 4.2060 us/op 4.4672 us/op 0.94
Set add up to 64 items then delete middle 2.6896 us/op 2.7569 us/op 0.98
OrderedSet add up to 64 items then delete middle 5.3565 us/op 6.7594 us/op 0.79
Set add up to 128 items then delete first 5.3981 us/op 7.0565 us/op 0.76
OrderedSet add up to 128 items then delete first 7.5658 us/op 11.330 us/op 0.67
Set add up to 128 items then delete last 5.8710 us/op 6.6222 us/op 0.89
OrderedSet add up to 128 items then delete last 8.1993 us/op 11.140 us/op 0.74
Set add up to 128 items then delete middle 5.1048 us/op 7.8775 us/op 0.65
OrderedSet add up to 128 items then delete middle 14.353 us/op 18.322 us/op 0.78
Set add up to 256 items then delete first 10.695 us/op 15.166 us/op 0.71
OrderedSet add up to 256 items then delete first 15.550 us/op 25.420 us/op 0.61
Set add up to 256 items then delete last 10.770 us/op 13.541 us/op 0.80
OrderedSet add up to 256 items then delete last 16.643 us/op 19.015 us/op 0.88
Set add up to 256 items then delete middle 11.442 us/op 11.270 us/op 1.02
OrderedSet add up to 256 items then delete middle 41.607 us/op 48.012 us/op 0.87
transfer serialized Status (84 B) 1.4480 us/op 1.4540 us/op 1.00
copy serialized Status (84 B) 1.1880 us/op 1.2750 us/op 0.93
transfer serialized SignedVoluntaryExit (112 B) 1.5370 us/op 1.6760 us/op 0.92
copy serialized SignedVoluntaryExit (112 B) 1.1980 us/op 1.4230 us/op 0.84
transfer serialized ProposerSlashing (416 B) 1.6660 us/op 2.4400 us/op 0.68
copy serialized ProposerSlashing (416 B) 1.5240 us/op 1.7720 us/op 0.86
transfer serialized Attestation (485 B) 1.6910 us/op 1.7310 us/op 0.98
copy serialized Attestation (485 B) 1.4970 us/op 2.0160 us/op 0.74
transfer serialized AttesterSlashing (33232 B) 1.9020 us/op 2.7420 us/op 0.69
copy serialized AttesterSlashing (33232 B) 5.5730 us/op 8.5460 us/op 0.65
transfer serialized Small SignedBeaconBlock (128000 B) 2.6820 us/op 3.6240 us/op 0.74
copy serialized Small SignedBeaconBlock (128000 B) 17.243 us/op 19.767 us/op 0.87
transfer serialized Avg SignedBeaconBlock (200000 B) 3.4360 us/op 3.9350 us/op 0.87
copy serialized Avg SignedBeaconBlock (200000 B) 23.865 us/op 32.664 us/op 0.73
transfer serialized BlobsSidecar (524380 B) 3.2110 us/op 3.8770 us/op 0.83
copy serialized BlobsSidecar (524380 B) 81.016 us/op 86.078 us/op 0.94
transfer serialized Big SignedBeaconBlock (1000000 B) 3.0830 us/op 3.9940 us/op 0.77
copy serialized Big SignedBeaconBlock (1000000 B) 161.13 us/op 170.22 us/op 0.95
pass gossip attestations to forkchoice per slot 2.8080 ms/op 2.8990 ms/op 0.97
forkChoice updateHead vc 100000 bc 64 eq 0 510.55 us/op 508.09 us/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 0 3.1600 ms/op 3.1609 ms/op 1.00
forkChoice updateHead vc 1000000 bc 64 eq 0 5.4812 ms/op 5.4650 ms/op 1.00
forkChoice updateHead vc 600000 bc 320 eq 0 3.2914 ms/op 3.0776 ms/op 1.07
forkChoice updateHead vc 600000 bc 1200 eq 0 3.2939 ms/op 3.2059 ms/op 1.03
forkChoice updateHead vc 600000 bc 7200 eq 0 4.0204 ms/op 3.6792 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 1000 10.969 ms/op 10.659 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 10000 10.958 ms/op 10.804 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 15.149 ms/op 15.362 ms/op 0.99
computeDeltas 500000 validators 300 proto nodes 3.8063 ms/op 3.7629 ms/op 1.01
computeDeltas 500000 validators 1200 proto nodes 3.8037 ms/op 3.7258 ms/op 1.02
computeDeltas 500000 validators 7200 proto nodes 3.7628 ms/op 3.6626 ms/op 1.03
computeDeltas 750000 validators 300 proto nodes 5.5169 ms/op 5.4985 ms/op 1.00
computeDeltas 750000 validators 1200 proto nodes 5.3812 ms/op 5.5012 ms/op 0.98
computeDeltas 750000 validators 7200 proto nodes 5.3832 ms/op 5.6196 ms/op 0.96
computeDeltas 1400000 validators 300 proto nodes 10.027 ms/op 10.270 ms/op 0.98
computeDeltas 1400000 validators 1200 proto nodes 10.162 ms/op 10.496 ms/op 0.97
computeDeltas 1400000 validators 7200 proto nodes 10.089 ms/op 10.599 ms/op 0.95
computeDeltas 2100000 validators 300 proto nodes 15.003 ms/op 14.997 ms/op 1.00
computeDeltas 2100000 validators 1200 proto nodes 15.437 ms/op 15.482 ms/op 1.00
computeDeltas 2100000 validators 7200 proto nodes 14.894 ms/op 15.557 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei normalcase 1.6963 ms/op 1.7634 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei worstcase 2.5498 ms/op 3.4772 ms/op 0.73
altair processAttestation - setStatus - 1/6 committees join 87.098 us/op 99.424 us/op 0.88
altair processAttestation - setStatus - 1/3 committees join 178.28 us/op 188.68 us/op 0.94
altair processAttestation - setStatus - 1/2 committees join 253.60 us/op 256.68 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 321.77 us/op 332.76 us/op 0.97
altair processAttestation - setStatus - 4/5 committees join 466.20 us/op 489.76 us/op 0.95
altair processAttestation - setStatus - 100% committees join 538.76 us/op 561.45 us/op 0.96
altair processBlock - 250000 vs - 7PWei normalcase 4.3135 ms/op 5.0858 ms/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase hashState 35.066 ms/op 25.276 ms/op 1.39
altair processBlock - 250000 vs - 7PWei worstcase 42.782 ms/op 39.110 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase hashState 87.688 ms/op 81.264 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei normalcase 2.7441 ms/op 2.3899 ms/op 1.15
phase0 processBlock - 250000 vs - 7PWei worstcase 28.778 ms/op 24.852 ms/op 1.16
altair processEth1Data - 250000 vs - 7PWei normalcase 296.44 us/op 334.06 us/op 0.89
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.3230 us/op 8.4040 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 54.976 us/op 37.909 us/op 1.45
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.312 us/op 13.358 us/op 1.15
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.8540 us/op 10.059 us/op 0.98
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 221.91 us/op 139.40 us/op 1.59
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.4280 ms/op 747.70 us/op 3.25
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7485 ms/op 948.83 us/op 1.84
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.6260 ms/op 990.48 us/op 2.65
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9111 ms/op 2.5564 ms/op 1.53
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5492 ms/op 1.7412 ms/op 1.46
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9194 ms/op 4.7903 ms/op 0.82
Tree 40 250000 create 220.59 ms/op 319.86 ms/op 0.69
Tree 40 250000 get(125000) 137.23 ns/op 169.10 ns/op 0.81
Tree 40 250000 set(125000) 628.26 ns/op 785.99 ns/op 0.80
Tree 40 250000 toArray() 16.480 ms/op 18.994 ms/op 0.87
Tree 40 250000 iterate all - toArray() + loop 15.794 ms/op 23.417 ms/op 0.67
Tree 40 250000 iterate all - get(i) 51.706 ms/op 66.141 ms/op 0.78
Array 250000 create 2.9399 ms/op 3.9560 ms/op 0.74
Array 250000 clone - spread 1.5220 ms/op 1.5895 ms/op 0.96
Array 250000 get(125000) 0.41800 ns/op 0.44800 ns/op 0.93
Array 250000 set(125000) 0.43800 ns/op 0.48000 ns/op 0.91
Array 250000 iterate all - loop 109.89 us/op 107.35 us/op 1.02
phase0 afterProcessEpoch - 250000 vs - 7PWei 89.536 ms/op 92.421 ms/op 0.97
Array.fill - length 1000000 3.7127 ms/op 3.4752 ms/op 1.07
Array push - length 1000000 17.091 ms/op 19.799 ms/op 0.86
Array.get 0.26550 ns/op 0.28835 ns/op 0.92
Uint8Array.get 0.42684 ns/op 0.43966 ns/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.384 ms/op 16.020 ms/op 0.96
altair processEpoch - mainnet_e81889 368.22 ms/op 386.27 ms/op 0.95
mainnet_e81889 - altair beforeProcessEpoch 18.039 ms/op 22.395 ms/op 0.81
mainnet_e81889 - altair processJustificationAndFinalization 21.226 us/op 16.196 us/op 1.31
mainnet_e81889 - altair processInactivityUpdates 5.3942 ms/op 7.7119 ms/op 0.70
mainnet_e81889 - altair processRewardsAndPenalties 59.183 ms/op 46.565 ms/op 1.27
mainnet_e81889 - altair processRegistryUpdates 2.8260 us/op 2.8940 us/op 0.98
mainnet_e81889 - altair processSlashings 514.00 ns/op 797.00 ns/op 0.64
mainnet_e81889 - altair processEth1DataReset 477.00 ns/op 978.00 ns/op 0.49
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9594 ms/op 1.9162 ms/op 1.02
mainnet_e81889 - altair processSlashingsReset 3.9160 us/op 3.7630 us/op 1.04
mainnet_e81889 - altair processRandaoMixesReset 6.1110 us/op 5.6440 us/op 1.08
mainnet_e81889 - altair processHistoricalRootsUpdate 869.00 ns/op 1.4850 us/op 0.59
mainnet_e81889 - altair processParticipationFlagUpdates 2.4280 us/op 5.2490 us/op 0.46
mainnet_e81889 - altair processSyncCommitteeUpdates 479.00 ns/op 545.00 ns/op 0.88
mainnet_e81889 - altair afterProcessEpoch 96.542 ms/op 102.91 ms/op 0.94
capella processEpoch - mainnet_e217614 1.4166 s/op 1.2961 s/op 1.09
mainnet_e217614 - capella beforeProcessEpoch 67.178 ms/op 70.280 ms/op 0.96
mainnet_e217614 - capella processJustificationAndFinalization 19.326 us/op 14.877 us/op 1.30
mainnet_e217614 - capella processInactivityUpdates 19.052 ms/op 17.280 ms/op 1.10
mainnet_e217614 - capella processRewardsAndPenalties 258.94 ms/op 220.33 ms/op 1.18
mainnet_e217614 - capella processRegistryUpdates 13.424 us/op 16.813 us/op 0.80
mainnet_e217614 - capella processSlashings 470.00 ns/op 498.00 ns/op 0.94
mainnet_e217614 - capella processEth1DataReset 1.4380 us/op 501.00 ns/op 2.87
mainnet_e217614 - capella processEffectiveBalanceUpdates 14.320 ms/op 5.8006 ms/op 2.47
mainnet_e217614 - capella processSlashingsReset 3.8410 us/op 7.4210 us/op 0.52
mainnet_e217614 - capella processRandaoMixesReset 4.3100 us/op 5.3290 us/op 0.81
mainnet_e217614 - capella processHistoricalRootsUpdate 533.00 ns/op 815.00 ns/op 0.65
mainnet_e217614 - capella processParticipationFlagUpdates 3.3360 us/op 3.1320 us/op 1.07
mainnet_e217614 - capella afterProcessEpoch 251.66 ms/op 262.01 ms/op 0.96
phase0 processEpoch - mainnet_e58758 493.26 ms/op 461.50 ms/op 1.07
mainnet_e58758 - phase0 beforeProcessEpoch 112.60 ms/op 110.52 ms/op 1.02
mainnet_e58758 - phase0 processJustificationAndFinalization 18.627 us/op 30.214 us/op 0.62
mainnet_e58758 - phase0 processRewardsAndPenalties 30.254 ms/op 34.516 ms/op 0.88
mainnet_e58758 - phase0 processRegistryUpdates 7.6570 us/op 13.274 us/op 0.58
mainnet_e58758 - phase0 processSlashings 302.00 ns/op 560.00 ns/op 0.54
mainnet_e58758 - phase0 processEth1DataReset 328.00 ns/op 409.00 ns/op 0.80
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.4096 ms/op 1.1334 ms/op 1.24
mainnet_e58758 - phase0 processSlashingsReset 3.0880 us/op 7.6550 us/op 0.40
mainnet_e58758 - phase0 processRandaoMixesReset 7.0370 us/op 8.3760 us/op 0.84
mainnet_e58758 - phase0 processHistoricalRootsUpdate 367.00 ns/op 865.00 ns/op 0.42
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.0150 us/op 5.9460 us/op 0.84
mainnet_e58758 - phase0 afterProcessEpoch 83.760 ms/op 87.373 ms/op 0.96
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4380 ms/op 1.9396 ms/op 0.74
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.5511 ms/op 2.2238 ms/op 1.60
altair processInactivityUpdates - 250000 normalcase 20.139 ms/op 17.435 ms/op 1.16
altair processInactivityUpdates - 250000 worstcase 20.268 ms/op 18.685 ms/op 1.08
phase0 processRegistryUpdates - 250000 normalcase 10.272 us/op 7.9050 us/op 1.30
phase0 processRegistryUpdates - 250000 badcase_full_deposits 339.04 us/op 295.25 us/op 1.15
phase0 processRegistryUpdates - 250000 worstcase 0.5 135.74 ms/op 117.37 ms/op 1.16
altair processRewardsAndPenalties - 250000 normalcase 48.563 ms/op 39.336 ms/op 1.23
altair processRewardsAndPenalties - 250000 worstcase 40.728 ms/op 39.939 ms/op 1.02
phase0 getAttestationDeltas - 250000 normalcase 7.9038 ms/op 9.9926 ms/op 0.79
phase0 getAttestationDeltas - 250000 worstcase 7.8414 ms/op 9.0416 ms/op 0.87
phase0 processSlashings - 250000 worstcase 126.70 us/op 110.10 us/op 1.15
altair processSyncCommitteeUpdates - 250000 124.23 ms/op 130.28 ms/op 0.95
BeaconState.hashTreeRoot - No change 277.00 ns/op 336.00 ns/op 0.82
BeaconState.hashTreeRoot - 1 full validator 96.294 us/op 103.74 us/op 0.93
BeaconState.hashTreeRoot - 32 full validator 1.1200 ms/op 1.1534 ms/op 0.97
BeaconState.hashTreeRoot - 512 full validator 9.6616 ms/op 13.607 ms/op 0.71
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 112.11 us/op 128.94 us/op 0.87
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5939 ms/op 1.8879 ms/op 0.84
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.281 ms/op 21.627 ms/op 1.08
BeaconState.hashTreeRoot - 1 balances 88.070 us/op 97.348 us/op 0.90
BeaconState.hashTreeRoot - 32 balances 897.63 us/op 944.80 us/op 0.95
BeaconState.hashTreeRoot - 512 balances 9.1998 ms/op 8.3400 ms/op 1.10
BeaconState.hashTreeRoot - 250000 balances 179.96 ms/op 178.46 ms/op 1.01
aggregationBits - 2048 els - zipIndexesInBitList 26.163 us/op 26.286 us/op 1.00
byteArrayEquals 32 55.767 ns/op 55.318 ns/op 1.01
Buffer.compare 32 17.272 ns/op 17.754 ns/op 0.97
byteArrayEquals 1024 1.6132 us/op 1.6067 us/op 1.00
Buffer.compare 1024 24.542 ns/op 24.617 ns/op 1.00
byteArrayEquals 16384 25.423 us/op 25.536 us/op 1.00
Buffer.compare 16384 201.58 ns/op 205.46 ns/op 0.98
byteArrayEquals 123687377 192.92 ms/op 195.01 ms/op 0.99
Buffer.compare 123687377 6.9457 ms/op 7.6452 ms/op 0.91
byteArrayEquals 32 - diff last byte 53.189 ns/op 53.152 ns/op 1.00
Buffer.compare 32 - diff last byte 17.477 ns/op 17.030 ns/op 1.03
byteArrayEquals 1024 - diff last byte 1.6029 us/op 1.6068 us/op 1.00
Buffer.compare 1024 - diff last byte 29.613 ns/op 25.318 ns/op 1.17
byteArrayEquals 16384 - diff last byte 25.495 us/op 25.864 us/op 0.99
Buffer.compare 16384 - diff last byte 201.71 ns/op 207.44 ns/op 0.97
byteArrayEquals 123687377 - diff last byte 193.14 ms/op 198.21 ms/op 0.97
Buffer.compare 123687377 - diff last byte 7.8552 ms/op 9.4539 ms/op 0.83
byteArrayEquals 32 - random bytes 5.2600 ns/op 5.4490 ns/op 0.97
Buffer.compare 32 - random bytes 17.498 ns/op 17.979 ns/op 0.97
byteArrayEquals 1024 - random bytes 5.2530 ns/op 5.4070 ns/op 0.97
Buffer.compare 1024 - random bytes 17.532 ns/op 18.166 ns/op 0.97
byteArrayEquals 16384 - random bytes 5.2780 ns/op 5.4130 ns/op 0.98
Buffer.compare 16384 - random bytes 17.611 ns/op 17.965 ns/op 0.98
byteArrayEquals 123687377 - random bytes 6.5000 ns/op 7.4700 ns/op 0.87
Buffer.compare 123687377 - random bytes 18.850 ns/op 19.700 ns/op 0.96
regular array get 100000 times 34.058 us/op 36.462 us/op 0.93
wrappedArray get 100000 times 42.858 us/op 35.196 us/op 1.22
arrayWithProxy get 100000 times 14.569 ms/op 13.799 ms/op 1.06
ssz.Root.equals 46.697 ns/op 47.472 ns/op 0.98
byteArrayEquals 45.686 ns/op 47.608 ns/op 0.96
Buffer.compare 10.593 ns/op 11.634 ns/op 0.91
shuffle list - 16384 els 6.4856 ms/op 6.4936 ms/op 1.00
shuffle list - 250000 els 94.729 ms/op 95.567 ms/op 0.99
processSlot - 1 slots 15.571 us/op 16.898 us/op 0.92
processSlot - 32 slots 3.2331 ms/op 2.8353 ms/op 1.14
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.937 ms/op 37.050 ms/op 1.02
getCommitteeAssignments - req 1 vs - 250000 vc 2.2169 ms/op 2.2299 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 4.2910 ms/op 4.3122 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5554 ms/op 4.7020 ms/op 0.97
findModifiedValidators - 10000 modified validators 242.41 ms/op 284.11 ms/op 0.85
findModifiedValidators - 1000 modified validators 185.16 ms/op 208.41 ms/op 0.89
findModifiedValidators - 100 modified validators 163.65 ms/op 174.18 ms/op 0.94
findModifiedValidators - 10 modified validators 189.32 ms/op 180.23 ms/op 1.05
findModifiedValidators - 1 modified validators 158.03 ms/op 185.44 ms/op 0.85
findModifiedValidators - no difference 156.83 ms/op 159.92 ms/op 0.98
compare ViewDUs 3.2807 s/op 3.1193 s/op 1.05
compare each validator Uint8Array 1.3857 s/op 1.7027 s/op 0.81
compare ViewDU to Uint8Array 1.2296 s/op 1.1979 s/op 1.03
migrate state 1000000 validators, 24 modified, 0 new 638.98 ms/op 591.63 ms/op 1.08
migrate state 1000000 validators, 1700 modified, 1000 new 896.80 ms/op 858.97 ms/op 1.04
migrate state 1000000 validators, 3400 modified, 2000 new 1.1091 s/op 1.1011 s/op 1.01
migrate state 1500000 validators, 24 modified, 0 new 652.95 ms/op 575.59 ms/op 1.13
migrate state 1500000 validators, 1700 modified, 1000 new 898.01 ms/op 830.35 ms/op 1.08
migrate state 1500000 validators, 3400 modified, 2000 new 1.2049 s/op 1.0789 s/op 1.12
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3000 ns/op 4.8700 ns/op 0.88
state getBlockRootAtSlot - 250000 vs - 7PWei 638.95 ns/op 624.74 ns/op 1.02
computeProposers - vc 250000 7.5881 ms/op 7.9971 ms/op 0.95
computeEpochShuffling - vc 250000 94.729 ms/op 96.733 ms/op 0.98
getNextSyncCommittee - vc 250000 129.49 ms/op 142.97 ms/op 0.91
computeSigningRoot for AttestationData 21.968 us/op 29.065 us/op 0.76
hash AttestationData serialized data then Buffer.toString(base64) 1.5964 us/op 1.7284 us/op 0.92
toHexString serialized data 882.24 ns/op 1.1280 us/op 0.78
Buffer.toString(base64) 185.43 ns/op 216.61 ns/op 0.86
block root to RootHex using toHex 145.80 ns/op 176.58 ns/op 0.83
block root to RootHex using toRootHex 87.025 ns/op 110.25 ns/op 0.79

Please sign in to comment.