Skip to content

feat: upgrade to libp2p v3#8880

Open
wemeetagain wants to merge 1 commit intounstablefrom
codex/update-libp2p-to-v3-and-refactor-reqresp
Open

feat: upgrade to libp2p v3#8880
wemeetagain wants to merge 1 commit intounstablefrom
codex/update-libp2p-to-v3-and-refactor-reqresp

Conversation

@wemeetagain
Copy link
Member

Motivation

  • Upgrade and align the codebase to libp2p v3 stream/ gossipsub APIs and downstream package type changes to resolve TypeScript errors introduced by the v3 upgrade.
  • Simplify Req/Resp stream handling by adopting libp2p v3 MessageStream semantics and remove the separate time-to-first-byte (TTFB) machinery in favor of a single RESP timeout model.
  • Update tests and mocks to reflect the new stream API and multiaddr/component typing so unit/e2e suites typecheck and run against the updated libs.

Description

  • Req/Resp: replace uses of legacy stream source/sink with libp2p v3 MessageStream semantics (send, onDrain, close, async-iteration) and adapt request/response encoders/decoders accordingly (packages/reqresp/src/*).
  • Tests & utils: update test mocks and helpers (MockLibP2pStream, arrToSource, event helpers) to implement the v3 message stream interface and event handling; update unit/e2e tests that exercised stream APIs and encode/decode behavior (multiple test files under packages/reqresp/test and packages/beacon-node/test).
  • Gossipsub & networking: switch to @libp2p/gossipsub types and service instance usage, update gossipsub adapter to the service factory and instance APIs, and adjust topic/message types and scoring imports; fix multiaddr parsing and direct-peer handling to use getComponents() (several files under packages/beacon-node/src/network/*).
  • Type & packaging fixes: bump libp2p-related deps and adjust package metadata/types exports (added types to package.json for beacon-node/validator), update datastore/level API call signatures and other libp2p v3 type changes across the repo (multiple package.json and ts code changes).
  • Note on AI assistance: this PR description includes edits and guidance produced with AI assistance and the final code & tests were implemented and validated manually.

Testing

  • Ran workspace dependency install with pnpm install and rebuilt updated packages where needed using pnpm --filter <pkg> build for affected packages (notably @lodestar/reqresp, @lodestar/beacon-node, @lodestar/state-transition, @lodestar/fork-choice, @lodestar/api, @lodestar/db, @lodestar/validator); builds completed for the modified targets.
  • Ran full TypeScript checks via pnpm check-types (recursive workspace run) and iterated fixes until the checker completed successfully for the workspace.
  • Performed targeted test changes and exercised affected unit/e2e fixtures (req/resp encoders and response handler tests) during iteration; type-check and package build verification completed successfully.

Codex Task

@wemeetagain wemeetagain requested a review from a team as a code owner February 7, 2026 21:15
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @wemeetagain, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant upgrade of the project's networking layer by integrating libp2p version 3. The primary goal is to align the codebase with the latest libp2p stream and Gossipsub APIs, resolving TypeScript errors and modernizing peer-to-peer communication. The changes simplify request/response stream management, update network component interactions, and ensure the project remains compatible with current decentralized networking standards.

Highlights

  • Libp2p V3 Upgrade: Upgraded the core libp2p library to version 3.1.3 and updated numerous related dependencies across the codebase to align with the new APIs and type definitions.
  • Stream API Modernization: Refactored Req/Resp stream handling to adopt libp2p v3's MessageStream semantics, replacing legacy source/sink patterns with send, onDrain, and async iteration. This simplifies stream management and improves compatibility.
  • Timeout Simplification: Removed the separate time-to-first-byte (TTFB) timeout mechanism in favor of a single, unified RESP timeout model for request/response operations, streamlining error handling and configuration.
  • Gossipsub Integration: Updated Gossipsub and networking components to utilize @libp2p/gossipsub types and service instances, including adjustments to topic/message types, scoring imports, and the Eth2Gossipsub adapter.
  • Multiaddr and Peer Handling: Improved multiaddr parsing for direct peers by using getComponents() to correctly identify and decapsulate /p2p/ or /ipfs/ components, enhancing peer address resolution.
  • Type and Packaging Enhancements: Added types fields to package.json for beacon-node and validator packages, and updated datastore/level API call signatures to reflect libp2p v3 type changes.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • package.json
    • Updated libp2p dependency from 2.9.0 to 3.1.3.
  • packages/beacon-node/package.json
    • Added "types": "./lib/index.d.ts" field.
    • Updated @chainsafe/libp2p-gossipsub to @libp2p/gossipsub and bumped version.
    • Bumped @chainsafe/libp2p-noise to ^17.0.0.
    • Bumped various @libp2p/* dependencies (bootstrap, crypto, identify, interface, mdns, mplex, peer-id, prometheus-metrics, tcp).
    • Bumped @multiformats/multiaddr, datastore-core, datastore-fs, datastore-level, interface-datastore.
    • Updated libp2p dependency to 3.1.3.
    • Added @libp2p/utils dev dependency.
  • packages/beacon-node/src/api/impl/node/utils.ts
    • Replaced StreamStatus with ConnectionStatus from @libp2p/interface.
  • packages/beacon-node/src/network/core/networkCore.ts
    • Updated imports for PeerScoreStatsDump and PublishOpts from @chainsafe/libp2p-gossipsub to @libp2p/gossipsub.
  • packages/beacon-node/src/network/core/networkCoreWorkerHandler.ts
    • Updated imports for PeerScoreStatsDump and PublishOpts from @chainsafe/libp2p-gossipsub to @libp2p/gossipsub.
  • packages/beacon-node/src/network/core/types.ts
    • Updated imports for PeerScoreStatsDump and PublishOpts from @chainsafe/libp2p-gossipsub to @libp2p/gossipsub.
  • packages/beacon-node/src/network/discv5/worker.ts
    • Removed Multiaddr type import.
    • Refactored bindAddrs configuration for Discv5.create to handle ip4 and ip6 more robustly.
  • packages/beacon-node/src/network/events.ts
    • Updated TopicValidatorResult import from @libp2p/interface to @libp2p/gossipsub.
  • packages/beacon-node/src/network/gossip/encoding.ts
    • Updated Message, RPC, and DataTransform imports from @libp2p/interface and @chainsafe/libp2p-gossipsub to @libp2p/gossipsub.
  • packages/beacon-node/src/network/gossip/gossipsub.ts
    • Replaced @chainsafe/libp2p-gossipsub imports with @libp2p/gossipsub for core Gossipsub types and service.
    • Refactored Eth2Gossipsub class to wrap a gossipsub instance instead of extending GossipSub.
    • Delegated subscribe, unsubscribe, publish, getTopics, getMeshPeers, dumpPeerScoreStats, getScore, reportMessageValidationResult, and direct peer management to the internal gossipsub instance.
    • Updated multiaddr parsing for direct peers to use getComponents() for better handling of /p2p/ or /ipfs/ components.
  • packages/beacon-node/src/network/gossip/interface.ts
    • Updated Message and TopicValidatorResult imports from @libp2p/interface to @libp2p/gossipsub.
    • Updated PeerIdStr import from @chainsafe/libp2p-gossipsub/types to @libp2p/gossipsub/types.
  • packages/beacon-node/src/network/gossip/scoringParameters.ts
    • Updated imports for PeerScoreThresholds, TopicScoreParams, defaultTopicScoreParams from @chainsafe/libp2p-gossipsub/score to @libp2p/gossipsub/score.
    • Corrected a comment path for validatePeerScoreParams.
  • packages/beacon-node/src/network/libp2p/index.ts
    • Removed maxInboundStreams from mplex configuration.
    • Removed agentVersion from identify service configuration.
  • packages/beacon-node/src/network/network.ts
    • Updated imports for PeerScoreStatsDump and PublishOpts from @chainsafe/libp2p-gossipsub/score and @chainsafe/libp2p-gossipsub/types to @libp2p/gossipsub/score and @libp2p/gossipsub/types.
  • packages/beacon-node/src/network/peers/datastore.ts
    • Added _options?: AbortOptions parameter to get, has, delete, _all, and _allKeys methods to align with updated interface-datastore types.
  • packages/beacon-node/src/network/peers/utils/prioritizePeers.ts
    • Replaced Direction with MessageStreamDirection from @libp2p/interface.
  • packages/beacon-node/src/network/processor/gossipValidatorFn.ts
    • Updated TopicValidatorResult import from @libp2p/interface to @libp2p/gossipsub.
  • packages/beacon-node/src/network/processor/types.ts
    • Updated Message import from @libp2p/interface to @libp2p/gossipsub.
  • packages/beacon-node/src/network/reqresp/score.ts
    • Removed RequestErrorCode.TTFB_TIMEOUT case from onOutgoingReqRespError.
  • packages/beacon-node/src/util/workerEvents.ts
    • Updated Message import from @libp2p/interface to @libp2p/gossipsub.
  • packages/beacon-node/test/e2e/network/mdns.test.ts
    • Added type assertion for enr.setLocationMultiaddr.
  • packages/beacon-node/test/e2e/network/onWorker/dataSerialization.test.ts
    • Updated TopicValidatorResult import from @libp2p/interface to @libp2p/gossipsub.
  • packages/beacon-node/test/e2e/network/reqresp.test.ts
    • Removed ttfbTimeoutMs from test configurations and related assertions.
    • Updated test descriptions to reflect the removal of TTFB_TIMEOUT and focus on RESP_TIMEOUT.
  • packages/beacon-node/test/e2e/network/reqrespEncode.test.ts
    • Imported Uint8ArrayList.
    • Modified stream handling in expectEncodedChunks to use stream.send and stream.close() instead of stream.sink, and to iterate directly over the stream.
    • Adjusted chunk processing to handle Uint8ArrayList correctly.
  • packages/beacon-node/test/perf/network/noise/sendData.test.ts
    • Removed drain, duplexPair, pipe, Uint8ArrayList imports.
    • Imported streamPair from @libp2p/utils.
    • Updated stream handling in benchmark to use streamPair and connA.send/connA.onDrain/connA.close for MessageStream semantics.
  • packages/beacon-node/test/unit/network/gossip/directPeers.test.ts
    • Added type assertion for enr.setLocationMultiaddr.
  • packages/beacon-node/test/unit/network/gossip/scoringParameters.test.ts
    • Updated TopicScoreParams import from @chainsafe/libp2p-gossipsub/score to @libp2p/gossipsub/score.
  • packages/beacon-node/test/unit/network/reqresp/utils.ts
    • Updated stream interface types (Direction, ReadStatus, StreamStatus, WriteStatus) to MessageStreamDirection, MessageStreamReadStatus, MessageStreamStatus, MessageStreamWriteStatus, and added MessageStreamEvents from @libp2p/interface.
    • Refactored MockLibP2pStream to implement the new MessageStream interface, including send, onDrain, addEventListener, etc.
  • packages/beacon-node/test/unit/util/error.test.ts
    • Changed RequestErrorCode.TTFB_TIMEOUT to RequestErrorCode.RESP_TIMEOUT in test.
  • packages/beacon-node/test/utils/node/p2p.ts
    • Replaced Direction with MessageStreamDirection from @libp2p/interface.
  • packages/cli/package.json
    • Bumped various @libp2p/* dependencies (crypto, interface, peer-id).
    • Bumped @multiformats/multiaddr.
  • packages/cli/src/cmds/beacon/initPeerIdAndEnr.ts
    • Updated isLocalMultiAddr to use multiaddr.getComponents() instead of protoNames() and tuples() for parsing IP addresses.
  • packages/cli/src/cmds/bootnode/handler.ts
    • Removed Multiaddr type import.
    • Refactored bindAddrs configuration for Discv5.create to handle ip4 and ip6 more robustly.
    • Added type assertion for discv5Args.bootEnrs to Set<string>.
  • packages/reqresp/package.json
    • Bumped @libp2p/interface to ^3.1.0.
    • Bumped @libp2p/crypto, @libp2p/logger, @libp2p/peer-id.
    • Bumped libp2p to 3.1.3 in devDependencies and peerDependencies.
  • packages/reqresp/src/ReqResp.ts
    • Updated getRequestHandler signature to async (stream: Stream, connection: Connection) to align with libp2p v3.
  • packages/reqresp/src/encoders/responseDecode.ts
    • Simplified responseDecode callbacks, removing onFirstHeader and onFirstResponseChunk in favor of a single optional onResponseChunk.
    • Removed internal readFirstHeader and readFirstResponseChunk flags.
  • packages/reqresp/src/encoders/responseEncode.ts
    • Made cbs parameter optional in responseEncodeSuccess and used optional chaining for onChunk.
  • packages/reqresp/src/metrics.ts
    • Removed outgoingResponseTTFB and incomingResponseTTFB metrics.
  • packages/reqresp/src/request/errors.ts
    • Removed TTFB_TIMEOUT from RequestErrorCode enum and RequestErrorType.
  • packages/reqresp/src/request/index.ts
    • Imported Stream from @libp2p/interface.
    • Removed DEFAULT_TTFB_TIMEOUT constant.
    • Removed ttfbTimeoutMs from SendRequestOpts.
    • Added writeToStream helper function to handle MessageStream send/onDrain/close semantics.
    • Updated sendRequest to use writeToStream for request encoding.
    • Removed timerTTFB and ttfbTimeoutController logic.
    • Updated pipe source to use stream directly (as it's now an async iterable) and simplified abortableSource configuration.
    • Removed onFirstHeader callback from responseDecode.
  • packages/reqresp/src/response/index.ts
    • Imported Uint8ArrayList.
    • Imported abortableSource from ../utils/index.ts.
    • Added writeToStream helper function.
    • Removed timerTTFB logic.
    • Updated requestBody handling to use abortableSource with the stream directly.
    • Removed onChunk callback from responseEncodeSuccess.
    • Updated stream.sink to use the new writeToStream helper.
  • packages/reqresp/test/unit/encoders/responseDecode.test.ts
    • Updated responseDecode calls to use the new onResponseChunk callback.
  • packages/reqresp/test/unit/request/index.test.ts
    • Updated test cases to reflect the removal of TTFB_TIMEOUT, changing TTFB_TIMEOUT errors to RESP_TIMEOUT and removing ttfbTimeoutMs from options.
  • packages/reqresp/test/unit/response/index.test.ts
    • Updated MockLibP2pStream instantiation to match its new constructor signature.
  • packages/reqresp/test/utils/index.ts
    • Updated stream interface types (Direction, ReadStatus, StreamStatus, WriteStatus) to MessageStreamDirection, MessageStreamReadStatus, MessageStreamStatus, MessageStreamWriteStatus, and added MessageStreamEvents from @libp2p/interface.
    • Refactored MockLibP2pStream to implement the new MessageStream interface, including send, onDrain, addEventListener, etc., and adjusted its constructor.
  • packages/validator/package.json
    • Added "types": "./lib/index.d.ts" field.
  • pnpm-lock.yaml
    • Updated numerous dependency versions to align with libp2p v3 and related ecosystem changes, including @libp2p/* packages, datastore-*, interface-datastore, @noble/* cryptography libraries, delay, p-event, p-retry, protons-runtime, random-int, supports-color, unlimited-timeout, weald, abstract-level, browser-level, classic-level, cborg, and removed several it-* utility packages that are no longer needed due to MessageStream changes.
Activity
  • The pull request involves a significant upgrade of core networking libraries and a refactoring of stream handling.
  • The author has provided a detailed motivation and description, outlining the purpose and impact of the changes.
  • Testing steps include running pnpm install, rebuilding affected packages, executing pnpm check-types for type verification, and exercising unit/e2e tests, indicating a thorough approach to ensure stability and correctness.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@wemeetagain wemeetagain changed the title fix: align libp2p v3 stream types in tests feat: upgrade to libp2p v3 Feb 7, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a significant but necessary upgrade of libp2p and related dependencies to v3. The changes correctly adapt the codebase to the new stream and gossipsub APIs, simplify timeout handling by removing the TTFB mechanism, and improve multiaddr parsing for better compatibility. The refactoring from inheritance to composition for Eth2Gossipsub is well-executed. Overall, the changes are well-aligned with the stated motivation. I've identified a couple of areas where the code for constructing bind addresses could be simplified for better readability and robustness.

Comment on lines +50 to +61
const bindAddrs = (workerData.bindAddrs.ip4 && workerData.bindAddrs.ip6
? {
ip4: multiaddr(workerData.bindAddrs.ip4),
ip6: multiaddr(workerData.bindAddrs.ip6),
}
: workerData.bindAddrs.ip4
? {
ip4: multiaddr(workerData.bindAddrs.ip4),
}
: {
ip6: multiaddr(workerData.bindAddrs.ip6),
}) as Parameters<(typeof Discv5)["create"]>[0]["bindAddrs"];
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The logic for constructing bindAddrs using nested ternary operators is complex and hard to read. It also has a potential bug: if both workerData.bindAddrs.ip4 and workerData.bindAddrs.ip6 are falsy, it will attempt to call multiaddr(undefined), which would cause a runtime error. A refactor using if statements would be clearer, more maintainable, and safer.

const bindAddrs: Parameters<(typeof Discv5)["create"]>[0]["bindAddrs"] = {};
if (workerData.bindAddrs.ip4) {
  bindAddrs.ip4 = multiaddr(workerData.bindAddrs.ip4);
}
if (workerData.bindAddrs.ip6) {
  bindAddrs.ip6 = multiaddr(workerData.bindAddrs.ip6);
}

Comment on lines +59 to +70
const bindAddrsConfig = (bindAddrs.ip4 && bindAddrs.ip6
? {
ip4: multiaddr(bindAddrs.ip4),
ip6: multiaddr(bindAddrs.ip6),
}
: bindAddrs.ip4
? {
ip4: multiaddr(bindAddrs.ip4),
}
: {
ip6: multiaddr(bindAddrs.ip6),
}) as Parameters<(typeof Discv5)["create"]>[0]["bindAddrs"];
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The construction of bindAddrsConfig is difficult to follow due to the nested ternary operators. This complexity can be reduced for better readability and maintainability. Additionally, if both bindAddrs.ip4 and bindAddrs.ip6 are falsy, this logic would lead to a runtime error by calling multiaddr(undefined). I recommend refactoring this to use simple if statements, which is both safer and easier to understand.

const bindAddrsConfig: Parameters<(typeof Discv5)["create"]>[0]["bindAddrs"] = {};
if (bindAddrs.ip4) {
  bindAddrsConfig.ip4 = multiaddr(bindAddrs.ip4);
}
if (bindAddrs.ip6) {
  bindAddrsConfig.ip6 = multiaddr(bindAddrs.ip6);
}

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34abe5716d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 178 to +182
try {
restartRespTimeout();
// Note: libp2p.stop() will close all connections, so not necessary to abort this pipe on parent stop
yield* pipe(
abortableSource(stream.source as AsyncIterable<Uint8ArrayList>, [
{
signal: ttfbTimeoutController.signal,
getError: () => new RequestError({code: RequestErrorCode.TTFB_TIMEOUT}),
},
abortableSource(stream as AsyncIterable<Uint8ArrayList>, [

Choose a reason for hiding this comment

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

P2 Badge Start RESP timeout after first byte to avoid false timeouts

The RESP timeout is armed before any response bytes are read (restartRespTimeout() is called immediately), and it is only reset in onResponseChunk after a full chunk has been decoded. This means the first chunk’s budget includes any initial delay plus transfer time, so large/slow responses can hit RESP_TIMEOUT even while data is still streaming. If a peer takes a few seconds to send the first byte and then streams a large byRange response, this can now time out prematurely. Consider starting the timeout when the first header byte arrives (or resetting on each chunk boundary as soon as it begins) to preserve the per‑chunk timeout semantics.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 83d78ab Previous: 45b0426 Ratio
send data - 1000 512B messages 4.2492 ms/op 14.157 ms/op 0.30
send data - 1000 1024B messages 4.5488 ms/op 16.975 ms/op 0.27
send data - 1000 1200B messages 4.5120 ms/op 14.723 ms/op 0.31
send data - 1000 2048B messages 4.7004 ms/op 16.212 ms/op 0.29
send data - 1000 16384B messages 28.734 ms/op 103.41 ms/op 0.28
Full benchmark results
Benchmark suite Current: 83d78ab Previous: 45b0426 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.2300 ms/op 888.72 us/op 1.38
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 37.299 us/op 34.559 us/op 1.08
BLS verify - blst 784.07 us/op 862.37 us/op 0.91
BLS verifyMultipleSignatures 3 - blst 1.1956 ms/op 1.2847 ms/op 0.93
BLS verifyMultipleSignatures 8 - blst 1.6541 ms/op 2.1370 ms/op 0.77
BLS verifyMultipleSignatures 32 - blst 4.8374 ms/op 4.5584 ms/op 1.06
BLS verifyMultipleSignatures 64 - blst 8.8631 ms/op 8.6243 ms/op 1.03
BLS verifyMultipleSignatures 128 - blst 16.936 ms/op 16.488 ms/op 1.03
BLS deserializing 10000 signatures 675.99 ms/op 640.21 ms/op 1.06
BLS deserializing 100000 signatures 6.7708 s/op 6.1574 s/op 1.10
BLS verifyMultipleSignatures - same message - 3 - blst 883.83 us/op 932.23 us/op 0.95
BLS verifyMultipleSignatures - same message - 8 - blst 1.0449 ms/op 1.0582 ms/op 0.99
BLS verifyMultipleSignatures - same message - 32 - blst 1.6800 ms/op 1.6434 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst 2.6443 ms/op 2.4603 ms/op 1.07
BLS verifyMultipleSignatures - same message - 128 - blst 4.2962 ms/op 4.0066 ms/op 1.07
BLS aggregatePubkeys 32 - blst 19.008 us/op 17.041 us/op 1.12
BLS aggregatePubkeys 128 - blst 68.775 us/op 60.115 us/op 1.14
getSlashingsAndExits - default max 66.341 us/op 42.188 us/op 1.57
getSlashingsAndExits - 2k 307.52 us/op 331.49 us/op 0.93
isKnown best case - 1 super set check 200.00 ns/op 399.00 ns/op 0.50
isKnown normal case - 2 super set checks 197.00 ns/op 403.00 ns/op 0.49
isKnown worse case - 16 super set checks 196.00 ns/op 406.00 ns/op 0.48
validate api signedAggregateAndProof - struct 1.3293 ms/op 1.9981 ms/op 0.67
validate gossip signedAggregateAndProof - struct 1.3153 ms/op 1.9152 ms/op 0.69
batch validate gossip attestation - vc 640000 - chunk 32 111.00 us/op 110.14 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 98.891 us/op 109.76 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 128 91.988 us/op 86.393 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 256 87.580 us/op 82.160 us/op 1.07
bytes32 toHexString 336.00 ns/op 513.00 ns/op 0.65
bytes32 Buffer.toString(hex) 237.00 ns/op 410.00 ns/op 0.58
bytes32 Buffer.toString(hex) from Uint8Array 317.00 ns/op 498.00 ns/op 0.64
bytes32 Buffer.toString(hex) + 0x 237.00 ns/op 413.00 ns/op 0.57
Return object 10000 times 0.22350 ns/op 0.23030 ns/op 0.97
Throw Error 10000 times 3.9648 us/op 3.3913 us/op 1.17
toHex 140.79 ns/op 91.026 ns/op 1.55
Buffer.from 126.56 ns/op 85.905 ns/op 1.47
shared Buffer 76.620 ns/op 57.925 ns/op 1.32
fastMsgIdFn sha256 / 200 bytes 1.7790 us/op 1.6250 us/op 1.09
fastMsgIdFn h32 xxhash / 200 bytes 185.00 ns/op 369.00 ns/op 0.50
fastMsgIdFn h64 xxhash / 200 bytes 265.00 ns/op 453.00 ns/op 0.58
fastMsgIdFn sha256 / 1000 bytes 5.8530 us/op 5.0480 us/op 1.16
fastMsgIdFn h32 xxhash / 1000 bytes 277.00 ns/op 463.00 ns/op 0.60
fastMsgIdFn h64 xxhash / 1000 bytes 308.00 ns/op 524.00 ns/op 0.59
fastMsgIdFn sha256 / 10000 bytes 50.742 us/op 39.975 us/op 1.27
fastMsgIdFn h32 xxhash / 10000 bytes 1.3240 us/op 1.4600 us/op 0.91
fastMsgIdFn h64 xxhash / 10000 bytes 869.00 ns/op 1.1050 us/op 0.79
send data - 1000 256B messages 3.9982 ms/op 11.360 ms/op 0.35
send data - 1000 512B messages 4.2492 ms/op 14.157 ms/op 0.30
send data - 1000 1024B messages 4.5488 ms/op 16.975 ms/op 0.27
send data - 1000 1200B messages 4.5120 ms/op 14.723 ms/op 0.31
send data - 1000 2048B messages 4.7004 ms/op 16.212 ms/op 0.29
send data - 1000 4096B messages 6.2238 ms/op 15.522 ms/op 0.40
send data - 1000 16384B messages 28.734 ms/op 103.41 ms/op 0.28
send data - 1000 65536B messages 87.903 ms/op 208.57 ms/op 0.42
enrSubnets - fastDeserialize 64 bits 852.00 ns/op 968.00 ns/op 0.88
enrSubnets - ssz BitVector 64 bits 324.00 ns/op 525.00 ns/op 0.62
enrSubnets - fastDeserialize 4 bits 124.00 ns/op 331.00 ns/op 0.37
enrSubnets - ssz BitVector 4 bits 328.00 ns/op 512.00 ns/op 0.64
prioritizePeers score -10:0 att 32-0.1 sync 2-0 224.81 us/op 253.27 us/op 0.89
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 254.08 us/op 288.97 us/op 0.88
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 364.79 us/op 341.18 us/op 1.07
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 688.63 us/op 604.66 us/op 1.14
prioritizePeers score 0:0 att 64-1 sync 4-1 816.94 us/op 1.0145 ms/op 0.81
array of 16000 items push then shift 1.5362 us/op 1.1757 us/op 1.31
LinkedList of 16000 items push then shift 7.1110 ns/op 7.3690 ns/op 0.96
array of 16000 items push then pop 72.443 ns/op 62.529 ns/op 1.16
LinkedList of 16000 items push then pop 6.8050 ns/op 6.0270 ns/op 1.13
array of 24000 items push then shift 2.2797 us/op 1.7619 us/op 1.29
LinkedList of 24000 items push then shift 7.2160 ns/op 7.0310 ns/op 1.03
array of 24000 items push then pop 101.28 ns/op 88.270 ns/op 1.15
LinkedList of 24000 items push then pop 6.8170 ns/op 6.0430 ns/op 1.13
intersect bitArray bitLen 8 5.4840 ns/op 4.6380 ns/op 1.18
intersect array and set length 8 32.021 ns/op 28.145 ns/op 1.14
intersect bitArray bitLen 128 27.550 ns/op 25.046 ns/op 1.10
intersect array and set length 128 525.85 ns/op 469.30 ns/op 1.12
bitArray.getTrueBitIndexes() bitLen 128 998.00 ns/op 1.1470 us/op 0.87
bitArray.getTrueBitIndexes() bitLen 248 1.7780 us/op 1.9490 us/op 0.91
bitArray.getTrueBitIndexes() bitLen 512 3.6020 us/op 3.7820 us/op 0.95
Full columns - reconstruct all 6 blobs 271.44 us/op 305.72 us/op 0.89
Full columns - reconstruct half of the blobs out of 6 92.074 us/op 93.762 us/op 0.98
Full columns - reconstruct single blob out of 6 37.809 us/op 30.040 us/op 1.26
Half columns - reconstruct all 6 blobs 255.50 ms/op 235.52 ms/op 1.08
Half columns - reconstruct half of the blobs out of 6 129.01 ms/op 119.02 ms/op 1.08
Half columns - reconstruct single blob out of 6 49.263 ms/op 44.629 ms/op 1.10
Full columns - reconstruct all 10 blobs 347.70 us/op 350.53 us/op 0.99
Full columns - reconstruct half of the blobs out of 10 152.81 us/op 202.27 us/op 0.76
Full columns - reconstruct single blob out of 10 28.119 us/op 35.998 us/op 0.78
Half columns - reconstruct all 10 blobs 424.09 ms/op 390.04 ms/op 1.09
Half columns - reconstruct half of the blobs out of 10 217.01 ms/op 198.50 ms/op 1.09
Half columns - reconstruct single blob out of 10 47.933 ms/op 44.291 ms/op 1.08
Full columns - reconstruct all 20 blobs 783.97 us/op 657.74 us/op 1.19
Full columns - reconstruct half of the blobs out of 20 270.35 us/op 316.49 us/op 0.85
Full columns - reconstruct single blob out of 20 39.621 us/op 39.331 us/op 1.01
Half columns - reconstruct all 20 blobs 844.19 ms/op 779.82 ms/op 1.08
Half columns - reconstruct half of the blobs out of 20 433.58 ms/op 427.59 ms/op 1.01
Half columns - reconstruct single blob out of 20 47.253 ms/op 44.501 ms/op 1.06
Set add up to 64 items then delete first 1.9906 us/op 1.6665 us/op 1.19
OrderedSet add up to 64 items then delete first 2.9785 us/op 2.5391 us/op 1.17
Set add up to 64 items then delete last 2.2804 us/op 1.7757 us/op 1.28
OrderedSet add up to 64 items then delete last 3.3208 us/op 2.5973 us/op 1.28
Set add up to 64 items then delete middle 2.2330 us/op 1.7872 us/op 1.25
OrderedSet add up to 64 items then delete middle 4.8104 us/op 4.3565 us/op 1.10
Set add up to 128 items then delete first 4.5368 us/op 3.4357 us/op 1.32
OrderedSet add up to 128 items then delete first 6.5352 us/op 5.4183 us/op 1.21
Set add up to 128 items then delete last 4.4530 us/op 3.3265 us/op 1.34
OrderedSet add up to 128 items then delete last 6.6676 us/op 4.9802 us/op 1.34
Set add up to 128 items then delete middle 4.3834 us/op 3.3237 us/op 1.32
OrderedSet add up to 128 items then delete middle 13.030 us/op 10.675 us/op 1.22
Set add up to 256 items then delete first 9.9312 us/op 6.7248 us/op 1.48
OrderedSet add up to 256 items then delete first 13.668 us/op 10.807 us/op 1.26
Set add up to 256 items then delete last 8.9549 us/op 6.7073 us/op 1.34
OrderedSet add up to 256 items then delete last 13.865 us/op 10.289 us/op 1.35
Set add up to 256 items then delete middle 8.8517 us/op 6.6128 us/op 1.34
OrderedSet add up to 256 items then delete middle 38.924 us/op 33.268 us/op 1.17
pass gossip attestations to forkchoice per slot 2.4348 ms/op 2.0377 ms/op 1.19
forkChoice updateHead vc 100000 bc 64 eq 0 473.67 us/op 366.75 us/op 1.29
forkChoice updateHead vc 600000 bc 64 eq 0 2.8338 ms/op 2.1864 ms/op 1.30
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7294 ms/op 3.6375 ms/op 1.30
forkChoice updateHead vc 600000 bc 320 eq 0 2.8377 ms/op 2.1948 ms/op 1.29
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9213 ms/op 2.2232 ms/op 1.31
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1365 ms/op 2.8417 ms/op 1.10
forkChoice updateHead vc 600000 bc 64 eq 1000 3.2673 ms/op 3.0663 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 10000 3.3876 ms/op 4.3265 ms/op 0.78
forkChoice updateHead vc 600000 bc 64 eq 300000 7.9818 ms/op 7.5716 ms/op 1.05
computeDeltas 1400000 validators 0% inactive 11.905 ms/op 13.056 ms/op 0.91
computeDeltas 1400000 validators 10% inactive 10.837 ms/op 12.305 ms/op 0.88
computeDeltas 1400000 validators 20% inactive 10.212 ms/op 11.850 ms/op 0.86
computeDeltas 1400000 validators 50% inactive 7.6396 ms/op 8.4943 ms/op 0.90
computeDeltas 2100000 validators 0% inactive 17.909 ms/op 19.244 ms/op 0.93
computeDeltas 2100000 validators 10% inactive 16.633 ms/op 18.988 ms/op 0.88
computeDeltas 2100000 validators 20% inactive 16.118 ms/op 17.995 ms/op 0.90
computeDeltas 2100000 validators 50% inactive 11.476 ms/op 12.725 ms/op 0.90
altair processAttestation - 250000 vs - 7PWei normalcase 1.8686 ms/op 1.5922 ms/op 1.17
altair processAttestation - 250000 vs - 7PWei worstcase 2.6631 ms/op 2.2843 ms/op 1.17
altair processAttestation - setStatus - 1/6 committees join 110.12 us/op 95.170 us/op 1.16
altair processAttestation - setStatus - 1/3 committees join 219.65 us/op 172.88 us/op 1.27
altair processAttestation - setStatus - 1/2 committees join 308.98 us/op 235.34 us/op 1.31
altair processAttestation - setStatus - 2/3 committees join 391.44 us/op 311.39 us/op 1.26
altair processAttestation - setStatus - 4/5 committees join 544.30 us/op 488.35 us/op 1.11
altair processAttestation - setStatus - 100% committees join 649.37 us/op 568.92 us/op 1.14
altair processBlock - 250000 vs - 7PWei normalcase 3.2968 ms/op 3.0419 ms/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 17.059 ms/op 14.028 ms/op 1.22
altair processBlock - 250000 vs - 7PWei worstcase 22.511 ms/op 22.491 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase hashState 54.172 ms/op 53.369 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5563 ms/op 1.5764 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei worstcase 19.073 ms/op 19.693 ms/op 0.97
altair processEth1Data - 250000 vs - 7PWei normalcase 379.16 us/op 295.61 us/op 1.28
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 5.8250 us/op 5.4370 us/op 1.07
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 36.532 us/op 42.736 us/op 0.85
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 10.079 us/op 13.245 us/op 0.76
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 6.6670 us/op 3.8980 us/op 1.71
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 131.76 us/op 148.38 us/op 0.89
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.7404 ms/op 1.2957 ms/op 1.34
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.1547 ms/op 1.7034 ms/op 1.26
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.0135 ms/op 1.8220 ms/op 1.11
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.4405 ms/op 3.8822 ms/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5448 ms/op 2.1550 ms/op 1.18
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.6503 ms/op 4.2066 ms/op 1.11
Tree 40 250000 create 348.06 ms/op 326.49 ms/op 1.07
Tree 40 250000 get(125000) 120.53 ns/op 87.878 ns/op 1.37
Tree 40 250000 set(125000) 1.1667 us/op 939.27 ns/op 1.24
Tree 40 250000 toArray() 11.982 ms/op 10.760 ms/op 1.11
Tree 40 250000 iterate all - toArray() + loop 12.034 ms/op 10.692 ms/op 1.13
Tree 40 250000 iterate all - get(i) 40.284 ms/op 32.107 ms/op 1.25
Array 250000 create 2.3426 ms/op 1.9959 ms/op 1.17
Array 250000 clone - spread 765.67 us/op 615.17 us/op 1.24
Array 250000 get(125000) 0.33300 ns/op 0.51800 ns/op 0.64
Array 250000 set(125000) 0.34200 ns/op 0.52400 ns/op 0.65
Array 250000 iterate all - loop 59.525 us/op 56.656 us/op 1.05
phase0 afterProcessEpoch - 250000 vs - 7PWei 39.523 ms/op 38.487 ms/op 1.03
Array.fill - length 1000000 2.7236 ms/op 1.8497 ms/op 1.47
Array push - length 1000000 10.068 ms/op 6.7931 ms/op 1.48
Array.get 0.20610 ns/op 0.19625 ns/op 1.05
Uint8Array.get 0.21580 ns/op 0.19954 ns/op 1.08
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.935 ms/op 11.055 ms/op 1.44
altair processEpoch - mainnet_e81889 242.46 ms/op 233.82 ms/op 1.04
mainnet_e81889 - altair beforeProcessEpoch 17.531 ms/op 13.749 ms/op 1.28
mainnet_e81889 - altair processJustificationAndFinalization 5.1630 us/op 5.3560 us/op 0.96
mainnet_e81889 - altair processInactivityUpdates 3.6921 ms/op 3.3345 ms/op 1.11
mainnet_e81889 - altair processRewardsAndPenalties 17.369 ms/op 21.215 ms/op 0.82
mainnet_e81889 - altair processRegistryUpdates 615.00 ns/op 785.00 ns/op 0.78
mainnet_e81889 - altair processSlashings 157.00 ns/op 359.00 ns/op 0.44
mainnet_e81889 - altair processEth1DataReset 154.00 ns/op 356.00 ns/op 0.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.8769 ms/op 1.6296 ms/op 1.15
mainnet_e81889 - altair processSlashingsReset 780.00 ns/op 946.00 ns/op 0.82
mainnet_e81889 - altair processRandaoMixesReset 1.0370 us/op 1.3000 us/op 0.80
mainnet_e81889 - altair processHistoricalRootsUpdate 159.00 ns/op 365.00 ns/op 0.44
mainnet_e81889 - altair processParticipationFlagUpdates 478.00 ns/op 694.00 ns/op 0.69
mainnet_e81889 - altair processSyncCommitteeUpdates 128.00 ns/op 337.00 ns/op 0.38
mainnet_e81889 - altair afterProcessEpoch 42.843 ms/op 41.612 ms/op 1.03
capella processEpoch - mainnet_e217614 734.74 ms/op 742.60 ms/op 0.99
mainnet_e217614 - capella beforeProcessEpoch 73.041 ms/op 53.538 ms/op 1.36
mainnet_e217614 - capella processJustificationAndFinalization 5.5730 us/op 5.0310 us/op 1.11
mainnet_e217614 - capella processInactivityUpdates 15.921 ms/op 10.792 ms/op 1.48
mainnet_e217614 - capella processRewardsAndPenalties 100.86 ms/op 97.502 ms/op 1.03
mainnet_e217614 - capella processRegistryUpdates 5.6640 us/op 4.8390 us/op 1.17
mainnet_e217614 - capella processSlashings 158.00 ns/op 383.00 ns/op 0.41
mainnet_e217614 - capella processEth1DataReset 158.00 ns/op 392.00 ns/op 0.40
mainnet_e217614 - capella processEffectiveBalanceUpdates 16.886 ms/op 5.4102 ms/op 3.12
mainnet_e217614 - capella processSlashingsReset 780.00 ns/op 1.1990 us/op 0.65
mainnet_e217614 - capella processRandaoMixesReset 1.0580 us/op 1.3360 us/op 0.79
mainnet_e217614 - capella processHistoricalRootsUpdate 159.00 ns/op 365.00 ns/op 0.44
mainnet_e217614 - capella processParticipationFlagUpdates 491.00 ns/op 680.00 ns/op 0.72
mainnet_e217614 - capella afterProcessEpoch 109.96 ms/op 106.39 ms/op 1.03
phase0 processEpoch - mainnet_e58758 235.75 ms/op 231.79 ms/op 1.02
mainnet_e58758 - phase0 beforeProcessEpoch 50.969 ms/op 48.574 ms/op 1.05
mainnet_e58758 - phase0 processJustificationAndFinalization 5.1960 us/op 5.0540 us/op 1.03
mainnet_e58758 - phase0 processRewardsAndPenalties 17.502 ms/op 17.978 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 2.6860 us/op 2.4710 us/op 1.09
mainnet_e58758 - phase0 processSlashings 222.00 ns/op 379.00 ns/op 0.59
mainnet_e58758 - phase0 processEth1DataReset 156.00 ns/op 381.00 ns/op 0.41
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 907.54 us/op 879.92 us/op 1.03
mainnet_e58758 - phase0 processSlashingsReset 859.00 ns/op 1.0980 us/op 0.78
mainnet_e58758 - phase0 processRandaoMixesReset 1.0400 us/op 1.2010 us/op 0.87
mainnet_e58758 - phase0 processHistoricalRootsUpdate 168.00 ns/op 443.00 ns/op 0.38
mainnet_e58758 - phase0 processParticipationRecordUpdates 831.00 ns/op 1.4440 us/op 0.58
mainnet_e58758 - phase0 afterProcessEpoch 34.409 ms/op 31.875 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2495 ms/op 1.4895 ms/op 0.84
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9338 ms/op 1.5946 ms/op 1.21
altair processInactivityUpdates - 250000 normalcase 12.358 ms/op 10.400 ms/op 1.19
altair processInactivityUpdates - 250000 worstcase 12.089 ms/op 9.6307 ms/op 1.26
phase0 processRegistryUpdates - 250000 normalcase 4.7460 us/op 4.1790 us/op 1.14
phase0 processRegistryUpdates - 250000 badcase_full_deposits 188.84 us/op 243.01 us/op 0.78
phase0 processRegistryUpdates - 250000 worstcase 0.5 67.639 ms/op 63.454 ms/op 1.07
altair processRewardsAndPenalties - 250000 normalcase 16.534 ms/op 13.135 ms/op 1.26
altair processRewardsAndPenalties - 250000 worstcase 15.325 ms/op 18.518 ms/op 0.83
phase0 getAttestationDeltas - 250000 normalcase 6.7651 ms/op 5.5053 ms/op 1.23
phase0 getAttestationDeltas - 250000 worstcase 6.5087 ms/op 5.0546 ms/op 1.29
phase0 processSlashings - 250000 worstcase 75.944 us/op 92.116 us/op 0.82
altair processSyncCommitteeUpdates - 250000 10.684 ms/op 9.2651 ms/op 1.15
BeaconState.hashTreeRoot - No change 191.00 ns/op 415.00 ns/op 0.46
BeaconState.hashTreeRoot - 1 full validator 70.406 us/op 87.306 us/op 0.81
BeaconState.hashTreeRoot - 32 full validator 903.69 us/op 980.96 us/op 0.92
BeaconState.hashTreeRoot - 512 full validator 7.6764 ms/op 6.5908 ms/op 1.16
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 103.24 us/op 93.423 us/op 1.11
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.3155 ms/op 1.5169 ms/op 1.53
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.047 ms/op 13.433 ms/op 1.34
BeaconState.hashTreeRoot - 1 balances 66.129 us/op 73.836 us/op 0.90
BeaconState.hashTreeRoot - 32 balances 674.27 us/op 801.90 us/op 0.84
BeaconState.hashTreeRoot - 512 balances 5.9201 ms/op 4.8058 ms/op 1.23
BeaconState.hashTreeRoot - 250000 balances 119.71 ms/op 131.01 ms/op 0.91
aggregationBits - 2048 els - zipIndexesInBitList 20.430 us/op 19.233 us/op 1.06
regular array get 100000 times 23.960 us/op 22.771 us/op 1.05
wrappedArray get 100000 times 23.928 us/op 22.746 us/op 1.05
arrayWithProxy get 100000 times 13.366 ms/op 10.347 ms/op 1.29
ssz.Root.equals 23.215 ns/op 21.803 ns/op 1.06
byteArrayEquals 22.806 ns/op 25.063 ns/op 0.91
Buffer.compare 9.7090 ns/op 9.1360 ns/op 1.06
processSlot - 1 slots 11.709 us/op 9.8770 us/op 1.19
processSlot - 32 slots 2.4403 ms/op 2.4299 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.3531 ms/op 1.9564 ms/op 2.23
getCommitteeAssignments - req 1 vs - 250000 vc 1.8400 ms/op 1.6907 ms/op 1.09
getCommitteeAssignments - req 100 vs - 250000 vc 3.5865 ms/op 3.4355 ms/op 1.04
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8344 ms/op 3.6835 ms/op 1.04
findModifiedValidators - 10000 modified validators 552.03 ms/op 407.46 ms/op 1.35
findModifiedValidators - 1000 modified validators 314.08 ms/op 328.56 ms/op 0.96
findModifiedValidators - 100 modified validators 285.24 ms/op 240.79 ms/op 1.18
findModifiedValidators - 10 modified validators 183.45 ms/op 196.03 ms/op 0.94
findModifiedValidators - 1 modified validators 128.87 ms/op 129.23 ms/op 1.00
findModifiedValidators - no difference 154.41 ms/op 103.89 ms/op 1.49
migrate state 1500000 validators, 3400 modified, 2000 new 963.22 ms/op 903.43 ms/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1400 ns/op 5.8600 ns/op 0.71
state getBlockRootAtSlot - 250000 vs - 7PWei 594.12 ns/op 481.21 ns/op 1.23
computeProposerIndex 100000 validators 1.5290 ms/op 1.3262 ms/op 1.15
getNextSyncCommitteeIndices 1000 validators 120.04 ms/op 98.630 ms/op 1.22
getNextSyncCommitteeIndices 10000 validators 119.90 ms/op 98.913 ms/op 1.21
getNextSyncCommitteeIndices 100000 validators 119.90 ms/op 98.383 ms/op 1.22
computeProposers - vc 250000 641.51 us/op 545.56 us/op 1.18
computeEpochShuffling - vc 250000 40.318 ms/op 38.770 ms/op 1.04
getNextSyncCommittee - vc 250000 10.143 ms/op 9.2830 ms/op 1.09
nodejs block root to RootHex using toHex 147.16 ns/op 115.39 ns/op 1.28
nodejs block root to RootHex using toRootHex 80.043 ns/op 75.982 ns/op 1.05
nodejs fromHex(blob) 413.36 us/op 259.74 us/op 1.59
nodejs fromHexInto(blob) 679.95 us/op 702.04 us/op 0.97
nodejs block root to RootHex using the deprecated toHexString 526.53 ns/op 529.30 ns/op 0.99
nodejs byteArrayEquals 32 bytes (block root) 27.827 ns/op 28.045 ns/op 0.99
nodejs byteArrayEquals 48 bytes (pubkey) 39.768 ns/op 41.404 ns/op 0.96
nodejs byteArrayEquals 96 bytes (signature) 38.283 ns/op 37.858 ns/op 1.01
nodejs byteArrayEquals 1024 bytes 63.060 ns/op 42.172 ns/op 1.50
nodejs byteArrayEquals 131072 bytes (blob) 1.8281 us/op 1.7469 us/op 1.05
browser block root to RootHex using toHex 155.93 ns/op 148.43 ns/op 1.05
browser block root to RootHex using toRootHex 147.34 ns/op 135.66 ns/op 1.09
browser fromHex(blob) 1.1752 ms/op 982.52 us/op 1.20
browser fromHexInto(blob) 687.09 us/op 674.16 us/op 1.02
browser block root to RootHex using the deprecated toHexString 355.90 ns/op 367.13 ns/op 0.97
browser byteArrayEquals 32 bytes (block root) 30.189 ns/op 33.547 ns/op 0.90
browser byteArrayEquals 48 bytes (pubkey) 42.208 ns/op 39.941 ns/op 1.06
browser byteArrayEquals 96 bytes (signature) 82.697 ns/op 74.737 ns/op 1.11
browser byteArrayEquals 1024 bytes 774.68 ns/op 747.04 ns/op 1.04
browser byteArrayEquals 131072 bytes (blob) 97.821 us/op 93.351 us/op 1.05

by benchmarkbot/action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant