Skip to content

chore: replace ts-node with tsx for running TypeScript#9635

Open
nazarhussain wants to merge 2 commits into
unstablefrom
nh/ts-node-to-tsx
Open

chore: replace ts-node with tsx for running TypeScript#9635
nazarhussain wants to merge 2 commits into
unstablefrom
nh/ts-node-to-tsx

Conversation

@nazarhussain

Copy link
Copy Markdown
Contributor

Motivation

We were running our .ts scripts (spec-test downloads, README checks, sim/e2e tests, docs generation, benchmarks) through ts-node, which had become a liability:

  • Pinned to a pre-releasets-node@^11.0.0-beta.1, alongside an RC TypeScript. Not a combination we want in the toolchain long-term.
  • Relies on the deprecated Node --loader hook (--loader ts-node/esm). Node has moved to --import, and --loader prints deprecation warnings and is slated for removal.
  • Maintenance/ESM friction — ts-node's ESM support has been fragile, especially on Node 24 (our engines is ^24.13.0).

tsx is the drop-in replacement recommended by the official Node.js TypeScript docs:

  • Actively maintained, esbuild-based → faster startup, transpile-only by default (no type-check overhead at runtime).
  • Integrates via the current --import tsx hook (no deprecated flags).
  • Handles the full TS surface (enums, decorators, path mapping) — a safer drop-in than native type-stripping for this codebase.

Note: since engines is ^24.13.0, Node's native type-stripping (node file.ts, zero tooling) is also an option and is what the Node docs lead with. We went with tsx as the lower-risk, feature-complete swap; dropping the runtime dep entirely via native stripping can be a follow-up.

