Skip to content

feat: add beacon buddy#9410

Open
ensi321 wants to merge 4 commits into
unstablefrom
nc/beacon-buddy
Open

feat: add beacon buddy#9410
ensi321 wants to merge 4 commits into
unstablefrom
nc/beacon-buddy

Conversation

@ensi321
Copy link
Copy Markdown
Contributor

@ensi321 ensi321 commented May 27, 2026

Tamagotchi style ASCII pet that reacts to beacon node state each slot.

Enable this via --fun flag. --fun has 3 options: tty, file and both. File can be monitored using watch cat <dataDir>/buddy.txt. tty will have the buddy "pinned" at the bottom of the terminal.

Screen Recording 2026-05-26 at 6 43 50 PM

Note: star burst during fork transition, panic mood is due to zero peer

ASCII pet that reacts to beacon node state each slot. Opt-in via hidden
--fun off|tty|file|both flag (default off; bare --fun resolves to both).
Read-only telemetry: peer count, sync status, fork name, chain reorgs.
Mood machine: happy / sleepy / panic / sad plus rare sprites for slot
1337, 31337, every millionth slot, and fork activation slots.

TTY mode pins the frame to the bottom of the terminal using a DECSTBM
scroll region so concurrent logger output keeps flowing above; downgrades
to sidecar-only when stdout is not a TTY or the terminal is too small.
File mode writes <dataDir>/buddy.txt once per slot (tail -F or watch -n1
cat to follow).

AI-assisted: drafted with Claude Opus 4.7.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
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 introduces the "beacon buddy" ASCII pet easter egg, which displays a terminal-based or file-based status pet based on the node's current telemetry (such as sync status, peer count, and slot events). The review comments point out several important issues to address: wrapping the fork name retrieval in a safe call to prevent potential crashes, removing the trailing newline in formatFrame to avoid unwanted terminal scrolling, handling boolean false properly in the CLI option coercion, and ensuring the terminal scroll region is restored during abrupt abort events.

Comment thread packages/cli/src/util/buddy/index.ts Outdated
Comment thread packages/cli/src/util/buddy/render.ts
Comment thread packages/cli/src/cmds/beacon/options.ts Outdated
Comment thread packages/cli/src/cmds/beacon/handler.ts
ensi321 and others added 3 commits May 26, 2026 18:59
Call buddy.stop() in the abort signal listener too, so an error or
programmatic abort that bypasses onGracefulShutdown still resets the
DECSTBM scroll region. stop() is idempotent.

