Skip to content

Commit

Permalink
chore: update nodejs to latest 22 (#6729)
Browse files Browse the repository at this point in the history
* Upgrade node js version to 22

* Update node types

* Revert action config

* Add package from git hash

* Fix the build error

* Update the docs for node-22

* Update docker version for Nodejs to 22

* Update package.json

* Update package.json

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* Update readme docs

* Add word in dictionary

* Add word in dictionary

---------

Co-authored-by: Cayman <caymannava@gmail.com>
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
  • Loading branch information
3 people authored May 24, 2024
1 parent 1831d47 commit deafa4f
Show file tree
Hide file tree
Showing 26 changed files with 62 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// Upgrade the container to Node 22
// https://github.com/ChainSafe/lodestar/issues/6742
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
"features": {
"ghcr.io/devcontainers/features/python:1": {}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
check-latest: true
cache: yarn
- name: Node.js version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
sudo apt-get install -y build-essential
- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22
- run: |
mkdir -p dist
yarn global add caxa@3.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: yarn
- name: Node.js version
id: node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
check-latest: true
cache: yarn

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: "https://registry.npmjs.org"
check-latest: true
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22

- name: Generate changelog
run: node scripts/generate_changelog.mjs ${{ needs.tag.outputs.prev_tag }} ${{ needs.tag.outputs.tag }} CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22

- name: Generate changelog
run: node scripts/generate_changelog.mjs ${{ needs.tag.outputs.prev_tag }} ${{ needs.tag.outputs.tag }} CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-sim-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
check-latest: true
cache: yarn
- name: Node.js version
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22

sim-test-multifork:
name: Multifork sim test
Expand All @@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22
- name: Load env variables
uses: ./.github/actions/dotenv
- name: Download required docker images before running tests
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22
- name: Load env variables
uses: ./.github/actions/dotenv
- name: Download required docker images before running tests
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22
- name: Load env variables
uses: ./.github/actions/dotenv
- name: Download required docker images before running tests
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22
- name: Load env variables
uses: ./.github/actions/dotenv
- name: Download required docker images before running tests
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
with:
node: 20
node: 22
- name: Load env variables
uses: ./.github/actions/dotenv
- name: Download required docker images before running tests
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20]
node: [22]
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@v4
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20]
node: [22]
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20]
node: [22]
steps:
- uses: actions/checkout@v4