Changes

  • Dependency: ts-node@^11.0.0-beta.1tsx@^4.23.0
  • Invocation mapping (--loader deprecated → --import):
    • pnpm exec ts-node X.tspnpm exec tsx X.ts (check-readme across 15 packages)
    • node --loader[=]ts-node/esm X.tsnode --import tsx X.ts (download-spec-tests, cli docs:build + test:sim:*, benchmark:files, run_e2e_env.sh, params e2e tests)
  • tsconfig.json / tsconfig.e2e.json: removed the "ts-node": { "transpileOnly": true } blocks (tsx is transpile-only by default) and refreshed the stale comment.
  • test-utils/src/cli.ts: runWith?: "node" | "ts-node""node" | "tsx".
  • Shebangs: scripts/check_readme.tstsx; packages/spec-test-util/src/downloadTestsCli.tsnode (it's the source for a compiled published bin, so its shebang must point to node, not a TS runner — the old ts-node shebang was latent breakage).
  • Updated usage comments referencing node_modules/.bin/ts-node.

Validation

  • git grep ts-node across the repo → no references remain; ts-node gone from pnpm-lock.yaml and node_modules.
  • pnpm install clean; tsx v4.23.0 on node v24.13.0.
  • check-readme (the most-used tsx path) runs end-to-end: after building @lodestar/config, all 5 README snippets validated.
  • Biome clean on changed source files.

AI disclosure

This PR was prepared with AI assistance (Claude Code).

🤖 Generated with Claude Code

Motivation:
- ts-node was pinned to a pre-release (^11.0.0-beta.1) and depended on the
  deprecated Node `--loader` hook plus an RC TypeScript, making it fragile to
  maintain on Node 24 (engines ^24.13.0).
- tsx is actively maintained, esbuild-based (faster startup, transpile-only by
  default), integrates via the current `--import` hook, and is the runner
  recommended in the official Node.js TypeScript docs.
- Simplifies config: removes the `ts-node` blocks from tsconfig and the
  deprecated `--loader ts-node/esm` invocations.

Changes:
- devDependency ts-node@^11 -> tsx@^4.23.0
- `pnpm exec ts-node X.ts` -> `pnpm exec tsx X.ts` (check-readme in 15 pkgs)
- `node --loader[=]ts-node/esm X.ts` -> `node --import tsx X.ts`
  (download-spec-tests, cli docs:build + test:sim:*, benchmark:files,
  run_e2e_env.sh, params e2e tests)
- test-utils runWith option "ts-node" -> "tsx"
- drop `ts-node` blocks from tsconfig.json / tsconfig.e2e.json
- shebangs: check_readme.ts -> tsx; compiled bin downloadTestsCli.ts -> node
- update usage comments referencing node_modules/.bin/ts-node

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nazarhussain nazarhussain requested a review from a team as a code owner July 10, 2026 06:26
Comment thread packages/params/test/e2e/overridePreset.test.ts Fixed
Comment thread packages/params/test/e2e/overridePreset.test.ts Fixed
Comment thread packages/params/test/e2e/setPreset.test.ts Fixed
Comment thread packages/params/test/e2e/setPreset.test.ts Fixed

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

Copy link
Copy Markdown
Contributor

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 replaces ts-node with tsx across the entire monorepo to improve TypeScript execution and transpilation performance. This includes updating package scripts, dependencies, shebangs, test utility helpers, and removing ts-node configurations from tsconfig.json files. There are no review comments, so there is no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

The ts-node -> tsx swap re-anchored two CodeQL alerts on these lines:
"Shell command built from environment values" (child.exec with an
interpolated __dirname path). Replace child.exec with child.execFile
passing args as an array, so no shell is spawned and the path is never
string-interpolated. Also robust to checkout paths containing spaces.

The rejection assertion still holds: promisified execFile appends stderr
to the rejected error message. Verified all 4 params e2e tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: e1a3ad1 Previous: 246e0dd Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 924.48 us/op 1.1180 ms/op 0.83
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.748 us/op 39.750 us/op 1.00
BLS verify - blst 694.90 us/op 756.77 us/op 0.92
BLS verifyMultipleSignatures 3 - blst 1.3500 ms/op 1.3760 ms/op 0.98
BLS verifyMultipleSignatures 8 - blst 2.1667 ms/op 2.1940 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst 6.8224 ms/op 6.9485 ms/op 0.98
BLS verifyMultipleSignatures 64 - blst 13.899 ms/op 13.262 ms/op 1.05
BLS verifyMultipleSignatures 128 - blst 25.926 ms/op 25.938 ms/op 1.00
BLS deserializing 10000 signatures 617.16 ms/op 652.18 ms/op 0.95
BLS deserializing 100000 signatures 6.2199 s/op 6.5766 s/op 0.95
BLS verifyMultipleSignatures - same message - 3 - blst 704.15 us/op 778.11 us/op 0.90
BLS verifyMultipleSignatures - same message - 8 - blst 847.15 us/op 953.62 us/op 0.89
BLS verifyMultipleSignatures - same message - 32 - blst 1.4962 ms/op 1.5763 ms/op 0.95
BLS verifyMultipleSignatures - same message - 64 - blst 2.3433 ms/op 2.4361 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst 4.0999 ms/op 4.1580 ms/op 0.99
BLS aggregatePubkeys 32 - blst 17.778 us/op 18.030 us/op 0.99
BLS aggregatePubkeys 128 - blst 63.357 us/op 64.175 us/op 0.99
getSlashingsAndExits - default max 44.530 us/op 49.703 us/op 0.90
getSlashingsAndExits - 2k 353.77 us/op 349.61 us/op 1.01
proposeBlockBody type=full, size=empty 625.00 us/op 822.05 us/op 0.76
isKnown best case - 1 super set check 179.00 ns/op 172.00 ns/op 1.04
isKnown normal case - 2 super set checks 171.00 ns/op 177.00 ns/op 0.97
isKnown worse case - 16 super set checks 171.00 ns/op 169.00 ns/op 1.01
validate api signedAggregateAndProof - struct 1.5605 ms/op 1.5257 ms/op 1.02
validate gossip signedAggregateAndProof - struct 1.5263 ms/op 1.5362 ms/op 0.99
batch validate gossip attestation - vc 640000 - chunk 32 109.63 us/op 108.04 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 96.309 us/op 94.894 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 128 90.407 us/op 87.496 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 256 89.039 us/op 85.003 us/op 1.05
bytes32 toHexString 294.00 ns/op 289.00 ns/op 1.02
bytes32 Buffer.toString(hex) 176.00 ns/op 166.00 ns/op 1.06
bytes32 Buffer.toString(hex) from Uint8Array 249.00 ns/op 231.00 ns/op 1.08
bytes32 Buffer.toString(hex) + 0x 185.00 ns/op 170.00 ns/op 1.09
Return object 10000 times 0.21490 ns/op 0.21380 ns/op 1.01
Throw Error 10000 times 3.4186 us/op 3.3384 us/op 1.02
toHex 98.284 ns/op 106.40 ns/op 0.92
Buffer.from 87.881 ns/op 89.772 ns/op 0.98
shared Buffer 60.897 ns/op 61.707 ns/op 0.99
fastMsgIdFn sha256 / 200 bytes 1.5380 us/op 1.5030 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 159.00 ns/op 153.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 200 bytes 215.00 ns/op 206.00 ns/op 1.04
fastMsgIdFn sha256 / 1000 bytes 4.8820 us/op 4.8720 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 245.00 ns/op 242.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 1000 bytes 253.00 ns/op 250.00 ns/op 1.01
fastMsgIdFn sha256 / 10000 bytes 42.994 us/op 43.265 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.2680 us/op 1.2700 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 819.00 ns/op 819.00 ns/op 1.00
send data - 1000 256B messages 4.3087 ms/op 4.1238 ms/op 1.04
send data - 1000 512B messages 5.5621 ms/op 5.1207 ms/op 1.09
send data - 1000 1024B messages 5.6922 ms/op 5.4958 ms/op 1.04
send data - 1000 1200B messages 6.3236 ms/op 6.2382 ms/op 1.01
send data - 1000 2048B messages 10.849 ms/op 16.628 ms/op 0.65
send data - 1000 4096B messages 60.219 ms/op 54.207 ms/op 1.11
send data - 1000 16384B messages 405.08 ms/op 232.19 ms/op 1.74
send data - 1000 65536B messages 1.6822 s/op 965.90 ms/op 1.74
enrSubnets - fastDeserialize 64 bits 755.00 ns/op 757.00 ns/op 1.00
enrSubnets - ssz BitVector 64 bits 271.00 ns/op 270.00 ns/op 1.00
enrSubnets - fastDeserialize 4 bits 103.00 ns/op 106.00 ns/op 0.97
enrSubnets - ssz BitVector 4 bits 273.00 ns/op 277.00 ns/op 0.99
prioritizePeers score -10:0 att 32-0.1 sync 2-0 204.96 us/op 206.19 us/op 0.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 235.10 us/op 233.67 us/op 1.01
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 339.32 us/op 346.17 us/op 0.98
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 603.79 us/op 594.79 us/op 1.02
prioritizePeers score 0:0 att 64-1 sync 4-1 710.17 us/op 706.44 us/op 1.01
array of 16000 items push then shift 1.3003 us/op 1.2944 us/op 1.00
LinkedList of 16000 items push then shift 7.2920 ns/op 6.7710 ns/op 1.08
array of 16000 items push then pop 66.307 ns/op 67.321 ns/op 0.98
LinkedList of 16000 items push then pop 6.0010 ns/op 6.0440 ns/op 0.99
array of 24000 items push then shift 1.9224 us/op 1.9263 us/op 1.00
LinkedList of 24000 items push then shift 6.7830 ns/op 6.4790 ns/op 1.05
array of 24000 items push then pop 94.780 ns/op 94.103 ns/op 1.01
LinkedList of 24000 items push then pop 6.0830 ns/op 5.9960 ns/op 1.01
intersect bitArray bitLen 8 3.9010 ns/op 4.7630 ns/op 0.82
intersect array and set length 8 29.612 ns/op 30.635 ns/op 0.97
intersect bitArray bitLen 128 23.486 ns/op 24.031 ns/op 0.98
intersect array and set length 128 499.86 ns/op 512.11 ns/op 0.98
bitArray.getTrueBitIndexes() bitLen 128 982.00 ns/op 1.0040 us/op 0.98
bitArray.getTrueBitIndexes() bitLen 248 1.7390 us/op 1.7630 us/op 0.99
bitArray.getTrueBitIndexes() bitLen 512 3.5980 us/op 3.5400 us/op 1.02
Full columns - reconstruct all 6 blobs 200.51 us/op 164.35 us/op 1.22
Full columns - reconstruct half of the blobs out of 6 103.13 us/op 66.771 us/op 1.54
Full columns - reconstruct single blob out of 6 32.167 us/op 35.358 us/op 0.91
Half columns - reconstruct all 6 blobs 393.87 ms/op 389.97 ms/op 1.01
Half columns - reconstruct half of the blobs out of 6 197.32 ms/op 195.67 ms/op 1.01
Half columns - reconstruct single blob out of 6 69.392 ms/op 69.875 ms/op 0.99
Set add up to 64 items then delete first 2.1807 us/op 1.6932 us/op 1.29
OrderedSet add up to 64 items then delete first 3.3899 us/op 2.5749 us/op 1.32
Set add up to 64 items then delete last 2.3752 us/op 1.9410 us/op 1.22
OrderedSet add up to 64 items then delete last 3.2977 us/op 2.9882 us/op 1.10
Set add up to 64 items then delete middle 2.1173 us/op 1.9670 us/op 1.08
OrderedSet add up to 64 items then delete middle 4.7675 us/op 4.5167 us/op 1.06
Set add up to 128 items then delete first 4.2248 us/op 3.8387 us/op 1.10
OrderedSet add up to 128 items then delete first 6.6065 us/op 6.0220 us/op 1.10
Set add up to 128 items then delete last 3.8205 us/op 4.9871 us/op 0.77
OrderedSet add up to 128 items then delete last 5.8149 us/op 6.2011 us/op 0.94
Set add up to 128 items then delete middle 3.8202 us/op 3.8383 us/op 1.00
OrderedSet add up to 128 items then delete middle 11.617 us/op 12.129 us/op 0.96
Set add up to 256 items then delete first 7.7711 us/op 7.4710 us/op 1.04
OrderedSet add up to 256 items then delete first 12.113 us/op 11.604 us/op 1.04
Set add up to 256 items then delete last 7.5254 us/op 7.8257 us/op 0.96
OrderedSet add up to 256 items then delete last 11.438 us/op 12.034 us/op 0.95
Set add up to 256 items then delete middle 7.5405 us/op 7.4541 us/op 1.01
OrderedSet add up to 256 items then delete middle 34.757 us/op 35.691 us/op 0.97
runFastConfirmationRules vc:100000 bc:96 eq:0 4.8156 ms/op 5.0884 ms/op 0.95
runFastConfirmationRules vc:600000 bc:96 eq:0 36.064 ms/op 35.262 ms/op 1.02
runFastConfirmationRules vc:1000000 bc:96 eq:0 58.678 ms/op 58.458 ms/op 1.00
runFastConfirmationRules vc:600000 bc:320 eq:0 35.076 ms/op 35.695 ms/op 0.98
runFastConfirmationRules vc:100000 bc:96 eq:1000 1.0844 s/op 1.0949 s/op 0.99
pass gossip attestations to forkchoice per slot 2.5907 ms/op 2.5729 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 420.04 us/op 484.35 us/op 0.87
forkChoice updateHead vc 600000 bc 64 eq 0 2.4401 ms/op 2.8697 ms/op 0.85
forkChoice updateHead vc 1000000 bc 64 eq 0 4.1047 ms/op 4.7312 ms/op 0.87
forkChoice updateHead vc 600000 bc 320 eq 0 2.4686 ms/op 2.8950 ms/op 0.85
forkChoice updateHead vc 600000 bc 1200 eq 0 2.4967 ms/op 2.9130 ms/op 0.86
forkChoice updateHead vc 600000 bc 7200 eq 0 3.0437 ms/op 3.0533 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 1000 2.3379 ms/op 2.8917 ms/op 0.81
forkChoice updateHead vc 600000 bc 64 eq 10000 2.4044 ms/op 3.0090 ms/op 0.80
forkChoice updateHead vc 600000 bc 64 eq 300000 6.1307 ms/op 6.9515 ms/op 0.88
computeDeltas 1400000 validators 0% inactive 11.563 ms/op 13.447 ms/op 0.86
computeDeltas 1400000 validators 10% inactive 10.823 ms/op 12.757 ms/op 0.85
computeDeltas 1400000 validators 20% inactive 10.064 ms/op 11.876 ms/op 0.85
computeDeltas 1400000 validators 50% inactive 8.3444 ms/op 9.6654 ms/op 0.86
computeDeltas 2100000 validators 0% inactive 17.383 ms/op 19.949 ms/op 0.87
computeDeltas 2100000 validators 10% inactive 16.324 ms/op 19.023 ms/op 0.86
computeDeltas 2100000 validators 20% inactive 15.573 ms/op 17.886 ms/op 0.87
computeDeltas 2100000 validators 50% inactive 10.339 ms/op 14.563 ms/op 0.71
altair processAttestation - 250000 vs - 7PWei normalcase 1.6706 ms/op 1.7181 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei worstcase 3.2477 ms/op 2.5191 ms/op 1.29
altair processAttestation - setStatus - 1/6 committees join 101.85 us/op 106.52 us/op 0.96
altair processAttestation - setStatus - 1/3 committees join 191.47 us/op 210.27 us/op 0.91
altair processAttestation - setStatus - 1/2 committees join 276.78 us/op 296.91 us/op 0.93
altair processAttestation - setStatus - 2/3 committees join 368.52 us/op 379.46 us/op 0.97
altair processAttestation - setStatus - 4/5 committees join 554.29 us/op 538.14 us/op 1.03
altair processAttestation - setStatus - 100% committees join 662.04 us/op 616.76 us/op 1.07
altair processBlock - 250000 vs - 7PWei normalcase 3.2866 ms/op 3.1281 ms/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase hashState 16.655 ms/op 15.672 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase 21.624 ms/op 20.109 ms/op 1.08
altair processBlock - 250000 vs - 7PWei worstcase hashState 45.869 ms/op 39.551 ms/op 1.16
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4952 ms/op 1.3179 ms/op 1.13
phase0 processBlock - 250000 vs - 7PWei worstcase 17.386 ms/op 17.889 ms/op 0.97
altair processEth1Data - 250000 vs - 7PWei normalcase 299.97 us/op 305.16 us/op 0.98
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.3290 us/op 3.4660 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 21.016 us/op 21.980 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.7980 us/op 6.4750 us/op 0.90
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.5930 us/op 3.8370 us/op 0.94
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 98.855 us/op 103.71 us/op 0.95
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.5888 ms/op 1.4023 ms/op 1.13
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8873 ms/op 1.8180 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8501 ms/op 1.8098 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8186 ms/op 3.6576 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3988 ms/op 2.1034 ms/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.7884 ms/op 3.9987 ms/op 1.45
Tree 40 250000 create 346.45 ms/op 320.71 ms/op 1.08
Tree 40 250000 get(125000) 117.43 ns/op 99.398 ns/op 1.18
Tree 40 250000 set(125000) 1.0014 us/op 1.0809 us/op 0.93
Tree 40 250000 toArray() 16.598 ms/op 9.5000 ms/op 1.75
Tree 40 250000 iterate all - toArray() + loop 17.466 ms/op 9.5457 ms/op 1.83
Tree 40 250000 iterate all - get(i) 39.085 ms/op 33.636 ms/op 1.16
Array 250000 create 2.2230 ms/op 2.0658 ms/op 1.08
Array 250000 clone - spread 681.40 us/op 642.98 us/op 1.06
Array 250000 get(125000) 0.28500 ns/op 0.29300 ns/op 0.97
Array 250000 set(125000) 0.28900 ns/op 0.29400 ns/op 0.98
Array 250000 iterate all - loop 56.729 us/op 55.764 us/op 1.02
phase0 afterProcessEpoch - 250000 vs - 7PWei 38.543 ms/op 38.364 ms/op 1.00
Array.fill - length 1000000 2.0727 ms/op 1.9046 ms/op 1.09
Array push - length 1000000 9.6707 ms/op 7.6338 ms/op 1.27
Array.get 0.20329 ns/op 0.20419 ns/op 1.00
Uint8Array.get 0.24058 ns/op 0.24786 ns/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.983 ms/op 12.669 ms/op 1.26
altair processEpoch - mainnet_e81889 309.91 ms/op 212.21 ms/op 1.46
mainnet_e81889 - altair beforeProcessEpoch 38.346 ms/op 25.374 ms/op 1.51
mainnet_e81889 - altair processJustificationAndFinalization 7.6420 us/op 4.7710 us/op 1.60
mainnet_e81889 - altair processInactivityUpdates 6.5943 ms/op 3.5968 ms/op 1.83
mainnet_e81889 - altair processRewardsAndPenalties 21.097 ms/op 17.469 ms/op 1.21
mainnet_e81889 - altair processRegistryUpdates 590.00 ns/op 513.00 ns/op 1.15
mainnet_e81889 - altair processSlashings 156.00 ns/op 132.00 ns/op 1.18
mainnet_e81889 - altair processEth1DataReset 162.00 ns/op 130.00 ns/op 1.25
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6607 ms/op 1.6996 ms/op 0.98
mainnet_e81889 - altair processSlashingsReset 720.00 ns/op 696.00 ns/op 1.03
mainnet_e81889 - altair processRandaoMixesReset 1.4060 us/op 986.00 ns/op 1.43
mainnet_e81889 - altair processHistoricalRootsUpdate 157.00 ns/op 132.00 ns/op 1.19
mainnet_e81889 - altair processParticipationFlagUpdates 461.00 ns/op 408.00 ns/op 1.13
mainnet_e81889 - altair processSyncCommitteeUpdates 117.00 ns/op 103.00 ns/op 1.14
mainnet_e81889 - altair afterProcessEpoch 42.936 ms/op 40.923 ms/op 1.05
capella processEpoch - mainnet_e217614 1.0372 s/op 734.64 ms/op 1.41
mainnet_e217614 - capella beforeProcessEpoch 57.999 ms/op 62.383 ms/op 0.93
mainnet_e217614 - capella processJustificationAndFinalization 6.4780 us/op 5.2960 us/op 1.22
mainnet_e217614 - capella processInactivityUpdates 12.340 ms/op 11.837 ms/op 1.04
mainnet_e217614 - capella processRewardsAndPenalties 104.90 ms/op 85.876 ms/op 1.22
mainnet_e217614 - capella processRegistryUpdates 4.8500 us/op 4.6030 us/op 1.05
mainnet_e217614 - capella processSlashings 138.00 ns/op 134.00 ns/op 1.03
mainnet_e217614 - capella processEth1DataReset 134.00 ns/op 127.00 ns/op 1.06
mainnet_e217614 - capella processEffectiveBalanceUpdates 16.086 ms/op 5.5290 ms/op 2.91
mainnet_e217614 - capella processSlashingsReset 666.00 ns/op 687.00 ns/op 0.97
mainnet_e217614 - capella processRandaoMixesReset 1.4110 us/op 1.0880 us/op 1.30
mainnet_e217614 - capella processHistoricalRootsUpdate 138.00 ns/op 127.00 ns/op 1.09
mainnet_e217614 - capella processParticipationFlagUpdates 454.00 ns/op 410.00 ns/op 1.11
mainnet_e217614 - capella afterProcessEpoch 106.74 ms/op 108.42 ms/op 0.98
phase0 processEpoch - mainnet_e58758 339.89 ms/op 233.27 ms/op 1.46
mainnet_e58758 - phase0 beforeProcessEpoch 61.161 ms/op 45.173 ms/op 1.35
mainnet_e58758 - phase0 processJustificationAndFinalization 6.3700 us/op 4.8610 us/op 1.31
mainnet_e58758 - phase0 processRewardsAndPenalties 15.662 ms/op 15.122 ms/op 1.04
mainnet_e58758 - phase0 processRegistryUpdates 2.3050 us/op 2.3610 us/op 0.98
mainnet_e58758 - phase0 processSlashings 145.00 ns/op 284.00 ns/op 0.51
mainnet_e58758 - phase0 processEth1DataReset 146.00 ns/op 135.00 ns/op 1.08
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 833.06 us/op 857.11 us/op 0.97
mainnet_e58758 - phase0 processSlashingsReset 891.00 ns/op 839.00 ns/op 1.06
mainnet_e58758 - phase0 processRandaoMixesReset 2.5050 us/op 1.1170 us/op 2.24
mainnet_e58758 - phase0 processHistoricalRootsUpdate 379.00 ns/op 134.00 ns/op 2.83
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.2210 us/op 975.00 ns/op 1.25
mainnet_e58758 - phase0 afterProcessEpoch 32.909 ms/op 31.838 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0509 ms/op 1.0259 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.9450 ms/op 1.6410 ms/op 1.79
altair processInactivityUpdates - 250000 normalcase 12.239 ms/op 10.505 ms/op 1.17
altair processInactivityUpdates - 250000 worstcase 11.342 ms/op 10.421 ms/op 1.09
phase0 processRegistryUpdates - 250000 normalcase 2.2680 us/op 2.4710 us/op 0.92
phase0 processRegistryUpdates - 250000 badcase_full_deposits 143.33 us/op 156.04 us/op 0.92
phase0 processRegistryUpdates - 250000 worstcase 0.5 51.904 ms/op 53.500 ms/op 0.97
altair processRewardsAndPenalties - 250000 normalcase 13.339 ms/op 12.987 ms/op 1.03
altair processRewardsAndPenalties - 250000 worstcase 13.507 ms/op 12.630 ms/op 1.07
phase0 getAttestationDeltas - 250000 normalcase 5.4270 ms/op 5.3061 ms/op 1.02
phase0 getAttestationDeltas - 250000 worstcase 5.4934 ms/op 5.2921 ms/op 1.04
phase0 processSlashings - 250000 worstcase 59.310 us/op 61.985 us/op 0.96
altair processSyncCommitteeUpdates - 250000 10.336 ms/op 9.8579 ms/op 1.05
BeaconState.hashTreeRoot - No change 184.00 ns/op 172.00 ns/op 1.07
BeaconState.hashTreeRoot - 1 full validator 73.102 us/op 56.985 us/op 1.28
BeaconState.hashTreeRoot - 32 full validator 993.58 us/op 642.72 us/op 1.55
BeaconState.hashTreeRoot - 512 full validator 7.2522 ms/op 6.0367 ms/op 1.20
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 115.48 us/op 69.301 us/op 1.67
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8692 ms/op 1.0486 ms/op 1.78
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.843 ms/op 12.822 ms/op 1.08
BeaconState.hashTreeRoot - 1 balances 66.738 us/op 56.615 us/op 1.18
BeaconState.hashTreeRoot - 32 balances 720.24 us/op 552.45 us/op 1.30
BeaconState.hashTreeRoot - 512 balances 5.5302 ms/op 4.6375 ms/op 1.19
BeaconState.hashTreeRoot - 250000 balances 155.03 ms/op 98.229 ms/op 1.58
aggregationBits - 2048 els - zipIndexesInBitList 19.039 us/op 20.547 us/op 0.93
regular array get 100000 times 22.285 us/op 22.239 us/op 1.00
wrappedArray get 100000 times 22.295 us/op 22.309 us/op 1.00
arrayWithProxy get 100000 times 10.670 ms/op 10.553 ms/op 1.01
ssz.Root.equals 20.643 ns/op 21.125 ns/op 0.98
byteArrayEquals 20.371 ns/op 20.880 ns/op 0.98
Buffer.compare 8.4820 ns/op 9.7810 ns/op 0.87
processSlot - 1 slots 9.8960 us/op 8.0790 us/op 1.22
processSlot - 32 slots 2.2825 ms/op 1.5027 ms/op 1.52
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.8010 ms/op 2.7753 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 1.6008 ms/op 1.7376 ms/op 0.92
getCommitteeAssignments - req 100 vs - 250000 vc 3.2871 ms/op 3.4181 ms/op 0.96
getCommitteeAssignments - req 1000 vs - 250000 vc 3.5880 ms/op 3.6834 ms/op 0.97
findModifiedValidators - 10000 modified validators 626.27 ms/op 657.85 ms/op 0.95
findModifiedValidators - 1000 modified validators 437.39 ms/op 461.70 ms/op 0.95
findModifiedValidators - 100 modified validators 257.61 ms/op 289.15 ms/op 0.89
findModifiedValidators - 10 modified validators 148.75 ms/op 252.59 ms/op 0.59
findModifiedValidators - 1 modified validators 161.39 ms/op 185.12 ms/op 0.87
findModifiedValidators - no difference 150.15 ms/op 187.57 ms/op 0.80
migrate state 1500000 validators, 3400 modified, 2000 new 4.5689 s/op 2.7937 s/op 1.64
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.7600 ns/op 3.3700 ns/op 1.12
state getBlockRootAtSlot - 250000 vs - 7PWei 451.26 ns/op 273.90 ns/op 1.65
computeProposerIndex 100000 validators 1.3919 ms/op 1.3105 ms/op 1.06
getNextSyncCommitteeIndices 1000 validators 2.8723 ms/op 2.8774 ms/op 1.00
getNextSyncCommitteeIndices 10000 validators 25.864 ms/op 25.177 ms/op 1.03
getNextSyncCommitteeIndices 100000 validators 94.195 ms/op 83.797 ms/op 1.12
computeProposers - vc 250000 551.79 us/op 548.07 us/op 1.01
computeEpochShuffling - vc 250000 39.780 ms/op 38.868 ms/op 1.02
getNextSyncCommittee - vc 250000 10.778 ms/op 9.3051 ms/op 1.16
nodejs block root to RootHex using toHex 96.443 ns/op 106.18 ns/op 0.91
nodejs block root to RootHex using toRootHex 63.607 ns/op 67.077 ns/op 0.95
nodejs fromHex(blob) 952.89 us/op 799.02 us/op 1.19
nodejs fromHexInto(blob) 623.83 us/op 670.50 us/op 0.93
nodejs block root to RootHex using the deprecated toHexString 449.97 ns/op 497.85 ns/op 0.90
nodejs byteArrayEquals 32 bytes (block root) 25.569 ns/op 25.794 ns/op 0.99
nodejs byteArrayEquals 48 bytes (pubkey) 37.085 ns/op 37.272 ns/op 0.99
nodejs byteArrayEquals 96 bytes (signature) 34.055 ns/op 40.822 ns/op 0.83
nodejs byteArrayEquals 1024 bytes 43.155 ns/op 43.421 ns/op 0.99
nodejs byteArrayEquals 131072 bytes (blob) 1.7933 us/op 1.7686 us/op 1.01
browser block root to RootHex using toHex 145.13 ns/op 146.41 ns/op 0.99
browser block root to RootHex using toRootHex 129.76 ns/op 131.16 ns/op 0.99
browser fromHex(blob) 1.7924 ms/op 1.5890 ms/op 1.13
browser fromHexInto(blob) 619.75 us/op 659.21 us/op 0.94
browser block root to RootHex using the deprecated toHexString 314.75 ns/op 350.33 ns/op 0.90
browser byteArrayEquals 32 bytes (block root) 27.497 ns/op 28.126 ns/op 0.98
browser byteArrayEquals 48 bytes (pubkey) 38.919 ns/op 39.542 ns/op 0.98
browser byteArrayEquals 96 bytes (signature) 73.056 ns/op 73.618 ns/op 0.99
browser byteArrayEquals 1024 bytes 746.47 ns/op 748.22 ns/op 1.00
browser byteArrayEquals 131072 bytes (blob) 93.146 us/op 94.287 us/op 0.99

by benchmarkbot/action

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants