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: forkchoice filter change #6288

Merged
merged 6 commits into from
Jan 19, 2024
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Jan 12, 2024

Motivation

Description

  • Cache totalBalance for justified checkpoint so that we don't have to compute it every time
  • Implement getProposer() with the same logic to the spec
  • Main change is nodeIsViableForHead() function which map to filter_block_tree() function of the spec

Closes #6257

Copy link
Contributor

github-actions bot commented Jan 12, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d94d75d Previous: ea4cdad Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 701.50 us/op 845.57 us/op 0.83
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 85.750 us/op 87.344 us/op 0.98
BLS verify - blst-native 1.3605 ms/op 1.0954 ms/op 1.24
BLS verifyMultipleSignatures 3 - blst-native 2.9091 ms/op 2.3661 ms/op 1.23
BLS verifyMultipleSignatures 8 - blst-native 6.6062 ms/op 5.3253 ms/op 1.24
BLS verifyMultipleSignatures 32 - blst-native 23.554 ms/op 19.553 ms/op 1.20
BLS verifyMultipleSignatures 64 - blst-native 44.424 ms/op 38.858 ms/op 1.14
BLS verifyMultipleSignatures 128 - blst-native 87.138 ms/op 77.730 ms/op 1.12
BLS deserializing 10000 signatures 952.14 ms/op 823.35 ms/op 1.16
BLS deserializing 100000 signatures 10.594 s/op 8.2558 s/op 1.28
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.5571 ms/op 1.1401 ms/op 1.37
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.8083 ms/op 1.2852 ms/op 1.41
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.9000 ms/op 2.4333 ms/op 1.19
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.0403 ms/op 3.4817 ms/op 1.16
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.6196 ms/op 4.9668 ms/op 1.33
BLS aggregatePubkeys 32 - blst-native 30.394 us/op 22.542 us/op 1.35
BLS aggregatePubkeys 128 - blst-native 118.87 us/op 88.558 us/op 1.34
getAttestationsForBlock 70.660 ms/op 41.188 ms/op 1.72
getSlashingsAndExits - default max 257.93 us/op 115.65 us/op 2.23
getSlashingsAndExits - 2k 427.06 us/op 306.12 us/op 1.40
proposeBlockBody type=full, size=empty 6.8362 ms/op 4.0500 ms/op 1.69
isKnown best case - 1 super set check 423.00 ns/op 565.00 ns/op 0.75
isKnown normal case - 2 super set checks 453.00 ns/op 555.00 ns/op 0.82
isKnown worse case - 16 super set checks 465.00 ns/op 567.00 ns/op 0.82
CheckpointStateCache - add get delete 6.3230 us/op 5.0350 us/op 1.26
validate api signedAggregateAndProof - struct 3.4603 ms/op 2.4247 ms/op 1.43
validate gossip signedAggregateAndProof - struct 2.9153 ms/op 2.4078 ms/op 1.21
validate gossip attestation - vc 640000 1.4090 ms/op 1.1828 ms/op 1.19
batch validate gossip attestation - vc 640000 - chunk 32 167.53 us/op 146.58 us/op 1.14
batch validate gossip attestation - vc 640000 - chunk 64 166.73 us/op 130.63 us/op 1.28
batch validate gossip attestation - vc 640000 - chunk 128 158.67 us/op 123.12 us/op 1.29
batch validate gossip attestation - vc 640000 - chunk 256 159.92 us/op 128.08 us/op 1.25
pickEth1Vote - no votes 1.6674 ms/op 1.0244 ms/op 1.63
pickEth1Vote - max votes 13.214 ms/op 10.187 ms/op 1.30
pickEth1Vote - Eth1Data hashTreeRoot value x2048 23.670 ms/op 15.745 ms/op 1.50
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 30.670 ms/op 28.655 ms/op 1.07
pickEth1Vote - Eth1Data fastSerialize value x2048 854.85 us/op 414.26 us/op 2.06
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.0853 ms/op 8.6475 ms/op 0.59
bytes32 toHexString 596.00 ns/op 354.00 ns/op 1.68
bytes32 Buffer.toString(hex) 339.00 ns/op 205.00 ns/op 1.65
bytes32 Buffer.toString(hex) from Uint8Array 483.00 ns/op 309.00 ns/op 1.56
bytes32 Buffer.toString(hex) + 0x 347.00 ns/op 194.00 ns/op 1.79
Object access 1 prop 0.21500 ns/op 0.11100 ns/op 1.94
Map access 1 prop 0.16000 ns/op 0.10100 ns/op 1.58
Object get x1000 7.9000 ns/op 5.2210 ns/op 1.51
Map get x1000 0.90300 ns/op 0.79200 ns/op 1.14
Object set x1000 59.838 ns/op 27.319 ns/op 2.19
Map set x1000 44.661 ns/op 17.558 ns/op 2.54
Return object 10000 times 0.27050 ns/op 0.23070 ns/op 1.17
Throw Error 10000 times 4.1752 us/op 2.8890 us/op 1.45
fastMsgIdFn sha256 / 200 bytes 3.7300 us/op 2.0080 us/op 1.86
fastMsgIdFn h32 xxhash / 200 bytes 415.00 ns/op 254.00 ns/op 1.63
fastMsgIdFn h64 xxhash / 200 bytes 464.00 ns/op 293.00 ns/op 1.58
fastMsgIdFn sha256 / 1000 bytes 12.959 us/op 6.3210 us/op 2.05
fastMsgIdFn h32 xxhash / 1000 bytes 596.00 ns/op 393.00 ns/op 1.52
fastMsgIdFn h64 xxhash / 1000 bytes 538.00 ns/op 369.00 ns/op 1.46
fastMsgIdFn sha256 / 10000 bytes 118.91 us/op 53.754 us/op 2.21
fastMsgIdFn h32 xxhash / 10000 bytes 2.1240 us/op 1.9000 us/op 1.12
fastMsgIdFn h64 xxhash / 10000 bytes 1.5050 us/op 1.1830 us/op 1.27
send data - 1000 256B messages 26.281 ms/op 14.367 ms/op 1.83
send data - 1000 512B messages 29.430 ms/op 21.262 ms/op 1.38
send data - 1000 1024B messages 46.260 ms/op 32.568 ms/op 1.42
send data - 1000 1200B messages 37.900 ms/op 37.930 ms/op 1.00
send data - 1000 2048B messages 48.811 ms/op 47.571 ms/op 1.03
send data - 1000 4096B messages 45.914 ms/op 41.817 ms/op 1.10
send data - 1000 16384B messages 119.74 ms/op 113.31 ms/op 1.06
send data - 1000 65536B messages 482.61 ms/op 455.28 ms/op 1.06
enrSubnets - fastDeserialize 64 bits 1.4680 us/op 1.0220 us/op 1.44
enrSubnets - ssz BitVector 64 bits 447.00 ns/op 421.00 ns/op 1.06
enrSubnets - fastDeserialize 4 bits 172.00 ns/op 139.00 ns/op 1.24
enrSubnets - ssz BitVector 4 bits 440.00 ns/op 401.00 ns/op 1.10
prioritizePeers score -10:0 att 32-0.1 sync 2-0 106.00 us/op 84.064 us/op 1.26
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 135.63 us/op 111.74 us/op 1.21
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 173.44 us/op 166.17 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 299.34 us/op 275.67 us/op 1.09
prioritizePeers score 0:0 att 64-1 sync 4-1 370.44 us/op 315.43 us/op 1.17
array of 16000 items push then shift 1.7254 us/op 1.3896 us/op 1.24
LinkedList of 16000 items push then shift 9.4420 ns/op 6.5940 ns/op 1.43
array of 16000 items push then pop 100.75 ns/op 114.88 ns/op 0.88
LinkedList of 16000 items push then pop 9.0110 ns/op 6.6000 ns/op 1.37
array of 24000 items push then shift 2.5149 us/op 2.0031 us/op 1.26
LinkedList of 24000 items push then shift 9.1120 ns/op 10.272 ns/op 0.89
array of 24000 items push then pop 124.19 ns/op 173.35 ns/op 0.72
LinkedList of 24000 items push then pop 8.9780 ns/op 5.8660 ns/op 1.53
intersect bitArray bitLen 8 6.5950 ns/op 5.4150 ns/op 1.22
intersect array and set length 8 65.259 ns/op 49.712 ns/op 1.31
intersect bitArray bitLen 128 34.929 ns/op 28.448 ns/op 1.23
intersect array and set length 128 894.02 ns/op 736.36 ns/op 1.21
bitArray.getTrueBitIndexes() bitLen 128 1.6200 us/op 1.5870 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 248 2.5570 us/op 2.9940 us/op 0.85
bitArray.getTrueBitIndexes() bitLen 512 4.9140 us/op 6.2920 us/op 0.78
Buffer.concat 32 items 911.00 ns/op 890.00 ns/op 1.02
Uint8Array.set 32 items 1.5620 us/op 1.6780 us/op 0.93
Set add up to 64 items then delete first 4.4812 us/op 2.5204 us/op 1.78
OrderedSet add up to 64 items then delete first 5.6875 us/op 3.9496 us/op 1.44
Set add up to 64 items then delete last 4.7555 us/op 2.7205 us/op 1.75
OrderedSet add up to 64 items then delete last 5.9695 us/op 4.3201 us/op 1.38
Set add up to 64 items then delete middle 4.6202 us/op 2.7549 us/op 1.68
OrderedSet add up to 64 items then delete middle 7.3843 us/op 5.5489 us/op 1.33
Set add up to 128 items then delete first 9.3919 us/op 5.2815 us/op 1.78
OrderedSet add up to 128 items then delete first 12.634 us/op 8.2628 us/op 1.53
Set add up to 128 items then delete last 9.6210 us/op 4.9656 us/op 1.94
OrderedSet add up to 128 items then delete last 11.684 us/op 7.7623 us/op 1.51
Set add up to 128 items then delete middle 9.9630 us/op 5.3568 us/op 1.86
OrderedSet add up to 128 items then delete middle 18.618 us/op 13.365 us/op 1.39
Set add up to 256 items then delete first 19.552 us/op 10.707 us/op 1.83
OrderedSet add up to 256 items then delete first 25.843 us/op 17.081 us/op 1.51
Set add up to 256 items then delete last 19.144 us/op 10.522 us/op 1.82
OrderedSet add up to 256 items then delete last 24.377 us/op 14.705 us/op 1.66
Set add up to 256 items then delete middle 18.712 us/op 10.037 us/op 1.86
OrderedSet add up to 256 items then delete middle 50.572 us/op 35.919 us/op 1.41
transfer serialized Status (84 B) 1.6880 us/op 1.5110 us/op 1.12
copy serialized Status (84 B) 1.2500 us/op 1.1660 us/op 1.07
transfer serialized SignedVoluntaryExit (112 B) 2.1500 us/op 1.5590 us/op 1.38
copy serialized SignedVoluntaryExit (112 B) 1.5890 us/op 1.2090 us/op 1.31
transfer serialized ProposerSlashing (416 B) 3.1090 us/op 1.8990 us/op 1.64
copy serialized ProposerSlashing (416 B) 2.5680 us/op 1.8410 us/op 1.39
transfer serialized Attestation (485 B) 3.0500 us/op 1.9940 us/op 1.53
copy serialized Attestation (485 B) 2.3430 us/op 1.9010 us/op 1.23
transfer serialized AttesterSlashing (33232 B) 2.2720 us/op 1.5240 us/op 1.49
copy serialized AttesterSlashing (33232 B) 5.0650 us/op 7.9340 us/op 0.64
transfer serialized Small SignedBeaconBlock (128000 B) 2.3210 us/op 1.8260 us/op 1.27
copy serialized Small SignedBeaconBlock (128000 B) 13.294 us/op 25.747 us/op 0.52
transfer serialized Avg SignedBeaconBlock (200000 B) 2.7110 us/op 1.9480 us/op 1.39
copy serialized Avg SignedBeaconBlock (200000 B) 20.199 us/op 42.152 us/op 0.48
transfer serialized BlobsSidecar (524380 B) 2.9940 us/op 2.3390 us/op 1.28
copy serialized BlobsSidecar (524380 B) 104.50 us/op 183.13 us/op 0.57
transfer serialized Big SignedBeaconBlock (1000000 B) 2.8800 us/op 3.0720 us/op 0.94
copy serialized Big SignedBeaconBlock (1000000 B) 155.50 us/op 278.15 us/op 0.56
pass gossip attestations to forkchoice per slot 4.4556 ms/op 2.8200 ms/op 1.58
forkChoice updateHead vc 100000 bc 64 eq 0 695.99 us/op 465.73 us/op 1.49
forkChoice updateHead vc 600000 bc 64 eq 0 4.2407 ms/op 3.0348 ms/op 1.40
forkChoice updateHead vc 1000000 bc 64 eq 0 7.1496 ms/op 4.5694 ms/op 1.56
forkChoice updateHead vc 600000 bc 320 eq 0 4.2099 ms/op 2.6901 ms/op 1.56
forkChoice updateHead vc 600000 bc 1200 eq 0 4.3861 ms/op 2.7404 ms/op 1.60
forkChoice updateHead vc 600000 bc 7200 eq 0 5.4738 ms/op 3.7514 ms/op 1.46
forkChoice updateHead vc 600000 bc 64 eq 1000 11.526 ms/op 10.050 ms/op 1.15
forkChoice updateHead vc 600000 bc 64 eq 10000 12.008 ms/op 9.8486 ms/op 1.22
forkChoice updateHead vc 600000 bc 64 eq 300000 15.734 ms/op 12.354 ms/op 1.27
computeDeltas 500000 validators 300 proto nodes 6.7396 ms/op 3.1688 ms/op 2.13
computeDeltas 500000 validators 1200 proto nodes 6.3923 ms/op 2.9780 ms/op 2.15
computeDeltas 500000 validators 7200 proto nodes 6.2958 ms/op 2.8549 ms/op 2.21
computeDeltas 750000 validators 300 proto nodes 9.9302 ms/op 4.3259 ms/op 2.30
computeDeltas 750000 validators 1200 proto nodes 9.9510 ms/op 4.4229 ms/op 2.25
computeDeltas 750000 validators 7200 proto nodes 9.9675 ms/op 4.3462 ms/op 2.29
computeDeltas 1400000 validators 300 proto nodes 18.922 ms/op 8.4912 ms/op 2.23
computeDeltas 1400000 validators 1200 proto nodes 19.756 ms/op 8.4567 ms/op 2.34
computeDeltas 1400000 validators 7200 proto nodes 19.383 ms/op 9.0931 ms/op 2.13
computeDeltas 2100000 validators 300 proto nodes 29.515 ms/op 13.887 ms/op 2.13
computeDeltas 2100000 validators 1200 proto nodes 29.130 ms/op 13.452 ms/op 2.17
computeDeltas 2100000 validators 7200 proto nodes 28.470 ms/op 13.350 ms/op 2.13
altair processAttestation - 250000 vs - 7PWei normalcase 2.2059 ms/op 1.9969 ms/op 1.10
altair processAttestation - 250000 vs - 7PWei worstcase 3.2411 ms/op 2.6677 ms/op 1.21
altair processAttestation - setStatus - 1/6 committees join 175.02 us/op 90.138 us/op 1.94
altair processAttestation - setStatus - 1/3 committees join 340.94 us/op 174.83 us/op 1.95
altair processAttestation - setStatus - 1/2 committees join 470.84 us/op 232.70 us/op 2.02
altair processAttestation - setStatus - 2/3 committees join 575.40 us/op 296.00 us/op 1.94
altair processAttestation - setStatus - 4/5 committees join 779.12 us/op 410.02 us/op 1.90
altair processAttestation - setStatus - 100% committees join 928.69 us/op 542.69 us/op 1.71
altair processBlock - 250000 vs - 7PWei normalcase 10.422 ms/op 8.8227 ms/op 1.18
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.942 ms/op 33.288 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase 40.363 ms/op 33.431 ms/op 1.21
altair processBlock - 250000 vs - 7PWei worstcase hashState 89.689 ms/op 80.519 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3823 ms/op 1.9404 ms/op 1.23
phase0 processBlock - 250000 vs - 7PWei worstcase 30.186 ms/op 28.928 ms/op 1.04
altair processEth1Data - 250000 vs - 7PWei normalcase 482.77 us/op 320.19 us/op 1.51
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.7170 us/op 3.7150 us/op 2.35
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 36.777 us/op 38.203 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 19.598 us/op 9.3820 us/op 2.09
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.022 us/op 4.4090 us/op 2.27
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 169.51 us/op 125.49 us/op 1.35
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1380 ms/op 824.92 us/op 1.38
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5941 ms/op 1.0902 ms/op 1.46
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5683 ms/op 1.0008 ms/op 1.57
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8216 ms/op 2.3989 ms/op 1.59
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2874 ms/op 1.5767 ms/op 1.45
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.6937 ms/op 3.9101 ms/op 1.20
Tree 40 250000 create 377.42 ms/op 262.52 ms/op 1.44
Tree 40 250000 get(125000) 199.74 ns/op 112.38 ns/op 1.78
Tree 40 250000 set(125000) 992.17 ns/op 760.98 ns/op 1.30
Tree 40 250000 toArray() 18.562 ms/op 13.265 ms/op 1.40
Tree 40 250000 iterate all - toArray() + loop 18.664 ms/op 10.554 ms/op 1.77
Tree 40 250000 iterate all - get(i) 65.095 ms/op 45.454 ms/op 1.43
MutableVector 250000 create 13.425 ms/op 10.605 ms/op 1.27
MutableVector 250000 get(125000) 6.2910 ns/op 5.5060 ns/op 1.14
MutableVector 250000 set(125000) 270.45 ns/op 199.10 ns/op 1.36
MutableVector 250000 toArray() 3.0690 ms/op 3.7689 ms/op 0.81
MutableVector 250000 iterate all - toArray() + loop 3.3018 ms/op 2.6108 ms/op 1.26
MutableVector 250000 iterate all - get(i) 1.5413 ms/op 1.3339 ms/op 1.16
Array 250000 create 2.8823 ms/op 2.4185 ms/op 1.19
Array 250000 clone - spread 1.4114 ms/op 1.0808 ms/op 1.31
Array 250000 get(125000) 1.1200 ns/op 0.94100 ns/op 1.19
Array 250000 set(125000) 4.1580 ns/op 1.1210 ns/op 3.71
Array 250000 iterate all - loop 162.97 us/op 154.90 us/op 1.05
effectiveBalanceIncrements clone Uint8Array 300000 32.054 us/op 12.639 us/op 2.54
effectiveBalanceIncrements clone MutableVector 300000 448.00 ns/op 298.00 ns/op 1.50
effectiveBalanceIncrements rw all Uint8Array 300000 196.97 us/op 184.96 us/op 1.06
effectiveBalanceIncrements rw all MutableVector 300000 89.352 ms/op 63.614 ms/op 1.40
phase0 afterProcessEpoch - 250000 vs - 7PWei 111.01 ms/op 78.924 ms/op 1.41
phase0 beforeProcessEpoch - 250000 vs - 7PWei 35.448 ms/op 51.014 ms/op 0.69
altair processEpoch - mainnet_e81889 504.61 ms/op 456.32 ms/op 1.11
mainnet_e81889 - altair beforeProcessEpoch 80.581 ms/op 81.870 ms/op 0.98
mainnet_e81889 - altair processJustificationAndFinalization 14.582 us/op 8.5720 us/op 1.70
mainnet_e81889 - altair processInactivityUpdates 5.8550 ms/op 6.6446 ms/op 0.88
mainnet_e81889 - altair processRewardsAndPenalties 65.792 ms/op 58.042 ms/op 1.13
mainnet_e81889 - altair processRegistryUpdates 2.3370 us/op 1.2070 us/op 1.94
mainnet_e81889 - altair processSlashings 455.00 ns/op 409.00 ns/op 1.11
mainnet_e81889 - altair processEth1DataReset 431.00 ns/op 498.00 ns/op 0.87
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3570 ms/op 1.1097 ms/op 1.22
mainnet_e81889 - altair processSlashingsReset 3.5870 us/op 4.1820 us/op 0.86
mainnet_e81889 - altair processRandaoMixesReset 4.5700 us/op 5.0080 us/op 0.91
mainnet_e81889 - altair processHistoricalRootsUpdate 682.00 ns/op 606.00 ns/op 1.13
mainnet_e81889 - altair processParticipationFlagUpdates 2.3430 us/op 3.0110 us/op 0.78
mainnet_e81889 - altair processSyncCommitteeUpdates 634.00 ns/op 774.00 ns/op 0.82
mainnet_e81889 - altair afterProcessEpoch 115.72 ms/op 89.000 ms/op 1.30
capella processEpoch - mainnet_e217614 2.0739 s/op 2.2757 s/op 0.91
mainnet_e217614 - capella beforeProcessEpoch 483.50 ms/op 498.56 ms/op 0.97
mainnet_e217614 - capella processJustificationAndFinalization 19.284 us/op 8.2870 us/op 2.33
mainnet_e217614 - capella processInactivityUpdates 20.174 ms/op 15.497 ms/op 1.30
mainnet_e217614 - capella processRewardsAndPenalties 431.70 ms/op 398.71 ms/op 1.08
mainnet_e217614 - capella processRegistryUpdates 17.432 us/op 22.399 us/op 0.78
mainnet_e217614 - capella processSlashings 521.00 ns/op 616.00 ns/op 0.85
mainnet_e217614 - capella processEth1DataReset 386.00 ns/op 219.00 ns/op 1.76
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.3399 ms/op 5.0092 ms/op 0.87
mainnet_e217614 - capella processSlashingsReset 2.7880 us/op 3.5790 us/op 0.78
mainnet_e217614 - capella processRandaoMixesReset 4.5530 us/op 4.9620 us/op 0.92
mainnet_e217614 - capella processHistoricalRootsUpdate 729.00 ns/op 346.00 ns/op 2.11
mainnet_e217614 - capella processParticipationFlagUpdates 1.4730 us/op 1.2510 us/op 1.18
mainnet_e217614 - capella afterProcessEpoch 311.90 ms/op 212.97 ms/op 1.46
phase0 processEpoch - mainnet_e58758 439.74 ms/op 438.54 ms/op 1.00
mainnet_e58758 - phase0 beforeProcessEpoch 129.40 ms/op 120.20 ms/op 1.08
mainnet_e58758 - phase0 processJustificationAndFinalization 16.177 us/op 8.5110 us/op 1.90
mainnet_e58758 - phase0 processRewardsAndPenalties 54.222 ms/op 44.184 ms/op 1.23
mainnet_e58758 - phase0 processRegistryUpdates 8.3640 us/op 4.0940 us/op 2.04
mainnet_e58758 - phase0 processSlashings 552.00 ns/op 217.00 ns/op 2.54
mainnet_e58758 - phase0 processEth1DataReset 422.00 ns/op 314.00 ns/op 1.34
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1092 ms/op 835.37 us/op 1.33
mainnet_e58758 - phase0 processSlashingsReset 2.7430 us/op 3.7170 us/op 0.74
mainnet_e58758 - phase0 processRandaoMixesReset 4.0700 us/op 4.0530 us/op 1.00
mainnet_e58758 - phase0 processHistoricalRootsUpdate 511.00 ns/op 306.00 ns/op 1.67
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.9140 us/op 1.8530 us/op 2.11
mainnet_e58758 - phase0 afterProcessEpoch 98.358 ms/op 65.874 ms/op 1.49
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4830 ms/op 1.0389 ms/op 1.43
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9393 ms/op 1.1162 ms/op 1.74
altair processInactivityUpdates - 250000 normalcase 29.705 ms/op 22.819 ms/op 1.30
altair processInactivityUpdates - 250000 worstcase 28.009 ms/op 22.811 ms/op 1.23
phase0 processRegistryUpdates - 250000 normalcase 9.3430 us/op 3.5790 us/op 2.61
phase0 processRegistryUpdates - 250000 badcase_full_deposits 362.79 us/op 261.22 us/op 1.39
phase0 processRegistryUpdates - 250000 worstcase 0.5 135.02 ms/op 114.67 ms/op 1.18
altair processRewardsAndPenalties - 250000 normalcase 59.108 ms/op 47.050 ms/op 1.26
altair processRewardsAndPenalties - 250000 worstcase 61.286 ms/op 54.059 ms/op 1.13
phase0 getAttestationDeltas - 250000 normalcase 9.9464 ms/op 9.1407 ms/op 1.09
phase0 getAttestationDeltas - 250000 worstcase 10.586 ms/op 7.0746 ms/op 1.50
phase0 processSlashings - 250000 worstcase 99.435 us/op 59.090 us/op 1.68
altair processSyncCommitteeUpdates - 250000 168.44 ms/op 127.56 ms/op 1.32
BeaconState.hashTreeRoot - No change 491.00 ns/op 220.00 ns/op 2.23
BeaconState.hashTreeRoot - 1 full validator 133.78 us/op 161.53 us/op 0.83
BeaconState.hashTreeRoot - 32 full validator 1.3235 ms/op 1.2748 ms/op 1.04
BeaconState.hashTreeRoot - 512 full validator 14.655 ms/op 15.571 ms/op 0.94
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 157.38 us/op 153.69 us/op 1.02
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.4964 ms/op 1.9203 ms/op 1.30
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.239 ms/op 30.297 ms/op 1.06
BeaconState.hashTreeRoot - 1 balances 163.12 us/op 131.87 us/op 1.24
BeaconState.hashTreeRoot - 32 balances 1.0744 ms/op 1.5311 ms/op 0.70
BeaconState.hashTreeRoot - 512 balances 11.349 ms/op 10.073 ms/op 1.13
BeaconState.hashTreeRoot - 250000 balances 219.03 ms/op 164.35 ms/op 1.33
aggregationBits - 2048 els - zipIndexesInBitList 19.847 us/op 12.437 us/op 1.60
byteArrayEquals 32 80.559 ns/op 70.042 ns/op 1.15
Buffer.compare 32 63.952 ns/op 41.676 ns/op 1.53
byteArrayEquals 1024 2.2077 us/op 1.8660 us/op 1.18
Buffer.compare 1024 81.103 ns/op 46.757 ns/op 1.73
byteArrayEquals 16384 34.310 us/op 28.960 us/op 1.18
Buffer.compare 16384 252.04 ns/op 231.83 ns/op 1.09
byteArrayEquals 123687377 272.13 ms/op 217.69 ms/op 1.25
Buffer.compare 123687377 8.6211 ms/op 6.4326 ms/op 1.34
byteArrayEquals 32 - diff last byte 82.219 ns/op 60.504 ns/op 1.36
Buffer.compare 32 - diff last byte 60.329 ns/op 37.730 ns/op 1.60
byteArrayEquals 1024 - diff last byte 2.2839 us/op 1.6941 us/op 1.35
Buffer.compare 1024 - diff last byte 79.613 ns/op 48.071 ns/op 1.66
byteArrayEquals 16384 - diff last byte 36.915 us/op 27.135 us/op 1.36
Buffer.compare 16384 - diff last byte 318.30 ns/op 196.99 ns/op 1.62
byteArrayEquals 123687377 - diff last byte 273.30 ms/op 205.46 ms/op 1.33
Buffer.compare 123687377 - diff last byte 8.8363 ms/op 6.5881 ms/op 1.34
byteArrayEquals 32 - random bytes 5.9820 ns/op 5.4220 ns/op 1.10
Buffer.compare 32 - random bytes 67.322 ns/op 39.225 ns/op 1.72
byteArrayEquals 1024 - random bytes 6.3270 ns/op 5.5730 ns/op 1.14
Buffer.compare 1024 - random bytes 67.452 ns/op 37.470 ns/op 1.80
byteArrayEquals 16384 - random bytes 6.4440 ns/op 5.0810 ns/op 1.27
Buffer.compare 16384 - random bytes 63.665 ns/op 36.988 ns/op 1.72
byteArrayEquals 123687377 - random bytes 12.450 ns/op 7.3500 ns/op 1.69
Buffer.compare 123687377 - random bytes 75.070 ns/op 46.090 ns/op 1.63
regular array get 100000 times 48.418 us/op 42.562 us/op 1.14
wrappedArray get 100000 times 48.176 us/op 42.129 us/op 1.14
arrayWithProxy get 100000 times 16.466 ms/op 9.8656 ms/op 1.67
ssz.Root.equals 60.008 ns/op 56.228 ns/op 1.07
byteArrayEquals 58.718 ns/op 57.189 ns/op 1.03
Buffer.compare 13.445 ns/op 9.5750 ns/op 1.40
shuffle list - 16384 els 7.7488 ms/op 4.7380 ms/op 1.64
shuffle list - 250000 els 110.04 ms/op 70.468 ms/op 1.56
processSlot - 1 slots 17.941 us/op 16.876 us/op 1.06
processSlot - 32 slots 3.5249 ms/op 2.6759 ms/op 1.32
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 62.494 ms/op 51.872 ms/op 1.20
getCommitteeAssignments - req 1 vs - 250000 vc 2.6151 ms/op 2.2554 ms/op 1.16
getCommitteeAssignments - req 100 vs - 250000 vc 3.7260 ms/op 3.4010 ms/op 1.10
getCommitteeAssignments - req 1000 vs - 250000 vc 4.1064 ms/op 3.7177 ms/op 1.10
findModifiedValidators - 10000 modified validators 565.85 ms/op 450.27 ms/op 1.26
findModifiedValidators - 1000 modified validators 427.54 ms/op 352.50 ms/op 1.21
findModifiedValidators - 100 modified validators 424.31 ms/op 326.35 ms/op 1.30
findModifiedValidators - 10 modified validators 440.17 ms/op 335.22 ms/op 1.31
findModifiedValidators - 1 modified validators 438.72 ms/op 339.26 ms/op 1.29
findModifiedValidators - no difference 426.05 ms/op 317.31 ms/op 1.34
compare ViewDUs 4.5101 s/op 3.6755 s/op 1.23
compare each validator Uint8Array 1.7983 s/op 926.57 ms/op 1.94
compare ViewDU to Uint8Array 1.2116 s/op 908.79 ms/op 1.33
migrate state 1000000 validators, 24 modified, 0 new 805.97 ms/op 656.50 ms/op 1.23
migrate state 1000000 validators, 1700 modified, 1000 new 1.1455 s/op 1.0806 s/op 1.06
migrate state 1000000 validators, 3400 modified, 2000 new 1.4194 s/op 1.3965 s/op 1.02
migrate state 1500000 validators, 24 modified, 0 new 849.28 ms/op 710.62 ms/op 1.20
migrate state 1500000 validators, 1700 modified, 1000 new 1.1154 s/op 951.86 ms/op 1.17
migrate state 1500000 validators, 3400 modified, 2000 new 1.3050 s/op 1.1503 s/op 1.13
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5900 ns/op 3.4500 ns/op 1.33
state getBlockRootAtSlot - 250000 vs - 7PWei 647.54 ns/op 627.71 ns/op 1.03
computeProposers - vc 250000 9.2632 ms/op 5.9566 ms/op 1.56
computeEpochShuffling - vc 250000 104.22 ms/op 66.530 ms/op 1.57
getNextSyncCommittee - vc 250000 154.57 ms/op 100.73 ms/op 1.53
computeSigningRoot for AttestationData 26.993 us/op 25.667 us/op 1.05
hash AttestationData serialized data then Buffer.toString(base64) 2.3385 us/op 1.1808 us/op 1.98
toHexString serialized data 1.0695 us/op 738.78 ns/op 1.45
Buffer.toString(base64) 224.12 ns/op 152.80 ns/op 1.47