Expand All @@ -95,7 +95,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20]
node: [22]
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20]
node: [22]
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@v4
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20]
node: [22]
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@v4
Expand All @@ -195,7 +195,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20]
node: [22]
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup-and-build"
Expand Down
2 changes: 2 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Lerna
MEV
MacOS
Metamask
ModuleNotFoundError
Monorepo
NPM
NVM
Expand Down Expand Up @@ -125,6 +126,7 @@ devcontainer
devnet
devnets
devtools
distutils
eg
enodes
enum
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# --platform=$BUILDPLATFORM is used build javascript source with host arch
# Otherwise TS builds on emulated archs and can be extremely slow (+1h)
FROM --platform=${BUILDPLATFORM:-amd64} node:20-alpine as build_src
FROM --platform=${BUILDPLATFORM:-amd64} node:22-alpine as build_src
ARG COMMIT
WORKDIR /usr/app
RUN apk update && apk add --no-cache g++ make python3 py3-setuptools && rm -rf /var/cache/apk/*
Expand All @@ -21,7 +21,7 @@ RUN cd packages/cli && GIT_COMMIT=${COMMIT} yarn write-git-data

# Copy built src + node_modules to build native packages for archs different than host.
# Note: This step is redundant for the host arch
FROM node:20-alpine as build_deps
FROM node:22-alpine as build_deps
WORKDIR /usr/app
RUN apk update && apk add --no-cache g++ make python3 && rm -rf /var/cache/apk/*

Expand All @@ -35,7 +35,7 @@ RUN cd node_modules/classic-level && yarn rebuild

# Copy built src + node_modules to a new layer to prune unnecessary fs
# Previous layer weights 7.25GB, while this final 488MB (as of Oct 2020)
FROM node:20-alpine
FROM node:22-alpine
WORKDIR /usr/app
COPY --from=build_deps /usr/app .

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/chainsafe/lodestar?color=blue&label=Docker&sort=semver)](https://hub.docker.com/r/chainsafe/lodestar)
[![Eth Consensus Spec v1.4.0](https://img.shields.io/badge/ETH%20consensus--spec-1.4.0-blue)](https://github.com/ethereum/consensus-specs/releases/tag/v1.4.0)
![ES Version](https://img.shields.io/badge/ES-2021-yellow)
![Node Version](https://img.shields.io/badge/node-20.x-green)
![Node Version](https://img.shields.io/badge/node-22.x-green)
[![codecov](https://codecov.io/gh/ChainSafe/lodestar/graph/badge.svg)](https://codecov.io/gh/ChainSafe/lodestar)
[![gitpoap badge](https://public-api.gitpoap.io/v1/repo/ChainSafe/lodestar/badge)](https://www.gitpoap.io/gh/ChainSafe/lodestar)

Expand Down
12 changes: 11 additions & 1 deletion docs/pages/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Docker is the recommended setup for Lodestar. Use our [Lodestar Quickstart scrip

### Prerequisites

Make sure to have [Yarn installed](https://classic.yarnpkg.com/en/docs/install). It is also recommended to [install NVM (Node Version Manager)](https://github.com/nvm-sh/nvm) and use the LTS version (currently v20) of [NodeJS](https://nodejs.org/en/).
Make sure to have [Yarn installed](https://classic.yarnpkg.com/en/docs/install). It is also recommended to [install NVM (Node Version Manager)](https://github.com/nvm-sh/nvm) and use the LTS version (currently v22) of [NodeJS](https://nodejs.org/en/).

:::info
NodeJS versions older than the current LTS are not supported by Lodestar. We recommend running the latest Node LTS.
Expand Down Expand Up @@ -83,6 +83,16 @@ Lodestar should now be ready for use.

See [Command Line Reference](./../reference/cli.md) for further information.

### Known Issues

**ModuleNotFoundError: No module named 'distutils'**

If you stump upon this issue while running Yarn, it's because Python 3.12 had removed `distutils` package. That package is required for node build tool. You can install it with following command.

```bash
pip3 install setuptools --force-reinstall --user
```

## Install from NPM [not recommended]

:::danger
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/tools/core-dumps.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ which llvm-config
/opt/homebrew/opt/llvm/bin/llvm-config # if this is not what comes up restart the shell
$ npm install -g llnode
$ llnode
(lldb) plugin load '/Users/ninja_user/.nvm/versions/node/v20.5.1/lib/node_modules/llnode/llnode.dylib'
(lldb) plugin load '/Users/ninja_user/.nvm/versions/node/v22.1.0/lib/node_modules/llnode/llnode.dylib'
(lldb) settings set prompt '(llnode) '
(llnode)
```
Expand Down Expand Up @@ -58,7 +58,7 @@ Once you collect the core dump you can load it into `llnode` for debugging.
$ llnode -f /path/to/node_debug -c /Users/ninja_user/coredumps/node.coredump
(lldb) target create "node_debug" --core "node.coredump"
Core file '/Users/ninja_user/coredumps/node.coredump' (x86_64) was loaded.
(lldb) plugin load '/Users/ninja_user/.nvm/versions/node/v20.5.1/lib/node_modules/llnode/llnode.dylib'
(lldb) plugin load '/Users/ninja_user/.nvm/versions/node/v22.1.0/lib/node_modules/llnode/llnode.dylib'
(lldb) settings set prompt '(llnode) '
(llnode)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/tools/heap-dumps.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ $ git clone https://github.com/nodejs/node.git
$ cd node

# Use whichever version of node you prefer
$ git checkout v20.10.0
$ git checkout v22.1.0
$ ./configure --debug

# This command only builds the debug version of node and assumes
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "root",
"private": true,
"engines": {
"node": ">=20.1.0 <21"
"node": ">=20.1.0 <21 || >=22 <23"
},
"workspaces": [
"packages/*"
Expand Down Expand Up @@ -48,7 +48,7 @@
"@chainsafe/eslint-plugin-node": "^11.2.3",
"@dapplion/benchmark": "^0.2.4",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.28",
"@types/node": "^20.12.8",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vitest/browser": "^1.6.0",
Expand Down Expand Up @@ -91,6 +91,7 @@
"@puppeteer/browsers": "^2.1.0",
"dns-over-http-resolver": "^2.1.1",
"loupe": "^2.3.6",
"vite": "^5.2.11"
"vite": "^5.2.11",
"testcontainers/**/nan": "^2.19.0"
}
}
2 changes: 1 addition & 1 deletion packages/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)](https://discord.gg/aMxzVcr)
[![ETH Beacon APIs Spec v2.1.0](https://img.shields.io/badge/ETH%20beacon--APIs-2.1.0-blue)](https://github.com/ethereum/beacon-APIs/releases/tag/v2.1.0)
![ES Version](https://img.shields.io/badge/ES-2021-yellow)
![Node Version](https://img.shields.io/badge/node-20.x-green)
![Node Version](https://img.shields.io/badge/node-22.x-green)

> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)](https://discord.gg/aMxzVcr)
[![Eth Consensus Spec v1.4.0](https://img.shields.io/badge/ETH%20consensus--spec-1.4.0-blue)](https://github.com/ethereum/consensus-specs/releases/tag/v1.4.0)
![ES Version](https://img.shields.io/badge/ES-2021-yellow)
![Node Version](https://img.shields.io/badge/node-20.x-green)
![Node Version](https://img.shields.io/badge/node-22.x-green)

> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
Expand Down
2 changes: 1 addition & 1 deletion packages/params/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Eth Consensus Spec v1.4.0](https://img.shields.io/badge/ETH%20consensus--spec-1.4.0-blue)](https://github.com/ethereum/consensus-specs/releases/tag/v1.4.0)
![ES Version](https://img.shields.io/badge/ES-2021-yellow)
![Node Version](https://img.shields.io/badge/node-20.x-green)
![Node Version](https://img.shields.io/badge/node-22.x-green)

> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
Expand Down
2 changes: 1 addition & 1 deletion packages/prover/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)](https://discord.gg/aMxzVcr)
[![ETH Beacon APIs Spec v2.1.0](https://img.shields.io/badge/ETH%20beacon--APIs-2.1.0-blue)](https://github.com/ethereum/beacon-APIs/releases/tag/v2.1.0)
![ES Version](https://img.shields.io/badge/ES-2021-yellow)
![Node Version](https://img.shields.io/badge/node-20.x-green)
![Node Version](https://img.shields.io/badge/node-22.x-green)

> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
Expand Down
2 changes: 1 addition & 1 deletion packages/reqresp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)](https://discord.gg/aMxzVcr)
[![ETH Beacon APIs Spec v2.1.0](https://img.shields.io/badge/ETH%20beacon--APIs-2.1.0-blue)](https://github.com/ethereum/beacon-APIs/releases/tag/v2.1.0)
![ES Version](https://img.shields.io/badge/ES-2021-yellow)
![Node Version](https://img.shields.io/badge/node-20.x-green)
![Node Version](https://img.shields.io/badge/node-22.x-green)

> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
Expand Down
2 changes: 1 addition & 1 deletion packages/types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Eth Consensus Spec v1.4.0](https://img.shields.io/badge/ETH%20consensus--spec-1.4.0-blue)](https://github.com/ethereum/consensus-specs/releases/tag/v1.4.0)
![ES Version](https://img.shields.io/badge/ES-2021-yellow)
![Node Version](https://img.shields.io/badge/node-20.x-green)
![Node Version](https://img.shields.io/badge/node-22.x-green)

> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
Expand Down
2 changes: 1 addition & 1 deletion packages/validator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)](https://discord.gg/aMxzVcr)
[![Eth Consensus Spec v1.4.0](https://img.shields.io/badge/ETH%20consensus--spec-1.4.0-blue)](https://github.com/ethereum/consensus-specs/releases/tag/v1.4.0)
![ES Version](https://img.shields.io/badge/ES-2021-yellow)
![Node Version](https://img.shields.io/badge/node-20.x-green)
![Node Version](https://img.shields.io/badge/node-22.x-green)

> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
Expand Down
Loading

1 comment on commit deafa4f

@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: deafa4f Previous: 95ce044 Ratio
Map get x1000 6.5270 ns/op 0.88200 ns/op 7.40

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: deafa4f Previous: 95ce044 Ratio
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.2690 us/op 19.744 us/op 0.27
BeaconState.hashTreeRoot - No change 255.00 ns/op 1.1900 us/op 0.21
Full benchmark results
Benchmark suite Current: deafa4f Previous: 95ce044 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0478 ms/op 933.55 us/op 1.12
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 63.846 us/op 68.400 us/op 0.93
BLS verify - blst-native 1.2026 ms/op 1.1353 ms/op 1.06
BLS verifyMultipleSignatures 3 - blst-native 2.5247 ms/op 2.2036 ms/op 1.15
BLS verifyMultipleSignatures 8 - blst-native 5.6040 ms/op 4.7314 ms/op 1.18
BLS verifyMultipleSignatures 32 - blst-native 19.915 ms/op 18.048 ms/op 1.10
BLS verifyMultipleSignatures 64 - blst-native 39.355 ms/op 34.439 ms/op 1.14
BLS verifyMultipleSignatures 128 - blst-native 76.390 ms/op 67.997 ms/op 1.12
BLS deserializing 10000 signatures 883.56 ms/op 809.90 ms/op 1.09
BLS deserializing 100000 signatures 9.1039 s/op 8.1736 s/op 1.11
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3097 ms/op 1.1622 ms/op 1.13
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4718 ms/op 1.2877 ms/op 1.14
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3519 ms/op 2.0240 ms/op 1.16
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.5246 ms/op 3.0193 ms/op 1.17
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.4940 ms/op 4.9662 ms/op 1.11
BLS aggregatePubkeys 32 - blst-native 28.634 us/op 25.203 us/op 1.14
BLS aggregatePubkeys 128 - blst-native 109.31 us/op 95.715 us/op 1.14
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 76.152 ms/op 47.724 ms/op 1.60
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 54.167 ms/op 38.568 ms/op 1.40
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 42.444 ms/op 36.910 ms/op 1.15
getSlashingsAndExits - default max 109.98 us/op 203.36 us/op 0.54
getSlashingsAndExits - 2k 395.68 us/op 390.06 us/op 1.01
proposeBlockBody type=full, size=empty 6.3662 ms/op 5.5383 ms/op 1.15
isKnown best case - 1 super set check 323.00 ns/op 667.00 ns/op 0.48
isKnown normal case - 2 super set checks 300.00 ns/op 642.00 ns/op 0.47
isKnown worse case - 16 super set checks 299.00 ns/op 643.00 ns/op 0.47
InMemoryCheckpointStateCache - add get delete 5.1290 us/op 8.3540 us/op 0.61
validate api signedAggregateAndProof - struct 2.5601 ms/op 2.0093 ms/op 1.27
validate gossip signedAggregateAndProof - struct 2.5489 ms/op 2.0311 ms/op 1.25
validate gossip attestation - vc 640000 1.2869 ms/op 1.1334 ms/op 1.14
batch validate gossip attestation - vc 640000 - chunk 32 169.60 us/op 147.52 us/op 1.15
batch validate gossip attestation - vc 640000 - chunk 64 148.50 us/op 130.86 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 128 142.24 us/op 124.59 us/op 1.14
batch validate gossip attestation - vc 640000 - chunk 256 132.75 us/op 114.86 us/op 1.16
pickEth1Vote - no votes 1.1041 ms/op 876.71 us/op 1.26
pickEth1Vote - max votes 7.6639 ms/op 8.6771 ms/op 0.88
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.228 ms/op 14.971 ms/op 0.82
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.417 ms/op 23.169 ms/op 0.71
pickEth1Vote - Eth1Data fastSerialize value x2048 500.43 us/op 410.90 us/op 1.22
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.0263 ms/op 4.7140 ms/op 0.85
bytes32 toHexString 461.00 ns/op 591.00 ns/op 0.78
bytes32 Buffer.toString(hex) 249.00 ns/op 462.00 ns/op 0.54
bytes32 Buffer.toString(hex) from Uint8Array 374.00 ns/op 594.00 ns/op 0.63
bytes32 Buffer.toString(hex) + 0x 252.00 ns/op 454.00 ns/op 0.56
Object access 1 prop 0.13400 ns/op 0.32300 ns/op 0.41
Map access 1 prop 0.13900 ns/op 0.31100 ns/op 0.45
Object get x1000 5.9590 ns/op 5.0070 ns/op 1.19
Map get x1000 6.5270 ns/op 0.88200 ns/op 7.40
Object set x1000 39.349 ns/op 26.278 ns/op 1.50
Map set x1000 24.025 ns/op 17.754 ns/op 1.35
Return object 10000 times 0.29580 ns/op 0.22900 ns/op 1.29
Throw Error 10000 times 3.3818 us/op 2.5931 us/op 1.30
fastMsgIdFn sha256 / 200 bytes 2.2030 us/op 2.0050 us/op 1.10
fastMsgIdFn h32 xxhash / 200 bytes 234.00 ns/op 423.00 ns/op 0.55
fastMsgIdFn h64 xxhash / 200 bytes 270.00 ns/op 467.00 ns/op 0.58
fastMsgIdFn sha256 / 1000 bytes 7.3950 us/op 5.9520 us/op 1.24
fastMsgIdFn h32 xxhash / 1000 bytes 380.00 ns/op 530.00 ns/op 0.72
fastMsgIdFn h64 xxhash / 1000 bytes 345.00 ns/op 528.00 ns/op 0.65
fastMsgIdFn sha256 / 10000 bytes 64.835 us/op 50.133 us/op 1.29
fastMsgIdFn h32 xxhash / 10000 bytes 1.8690 us/op 1.8720 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.1830 us/op 1.3450 us/op 0.88
send data - 1000 256B messages 12.219 ms/op 11.263 ms/op 1.08
send data - 1000 512B messages 16.338 ms/op 13.547 ms/op 1.21
send data - 1000 1024B messages 26.492 ms/op 21.182 ms/op 1.25
send data - 1000 1200B messages 26.047 ms/op 23.629 ms/op 1.10
send data - 1000 2048B messages 31.733 ms/op 30.360 ms/op 1.05
send data - 1000 4096B messages 31.717 ms/op 27.404 ms/op 1.16
send data - 1000 16384B messages 71.876 ms/op 69.336 ms/op 1.04
send data - 1000 65536B messages 216.01 ms/op 279.57 ms/op 0.77
enrSubnets - fastDeserialize 64 bits 1.2580 us/op 1.0920 us/op 1.15
enrSubnets - ssz BitVector 64 bits 382.00 ns/op 557.00 ns/op 0.69
enrSubnets - fastDeserialize 4 bits 145.00 ns/op 322.00 ns/op 0.45
enrSubnets - ssz BitVector 4 bits 359.00 ns/op 556.00 ns/op 0.65
prioritizePeers score -10:0 att 32-0.1 sync 2-0 160.21 us/op 148.72 us/op 1.08
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 175.56 us/op 195.89 us/op 0.90
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 237.63 us/op 223.69 us/op 1.06
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 399.90 us/op 375.70 us/op 1.06
prioritizePeers score 0:0 att 64-1 sync 4-1 798.34 us/op 437.38 us/op 1.83
array of 16000 items push then shift 1.6839 us/op 1.3091 us/op 1.29
LinkedList of 16000 items push then shift 7.5460 ns/op 6.0850 ns/op 1.24
array of 16000 items push then pop 123.42 ns/op 90.811 ns/op 1.36
LinkedList of 16000 items push then pop 7.2140 ns/op 6.0110 ns/op 1.20
array of 24000 items push then shift 2.4641 us/op 1.9852 us/op 1.24
LinkedList of 24000 items push then shift 7.3790 ns/op 6.1410 ns/op 1.20
array of 24000 items push then pop 163.86 ns/op 124.78 ns/op 1.31
LinkedList of 24000 items push then pop 7.1140 ns/op 5.9720 ns/op 1.19
intersect bitArray bitLen 8 6.4880 ns/op 5.2960 ns/op 1.23
intersect array and set length 8 48.357 ns/op 48.593 ns/op 1.00
intersect bitArray bitLen 128 29.969 ns/op 29.571 ns/op 1.01
intersect array and set length 128 715.87 ns/op 681.86 ns/op 1.05
bitArray.getTrueBitIndexes() bitLen 128 1.9610 us/op 1.3580 us/op 1.44
bitArray.getTrueBitIndexes() bitLen 248 2.9740 us/op 2.0690 us/op 1.44
bitArray.getTrueBitIndexes() bitLen 512 7.3230 us/op 3.7430 us/op 1.96
Buffer.concat 32 items 895.00 ns/op 1.0230 us/op 0.87
Uint8Array.set 32 items 1.4380 us/op 1.6310 us/op 0.88
Buffer.copy 1.6150 us/op
Uint8Array.set - with subarray 2.4230 us/op
Uint8Array.set - without subarray 1.3990 us/op
Set add up to 64 items then delete first 2.2515 us/op 1.7949 us/op 1.25
OrderedSet add up to 64 items then delete first 3.3882 us/op 2.7578 us/op 1.23
Set add up to 64 items then delete last 2.5705 us/op 2.0535 us/op 1.25
OrderedSet add up to 64 items then delete last 4.0069 us/op 3.1094 us/op 1.29
Set add up to 64 items then delete middle 2.5888 us/op 2.0412 us/op 1.27
OrderedSet add up to 64 items then delete middle 6.2200 us/op 4.2191 us/op 1.47
Set add up to 128 items then delete first 5.9430 us/op 4.0645 us/op 1.46
OrderedSet add up to 128 items then delete first 9.6631 us/op 6.3470 us/op 1.52
Set add up to 128 items then delete last 6.0966 us/op 4.0704 us/op 1.50
OrderedSet add up to 128 items then delete last 7.6675 us/op 5.6515 us/op 1.36
Set add up to 128 items then delete middle 4.8742 us/op 3.6329 us/op 1.34
OrderedSet add up to 128 items then delete middle 13.558 us/op 10.394 us/op 1.30
Set add up to 256 items then delete first 10.817 us/op 7.3421 us/op 1.47
OrderedSet add up to 256 items then delete first 17.021 us/op 12.814 us/op 1.33
Set add up to 256 items then delete last 10.023 us/op 8.9208 us/op 1.12
OrderedSet add up to 256 items then delete last 15.706 us/op 14.739 us/op 1.07
Set add up to 256 items then delete middle 10.131 us/op 7.8054 us/op 1.30
OrderedSet add up to 256 items then delete middle 39.787 us/op 36.154 us/op 1.10
transfer serialized Status (84 B) 1.3320 us/op 1.8550 us/op 0.72
copy serialized Status (84 B) 1.1180 us/op 1.4940 us/op 0.75
transfer serialized SignedVoluntaryExit (112 B) 1.4220 us/op 1.9340 us/op 0.74
copy serialized SignedVoluntaryExit (112 B) 1.1250 us/op 1.5200 us/op 0.74
transfer serialized ProposerSlashing (416 B) 1.5820 us/op 2.4010 us/op 0.66
copy serialized ProposerSlashing (416 B) 1.3490 us/op 2.0250 us/op 0.67
transfer serialized Attestation (485 B) 1.6730 us/op 2.2210 us/op 0.75
copy serialized Attestation (485 B) 1.5900 us/op 2.0280 us/op 0.78
transfer serialized AttesterSlashing (33232 B) 2.0180 us/op 2.2780 us/op 0.89
copy serialized AttesterSlashing (33232 B) 7.7280 us/op 7.8580 us/op 0.98
transfer serialized Small SignedBeaconBlock (128000 B) 2.2570 us/op 2.9800 us/op 0.76
copy serialized Small SignedBeaconBlock (128000 B) 27.857 us/op 34.940 us/op 0.80
transfer serialized Avg SignedBeaconBlock (200000 B) 4.5420 us/op 3.5540 us/op 1.28
copy serialized Avg SignedBeaconBlock (200000 B) 38.792 us/op 57.139 us/op 0.68
transfer serialized BlobsSidecar (524380 B) 3.8050 us/op 5.3390 us/op 0.71
copy serialized BlobsSidecar (524380 B) 174.19 us/op 148.37 us/op 1.17
transfer serialized Big SignedBeaconBlock (1000000 B) 4.6900 us/op 4.6480 us/op 1.01
copy serialized Big SignedBeaconBlock (1000000 B) 188.09 us/op 309.19 us/op 0.61
pass gossip attestations to forkchoice per slot 3.1892 ms/op 3.3913 ms/op 0.94
forkChoice updateHead vc 100000 bc 64 eq 0 569.70 us/op 508.00 us/op 1.12
forkChoice updateHead vc 600000 bc 64 eq 0 3.1762 ms/op 4.3063 ms/op 0.74
forkChoice updateHead vc 1000000 bc 64 eq 0 5.3954 ms/op 5.7017 ms/op 0.95
forkChoice updateHead vc 600000 bc 320 eq 0 3.1262 ms/op 3.3869 ms/op 0.92
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0916 ms/op 3.4448 ms/op 0.90
forkChoice updateHead vc 600000 bc 7200 eq 0 3.8974 ms/op 4.1135 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 1000 10.865 ms/op 10.783 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 10000 10.899 ms/op 11.287 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 300000 14.589 ms/op 42.356 ms/op 0.34
computeDeltas 500000 validators 300 proto nodes 3.9396 ms/op 3.9934 ms/op 0.99
computeDeltas 500000 validators 1200 proto nodes 4.0214 ms/op 3.9173 ms/op 1.03
computeDeltas 500000 validators 7200 proto nodes 3.9363 ms/op 3.7280 ms/op 1.06
computeDeltas 750000 validators 300 proto nodes 6.8017 ms/op 5.8149 ms/op 1.17
computeDeltas 750000 validators 1200 proto nodes 6.1042 ms/op 6.4169 ms/op 0.95
computeDeltas 750000 validators 7200 proto nodes 6.3328 ms/op 5.7637 ms/op 1.10
computeDeltas 1400000 validators 300 proto nodes 12.580 ms/op 11.176 ms/op 1.13
computeDeltas 1400000 validators 1200 proto nodes 11.926 ms/op 11.797 ms/op 1.01
computeDeltas 1400000 validators 7200 proto nodes 11.256 ms/op 12.708 ms/op 0.89
computeDeltas 2100000 validators 300 proto nodes 17.606 ms/op 15.833 ms/op 1.11
computeDeltas 2100000 validators 1200 proto nodes 17.693 ms/op 16.412 ms/op 1.08
computeDeltas 2100000 validators 7200 proto nodes 17.800 ms/op 15.906 ms/op 1.12
altair processAttestation - 250000 vs - 7PWei normalcase 2.2894 ms/op 1.7294 ms/op 1.32
altair processAttestation - 250000 vs - 7PWei worstcase 2.7830 ms/op 2.7068 ms/op 1.03
altair processAttestation - setStatus - 1/6 committees join 100.91 us/op 138.28 us/op 0.73
altair processAttestation - setStatus - 1/3 committees join 191.42 us/op 264.40 us/op 0.72
altair processAttestation - setStatus - 1/2 committees join 282.24 us/op 387.66 us/op 0.73
altair processAttestation - setStatus - 2/3 committees join 364.66 us/op 451.97 us/op 0.81
altair processAttestation - setStatus - 4/5 committees join 494.61 us/op 602.82 us/op 0.82
altair processAttestation - setStatus - 100% committees join 580.58 us/op 812.61 us/op 0.71
altair processBlock - 250000 vs - 7PWei normalcase 5.4490 ms/op 10.263 ms/op 0.53
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.876 ms/op 41.183 ms/op 0.73
altair processBlock - 250000 vs - 7PWei worstcase 39.560 ms/op 34.517 ms/op 1.15
altair processBlock - 250000 vs - 7PWei worstcase hashState 74.553 ms/op 98.026 ms/op 0.76
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0252 ms/op 3.0351 ms/op 0.67
phase0 processBlock - 250000 vs - 7PWei worstcase 28.916 ms/op 33.834 ms/op 0.85
altair processEth1Data - 250000 vs - 7PWei normalcase 302.32 us/op 670.63 us/op 0.45
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.8390 us/op 14.889 us/op 0.39
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 21.052 us/op 43.652 us/op 0.48
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.7030 us/op 23.102 us/op 0.33
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.2690 us/op 19.744 us/op 0.27
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 84.385 us/op 139.87 us/op 0.60
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 707.16 us/op 1.4140 ms/op 0.50
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 894.75 us/op 1.3973 ms/op 0.64
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 910.77 us/op 1.5230 ms/op 0.60
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.1403 ms/op 3.2693 ms/op 0.65
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5803 ms/op 2.1623 ms/op 0.73
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.5485 ms/op 4.6598 ms/op 0.76
Tree 40 250000 create 213.47 ms/op 395.71 ms/op 0.54
Tree 40 250000 get(125000) 141.61 ns/op 149.21 ns/op 0.95
Tree 40 250000 set(125000) 664.14 ns/op 1.3153 us/op 0.50
Tree 40 250000 toArray() 16.043 ms/op 30.081 ms/op 0.53
Tree 40 250000 iterate all - toArray() + loop 16.053 ms/op 28.694 ms/op 0.56
Tree 40 250000 iterate all - get(i) 52.323 ms/op 72.764 ms/op 0.72
MutableVector 250000 create 9.6175 ms/op 11.824 ms/op 0.81
MutableVector 250000 get(125000) 6.1710 ns/op 7.2230 ns/op 0.85
MutableVector 250000 set(125000) 198.46 ns/op 457.97 ns/op 0.43
MutableVector 250000 toArray() 3.8339 ms/op 5.2955 ms/op 0.72
MutableVector 250000 iterate all - toArray() + loop 3.9004 ms/op 5.8304 ms/op 0.67
MutableVector 250000 iterate all - get(i) 1.5468 ms/op 1.4013 ms/op 1.10
Array 250000 create 3.2585 ms/op 5.1650 ms/op 0.63
Array 250000 clone - spread 1.4276 ms/op 1.6866 ms/op 0.85
Array 250000 get(125000) 0.41900 ns/op 1.4440 ns/op 0.29
Array 250000 set(125000) 0.44400 ns/op 1.5290 ns/op 0.29
Array 250000 iterate all - loop 106.44 us/op 170.72 us/op 0.62
effectiveBalanceIncrements clone Uint8Array 300000 31.662 us/op 14.010 us/op 2.26
effectiveBalanceIncrements clone MutableVector 300000 129.00 ns/op 549.00 ns/op 0.23
effectiveBalanceIncrements rw all Uint8Array 300000 203.73 us/op 203.51 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 68.705 ms/op 71.092 ms/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 93.534 ms/op 84.782 ms/op 1.10
phase0 beforeProcessEpoch - 250000 vs - 7PWei 46.868 ms/op 53.434 ms/op 0.88
altair processEpoch - mainnet_e81889 403.90 ms/op 447.02 ms/op 0.90
mainnet_e81889 - altair beforeProcessEpoch 73.837 ms/op 63.406 ms/op 1.16
mainnet_e81889 - altair processJustificationAndFinalization 14.234 us/op 15.368 us/op 0.93
mainnet_e81889 - altair processInactivityUpdates 5.4979 ms/op 5.1160 ms/op 1.07
mainnet_e81889 - altair processRewardsAndPenalties 49.777 ms/op 61.457 ms/op 0.81
mainnet_e81889 - altair processRegistryUpdates 1.7600 us/op 4.5950 us/op 0.38
mainnet_e81889 - altair processSlashings 361.00 ns/op 1.1160 us/op 0.32
mainnet_e81889 - altair processEth1DataReset 283.00 ns/op 856.00 ns/op 0.33
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1812 ms/op 1.1215 ms/op 1.05
mainnet_e81889 - altair processSlashingsReset 2.7320 us/op 4.5010 us/op 0.61
mainnet_e81889 - altair processRandaoMixesReset 3.7630 us/op 5.7800 us/op 0.65
mainnet_e81889 - altair processHistoricalRootsUpdate 321.00 ns/op 1.0370 us/op 0.31
mainnet_e81889 - altair processParticipationFlagUpdates 1.7140 us/op 1.8370 us/op 0.93
mainnet_e81889 - altair processSyncCommitteeUpdates 305.00 ns/op 908.00 ns/op 0.34
mainnet_e81889 - altair afterProcessEpoch 90.853 ms/op 82.428 ms/op 1.10
capella processEpoch - mainnet_e217614 1.4242 s/op 1.5414 s/op 0.92
mainnet_e217614 - capella beforeProcessEpoch 249.99 ms/op 340.40 ms/op 0.73
mainnet_e217614 - capella processJustificationAndFinalization 12.771 us/op 30.366 us/op 0.42
mainnet_e217614 - capella processInactivityUpdates 17.002 ms/op 19.972 ms/op 0.85
mainnet_e217614 - capella processRewardsAndPenalties 231.86 ms/op 329.14 ms/op 0.70
mainnet_e217614 - capella processRegistryUpdates 11.850 us/op 27.688 us/op 0.43
mainnet_e217614 - capella processSlashings 370.00 ns/op 1.9260 us/op 0.19
mainnet_e217614 - capella processEth1DataReset 323.00 ns/op 1.2240 us/op 0.26
mainnet_e217614 - capella processEffectiveBalanceUpdates 9.9221 ms/op 24.687 ms/op 0.40
mainnet_e217614 - capella processSlashingsReset 2.7190 us/op 7.4090 us/op 0.37
mainnet_e217614 - capella processRandaoMixesReset 4.0140 us/op 10.387 us/op 0.39
mainnet_e217614 - capella processHistoricalRootsUpdate 342.00 ns/op 2.1490 us/op 0.16
mainnet_e217614 - capella processParticipationFlagUpdates 1.3470 us/op 5.8100 us/op 0.23
mainnet_e217614 - capella afterProcessEpoch 261.90 ms/op 335.36 ms/op 0.78
phase0 processEpoch - mainnet_e58758 414.86 ms/op 319.04 ms/op 1.30
mainnet_e58758 - phase0 beforeProcessEpoch 108.10 ms/op 123.74 ms/op 0.87
mainnet_e58758 - phase0 processJustificationAndFinalization 13.655 us/op 18.565 us/op 0.74
mainnet_e58758 - phase0 processRewardsAndPenalties 24.616 ms/op 27.952 ms/op 0.88
mainnet_e58758 - phase0 processRegistryUpdates 7.0440 us/op 13.672 us/op 0.52
mainnet_e58758 - phase0 processSlashings 381.00 ns/op 977.00 ns/op 0.39
mainnet_e58758 - phase0 processEth1DataReset 303.00 ns/op 770.00 ns/op 0.39
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 939.33 us/op 1.3942 ms/op 0.67
mainnet_e58758 - phase0 processSlashingsReset 2.2910 us/op 2.9480 us/op 0.78
mainnet_e58758 - phase0 processRandaoMixesReset 4.2620 us/op 6.5970 us/op 0.65
mainnet_e58758 - phase0 processHistoricalRootsUpdate 343.00 ns/op 1.2160 us/op 0.28
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.0710 us/op 7.5580 us/op 0.54
mainnet_e58758 - phase0 afterProcessEpoch 76.795 ms/op 80.511 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0393 ms/op 1.0517 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.8708 ms/op 1.2232 ms/op 1.53
altair processInactivityUpdates - 250000 normalcase 14.421 ms/op 17.763 ms/op 0.81
altair processInactivityUpdates - 250000 worstcase 16.156 ms/op 18.884 ms/op 0.86
phase0 processRegistryUpdates - 250000 normalcase 6.0640 us/op 15.017 us/op 0.40
phase0 processRegistryUpdates - 250000 badcase_full_deposits 215.94 us/op 485.11 us/op 0.45
phase0 processRegistryUpdates - 250000 worstcase 0.5 102.09 ms/op 139.83 ms/op 0.73
altair processRewardsAndPenalties - 250000 normalcase 29.145 ms/op 48.610 ms/op 0.60
altair processRewardsAndPenalties - 250000 worstcase 34.047 ms/op 41.498 ms/op 0.82
phase0 getAttestationDeltas - 250000 normalcase 6.8091 ms/op 7.1989 ms/op 0.95
phase0 getAttestationDeltas - 250000 worstcase 7.0353 ms/op 8.3222 ms/op 0.85
phase0 processSlashings - 250000 worstcase 73.520 us/op 92.742 us/op 0.79
altair processSyncCommitteeUpdates - 250000 117.15 ms/op 207.59 ms/op 0.56
BeaconState.hashTreeRoot - No change 255.00 ns/op 1.1900 us/op 0.21
BeaconState.hashTreeRoot - 1 full validator 131.76 us/op 205.84 us/op 0.64
BeaconState.hashTreeRoot - 32 full validator 1.2331 ms/op 1.8437 ms/op 0.67
BeaconState.hashTreeRoot - 512 full validator 14.844 ms/op 19.385 ms/op 0.77
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 138.39 us/op 223.97 us/op 0.62
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6690 ms/op 3.0530 ms/op 0.55
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.638 ms/op 35.174 ms/op 0.70
BeaconState.hashTreeRoot - 1 balances 105.03 us/op 176.85 us/op 0.59
BeaconState.hashTreeRoot - 32 balances 1.0515 ms/op 1.6871 ms/op 0.62
BeaconState.hashTreeRoot - 512 balances 9.5378 ms/op 16.584 ms/op 0.58
BeaconState.hashTreeRoot - 250000 balances 177.43 ms/op 245.69 ms/op 0.72
aggregationBits - 2048 els - zipIndexesInBitList 23.189 us/op 26.326 us/op 0.88
byteArrayEquals 32 51.920 ns/op 66.412 ns/op 0.78
Buffer.compare 32 46.581 ns/op 38.889 ns/op 1.20
byteArrayEquals 1024 1.5355 us/op 1.7972 us/op 0.85
Buffer.compare 1024 52.251 ns/op 45.999 ns/op 1.14
byteArrayEquals 16384 24.450 us/op 28.774 us/op 0.85
Buffer.compare 16384 242.74 ns/op 241.84 ns/op 1.00
byteArrayEquals 123687377 189.04 ms/op 218.92 ms/op 0.86
Buffer.compare 123687377 7.9239 ms/op 9.5775 ms/op 0.83
byteArrayEquals 32 - diff last byte 57.244 ns/op 102.92 ns/op 0.56
Buffer.compare 32 - diff last byte 52.112 ns/op 41.088 ns/op 1.27
byteArrayEquals 1024 - diff last byte 1.6981 us/op 1.8049 us/op 0.94
Buffer.compare 1024 - diff last byte 60.876 ns/op 48.450 ns/op 1.26
byteArrayEquals 16384 - diff last byte 26.963 us/op 28.693 us/op 0.94
Buffer.compare 16384 - diff last byte 264.72 ns/op 225.63 ns/op 1.17
byteArrayEquals 123687377 - diff last byte 190.10 ms/op 223.61 ms/op 0.85
Buffer.compare 123687377 - diff last byte 7.0915 ms/op 5.4326 ms/op 1.31
byteArrayEquals 32 - random bytes 5.4450 ns/op 4.7380 ns/op 1.15
Buffer.compare 32 - random bytes 52.126 ns/op 40.184 ns/op 1.30
byteArrayEquals 1024 - random bytes 5.3900 ns/op 4.8860 ns/op 1.10
Buffer.compare 1024 - random bytes 50.064 ns/op 38.568 ns/op 1.30
byteArrayEquals 16384 - random bytes 5.4230 ns/op 4.9280 ns/op 1.10
Buffer.compare 16384 - random bytes 48.741 ns/op 34.560 ns/op 1.41
byteArrayEquals 123687377 - random bytes 6.5800 ns/op 9.0300 ns/op 0.73
Buffer.compare 123687377 - random bytes 50.760 ns/op 42.440 ns/op 1.20
regular array get 100000 times 36.808 us/op 42.154 us/op 0.87
wrappedArray get 100000 times 33.230 us/op 43.001 us/op 0.77
arrayWithProxy get 100000 times 13.718 ms/op 10.615 ms/op 1.29
ssz.Root.equals 46.585 ns/op 58.398 ns/op 0.80
byteArrayEquals 45.998 ns/op 57.553 ns/op 0.80
Buffer.compare 10.714 ns/op 10.628 ns/op 1.01
shuffle list - 16384 els 6.5838 ms/op 6.1113 ms/op 1.08
shuffle list - 250000 els 96.451 ms/op 87.229 ms/op 1.11
processSlot - 1 slots 14.155 us/op 20.928 us/op 0.68
processSlot - 32 slots 2.2921 ms/op 3.6195 ms/op 0.63
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.095 ms/op 47.646 ms/op 0.78
getCommitteeAssignments - req 1 vs - 250000 vc 2.2895 ms/op 2.3810 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 4.3729 ms/op 3.5044 ms/op 1.25
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6521 ms/op 3.8054 ms/op 1.22
findModifiedValidators - 10000 modified validators 276.95 ms/op 241.31 ms/op 1.15
findModifiedValidators - 1000 modified validators 213.72 ms/op 143.82 ms/op 1.49
findModifiedValidators - 100 modified validators 170.96 ms/op 149.33 ms/op 1.14
findModifiedValidators - 10 modified validators 162.23 ms/op 145.35 ms/op 1.12
findModifiedValidators - 1 modified validators 166.94 ms/op 165.31 ms/op 1.01
findModifiedValidators - no difference 154.62 ms/op 168.38 ms/op 0.92
compare ViewDUs 2.8843 s/op 3.2772 s/op 0.88
compare each validator Uint8Array 1.5353 s/op 1.6820 s/op 0.91
compare ViewDU to Uint8Array 1.0192 s/op 1.1080 s/op 0.92
migrate state 1000000 validators, 24 modified, 0 new 512.26 ms/op 607.18 ms/op 0.84
migrate state 1000000 validators, 1700 modified, 1000 new 805.32 ms/op 1.0088 s/op 0.80
migrate state 1000000 validators, 3400 modified, 2000 new 1.0040 s/op 1.3385 s/op 0.75
migrate state 1500000 validators, 24 modified, 0 new 562.93 ms/op 627.73 ms/op 0.90
migrate state 1500000 validators, 1700 modified, 1000 new 822.68 ms/op 926.79 ms/op 0.89
migrate state 1500000 validators, 3400 modified, 2000 new 1.0338 s/op 1.3565 s/op 0.76
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4100 ns/op 5.6100 ns/op 0.79
state getBlockRootAtSlot - 250000 vs - 7PWei 667.16 ns/op 734.05 ns/op 0.91
computeProposers - vc 250000 7.7254 ms/op 6.2852 ms/op 1.23
computeEpochShuffling - vc 250000 91.079 ms/op 86.054 ms/op 1.06
getNextSyncCommittee - vc 250000 119.77 ms/op 99.350 ms/op 1.21
computeSigningRoot for AttestationData 21.847 us/op 26.717 us/op 0.82
hash AttestationData serialized data then Buffer.toString(base64) 1.5013 us/op 1.2649 us/op 1.19
toHexString serialized data 908.37 ns/op 823.34 ns/op 1.10
Buffer.toString(base64) 187.23 ns/op 167.13 ns/op 1.12

Please sign in to comment.