Skip to content

Conversation

@ensi321
Copy link
Contributor

@ensi321 ensi321 commented Apr 22, 2025

@ensi321 ensi321 requested a review from a team as a code owner April 22, 2025 05:12
@codecov
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 30 lines in your changes missing coverage. Please review.

Project coverage is 56.09%. Comparing base (d8bc6b1) to head (165d73a).
Report is 3 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7735   +/-   ##
=========================================
  Coverage     56.09%   56.09%           
=========================================
  Files           823      823           
  Lines         58036    58075   +39     
  Branches       4464     4467    +3     
=========================================
+ Hits          32554    32580   +26     
- Misses        25415    25428   +13     
  Partials         67       67           
🚀 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.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 22, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: a7ca70b Previous: d8bc6b1 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 964.13 us/op 969.20 us/op 0.99
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 36.021 us/op 36.004 us/op 1.00
BLS verify - blst 819.18 us/op 742.31 us/op 1.10
BLS verifyMultipleSignatures 3 - blst 1.2316 ms/op 1.1783 ms/op 1.05
BLS verifyMultipleSignatures 8 - blst 1.8733 ms/op 1.6827 ms/op 1.11
BLS verifyMultipleSignatures 32 - blst 5.5200 ms/op 4.9308 ms/op 1.12
BLS verifyMultipleSignatures 64 - blst 10.610 ms/op 9.0419 ms/op 1.17
BLS verifyMultipleSignatures 128 - blst 17.315 ms/op 17.346 ms/op 1.00
BLS deserializing 10000 signatures 695.96 ms/op 684.24 ms/op 1.02
BLS deserializing 100000 signatures 6.9266 s/op 7.0015 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst 995.12 us/op 891.18 us/op 1.12
BLS verifyMultipleSignatures - same message - 8 - blst 1.4052 ms/op 1.0124 ms/op 1.39
BLS verifyMultipleSignatures - same message - 32 - blst 1.6924 ms/op 1.6787 ms/op 1.01
BLS verifyMultipleSignatures - same message - 64 - blst 2.6212 ms/op 2.5650 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.4643 ms/op 4.3682 ms/op 1.02
BLS aggregatePubkeys 32 - blst 22.227 us/op 19.540 us/op 1.14
BLS aggregatePubkeys 128 - blst 69.288 us/op 70.714 us/op 0.98
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 55.610 ms/op 43.165 ms/op 1.29
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 55.932 ms/op 42.166 ms/op 1.33
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 45.632 ms/op 33.454 ms/op 1.36
getSlashingsAndExits - default max 70.879 us/op 72.712 us/op 0.97
getSlashingsAndExits - 2k 306.36 us/op 274.50 us/op 1.12
proposeBlockBody type=full, size=empty 5.3989 ms/op 5.7388 ms/op 0.94
isKnown best case - 1 super set check 209.00 ns/op 204.00 ns/op 1.02
isKnown normal case - 2 super set checks 208.00 ns/op 200.00 ns/op 1.04
isKnown worse case - 16 super set checks 205.00 ns/op 198.00 ns/op 1.04
InMemoryCheckpointStateCache - add get delete 2.3880 us/op 2.3990 us/op 1.00
validate api signedAggregateAndProof - struct 1.3615 ms/op 1.3337 ms/op 1.02
validate gossip signedAggregateAndProof - struct 1.3620 ms/op 1.3444 ms/op 1.01
batch validate gossip attestation - vc 640000 - chunk 32 113.27 us/op 113.54 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 64 102.22 us/op 100.67 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 94.592 us/op 93.314 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 256 95.359 us/op 97.259 us/op 0.98
pickEth1Vote - no votes 967.88 us/op 985.92 us/op 0.98
pickEth1Vote - max votes 5.3524 ms/op 6.1581 ms/op 0.87
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.581 ms/op 11.010 ms/op 0.96
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 15.944 ms/op 18.274 ms/op 0.87
pickEth1Vote - Eth1Data fastSerialize value x2048 470.26 us/op 428.43 us/op 1.10
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.1240 ms/op 3.8511 ms/op 0.55
bytes32 toHexString 370.00 ns/op 360.00 ns/op 1.03
bytes32 Buffer.toString(hex) 259.00 ns/op 248.00 ns/op 1.04
bytes32 Buffer.toString(hex) from Uint8Array 351.00 ns/op 340.00 ns/op 1.03
bytes32 Buffer.toString(hex) + 0x 258.00 ns/op 252.00 ns/op 1.02
Object access 1 prop 0.13100 ns/op 0.12000 ns/op 1.09
Map access 1 prop 0.13400 ns/op 0.12300 ns/op 1.09
Object get x1000 5.9390 ns/op 5.7310 ns/op 1.04
Map get x1000 6.2970 ns/op 6.4060 ns/op 0.98
Object set x1000 27.978 ns/op 29.040 ns/op 0.96
Map set x1000 19.314 ns/op 20.315 ns/op 0.95
Return object 10000 times 0.28630 ns/op 0.28640 ns/op 1.00
Throw Error 10000 times 4.2660 us/op 4.2267 us/op 1.01
toHex 135.42 ns/op 137.70 ns/op 0.98
Buffer.from 124.61 ns/op 126.19 ns/op 0.99
shared Buffer 88.040 ns/op 91.046 ns/op 0.97
fastMsgIdFn sha256 / 200 bytes 2.2240 us/op 2.2280 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 215.00 ns/op 206.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 200 bytes 327.00 ns/op 270.00 ns/op 1.21
fastMsgIdFn sha256 / 1000 bytes 7.2530 us/op 7.2120 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 344.00 ns/op 338.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 339.00 ns/op 339.00 ns/op 1.00
fastMsgIdFn sha256 / 10000 bytes 64.572 us/op 63.741 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.8000 us/op 1.8110 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 1.1820 us/op 1.2100 us/op 0.98
send data - 1000 256B messages 12.251 ms/op 12.061 ms/op 1.02
send data - 1000 512B messages 16.087 ms/op 15.399 ms/op 1.04
send data - 1000 1024B messages 25.865 ms/op 24.045 ms/op 1.08
send data - 1000 1200B messages 20.265 ms/op 21.551 ms/op 0.94
send data - 1000 2048B messages 21.247 ms/op 20.277 ms/op 1.05
send data - 1000 4096B messages 27.531 ms/op 23.956 ms/op 1.15
send data - 1000 16384B messages 66.892 ms/op 70.638 ms/op 0.95
send data - 1000 65536B messages 215.52 ms/op 201.56 ms/op 1.07
enrSubnets - fastDeserialize 64 bits 892.00 ns/op 876.00 ns/op 1.02
enrSubnets - ssz BitVector 64 bits 335.00 ns/op 334.00 ns/op 1.00
enrSubnets - fastDeserialize 4 bits 137.00 ns/op 130.00 ns/op 1.05
enrSubnets - ssz BitVector 4 bits 336.00 ns/op 339.00 ns/op 0.99
prioritizePeers score -10:0 att 32-0.1 sync 2-0 120.16 us/op 118.45 us/op 1.01
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 137.53 us/op 138.40 us/op 0.99
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 196.92 us/op 199.04 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 381.33 us/op 374.23 us/op 1.02
prioritizePeers score 0:0 att 64-1 sync 4-1 461.51 us/op 454.97 us/op 1.01
array of 16000 items push then shift 1.6150 us/op 1.5946 us/op 1.01
LinkedList of 16000 items push then shift 7.0280 ns/op 6.9360 ns/op 1.01
array of 16000 items push then pop 75.841 ns/op 75.491 ns/op 1.00
LinkedList of 16000 items push then pop 6.8700 ns/op 6.9730 ns/op 0.99
array of 24000 items push then shift 2.3584 us/op 2.4140 us/op 0.98
LinkedList of 24000 items push then shift 6.9740 ns/op 7.1840 ns/op 0.97
array of 24000 items push then pop 99.257 ns/op 107.75 ns/op 0.92
LinkedList of 24000 items push then pop 6.8190 ns/op 6.9180 ns/op 0.99
intersect bitArray bitLen 8 6.4870 ns/op 6.3250 ns/op 1.03
intersect array and set length 8 37.381 ns/op 37.559 ns/op 1.00
intersect bitArray bitLen 128 29.487 ns/op 29.430 ns/op 1.00
intersect array and set length 128 612.81 ns/op 619.38 ns/op 0.99
bitArray.getTrueBitIndexes() bitLen 128 1.0120 us/op 1.0400 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 248 1.7860 us/op 1.8480 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 512 3.6230 us/op 3.7080 us/op 0.98
Buffer.concat 32 items 644.00 ns/op 618.00 ns/op 1.04
Uint8Array.set 32 items 1.1680 us/op 1.5220 us/op 0.77
Buffer.copy 2.0900 us/op 2.1450 us/op 0.97
Uint8Array.set - with subarray 1.7080 us/op 1.8590 us/op 0.92
Uint8Array.set - without subarray 909.00 ns/op 919.00 ns/op 0.99
getUint32 - dataview 205.00 ns/op 203.00 ns/op 1.01
getUint32 - manual 123.00 ns/op 123.00 ns/op 1.00
Set add up to 64 items then delete first 2.1523 us/op 2.0748 us/op 1.04
OrderedSet add up to 64 items then delete first 3.1829 us/op 3.4908 us/op 0.91
Set add up to 64 items then delete last 2.4753 us/op 2.5479 us/op 0.97
OrderedSet add up to 64 items then delete last 3.8086 us/op 3.8264 us/op 1.00
Set add up to 64 items then delete middle 2.4802 us/op 2.7049 us/op 0.92
OrderedSet add up to 64 items then delete middle 5.1721 us/op 5.5523 us/op 0.93
Set add up to 128 items then delete first 4.8653 us/op 5.2199 us/op 0.93
OrderedSet add up to 128 items then delete first 7.2274 us/op 9.9016 us/op 0.73
Set add up to 128 items then delete last 4.9514 us/op 5.7972 us/op 0.85
OrderedSet add up to 128 items then delete last 7.5728 us/op 8.5895 us/op 0.88
Set add up to 128 items then delete middle 4.8039 us/op 5.0377 us/op 0.95
OrderedSet add up to 128 items then delete middle 13.431 us/op 14.443 us/op 0.93
Set add up to 256 items then delete first 9.6627 us/op 10.788 us/op 0.90
OrderedSet add up to 256 items then delete first 14.495 us/op 16.564 us/op 0.88
Set add up to 256 items then delete last 9.6185 us/op 9.6135 us/op 1.00
OrderedSet add up to 256 items then delete last 15.198 us/op 14.390 us/op 1.06
Set add up to 256 items then delete middle 9.6164 us/op 9.4586 us/op 1.02
OrderedSet add up to 256 items then delete middle 39.629 us/op 41.607 us/op 0.95
transfer serialized Status (84 B) 2.3050 us/op 2.3590 us/op 0.98
copy serialized Status (84 B) 1.2250 us/op 1.2230 us/op 1.00
transfer serialized SignedVoluntaryExit (112 B) 2.3480 us/op 2.3160 us/op 1.01
copy serialized SignedVoluntaryExit (112 B) 1.3440 us/op 1.2270 us/op 1.10
transfer serialized ProposerSlashing (416 B) 2.4090 us/op 2.3850 us/op 1.01
copy serialized ProposerSlashing (416 B) 1.4070 us/op 1.2970 us/op 1.08
transfer serialized Attestation (485 B) 2.4170 us/op 2.4210 us/op 1.00
copy serialized Attestation (485 B) 1.4630 us/op 1.3030 us/op 1.12
transfer serialized AttesterSlashing (33232 B) 2.6170 us/op 2.4640 us/op 1.06
copy serialized AttesterSlashing (33232 B) 3.5360 us/op 3.5990 us/op 0.98
transfer serialized Small SignedBeaconBlock (128000 B) 2.9510 us/op 3.0630 us/op 0.96
copy serialized Small SignedBeaconBlock (128000 B) 9.3610 us/op 9.2560 us/op 1.01
transfer serialized Avg SignedBeaconBlock (200000 B) 3.4770 us/op 3.4920 us/op 1.00
copy serialized Avg SignedBeaconBlock (200000 B) 13.518 us/op 13.847 us/op 0.98
transfer serialized BlobsSidecar (524380 B) 3.6640 us/op 3.8480 us/op 0.95
copy serialized BlobsSidecar (524380 B) 62.427 us/op 61.583 us/op 1.01
transfer serialized Big SignedBeaconBlock (1000000 B) 3.9160 us/op 3.9320 us/op 1.00
copy serialized Big SignedBeaconBlock (1000000 B) 120.66 us/op 113.39 us/op 1.06
pass gossip attestations to forkchoice per slot 2.7674 ms/op 2.8008 ms/op 0.99
forkChoice updateHead vc 100000 bc 64 eq 0 450.21 us/op 450.64 us/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 0 2.8641 ms/op 2.7899 ms/op 1.03
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7382 ms/op 4.7911 ms/op 0.99
forkChoice updateHead vc 600000 bc 320 eq 0 2.8885 ms/op 2.8801 ms/op 1.00
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8267 ms/op 2.8935 ms/op 0.98
forkChoice updateHead vc 600000 bc 7200 eq 0 4.1605 ms/op 3.0596 ms/op 1.36
forkChoice updateHead vc 600000 bc 64 eq 1000 10.429 ms/op 10.337 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 10000 10.446 ms/op 10.469 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 13.630 ms/op 13.429 ms/op 1.01
computeDeltas 500000 validators 300 proto nodes 3.9301 ms/op 3.9582 ms/op 0.99
computeDeltas 500000 validators 1200 proto nodes 3.9398 ms/op 3.8593 ms/op 1.02
computeDeltas 500000 validators 7200 proto nodes 3.9393 ms/op 4.0248 ms/op 0.98
computeDeltas 750000 validators 300 proto nodes 5.8089 ms/op 5.9803 ms/op 0.97
computeDeltas 750000 validators 1200 proto nodes 5.8018 ms/op 7.3732 ms/op 0.79
computeDeltas 750000 validators 7200 proto nodes 5.8084 ms/op 6.5246 ms/op 0.89
computeDeltas 1400000 validators 300 proto nodes 10.802 ms/op 11.585 ms/op 0.93
computeDeltas 1400000 validators 1200 proto nodes 10.791 ms/op 11.968 ms/op 0.90
computeDeltas 1400000 validators 7200 proto nodes 10.914 ms/op 11.413 ms/op 0.96
computeDeltas 2100000 validators 300 proto nodes 16.527 ms/op 16.600 ms/op 1.00
computeDeltas 2100000 validators 1200 proto nodes 16.233 ms/op 16.609 ms/op 0.98
computeDeltas 2100000 validators 7200 proto nodes 16.893 ms/op 16.452 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 1.9730 ms/op 2.2732 ms/op 0.87
altair processAttestation - 250000 vs - 7PWei worstcase 2.9585 ms/op 2.8862 ms/op 1.03
altair processAttestation - setStatus - 1/6 committees join 124.75 us/op 125.66 us/op 0.99
altair processAttestation - setStatus - 1/3 committees join 240.35 us/op 242.05 us/op 0.99
altair processAttestation - setStatus - 1/2 committees join 340.48 us/op 345.29 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 436.66 us/op 428.04 us/op 1.02
altair processAttestation - setStatus - 4/5 committees join 594.67 us/op 588.27 us/op 1.01
altair processAttestation - setStatus - 100% committees join 704.42 us/op 701.78 us/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase 6.1073 ms/op 4.5316 ms/op 1.35
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.679 ms/op 32.143 ms/op 0.92
altair processBlock - 250000 vs - 7PWei worstcase 41.814 ms/op 35.059 ms/op 1.19
altair processBlock - 250000 vs - 7PWei worstcase hashState 92.806 ms/op 77.712 ms/op 1.19
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8841 ms/op 1.6691 ms/op 1.13
phase0 processBlock - 250000 vs - 7PWei worstcase 21.049 ms/op 21.032 ms/op 1.00
altair processEth1Data - 250000 vs - 7PWei normalcase 362.03 us/op 337.63 us/op 1.07
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.4490 us/op 5.7070 us/op 1.66
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 57.697 us/op 34.283 us/op 1.68
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.897 us/op 9.7280 us/op 1.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.1690 us/op 6.1210 us/op 1.01
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 238.15 us/op 132.75 us/op 1.79
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.7899 ms/op 1.9193 ms/op 0.93
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.2998 ms/op 2.3692 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.2979 ms/op 2.3657 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.5359 ms/op 4.5074 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3758 ms/op 2.3574 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.6381 ms/op 4.4324 ms/op 1.05
Tree 40 250000 create 443.67 ms/op 418.59 ms/op 1.06
Tree 40 250000 get(125000) 139.03 ns/op 140.90 ns/op 0.99
Tree 40 250000 set(125000) 1.3897 us/op 1.4320 us/op 0.97
Tree 40 250000 toArray() 14.974 ms/op 15.360 ms/op 0.97
Tree 40 250000 iterate all - toArray() + loop 15.329 ms/op 18.169 ms/op 0.84
Tree 40 250000 iterate all - get(i) 50.189 ms/op 51.727 ms/op 0.97
Array 250000 create 2.4082 ms/op 2.5226 ms/op 0.95
Array 250000 clone - spread 815.73 us/op 828.74 us/op 0.98
Array 250000 get(125000) 0.41500 ns/op 0.41500 ns/op 1.00
Array 250000 set(125000) 0.43700 ns/op 0.44400 ns/op 0.98
Array 250000 iterate all - loop 100.49 us/op 82.834 us/op 1.21
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.215 ms/op 42.949 ms/op 0.98
Array.fill - length 1000000 3.6330 ms/op 3.5643 ms/op 1.02
Array push - length 1000000 12.880 ms/op 12.661 ms/op 1.02
Array.get 0.27539 ns/op 0.27417 ns/op 1.00
Uint8Array.get 0.44229 ns/op 0.43988 ns/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.574 ms/op 16.005 ms/op 1.04
altair processEpoch - mainnet_e81889 292.28 ms/op 234.92 ms/op 1.24
mainnet_e81889 - altair beforeProcessEpoch 19.455 ms/op 18.958 ms/op 1.03
mainnet_e81889 - altair processJustificationAndFinalization 7.2910 us/op 5.5210 us/op 1.32
mainnet_e81889 - altair processInactivityUpdates 4.1934 ms/op 4.2323 ms/op 0.99
mainnet_e81889 - altair processRewardsAndPenalties 45.134 ms/op 39.134 ms/op 1.15
mainnet_e81889 - altair processRegistryUpdates 729.00 ns/op 708.00 ns/op 1.03
mainnet_e81889 - altair processSlashings 189.00 ns/op 187.00 ns/op 1.01
mainnet_e81889 - altair processEth1DataReset 177.00 ns/op 182.00 ns/op 0.97
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2572 ms/op 1.2268 ms/op 1.02
mainnet_e81889 - altair processSlashingsReset 1.0760 us/op 849.00 ns/op 1.27
mainnet_e81889 - altair processRandaoMixesReset 1.2360 us/op 1.1300 us/op 1.09
mainnet_e81889 - altair processHistoricalRootsUpdate 186.00 ns/op 182.00 ns/op 1.02
mainnet_e81889 - altair processParticipationFlagUpdates 510.00 ns/op 513.00 ns/op 0.99
mainnet_e81889 - altair processSyncCommitteeUpdates 141.00 ns/op 143.00 ns/op 0.99
mainnet_e81889 - altair afterProcessEpoch 45.837 ms/op 44.595 ms/op 1.03
capella processEpoch - mainnet_e217614 910.25 ms/op 873.13 ms/op 1.04
mainnet_e217614 - capella beforeProcessEpoch 64.176 ms/op 68.837 ms/op 0.93
mainnet_e217614 - capella processJustificationAndFinalization 5.9970 us/op 5.2430 us/op 1.14
mainnet_e217614 - capella processInactivityUpdates 16.150 ms/op 15.505 ms/op 1.04
mainnet_e217614 - capella processRewardsAndPenalties 203.35 ms/op 170.60 ms/op 1.19
mainnet_e217614 - capella processRegistryUpdates 9.7110 us/op 6.5290 us/op 1.49
mainnet_e217614 - capella processSlashings 181.00 ns/op 186.00 ns/op 0.97
mainnet_e217614 - capella processEth1DataReset 177.00 ns/op 180.00 ns/op 0.98
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.2518 ms/op 4.1598 ms/op 1.02
mainnet_e217614 - capella processSlashingsReset 1.0750 us/op 877.00 ns/op 1.23
mainnet_e217614 - capella processRandaoMixesReset 1.6820 us/op 1.2040 us/op 1.40
mainnet_e217614 - capella processHistoricalRootsUpdate 180.00 ns/op 185.00 ns/op 0.97
mainnet_e217614 - capella processParticipationFlagUpdates 555.00 ns/op 538.00 ns/op 1.03
mainnet_e217614 - capella afterProcessEpoch 117.53 ms/op 143.57 ms/op 0.82
phase0 processEpoch - mainnet_e58758 276.59 ms/op 303.22 ms/op 0.91
mainnet_e58758 - phase0 beforeProcessEpoch 66.467 ms/op 70.511 ms/op 0.94
mainnet_e58758 - phase0 processJustificationAndFinalization 5.7780 us/op 5.4250 us/op 1.07
mainnet_e58758 - phase0 processRewardsAndPenalties 37.512 ms/op 35.254 ms/op 1.06
mainnet_e58758 - phase0 processRegistryUpdates 3.4120 us/op 3.1180 us/op 1.09
mainnet_e58758 - phase0 processSlashings 195.00 ns/op 188.00 ns/op 1.04
mainnet_e58758 - phase0 processEth1DataReset 191.00 ns/op 181.00 ns/op 1.06
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1669 ms/op 1.1805 ms/op 0.99
mainnet_e58758 - phase0 processSlashingsReset 998.00 ns/op 923.00 ns/op 1.08
mainnet_e58758 - phase0 processRandaoMixesReset 1.6070 us/op 1.2130 us/op 1.32
mainnet_e58758 - phase0 processHistoricalRootsUpdate 187.00 ns/op 181.00 ns/op 1.03
mainnet_e58758 - phase0 processParticipationRecordUpdates 912.00 ns/op 856.00 ns/op 1.07
mainnet_e58758 - phase0 afterProcessEpoch 36.884 ms/op 35.667 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3971 ms/op 1.3458 ms/op 1.04
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9253 ms/op 1.9425 ms/op 0.99
altair processInactivityUpdates - 250000 normalcase 21.300 ms/op 16.950 ms/op 1.26
altair processInactivityUpdates - 250000 worstcase 22.193 ms/op 16.481 ms/op 1.35
phase0 processRegistryUpdates - 250000 normalcase 5.8850 us/op 6.8050 us/op 0.86
phase0 processRegistryUpdates - 250000 badcase_full_deposits 257.70 us/op 230.37 us/op 1.12
phase0 processRegistryUpdates - 250000 worstcase 0.5 115.08 ms/op 111.82 ms/op 1.03
altair processRewardsAndPenalties - 250000 normalcase 28.489 ms/op 26.735 ms/op 1.07
altair processRewardsAndPenalties - 250000 worstcase 32.215 ms/op 26.169 ms/op 1.23
phase0 getAttestationDeltas - 250000 normalcase 8.6451 ms/op 6.9801 ms/op 1.24
phase0 getAttestationDeltas - 250000 worstcase 6.1708 ms/op 6.4648 ms/op 0.95
phase0 processSlashings - 250000 worstcase 93.231 us/op 77.516 us/op 1.20
altair processSyncCommitteeUpdates - 250000 10.929 ms/op 10.718 ms/op 1.02
BeaconState.hashTreeRoot - No change 220.00 ns/op 211.00 ns/op 1.04
BeaconState.hashTreeRoot - 1 full validator 89.047 us/op 87.180 us/op 1.02
BeaconState.hashTreeRoot - 32 full validator 1.0819 ms/op 1.1152 ms/op 0.97
BeaconState.hashTreeRoot - 512 full validator 11.340 ms/op 10.308 ms/op 1.10
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 115.03 us/op 119.53 us/op 0.96
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8478 ms/op 1.4803 ms/op 1.25
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.309 ms/op 21.900 ms/op 1.29
BeaconState.hashTreeRoot - 1 balances 94.343 us/op 82.322 us/op 1.15
BeaconState.hashTreeRoot - 32 balances 1.0853 ms/op 993.37 us/op 1.09
BeaconState.hashTreeRoot - 512 balances 10.055 ms/op 8.2077 ms/op 1.23
BeaconState.hashTreeRoot - 250000 balances 220.34 ms/op 199.65 ms/op 1.10
aggregationBits - 2048 els - zipIndexesInBitList 22.143 us/op 20.993 us/op 1.05
byteArrayEquals 32 54.894 ns/op 52.537 ns/op 1.04
Buffer.compare 32 17.729 ns/op 16.785 ns/op 1.06
byteArrayEquals 1024 1.6286 us/op 1.5677 us/op 1.04
Buffer.compare 1024 26.488 ns/op 25.170 ns/op 1.05
byteArrayEquals 16384 25.759 us/op 25.034 us/op 1.03
Buffer.compare 16384 212.67 ns/op 175.56 ns/op 1.21
byteArrayEquals 123687377 194.42 ms/op 188.59 ms/op 1.03
Buffer.compare 123687377 7.2171 ms/op 6.0703 ms/op 1.19
byteArrayEquals 32 - diff last byte 52.959 ns/op 52.015 ns/op 1.02
Buffer.compare 32 - diff last byte 17.536 ns/op 16.877 ns/op 1.04
byteArrayEquals 1024 - diff last byte 1.6089 us/op 1.5736 us/op 1.02
Buffer.compare 1024 - diff last byte 25.509 ns/op 24.812 ns/op 1.03
byteArrayEquals 16384 - diff last byte 25.488 us/op 25.067 us/op 1.02
Buffer.compare 16384 - diff last byte 182.06 ns/op 175.22 ns/op 1.04
byteArrayEquals 123687377 - diff last byte 194.80 ms/op 190.83 ms/op 1.02
Buffer.compare 123687377 - diff last byte 6.8754 ms/op 7.5862 ms/op 0.91
byteArrayEquals 32 - random bytes 5.1180 ns/op 5.2050 ns/op 0.98
Buffer.compare 32 - random bytes 18.145 ns/op 17.245 ns/op 1.05
byteArrayEquals 1024 - random bytes 5.1050 ns/op 5.1080 ns/op 1.00
Buffer.compare 1024 - random bytes 18.166 ns/op 16.996 ns/op 1.07
byteArrayEquals 16384 - random bytes 5.1030 ns/op 5.4600 ns/op 0.93
Buffer.compare 16384 - random bytes 18.218 ns/op 17.038 ns/op 1.07
byteArrayEquals 123687377 - random bytes 6.3800 ns/op 6.4600 ns/op 0.99
Buffer.compare 123687377 - random bytes 23.190 ns/op 18.130 ns/op 1.28
regular array get 100000 times 33.055 us/op 32.679 us/op 1.01
wrappedArray get 100000 times 33.041 us/op 32.603 us/op 1.01
arrayWithProxy get 100000 times 11.775 ms/op 12.755 ms/op 0.92
ssz.Root.equals 46.088 ns/op 46.368 ns/op 0.99
byteArrayEquals 45.264 ns/op 45.555 ns/op 0.99
Buffer.compare 10.342 ns/op 10.457 ns/op 0.99
processSlot - 1 slots 10.991 us/op 10.285 us/op 1.07
processSlot - 32 slots 1.9727 ms/op 1.9292 ms/op 1.02
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.9922 ms/op 2.9850 ms/op 1.00
getCommitteeAssignments - req 1 vs - 250000 vc 2.1066 ms/op 2.1192 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 4.1004 ms/op 4.1363 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3808 ms/op 4.4183 ms/op 0.99
findModifiedValidators - 10000 modified validators 724.06 ms/op 726.78 ms/op 1.00
findModifiedValidators - 1000 modified validators 706.88 ms/op 733.58 ms/op 0.96
findModifiedValidators - 100 modified validators 197.38 ms/op 228.44 ms/op 0.86
findModifiedValidators - 10 modified validators 238.05 ms/op 139.67 ms/op 1.70
findModifiedValidators - 1 modified validators 178.32 ms/op 160.90 ms/op 1.11
findModifiedValidators - no difference 190.74 ms/op 181.77 ms/op 1.05
compare ViewDUs 6.1552 s/op 6.0838 s/op 1.01
compare each validator Uint8Array 1.5088 s/op 1.5208 s/op 0.99
compare ViewDU to Uint8Array 1.0225 s/op 1.0463 s/op 0.98
migrate state 1000000 validators, 24 modified, 0 new 858.74 ms/op 811.58 ms/op 1.06
migrate state 1000000 validators, 1700 modified, 1000 new 1.1279 s/op 1.0905 s/op 1.03
migrate state 1000000 validators, 3400 modified, 2000 new 1.2580 s/op 1.2190 s/op 1.03
migrate state 1500000 validators, 24 modified, 0 new 905.20 ms/op 874.69 ms/op 1.03
migrate state 1500000 validators, 1700 modified, 1000 new 1.0901 s/op 1.1343 s/op 0.96
migrate state 1500000 validators, 3400 modified, 2000 new 1.2984 s/op 1.2936 s/op 1.00
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4100 ns/op 4.3700 ns/op 1.01
state getBlockRootAtSlot - 250000 vs - 7PWei 462.13 ns/op 404.06 ns/op 1.14
naive computeProposerIndex 100000 validators 47.624 ms/op 58.628 ms/op 0.81
computeProposerIndex 100000 validators 1.5222 ms/op 1.5707 ms/op 0.97
naiveGetNextSyncCommitteeIndices 1000 validators 6.7765 s/op 8.1241 s/op 0.83
getNextSyncCommitteeIndices 1000 validators 111.86 ms/op 121.67 ms/op 0.92
naiveGetNextSyncCommitteeIndices 10000 validators 6.7936 s/op 7.8513 s/op 0.87
getNextSyncCommitteeIndices 10000 validators 111.62 ms/op 116.45 ms/op 0.96
naiveGetNextSyncCommitteeIndices 100000 validators 6.9628 s/op 7.4951 s/op 0.93
getNextSyncCommitteeIndices 100000 validators 112.35 ms/op 117.38 ms/op 0.96
naive computeShuffledIndex 100000 validators 21.572 s/op 23.553 s/op 0.92
cached computeShuffledIndex 100000 validators 541.63 ms/op 570.72 ms/op 0.95
naive computeShuffledIndex 2000000 validators 440.62 s/op 458.90 s/op 0.96
cached computeShuffledIndex 2000000 validators 30.207 s/op 31.180 s/op 0.97
computeProposers - vc 250000 625.08 us/op 622.21 us/op 1.00
computeEpochShuffling - vc 250000 41.637 ms/op 41.913 ms/op 0.99
getNextSyncCommittee - vc 250000 10.282 ms/op 10.498 ms/op 0.98
computeSigningRoot for AttestationData 19.098 us/op 19.971 us/op 0.96
hash AttestationData serialized data then Buffer.toString(base64) 1.5980 us/op 1.5897 us/op 1.01
toHexString serialized data 1.1366 us/op 1.1695 us/op 0.97
Buffer.toString(base64) 166.40 ns/op 171.07 ns/op 0.97
nodejs block root to RootHex using toHex 152.33 ns/op 143.25 ns/op 1.06
nodejs block root to RootHex using toRootHex 97.800 ns/op 96.502 ns/op 1.01
browser block root to RootHex using the deprecated toHexString 211.73 ns/op 223.28 ns/op 0.95
browser block root to RootHex using toHex 171.08 ns/op 180.31 ns/op 0.95
browser block root to RootHex using toRootHex 160.90 ns/op 164.68 ns/op 0.98

by benchmarkbot/action

Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

just for reference, this ethereum/consensus-specs#4179 is the actual PR


export function computeWeakSubjectivityPeriodFromConstituentsElectra(
totalBalanceByIncrement: number,
balanceChurnLimit: number, // Note this is not the same as churnLimit in `computeWeakSubjectivityPeriodFromConstituentsPhase0`
Copy link
Member

Choose a reason for hiding this comment

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

the function signature is really not ideal, it would be better to get it closer to how the spec works but I can see why we do it like this as well

@nflaig
Copy link
Member

nflaig commented May 3, 2025

could merge this as is once merge conflicts are resolved, conflicts are gone now

Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

LGTM

@nflaig nflaig closed this May 10, 2025
@nflaig nflaig reopened this May 10, 2025
@nflaig nflaig merged commit d92238f into unstable May 13, 2025
36 of 37 checks passed
@nflaig nflaig deleted the nc/ws-electra branch May 13, 2025 12:07
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.31.0 🎉

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.

Update weak subjectivity period calculation for Electra

4 participants