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

Merged
merged 18 commits into from
Jun 8, 2024
Merged

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 60.19417% with 41 lines in your changes missing coverage. Please review.

Project coverage is 62.19%. Comparing base (49c1689) to head (69d56c2).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6652      +/-   ##
============================================
- Coverage     62.19%   62.19%   -0.01%     
============================================
  Files           571      571              
  Lines         60021    60099      +78     
  Branches       1973     1977       +4     
============================================
+ Hits          37333    37377      +44     
- Misses        22645    22679      +34     
  Partials         43       43              

Copy link
Contributor

github-actions bot commented Apr 8, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: e90f361 Previous: 49c1689 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 609.13 us/op 471.88 us/op 1.29
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 45.022 us/op 39.280 us/op 1.15
BLS verify - blst-native 1.2105 ms/op 1.1335 ms/op 1.07
BLS verifyMultipleSignatures 3 - blst-native 2.5488 ms/op 2.4221 ms/op 1.05
BLS verifyMultipleSignatures 8 - blst-native 5.6259 ms/op 5.3446 ms/op 1.05
BLS verifyMultipleSignatures 32 - blst-native 20.737 ms/op 19.623 ms/op 1.06
BLS verifyMultipleSignatures 64 - blst-native 40.803 ms/op 38.921 ms/op 1.05
BLS verifyMultipleSignatures 128 - blst-native 80.805 ms/op 77.632 ms/op 1.04
BLS deserializing 10000 signatures 834.85 ms/op 831.77 ms/op 1.00
BLS deserializing 100000 signatures 8.6074 s/op 8.0725 s/op 1.07
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2586 ms/op 1.1643 ms/op 1.08
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4304 ms/op 1.3111 ms/op 1.09
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.1567 ms/op 2.3344 ms/op 0.92
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.7287 ms/op 3.7497 ms/op 0.99
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.3548 ms/op 4.9890 ms/op 1.07
BLS aggregatePubkeys 32 - blst-native 24.595 us/op 22.664 us/op 1.09
BLS aggregatePubkeys 128 - blst-native 98.420 us/op 89.174 us/op 1.10
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 63.680 ms/op 61.857 ms/op 1.03
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 47.593 ms/op 50.852 ms/op 0.94
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 34.209 ms/op 29.058 ms/op 1.18
getSlashingsAndExits - default max 103.30 us/op 83.820 us/op 1.23
getSlashingsAndExits - 2k 244.79 us/op 303.98 us/op 0.81
proposeBlockBody type=full, size=empty 5.2013 ms/op 4.8545 ms/op 1.07
isKnown best case - 1 super set check 272.00 ns/op 519.00 ns/op 0.52
isKnown normal case - 2 super set checks 260.00 ns/op 492.00 ns/op 0.53
isKnown worse case - 16 super set checks 257.00 ns/op 485.00 ns/op 0.53
InMemoryCheckpointStateCache - add get delete 4.2450 us/op 4.3240 us/op 0.98
validate api signedAggregateAndProof - struct 2.5206 ms/op 2.4487 ms/op 1.03
validate gossip signedAggregateAndProof - struct 2.5903 ms/op 2.5346 ms/op 1.02
validate gossip attestation - vc 640000 1.2620 ms/op 1.1979 ms/op 1.05
batch validate gossip attestation - vc 640000 - chunk 32 147.15 us/op 147.14 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 64 131.03 us/op 131.40 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 128 121.98 us/op 118.48 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 256 117.45 us/op 113.22 us/op 1.04
pickEth1Vote - no votes 974.15 us/op 862.72 us/op 1.13
pickEth1Vote - max votes 8.4057 ms/op 5.1673 ms/op 1.63
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.974 ms/op 9.7888 ms/op 1.43
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.974 ms/op 13.754 ms/op 1.45
pickEth1Vote - Eth1Data fastSerialize value x2048 449.46 us/op 375.61 us/op 1.20
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.1518 ms/op 2.9143 ms/op 2.11
bytes32 toHexString 411.00 ns/op 609.00 ns/op 0.67
bytes32 Buffer.toString(hex) 234.00 ns/op 477.00 ns/op 0.49
bytes32 Buffer.toString(hex) from Uint8Array 330.00 ns/op 637.00 ns/op 0.52
bytes32 Buffer.toString(hex) + 0x 233.00 ns/op 491.00 ns/op 0.47
Object access 1 prop 0.12900 ns/op 0.33300 ns/op 0.39
Map access 1 prop 0.13300 ns/op 0.33300 ns/op 0.40
Object get x1000 5.8660 ns/op 5.2620 ns/op 1.11
Map get x1000 6.1730 ns/op 5.7980 ns/op 1.06
Object set x1000 30.354 ns/op 25.478 ns/op 1.19
Map set x1000 20.912 ns/op 18.631 ns/op 1.12
Return object 10000 times 0.28080 ns/op 0.29930 ns/op 0.94
Throw Error 10000 times 3.2552 us/op 2.7373 us/op 1.19
fastMsgIdFn sha256 / 200 bytes 2.1010 us/op 2.1570 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 220.00 ns/op 519.00 ns/op 0.42
fastMsgIdFn h64 xxhash / 200 bytes 260.00 ns/op 496.00 ns/op 0.52
fastMsgIdFn sha256 / 1000 bytes 6.9910 us/op 6.1910 us/op 1.13
fastMsgIdFn h32 xxhash / 1000 bytes 342.00 ns/op 643.00 ns/op 0.53
fastMsgIdFn h64 xxhash / 1000 bytes 335.00 ns/op 570.00 ns/op 0.59
fastMsgIdFn sha256 / 10000 bytes 62.067 us/op 52.868 us/op 1.17
fastMsgIdFn h32 xxhash / 10000 bytes 1.7640 us/op 2.0230 us/op 0.87
fastMsgIdFn h64 xxhash / 10000 bytes 1.1640 us/op 1.3730 us/op 0.85
send data - 1000 256B messages 12.291 ms/op 11.813 ms/op 1.04
send data - 1000 512B messages 17.032 ms/op 14.073 ms/op 1.21
send data - 1000 1024B messages 27.250 ms/op 25.966 ms/op 1.05
send data - 1000 1200B messages 20.019 ms/op 26.294 ms/op 0.76
send data - 1000 2048B messages 31.951 ms/op 32.211 ms/op 0.99
send data - 1000 4096B messages 31.807 ms/op 29.831 ms/op 1.07
send data - 1000 16384B messages 67.973 ms/op 66.104 ms/op 1.03
send data - 1000 65536B messages 215.35 ms/op 262.37 ms/op 0.82
enrSubnets - fastDeserialize 64 bits 1.1120 us/op 1.3370 us/op 0.83
enrSubnets - ssz BitVector 64 bits 348.00 ns/op 647.00 ns/op 0.54
enrSubnets - fastDeserialize 4 bits 150.00 ns/op 389.00 ns/op 0.39
enrSubnets - ssz BitVector 4 bits 336.00 ns/op 617.00 ns/op 0.54
prioritizePeers score -10:0 att 32-0.1 sync 2-0 152.82 us/op 172.71 us/op 0.88
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 144.65 us/op 134.38 us/op 1.08
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 256.96 us/op 298.94 us/op 0.86
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 412.82 us/op 433.22 us/op 0.95
prioritizePeers score 0:0 att 64-1 sync 4-1 616.75 us/op 842.55 us/op 0.73
array of 16000 items push then shift 1.6513 us/op 1.3030 us/op 1.27
LinkedList of 16000 items push then shift 7.1500 ns/op 8.1380 ns/op 0.88
array of 16000 items push then pop 127.16 ns/op 124.24 ns/op 1.02
LinkedList of 16000 items push then pop 7.3270 ns/op 6.2760 ns/op 1.17
array of 24000 items push then shift 2.4538 us/op 1.9674 us/op 1.25
LinkedList of 24000 items push then shift 7.0470 ns/op 7.4400 ns/op 0.95
array of 24000 items push then pop 150.84 ns/op 163.53 ns/op 0.92
LinkedList of 24000 items push then pop 7.2910 ns/op 6.9330 ns/op 1.05
intersect bitArray bitLen 8 6.5720 ns/op 6.6240 ns/op 0.99
intersect array and set length 8 44.700 ns/op 53.529 ns/op 0.84
intersect bitArray bitLen 128 29.006 ns/op 28.566 ns/op 1.02
intersect array and set length 128 696.80 ns/op 841.50 ns/op 0.83
bitArray.getTrueBitIndexes() bitLen 128 1.7200 us/op 2.6900 us/op 0.64
bitArray.getTrueBitIndexes() bitLen 248 3.2710 us/op 4.0130 us/op 0.82
bitArray.getTrueBitIndexes() bitLen 512 6.7820 us/op 9.0370 us/op 0.75
Buffer.concat 32 items 954.00 ns/op 1.0730 us/op 0.89
Uint8Array.set 32 items 1.5130 us/op 1.7950 us/op 0.84
Buffer.copy 1.7110 us/op 1.8260 us/op 0.94
Uint8Array.set - with subarray 2.4460 us/op 2.2910 us/op 1.07
Uint8Array.set - without subarray 1.5100 us/op 1.5110 us/op 1.00
Set add up to 64 items then delete first 2.1744 us/op 1.8178 us/op 1.20
OrderedSet add up to 64 items then delete first 3.2894 us/op 3.0506 us/op 1.08
Set add up to 64 items then delete last 2.4720 us/op 2.1798 us/op 1.13
OrderedSet add up to 64 items then delete last 3.6037 us/op 3.2716 us/op 1.10
Set add up to 64 items then delete middle 2.4775 us/op 2.5735 us/op 0.96
OrderedSet add up to 64 items then delete middle 5.2513 us/op 5.2565 us/op 1.00
Set add up to 128 items then delete first 4.9487 us/op 5.2183 us/op 0.95
OrderedSet add up to 128 items then delete first 7.7873 us/op 6.2081 us/op 1.25
Set add up to 128 items then delete last 4.8321 us/op 3.9706 us/op 1.22
OrderedSet add up to 128 items then delete last 7.1761 us/op 6.1251 us/op 1.17
Set add up to 128 items then delete middle 4.8128 us/op 4.0356 us/op 1.19
OrderedSet add up to 128 items then delete middle 13.535 us/op 11.964 us/op 1.13
Set add up to 256 items then delete first 10.144 us/op 7.7121 us/op 1.32
OrderedSet add up to 256 items then delete first 16.731 us/op 11.875 us/op 1.41
Set add up to 256 items then delete last 9.9509 us/op 7.9177 us/op 1.26
OrderedSet add up to 256 items then delete last 14.759 us/op 13.742 us/op 1.07
Set add up to 256 items then delete middle 10.271 us/op 7.6510 us/op 1.34
OrderedSet add up to 256 items then delete middle 42.356 us/op 34.807 us/op 1.22
transfer serialized Status (84 B) 1.4430 us/op 1.5570 us/op 0.93
copy serialized Status (84 B) 1.1920 us/op 1.5020 us/op 0.79
transfer serialized SignedVoluntaryExit (112 B) 1.5890 us/op 1.7760 us/op 0.89
copy serialized SignedVoluntaryExit (112 B) 1.2740 us/op 1.5760 us/op 0.81
transfer serialized ProposerSlashing (416 B) 2.3940 us/op 2.0650 us/op 1.16
copy serialized ProposerSlashing (416 B) 1.7560 us/op 1.7230 us/op 1.02
transfer serialized Attestation (485 B) 1.6120 us/op 1.7040 us/op 0.95
copy serialized Attestation (485 B) 1.6980 us/op 1.7950 us/op 0.95
transfer serialized AttesterSlashing (33232 B) 1.9950 us/op 1.7430 us/op 1.14
copy serialized AttesterSlashing (33232 B) 6.0090 us/op 5.4710 us/op 1.10
transfer serialized Small SignedBeaconBlock (128000 B) 3.0360 us/op 1.7600 us/op 1.73
copy serialized Small SignedBeaconBlock (128000 B) 14.955 us/op 11.601 us/op 1.29
transfer serialized Avg SignedBeaconBlock (200000 B) 3.3040 us/op 3.1750 us/op 1.04
copy serialized Avg SignedBeaconBlock (200000 B) 21.575 us/op 16.819 us/op 1.28
transfer serialized BlobsSidecar (524380 B) 2.9940 us/op 3.9740 us/op 0.75
copy serialized BlobsSidecar (524380 B) 77.004 us/op 106.81 us/op 0.72
transfer serialized Big SignedBeaconBlock (1000000 B) 3.0360 us/op 4.4200 us/op 0.69
copy serialized Big SignedBeaconBlock (1000000 B) 337.45 us/op 142.41 us/op 2.37
pass gossip attestations to forkchoice per slot 3.0655 ms/op 2.7953 ms/op 1.10
forkChoice updateHead vc 100000 bc 64 eq 0 486.47 us/op 473.88 us/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 0 3.1299 ms/op 2.7532 ms/op 1.14
forkChoice updateHead vc 1000000 bc 64 eq 0 5.5274 ms/op 4.8388 ms/op 1.14
forkChoice updateHead vc 600000 bc 320 eq 0 3.0040 ms/op 3.1567 ms/op 0.95
forkChoice updateHead vc 600000 bc 1200 eq 0 3.8644 ms/op 2.9136 ms/op 1.33
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5521 ms/op 3.5087 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 1000 10.595 ms/op 11.348 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 10000 10.526 ms/op 10.356 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 300000 14.807 ms/op 12.716 ms/op 1.16
computeDeltas 500000 validators 300 proto nodes 3.4802 ms/op 3.6180 ms/op 0.96
computeDeltas 500000 validators 1200 proto nodes 3.5036 ms/op 3.3337 ms/op 1.05
computeDeltas 500000 validators 7200 proto nodes 3.5568 ms/op 3.4991 ms/op 1.02
computeDeltas 750000 validators 300 proto nodes 5.1581 ms/op 5.4717 ms/op 0.94
computeDeltas 750000 validators 1200 proto nodes 5.0982 ms/op 5.0145 ms/op 1.02
computeDeltas 750000 validators 7200 proto nodes 5.1967 ms/op 5.2784 ms/op 0.98
computeDeltas 1400000 validators 300 proto nodes 9.5928 ms/op 10.183 ms/op 0.94
computeDeltas 1400000 validators 1200 proto nodes 9.6100 ms/op 8.8723 ms/op 1.08
computeDeltas 1400000 validators 7200 proto nodes 9.6583 ms/op 8.7431 ms/op 1.10
computeDeltas 2100000 validators 300 proto nodes 14.411 ms/op 13.078 ms/op 1.10
computeDeltas 2100000 validators 1200 proto nodes 14.543 ms/op 13.181 ms/op 1.10
computeDeltas 2100000 validators 7200 proto nodes 14.423 ms/op 12.887 ms/op 1.12
altair processAttestation - 250000 vs - 7PWei normalcase 1.6018 ms/op 2.0672 ms/op 0.77
altair processAttestation - 250000 vs - 7PWei worstcase 2.3851 ms/op 2.3058 ms/op 1.03
altair processAttestation - setStatus - 1/6 committees join 83.541 us/op 104.43 us/op 0.80
altair processAttestation - setStatus - 1/3 committees join 170.17 us/op 186.59 us/op 0.91
altair processAttestation - setStatus - 1/2 committees join 241.41 us/op 287.18 us/op 0.84
altair processAttestation - setStatus - 2/3 committees join 315.52 us/op 369.82 us/op 0.85
altair processAttestation - setStatus - 4/5 committees join 476.44 us/op 529.70 us/op 0.90
altair processAttestation - setStatus - 100% committees join 563.57 us/op 633.25 us/op 0.89
altair processBlock - 250000 vs - 7PWei normalcase 3.6950 ms/op 3.2929 ms/op 1.12
altair processBlock - 250000 vs - 7PWei normalcase hashState 22.239 ms/op 28.424 ms/op 0.78
altair processBlock - 250000 vs - 7PWei worstcase 39.164 ms/op 47.646 ms/op 0.82
altair processBlock - 250000 vs - 7PWei worstcase hashState 78.389 ms/op 75.877 ms/op 1.03
phase0 processBlock - 250000 vs - 7PWei normalcase 1.9086 ms/op 2.3048 ms/op 0.83
phase0 processBlock - 250000 vs - 7PWei worstcase 27.096 ms/op 26.174 ms/op 1.04
altair processEth1Data - 250000 vs - 7PWei normalcase 346.13 us/op 481.35 us/op 0.72
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.5710 us/op 9.2730 us/op 0.60
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 23.211 us/op 25.530 us/op 0.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.9640 us/op 7.5410 us/op 1.06
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.4520 us/op 5.9930 us/op 0.91
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 98.506 us/op 73.038 us/op 1.35
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 662.93 us/op 645.93 us/op 1.03
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 923.11 us/op 695.78 us/op 1.33
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 916.63 us/op 825.71 us/op 1.11
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.1666 ms/op 2.6149 ms/op 0.83
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5777 ms/op 1.2529 ms/op 1.26
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.5560 ms/op 3.5856 ms/op 0.99
Tree 40 250000 create 236.87 ms/op 305.62 ms/op 0.78
Tree 40 250000 get(125000) 145.25 ns/op 135.36 ns/op 1.07
Tree 40 250000 set(125000) 689.38 ns/op 647.93 ns/op 1.06
Tree 40 250000 toArray() 18.531 ms/op 23.968 ms/op 0.77
Tree 40 250000 iterate all - toArray() + loop 18.343 ms/op 13.946 ms/op 1.32
Tree 40 250000 iterate all - get(i) 55.048 ms/op 49.274 ms/op 1.12
MutableVector 250000 create 10.460 ms/op 10.809 ms/op 0.97
MutableVector 250000 get(125000) 10.492 ns/op 6.1210 ns/op 1.71
MutableVector 250000 set(125000) 219.89 ns/op 178.70 ns/op 1.23
MutableVector 250000 toArray() 4.0379 ms/op 2.6650 ms/op 1.52
MutableVector 250000 iterate all - toArray() + loop 4.3897 ms/op 3.9310 ms/op 1.12
MutableVector 250000 iterate all - get(i) 1.6617 ms/op 1.4810 ms/op 1.12
Array 250000 create 3.5987 ms/op 3.3276 ms/op 1.08
Array 250000 clone - spread 1.5045 ms/op 1.3152 ms/op 1.14
Array 250000 get(125000) 0.42300 ns/op 0.63400 ns/op 0.67
Array 250000 set(125000) 0.45400 ns/op 0.66100 ns/op 0.69
Array 250000 iterate all - loop 86.547 us/op 81.402 us/op 1.06
effectiveBalanceIncrements clone Uint8Array 300000 28.833 us/op 44.673 us/op 0.65
effectiveBalanceIncrements clone MutableVector 300000 124.00 ns/op 365.00 ns/op 0.34
effectiveBalanceIncrements rw all Uint8Array 300000 198.35 us/op 184.67 us/op 1.07
effectiveBalanceIncrements rw all MutableVector 300000 67.884 ms/op 90.946 ms/op 0.75
phase0 afterProcessEpoch - 250000 vs - 7PWei 87.977 ms/op 83.638 ms/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 42.063 ms/op 51.668 ms/op 0.81
altair processEpoch - mainnet_e81889 368.10 ms/op 467.04 ms/op 0.79
mainnet_e81889 - altair beforeProcessEpoch 63.053 ms/op 82.316 ms/op 0.77
mainnet_e81889 - altair processJustificationAndFinalization 11.756 us/op 21.624 us/op 0.54
mainnet_e81889 - altair processInactivityUpdates 5.9476 ms/op 7.2547 ms/op 0.82
mainnet_e81889 - altair processRewardsAndPenalties 43.769 ms/op 46.334 ms/op 0.94
mainnet_e81889 - altair processRegistryUpdates 1.6960 us/op 3.4740 us/op 0.49
mainnet_e81889 - altair processSlashings 382.00 ns/op 1.1210 us/op 0.34
mainnet_e81889 - altair processEth1DataReset 272.00 ns/op 877.00 ns/op 0.31
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0836 ms/op 1.1688 ms/op 0.93
mainnet_e81889 - altair processSlashingsReset 2.6930 us/op 4.4210 us/op 0.61
mainnet_e81889 - altair processRandaoMixesReset 3.7760 us/op 5.0890 us/op 0.74
mainnet_e81889 - altair processHistoricalRootsUpdate 585.00 ns/op 910.00 ns/op 0.64
mainnet_e81889 - altair processParticipationFlagUpdates 1.6020 us/op 2.2710 us/op 0.71
mainnet_e81889 - altair processSyncCommitteeUpdates 485.00 ns/op 879.00 ns/op 0.55
mainnet_e81889 - altair afterProcessEpoch 89.766 ms/op 85.563 ms/op 1.05
capella processEpoch - mainnet_e217614 1.2685 s/op 1.2530 s/op 1.01
mainnet_e217614 - capella beforeProcessEpoch 243.45 ms/op 236.28 ms/op 1.03
mainnet_e217614 - capella processJustificationAndFinalization 13.014 us/op 9.8930 us/op 1.32
mainnet_e217614 - capella processInactivityUpdates 16.054 ms/op 15.067 ms/op 1.07
mainnet_e217614 - capella processRewardsAndPenalties 238.06 ms/op 257.20 ms/op 0.93
mainnet_e217614 - capella processRegistryUpdates 13.238 us/op 11.077 us/op 1.20
mainnet_e217614 - capella processSlashings 364.00 ns/op 715.00 ns/op 0.51
mainnet_e217614 - capella processEth1DataReset 344.00 ns/op 673.00 ns/op 0.51
mainnet_e217614 - capella processEffectiveBalanceUpdates 12.771 ms/op 3.8782 ms/op 3.29
mainnet_e217614 - capella processSlashingsReset 4.0270 us/op 2.6340 us/op 1.53
mainnet_e217614 - capella processRandaoMixesReset 3.7590 us/op 2.9020 us/op 1.30
mainnet_e217614 - capella processHistoricalRootsUpdate 327.00 ns/op 1.7080 us/op 0.19
mainnet_e217614 - capella processParticipationFlagUpdates 2.1100 us/op 1.6480 us/op 1.28
mainnet_e217614 - capella afterProcessEpoch 236.65 ms/op 254.24 ms/op 0.93
phase0 processEpoch - mainnet_e58758 337.84 ms/op 347.32 ms/op 0.97
mainnet_e58758 - phase0 beforeProcessEpoch 89.021 ms/op 116.89 ms/op 0.76
mainnet_e58758 - phase0 processJustificationAndFinalization 15.141 us/op 14.769 us/op 1.03
mainnet_e58758 - phase0 processRewardsAndPenalties 20.797 ms/op 31.197 ms/op 0.67
mainnet_e58758 - phase0 processRegistryUpdates 7.3980 us/op 9.2180 us/op 0.80
mainnet_e58758 - phase0 processSlashings 364.00 ns/op 1.1530 us/op 0.32
mainnet_e58758 - phase0 processEth1DataReset 353.00 ns/op 803.00 ns/op 0.44
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 961.19 us/op 978.35 us/op 0.98
mainnet_e58758 - phase0 processSlashingsReset 2.3090 us/op 5.7160 us/op 0.40
mainnet_e58758 - phase0 processRandaoMixesReset 3.6310 us/op 4.9170 us/op 0.74
mainnet_e58758 - phase0 processHistoricalRootsUpdate 317.00 ns/op 858.00 ns/op 0.37
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.5740 us/op 5.2210 us/op 0.49
mainnet_e58758 - phase0 afterProcessEpoch 82.074 ms/op 70.387 ms/op 1.17
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2473 ms/op 882.03 us/op 1.41
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.3851 ms/op 1.2642 ms/op 1.89
altair processInactivityUpdates - 250000 normalcase 16.698 ms/op 18.474 ms/op 0.90
altair processInactivityUpdates - 250000 worstcase 16.881 ms/op 20.950 ms/op 0.81
phase0 processRegistryUpdates - 250000 normalcase 7.4350 us/op 8.9490 us/op 0.83
phase0 processRegistryUpdates - 250000 badcase_full_deposits 281.98 us/op 313.58 us/op 0.90
phase0 processRegistryUpdates - 250000 worstcase 0.5 104.08 ms/op 110.28 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 36.793 ms/op 40.679 ms/op 0.90
altair processRewardsAndPenalties - 250000 worstcase 34.624 ms/op 29.950 ms/op 1.16
phase0 getAttestationDeltas - 250000 normalcase 7.3233 ms/op 6.1431 ms/op 1.19
phase0 getAttestationDeltas - 250000 worstcase 7.4022 ms/op 5.9072 ms/op 1.25
phase0 processSlashings - 250000 worstcase 88.783 us/op 81.482 us/op 1.09
altair processSyncCommitteeUpdates - 250000 133.94 ms/op 120.59 ms/op 1.11
BeaconState.hashTreeRoot - No change 280.00 ns/op 649.00 ns/op 0.43
BeaconState.hashTreeRoot - 1 full validator 108.41 us/op 168.39 us/op 0.64
BeaconState.hashTreeRoot - 32 full validator 1.4866 ms/op 1.7917 ms/op 0.83
BeaconState.hashTreeRoot - 512 full validator 11.628 ms/op 16.582 ms/op 0.70
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 110.88 us/op 157.41 us/op 0.70
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9111 ms/op 1.8554 ms/op 1.03
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.508 ms/op 32.325 ms/op 0.60
BeaconState.hashTreeRoot - 1 balances 82.256 us/op 137.04 us/op 0.60
BeaconState.hashTreeRoot - 32 balances 755.67 us/op 1.2686 ms/op 0.60
BeaconState.hashTreeRoot - 512 balances 7.4382 ms/op 9.2525 ms/op 0.80
BeaconState.hashTreeRoot - 250000 balances 161.57 ms/op 143.53 ms/op 1.13
aggregationBits - 2048 els - zipIndexesInBitList 24.458 us/op 20.631 us/op 1.19
byteArrayEquals 32 53.654 ns/op 50.168 ns/op 1.07
Buffer.compare 32 45.285 ns/op 39.888 ns/op 1.14
byteArrayEquals 1024 1.5866 us/op 1.3129 us/op 1.21
Buffer.compare 1024 55.783 ns/op 49.121 ns/op 1.14
byteArrayEquals 16384 25.267 us/op 20.435 us/op 1.24
Buffer.compare 16384 218.52 ns/op 224.12 ns/op 0.98
byteArrayEquals 123687377 191.58 ms/op 158.44 ms/op 1.21
Buffer.compare 123687377 6.4991 ms/op 5.8034 ms/op 1.12
byteArrayEquals 32 - diff last byte 52.782 ns/op 53.636 ns/op 0.98
Buffer.compare 32 - diff last byte 48.937 ns/op 41.736 ns/op 1.17
byteArrayEquals 1024 - diff last byte 1.5933 us/op 1.3055 us/op 1.22
Buffer.compare 1024 - diff last byte 54.741 ns/op 48.793 ns/op 1.12
byteArrayEquals 16384 - diff last byte 24.931 us/op 20.176 us/op 1.24
Buffer.compare 16384 - diff last byte 234.05 ns/op 232.48 ns/op 1.01
byteArrayEquals 123687377 - diff last byte 188.45 ms/op 154.85 ms/op 1.22
Buffer.compare 123687377 - diff last byte 6.0724 ms/op 4.8843 ms/op 1.24
byteArrayEquals 32 - random bytes 5.2420 ns/op 5.0310 ns/op 1.04
Buffer.compare 32 - random bytes 46.776 ns/op 42.353 ns/op 1.10
byteArrayEquals 1024 - random bytes 5.0080 ns/op 5.0200 ns/op 1.00
Buffer.compare 1024 - random bytes 44.986 ns/op 40.875 ns/op 1.10
byteArrayEquals 16384 - random bytes 5.0010 ns/op 5.0640 ns/op 0.99
Buffer.compare 16384 - random bytes 44.924 ns/op 40.458 ns/op 1.11
byteArrayEquals 123687377 - random bytes 6.3000 ns/op 8.0700 ns/op 0.78
Buffer.compare 123687377 - random bytes 46.330 ns/op 43.480 ns/op 1.07
regular array get 100000 times 32.333 us/op 31.432 us/op 1.03
wrappedArray get 100000 times 32.149 us/op 31.389 us/op 1.02
arrayWithProxy get 100000 times 12.515 ms/op 9.3826 ms/op 1.33
ssz.Root.equals 44.926 ns/op 44.480 ns/op 1.01
byteArrayEquals 44.218 ns/op 43.141 ns/op 1.02
Buffer.compare 10.086 ns/op 9.1420 ns/op 1.10
shuffle list - 16384 els 6.1701 ms/op 5.6942 ms/op 1.08
shuffle list - 250000 els 90.298 ms/op 83.297 ms/op 1.08
processSlot - 1 slots 12.019 us/op 13.692 us/op 0.88
processSlot - 32 slots 2.9301 ms/op 3.5433 ms/op 0.83
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.117 ms/op 39.674 ms/op 0.94
getCommitteeAssignments - req 1 vs - 250000 vc 2.0959 ms/op 1.8163 ms/op 1.15
getCommitteeAssignments - req 100 vs - 250000 vc 4.0218 ms/op 3.5745 ms/op 1.13
getCommitteeAssignments - req 1000 vs - 250000 vc 4.2883 ms/op 3.8817 ms/op 1.10
findModifiedValidators - 10000 modified validators 249.44 ms/op 262.19 ms/op 0.95
findModifiedValidators - 1000 modified validators 158.78 ms/op 175.07 ms/op 0.91
findModifiedValidators - 100 modified validators 152.87 ms/op 157.87 ms/op 0.97
findModifiedValidators - 10 modified validators 165.09 ms/op 175.65 ms/op 0.94
findModifiedValidators - 1 modified validators 144.97 ms/op 157.73 ms/op 0.92
findModifiedValidators - no difference 142.37 ms/op 165.26 ms/op 0.86
compare ViewDUs 2.9659 s/op 3.4575 s/op 0.86
compare each validator Uint8Array 1.3663 s/op 1.4784 s/op 0.92
compare ViewDU to Uint8Array 1.0418 s/op 962.45 ms/op 1.08
migrate state 1000000 validators, 24 modified, 0 new 589.62 ms/op 537.80 ms/op 1.10
migrate state 1000000 validators, 1700 modified, 1000 new 817.21 ms/op 823.72 ms/op 0.99
migrate state 1000000 validators, 3400 modified, 2000 new 1.0224 s/op 1.1944 s/op 0.86
migrate state 1500000 validators, 24 modified, 0 new 586.28 ms/op 646.59 ms/op 0.91
migrate state 1500000 validators, 1700 modified, 1000 new 803.97 ms/op 832.82 ms/op 0.97
migrate state 1500000 validators, 3400 modified, 2000 new 997.32 ms/op 1.0182 s/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2900 ns/op 6.6200 ns/op 0.65
state getBlockRootAtSlot - 250000 vs - 7PWei 830.83 ns/op 370.92 ns/op 2.24
computeProposers - vc 250000 7.7881 ms/op 5.4733 ms/op 1.42
computeEpochShuffling - vc 250000 93.452 ms/op 85.446 ms/op 1.09
getNextSyncCommittee - vc 250000 130.65 ms/op 122.09 ms/op 1.07
computeSigningRoot for AttestationData 24.875 us/op 31.006 us/op 0.80
hash AttestationData serialized data then Buffer.toString(base64) 1.4897 us/op 1.2534 us/op 1.19
toHexString serialized data 872.22 ns/op 892.35 ns/op 0.98
Buffer.toString(base64) 174.36 ns/op 166.88 ns/op 1.04

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>
wemeetagain
wemeetagain previously approved these changes Jun 6, 2024
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

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.

looks good to me, I added a new enum to RegenCaller to review metrics easier

@ensi321 ensi321 merged commit f6d3bce into unstable Jun 8, 2024
20 checks passed
@ensi321 ensi321 deleted the nc/proposer-boost-reorg-2 branch June 8, 2024 07:22
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