Skip to content

Commit

Permalink
chore: fix lint error (#7152)
Browse files Browse the repository at this point in the history
Fix lint error
  • Loading branch information
nazarhussain authored Oct 11, 2024
1 parent a570048 commit 4b7d871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fork-choice/src/protoArray/computeDeltas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function computeDeltas(
// It is possible that there was a vote for an unknown validator if we change our justified
// state to a new state with a higher epoch that is on a different fork because that fork may have
// on-boarded fewer validators than the prior fork.
newBalance = newBalances === oldBalances ? oldBalance : newBalances[vIndex] ?? 0;
newBalance = newBalances === oldBalances ? oldBalance : (newBalances[vIndex] ?? 0);

if (equivocatingIndices.size > 0 && equivocatingIndices.has(vIndex)) {
// this function could be called multiple times but we only want to process slashing validator for 1 time
Expand Down

1 comment on commit 4b7d871

@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: 4b7d871 Previous: a570048 Ratio
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.4810 us/op 2.7590 us/op 3.44
findModifiedValidators - 1000 modified validators 740.92 ms/op 185.57 ms/op 3.99
Full benchmark results
Benchmark suite Current: 4b7d871 Previous: a570048 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 4.0487 ms/op 1.8049 ms/op 2.24
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 91.757 us/op 39.305 us/op 2.33
BLS verify - blst 1.1566 ms/op 1.0244 ms/op 1.13
BLS verifyMultipleSignatures 3 - blst 1.6847 ms/op 1.3309 ms/op 1.27
BLS verifyMultipleSignatures 8 - blst 2.6354 ms/op 2.0684 ms/op 1.27
BLS verifyMultipleSignatures 32 - blst 8.0742 ms/op 4.4314 ms/op 1.82
BLS verifyMultipleSignatures 64 - blst 13.495 ms/op 8.2348 ms/op 1.64
BLS verifyMultipleSignatures 128 - blst 21.267 ms/op 15.852 ms/op 1.34
BLS deserializing 10000 signatures 774.79 ms/op 585.60 ms/op 1.32
BLS deserializing 100000 signatures 8.8968 s/op 6.0973 s/op 1.46
BLS verifyMultipleSignatures - same message - 3 - blst 1.2624 ms/op 932.28 us/op 1.35
BLS verifyMultipleSignatures - same message - 8 - blst 1.4241 ms/op 1.0502 ms/op 1.36
BLS verifyMultipleSignatures - same message - 32 - blst 2.2022 ms/op 1.6550 ms/op 1.33
BLS verifyMultipleSignatures - same message - 64 - blst 3.7064 ms/op 2.5295 ms/op 1.47
BLS verifyMultipleSignatures - same message - 128 - blst 5.7015 ms/op 4.1511 ms/op 1.37
BLS aggregatePubkeys 32 - blst 26.118 us/op 18.098 us/op 1.44
BLS aggregatePubkeys 128 - blst 86.956 us/op 62.286 us/op 1.40
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 117.93 ms/op 58.915 ms/op 2.00
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 107.22 ms/op 42.268 ms/op 2.54
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 45.417 ms/op 28.409 ms/op 1.60
getSlashingsAndExits - default max 157.21 us/op 70.900 us/op 2.22
getSlashingsAndExits - 2k 503.76 us/op 254.83 us/op 1.98
proposeBlockBody type=full, size=empty 6.4832 ms/op 4.7475 ms/op 1.37
isKnown best case - 1 super set check 638.00 ns/op 468.00 ns/op 1.36
isKnown normal case - 2 super set checks 641.00 ns/op 435.00 ns/op 1.47
isKnown worse case - 16 super set checks 769.00 ns/op 434.00 ns/op 1.77
InMemoryCheckpointStateCache - add get delete 5.6480 us/op 2.8940 us/op 1.95
updateUnfinalizedPubkeys - updating 10 pubkeys 1.9393 ms/op 953.07 us/op 2.03
updateUnfinalizedPubkeys - updating 100 pubkeys 5.7232 ms/op 2.5990 ms/op 2.20
updateUnfinalizedPubkeys - updating 1000 pubkeys 68.837 ms/op 36.919 ms/op 1.86
validate api signedAggregateAndProof - struct 1.9635 ms/op 1.5833 ms/op 1.24
validate gossip signedAggregateAndProof - struct 1.8904 ms/op 1.4578 ms/op 1.30
batch validate gossip attestation - vc 640000 - chunk 32 171.78 us/op 118.35 us/op 1.45
batch validate gossip attestation - vc 640000 - chunk 64 158.07 us/op 100.77 us/op 1.57
batch validate gossip attestation - vc 640000 - chunk 128 148.52 us/op 95.188 us/op 1.56
batch validate gossip attestation - vc 640000 - chunk 256 135.11 us/op 91.632 us/op 1.47
pickEth1Vote - no votes 1.3380 ms/op 758.82 us/op 1.76
pickEth1Vote - max votes 10.032 ms/op 5.3807 ms/op 1.86
pickEth1Vote - Eth1Data hashTreeRoot value x2048 18.975 ms/op 12.170 ms/op 1.56
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.943 ms/op 17.734 ms/op 1.63
pickEth1Vote - Eth1Data fastSerialize value x2048 624.22 us/op 313.01 us/op 1.99
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.6019 ms/op 2.9080 ms/op 1.24
bytes32 toHexString 692.00 ns/op 519.00 ns/op 1.33
bytes32 Buffer.toString(hex) 271.00 ns/op 385.00 ns/op 0.70
bytes32 Buffer.toString(hex) from Uint8Array 494.00 ns/op 470.00 ns/op 1.05
bytes32 Buffer.toString(hex) + 0x 280.00 ns/op 397.00 ns/op 0.71
Object access 1 prop 0.20400 ns/op 0.29700 ns/op 0.69
Map access 1 prop 0.14000 ns/op 0.29700 ns/op 0.47
Object get x1000 6.4560 ns/op 4.7240 ns/op 1.37
Map get x1000 7.1760 ns/op 5.3120 ns/op 1.35
Object set x1000 53.201 ns/op 22.514 ns/op 2.36
Map set x1000 38.352 ns/op 18.219 ns/op 2.11
Return object 10000 times 0.33090 ns/op 0.27920 ns/op 1.19
Throw Error 10000 times 3.4949 us/op 2.5346 us/op 1.38
toHex 184.12 ns/op 98.833 ns/op 1.86
Buffer.from 166.81 ns/op 90.148 ns/op 1.85
shared Buffer 102.59 ns/op 61.153 ns/op 1.68
fastMsgIdFn sha256 / 200 bytes 2.7360 us/op 1.8620 us/op 1.47
fastMsgIdFn h32 xxhash / 200 bytes 332.00 ns/op 372.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 200 bytes 310.00 ns/op 411.00 ns/op 0.75
fastMsgIdFn sha256 / 1000 bytes 8.2820 us/op 5.3520 us/op 1.55
fastMsgIdFn h32 xxhash / 1000 bytes 461.00 ns/op 506.00 ns/op 0.91
fastMsgIdFn h64 xxhash / 1000 bytes 425.00 ns/op 484.00 ns/op 0.88
fastMsgIdFn sha256 / 10000 bytes 78.674 us/op 44.031 us/op 1.79
fastMsgIdFn h32 xxhash / 10000 bytes 2.1270 us/op 1.7440 us/op 1.22
fastMsgIdFn h64 xxhash / 10000 bytes 1.3740 us/op 1.2090 us/op 1.14
send data - 1000 256B messages 17.125 ms/op 9.7665 ms/op 1.75
send data - 1000 512B messages 21.292 ms/op 12.588 ms/op 1.69
send data - 1000 1024B messages 30.817 ms/op 19.670 ms/op 1.57
send data - 1000 1200B messages 26.352 ms/op 24.510 ms/op 1.08
send data - 1000 2048B messages 40.715 ms/op 29.250 ms/op 1.39
send data - 1000 4096B messages 40.644 ms/op 26.508 ms/op 1.53
send data - 1000 16384B messages 103.24 ms/op 69.813 ms/op 1.48
send data - 1000 65536B messages 261.74 ms/op 260.12 ms/op 1.01
enrSubnets - fastDeserialize 64 bits 1.7130 us/op 1.1790 us/op 1.45
enrSubnets - ssz BitVector 64 bits 527.00 ns/op 506.00 ns/op 1.04
enrSubnets - fastDeserialize 4 bits 231.00 ns/op 348.00 ns/op 0.66
enrSubnets - ssz BitVector 4 bits 572.00 ns/op 540.00 ns/op 1.06
prioritizePeers score -10:0 att 32-0.1 sync 2-0 230.60 us/op 126.35 us/op 1.83
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 266.11 us/op 157.68 us/op 1.69
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 376.89 us/op 295.03 us/op 1.28
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 599.47 us/op 452.79 us/op 1.32
prioritizePeers score 0:0 att 64-1 sync 4-1 1.0007 ms/op 699.83 us/op 1.43
array of 16000 items push then shift 1.8600 us/op 1.2327 us/op 1.51
LinkedList of 16000 items push then shift 9.5550 ns/op 7.1390 ns/op 1.34
array of 16000 items push then pop 179.98 ns/op 85.239 ns/op 2.11
LinkedList of 16000 items push then pop 9.8340 ns/op 6.1050 ns/op 1.61
array of 24000 items push then shift 3.2316 us/op 1.7810 us/op 1.81
LinkedList of 24000 items push then shift 10.452 ns/op 6.7200 ns/op 1.56
array of 24000 items push then pop 241.59 ns/op 110.97 ns/op 2.18
LinkedList of 24000 items push then pop 9.0620 ns/op 5.9730 ns/op 1.52
intersect bitArray bitLen 8 8.0590 ns/op 5.0640 ns/op 1.59
intersect array and set length 8 91.357 ns/op 37.792 ns/op 2.42
intersect bitArray bitLen 128 33.325 ns/op 24.980 ns/op 1.33
intersect array and set length 128 1.0925 us/op 553.50 ns/op 1.97
bitArray.getTrueBitIndexes() bitLen 128 3.0180 us/op 2.4790 us/op 1.22
bitArray.getTrueBitIndexes() bitLen 248 4.1720 us/op 3.4060 us/op 1.22
bitArray.getTrueBitIndexes() bitLen 512 10.266 us/op 8.1900 us/op 1.25
Buffer.concat 32 items 1.1760 us/op 1.0220 us/op 1.15
Uint8Array.set 32 items 2.2740 us/op 2.0600 us/op 1.10
Buffer.copy 2.2160 us/op 2.0710 us/op 1.07
Uint8Array.set - with subarray 4.0120 us/op 2.3430 us/op 1.71
Uint8Array.set - without subarray 1.6790 us/op 1.6860 us/op 1.00
getUint32 - dataview 358.00 ns/op 431.00 ns/op 0.83
getUint32 - manual 309.00 ns/op 335.00 ns/op 0.92
Set add up to 64 items then delete first 3.3416 us/op 1.7809 us/op 1.88
OrderedSet add up to 64 items then delete first 5.0974 us/op 2.7297 us/op 1.87
Set add up to 64 items then delete last 3.7419 us/op 1.9343 us/op 1.93
OrderedSet add up to 64 items then delete last 6.1261 us/op 3.0306 us/op 2.02
Set add up to 64 items then delete middle 3.7302 us/op 1.9379 us/op 1.92
OrderedSet add up to 64 items then delete middle 7.5999 us/op 4.6877 us/op 1.62
Set add up to 128 items then delete first 7.1703 us/op 3.9699 us/op 1.81
OrderedSet add up to 128 items then delete first 11.209 us/op 5.9907 us/op 1.87
Set add up to 128 items then delete last 7.0618 us/op 3.9562 us/op 1.78
OrderedSet add up to 128 items then delete last 11.658 us/op 6.1849 us/op 1.88
Set add up to 128 items then delete middle 7.2618 us/op 3.9506 us/op 1.84
OrderedSet add up to 128 items then delete middle 17.998 us/op 11.611 us/op 1.55
Set add up to 256 items then delete first 14.463 us/op 7.8321 us/op 1.85
OrderedSet add up to 256 items then delete first 23.408 us/op 11.959 us/op 1.96
Set add up to 256 items then delete last 15.133 us/op 7.8332 us/op 1.93
OrderedSet add up to 256 items then delete last 22.398 us/op 12.337 us/op 1.82
Set add up to 256 items then delete middle 13.413 us/op 7.7443 us/op 1.73
OrderedSet add up to 256 items then delete middle 51.677 us/op 34.444 us/op 1.50
transfer serialized Status (84 B) 1.5490 us/op 1.4550 us/op 1.06
copy serialized Status (84 B) 1.4320 us/op 1.2380 us/op 1.16
transfer serialized SignedVoluntaryExit (112 B) 1.8380 us/op 1.5340 us/op 1.20
copy serialized SignedVoluntaryExit (112 B) 1.4660 us/op 1.2890 us/op 1.14
transfer serialized ProposerSlashing (416 B) 2.2030 us/op 2.1400 us/op 1.03
copy serialized ProposerSlashing (416 B) 2.0920 us/op 1.9350 us/op 1.08
transfer serialized Attestation (485 B) 2.3560 us/op 2.3330 us/op 1.01
copy serialized Attestation (485 B) 2.1380 us/op 1.9360 us/op 1.10
transfer serialized AttesterSlashing (33232 B) 2.1250 us/op 2.4920 us/op 0.85
copy serialized AttesterSlashing (33232 B) 9.1360 us/op 4.5360 us/op 2.01
transfer serialized Small SignedBeaconBlock (128000 B) 4.2730 us/op 2.8030 us/op 1.52
copy serialized Small SignedBeaconBlock (128000 B) 32.341 us/op 14.554 us/op 2.22
transfer serialized Avg SignedBeaconBlock (200000 B) 3.9620 us/op 2.6950 us/op 1.47
copy serialized Avg SignedBeaconBlock (200000 B) 32.726 us/op 13.388 us/op 2.44
transfer serialized BlobsSidecar (524380 B) 4.2620 us/op 2.3590 us/op 1.81
copy serialized BlobsSidecar (524380 B) 128.09 us/op 71.766 us/op 1.78
transfer serialized Big SignedBeaconBlock (1000000 B) 4.7610 us/op 3.1960 us/op 1.49
copy serialized Big SignedBeaconBlock (1000000 B) 300.60 us/op 141.32 us/op 2.13
pass gossip attestations to forkchoice per slot 3.0563 ms/op 2.3942 ms/op 1.28
forkChoice updateHead vc 100000 bc 64 eq 0 484.22 us/op 383.92 us/op 1.26
forkChoice updateHead vc 600000 bc 64 eq 0 3.8185 ms/op 2.4086 ms/op 1.59
forkChoice updateHead vc 1000000 bc 64 eq 0 6.1288 ms/op 3.9508 ms/op 1.55
forkChoice updateHead vc 600000 bc 320 eq 0 3.6971 ms/op 2.2910 ms/op 1.61
forkChoice updateHead vc 600000 bc 1200 eq 0 3.9882 ms/op 2.3869 ms/op 1.67
forkChoice updateHead vc 600000 bc 7200 eq 0 4.4965 ms/op 2.5468 ms/op 1.77
forkChoice updateHead vc 600000 bc 64 eq 1000 11.559 ms/op 9.3361 ms/op 1.24
forkChoice updateHead vc 600000 bc 64 eq 10000 13.797 ms/op 9.3281 ms/op 1.48
forkChoice updateHead vc 600000 bc 64 eq 300000 18.967 ms/op 11.328 ms/op 1.67
computeDeltas 500000 validators 300 proto nodes 4.9100 ms/op 3.2349 ms/op 1.52
computeDeltas 500000 validators 1200 proto nodes 5.1432 ms/op 3.1966 ms/op 1.61
computeDeltas 500000 validators 7200 proto nodes 5.2122 ms/op 3.2073 ms/op 1.63
computeDeltas 750000 validators 300 proto nodes 7.9131 ms/op 5.1050 ms/op 1.55
computeDeltas 750000 validators 1200 proto nodes 7.7382 ms/op 5.1589 ms/op 1.50
computeDeltas 750000 validators 7200 proto nodes 8.5797 ms/op 4.9629 ms/op 1.73
computeDeltas 1400000 validators 300 proto nodes 15.661 ms/op 9.1185 ms/op 1.72
computeDeltas 1400000 validators 1200 proto nodes 14.913 ms/op 9.0294 ms/op 1.65
computeDeltas 1400000 validators 7200 proto nodes 14.697 ms/op 9.2023 ms/op 1.60
computeDeltas 2100000 validators 300 proto nodes 21.168 ms/op 13.371 ms/op 1.58
computeDeltas 2100000 validators 1200 proto nodes 22.345 ms/op 13.907 ms/op 1.61
computeDeltas 2100000 validators 7200 proto nodes 21.443 ms/op 13.657 ms/op 1.57
altair processAttestation - 250000 vs - 7PWei normalcase 3.0354 ms/op 1.4204 ms/op 2.14
altair processAttestation - 250000 vs - 7PWei worstcase 4.0664 ms/op 2.1261 ms/op 1.91
altair processAttestation - setStatus - 1/6 committees join 144.26 us/op 62.742 us/op 2.30
altair processAttestation - setStatus - 1/3 committees join 259.87 us/op 124.69 us/op 2.08
altair processAttestation - setStatus - 1/2 committees join 338.87 us/op 195.32 us/op 1.73
altair processAttestation - setStatus - 2/3 committees join 451.85 us/op 248.24 us/op 1.82
altair processAttestation - setStatus - 4/5 committees join 595.09 us/op 372.33 us/op 1.60
altair processAttestation - setStatus - 100% committees join 707.13 us/op 470.86 us/op 1.50
altair processBlock - 250000 vs - 7PWei normalcase 10.360 ms/op 3.5819 ms/op 2.89
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.492 ms/op 25.542 ms/op 1.15
altair processBlock - 250000 vs - 7PWei worstcase 43.731 ms/op 34.484 ms/op 1.27
altair processBlock - 250000 vs - 7PWei worstcase hashState 96.006 ms/op 81.037 ms/op 1.18
phase0 processBlock - 250000 vs - 7PWei normalcase 3.7823 ms/op 1.8043 ms/op 2.10
phase0 processBlock - 250000 vs - 7PWei worstcase 31.356 ms/op 22.309 ms/op 1.41
altair processEth1Data - 250000 vs - 7PWei normalcase 625.27 us/op 231.49 us/op 2.70
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.5470 us/op 4.5550 us/op 1.66
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 49.451 us/op 32.201 us/op 1.54
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 14.995 us/op 6.2690 us/op 2.39
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.4810 us/op 2.7590 us/op 3.44
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 211.03 us/op 129.00 us/op 1.64
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4177 ms/op 1.4316 ms/op 0.99
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.0085 ms/op 1.2222 ms/op 1.64
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8675 ms/op 1.2098 ms/op 1.54
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.8800 ms/op 2.6163 ms/op 1.87
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.1882 ms/op 1.0913 ms/op 2.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.0143 ms/op 2.6849 ms/op 1.87
Tree 40 250000 create 367.95 ms/op 184.37 ms/op 2.00
Tree 40 250000 get(125000) 184.16 ns/op 115.89 ns/op 1.59
Tree 40 250000 set(125000) 1.5668 us/op 539.74 ns/op 2.90
Tree 40 250000 toArray() 26.139 ms/op 9.8652 ms/op 2.65
Tree 40 250000 iterate all - toArray() + loop 23.322 ms/op 9.9438 ms/op 2.35
Tree 40 250000 iterate all - get(i) 64.292 ms/op 41.313 ms/op 1.56
Array 250000 create 4.2010 ms/op 2.3976 ms/op 1.75
Array 250000 clone - spread 1.6671 ms/op 1.3257 ms/op 1.26
Array 250000 get(125000) 0.47300 ns/op 0.57400 ns/op 0.82
Array 250000 set(125000) 0.49700 ns/op 0.58300 ns/op 0.85
Array 250000 iterate all - loop 90.351 us/op 77.376 us/op 1.17
phase0 afterProcessEpoch - 250000 vs - 7PWei 104.13 ms/op 77.308 ms/op 1.35
Array.fill - length 1000000 7.4063 ms/op 2.5677 ms/op 2.88
Array push - length 1000000 23.080 ms/op 13.959 ms/op 1.65
Array.get 0.30548 ns/op 0.26071 ns/op 1.17
Uint8Array.get 0.46536 ns/op 0.34350 ns/op 1.35
phase0 beforeProcessEpoch - 250000 vs - 7PWei 22.831 ms/op 13.688 ms/op 1.67
altair processEpoch - mainnet_e81889 376.79 ms/op 308.92 ms/op 1.22
mainnet_e81889 - altair beforeProcessEpoch 23.417 ms/op 18.738 ms/op 1.25
mainnet_e81889 - altair processJustificationAndFinalization 16.460 us/op 12.158 us/op 1.35
mainnet_e81889 - altair processInactivityUpdates 7.1824 ms/op 4.5184 ms/op 1.59
mainnet_e81889 - altair processRewardsAndPenalties 52.264 ms/op 50.907 ms/op 1.03
mainnet_e81889 - altair processRegistryUpdates 2.0030 us/op 1.8220 us/op 1.10
mainnet_e81889 - altair processSlashings 670.00 ns/op 699.00 ns/op 0.96
mainnet_e81889 - altair processEth1DataReset 450.00 ns/op 676.00 ns/op 0.67
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.4374 ms/op 1.0608 ms/op 2.30
mainnet_e81889 - altair processSlashingsReset 4.7340 us/op 1.4440 us/op 3.28
mainnet_e81889 - altair processRandaoMixesReset 8.4540 us/op 2.6280 us/op 3.22
mainnet_e81889 - altair processHistoricalRootsUpdate 1.4730 us/op 662.00 ns/op 2.23
mainnet_e81889 - altair processParticipationFlagUpdates 2.5670 us/op 3.5820 us/op 0.72
mainnet_e81889 - altair processSyncCommitteeUpdates 635.00 ns/op 750.00 ns/op 0.85
mainnet_e81889 - altair afterProcessEpoch 95.195 ms/op 79.755 ms/op 1.19
capella processEpoch - mainnet_e217614 1.1721 s/op 1.0961 s/op 1.07
mainnet_e217614 - capella beforeProcessEpoch 72.098 ms/op 67.976 ms/op 1.06
mainnet_e217614 - capella processJustificationAndFinalization 21.560 us/op 16.637 us/op 1.30
mainnet_e217614 - capella processInactivityUpdates 20.775 ms/op 16.527 ms/op 1.26
mainnet_e217614 - capella processRewardsAndPenalties 249.07 ms/op 238.52 ms/op 1.04
mainnet_e217614 - capella processRegistryUpdates 17.553 us/op 11.653 us/op 1.51
mainnet_e217614 - capella processSlashings 384.00 ns/op 706.00 ns/op 0.54
mainnet_e217614 - capella processEth1DataReset 806.00 ns/op 751.00 ns/op 1.07
mainnet_e217614 - capella processEffectiveBalanceUpdates 17.355 ms/op 6.4533 ms/op 2.69
mainnet_e217614 - capella processSlashingsReset 3.7340 us/op 4.0910 us/op 0.91
mainnet_e217614 - capella processRandaoMixesReset 7.9360 us/op 4.8200 us/op 1.65
mainnet_e217614 - capella processHistoricalRootsUpdate 1.1450 us/op 800.00 ns/op 1.43
mainnet_e217614 - capella processParticipationFlagUpdates 2.2540 us/op 1.7750 us/op 1.27
mainnet_e217614 - capella afterProcessEpoch 242.46 ms/op 213.34 ms/op 1.14
phase0 processEpoch - mainnet_e58758 455.30 ms/op 338.84 ms/op 1.34
mainnet_e58758 - phase0 beforeProcessEpoch 107.09 ms/op 87.292 ms/op 1.23
mainnet_e58758 - phase0 processJustificationAndFinalization 15.375 us/op 20.516 us/op 0.75
mainnet_e58758 - phase0 processRewardsAndPenalties 38.787 ms/op 32.480 ms/op 1.19
mainnet_e58758 - phase0 processRegistryUpdates 10.895 us/op 6.8280 us/op 1.60
mainnet_e58758 - phase0 processSlashings 796.00 ns/op 747.00 ns/op 1.07
mainnet_e58758 - phase0 processEth1DataReset 523.00 ns/op 764.00 ns/op 0.68
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9663 ms/op 814.76 us/op 2.41
mainnet_e58758 - phase0 processSlashingsReset 6.3130 us/op 4.0190 us/op 1.57
mainnet_e58758 - phase0 processRandaoMixesReset 6.1070 us/op 5.5030 us/op 1.11
mainnet_e58758 - phase0 processHistoricalRootsUpdate 579.00 ns/op 1.0070 us/op 0.57
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.4560 us/op 4.5650 us/op 0.98
mainnet_e58758 - phase0 afterProcessEpoch 87.795 ms/op 65.371 ms/op 1.34
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.3452 ms/op 971.62 us/op 2.41
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.6684 ms/op 1.9104 ms/op 1.40
altair processInactivityUpdates - 250000 normalcase 19.177 ms/op 16.615 ms/op 1.15
altair processInactivityUpdates - 250000 worstcase 20.786 ms/op 17.515 ms/op 1.19
phase0 processRegistryUpdates - 250000 normalcase 14.239 us/op 6.9370 us/op 2.05
phase0 processRegistryUpdates - 250000 badcase_full_deposits 388.26 us/op 288.86 us/op 1.34
phase0 processRegistryUpdates - 250000 worstcase 0.5 142.89 ms/op 117.88 ms/op 1.21
altair processRewardsAndPenalties - 250000 normalcase 43.991 ms/op 43.877 ms/op 1.00
altair processRewardsAndPenalties - 250000 worstcase 46.405 ms/op 46.136 ms/op 1.01
phase0 getAttestationDeltas - 250000 normalcase 9.1474 ms/op 6.6549 ms/op 1.37
phase0 getAttestationDeltas - 250000 worstcase 7.2951 ms/op 6.3393 ms/op 1.15
phase0 processSlashings - 250000 worstcase 122.57 us/op 80.821 us/op 1.52
altair processSyncCommitteeUpdates - 250000 157.45 ms/op 108.05 ms/op 1.46
BeaconState.hashTreeRoot - No change 365.00 ns/op 487.00 ns/op 0.75
BeaconState.hashTreeRoot - 1 full validator 141.76 us/op 123.42 us/op 1.15
BeaconState.hashTreeRoot - 32 full validator 1.2981 ms/op 1.0703 ms/op 1.21
BeaconState.hashTreeRoot - 512 full validator 14.763 ms/op 8.4177 ms/op 1.75
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 167.67 us/op 98.233 us/op 1.71
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1415 ms/op 1.2825 ms/op 1.67
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.196 ms/op 15.766 ms/op 2.04
BeaconState.hashTreeRoot - 1 balances 110.17 us/op 68.438 us/op 1.61
BeaconState.hashTreeRoot - 32 balances 1.1663 ms/op 628.03 us/op 1.86
BeaconState.hashTreeRoot - 512 balances 10.170 ms/op 8.7858 ms/op 1.16
BeaconState.hashTreeRoot - 250000 balances 176.36 ms/op 128.97 ms/op 1.37
aggregationBits - 2048 els - zipIndexesInBitList 33.400 us/op 20.524 us/op 1.63
byteArrayEquals 32 60.033 ns/op 49.036 ns/op 1.22
Buffer.compare 32 19.437 ns/op 15.822 ns/op 1.23
byteArrayEquals 1024 1.6640 us/op 1.2905 us/op 1.29
Buffer.compare 1024 28.425 ns/op 23.388 ns/op 1.22
byteArrayEquals 16384 27.494 us/op 20.422 us/op 1.35
Buffer.compare 16384 203.73 ns/op 195.40 ns/op 1.04
byteArrayEquals 123687377 209.66 ms/op 159.39 ms/op 1.32
Buffer.compare 123687377 9.7791 ms/op 8.0144 ms/op 1.22
byteArrayEquals 32 - diff last byte 57.324 ns/op 49.089 ns/op 1.17
Buffer.compare 32 - diff last byte 18.547 ns/op 17.036 ns/op 1.09
byteArrayEquals 1024 - diff last byte 1.7047 us/op 1.3248 us/op 1.29
Buffer.compare 1024 - diff last byte 27.546 ns/op 22.683 ns/op 1.21
byteArrayEquals 16384 - diff last byte 27.595 us/op 21.375 us/op 1.29
Buffer.compare 16384 - diff last byte 197.27 ns/op 181.16 ns/op 1.09
byteArrayEquals 123687377 - diff last byte 201.77 ms/op 156.57 ms/op 1.29
Buffer.compare 123687377 - diff last byte 8.4564 ms/op 7.7598 ms/op 1.09
byteArrayEquals 32 - random bytes 5.5480 ns/op 5.2390 ns/op 1.06
Buffer.compare 32 - random bytes 18.599 ns/op 17.101 ns/op 1.09
byteArrayEquals 1024 - random bytes 5.4110 ns/op 5.1420 ns/op 1.05
Buffer.compare 1024 - random bytes 17.832 ns/op 16.155 ns/op 1.10
byteArrayEquals 16384 - random bytes 5.4060 ns/op 5.1480 ns/op 1.05
Buffer.compare 16384 - random bytes 18.233 ns/op 16.556 ns/op 1.10
byteArrayEquals 123687377 - random bytes 7.0000 ns/op 8.1000 ns/op 0.86
Buffer.compare 123687377 - random bytes 19.130 ns/op 19.110 ns/op 1.00
regular array get 100000 times 38.717 us/op 31.952 us/op 1.21
wrappedArray get 100000 times 37.155 us/op 32.739 us/op 1.13
arrayWithProxy get 100000 times 14.677 ms/op 10.190 ms/op 1.44
ssz.Root.equals 49.082 ns/op 40.610 ns/op 1.21
byteArrayEquals 45.915 ns/op 43.989 ns/op 1.04
Buffer.compare 10.544 ns/op 9.3580 ns/op 1.13
shuffle list - 16384 els 6.5118 ms/op 5.5209 ms/op 1.18
shuffle list - 250000 els 96.112 ms/op 83.397 ms/op 1.15
processSlot - 1 slots 14.046 us/op 10.919 us/op 1.29
processSlot - 32 slots 2.9887 ms/op 3.8342 ms/op 0.78
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.035 ms/op 37.853 ms/op 1.06
getCommitteeAssignments - req 1 vs - 250000 vc 2.3591 ms/op 1.8751 ms/op 1.26
getCommitteeAssignments - req 100 vs - 250000 vc 4.6413 ms/op 3.5188 ms/op 1.32
getCommitteeAssignments - req 1000 vs - 250000 vc 4.8443 ms/op 3.7429 ms/op 1.29
findModifiedValidators - 10000 modified validators 652.03 ms/op 361.60 ms/op 1.80
findModifiedValidators - 1000 modified validators 740.92 ms/op 185.57 ms/op 3.99
findModifiedValidators - 100 modified validators 386.70 ms/op 169.93 ms/op 2.28
findModifiedValidators - 10 modified validators 327.89 ms/op 169.86 ms/op 1.93
findModifiedValidators - 1 modified validators 294.55 ms/op 152.49 ms/op 1.93
findModifiedValidators - no difference 321.17 ms/op 159.68 ms/op 2.01
compare ViewDUs 4.3628 s/op 2.6850 s/op 1.62
compare each validator Uint8Array 1.6167 s/op 1.3505 s/op 1.20
compare ViewDU to Uint8Array 1.3098 s/op 779.12 ms/op 1.68
migrate state 1000000 validators, 24 modified, 0 new 1.0222 s/op 812.38 ms/op 1.26
migrate state 1000000 validators, 1700 modified, 1000 new 1.2872 s/op 1.0098 s/op 1.27
migrate state 1000000 validators, 3400 modified, 2000 new 1.4837 s/op 1.2595 s/op 1.18
migrate state 1500000 validators, 24 modified, 0 new 1.0127 s/op 849.84 ms/op 1.19
migrate state 1500000 validators, 1700 modified, 1000 new 1.2788 s/op 1.0754 s/op 1.19
migrate state 1500000 validators, 3400 modified, 2000 new 1.4860 s/op 1.2728 s/op 1.17
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.9400 ns/op 5.8500 ns/op 0.84
state getBlockRootAtSlot - 250000 vs - 7PWei 662.09 ns/op 843.02 ns/op 0.79
computeProposers - vc 250000 8.8064 ms/op 6.4259 ms/op 1.37
computeEpochShuffling - vc 250000 100.41 ms/op 71.773 ms/op 1.40
getNextSyncCommittee - vc 250000 137.58 ms/op 107.32 ms/op 1.28
computeSigningRoot for AttestationData 24.560 us/op 22.820 us/op 1.08
hash AttestationData serialized data then Buffer.toString(base64) 1.7136 us/op 1.1169 us/op 1.53
toHexString serialized data 1.0595 us/op 675.81 ns/op 1.57
Buffer.toString(base64) 210.30 ns/op 133.91 ns/op 1.57
nodejs block root to RootHex using toHex 190.11 ns/op 117.83 ns/op 1.61
nodejs block root to RootHex using toRootHex 113.48 ns/op 75.520 ns/op 1.50
browser block root to RootHex using the deprecated toHexString 282.82 ns/op 183.59 ns/op 1.54
browser block root to RootHex using toHex 245.15 ns/op 150.16 ns/op 1.63
browser block root to RootHex using toRootHex 179.71 ns/op 134.33 ns/op 1.34

Please sign in to comment.