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: add proposer boost reorg flag #6652

Open
wants to merge 17 commits into
base: unstable
Choose a base branch
from

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Apr 8, 2024

Motivation

Wire the existed proposer boost reorg functionality to block production.

Description

  • Call getProposerHead() in block production
  • Call predictProposerHead() in prepareForNextSlot()
  • Introduce proposerBoostReorg flag. Default to be false for now as this is seen as an experimental feature
  • Add proposerBoostReorg e2e test thanks to @tuyennhv
  • Add related metrics
  • Rename proposerBoostEnabled flag to proposerBoost

Closes #5125

@ensi321 ensi321 requested a review from a team as a code owner April 8, 2024 16:13
Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 58.94737% with 39 lines in your changes missing coverage. Please review.

Project coverage is 62.19%. Comparing base (49c1689) to head (3fe0185).

Current head 3fe0185 differs from pull request most recent head c5b187b

Please upload reports for the commit c5b187b to get more accurate results.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6652      +/-   ##
============================================
- Coverage     62.19%   62.19%   -0.01%     
============================================
  Files           571      571              
  Lines         60021    60097      +76     
  Branches       1973     1980       +7     
============================================
+ Hits          37333    37375      +42     
- Misses        22645    22679      +34     
  Partials         43       43              

Copy link
Contributor

github-actions bot commented Apr 8, 2024

