Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: debug too many shuffling promises #7251

Merged
merged 13 commits into from
Dec 4, 2024

Conversation

matthewkeil
Copy link
Member

@matthewkeil matthewkeil commented Nov 27, 2024

Motivation

Non-Finality devnet showed an error with this when a lot of old blocks were coming across the network.

Only async calculate shuffling during epoch transitions. For normal slot progression that goes through an epoch transition the shuffling will be queued for async calculation in beforeProcessEpoch. For all other situations (validation and regen primarily) the shufflings will get calculated JIT in afterProcessEpoch. They only need to be calculated if two epoch transitions pass and the nextShuffling is moved to currentShuffling.

part of #7244

@matthewkeil matthewkeil requested a review from a team as a code owner November 27, 2024 06:22
Copy link
Contributor

github-actions bot commented Nov 27, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 01238ff Previous: 64eb015 Ratio
forkChoice updateHead vc 100000 bc 64 eq 0 383.39 us/op 1.2806 ms/op 0.30
forkChoice updateHead vc 600000 bc 64 eq 300000 11.604 ms/op 37.084 ms/op 0.31
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4574 ms/op 5.0592 ms/op 0.29
Full benchmark results
Benchmark suite Current: 01238ff Previous: 64eb015 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.2476 ms/op 2.1753 ms/op 0.57
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 42.026 us/op 67.606 us/op 0.62
BLS verify - blst 945.99 us/op 916.60 us/op 1.03
BLS verifyMultipleSignatures 3 - blst 1.3094 ms/op 1.3247 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst 2.1039 ms/op 1.9759 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst 4.4846 ms/op 7.0878 ms/op 0.63
BLS verifyMultipleSignatures 64 - blst 8.2920 ms/op 10.320 ms/op 0.80
BLS verifyMultipleSignatures 128 - blst 15.757 ms/op 20.134 ms/op 0.78
BLS deserializing 10000 signatures 615.23 ms/op 769.00 ms/op 0.80
BLS deserializing 100000 signatures 6.1491 s/op 7.4681 s/op 0.82
BLS verifyMultipleSignatures - same message - 3 - blst 855.44 us/op 960.70 us/op 0.89
BLS verifyMultipleSignatures - same message - 8 - blst 1.1027 ms/op 1.0181 ms/op 1.08
BLS verifyMultipleSignatures - same message - 32 - blst 1.6975 ms/op 1.7953 ms/op 0.95
BLS verifyMultipleSignatures - same message - 64 - blst 2.5708 ms/op 2.6869 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst 4.1827 ms/op 4.5014 ms/op 0.93
BLS aggregatePubkeys 32 - blst 18.218 us/op 20.827 us/op 0.87
BLS aggregatePubkeys 128 - blst 62.876 us/op 73.689 us/op 0.85
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 55.252 ms/op 62.278 ms/op 0.89
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 57.495 ms/op 58.530 ms/op 0.98
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 37.132 ms/op 44.326 ms/op 0.84
getSlashingsAndExits - default max 61.544 us/op 116.01 us/op 0.53
getSlashingsAndExits - 2k 235.26 us/op 359.07 us/op 0.66
proposeBlockBody type=full, size=empty 4.8982 ms/op 7.7504 ms/op 0.63
isKnown best case - 1 super set check 484.00 ns/op 526.00 ns/op 0.92
isKnown normal case - 2 super set checks 475.00 ns/op 569.00 ns/op 0.83
isKnown worse case - 16 super set checks 464.00 ns/op 530.00 ns/op 0.88
InMemoryCheckpointStateCache - add get delete 2.6460 us/op 3.5200 us/op 0.75
validate api signedAggregateAndProof - struct 1.9332 ms/op 1.6175 ms/op 1.20
validate gossip signedAggregateAndProof - struct 1.6602 ms/op 1.7813 ms/op 0.93
batch validate gossip attestation - vc 640000 - chunk 32 123.47 us/op 151.31 us/op 0.82
batch validate gossip attestation - vc 640000 - chunk 64 108.75 us/op 140.22 us/op 0.78
batch validate gossip attestation - vc 640000 - chunk 128 99.433 us/op 140.54 us/op 0.71
batch validate gossip attestation - vc 640000 - chunk 256 92.521 us/op 147.98 us/op 0.63
pickEth1Vote - no votes 883.01 us/op 1.5844 ms/op 0.56
pickEth1Vote - max votes 4.3786 ms/op 11.358 ms/op 0.39
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.4765 ms/op 21.088 ms/op 0.45
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.928 ms/op 33.431 ms/op 0.54
pickEth1Vote - Eth1Data fastSerialize value x2048 368.21 us/op 649.48 us/op 0.57
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.5576 ms/op 4.4810 ms/op 0.57
bytes32 toHexString 569.00 ns/op 854.00 ns/op 0.67
bytes32 Buffer.toString(hex) 427.00 ns/op 315.00 ns/op 1.36
bytes32 Buffer.toString(hex) from Uint8Array 521.00 ns/op 524.00 ns/op 0.99
bytes32 Buffer.toString(hex) + 0x 433.00 ns/op 293.00 ns/op 1.48
Object access 1 prop 0.32500 ns/op 0.20700 ns/op 1.57
Map access 1 prop 0.32200 ns/op 0.16100 ns/op 2.00
Object get x1000 5.1030 ns/op 6.7870 ns/op 0.75
Map get x1000 6.3910 ns/op 7.1870 ns/op 0.89
Object set x1000 22.228 ns/op 63.311 ns/op 0.35
Map set x1000 18.550 ns/op 41.228 ns/op 0.45
Return object 10000 times 0.29250 ns/op 0.33950 ns/op 0.86
Throw Error 10000 times 2.6231 us/op 3.9370 us/op 0.67
toHex 110.13 ns/op 202.49 ns/op 0.54
Buffer.from 105.50 ns/op 192.31 ns/op 0.55
shared Buffer 70.228 ns/op 109.24 ns/op 0.64
fastMsgIdFn sha256 / 200 bytes 2.0380 us/op 2.6760 us/op 0.76
fastMsgIdFn h32 xxhash / 200 bytes 437.00 ns/op 343.00 ns/op 1.27
fastMsgIdFn h64 xxhash / 200 bytes 471.00 ns/op 308.00 ns/op 1.53
fastMsgIdFn sha256 / 1000 bytes 5.8660 us/op 8.5350 us/op 0.69
fastMsgIdFn h32 xxhash / 1000 bytes 575.00 ns/op 523.00 ns/op 1.10
fastMsgIdFn h64 xxhash / 1000 bytes 535.00 ns/op 404.00 ns/op 1.32
fastMsgIdFn sha256 / 10000 bytes 49.176 us/op 70.815 us/op 0.69
fastMsgIdFn h32 xxhash / 10000 bytes 1.8720 us/op 2.1020 us/op 0.89
fastMsgIdFn h64 xxhash / 10000 bytes 1.3100 us/op 1.3850 us/op 0.95
send data - 1000 256B messages 9.8258 ms/op 17.917 ms/op 0.55
send data - 1000 512B messages 14.777 ms/op 24.837 ms/op 0.59
send data - 1000 1024B messages 19.984 ms/op 33.736 ms/op 0.59
send data - 1000 1200B messages 23.475 ms/op 37.078 ms/op 0.63
send data - 1000 2048B messages 29.190 ms/op 46.960 ms/op 0.62
send data - 1000 4096B messages 26.169 ms/op 51.288 ms/op 0.51
send data - 1000 16384B messages 65.986 ms/op 99.623 ms/op 0.66
send data - 1000 65536B messages 291.61 ms/op 290.72 ms/op 1.00
enrSubnets - fastDeserialize 64 bits 1.1210 us/op 1.7720 us/op 0.63
enrSubnets - ssz BitVector 64 bits 523.00 ns/op 572.00 ns/op 0.91
enrSubnets - fastDeserialize 4 bits 342.00 ns/op 254.00 ns/op 1.35
enrSubnets - ssz BitVector 4 bits 527.00 ns/op 527.00 ns/op 1.00
prioritizePeers score -10:0 att 32-0.1 sync 2-0 117.67 us/op 280.98 us/op 0.42
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 146.51 us/op 314.94 us/op 0.47
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 317.77 us/op 602.91 us/op 0.53
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 429.47 us/op 615.13 us/op 0.70
prioritizePeers score 0:0 att 64-1 sync 4-1 480.47 us/op 1.2699 ms/op 0.38
array of 16000 items push then shift 1.3004 us/op 1.9536 us/op 0.67
LinkedList of 16000 items push then shift 6.5050 ns/op 15.730 ns/op 0.41
array of 16000 items push then pop 83.345 ns/op 229.66 ns/op 0.36
LinkedList of 16000 items push then pop 6.2750 ns/op 12.659 ns/op 0.50
array of 24000 items push then shift 1.9027 us/op 3.0235 us/op 0.63
LinkedList of 24000 items push then shift 6.4360 ns/op 11.867 ns/op 0.54
array of 24000 items push then pop 107.56 ns/op 236.21 ns/op 0.46
LinkedList of 24000 items push then pop 6.3210 ns/op 9.1910 ns/op 0.69
intersect bitArray bitLen 8 5.4110 ns/op 7.4420 ns/op 0.73
intersect array and set length 8 39.119 ns/op 82.874 ns/op 0.47
intersect bitArray bitLen 128 26.565 ns/op 33.126 ns/op 0.80
intersect array and set length 128 584.55 ns/op 1.0180 us/op 0.57
bitArray.getTrueBitIndexes() bitLen 128 1.7740 us/op 2.7610 us/op 0.64
bitArray.getTrueBitIndexes() bitLen 248 3.6400 us/op 5.2900 us/op 0.69
bitArray.getTrueBitIndexes() bitLen 512 5.8270 us/op 10.653 us/op 0.55
Buffer.concat 32 items 1000.0 ns/op 1.2840 us/op 0.78
Uint8Array.set 32 items 1.3700 us/op 2.1500 us/op 0.64
Buffer.copy 1.4550 us/op 2.5980 us/op 0.56
Uint8Array.set - with subarray 1.8610 us/op 3.7780 us/op 0.49
Uint8Array.set - without subarray 1.2060 us/op 1.9950 us/op 0.60
getUint32 - dataview 407.00 ns/op 389.00 ns/op 1.05
getUint32 - manual 334.00 ns/op 352.00 ns/op 0.95
Set add up to 64 items then delete first 1.8098 us/op 3.3592 us/op 0.54
OrderedSet add up to 64 items then delete first 3.1260 us/op 5.4020 us/op 0.58
Set add up to 64 items then delete last 2.2719 us/op 3.8164 us/op 0.60
OrderedSet add up to 64 items then delete last 3.0723 us/op 5.9708 us/op 0.51
Set add up to 64 items then delete middle 2.0505 us/op 3.9159 us/op 0.52
OrderedSet add up to 64 items then delete middle 4.5300 us/op 8.3545 us/op 0.54
Set add up to 128 items then delete first 4.0138 us/op 8.6570 us/op 0.46
OrderedSet add up to 128 items then delete first 6.2939 us/op 12.367 us/op 0.51
Set add up to 128 items then delete last 3.8640 us/op 8.2078 us/op 0.47
OrderedSet add up to 128 items then delete last 5.8792 us/op 12.338 us/op 0.48
Set add up to 128 items then delete middle 3.8775 us/op 7.4449 us/op 0.52
OrderedSet add up to 128 items then delete middle 11.769 us/op 19.338 us/op 0.61
Set add up to 256 items then delete first 7.8533 us/op 18.078 us/op 0.43
OrderedSet add up to 256 items then delete first 12.425 us/op 26.396 us/op 0.47
Set add up to 256 items then delete last 7.8341 us/op 17.380 us/op 0.45
OrderedSet add up to 256 items then delete last 11.832 us/op 25.308 us/op 0.47
Set add up to 256 items then delete middle 7.8176 us/op 15.623 us/op 0.50
OrderedSet add up to 256 items then delete middle 34.804 us/op 53.283 us/op 0.65
transfer serialized Status (84 B) 1.5350 us/op 1.7800 us/op 0.86
copy serialized Status (84 B) 1.2960 us/op 1.5220 us/op 0.85
transfer serialized SignedVoluntaryExit (112 B) 1.7480 us/op 1.7780 us/op 0.98
copy serialized SignedVoluntaryExit (112 B) 1.3710 us/op 1.4860 us/op 0.92
transfer serialized ProposerSlashing (416 B) 1.9440 us/op 2.1510 us/op 0.90
copy serialized ProposerSlashing (416 B) 2.0380 us/op 2.4080 us/op 0.85
transfer serialized Attestation (485 B) 1.8510 us/op 2.3790 us/op 0.78
copy serialized Attestation (485 B) 1.8270 us/op 2.4510 us/op 0.75
transfer serialized AttesterSlashing (33232 B) 2.5200 us/op 2.8990 us/op 0.87
copy serialized AttesterSlashing (33232 B) 5.8860 us/op 10.591 us/op 0.56
transfer serialized Small SignedBeaconBlock (128000 B) 3.3520 us/op 3.9120 us/op 0.86
copy serialized Small SignedBeaconBlock (128000 B) 16.312 us/op 33.139 us/op 0.49
transfer serialized Avg SignedBeaconBlock (200000 B) 2.9850 us/op 4.4310 us/op 0.67
copy serialized Avg SignedBeaconBlock (200000 B) 26.526 us/op 53.401 us/op 0.50
transfer serialized BlobsSidecar (524380 B) 3.3260 us/op 6.5750 us/op 0.51
copy serialized BlobsSidecar (524380 B) 144.70 us/op 165.04 us/op 0.88
transfer serialized Big SignedBeaconBlock (1000000 B) 3.0180 us/op 5.8650 us/op 0.51
copy serialized Big SignedBeaconBlock (1000000 B) 140.39 us/op 551.22 us/op 0.25
pass gossip attestations to forkchoice per slot 2.4629 ms/op 3.3650 ms/op 0.73
forkChoice updateHead vc 100000 bc 64 eq 0 383.39 us/op 1.2806 ms/op 0.30
forkChoice updateHead vc 600000 bc 64 eq 0 2.3425 ms/op 5.2573 ms/op 0.45
forkChoice updateHead vc 1000000 bc 64 eq 0 3.7471 ms/op 6.8726 ms/op 0.55
forkChoice updateHead vc 600000 bc 320 eq 0 2.2656 ms/op 4.0167 ms/op 0.56
forkChoice updateHead vc 600000 bc 1200 eq 0 2.3516 ms/op 4.4697 ms/op 0.53
forkChoice updateHead vc 600000 bc 7200 eq 0 2.5695 ms/op 5.0860 ms/op 0.51
forkChoice updateHead vc 600000 bc 64 eq 1000 9.3623 ms/op 12.335 ms/op 0.76
forkChoice updateHead vc 600000 bc 64 eq 10000 9.3308 ms/op 12.083 ms/op 0.77
forkChoice updateHead vc 600000 bc 64 eq 300000 11.604 ms/op 37.084 ms/op 0.31
computeDeltas 500000 validators 300 proto nodes 3.3339 ms/op 5.2711 ms/op 0.63
computeDeltas 500000 validators 1200 proto nodes 3.3340 ms/op 6.5298 ms/op 0.51
computeDeltas 500000 validators 7200 proto nodes 3.2558 ms/op 6.2988 ms/op 0.52
computeDeltas 750000 validators 300 proto nodes 5.0459 ms/op 8.4042 ms/op 0.60
computeDeltas 750000 validators 1200 proto nodes 5.5106 ms/op 8.5595 ms/op 0.64
computeDeltas 750000 validators 7200 proto nodes 7.1551 ms/op 9.1306 ms/op 0.78
computeDeltas 1400000 validators 300 proto nodes 12.040 ms/op 15.576 ms/op 0.77
computeDeltas 1400000 validators 1200 proto nodes 9.7870 ms/op 12.601 ms/op 0.78
computeDeltas 1400000 validators 7200 proto nodes 9.8636 ms/op 12.897 ms/op 0.76
computeDeltas 2100000 validators 300 proto nodes 13.999 ms/op 18.782 ms/op 0.75
computeDeltas 2100000 validators 1200 proto nodes 13.876 ms/op 19.930 ms/op 0.70
computeDeltas 2100000 validators 7200 proto nodes 13.990 ms/op 19.735 ms/op 0.71
altair processAttestation - 250000 vs - 7PWei normalcase 1.4188 ms/op 2.6254 ms/op 0.54
altair processAttestation - 250000 vs - 7PWei worstcase 2.1860 ms/op 3.1422 ms/op 0.70
altair processAttestation - setStatus - 1/6 committees join 69.232 us/op 113.03 us/op 0.61
altair processAttestation - setStatus - 1/3 committees join 147.32 us/op 215.61 us/op 0.68
altair processAttestation - setStatus - 1/2 committees join 201.06 us/op 280.51 us/op 0.72
altair processAttestation - setStatus - 2/3 committees join 258.59 us/op 396.02 us/op 0.65
altair processAttestation - setStatus - 4/5 committees join 386.94 us/op 578.24 us/op 0.67
altair processAttestation - setStatus - 100% committees join 460.31 us/op 675.72 us/op 0.68
altair processBlock - 250000 vs - 7PWei normalcase 3.9174 ms/op 4.9905 ms/op 0.78
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.363 ms/op 28.637 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase 36.423 ms/op 50.108 ms/op 0.73
altair processBlock - 250000 vs - 7PWei worstcase hashState 67.170 ms/op 87.661 ms/op 0.77
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8814 ms/op 2.7546 ms/op 0.68
phase0 processBlock - 250000 vs - 7PWei worstcase 23.590 ms/op 26.771 ms/op 0.88
altair processEth1Data - 250000 vs - 7PWei normalcase 256.46 us/op 401.89 us/op 0.64
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.6750 us/op 7.1300 us/op 0.66
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 28.261 us/op 47.788 us/op 0.59
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.3240 us/op 12.593 us/op 0.58
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.7450 us/op 7.4700 us/op 0.64
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 129.32 us/op 144.32 us/op 0.90
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3511 ms/op 1.2633 ms/op 1.07
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.2165 ms/op 1.6843 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1318 ms/op 1.6899 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.9272 ms/op 4.8858 ms/op 0.60
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1645 ms/op 1.7893 ms/op 0.65
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9601 ms/op 5.8669 ms/op 0.50
Tree 40 250000 create 192.13 ms/op 467.44 ms/op 0.41
Tree 40 250000 get(125000) 114.13 ns/op 170.00 ns/op 0.67
Tree 40 250000 set(125000) 539.43 ns/op 838.71 ns/op 0.64
Tree 40 250000 toArray() 13.735 ms/op 22.991 ms/op 0.60
Tree 40 250000 iterate all - toArray() + loop 13.673 ms/op 22.693 ms/op 0.60
Tree 40 250000 iterate all - get(i) 42.899 ms/op 62.529 ms/op 0.69
Array 250000 create 2.5610 ms/op 4.1336 ms/op 0.62
Array 250000 clone - spread 1.2899 ms/op 1.7261 ms/op 0.75
Array 250000 get(125000) 0.57900 ns/op 0.50300 ns/op 1.15
Array 250000 set(125000) 0.59000 ns/op 0.51400 ns/op 1.15
Array 250000 iterate all - loop 75.057 us/op 102.71 us/op 0.73
phase0 afterProcessEpoch - 250000 vs - 7PWei 44.141 ms/op 59.003 ms/op 0.75
Array.fill - length 1000000 2.4661 ms/op 6.2827 ms/op 0.39
Array push - length 1000000 14.870 ms/op 40.846 ms/op 0.36
Array.get 0.25849 ns/op 0.32523 ns/op 0.79
Uint8Array.get 0.33927 ns/op 0.47666 ns/op 0.71
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.076 ms/op 25.226 ms/op 0.64
altair processEpoch - mainnet_e81889 276.72 ms/op 359.56 ms/op 0.77
mainnet_e81889 - altair beforeProcessEpoch 16.439 ms/op 23.130 ms/op 0.71
mainnet_e81889 - altair processJustificationAndFinalization 9.1620 us/op 18.893 us/op 0.48
mainnet_e81889 - altair processInactivityUpdates 3.9667 ms/op 7.1031 ms/op 0.56
mainnet_e81889 - altair processRewardsAndPenalties 55.246 ms/op 41.343 ms/op 1.34
mainnet_e81889 - altair processRegistryUpdates 1.9500 us/op 1.9340 us/op 1.01
mainnet_e81889 - altair processSlashings 707.00 ns/op 498.00 ns/op 1.42
mainnet_e81889 - altair processEth1DataReset 730.00 ns/op 410.00 ns/op 1.78
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1003 ms/op 1.9743 ms/op 0.56
mainnet_e81889 - altair processSlashingsReset 2.8360 us/op 2.9260 us/op 0.97
mainnet_e81889 - altair processRandaoMixesReset 3.1840 us/op 3.7430 us/op 0.85
mainnet_e81889 - altair processHistoricalRootsUpdate 1.1100 us/op 428.00 ns/op 2.59
mainnet_e81889 - altair processParticipationFlagUpdates 2.0330 us/op 2.5600 us/op 0.79
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0140 us/op 502.00 ns/op 2.02
mainnet_e81889 - altair afterProcessEpoch 43.946 ms/op 53.537 ms/op 0.82
capella processEpoch - mainnet_e217614 1.1261 s/op 1.1084 s/op 1.02
mainnet_e217614 - capella beforeProcessEpoch 87.943 ms/op 77.539 ms/op 1.13
mainnet_e217614 - capella processJustificationAndFinalization 22.039 us/op 19.776 us/op 1.11
mainnet_e217614 - capella processInactivityUpdates 18.019 ms/op 18.927 ms/op 0.95
mainnet_e217614 - capella processRewardsAndPenalties 265.74 ms/op 230.04 ms/op 1.16
mainnet_e217614 - capella processRegistryUpdates 14.300 us/op 15.088 us/op 0.95
mainnet_e217614 - capella processSlashings 1.3450 us/op 562.00 ns/op 2.39
mainnet_e217614 - capella processEth1DataReset 901.00 ns/op 350.00 ns/op 2.57
mainnet_e217614 - capella processEffectiveBalanceUpdates 20.310 ms/op 17.490 ms/op 1.16
mainnet_e217614 - capella processSlashingsReset 4.1210 us/op 6.6460 us/op 0.62
mainnet_e217614 - capella processRandaoMixesReset 5.7500 us/op 4.8140 us/op 1.19
mainnet_e217614 - capella processHistoricalRootsUpdate 1.7410 us/op 776.00 ns/op 2.24
mainnet_e217614 - capella processParticipationFlagUpdates 2.0380 us/op 2.0480 us/op 1.00
mainnet_e217614 - capella afterProcessEpoch 107.36 ms/op 129.97 ms/op 0.83
phase0 processEpoch - mainnet_e58758 317.85 ms/op 366.05 ms/op 0.87
mainnet_e58758 - phase0 beforeProcessEpoch 77.530 ms/op 81.181 ms/op 0.96
mainnet_e58758 - phase0 processJustificationAndFinalization 17.850 us/op 19.417 us/op 0.92
mainnet_e58758 - phase0 processRewardsAndPenalties 30.245 ms/op 28.654 ms/op 1.06
mainnet_e58758 - phase0 processRegistryUpdates 8.1830 us/op 9.2600 us/op 0.88
mainnet_e58758 - phase0 processSlashings 739.00 ns/op 545.00 ns/op 1.36
mainnet_e58758 - phase0 processEth1DataReset 715.00 ns/op 577.00 ns/op 1.24
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 849.99 us/op 1.3461 ms/op 0.63
mainnet_e58758 - phase0 processSlashingsReset 2.8910 us/op 3.7760 us/op 0.77
mainnet_e58758 - phase0 processRandaoMixesReset 3.1080 us/op 6.0740 us/op 0.51
mainnet_e58758 - phase0 processHistoricalRootsUpdate 698.00 ns/op 532.00 ns/op 1.31
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.2680 us/op 4.0280 us/op 1.06
mainnet_e58758 - phase0 afterProcessEpoch 35.442 ms/op 49.103 ms/op 0.72
phase0 processEffectiveBalanceUpdates - 250000 normalcase 977.95 us/op 1.7299 ms/op 0.57
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4574 ms/op 5.0592 ms/op 0.29
altair processInactivityUpdates - 250000 normalcase 12.518 ms/op 21.355 ms/op 0.59
altair processInactivityUpdates - 250000 worstcase 13.420 ms/op 19.229 ms/op 0.70
phase0 processRegistryUpdates - 250000 normalcase 2.9940 us/op 13.129 us/op 0.23
phase0 processRegistryUpdates - 250000 badcase_full_deposits 317.36 us/op 361.28 us/op 0.88
phase0 processRegistryUpdates - 250000 worstcase 0.5 103.15 ms/op 134.98 ms/op 0.76
altair processRewardsAndPenalties - 250000 normalcase 42.533 ms/op 44.447 ms/op 0.96
altair processRewardsAndPenalties - 250000 worstcase 42.243 ms/op 53.638 ms/op 0.79
phase0 getAttestationDeltas - 250000 normalcase 6.3912 ms/op 12.817 ms/op 0.50
phase0 getAttestationDeltas - 250000 worstcase 5.8910 ms/op 9.7929 ms/op 0.60
phase0 processSlashings - 250000 worstcase 89.066 us/op 110.28 us/op 0.81
altair processSyncCommitteeUpdates - 250000 94.553 ms/op 160.32 ms/op 0.59
BeaconState.hashTreeRoot - No change 421.00 ns/op 314.00 ns/op 1.34
BeaconState.hashTreeRoot - 1 full validator 94.605 us/op 174.79 us/op 0.54
BeaconState.hashTreeRoot - 32 full validator 1.0045 ms/op 1.2350 ms/op 0.81
BeaconState.hashTreeRoot - 512 full validator 8.9300 ms/op 12.210 ms/op 0.73
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 143.53 us/op 168.25 us/op 0.85
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9668 ms/op 2.2705 ms/op 0.87
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.743 ms/op 27.540 ms/op 0.72
BeaconState.hashTreeRoot - 1 balances 92.330 us/op 122.50 us/op 0.75
BeaconState.hashTreeRoot - 32 balances 1.0679 ms/op 1.1899 ms/op 0.90
BeaconState.hashTreeRoot - 512 balances 8.0694 ms/op 8.9544 ms/op 0.90
BeaconState.hashTreeRoot - 250000 balances 168.27 ms/op 207.52 ms/op 0.81
aggregationBits - 2048 els - zipIndexesInBitList 18.567 us/op 33.576 us/op 0.55
byteArrayEquals 32 46.208 ns/op 58.719 ns/op 0.79
Buffer.compare 32 14.823 ns/op 19.741 ns/op 0.75
byteArrayEquals 1024 1.2302 us/op 1.8375 us/op 0.67
Buffer.compare 1024 21.939 ns/op 30.693 ns/op 0.71
byteArrayEquals 16384 19.315 us/op 26.878 us/op 0.72
Buffer.compare 16384 194.90 ns/op 212.25 ns/op 0.92
byteArrayEquals 123687377 151.65 ms/op 227.40 ms/op 0.67
Buffer.compare 123687377 4.1618 ms/op 11.411 ms/op 0.36
byteArrayEquals 32 - diff last byte 46.737 ns/op 61.514 ns/op 0.76
Buffer.compare 32 - diff last byte 15.689 ns/op 20.127 ns/op 0.78
byteArrayEquals 1024 - diff last byte 1.2491 us/op 1.8097 us/op 0.69
Buffer.compare 1024 - diff last byte 23.229 ns/op 28.819 ns/op 0.81
byteArrayEquals 16384 - diff last byte 19.840 us/op 27.876 us/op 0.71
Buffer.compare 16384 - diff last byte 168.44 ns/op 210.91 ns/op 0.80
byteArrayEquals 123687377 - diff last byte 145.69 ms/op 204.41 ms/op 0.71
Buffer.compare 123687377 - diff last byte 4.0187 ms/op 9.3300 ms/op 0.43
byteArrayEquals 32 - random bytes 4.8760 ns/op 5.5320 ns/op 0.88
Buffer.compare 32 - random bytes 15.805 ns/op 18.932 ns/op 0.83
byteArrayEquals 1024 - random bytes 4.8380 ns/op 5.6410 ns/op 0.86
Buffer.compare 1024 - random bytes 15.855 ns/op 19.621 ns/op 0.81
byteArrayEquals 16384 - random bytes 4.8460 ns/op 5.6670 ns/op 0.86
Buffer.compare 16384 - random bytes 15.924 ns/op 19.679 ns/op 0.81
byteArrayEquals 123687377 - random bytes 7.8700 ns/op 6.8400 ns/op 1.15
Buffer.compare 123687377 - random bytes 19.120 ns/op 20.070 ns/op 0.95
regular array get 100000 times 30.584 us/op 38.328 us/op 0.80
wrappedArray get 100000 times 30.675 us/op 46.233 us/op 0.66
arrayWithProxy get 100000 times 9.8963 ms/op 15.979 ms/op 0.62
ssz.Root.equals 43.919 ns/op 49.039 ns/op 0.90
byteArrayEquals 42.256 ns/op 49.342 ns/op 0.86
Buffer.compare 9.5250 ns/op 11.521 ns/op 0.83
processSlot - 1 slots 12.504 us/op 16.017 us/op 0.78
processSlot - 32 slots 2.8992 ms/op 3.3897 ms/op 0.86
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.650 ms/op 37.336 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 1.8040 ms/op 2.1806 ms/op 0.83
getCommitteeAssignments - req 100 vs - 250000 vc 3.5662 ms/op 4.2460 ms/op 0.84
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0014 ms/op 4.5495 ms/op 0.88
findModifiedValidators - 10000 modified validators 253.35 ms/op 299.39 ms/op 0.85
findModifiedValidators - 1000 modified validators 166.12 ms/op 200.36 ms/op 0.83
findModifiedValidators - 100 modified validators 205.42 ms/op 241.35 ms/op 0.85
findModifiedValidators - 10 modified validators 174.70 ms/op 210.53 ms/op 0.83
findModifiedValidators - 1 modified validators 187.75 ms/op 178.62 ms/op 1.05
findModifiedValidators - no difference 146.10 ms/op 194.46 ms/op 0.75
compare ViewDUs 3.3003 s/op 3.5308 s/op 0.93
compare each validator Uint8Array 1.5569 s/op 1.4081 s/op 1.11
compare ViewDU to Uint8Array 865.93 ms/op 1.1004 s/op 0.79
migrate state 1000000 validators, 24 modified, 0 new 746.68 ms/op 710.93 ms/op 1.05
migrate state 1000000 validators, 1700 modified, 1000 new 952.74 ms/op 960.91 ms/op 0.99
migrate state 1000000 validators, 3400 modified, 2000 new 1.2306 s/op 1.2237 s/op 1.01
migrate state 1500000 validators, 24 modified, 0 new 661.38 ms/op 728.41 ms/op 0.91
migrate state 1500000 validators, 1700 modified, 1000 new 882.70 ms/op 936.50 ms/op 0.94
migrate state 1500000 validators, 3400 modified, 2000 new 1.0905 s/op 1.1647 s/op 0.94
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.0400 ns/op 4.8800 ns/op 1.24
state getBlockRootAtSlot - 250000 vs - 7PWei 792.22 ns/op 734.76 ns/op 1.08
computeProposers - vc 250000 5.5291 ms/op 8.2840 ms/op 0.67
computeEpochShuffling - vc 250000 35.404 ms/op 43.527 ms/op 0.81
getNextSyncCommittee - vc 250000 93.795 ms/op 141.99 ms/op 0.66
computeSigningRoot for AttestationData 24.206 us/op 23.428 us/op 1.03
hash AttestationData serialized data then Buffer.toString(base64) 1.1885 us/op 1.6673 us/op 0.71
toHexString serialized data 743.71 ns/op 1.0285 us/op 0.72
Buffer.toString(base64) 137.41 ns/op 196.12 ns/op 0.70
nodejs block root to RootHex using toHex 116.75 ns/op 189.84 ns/op 0.61
nodejs block root to RootHex using toRootHex 77.103 ns/op 96.987 ns/op 0.79
browser block root to RootHex using the deprecated toHexString 201.86 ns/op 259.37 ns/op 0.78
browser block root to RootHex using toHex 164.10 ns/op 186.13 ns/op 0.88
browser block root to RootHex using toRootHex 147.87 ns/op 177.21 ns/op 0.83

by benchmarkbot/action

@matthewkeil matthewkeil force-pushed the mkeil/debug-too-many-shufflings branch from 13ec544 to 79e2401 Compare November 27, 2024 08:26
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 14.89362% with 40 lines in your changes missing coverage. Please review.

Project coverage is 48.50%. Comparing base (b78cb92) to head (d9c103f).
Report is 21 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7251      +/-   ##
============================================
- Coverage     49.14%   48.50%   -0.65%     
============================================
  Files           600      600              
  Lines         40121    40146      +25     
  Branches       2093     2058      -35     
============================================
- Hits          19719    19471     -248     
- Misses        20364    20637     +273     
  Partials         38       38              

@matthewkeil matthewkeil marked this pull request as draft November 28, 2024 07:57
@matthewkeil matthewkeil marked this pull request as ready for review November 28, 2024 12:34
@twoeths
Copy link
Contributor

twoeths commented Nov 29, 2024

since the issue only happen at syncing time, I suggest testing this code by getting a node, try to get state of an old checkpoint and sync from there

@matthewkeil
Copy link
Member Author

since the issue only happen at syncing time, I suggest testing this code by getting a node, try to get state of an old checkpoint and sync from there

@twoeths it works. Deleted the db and sync'd from checkpoint on mainnet and holesky.

Screenshot 2024-12-03 at 8 57 09 PM (3) Screenshot 2024-12-03 at 8 59 37 PM (3)

Copy link
Contributor

@twoeths twoeths left a comment

Choose a reason for hiding this comment

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

lgtm

@matthewkeil matthewkeil merged commit dbe2188 into unstable Dec 4, 2024
20 checks passed
@matthewkeil matthewkeil deleted the mkeil/debug-too-many-shufflings branch December 4, 2024 06:50
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.

2 participants