by benchmarkbot/action

Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Merging #6288 (72dd9e9) into unstable (aa87c54) will decrease coverage by 3.77%.
Report is 23 commits behind head on unstable.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6288      +/-   ##
============================================
- Coverage     80.38%   76.61%   -3.77%     
============================================
  Files           202      248      +46     
  Lines         19620    25898    +6278     
  Branches       1176     1448     +272     
============================================
+ Hits          15771    19842    +4071     
- Misses         3821     6026    +2205     
- Partials         28       30       +2     

@philknows philknows added this to the v1.15.0 milestone Jan 18, 2024
@twoeths twoeths marked this pull request as ready for review January 19, 2024 06:51
@twoeths twoeths requested a review from a team as a code owner January 19, 2024 06:51
Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm

@g11tech g11tech merged commit 2db7120 into unstable Jan 19, 2024
14 of 15 checks passed
@g11tech g11tech deleted the tuyen/forkchoice_filter_change branch January 19, 2024 07:57
ensi321 pushed a commit to ensi321/lodestar that referenced this pull request Jan 22, 2024
* fix: cache justifiedTotalActiveBalanceByIncrement and implement getProposerScore()

* feat: confirmation rule prerequisite for forkchoice

* chore: no need to change unrealizedJustified in ForkChoiceStore

* fix: beacon-node perf test

* fix: spec test v1.4.0-beta.6

* fix: ignore whisk for now
@wemeetagain
Copy link
Member

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

Confirmation rule prerequisite
4 participants