⚠️ 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: b8d0733 Previous: 49c1689 Ratio
getSlashingsAndExits - 2k 1.3431 ms/op 303.98 us/op 4.42
Full benchmark results
Benchmark suite Current: b8d0733 Previous: 49c1689 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 729.62 us/op 471.88 us/op 1.55
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 82.075 us/op 39.280 us/op 2.09
BLS verify - blst-native 1.2269 ms/op 1.1335 ms/op 1.08
BLS verifyMultipleSignatures 3 - blst-native 2.5278 ms/op 2.4221 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst-native 5.8311 ms/op 5.3446 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst-native 21.021 ms/op 19.623 ms/op 1.07
BLS verifyMultipleSignatures 64 - blst-native 53.408 ms/op 38.921 ms/op 1.37
BLS verifyMultipleSignatures 128 - blst-native 92.644 ms/op 77.632 ms/op 1.19
BLS deserializing 10000 signatures 962.75 ms/op 831.77 ms/op 1.16
BLS deserializing 100000 signatures 9.1233 s/op 8.0725 s/op 1.13
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1479 ms/op 1.1643 ms/op 0.99
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4111 ms/op 1.3111 ms/op 1.08
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.0540 ms/op 2.3344 ms/op 0.88
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.0755 ms/op 3.7497 ms/op 0.82
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.4532 ms/op 4.9890 ms/op 1.29
BLS aggregatePubkeys 32 - blst-native 24.473 us/op 22.664 us/op 1.08
BLS aggregatePubkeys 128 - blst-native 90.943 us/op 89.174 us/op 1.02
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 64.434 ms/op 61.857 ms/op 1.04
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 53.216 ms/op 50.852 ms/op 1.05
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 34.769 ms/op 29.058 ms/op 1.20
getSlashingsAndExits - default max 112.18 us/op 83.820 us/op 1.34
getSlashingsAndExits - 2k 1.3431 ms/op 303.98 us/op 4.42
proposeBlockBody type=full, size=empty 5.2852 ms/op 4.8545 ms/op 1.09
isKnown best case - 1 super set check 729.00 ns/op 519.00 ns/op 1.40
isKnown normal case - 2 super set checks 588.00 ns/op 492.00 ns/op 1.20
isKnown worse case - 16 super set checks 587.00 ns/op 485.00 ns/op 1.21
InMemoryCheckpointStateCache - add get delete 5.7820 us/op 4.3240 us/op 1.34
validate api signedAggregateAndProof - struct 2.4821 ms/op 2.4487 ms/op 1.01
validate gossip signedAggregateAndProof - struct 2.6526 ms/op 2.5346 ms/op 1.05
validate gossip attestation - vc 640000 1.2288 ms/op 1.1979 ms/op 1.03
batch validate gossip attestation - vc 640000 - chunk 32 155.70 us/op 147.14 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 64 130.92 us/op 131.40 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 128 120.55 us/op 118.48 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 256 122.61 us/op 113.22 us/op 1.08
pickEth1Vote - no votes 1.0543 ms/op 862.72 us/op 1.22
pickEth1Vote - max votes 11.102 ms/op 5.1673 ms/op 2.15
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.371 ms/op 9.7888 ms/op 1.77
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.280 ms/op 13.754 ms/op 1.77
pickEth1Vote - Eth1Data fastSerialize value x2048 496.02 us/op 375.61 us/op 1.32
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.5083 ms/op 2.9143 ms/op 1.55
bytes32 toHexString 895.00 ns/op 609.00 ns/op 1.47
bytes32 Buffer.toString(hex) 526.00 ns/op 477.00 ns/op 1.10
bytes32 Buffer.toString(hex) from Uint8Array 797.00 ns/op 637.00 ns/op 1.25
bytes32 Buffer.toString(hex) + 0x 501.00 ns/op 491.00 ns/op 1.02
Object access 1 prop 0.39300 ns/op 0.33300 ns/op 1.18
Map access 1 prop 0.35200 ns/op 0.33300 ns/op 1.06
Object get x1000 5.3240 ns/op 5.2620 ns/op 1.01
Map get x1000 6.2540 ns/op 5.7980 ns/op 1.08
Object set x1000 47.313 ns/op 25.478 ns/op 1.86
Map set x1000 33.815 ns/op 18.631 ns/op 1.81
Return object 10000 times 0.32810 ns/op 0.29930 ns/op 1.10
Throw Error 10000 times 2.9102 us/op 2.7373 us/op 1.06
fastMsgIdFn sha256 / 200 bytes 2.2070 us/op 2.1570 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 542.00 ns/op 519.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 200 bytes 510.00 ns/op 496.00 ns/op 1.03
fastMsgIdFn sha256 / 1000 bytes 6.7800 us/op 6.1910 us/op 1.10
fastMsgIdFn h32 xxhash / 1000 bytes 725.00 ns/op 643.00 ns/op 1.13
fastMsgIdFn h64 xxhash / 1000 bytes 676.00 ns/op 570.00 ns/op 1.19
fastMsgIdFn sha256 / 10000 bytes 53.610 us/op 52.868 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 2.1430 us/op 2.0230 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.4660 us/op 1.3730 us/op 1.07
send data - 1000 256B messages 15.816 ms/op 11.813 ms/op 1.34
send data - 1000 512B messages 19.435 ms/op 14.073 ms/op 1.38
send data - 1000 1024B messages 38.791 ms/op 25.966 ms/op 1.49
send data - 1000 1200B messages 35.329 ms/op 26.294 ms/op 1.34
send data - 1000 2048B messages 38.805 ms/op 32.211 ms/op 1.20
send data - 1000 4096B messages 35.295 ms/op 29.831 ms/op 1.18
send data - 1000 16384B messages 78.705 ms/op 66.104 ms/op 1.19
send data - 1000 65536B messages 291.52 ms/op 262.37 ms/op 1.11
enrSubnets - fastDeserialize 64 bits 1.2800 us/op 1.3370 us/op 0.96
enrSubnets - ssz BitVector 64 bits 606.00 ns/op 647.00 ns/op 0.94
enrSubnets - fastDeserialize 4 bits 368.00 ns/op 389.00 ns/op 0.95
enrSubnets - ssz BitVector 4 bits 545.00 ns/op 617.00 ns/op 0.88
prioritizePeers score -10:0 att 32-0.1 sync 2-0 121.21 us/op 172.71 us/op 0.70
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 136.10 us/op 134.38 us/op 1.01
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 202.65 us/op 298.94 us/op 0.68
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 502.19 us/op 433.22 us/op 1.16
prioritizePeers score 0:0 att 64-1 sync 4-1 632.91 us/op 842.55 us/op 0.75
array of 16000 items push then shift 1.3955 us/op 1.3030 us/op 1.07
LinkedList of 16000 items push then shift 6.5520 ns/op 8.1380 ns/op 0.81
array of 16000 items push then pop 102.62 ns/op 124.24 ns/op 0.83
LinkedList of 16000 items push then pop 6.3290 ns/op 6.2760 ns/op 1.01
array of 24000 items push then shift 1.9648 us/op 1.9674 us/op 1.00
LinkedList of 24000 items push then shift 6.5690 ns/op 7.4400 ns/op 0.88
array of 24000 items push then pop 143.43 ns/op 163.53 ns/op 0.88
LinkedList of 24000 items push then pop 6.3610 ns/op 6.9330 ns/op 0.92
intersect bitArray bitLen 8 5.8000 ns/op 6.6240 ns/op 0.88
intersect array and set length 8 43.355 ns/op 53.529 ns/op 0.81
intersect bitArray bitLen 128 28.002 ns/op 28.566 ns/op 0.98
intersect array and set length 128 605.27 ns/op 841.50 ns/op 0.72
bitArray.getTrueBitIndexes() bitLen 128 2.3580 us/op 2.6900 us/op 0.88
bitArray.getTrueBitIndexes() bitLen 248 2.7890 us/op 4.0130 us/op 0.69
bitArray.getTrueBitIndexes() bitLen 512 7.0180 us/op 9.0370 us/op 0.78
Buffer.concat 32 items 1.1290 us/op 1.0730 us/op 1.05
Uint8Array.set 32 items 1.8830 us/op 1.7950 us/op 1.05
Buffer.copy 1.8220 us/op 1.8260 us/op 1.00
Uint8Array.set - with subarray 2.2550 us/op 2.2910 us/op 0.98
Uint8Array.set - without subarray 2.0850 us/op 1.5110 us/op 1.38
Set add up to 64 items then delete first 1.8873 us/op 1.8178 us/op 1.04
OrderedSet add up to 64 items then delete first 2.8238 us/op 3.0506 us/op 0.93
Set add up to 64 items then delete last 2.0972 us/op 2.1798 us/op 0.96
OrderedSet add up to 64 items then delete last 3.2206 us/op 3.2716 us/op 0.98
Set add up to 64 items then delete middle 2.0908 us/op 2.5735 us/op 0.81
OrderedSet add up to 64 items then delete middle 4.6678 us/op 5.2565 us/op 0.89
Set add up to 128 items then delete first 4.2591 us/op 5.2183 us/op 0.82
OrderedSet add up to 128 items then delete first 6.4676 us/op 6.2081 us/op 1.04
Set add up to 128 items then delete last 4.0005 us/op 3.9706 us/op 1.01
OrderedSet add up to 128 items then delete last 6.0372 us/op 6.1251 us/op 0.99
Set add up to 128 items then delete middle 3.9390 us/op 4.0356 us/op 0.98
OrderedSet add up to 128 items then delete middle 13.090 us/op 11.964 us/op 1.09
Set add up to 256 items then delete first 9.9010 us/op 7.7121 us/op 1.28
OrderedSet add up to 256 items then delete first 16.930 us/op 11.875 us/op 1.43
Set add up to 256 items then delete last 9.2480 us/op 7.9177 us/op 1.17
OrderedSet add up to 256 items then delete last 15.215 us/op 13.742 us/op 1.11
Set add up to 256 items then delete middle 10.550 us/op 7.6510 us/op 1.38
OrderedSet add up to 256 items then delete middle 40.096 us/op 34.807 us/op 1.15
transfer serialized Status (84 B) 1.6570 us/op 1.5570 us/op 1.06
copy serialized Status (84 B) 1.4770 us/op 1.5020 us/op 0.98
transfer serialized SignedVoluntaryExit (112 B) 1.8080 us/op 1.7760 us/op 1.02
copy serialized SignedVoluntaryExit (112 B) 1.5680 us/op 1.5760 us/op 0.99
transfer serialized ProposerSlashing (416 B) 2.2880 us/op 2.0650 us/op 1.11
copy serialized ProposerSlashing (416 B) 2.3730 us/op 1.7230 us/op 1.38
transfer serialized Attestation (485 B) 2.2340 us/op 1.7040 us/op 1.31
copy serialized Attestation (485 B) 2.2750 us/op 1.7950 us/op 1.27
transfer serialized AttesterSlashing (33232 B) 2.3720 us/op 1.7430 us/op 1.36
copy serialized AttesterSlashing (33232 B) 5.3580 us/op 5.4710 us/op 0.98
transfer serialized Small SignedBeaconBlock (128000 B) 3.0670 us/op 1.7600 us/op 1.74
copy serialized Small SignedBeaconBlock (128000 B) 12.028 us/op 11.601 us/op 1.04
transfer serialized Avg SignedBeaconBlock (200000 B) 2.4560 us/op 3.1750 us/op 0.77
copy serialized Avg SignedBeaconBlock (200000 B) 13.033 us/op 16.819 us/op 0.77
transfer serialized BlobsSidecar (524380 B) 3.0520 us/op 3.9740 us/op 0.77
copy serialized BlobsSidecar (524380 B) 76.674 us/op 106.81 us/op 0.72
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2860 us/op 4.4200 us/op 0.74
copy serialized Big SignedBeaconBlock (1000000 B) 137.38 us/op 142.41 us/op 0.96
pass gossip attestations to forkchoice per slot 2.6871 ms/op 2.7953 ms/op 0.96
forkChoice updateHead vc 100000 bc 64 eq 0 475.17 us/op 473.88 us/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 0 2.6482 ms/op 2.7532 ms/op 0.96
forkChoice updateHead vc 1000000 bc 64 eq 0 4.2727 ms/op 4.8388 ms/op 0.88
forkChoice updateHead vc 600000 bc 320 eq 0 2.5604 ms/op 3.1567 ms/op 0.81
forkChoice updateHead vc 600000 bc 1200 eq 0 2.6781 ms/op 2.9136 ms/op 0.92
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1297 ms/op 3.5087 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 1000 9.7192 ms/op 11.348 ms/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 10000 9.6587 ms/op 10.356 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 300000 12.490 ms/op 12.716 ms/op 0.98
computeDeltas 500000 validators 300 proto nodes 3.0737 ms/op 3.6180 ms/op 0.85
computeDeltas 500000 validators 1200 proto nodes 3.1365 ms/op 3.3337 ms/op 0.94
computeDeltas 500000 validators 7200 proto nodes 3.1574 ms/op 3.4991 ms/op 0.90
computeDeltas 750000 validators 300 proto nodes 4.9674 ms/op 5.4717 ms/op 0.91
computeDeltas 750000 validators 1200 proto nodes 4.8683 ms/op 5.0145 ms/op 0.97
computeDeltas 750000 validators 7200 proto nodes 4.5566 ms/op 5.2784 ms/op 0.86
computeDeltas 1400000 validators 300 proto nodes 8.6643 ms/op 10.183 ms/op 0.85
computeDeltas 1400000 validators 1200 proto nodes 8.5258 ms/op 8.8723 ms/op 0.96
computeDeltas 1400000 validators 7200 proto nodes 8.8374 ms/op 8.7431 ms/op 1.01
computeDeltas 2100000 validators 300 proto nodes 13.060 ms/op 13.078 ms/op 1.00
computeDeltas 2100000 validators 1200 proto nodes 13.382 ms/op 13.181 ms/op 1.02
computeDeltas 2100000 validators 7200 proto nodes 13.679 ms/op 12.887 ms/op 1.06
altair processAttestation - 250000 vs - 7PWei normalcase 2.5794 ms/op 2.0672 ms/op 1.25
altair processAttestation - 250000 vs - 7PWei worstcase 2.7326 ms/op 2.3058 ms/op 1.19
altair processAttestation - setStatus - 1/6 committees join 84.873 us/op 104.43 us/op 0.81
altair processAttestation - setStatus - 1/3 committees join 168.99 us/op 186.59 us/op 0.91
altair processAttestation - setStatus - 1/2 committees join 232.03 us/op 287.18 us/op 0.81
altair processAttestation - setStatus - 2/3 committees join 334.10 us/op 369.82 us/op 0.90
altair processAttestation - setStatus - 4/5 committees join 445.06 us/op 529.70 us/op 0.84
altair processAttestation - setStatus - 100% committees join 495.56 us/op 633.25 us/op 0.78
altair processBlock - 250000 vs - 7PWei normalcase 4.4759 ms/op 3.2929 ms/op 1.36
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.007 ms/op 28.424 ms/op 0.88
altair processBlock - 250000 vs - 7PWei worstcase 39.393 ms/op 47.646 ms/op 0.83
altair processBlock - 250000 vs - 7PWei worstcase hashState 84.207 ms/op 75.877 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei normalcase 2.5720 ms/op 2.3048 ms/op 1.12
phase0 processBlock - 250000 vs - 7PWei worstcase 28.600 ms/op 26.174 ms/op 1.09
altair processEth1Data - 250000 vs - 7PWei normalcase 366.06 us/op 481.35 us/op 0.76
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.3630 us/op 9.2730 us/op 0.69
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 25.373 us/op 25.530 us/op 0.99
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.3500 us/op 7.5410 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.1770 us/op 5.9930 us/op 1.03
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 84.222 us/op 73.038 us/op 1.15
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 585.63 us/op 645.93 us/op 0.91
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 752.55 us/op 695.78 us/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 851.39 us/op 825.71 us/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 1.8598 ms/op 2.6149 ms/op 0.71
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1855 ms/op 1.2529 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.6875 ms/op 3.5856 ms/op 0.75
Tree 40 250000 create 268.73 ms/op 305.62 ms/op 0.88
Tree 40 250000 get(125000) 127.18 ns/op 135.36 ns/op 0.94
Tree 40 250000 set(125000) 599.54 ns/op 647.93 ns/op 0.93
Tree 40 250000 toArray() 21.567 ms/op 23.968 ms/op 0.90
Tree 40 250000 iterate all - toArray() + loop 21.565 ms/op 13.946 ms/op 1.55
Tree 40 250000 iterate all - get(i) 51.935 ms/op 49.274 ms/op 1.05
MutableVector 250000 create 14.085 ms/op 10.809 ms/op 1.30
MutableVector 250000 get(125000) 5.9440 ns/op 6.1210 ns/op 0.97
MutableVector 250000 set(125000) 211.16 ns/op 178.70 ns/op 1.18
MutableVector 250000 toArray() 4.1049 ms/op 2.6650 ms/op 1.54
MutableVector 250000 iterate all - toArray() + loop 4.1873 ms/op 3.9310 ms/op 1.07
MutableVector 250000 iterate all - get(i) 1.4395 ms/op 1.4810 ms/op 0.97
Array 250000 create 3.8194 ms/op 3.3276 ms/op 1.15
Array 250000 clone - spread 1.4412 ms/op 1.3152 ms/op 1.10
Array 250000 get(125000) 0.59400 ns/op 0.63400 ns/op 0.94
Array 250000 set(125000) 0.61500 ns/op 0.66100 ns/op 0.93
Array 250000 iterate all - loop 78.947 us/op 81.402 us/op 0.97
effectiveBalanceIncrements clone Uint8Array 300000 33.889 us/op 44.673 us/op 0.76
effectiveBalanceIncrements clone MutableVector 300000 321.00 ns/op 365.00 ns/op 0.88
effectiveBalanceIncrements rw all Uint8Array 300000 171.18 us/op 184.67 us/op 0.93
effectiveBalanceIncrements rw all MutableVector 300000 130.60 ms/op 90.946 ms/op 1.44
phase0 afterProcessEpoch - 250000 vs - 7PWei 78.506 ms/op 83.638 ms/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 47.552 ms/op 51.668 ms/op 0.92
altair processEpoch - mainnet_e81889 416.89 ms/op 467.04 ms/op 0.89
mainnet_e81889 - altair beforeProcessEpoch 49.414 ms/op 82.316 ms/op 0.60
mainnet_e81889 - altair processJustificationAndFinalization 28.449 us/op 21.624 us/op 1.32
mainnet_e81889 - altair processInactivityUpdates 7.2208 ms/op 7.2547 ms/op 1.00
mainnet_e81889 - altair processRewardsAndPenalties 47.499 ms/op 46.334 ms/op 1.03
mainnet_e81889 - altair processRegistryUpdates 2.7540 us/op 3.4740 us/op 0.79
mainnet_e81889 - altair processSlashings 985.00 ns/op 1.1210 us/op 0.88
mainnet_e81889 - altair processEth1DataReset 1.0290 us/op 877.00 ns/op 1.17
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1268 ms/op 1.1688 ms/op 0.96
mainnet_e81889 - altair processSlashingsReset 4.4500 us/op 4.4210 us/op 1.01
mainnet_e81889 - altair processRandaoMixesReset 5.6470 us/op 5.0890 us/op 1.11
mainnet_e81889 - altair processHistoricalRootsUpdate 1.3340 us/op 910.00 ns/op 1.47
mainnet_e81889 - altair processParticipationFlagUpdates 3.5940 us/op 2.2710 us/op 1.58
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0350 us/op 879.00 ns/op 1.18
mainnet_e81889 - altair afterProcessEpoch 91.434 ms/op 85.563 ms/op 1.07
capella processEpoch - mainnet_e217614 1.2041 s/op 1.2530 s/op 0.96
mainnet_e217614 - capella beforeProcessEpoch 239.27 ms/op 236.28 ms/op 1.01
mainnet_e217614 - capella processJustificationAndFinalization 18.225 us/op 9.8930 us/op 1.84
mainnet_e217614 - capella processInactivityUpdates 14.283 ms/op 15.067 ms/op 0.95
mainnet_e217614 - capella processRewardsAndPenalties 263.36 ms/op 257.20 ms/op 1.02
mainnet_e217614 - capella processRegistryUpdates 14.003 us/op 11.077 us/op 1.26
mainnet_e217614 - capella processSlashings 814.00 ns/op 715.00 ns/op 1.14
mainnet_e217614 - capella processEth1DataReset 781.00 ns/op 673.00 ns/op 1.16
mainnet_e217614 - capella processEffectiveBalanceUpdates 13.235 ms/op 3.8782 ms/op 3.41
mainnet_e217614 - capella processSlashingsReset 3.4600 us/op 2.6340 us/op 1.31
mainnet_e217614 - capella processRandaoMixesReset 4.5260 us/op 2.9020 us/op 1.56
mainnet_e217614 - capella processHistoricalRootsUpdate 667.00 ns/op 1.7080 us/op 0.39
mainnet_e217614 - capella processParticipationFlagUpdates 3.7070 us/op 1.6480 us/op 2.25
mainnet_e217614 - capella afterProcessEpoch 221.55 ms/op 254.24 ms/op 0.87
phase0 processEpoch - mainnet_e58758 363.84 ms/op 347.32 ms/op 1.05
mainnet_e58758 - phase0 beforeProcessEpoch 121.87 ms/op 116.89 ms/op 1.04
mainnet_e58758 - phase0 processJustificationAndFinalization 15.905 us/op 14.769 us/op 1.08
mainnet_e58758 - phase0 processRewardsAndPenalties 36.268 ms/op 31.197 ms/op 1.16
mainnet_e58758 - phase0 processRegistryUpdates 7.7070 us/op 9.2180 us/op 0.84
mainnet_e58758 - phase0 processSlashings 795.00 ns/op 1.1530 us/op 0.69
mainnet_e58758 - phase0 processEth1DataReset 715.00 ns/op 803.00 ns/op 0.89
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1508 ms/op 978.35 us/op 1.18
mainnet_e58758 - phase0 processSlashingsReset 3.4350 us/op 5.7160 us/op 0.60
mainnet_e58758 - phase0 processRandaoMixesReset 3.1270 us/op 4.9170 us/op 0.64
mainnet_e58758 - phase0 processHistoricalRootsUpdate 749.00 ns/op 858.00 ns/op 0.87
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.1790 us/op 5.2210 us/op 0.61
mainnet_e58758 - phase0 afterProcessEpoch 69.593 ms/op 70.387 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0173 ms/op 882.03 us/op 1.15
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1152 ms/op 1.2642 ms/op 0.88
altair processInactivityUpdates - 250000 normalcase 15.973 ms/op 18.474 ms/op 0.86
altair processInactivityUpdates - 250000 worstcase 17.227 ms/op 20.950 ms/op 0.82
phase0 processRegistryUpdates - 250000 normalcase 3.4300 us/op 8.9490 us/op 0.38
phase0 processRegistryUpdates - 250000 badcase_full_deposits 302.24 us/op 313.58 us/op 0.96
phase0 processRegistryUpdates - 250000 worstcase 0.5 99.261 ms/op 110.28 ms/op 0.90
altair processRewardsAndPenalties - 250000 normalcase 34.266 ms/op 40.679 ms/op 0.84
altair processRewardsAndPenalties - 250000 worstcase 41.591 ms/op 29.950 ms/op 1.39
phase0 getAttestationDeltas - 250000 normalcase 6.6123 ms/op 6.1431 ms/op 1.08
phase0 getAttestationDeltas - 250000 worstcase 6.8698 ms/op 5.9072 ms/op 1.16
phase0 processSlashings - 250000 worstcase 93.224 us/op 81.482 us/op 1.14
altair processSyncCommitteeUpdates - 250000 92.680 ms/op 120.59 ms/op 0.77
BeaconState.hashTreeRoot - No change 516.00 ns/op 649.00 ns/op 0.80
BeaconState.hashTreeRoot - 1 full validator 71.315 us/op 168.39 us/op 0.42
BeaconState.hashTreeRoot - 32 full validator 741.28 us/op 1.7917 ms/op 0.41
BeaconState.hashTreeRoot - 512 full validator 13.560 ms/op 16.582 ms/op 0.82
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 148.22 us/op 157.41 us/op 0.94
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1966 ms/op 1.8554 ms/op 1.18
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 26.767 ms/op 32.325 ms/op 0.83
BeaconState.hashTreeRoot - 1 balances 126.09 us/op 137.04 us/op 0.92
BeaconState.hashTreeRoot - 32 balances 1.1578 ms/op 1.2686 ms/op 0.91
BeaconState.hashTreeRoot - 512 balances 12.755 ms/op 9.2525 ms/op 1.38
BeaconState.hashTreeRoot - 250000 balances 180.46 ms/op 143.53 ms/op 1.26
aggregationBits - 2048 els - zipIndexesInBitList 19.905 us/op 20.631 us/op 0.96
byteArrayEquals 32 47.833 ns/op 50.168 ns/op 0.95
Buffer.compare 32 40.154 ns/op 39.888 ns/op 1.01
byteArrayEquals 1024 1.2639 us/op 1.3129 us/op 0.96
Buffer.compare 1024 48.272 ns/op 49.121 ns/op 0.98
byteArrayEquals 16384 20.114 us/op 20.435 us/op 0.98
Buffer.compare 16384 228.73 ns/op 224.12 ns/op 1.02
byteArrayEquals 123687377 153.91 ms/op 158.44 ms/op 0.97
Buffer.compare 123687377 4.4074 ms/op 5.8034 ms/op 0.76
byteArrayEquals 32 - diff last byte 47.796 ns/op 53.636 ns/op 0.89
Buffer.compare 32 - diff last byte 40.562 ns/op 41.736 ns/op 0.97
byteArrayEquals 1024 - diff last byte 1.2593 us/op 1.3055 us/op 0.96
Buffer.compare 1024 - diff last byte 46.325 ns/op 48.793 ns/op 0.95
byteArrayEquals 16384 - diff last byte 20.003 us/op 20.176 us/op 0.99
Buffer.compare 16384 - diff last byte 203.55 ns/op 232.48 ns/op 0.88
byteArrayEquals 123687377 - diff last byte 150.87 ms/op 154.85 ms/op 0.97
Buffer.compare 123687377 - diff last byte 3.6422 ms/op 4.8843 ms/op 0.75
byteArrayEquals 32 - random bytes 4.8530 ns/op 5.0310 ns/op 0.96
Buffer.compare 32 - random bytes 41.418 ns/op 42.353 ns/op 0.98
byteArrayEquals 1024 - random bytes 4.8580 ns/op 5.0200 ns/op 0.97
Buffer.compare 1024 - random bytes 39.314 ns/op 40.875 ns/op 0.96
byteArrayEquals 16384 - random bytes 4.8060 ns/op 5.0640 ns/op 0.95
Buffer.compare 16384 - random bytes 39.642 ns/op 40.458 ns/op 0.98
byteArrayEquals 123687377 - random bytes 7.6300 ns/op 8.0700 ns/op 0.95
Buffer.compare 123687377 - random bytes 42.730 ns/op 43.480 ns/op 0.98
regular array get 100000 times 30.558 us/op 31.432 us/op 0.97
wrappedArray get 100000 times 30.560 us/op 31.389 us/op 0.97
arrayWithProxy get 100000 times 9.1584 ms/op 9.3826 ms/op 0.98
ssz.Root.equals 43.653 ns/op 44.480 ns/op 0.98
byteArrayEquals 42.962 ns/op 43.141 ns/op 1.00
Buffer.compare 10.110 ns/op 9.1420 ns/op 1.11
shuffle list - 16384 els 5.1052 ms/op 5.6942 ms/op 0.90
shuffle list - 250000 els 75.893 ms/op 83.297 ms/op 0.91
processSlot - 1 slots 11.771 us/op 13.692 us/op 0.86
processSlot - 32 slots 2.9602 ms/op 3.5433 ms/op 0.84
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 43.639 ms/op 39.674 ms/op 1.10
getCommitteeAssignments - req 1 vs - 250000 vc 1.8262 ms/op 1.8163 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 3.5170 ms/op 3.5745 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7701 ms/op 3.8817 ms/op 0.97
findModifiedValidators - 10000 modified validators 230.97 ms/op 262.19 ms/op 0.88
findModifiedValidators - 1000 modified validators 132.91 ms/op 175.07 ms/op 0.76
findModifiedValidators - 100 modified validators 150.01 ms/op 157.87 ms/op 0.95
findModifiedValidators - 10 modified validators 141.95 ms/op 175.65 ms/op 0.81
findModifiedValidators - 1 modified validators 133.55 ms/op 157.73 ms/op 0.85
findModifiedValidators - no difference 136.79 ms/op 165.26 ms/op 0.83
compare ViewDUs 3.0617 s/op 3.4575 s/op 0.89
compare each validator Uint8Array 1.3120 s/op 1.4784 s/op 0.89
compare ViewDU to Uint8Array 778.04 ms/op 962.45 ms/op 0.81
migrate state 1000000 validators, 24 modified, 0 new 591.20 ms/op 537.80 ms/op 1.10
migrate state 1000000 validators, 1700 modified, 1000 new 818.55 ms/op 823.72 ms/op 0.99
migrate state 1000000 validators, 3400 modified, 2000 new 1.0277 s/op 1.1944 s/op 0.86
migrate state 1500000 validators, 24 modified, 0 new 591.93 ms/op 646.59 ms/op 0.92
migrate state 1500000 validators, 1700 modified, 1000 new 788.36 ms/op 832.82 ms/op 0.95
migrate state 1500000 validators, 3400 modified, 2000 new 987.80 ms/op 1.0182 s/op 0.97
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.8200 ns/op 6.6200 ns/op 0.88
state getBlockRootAtSlot - 250000 vs - 7PWei 817.50 ns/op 370.92 ns/op 2.20
computeProposers - vc 250000 5.8829 ms/op 5.4733 ms/op 1.07
computeEpochShuffling - vc 250000 76.704 ms/op 85.446 ms/op 0.90
getNextSyncCommittee - vc 250000 97.931 ms/op 122.09 ms/op 0.80
computeSigningRoot for AttestationData 19.763 us/op 31.006 us/op 0.64
hash AttestationData serialized data then Buffer.toString(base64) 1.1307 us/op 1.2534 us/op 0.90
toHexString serialized data 733.10 ns/op 892.35 ns/op 0.82
Buffer.toString(base64) 132.81 ns/op 166.88 ns/op 0.80