Drop the unreliable bare-flag coerce on --fun: yargs swallows the next
token (`--fun --reset` made fun="--reset"), so require an explicit value.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wrap onSlot and onReorg bodies in try/catch so a synchronous throw in
the easter egg can never bubble up through ClockEvent.slot or
chainReorg listeners and crash the beacon node. Also safeCall around
getForkName and a try/catch around renderer.draw for the same reason.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 6b6fdbe Previous: 055b83c Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 840.96 us/op 1.2316 ms/op 0.68
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.232 us/op 39.964 us/op 0.98
BLS verify - blst 640.37 us/op 631.51 us/op 1.01
BLS verifyMultipleSignatures 3 - blst 1.3772 ms/op 1.3022 ms/op 1.06
BLS verifyMultipleSignatures 8 - blst 2.1873 ms/op 2.0754 ms/op 1.05
BLS verifyMultipleSignatures 32 - blst 6.8163 ms/op 6.4593 ms/op 1.06
BLS verifyMultipleSignatures 64 - blst 12.944 ms/op 12.760 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst 25.436 ms/op 25.005 ms/op 1.02
BLS deserializing 10000 signatures 627.21 ms/op 622.44 ms/op 1.01
BLS deserializing 100000 signatures 6.3080 s/op 6.2463 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst 768.92 us/op 769.41 us/op 1.00
BLS verifyMultipleSignatures - same message - 8 - blst 888.49 us/op 817.55 us/op 1.09
BLS verifyMultipleSignatures - same message - 32 - blst 1.5485 ms/op 1.4765 ms/op 1.05
BLS verifyMultipleSignatures - same message - 64 - blst 2.3679 ms/op 2.2342 ms/op 1.06
BLS verifyMultipleSignatures - same message - 128 - blst 4.0191 ms/op 3.9335 ms/op 1.02
BLS aggregatePubkeys 32 - blst 17.460 us/op 17.595 us/op 0.99
BLS aggregatePubkeys 128 - blst 62.779 us/op 62.686 us/op 1.00
getSlashingsAndExits - default max 47.144 us/op 50.722 us/op 0.93
getSlashingsAndExits - 2k 323.92 us/op 413.55 us/op 0.78
proposeBlockBody type=full, size=empty 681.93 us/op 1.3840 ms/op 0.49
isKnown best case - 1 super set check 161.00 ns/op 183.00 ns/op 0.88
isKnown normal case - 2 super set checks 158.00 ns/op 176.00 ns/op 0.90
isKnown worse case - 16 super set checks 157.00 ns/op 181.00 ns/op 0.87
validate api signedAggregateAndProof - struct 1.5262 ms/op 1.4431 ms/op 1.06
validate gossip signedAggregateAndProof - struct 1.5233 ms/op 1.4392 ms/op 1.06
batch validate gossip attestation - vc 640000 - chunk 32 105.13 us/op 102.42 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 64 91.087 us/op 90.380 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 128 84.797 us/op 84.996 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 256 81.511 us/op 81.971 us/op 0.99
bytes32 toHexString 294.00 ns/op 293.00 ns/op 1.00
bytes32 Buffer.toString(hex) 159.00 ns/op 182.00 ns/op 0.87
bytes32 Buffer.toString(hex) from Uint8Array 225.00 ns/op 242.00 ns/op 0.93
bytes32 Buffer.toString(hex) + 0x 159.00 ns/op 186.00 ns/op 0.85
Return object 10000 times 0.20880 ns/op 0.21120 ns/op 0.99
Throw Error 10000 times 3.2866 us/op 3.1587 us/op 1.04
toHex 92.891 ns/op 85.446 ns/op 1.09
Buffer.from 83.221 ns/op 78.804 ns/op 1.06
shared Buffer 55.754 ns/op 49.846 ns/op 1.12
fastMsgIdFn sha256 / 200 bytes 1.4900 us/op 1.4250 us/op 1.05
fastMsgIdFn h32 xxhash / 200 bytes 154.00 ns/op 172.00 ns/op 0.90
fastMsgIdFn h64 xxhash / 200 bytes 196.00 ns/op 213.00 ns/op 0.92
fastMsgIdFn sha256 / 1000 bytes 4.8240 us/op 4.5640 us/op 1.06
fastMsgIdFn h32 xxhash / 1000 bytes 242.00 ns/op 257.00 ns/op 0.94
fastMsgIdFn h64 xxhash / 1000 bytes 248.00 ns/op 258.00 ns/op 0.96
fastMsgIdFn sha256 / 10000 bytes 42.793 us/op 40.351 us/op 1.06
fastMsgIdFn h32 xxhash / 10000 bytes 1.2610 us/op 1.2580 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 813.00 ns/op 813.00 ns/op 1.00
send data - 1000 256B messages 3.8995 ms/op 4.2977 ms/op 0.91
send data - 1000 512B messages 4.0367 ms/op 4.5096 ms/op 0.90
send data - 1000 1024B messages 4.1561 ms/op 4.5447 ms/op 0.91
send data - 1000 1200B messages 4.3598 ms/op 4.9802 ms/op 0.88
send data - 1000 2048B messages 4.5487 ms/op 5.0919 ms/op 0.89
send data - 1000 4096B messages 5.1825 ms/op 6.2954 ms/op 0.82
send data - 1000 16384B messages 23.558 ms/op 36.593 ms/op 0.64
send data - 1000 65536B messages 201.35 ms/op 133.56 ms/op 1.51
enrSubnets - fastDeserialize 64 bits 744.00 ns/op 722.00 ns/op 1.03
enrSubnets - ssz BitVector 64 bits 254.00 ns/op 280.00 ns/op 0.91
enrSubnets - fastDeserialize 4 bits 103.00 ns/op 125.00 ns/op 0.82
enrSubnets - ssz BitVector 4 bits 258.00 ns/op 277.00 ns/op 0.93
prioritizePeers score -10:0 att 32-0.1 sync 2-0 205.87 us/op 199.66 us/op 1.03
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 245.16 us/op 239.16 us/op 1.03
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 344.60 us/op 338.31 us/op 1.02
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 593.31 us/op 592.93 us/op 1.00
prioritizePeers score 0:0 att 64-1 sync 4-1 695.91 us/op 688.19 us/op 1.01
array of 16000 items push then shift 1.2912 us/op 1.2257 us/op 1.05
LinkedList of 16000 items push then shift 6.8050 ns/op 7.2080 ns/op 0.94
array of 16000 items push then pop 63.532 ns/op 67.899 ns/op 0.94
LinkedList of 16000 items push then pop 5.9510 ns/op 5.7240 ns/op 1.04
array of 24000 items push then shift 1.9004 us/op 1.7490 us/op 1.09
LinkedList of 24000 items push then shift 6.2520 ns/op 7.0570 ns/op 0.89
array of 24000 items push then pop 92.414 ns/op 92.525 ns/op 1.00
LinkedList of 24000 items push then pop 5.9190 ns/op 5.7870 ns/op 1.02
intersect bitArray bitLen 8 4.6880 ns/op 4.5530 ns/op 1.03
intersect array and set length 8 31.702 ns/op 27.913 ns/op 1.14
intersect bitArray bitLen 128 24.098 ns/op 22.821 ns/op 1.06
intersect array and set length 128 508.61 ns/op 468.07 ns/op 1.09
bitArray.getTrueBitIndexes() bitLen 128 1.0190 us/op 950.00 ns/op 1.07
bitArray.getTrueBitIndexes() bitLen 248 1.7110 us/op 1.7010 us/op 1.01
bitArray.getTrueBitIndexes() bitLen 512 3.4660 us/op 3.4940 us/op 0.99
Full columns - reconstruct all 6 blobs 169.55 us/op 153.75 us/op 1.10
Full columns - reconstruct half of the blobs out of 6 64.329 us/op 92.647 us/op 0.69
Full columns - reconstruct single blob out of 6 35.886 us/op 45.862 us/op 0.78
Half columns - reconstruct all 6 blobs 377.79 ms/op 374.10 ms/op 1.01
Half columns - reconstruct half of the blobs out of 6 190.97 ms/op 186.64 ms/op 1.02
Half columns - reconstruct single blob out of 6 66.381 ms/op 67.360 ms/op 0.99
Full columns - reconstruct all 10 blobs 495.73 us/op 413.21 us/op 1.20
Full columns - reconstruct half of the blobs out of 10 126.00 us/op 145.45 us/op 0.87
Full columns - reconstruct single blob out of 10 34.769 us/op 44.638 us/op 0.78
Half columns - reconstruct all 10 blobs 621.16 ms/op 611.04 ms/op 1.02
Half columns - reconstruct half of the blobs out of 10 319.54 ms/op 308.57 ms/op 1.04
Half columns - reconstruct single blob out of 10 68.138 ms/op 65.880 ms/op 1.03
Full columns - reconstruct all 20 blobs 2.1379 ms/op 1.2830 ms/op 1.67
Full columns - reconstruct half of the blobs out of 20 192.32 us/op 399.63 us/op 0.48
Full columns - reconstruct single blob out of 20 32.803 us/op 46.565 us/op 0.70
Half columns - reconstruct all 20 blobs 1.2620 s/op 1.2174 s/op 1.04
Half columns - reconstruct half of the blobs out of 20 656.98 ms/op 620.07 ms/op 1.06
Half columns - reconstruct single blob out of 20 66.680 ms/op 67.167 ms/op 0.99
Set add up to 64 items then delete first 2.1693 us/op 2.0953 us/op 1.04
OrderedSet add up to 64 items then delete first 3.4349 us/op 3.3650 us/op 1.02
Set add up to 64 items then delete last 2.2225 us/op 2.0812 us/op 1.07
OrderedSet add up to 64 items then delete last 3.3533 us/op 3.2339 us/op 1.04
Set add up to 64 items then delete middle 2.1978 us/op 2.0834 us/op 1.05
OrderedSet add up to 64 items then delete middle 4.7960 us/op 4.6924 us/op 1.02
Set add up to 128 items then delete first 4.3642 us/op 4.1235 us/op 1.06
OrderedSet add up to 128 items then delete first 6.6747 us/op 6.2335 us/op 1.07
Set add up to 128 items then delete last 3.9997 us/op 3.7311 us/op 1.07
OrderedSet add up to 128 items then delete last 5.9203 us/op 5.7445 us/op 1.03
Set add up to 128 items then delete middle 3.9828 us/op 3.7094 us/op 1.07
OrderedSet add up to 128 items then delete middle 11.675 us/op 11.264 us/op 1.04
Set add up to 256 items then delete first 8.1416 us/op 7.7145 us/op 1.06
OrderedSet add up to 256 items then delete first 12.385 us/op 12.072 us/op 1.03
Set add up to 256 items then delete last 7.8686 us/op 7.5534 us/op 1.04
OrderedSet add up to 256 items then delete last 11.719 us/op 11.639 us/op 1.01
Set add up to 256 items then delete middle 7.8318 us/op 7.5265 us/op 1.04
OrderedSet add up to 256 items then delete middle 34.634 us/op 35.472 us/op 0.98
pass gossip attestations to forkchoice per slot 2.5116 ms/op 2.5360 ms/op 0.99
forkChoice updateHead vc 100000 bc 64 eq 0 463.53 us/op 381.97 us/op 1.21
forkChoice updateHead vc 600000 bc 64 eq 0 2.7777 ms/op 2.3104 ms/op 1.20
forkChoice updateHead vc 1000000 bc 64 eq 0 4.6439 ms/op 3.8110 ms/op 1.22
forkChoice updateHead vc 600000 bc 320 eq 0 2.7929 ms/op 2.3005 ms/op 1.21
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8338 ms/op 2.3596 ms/op 1.20
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1209 ms/op 3.0623 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 1000 3.5245 ms/op 2.8193 ms/op 1.25
forkChoice updateHead vc 600000 bc 64 eq 10000 3.6156 ms/op 2.9238 ms/op 1.24
forkChoice updateHead vc 600000 bc 64 eq 300000 7.8707 ms/op 7.0660 ms/op 1.11
computeDeltas 1400000 validators 0% inactive 14.086 ms/op 12.144 ms/op 1.16
computeDeltas 1400000 validators 10% inactive 12.795 ms/op 11.500 ms/op 1.11
computeDeltas 1400000 validators 20% inactive 11.954 ms/op 10.374 ms/op 1.15
computeDeltas 1400000 validators 50% inactive 9.3211 ms/op 8.0421 ms/op 1.16
computeDeltas 2100000 validators 0% inactive 20.509 ms/op 18.344 ms/op 1.12
computeDeltas 2100000 validators 10% inactive 19.260 ms/op 17.380 ms/op 1.11
computeDeltas 2100000 validators 20% inactive 17.997 ms/op 15.741 ms/op 1.14
computeDeltas 2100000 validators 50% inactive 13.874 ms/op 12.084 ms/op 1.15
altair processAttestation - 250000 vs - 7PWei normalcase 1.8710 ms/op 2.4130 ms/op 0.78
altair processAttestation - 250000 vs - 7PWei worstcase 2.4914 ms/op 3.1243 ms/op 0.80
altair processAttestation - setStatus - 1/6 committees join 102.91 us/op 102.60 us/op 1.00
altair processAttestation - setStatus - 1/3 committees join 204.49 us/op 194.05 us/op 1.05
altair processAttestation - setStatus - 1/2 committees join 296.21 us/op 283.11 us/op 1.05
altair processAttestation - setStatus - 2/3 committees join 374.77 us/op 372.26 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 533.74 us/op 518.13 us/op 1.03
altair processAttestation - setStatus - 100% committees join 615.25 us/op 608.20 us/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase 2.8876 ms/op 4.6656 ms/op 0.62
altair processBlock - 250000 vs - 7PWei normalcase hashState 11.708 ms/op 17.304 ms/op 0.68
altair processBlock - 250000 vs - 7PWei worstcase 19.639 ms/op 23.217 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase hashState 38.865 ms/op 44.666 ms/op 0.87
phase0 processBlock - 250000 vs - 7PWei normalcase 1.3018 ms/op 1.4480 ms/op 0.90
phase0 processBlock - 250000 vs - 7PWei worstcase 17.491 ms/op 18.563 ms/op 0.94
altair processEth1Data - 250000 vs - 7PWei normalcase 300.42 us/op 295.68 us/op 1.02
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.6990 us/op 4.8060 us/op 0.77
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 26.057 us/op 22.411 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 6.3070 us/op 6.5290 us/op 0.97
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 4.0850 us/op 3.5970 us/op 1.14
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 107.34 us/op 95.605 us/op 1.12
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3859 ms/op 1.3912 ms/op 1.00
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8200 ms/op 1.8882 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8171 ms/op 2.0611 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.7367 ms/op 4.6547 ms/op 0.80
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2072 ms/op 2.4420 ms/op 0.90
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8938 ms/op 5.5234 ms/op 0.70
Tree 40 250000 create 322.45 ms/op 373.08 ms/op 0.86
Tree 40 250000 get(125000) 108.97 ns/op 93.936 ns/op 1.16
Tree 40 250000 set(125000) 1.1001 us/op 1.2366 us/op 0.89
Tree 40 250000 toArray() 9.4135 ms/op 22.739 ms/op 0.41
Tree 40 250000 iterate all - toArray() + loop 9.3880 ms/op 21.597 ms/op 0.43
Tree 40 250000 iterate all - get(i) 34.300 ms/op 43.778 ms/op 0.78
Array 250000 create 2.0357 ms/op 2.3962 ms/op 0.85
Array 250000 clone - spread 644.07 us/op 748.31 us/op 0.86
Array 250000 get(125000) 0.29200 ns/op 0.30300 ns/op 0.96
Array 250000 set(125000) 0.29600 ns/op 0.30300 ns/op 0.98
Array 250000 iterate all - loop 57.029 us/op 58.726 us/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 39.197 ms/op 39.730 ms/op 0.99
Array.fill - length 1000000 2.3926 ms/op 2.2044 ms/op 1.09
Array push - length 1000000 7.8401 ms/op 10.594 ms/op 0.74
Array.get 0.20408 ns/op 0.21668 ns/op 0.94
Uint8Array.get 0.24846 ns/op 0.24626 ns/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 14.749 ms/op 22.677 ms/op 0.65
altair processEpoch - mainnet_e81889 242.20 ms/op 326.33 ms/op 0.74
mainnet_e81889 - altair beforeProcessEpoch 13.904 ms/op 46.306 ms/op 0.30
mainnet_e81889 - altair processJustificationAndFinalization 4.6110 us/op 7.4960 us/op 0.62
mainnet_e81889 - altair processInactivityUpdates 3.6022 ms/op 8.0634 ms/op 0.45
mainnet_e81889 - altair processRewardsAndPenalties 16.959 ms/op 22.556 ms/op 0.75
mainnet_e81889 - altair processRegistryUpdates 504.00 ns/op 609.00 ns/op 0.83
mainnet_e81889 - altair processSlashings 133.00 ns/op 137.00 ns/op 0.97
mainnet_e81889 - altair processEth1DataReset 130.00 ns/op 138.00 ns/op 0.94
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6937 ms/op 7.6145 ms/op 0.22
mainnet_e81889 - altair processSlashingsReset 677.00 ns/op 769.00 ns/op 0.88
mainnet_e81889 - altair processRandaoMixesReset 972.00 ns/op 1.6310 us/op 0.60
mainnet_e81889 - altair processHistoricalRootsUpdate 131.00 ns/op 139.00 ns/op 0.94
mainnet_e81889 - altair processParticipationFlagUpdates 397.00 ns/op 522.00 ns/op 0.76
mainnet_e81889 - altair processSyncCommitteeUpdates 102.00 ns/op 114.00 ns/op 0.89
mainnet_e81889 - altair afterProcessEpoch 40.566 ms/op 42.930 ms/op 0.94
capella processEpoch - mainnet_e217614 718.54 ms/op 883.70 ms/op 0.81
mainnet_e217614 - capella beforeProcessEpoch 55.825 ms/op 62.156 ms/op 0.90
mainnet_e217614 - capella processJustificationAndFinalization 5.0880 us/op 6.7050 us/op 0.76
mainnet_e217614 - capella processInactivityUpdates 12.392 ms/op 15.007 ms/op 0.83
mainnet_e217614 - capella processRewardsAndPenalties 86.095 ms/op 92.188 ms/op 0.93
mainnet_e217614 - capella processRegistryUpdates 4.4650 us/op 4.6520 us/op 0.96
mainnet_e217614 - capella processSlashings 134.00 ns/op 134.00 ns/op 1.00
mainnet_e217614 - capella processEth1DataReset 129.00 ns/op 133.00 ns/op 0.97
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.5610 ms/op 19.639 ms/op 0.28
mainnet_e217614 - capella processSlashingsReset 675.00 ns/op 707.00 ns/op 0.95
mainnet_e217614 - capella processRandaoMixesReset 1.0040 us/op 1.4100 us/op 0.71
mainnet_e217614 - capella processHistoricalRootsUpdate 129.00 ns/op 137.00 ns/op 0.94
mainnet_e217614 - capella processParticipationFlagUpdates 418.00 ns/op 450.00 ns/op 0.93
mainnet_e217614 - capella afterProcessEpoch 107.53 ms/op 111.52 ms/op 0.96
phase0 processEpoch - mainnet_e58758 252.85 ms/op 333.50 ms/op 0.76
mainnet_e58758 - phase0 beforeProcessEpoch 47.019 ms/op 90.479 ms/op 0.52
mainnet_e58758 - phase0 processJustificationAndFinalization 4.7430 us/op 7.0690 us/op 0.67
mainnet_e58758 - phase0 processRewardsAndPenalties 15.372 ms/op 17.449 ms/op 0.88
mainnet_e58758 - phase0 processRegistryUpdates 2.2630 us/op 2.3870 us/op 0.95
mainnet_e58758 - phase0 processSlashings 133.00 ns/op 135.00 ns/op 0.99
mainnet_e58758 - phase0 processEth1DataReset 238.00 ns/op 132.00 ns/op 1.80
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 888.70 us/op 1.1528 ms/op 0.77
mainnet_e58758 - phase0 processSlashingsReset 790.00 ns/op 983.00 ns/op 0.80
mainnet_e58758 - phase0 processRandaoMixesReset 1.0390 us/op 1.4670 us/op 0.71
mainnet_e58758 - phase0 processHistoricalRootsUpdate 135.00 ns/op 136.00 ns/op 0.99
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.0480 us/op 1.3610 us/op 0.77
mainnet_e58758 - phase0 afterProcessEpoch 32.478 ms/op 34.387 ms/op 0.94
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0043 ms/op 1.0286 ms/op 0.98
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6678 ms/op 1.5968 ms/op 1.04
altair processInactivityUpdates - 250000 normalcase 10.329 ms/op 13.512 ms/op 0.76
altair processInactivityUpdates - 250000 worstcase 10.370 ms/op 13.022 ms/op 0.80
phase0 processRegistryUpdates - 250000 normalcase 2.3410 us/op 2.5010 us/op 0.94
phase0 processRegistryUpdates - 250000 badcase_full_deposits 152.67 us/op 146.24 us/op 1.04
phase0 processRegistryUpdates - 250000 worstcase 0.5 63.442 ms/op 76.903 ms/op 0.82
altair processRewardsAndPenalties - 250000 normalcase 17.299 ms/op 16.425 ms/op 1.05
altair processRewardsAndPenalties - 250000 worstcase 15.845 ms/op 15.571 ms/op 1.02
phase0 getAttestationDeltas - 250000 normalcase 5.4973 ms/op 5.5228 ms/op 1.00
phase0 getAttestationDeltas - 250000 worstcase 5.5480 ms/op 5.7200 ms/op 0.97
phase0 processSlashings - 250000 worstcase 59.663 us/op 66.197 us/op 0.90
altair processSyncCommitteeUpdates - 250000 9.9965 ms/op 12.932 ms/op 0.77
BeaconState.hashTreeRoot - No change 166.00 ns/op 173.00 ns/op 0.96
BeaconState.hashTreeRoot - 1 full validator 71.750 us/op 85.562 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 755.95 us/op 1.0037 ms/op 0.75
BeaconState.hashTreeRoot - 512 full validator 7.3435 ms/op 9.5720 ms/op 0.77
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 96.851 us/op 118.92 us/op 0.81
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5523 ms/op 1.6583 ms/op 0.94
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 16.527 ms/op 23.333 ms/op 0.71
BeaconState.hashTreeRoot - 1 balances 78.540 us/op 91.758 us/op 0.86
BeaconState.hashTreeRoot - 32 balances 742.56 us/op 819.91 us/op 0.91
BeaconState.hashTreeRoot - 512 balances 5.6564 ms/op 6.7511 ms/op 0.84
BeaconState.hashTreeRoot - 250000 balances 133.85 ms/op 150.60 ms/op 0.89
aggregationBits - 2048 els - zipIndexesInBitList 20.398 us/op 21.243 us/op 0.96
regular array get 100000 times 23.428 us/op 22.619 us/op 1.04
wrappedArray get 100000 times 23.356 us/op 22.987 us/op 1.02
arrayWithProxy get 100000 times 10.467 ms/op 9.7791 ms/op 1.07
ssz.Root.equals 21.720 ns/op 21.420 ns/op 1.01
byteArrayEquals 21.605 ns/op 21.603 ns/op 1.00
Buffer.compare 8.9890 ns/op 9.0280 ns/op 1.00
processSlot - 1 slots 9.9150 us/op 11.127 us/op 0.89
processSlot - 32 slots 1.5397 ms/op 2.3437 ms/op 0.66
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.3173 ms/op 4.4363 ms/op 0.75
getCommitteeAssignments - req 1 vs - 250000 vc 1.6865 ms/op 1.7161 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 3.4618 ms/op 3.4914 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7267 ms/op 3.7370 ms/op 1.00
findModifiedValidators - 10000 modified validators 650.17 ms/op 748.86 ms/op 0.87
findModifiedValidators - 1000 modified validators 419.22 ms/op 478.97 ms/op 0.88
findModifiedValidators - 100 modified validators 332.97 ms/op 303.68 ms/op 1.10
findModifiedValidators - 10 modified validators 163.91 ms/op 248.91 ms/op 0.66
findModifiedValidators - 1 modified validators 149.00 ms/op 183.92 ms/op 0.81
findModifiedValidators - no difference 156.39 ms/op 195.00 ms/op 0.80
migrate state 1500000 validators, 3400 modified, 2000 new 2.6088 s/op 3.0888 s/op 0.84
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.6600 ns/op 3.7700 ns/op 0.97
state getBlockRootAtSlot - 250000 vs - 7PWei 261.99 ns/op 419.79 ns/op 0.62
computeProposerIndex 100000 validators 1.3165 ms/op 1.3722 ms/op 0.96
getNextSyncCommitteeIndices 1000 validators 2.8013 ms/op 2.9130 ms/op 0.96
getNextSyncCommitteeIndices 10000 validators 24.998 ms/op 25.668 ms/op 0.97
getNextSyncCommitteeIndices 100000 validators 85.850 ms/op 85.798 ms/op 1.00
computeProposers - vc 250000 537.11 us/op 564.89 us/op 0.95
computeEpochShuffling - vc 250000 39.220 ms/op 39.305 ms/op 1.00
getNextSyncCommittee - vc 250000 9.2227 ms/op 9.7199 ms/op 0.95
nodejs block root to RootHex using toHex 96.497 ns/op 93.099 ns/op 1.04
nodejs block root to RootHex using toRootHex 59.892 ns/op 51.670 ns/op 1.16
nodejs fromHex(blob) 754.80 us/op 746.07 us/op 1.01
nodejs fromHexInto(blob) 661.33 us/op 620.50 us/op 1.07
nodejs block root to RootHex using the deprecated toHexString 488.97 ns/op 561.70 ns/op 0.87
nodejs byteArrayEquals 32 bytes (block root) 25.785 ns/op 26.084 ns/op 0.99
nodejs byteArrayEquals 48 bytes (pubkey) 37.256 ns/op 37.520 ns/op 0.99
nodejs byteArrayEquals 96 bytes (signature) 39.943 ns/op 34.023 ns/op 1.17
nodejs byteArrayEquals 1024 bytes 44.102 ns/op 41.083 ns/op 1.07
nodejs byteArrayEquals 131072 bytes (blob) 1.7460 us/op 1.7400 us/op 1.00
browser block root to RootHex using toHex 146.24 ns/op 142.55 ns/op 1.03
browser block root to RootHex using toRootHex 130.50 ns/op 130.72 ns/op 1.00
browser fromHex(blob) 1.5505 ms/op 1.5133 ms/op 1.02
browser fromHexInto(blob) 662.56 us/op 619.50 us/op 1.07
browser block root to RootHex using the deprecated toHexString 346.54 ns/op 363.12 ns/op 0.95
browser byteArrayEquals 32 bytes (block root) 28.001 ns/op 27.304 ns/op 1.03
browser byteArrayEquals 48 bytes (pubkey) 39.347 ns/op 38.586 ns/op 1.02
browser byteArrayEquals 96 bytes (signature) 73.317 ns/op 72.406 ns/op 1.01
browser byteArrayEquals 1024 bytes 747.63 ns/op 738.88 ns/op 1.01
browser byteArrayEquals 131072 bytes (blob) 94.501 us/op 92.051 us/op 1.03

by benchmarkbot/action

@ensi321 ensi321 marked this pull request as ready for review May 27, 2026 04:01
@ensi321 ensi321 requested a review from a team as a code owner May 27, 2026 04:01
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.56%. Comparing base (fc6798b) to head (0448657).
⚠️ Report is 161 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #9410      +/-   ##
============================================
+ Coverage     52.46%   52.56%   +0.09%     
============================================
  Files           848      848              
  Lines         62953    60937    -2016     
  Branches       4658     4485     -173     
============================================
- Hits          33030    32031     -999     
+ Misses        29855    28844    -1011     
+ Partials         68       62       -6     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant