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

fix: only transfer cache at epoch transition #6102

Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Nov 10, 2023

Motivation

#6068 improved state transition but it made the block transition worse

Description

In prepareNextSlot, it's supposed to transfer cache only at epoch transition

related to #6063

@twoeths twoeths requested a review from a team as a code owner November 10, 2023 04:24
@twoeths
Copy link
Contributor Author

twoeths commented Nov 10, 2023

This gets back the block transition time to normal.

Screenshot 2023-11-10 at 07 41 52

vs the test mainnet node on unstable

Screenshot 2023-11-10 at 07 42 22

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 6e098b7 Previous: 6f27ac6 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 645.12 us/op 844.75 us/op 0.76
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 94.343 us/op 118.27 us/op 0.80
BLS verify - blst-native 1.3452 ms/op 1.3568 ms/op 0.99
BLS verifyMultipleSignatures 3 - blst-native 2.8228 ms/op 2.8148 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 6.1915 ms/op 6.1404 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 22.605 ms/op 22.177 ms/op 1.02
BLS verifyMultipleSignatures 64 - blst-native 44.549 ms/op 44.658 ms/op 1.00
BLS verifyMultipleSignatures 128 - blst-native 88.376 ms/op 87.917 ms/op 1.01
BLS deserializing 10000 signatures 908.48 ms/op 1.0092 s/op 0.90
BLS deserializing 100000 signatures 9.0868 s/op 10.663 s/op 0.85
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3319 ms/op 1.6205 ms/op 0.82
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5659 ms/op 1.6476 ms/op 0.95
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2994 ms/op 2.5323 ms/op 0.91
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.1867 ms/op 4.0274 ms/op 1.04
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.5795 ms/op 6.1914 ms/op 0.90
BLS aggregatePubkeys 32 - blst-native 25.349 us/op 28.328 us/op 0.89
BLS aggregatePubkeys 128 - blst-native 99.759 us/op 112.99 us/op 0.88
getAttestationsForBlock 37.602 ms/op 80.367 ms/op 0.47
isKnown best case - 1 super set check 343.00 ns/op 767.00 ns/op 0.45
isKnown normal case - 2 super set checks 308.00 ns/op 784.00 ns/op 0.39
isKnown worse case - 16 super set checks 317.00 ns/op 911.00 ns/op 0.35
CheckpointStateCache - add get delete 5.4650 us/op 11.450 us/op 0.48
validate api signedAggregateAndProof - struct 2.7908 ms/op 3.1493 ms/op 0.89
validate gossip signedAggregateAndProof - struct 2.7892 ms/op 3.0990 ms/op 0.90
validate gossip attestation - vc 640000 1.3715 ms/op 1.4953 ms/op 0.92
batch validate gossip attestation - vc 640000 - chunk 32 162.54 us/op 185.29 us/op 0.88
batch validate gossip attestation - vc 640000 - chunk 64 136.17 us/op 160.67 us/op 0.85
batch validate gossip attestation - vc 640000 - chunk 128 130.95 us/op 141.43 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 256 125.03 us/op 138.79 us/op 0.90
pickEth1Vote - no votes 1.2162 ms/op 1.4317 ms/op 0.85
pickEth1Vote - max votes 9.4547 ms/op 10.547 ms/op 0.90
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.918 ms/op 18.313 ms/op 1.09
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 26.992 ms/op 25.707 ms/op 1.05
pickEth1Vote - Eth1Data fastSerialize value x2048 550.59 us/op 723.19 us/op 0.76
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.8072 ms/op 7.2647 ms/op 0.94
bytes32 toHexString 475.00 ns/op 647.00 ns/op 0.73
bytes32 Buffer.toString(hex) 290.00 ns/op 331.00 ns/op 0.88
bytes32 Buffer.toString(hex) from Uint8Array 420.00 ns/op 532.00 ns/op 0.79
bytes32 Buffer.toString(hex) + 0x 277.00 ns/op 311.00 ns/op 0.89
Object access 1 prop 0.15600 ns/op 0.20800 ns/op 0.75
Map access 1 prop 0.14300 ns/op 0.14900 ns/op 0.96
Object get x1000 7.5110 ns/op 7.3190 ns/op 1.03
Map get x1000 0.59100 ns/op 0.68300 ns/op 0.87
Object set x1000 48.907 ns/op 65.834 ns/op 0.74
Map set x1000 38.312 ns/op 52.369 ns/op 0.73
Return object 10000 times 0.22940 ns/op 0.25140 ns/op 0.91
Throw Error 10000 times 3.7280 us/op 4.0102 us/op 0.93
fastMsgIdFn sha256 / 200 bytes 3.1550 us/op 3.5440 us/op 0.89
fastMsgIdFn h32 xxhash / 200 bytes 268.00 ns/op 362.00 ns/op 0.74
fastMsgIdFn h64 xxhash / 200 bytes 327.00 ns/op 413.00 ns/op 0.79
fastMsgIdFn sha256 / 1000 bytes 11.139 us/op 11.880 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 410.00 ns/op 487.00 ns/op 0.84
fastMsgIdFn h64 xxhash / 1000 bytes 405.00 ns/op 470.00 ns/op 0.86
fastMsgIdFn sha256 / 10000 bytes 103.00 us/op 105.35 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 1.8910 us/op 2.0630 us/op 0.92
fastMsgIdFn h64 xxhash / 10000 bytes 1.3040 us/op 1.3920 us/op 0.94
send data - 1000 256B messages 18.059 ms/op 20.672 ms/op 0.87
send data - 1000 512B messages 25.401 ms/op 28.917 ms/op 0.88
send data - 1000 1024B messages 40.316 ms/op 44.308 ms/op 0.91
send data - 1000 1200B messages 33.894 ms/op 26.475 ms/op 1.28
send data - 1000 2048B messages 39.326 ms/op 43.124 ms/op 0.91
send data - 1000 4096B messages 38.869 ms/op 42.610 ms/op 0.91
send data - 1000 16384B messages 106.92 ms/op 114.66 ms/op 0.93
send data - 1000 65536B messages 391.85 ms/op 418.68 ms/op 0.94
enrSubnets - fastDeserialize 64 bits 1.2260 us/op 1.2310 us/op 1.00
enrSubnets - ssz BitVector 64 bits 420.00 ns/op 403.00 ns/op 1.04
enrSubnets - fastDeserialize 4 bits 169.00 ns/op 163.00 ns/op 1.04
enrSubnets - ssz BitVector 4 bits 410.00 ns/op 416.00 ns/op 0.99
prioritizePeers score -10:0 att 32-0.1 sync 2-0 99.991 us/op 100.23 us/op 1.00
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 121.20 us/op 130.91 us/op 0.93
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 154.13 us/op 169.08 us/op 0.91
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 289.37 us/op 293.07 us/op 0.99
prioritizePeers score 0:0 att 64-1 sync 4-1 330.89 us/op 354.58 us/op 0.93
array of 16000 items push then shift 1.5577 us/op 1.6869 us/op 0.92
LinkedList of 16000 items push then shift 8.5540 ns/op 9.0600 ns/op 0.94
array of 16000 items push then pop 64.844 ns/op 99.719 ns/op 0.65
LinkedList of 16000 items push then pop 8.3480 ns/op 8.9140 ns/op 0.94
array of 24000 items push then shift 2.2909 us/op 2.4280 us/op 0.94
LinkedList of 24000 items push then shift 8.7270 ns/op 8.9520 ns/op 0.97
array of 24000 items push then pop 93.760 ns/op 113.77 ns/op 0.82
LinkedList of 24000 items push then pop 8.2500 ns/op 8.5900 ns/op 0.96
intersect bitArray bitLen 8 6.7530 ns/op 6.6500 ns/op 1.02
intersect array and set length 8 57.125 ns/op 56.279 ns/op 1.02
intersect bitArray bitLen 128 31.667 ns/op 31.633 ns/op 1.00
intersect array and set length 128 759.82 ns/op 757.29 ns/op 1.00
bitArray.getTrueBitIndexes() bitLen 128 1.4880 us/op 1.4470 us/op 1.03
bitArray.getTrueBitIndexes() bitLen 248 2.3500 us/op 2.3610 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 512 4.6560 us/op 4.6530 us/op 1.00
Buffer.concat 32 items 961.00 ns/op 1.1030 us/op 0.87
Uint8Array.set 32 items 1.9390 us/op 1.5770 us/op 1.23
Set add up to 64 items then delete first 4.2368 us/op 4.2719 us/op 0.99
OrderedSet add up to 64 items then delete first 5.3616 us/op 5.4818 us/op 0.98
Set add up to 64 items then delete last 4.4744 us/op 4.5607 us/op 0.98
OrderedSet add up to 64 items then delete last 5.8532 us/op 5.6901 us/op 1.03
Set add up to 64 items then delete middle 4.4555 us/op 4.5316 us/op 0.98
OrderedSet add up to 64 items then delete middle 6.9232 us/op 6.9389 us/op 1.00
Set add up to 128 items then delete first 8.8318 us/op 9.2693 us/op 0.95
OrderedSet add up to 128 items then delete first 11.251 us/op 12.192 us/op 0.92
Set add up to 128 items then delete last 8.9089 us/op 9.0367 us/op 0.99
OrderedSet add up to 128 items then delete last 11.682 us/op 11.484 us/op 1.02
Set add up to 128 items then delete middle 8.7462 us/op 8.9770 us/op 0.97
OrderedSet add up to 128 items then delete middle 16.495 us/op 16.812 us/op 0.98
Set add up to 256 items then delete first 17.955 us/op 18.827 us/op 0.95
OrderedSet add up to 256 items then delete first 23.239 us/op 25.025 us/op 0.93
Set add up to 256 items then delete last 17.907 us/op 18.085 us/op 0.99
OrderedSet add up to 256 items then delete last 23.736 us/op 23.352 us/op 1.02
Set add up to 256 items then delete middle 17.598 us/op 17.903 us/op 0.98
OrderedSet add up to 256 items then delete middle 43.335 us/op 44.558 us/op 0.97
transfer serialized Status (84 B) 1.6830 us/op 1.7390 us/op 0.97
copy serialized Status (84 B) 1.3760 us/op 1.4000 us/op 0.98
transfer serialized SignedVoluntaryExit (112 B) 1.8560 us/op 1.8630 us/op 1.00
copy serialized SignedVoluntaryExit (112 B) 1.4570 us/op 1.4620 us/op 1.00
transfer serialized ProposerSlashing (416 B) 2.1180 us/op 1.9630 us/op 1.08
copy serialized ProposerSlashing (416 B) 2.0080 us/op 1.7660 us/op 1.14
transfer serialized Attestation (485 B) 2.4100 us/op 2.0000 us/op 1.21
copy serialized Attestation (485 B) 2.0720 us/op 1.7640 us/op 1.17
transfer serialized AttesterSlashing (33232 B) 2.6200 us/op 2.1720 us/op 1.21
copy serialized AttesterSlashing (33232 B) 5.2440 us/op 4.8420 us/op 1.08
transfer serialized Small SignedBeaconBlock (128000 B) 2.9390 us/op 2.5300 us/op 1.16
copy serialized Small SignedBeaconBlock (128000 B) 12.702 us/op 12.732 us/op 1.00
transfer serialized Avg SignedBeaconBlock (200000 B) 3.4820 us/op 3.1060 us/op 1.12
copy serialized Avg SignedBeaconBlock (200000 B) 38.872 us/op 19.134 us/op 2.03
transfer serialized BlobsSidecar (524380 B) 3.1760 us/op 2.8150 us/op 1.13
copy serialized BlobsSidecar (524380 B) 82.074 us/op 94.394 us/op 0.87
transfer serialized Big SignedBeaconBlock (1000000 B) 3.3000 us/op 3.1710 us/op 1.04
copy serialized Big SignedBeaconBlock (1000000 B) 158.45 us/op 211.54 us/op 0.75
pass gossip attestations to forkchoice per slot 4.0353 ms/op 4.0449 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 672.74 us/op 746.05 us/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 0 4.6952 ms/op 4.6180 ms/op 1.02
forkChoice updateHead vc 1000000 bc 64 eq 0 6.9602 ms/op 7.2592 ms/op 0.96
forkChoice updateHead vc 600000 bc 320 eq 0 4.0652 ms/op 4.1933 ms/op 0.97
forkChoice updateHead vc 600000 bc 1200 eq 0 4.3784 ms/op 4.3093 ms/op 1.02
forkChoice updateHead vc 600000 bc 7200 eq 0 5.5800 ms/op 5.2694 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 1000 11.196 ms/op 11.311 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 10000 12.004 ms/op 12.234 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 300000 16.043 ms/op 15.823 ms/op 1.01
computeDeltas 500000 validators 300 proto nodes 6.4157 ms/op 6.4430 ms/op 1.00
computeDeltas 500000 validators 1200 proto nodes 6.3671 ms/op 6.5189 ms/op 0.98
computeDeltas 500000 validators 7200 proto nodes 6.4053 ms/op 6.4059 ms/op 1.00
computeDeltas 750000 validators 300 proto nodes 9.6275 ms/op 9.7882 ms/op 0.98
computeDeltas 750000 validators 1200 proto nodes 9.5951 ms/op 9.7408 ms/op 0.99
computeDeltas 750000 validators 7200 proto nodes 9.6604 ms/op 9.6902 ms/op 1.00
computeDeltas 1400000 validators 300 proto nodes 17.917 ms/op 17.958 ms/op 1.00
computeDeltas 1400000 validators 1200 proto nodes 18.781 ms/op 19.393 ms/op 0.97
computeDeltas 1400000 validators 7200 proto nodes 18.922 ms/op 20.139 ms/op 0.94
computeDeltas 2100000 validators 300 proto nodes 28.246 ms/op 29.693 ms/op 0.95
computeDeltas 2100000 validators 1200 proto nodes 28.115 ms/op 28.764 ms/op 0.98
computeDeltas 2100000 validators 7200 proto nodes 28.091 ms/op 26.778 ms/op 1.05
computeProposerBoostScoreFromBalances 500000 validators 3.1545 ms/op 3.2345 ms/op 0.98
computeProposerBoostScoreFromBalances 750000 validators 3.1458 ms/op 3.2261 ms/op 0.98
computeProposerBoostScoreFromBalances 1400000 validators 3.2257 ms/op 3.2267 ms/op 1.00
computeProposerBoostScoreFromBalances 2100000 validators 3.2467 ms/op 3.2155 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 1.9919 ms/op 1.9881 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei worstcase 3.1117 ms/op 3.0086 ms/op 1.03
altair processAttestation - setStatus - 1/6 committees join 139.75 us/op 140.76 us/op 0.99
altair processAttestation - setStatus - 1/3 committees join 281.00 us/op 273.37 us/op 1.03
altair processAttestation - setStatus - 1/2 committees join 376.64 us/op 365.05 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 481.85 us/op 450.62 us/op 1.07
altair processAttestation - setStatus - 4/5 committees join 657.62 us/op 630.21 us/op 1.04
altair processAttestation - setStatus - 100% committees join 786.91 us/op 745.28 us/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase 10.411 ms/op 10.419 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.405 ms/op 33.171 ms/op 1.16
altair processBlock - 250000 vs - 7PWei worstcase 38.797 ms/op 40.199 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase hashState 96.030 ms/op 89.524 ms/op 1.07
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4244 ms/op 2.2987 ms/op 1.05
phase0 processBlock - 250000 vs - 7PWei worstcase 30.258 ms/op 30.009 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 567.13 us/op 488.30 us/op 1.16
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 11.247 us/op 7.4800 us/op 1.50
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 56.297 us/op 64.317 us/op 0.88
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.459 us/op 16.070 us/op 1.15
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 11.472 us/op 9.6010 us/op 1.19
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 162.20 us/op 130.18 us/op 1.25
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2956 ms/op 1.0220 ms/op 1.27
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5536 ms/op 1.4518 ms/op 1.07
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4766 ms/op 1.4760 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.4583 ms/op 3.1368 ms/op 1.10
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.6590 ms/op 2.2531 ms/op 1.18
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.9413 ms/op 5.2013 ms/op 0.95
Tree 40 250000 create 329.31 ms/op 338.57 ms/op 0.97
Tree 40 250000 get(125000) 190.72 ns/op 199.36 ns/op 0.96
Tree 40 250000 set(125000) 945.62 ns/op 875.25 ns/op 1.08
Tree 40 250000 toArray() 18.139 ms/op 17.608 ms/op 1.03
Tree 40 250000 iterate all - toArray() + loop 18.308 ms/op 17.601 ms/op 1.04
Tree 40 250000 iterate all - get(i) 64.212 ms/op 64.259 ms/op 1.00
MutableVector 250000 create 9.3000 ms/op 11.096 ms/op 0.84
MutableVector 250000 get(125000) 6.5290 ns/op 6.4590 ns/op 1.01
MutableVector 250000 set(125000) 270.81 ns/op 259.81 ns/op 1.04
MutableVector 250000 toArray() 3.5207 ms/op 3.0261 ms/op 1.16
MutableVector 250000 iterate all - toArray() + loop 3.2425 ms/op 3.5417 ms/op 0.92
MutableVector 250000 iterate all - get(i) 1.5044 ms/op 1.5150 ms/op 0.99
Array 250000 create 2.4226 ms/op 2.7256 ms/op 0.89
Array 250000 clone - spread 1.2215 ms/op 1.1586 ms/op 1.05
Array 250000 get(125000) 0.56300 ns/op 0.57500 ns/op 0.98
Array 250000 set(125000) 0.64300 ns/op 0.65000 ns/op 0.99
Array 250000 iterate all - loop 104.30 us/op 85.389 us/op 1.22
effectiveBalanceIncrements clone Uint8Array 300000 29.265 us/op 26.505 us/op 1.10
effectiveBalanceIncrements clone MutableVector 300000 343.00 ns/op 346.00 ns/op 0.99
effectiveBalanceIncrements rw all Uint8Array 300000 174.65 us/op 177.43 us/op 0.98
effectiveBalanceIncrements rw all MutableVector 300000 81.491 ms/op 80.685 ms/op 1.01
phase0 afterProcessEpoch - 250000 vs - 7PWei 114.22 ms/op 113.28 ms/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 48.791 ms/op 48.739 ms/op 1.00
altair processEpoch - mainnet_e81889 468.65 ms/op 444.82 ms/op 1.05
mainnet_e81889 - altair beforeProcessEpoch 79.595 ms/op 75.950 ms/op 1.05
mainnet_e81889 - altair processJustificationAndFinalization 12.875 us/op 14.057 us/op 0.92
mainnet_e81889 - altair processInactivityUpdates 5.6307 ms/op 5.5177 ms/op 1.02
mainnet_e81889 - altair processRewardsAndPenalties 76.407 ms/op 51.839 ms/op 1.47
mainnet_e81889 - altair processRegistryUpdates 2.2230 us/op 2.6200 us/op 0.85
mainnet_e81889 - altair processSlashings 485.00 ns/op 440.00 ns/op 1.10
mainnet_e81889 - altair processEth1DataReset 539.00 ns/op 506.00 ns/op 1.07
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2214 ms/op 1.2369 ms/op 0.99
mainnet_e81889 - altair processSlashingsReset 2.7910 us/op 3.1830 us/op 0.88
mainnet_e81889 - altair processRandaoMixesReset 3.9050 us/op 3.7140 us/op 1.05
mainnet_e81889 - altair processHistoricalRootsUpdate 719.00 ns/op 673.00 ns/op 1.07
mainnet_e81889 - altair processParticipationFlagUpdates 2.1430 us/op 1.8020 us/op 1.19
mainnet_e81889 - altair processSyncCommitteeUpdates 694.00 ns/op 647.00 ns/op 1.07
mainnet_e81889 - altair afterProcessEpoch 117.00 ms/op 118.32 ms/op 0.99
capella processEpoch - mainnet_e217614 1.8889 s/op 1.9500 s/op 0.97
mainnet_e217614 - capella beforeProcessEpoch 451.80 ms/op 448.28 ms/op 1.01
mainnet_e217614 - capella processJustificationAndFinalization 13.822 us/op 18.024 us/op 0.77
mainnet_e217614 - capella processInactivityUpdates 16.109 ms/op 21.314 ms/op 0.76
mainnet_e217614 - capella processRewardsAndPenalties 508.47 ms/op 541.33 ms/op 0.94
mainnet_e217614 - capella processRegistryUpdates 21.648 us/op 31.141 us/op 0.70
mainnet_e217614 - capella processSlashings 485.00 ns/op 967.00 ns/op 0.50
mainnet_e217614 - capella processEth1DataReset 566.00 ns/op 832.00 ns/op 0.68
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.9463 ms/op 4.3887 ms/op 0.90
mainnet_e217614 - capella processSlashingsReset 2.4680 us/op 4.4460 us/op 0.56
mainnet_e217614 - capella processRandaoMixesReset 4.4770 us/op 9.6130 us/op 0.47
mainnet_e217614 - capella processHistoricalRootsUpdate 617.00 ns/op 1.3350 us/op 0.46
mainnet_e217614 - capella processParticipationFlagUpdates 1.9450 us/op 4.0040 us/op 0.49
mainnet_e217614 - capella afterProcessEpoch 317.15 ms/op 351.66 ms/op 0.90
phase0 processEpoch - mainnet_e58758 401.37 ms/op 473.89 ms/op 0.85
mainnet_e58758 - phase0 beforeProcessEpoch 112.56 ms/op 151.55 ms/op 0.74
mainnet_e58758 - phase0 processJustificationAndFinalization 14.422 us/op 16.963 us/op 0.85
mainnet_e58758 - phase0 processRewardsAndPenalties 57.531 ms/op 70.331 ms/op 0.82
mainnet_e58758 - phase0 processRegistryUpdates 9.8680 us/op 11.228 us/op 0.88
mainnet_e58758 - phase0 processSlashings 483.00 ns/op 1.4140 us/op 0.34
mainnet_e58758 - phase0 processEth1DataReset 423.00 ns/op 474.00 ns/op 0.89
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 979.43 us/op 1.0535 ms/op 0.93
mainnet_e58758 - phase0 processSlashingsReset 2.1150 us/op 2.8800 us/op 0.73
mainnet_e58758 - phase0 processRandaoMixesReset 3.7750 us/op 4.8010 us/op 0.79
mainnet_e58758 - phase0 processHistoricalRootsUpdate 426.00 ns/op 872.00 ns/op 0.49
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.6070 us/op 4.1520 us/op 0.87
mainnet_e58758 - phase0 afterProcessEpoch 97.750 ms/op 102.51 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1858 ms/op 1.3845 ms/op 0.86
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4402 ms/op 1.4470 ms/op 1.00
altair processInactivityUpdates - 250000 normalcase 18.341 ms/op 27.452 ms/op 0.67
altair processInactivityUpdates - 250000 worstcase 18.557 ms/op 21.185 ms/op 0.88
phase0 processRegistryUpdates - 250000 normalcase 8.2290 us/op 10.939 us/op 0.75
phase0 processRegistryUpdates - 250000 badcase_full_deposits 331.20 us/op 396.09 us/op 0.84
phase0 processRegistryUpdates - 250000 worstcase 0.5 127.32 ms/op 130.72 ms/op 0.97
altair processRewardsAndPenalties - 250000 normalcase 64.644 ms/op 74.686 ms/op 0.87
altair processRewardsAndPenalties - 250000 worstcase 65.819 ms/op 75.311 ms/op 0.87
phase0 getAttestationDeltas - 250000 normalcase 8.0098 ms/op 10.131 ms/op 0.79
phase0 getAttestationDeltas - 250000 worstcase 8.1498 ms/op 8.7360 ms/op 0.93
phase0 processSlashings - 250000 worstcase 2.0957 ms/op 2.3470 ms/op 0.89
altair processSyncCommitteeUpdates - 250000 145.15 ms/op 159.28 ms/op 0.91
BeaconState.hashTreeRoot - No change 264.00 ns/op 268.00 ns/op 0.99
BeaconState.hashTreeRoot - 1 full validator 123.86 us/op 135.57 us/op 0.91
BeaconState.hashTreeRoot - 32 full validator 1.6580 ms/op 1.3220 ms/op 1.25
BeaconState.hashTreeRoot - 512 full validator 13.198 ms/op 14.675 ms/op 0.90
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 144.91 us/op 161.89 us/op 0.90
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9416 ms/op 1.8009 ms/op 1.08
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.818 ms/op 23.133 ms/op 1.03
BeaconState.hashTreeRoot - 1 balances 122.16 us/op 120.65 us/op 1.01
BeaconState.hashTreeRoot - 32 balances 1.4773 ms/op 1.4302 ms/op 1.03
BeaconState.hashTreeRoot - 512 balances 10.988 ms/op 11.385 ms/op 0.97
BeaconState.hashTreeRoot - 250000 balances 196.60 ms/op 210.22 ms/op 0.94
aggregationBits - 2048 els - zipIndexesInBitList 15.282 us/op 15.437 us/op 0.99
byteArrayEquals 32 49.144 ns/op 50.527 ns/op 0.97
Buffer.compare 32 54.424 ns/op 55.792 ns/op 0.98
byteArrayEquals 1024 1.4261 us/op 1.4648 us/op 0.97
Buffer.compare 1024 68.217 ns/op 71.174 ns/op 0.96
byteArrayEquals 16384 22.684 us/op 23.304 us/op 0.97
Buffer.compare 16384 277.22 ns/op 261.54 ns/op 1.06
byteArrayEquals 123687377 176.00 ms/op 179.48 ms/op 0.98
Buffer.compare 123687377 6.0397 ms/op 6.3797 ms/op 0.95
byteArrayEquals 32 - diff last byte 49.420 ns/op 50.388 ns/op 0.98
Buffer.compare 32 - diff last byte 54.955 ns/op 57.075 ns/op 0.96
byteArrayEquals 1024 - diff last byte 1.4305 us/op 1.4927 us/op 0.96
Buffer.compare 1024 - diff last byte 71.020 ns/op 71.601 ns/op 0.99
byteArrayEquals 16384 - diff last byte 22.808 us/op 23.338 us/op 0.98
Buffer.compare 16384 - diff last byte 274.41 ns/op 284.12 ns/op 0.97
byteArrayEquals 123687377 - diff last byte 175.72 ms/op 174.83 ms/op 1.01
Buffer.compare 123687377 - diff last byte 6.0586 ms/op 6.1075 ms/op 0.99
byteArrayEquals 32 - random bytes 6.0980 ns/op 5.6910 ns/op 1.07
Buffer.compare 32 - random bytes 60.808 ns/op 59.025 ns/op 1.03
byteArrayEquals 1024 - random bytes 5.7730 ns/op 5.5880 ns/op 1.03
Buffer.compare 1024 - random bytes 60.049 ns/op 58.266 ns/op 1.03
byteArrayEquals 16384 - random bytes 5.7980 ns/op 5.5650 ns/op 1.04
Buffer.compare 16384 - random bytes 60.042 ns/op 58.267 ns/op 1.03
byteArrayEquals 123687377 - random bytes 8.8200 ns/op 8.7900 ns/op 1.00
Buffer.compare 123687377 - random bytes 63.190 ns/op 61.410 ns/op 1.03
regular array get 100000 times 42.630 us/op 32.475 us/op 1.31
wrappedArray get 100000 times 43.400 us/op 32.140 us/op 1.35
arrayWithProxy get 100000 times 14.500 ms/op 13.861 ms/op 1.05
ssz.Root.equals 50.200 ns/op 48.795 ns/op 1.03
byteArrayEquals 49.069 ns/op 47.961 ns/op 1.02
Buffer.compare 10.894 ns/op 10.570 ns/op 1.03
shuffle list - 16384 els 6.9422 ms/op 7.0689 ms/op 0.98
shuffle list - 250000 els 102.21 ms/op 102.04 ms/op 1.00
processSlot - 1 slots 15.590 us/op 17.728 us/op 0.88
processSlot - 32 slots 3.7477 ms/op 2.7907 ms/op 1.34
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 56.146 ms/op 59.992 ms/op 0.94
getCommitteeAssignments - req 1 vs - 250000 vc 2.5169 ms/op 2.5254 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.7349 ms/op 3.7635 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0820 ms/op 4.0777 ms/op 1.00
findModifiedValidators - 10000 modified validators 514.46 ms/op 522.89 ms/op 0.98
findModifiedValidators - 1000 modified validators 421.42 ms/op 427.90 ms/op 0.98
findModifiedValidators - 100 modified validators 416.48 ms/op 431.51 ms/op 0.97
findModifiedValidators - 10 modified validators 402.76 ms/op 451.30 ms/op 0.89
findModifiedValidators - 1 modified validators 397.23 ms/op 399.48 ms/op 0.99
findModifiedValidators - no difference 420.06 ms/op 374.58 ms/op 1.12
compare ViewDUs 4.2915 s/op 4.9064 s/op 0.87
compare each validator Uint8Array 1.6792 s/op 1.6824 s/op 1.00
compare ViewDU to Uint8Array 1.0679 s/op 1.2171 s/op 0.88
migrate state 1000000 validators, 24 modified, 0 new 776.98 ms/op 819.34 ms/op 0.95
migrate state 1000000 validators, 1700 modified, 1000 new 1.0513 s/op 1.1184 s/op 0.94
migrate state 1000000 validators, 3400 modified, 2000 new 1.3341 s/op 1.4140 s/op 0.94
migrate state 1500000 validators, 24 modified, 0 new 771.48 ms/op 854.44 ms/op 0.90
migrate state 1500000 validators, 1700 modified, 1000 new 1.0687 s/op 1.1040 s/op 0.97
migrate state 1500000 validators, 3400 modified, 2000 new 1.3287 s/op 1.3132 s/op 1.01
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5900 ns/op 4.8400 ns/op 0.95
state getBlockRootAtSlot - 250000 vs - 7PWei 538.87 ns/op 705.66 ns/op 0.76
computeProposers - vc 250000 9.1319 ms/op 9.2748 ms/op 0.98
computeEpochShuffling - vc 250000 108.80 ms/op 106.14 ms/op 1.03
getNextSyncCommittee - vc 250000 178.57 ms/op 153.15 ms/op 1.17
computeSigningRoot for AttestationData 34.130 us/op 21.591 us/op 1.58
hash AttestationData serialized data then Buffer.toString(base64) 2.4350 us/op 2.3486 us/op 1.04
toHexString serialized data 1.1008 us/op 1.0848 us/op 1.01
Buffer.toString(base64) 209.97 ns/op 235.41 ns/op 0.89

by benchmarkbot/action

@wemeetagain wemeetagain merged commit fa30bcf into unstable Nov 10, 2023
14 checks passed
@wemeetagain wemeetagain deleted the tuyen/verify_blocks_state_transition_transfer_cache branch November 10, 2023 16:35
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.13.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.

2 participants