by benchmarkbot/action

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
@twoeths
Copy link
Contributor

twoeths commented Jun 6, 2024

@ensi321 there is a conflicting file packages/fork-choice/src/forkChoice/interface.ts

@@ -131,6 +133,14 @@ Will double processing times. Use only for debugging purposes.",
group: "chain",
},

"chain.proposerBoostReorgEnabled": {
Copy link
Member

Choose a reason for hiding this comment

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

can you remove Enabled here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will address in the next PR as per #6652 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

Why not right now? I'm assuming we're wanting to test this on our test fleet?
if you change this later thats just another opportunity for things (like our testing infra) to get out of sync and break.
Just ctrl-f change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why not right now? I'm assuming we're wanting to test this on our test fleet? if you change this later thats just another opportunity for things (like our testing infra) to get out of sync and break. Just ctrl-f change

@wemeetagain You got a point. Updated.

@wemeetagain wemeetagain changed the title feat: add proposer boost reorg flag to enable it in block production feat: add proposer boost reorg flag Jun 6, 2024
@@ -123,11 +125,19 @@ Will double processing times. Use only for debugging purposes.",
group: "chain",
},

"chain.proposerBoostEnabled": {
"chain.proposerBoost": {
Copy link
Member

Choose a reason for hiding this comment

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

as this is an existing flag, we must add the prev. value as an alias (even though I doubt anyone is using it)

At some point, when we do a v2 release, we can clean those up

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

LGTM lets wait for @twoeths to chime in too

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.

Proposer boost reorg
4 participants