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: introduce proposer boost reorg to fork choice #6581

Merged
merged 11 commits into from
Apr 3, 2024

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Mar 22, 2024

Motivation

Lay ground work for proposer boost reorg.

Description

  • Add reorg related constants to chain configs
  • Add timeliness: boolean field to ProtoBlock to indicate if block was arrived on time or not
  • Add getProposerHead() that will be used to determine which head block to build on when proposing block
  • Add predictProposerHead() to predict which head block to build on when proposing in the next slot
  • Clean up some existed code in forkChoice.ts to play nicely with the new changes

Part of #5125

@ensi321 ensi321 marked this pull request as ready for review March 22, 2024 07:47
@ensi321 ensi321 requested a review from a team as a code owner March 22, 2024 07:47
Copy link
Contributor

github-actions bot commented Mar 22, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 37613cb Previous: 2f8fbb0 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 497.23 us/op 426.28 us/op 1.17
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 66.199 us/op 57.076 us/op 1.16
BLS verify - blst-native 1.2127 ms/op 1.1282 ms/op 1.07
BLS verifyMultipleSignatures 3 - blst-native 2.5462 ms/op 2.3932 ms/op 1.06
BLS verifyMultipleSignatures 8 - blst-native 5.4744 ms/op 5.3079 ms/op 1.03
BLS verifyMultipleSignatures 32 - blst-native 19.827 ms/op 19.658 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst-native 38.851 ms/op 38.212 ms/op 1.02
BLS verifyMultipleSignatures 128 - blst-native 85.028 ms/op 75.800 ms/op 1.12
BLS deserializing 10000 signatures 832.33 ms/op 796.92 ms/op 1.04
BLS deserializing 100000 signatures 8.3405 s/op 8.2795 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1427 ms/op 1.0984 ms/op 1.04
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.3188 ms/op 1.2509 ms/op 1.05
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.0339 ms/op 1.9590 ms/op 1.04
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.0315 ms/op 3.6841 ms/op 1.09
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.9971 ms/op 4.8977 ms/op 1.43
BLS aggregatePubkeys 32 - blst-native 24.371 us/op 22.314 us/op 1.09
BLS aggregatePubkeys 128 - blst-native 87.331 us/op 87.340 us/op 1.00
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 52.134 ms/op 49.325 ms/op 1.06
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 67.037 ms/op 47.024 ms/op 1.43
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 35.990 ms/op 26.387 ms/op 1.36
getSlashingsAndExits - default max 196.05 us/op 167.87 us/op 1.17
getSlashingsAndExits - 2k 501.50 us/op 366.30 us/op 1.37
proposeBlockBody type=full, size=empty 4.6504 ms/op 4.1898 ms/op 1.11
isKnown best case - 1 super set check 486.00 ns/op 322.00 ns/op 1.51
isKnown normal case - 2 super set checks 474.00 ns/op 322.00 ns/op 1.47
isKnown worse case - 16 super set checks 608.00 ns/op 327.00 ns/op 1.86
InMemoryCheckpointStateCache - add get delete 6.4080 us/op 5.1510 us/op 1.24
validate api signedAggregateAndProof - struct 2.4264 ms/op 2.3475 ms/op 1.03
validate gossip signedAggregateAndProof - struct 2.4935 ms/op 2.3690 ms/op 1.05
validate gossip attestation - vc 640000 1.1616 ms/op 1.1463 ms/op 1.01
batch validate gossip attestation - vc 640000 - chunk 32 143.38 us/op 136.90 us/op 1.05
batch validate gossip attestation - vc 640000 - chunk 64 131.94 us/op 121.17 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 128 131.20 us/op 115.84 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 256 118.26 us/op 110.12 us/op 1.07
pickEth1Vote - no votes 888.27 us/op 890.14 us/op 1.00
pickEth1Vote - max votes 10.040 ms/op 5.5672 ms/op 1.80
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.079 ms/op 12.193 ms/op 1.73
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.459 ms/op 20.642 ms/op 0.89
pickEth1Vote - Eth1Data fastSerialize value x2048 452.25 us/op 451.98 us/op 1.00
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.6766 ms/op 3.2757 ms/op 2.65
bytes32 toHexString 514.00 ns/op 445.00 ns/op 1.16
bytes32 Buffer.toString(hex) 317.00 ns/op 334.00 ns/op 0.95
bytes32 Buffer.toString(hex) from Uint8Array 511.00 ns/op 452.00 ns/op 1.13
bytes32 Buffer.toString(hex) + 0x 304.00 ns/op 314.00 ns/op 0.97
Object access 1 prop 0.25700 ns/op 0.19200 ns/op 1.34
Map access 1 prop 0.18400 ns/op 0.19400 ns/op 0.95
Object get x1000 4.9970 ns/op 5.5240 ns/op 0.90
Map get x1000 0.85500 ns/op 0.73600 ns/op 1.16
Object set x1000 30.225 ns/op 24.537 ns/op 1.23
Map set x1000 20.789 ns/op 17.635 ns/op 1.18
Return object 10000 times 0.22880 ns/op 0.23670 ns/op 0.97
Throw Error 10000 times 2.7313 us/op 2.7952 us/op 0.98
fastMsgIdFn sha256 / 200 bytes 2.1050 us/op 1.9970 us/op 1.05
fastMsgIdFn h32 xxhash / 200 bytes 410.00 ns/op 313.00 ns/op 1.31
fastMsgIdFn h64 xxhash / 200 bytes 438.00 ns/op 369.00 ns/op 1.19
fastMsgIdFn sha256 / 1000 bytes 6.5320 us/op 6.2570 us/op 1.04
fastMsgIdFn h32 xxhash / 1000 bytes 502.00 ns/op 470.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 1000 bytes 473.00 ns/op 424.00 ns/op 1.12
fastMsgIdFn sha256 / 10000 bytes 51.162 us/op 51.197 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 1.8660 us/op 1.8320 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.2740 us/op 1.2740 us/op 1.00
send data - 1000 256B messages 16.751 ms/op 12.285 ms/op 1.36
send data - 1000 512B messages 22.706 ms/op 15.645 ms/op 1.45
send data - 1000 1024B messages 23.215 ms/op 21.460 ms/op 1.08
send data - 1000 1200B messages 37.395 ms/op 28.722 ms/op 1.30
send data - 1000 2048B messages 43.026 ms/op 35.427 ms/op 1.21
send data - 1000 4096B messages 37.061 ms/op 33.604 ms/op 1.10
send data - 1000 16384B messages 102.78 ms/op 93.915 ms/op 1.09
send data - 1000 65536B messages 434.23 ms/op 377.75 ms/op 1.15
enrSubnets - fastDeserialize 64 bits 1.0200 us/op 1.2430 us/op 0.82
enrSubnets - ssz BitVector 64 bits 534.00 ns/op 583.00 ns/op 0.92
enrSubnets - fastDeserialize 4 bits 273.00 ns/op 286.00 ns/op 0.95
enrSubnets - ssz BitVector 4 bits 530.00 ns/op 599.00 ns/op 0.88
prioritizePeers score -10:0 att 32-0.1 sync 2-0 77.069 us/op 81.477 us/op 0.95
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 107.61 us/op 102.48 us/op 1.05
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 129.98 us/op 182.73 us/op 0.71
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 266.60 us/op 180.42 us/op 1.48
prioritizePeers score 0:0 att 64-1 sync 4-1 271.97 us/op 233.24 us/op 1.17
array of 16000 items push then shift 1.3807 us/op 1.3542 us/op 1.02
LinkedList of 16000 items push then shift 7.5080 ns/op 6.1970 ns/op 1.21
array of 16000 items push then pop 106.48 ns/op 71.795 ns/op 1.48
LinkedList of 16000 items push then pop 5.9090 ns/op 5.7960 ns/op 1.02
array of 24000 items push then shift 1.9490 us/op 1.8983 us/op 1.03
LinkedList of 24000 items push then shift 8.8040 ns/op 5.9120 ns/op 1.49
array of 24000 items push then pop 164.32 ns/op 87.713 ns/op 1.87
LinkedList of 24000 items push then pop 6.8560 ns/op 5.6990 ns/op 1.20
intersect bitArray bitLen 8 4.9810 ns/op 4.8820 ns/op 1.02
intersect array and set length 8 94.160 ns/op 49.081 ns/op 1.92
intersect bitArray bitLen 128 30.589 ns/op 29.673 ns/op 1.03
intersect array and set length 128 1.0016 us/op 687.47 ns/op 1.46
bitArray.getTrueBitIndexes() bitLen 128 1.7470 us/op 1.1620 us/op 1.50
bitArray.getTrueBitIndexes() bitLen 248 2.9550 us/op 1.9710 us/op 1.50
bitArray.getTrueBitIndexes() bitLen 512 6.6060 us/op 3.7000 us/op 1.79
Buffer.concat 32 items 1.0180 us/op 860.00 ns/op 1.18
Uint8Array.set 32 items 1.9690 us/op 1.6730 us/op 1.18
Set add up to 64 items then delete first 1.9255 us/op 1.7438 us/op 1.10
OrderedSet add up to 64 items then delete first 2.8212 us/op 2.6771 us/op 1.05
Set add up to 64 items then delete last 2.1192 us/op 2.0089 us/op 1.05
OrderedSet add up to 64 items then delete last 3.1797 us/op 3.0002 us/op 1.06
Set add up to 64 items then delete middle 2.1519 us/op 2.0320 us/op 1.06
OrderedSet add up to 64 items then delete middle 4.6146 us/op 4.2374 us/op 1.09
Set add up to 128 items then delete first 4.3284 us/op 3.9300 us/op 1.10
OrderedSet add up to 128 items then delete first 6.7697 us/op 6.6266 us/op 1.02
Set add up to 128 items then delete last 4.0390 us/op 3.7499 us/op 1.08
OrderedSet add up to 128 items then delete last 5.9726 us/op 5.6615 us/op 1.05
Set add up to 128 items then delete middle 4.2195 us/op 3.8915 us/op 1.08
OrderedSet add up to 128 items then delete middle 11.845 us/op 10.646 us/op 1.11
Set add up to 256 items then delete first 8.8839 us/op 7.5093 us/op 1.18
OrderedSet add up to 256 items then delete first 15.027 us/op 12.069 us/op 1.25
Set add up to 256 items then delete last 8.8664 us/op 7.2728 us/op 1.22
OrderedSet add up to 256 items then delete last 12.750 us/op 11.171 us/op 1.14
Set add up to 256 items then delete middle 10.396 us/op 7.6461 us/op 1.36
OrderedSet add up to 256 items then delete middle 39.078 us/op 30.741 us/op 1.27
transfer serialized Status (84 B) 1.6990 us/op 1.3200 us/op 1.29
copy serialized Status (84 B) 1.2680 us/op 1.0570 us/op 1.20
transfer serialized SignedVoluntaryExit (112 B) 2.0180 us/op 1.4060 us/op 1.44
copy serialized SignedVoluntaryExit (112 B) 1.3260 us/op 1.0940 us/op 1.21
transfer serialized ProposerSlashing (416 B) 1.8350 us/op 1.5610 us/op 1.18
copy serialized ProposerSlashing (416 B) 1.8010 us/op 1.3550 us/op 1.33
transfer serialized Attestation (485 B) 1.9280 us/op 1.6030 us/op 1.20
copy serialized Attestation (485 B) 1.7590 us/op 1.3740 us/op 1.28
transfer serialized AttesterSlashing (33232 B) 1.6830 us/op 1.6610 us/op 1.01
copy serialized AttesterSlashing (33232 B) 4.6200 us/op 3.5220 us/op 1.31
transfer serialized Small SignedBeaconBlock (128000 B) 1.9360 us/op 1.8690 us/op 1.04
copy serialized Small SignedBeaconBlock (128000 B) 10.545 us/op 24.255 us/op 0.43
transfer serialized Avg SignedBeaconBlock (200000 B) 1.9970 us/op 2.8990 us/op 0.69
copy serialized Avg SignedBeaconBlock (200000 B) 15.194 us/op 29.255 us/op 0.52
transfer serialized BlobsSidecar (524380 B) 2.3490 us/op 3.2090 us/op 0.73
copy serialized BlobsSidecar (524380 B) 76.742 us/op 84.926 us/op 0.90
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9260 us/op 3.7260 us/op 0.79
copy serialized Big SignedBeaconBlock (1000000 B) 143.11 us/op 134.23 us/op 1.07
pass gossip attestations to forkchoice per slot 2.7595 ms/op 2.6707 ms/op 1.03
forkChoice updateHead vc 100000 bc 64 eq 0 452.60 us/op 474.11 us/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 0 5.4275 ms/op 2.7735 ms/op 1.96
forkChoice updateHead vc 1000000 bc 64 eq 0 4.8087 ms/op 4.3029 ms/op 1.12
forkChoice updateHead vc 600000 bc 320 eq 0 2.7728 ms/op 2.6003 ms/op 1.07
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8957 ms/op 2.8474 ms/op 1.02
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5246 ms/op 4.0334 ms/op 0.87
forkChoice updateHead vc 600000 bc 64 eq 1000 9.8864 ms/op 9.7837 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 10000 9.8292 ms/op 9.4892 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 300000 11.978 ms/op 12.527 ms/op 0.96
computeDeltas 500000 validators 300 proto nodes 3.1077 ms/op 3.1009 ms/op 1.00
computeDeltas 500000 validators 1200 proto nodes 3.1792 ms/op 3.1489 ms/op 1.01
computeDeltas 500000 validators 7200 proto nodes 3.0967 ms/op 3.0896 ms/op 1.00
computeDeltas 750000 validators 300 proto nodes 4.5427 ms/op 4.6363 ms/op 0.98
computeDeltas 750000 validators 1200 proto nodes 4.6402 ms/op 4.8353 ms/op 0.96
computeDeltas 750000 validators 7200 proto nodes 4.7572 ms/op 4.5789 ms/op 1.04
computeDeltas 1400000 validators 300 proto nodes 9.1228 ms/op 8.9848 ms/op 1.02
computeDeltas 1400000 validators 1200 proto nodes 9.1631 ms/op 8.8491 ms/op 1.04
computeDeltas 1400000 validators 7200 proto nodes 9.0418 ms/op 8.8049 ms/op 1.03
computeDeltas 2100000 validators 300 proto nodes 13.615 ms/op 13.392 ms/op 1.02
computeDeltas 2100000 validators 1200 proto nodes 13.551 ms/op 13.673 ms/op 0.99
computeDeltas 2100000 validators 7200 proto nodes 13.634 ms/op 13.667 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 1.6087 ms/op 1.7006 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei worstcase 2.3878 ms/op 4.0208 ms/op 0.59
altair processAttestation - setStatus - 1/6 committees join 93.525 us/op 105.42 us/op 0.89
altair processAttestation - setStatus - 1/3 committees join 199.64 us/op 225.30 us/op 0.89
altair processAttestation - setStatus - 1/2 committees join 282.15 us/op 339.19 us/op 0.83
altair processAttestation - setStatus - 2/3 committees join 359.45 us/op 397.33 us/op 0.90
altair processAttestation - setStatus - 4/5 committees join 471.68 us/op 525.54 us/op 0.90
altair processAttestation - setStatus - 100% committees join 562.51 us/op 603.36 us/op 0.93
altair processBlock - 250000 vs - 7PWei normalcase 5.8147 ms/op 7.0197 ms/op 0.83
altair processBlock - 250000 vs - 7PWei normalcase hashState 33.361 ms/op 31.265 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase 33.538 ms/op 34.596 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.586 ms/op 83.621 ms/op 0.90
phase0 processBlock - 250000 vs - 7PWei normalcase 2.1780 ms/op 2.0301 ms/op 1.07
phase0 processBlock - 250000 vs - 7PWei worstcase 23.317 ms/op 25.291 ms/op 0.92
altair processEth1Data - 250000 vs - 7PWei normalcase 272.55 us/op 337.12 us/op 0.81
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 3.5270 us/op 9.4000 us/op 0.38
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 48.222 us/op 60.004 us/op 0.80
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.351 us/op 16.664 us/op 0.92
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.6720 us/op 10.187 us/op 0.65
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 161.23 us/op 58.861 us/op 2.74
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 620.06 us/op 1.0566 ms/op 0.59
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5136 ms/op 1.3836 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4606 ms/op 1.6821 ms/op 0.87
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.2681 ms/op 2.6680 ms/op 0.85
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5132 ms/op 1.7072 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.4894 ms/op 3.9768 ms/op 0.88
Tree 40 250000 create 271.22 ms/op 258.26 ms/op 1.05
Tree 40 250000 get(125000) 113.93 ns/op 113.23 ns/op 1.01
Tree 40 250000 set(125000) 752.02 ns/op 755.69 ns/op 1.00
Tree 40 250000 toArray() 9.4725 ms/op 9.5149 ms/op 1.00
Tree 40 250000 iterate all - toArray() + loop 9.6308 ms/op 10.478 ms/op 0.92
Tree 40 250000 iterate all - get(i) 38.158 ms/op 41.000 ms/op 0.93
MutableVector 250000 create 11.186 ms/op 11.839 ms/op 0.94
MutableVector 250000 get(125000) 5.6260 ns/op 5.6930 ns/op 0.99
MutableVector 250000 set(125000) 200.02 ns/op 209.63 ns/op 0.95
MutableVector 250000 toArray() 2.6853 ms/op 2.1968 ms/op 1.22
MutableVector 250000 iterate all - toArray() + loop 2.7345 ms/op 2.3584 ms/op 1.16
MutableVector 250000 iterate all - get(i) 1.2646 ms/op 1.3498 ms/op 0.94
Array 250000 create 2.3567 ms/op 2.7345 ms/op 0.86
Array 250000 clone - spread 1.0490 ms/op 1.1494 ms/op 0.91
Array 250000 get(125000) 0.97800 ns/op 1.0120 ns/op 0.97
Array 250000 set(125000) 1.1640 ns/op 1.2100 ns/op 0.96
Array 250000 iterate all - loop 145.80 us/op 149.39 us/op 0.98
effectiveBalanceIncrements clone Uint8Array 300000 18.081 us/op 21.538 us/op 0.84
effectiveBalanceIncrements clone MutableVector 300000 375.00 ns/op 404.00 ns/op 0.93
effectiveBalanceIncrements rw all Uint8Array 300000 174.77 us/op 180.62 us/op 0.97
effectiveBalanceIncrements rw all MutableVector 300000 63.064 ms/op 69.594 ms/op 0.91
phase0 afterProcessEpoch - 250000 vs - 7PWei 74.190 ms/op 75.916 ms/op 0.98
phase0 beforeProcessEpoch - 250000 vs - 7PWei 44.583 ms/op 33.383 ms/op 1.34
altair processEpoch - mainnet_e81889 402.51 ms/op 444.03 ms/op 0.91
mainnet_e81889 - altair beforeProcessEpoch 70.247 ms/op 81.306 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 6.5160 us/op 11.832 us/op 0.55
mainnet_e81889 - altair processInactivityUpdates 3.5832 ms/op 5.4678 ms/op 0.66
mainnet_e81889 - altair processRewardsAndPenalties 76.108 ms/op 65.157 ms/op 1.17
mainnet_e81889 - altair processRegistryUpdates 1.8720 us/op 1.1620 us/op 1.61
mainnet_e81889 - altair processSlashings 573.00 ns/op 605.00 ns/op 0.95
mainnet_e81889 - altair processEth1DataReset 612.00 ns/op 675.00 ns/op 0.91
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6465 ms/op 1.7341 ms/op 0.95
mainnet_e81889 - altair processSlashingsReset 2.6270 us/op 2.7850 us/op 0.94
mainnet_e81889 - altair processRandaoMixesReset 3.5070 us/op 2.8960 us/op 1.21
mainnet_e81889 - altair processHistoricalRootsUpdate 474.00 ns/op 788.00 ns/op 0.60
mainnet_e81889 - altair processParticipationFlagUpdates 825.00 ns/op 1.5250 us/op 0.54
mainnet_e81889 - altair processSyncCommitteeUpdates 293.00 ns/op 660.00 ns/op 0.44
mainnet_e81889 - altair afterProcessEpoch 78.548 ms/op 78.764 ms/op 1.00
capella processEpoch - mainnet_e217614 1.6543 s/op 1.6305 s/op 1.01
mainnet_e217614 - capella beforeProcessEpoch 403.05 ms/op 389.85 ms/op 1.03
mainnet_e217614 - capella processJustificationAndFinalization 6.5100 us/op 11.643 us/op 0.56
mainnet_e217614 - capella processInactivityUpdates 15.857 ms/op 15.080 ms/op 1.05
mainnet_e217614 - capella processRewardsAndPenalties 479.46 ms/op 435.04 ms/op 1.10
mainnet_e217614 - capella processRegistryUpdates 13.854 us/op 24.702 us/op 0.56
mainnet_e217614 - capella processSlashings 569.00 ns/op 606.00 ns/op 0.94
mainnet_e217614 - capella processEth1DataReset 534.00 ns/op 566.00 ns/op 0.94
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.3993 ms/op 3.4400 ms/op 0.99
mainnet_e217614 - capella processSlashingsReset 2.4260 us/op 3.0600 us/op 0.79
mainnet_e217614 - capella processRandaoMixesReset 2.8400 us/op 3.3140 us/op 0.86
mainnet_e217614 - capella processHistoricalRootsUpdate 581.00 ns/op 1.0860 us/op 0.53
mainnet_e217614 - capella processParticipationFlagUpdates 1.2470 us/op 2.7440 us/op 0.45
mainnet_e217614 - capella afterProcessEpoch 204.67 ms/op 212.08 ms/op 0.97
phase0 processEpoch - mainnet_e58758 400.97 ms/op 367.55 ms/op 1.09
mainnet_e58758 - phase0 beforeProcessEpoch 119.10 ms/op 121.69 ms/op 0.98
mainnet_e58758 - phase0 processJustificationAndFinalization 11.315 us/op 13.711 us/op 0.83
mainnet_e58758 - phase0 processRewardsAndPenalties 65.222 ms/op 58.642 ms/op 1.11
mainnet_e58758 - phase0 processRegistryUpdates 6.3020 us/op 13.033 us/op 0.48
mainnet_e58758 - phase0 processSlashings 709.00 ns/op 823.00 ns/op 0.86
mainnet_e58758 - phase0 processEth1DataReset 535.00 ns/op 553.00 ns/op 0.97
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3561 ms/op 1.4444 ms/op 0.94
mainnet_e58758 - phase0 processSlashingsReset 2.7390 us/op 2.2400 us/op 1.22
mainnet_e58758 - phase0 processRandaoMixesReset 2.7700 us/op 4.3670 us/op 0.63
mainnet_e58758 - phase0 processHistoricalRootsUpdate 772.00 ns/op 525.00 ns/op 1.47
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.9080 us/op 2.9520 us/op 0.99
mainnet_e58758 - phase0 afterProcessEpoch 65.960 ms/op 71.151 ms/op 0.93
phase0 processEffectiveBalanceUpdates - 250000 normalcase 995.26 us/op 1.0537 ms/op 0.94
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.0671 ms/op 1.1316 ms/op 0.94
altair processInactivityUpdates - 250000 normalcase 25.499 ms/op 24.257 ms/op 1.05
altair processInactivityUpdates - 250000 worstcase 24.174 ms/op 22.292 ms/op 1.08
phase0 processRegistryUpdates - 250000 normalcase 8.7620 us/op 7.7460 us/op 1.13
phase0 processRegistryUpdates - 250000 badcase_full_deposits 392.74 us/op 502.58 us/op 0.78
phase0 processRegistryUpdates - 250000 worstcase 0.5 117.12 ms/op 110.77 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 62.158 ms/op 59.967 ms/op 1.04
altair processRewardsAndPenalties - 250000 worstcase 56.850 ms/op 62.489 ms/op 0.91
phase0 getAttestationDeltas - 250000 normalcase 6.1068 ms/op 5.8636 ms/op 1.04
phase0 getAttestationDeltas - 250000 worstcase 5.7182 ms/op 8.2341 ms/op 0.69
phase0 processSlashings - 250000 worstcase 81.307 us/op 87.849 us/op 0.93
altair processSyncCommitteeUpdates - 250000 105.09 ms/op 114.95 ms/op 0.91
BeaconState.hashTreeRoot - No change 501.00 ns/op 555.00 ns/op 0.90
BeaconState.hashTreeRoot - 1 full validator 164.82 us/op 137.41 us/op 1.20
BeaconState.hashTreeRoot - 32 full validator 1.7847 ms/op 1.5640 ms/op 1.14
BeaconState.hashTreeRoot - 512 full validator 15.371 ms/op 14.490 ms/op 1.06
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 124.45 us/op 134.55 us/op 0.92
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7045 ms/op 1.6032 ms/op 1.06
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.095 ms/op 22.904 ms/op 1.18
BeaconState.hashTreeRoot - 1 balances 126.76 us/op 100.71 us/op 1.26
BeaconState.hashTreeRoot - 32 balances 907.78 us/op 1.0548 ms/op 0.86
BeaconState.hashTreeRoot - 512 balances 12.335 ms/op 11.728 ms/op 1.05
BeaconState.hashTreeRoot - 250000 balances 192.83 ms/op 165.89 ms/op 1.16
aggregationBits - 2048 els - zipIndexesInBitList 21.857 us/op 19.525 us/op 1.12
byteArrayEquals 32 65.108 ns/op 65.500 ns/op 0.99
Buffer.compare 32 40.775 ns/op 37.905 ns/op 1.08
byteArrayEquals 1024 1.7803 us/op 1.7964 us/op 0.99
Buffer.compare 1024 50.978 ns/op 45.583 ns/op 1.12
byteArrayEquals 16384 28.422 us/op 28.422 us/op 1.00
Buffer.compare 16384 235.40 ns/op 239.37 ns/op 0.98
byteArrayEquals 123687377 213.92 ms/op 209.24 ms/op 1.02
Buffer.compare 123687377 5.9962 ms/op 4.3331 ms/op 1.38
byteArrayEquals 32 - diff last byte 61.109 ns/op 62.463 ns/op 0.98
Buffer.compare 32 - diff last byte 39.311 ns/op 39.258 ns/op 1.00
byteArrayEquals 1024 - diff last byte 1.7180 us/op 1.7441 us/op 0.99
Buffer.compare 1024 - diff last byte 47.577 ns/op 47.305 ns/op 1.01
byteArrayEquals 16384 - diff last byte 26.701 us/op 30.270 us/op 0.88
Buffer.compare 16384 - diff last byte 220.35 ns/op 228.81 ns/op 0.96
byteArrayEquals 123687377 - diff last byte 208.07 ms/op 209.68 ms/op 0.99
Buffer.compare 123687377 - diff last byte 5.7659 ms/op 6.6109 ms/op 0.87
byteArrayEquals 32 - random bytes 5.5890 ns/op 4.9860 ns/op 1.12
Buffer.compare 32 - random bytes 39.269 ns/op 41.211 ns/op 0.95
byteArrayEquals 1024 - random bytes 5.3890 ns/op 4.8620 ns/op 1.11
Buffer.compare 1024 - random bytes 36.695 ns/op 38.535 ns/op 0.95
byteArrayEquals 16384 - random bytes 5.3660 ns/op 4.8310 ns/op 1.11
Buffer.compare 16384 - random bytes 36.968 ns/op 38.847 ns/op 0.95
byteArrayEquals 123687377 - random bytes 8.5800 ns/op 8.2900 ns/op 1.03
Buffer.compare 123687377 - random bytes 48.190 ns/op 42.390 ns/op 1.14
regular array get 100000 times 41.252 us/op 43.188 us/op 0.96
wrappedArray get 100000 times 41.468 us/op 43.176 us/op 0.96
arrayWithProxy get 100000 times 9.2703 ms/op 10.638 ms/op 0.87
ssz.Root.equals 56.922 ns/op 60.845 ns/op 0.94
byteArrayEquals 54.422 ns/op 56.766 ns/op 0.96
Buffer.compare 10.063 ns/op 10.582 ns/op 0.95
shuffle list - 16384 els 5.8730 ms/op 6.0549 ms/op 0.97
shuffle list - 250000 els 85.855 ms/op 89.901 ms/op 0.95
processSlot - 1 slots 14.546 us/op 12.579 us/op 1.16
processSlot - 32 slots 4.0887 ms/op 2.4883 ms/op 1.64
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 54.266 ms/op 50.564 ms/op 1.07
getCommitteeAssignments - req 1 vs - 250000 vc 2.4415 ms/op 2.4423 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.6159 ms/op 3.6424 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 3.9457 ms/op 3.9876 ms/op 0.99
findModifiedValidators - 10000 modified validators 297.79 ms/op 304.56 ms/op 0.98
findModifiedValidators - 1000 modified validators 163.83 ms/op 189.26 ms/op 0.87
findModifiedValidators - 100 modified validators 147.17 ms/op 160.67 ms/op 0.92
findModifiedValidators - 10 modified validators 147.37 ms/op 150.90 ms/op 0.98
findModifiedValidators - 1 modified validators 154.37 ms/op 140.15 ms/op 1.10
findModifiedValidators - no difference 154.91 ms/op 177.82 ms/op 0.87
compare ViewDUs 4.0169 s/op 3.9642 s/op 1.01
compare each validator Uint8Array 1.0753 s/op 1.3048 s/op 0.82
compare ViewDU to Uint8Array 905.80 ms/op 910.68 ms/op 0.99
migrate state 1000000 validators, 24 modified, 0 new 710.13 ms/op 634.85 ms/op 1.12
migrate state 1000000 validators, 1700 modified, 1000 new 1.1820 s/op 921.38 ms/op 1.28
migrate state 1000000 validators, 3400 modified, 2000 new 1.2464 s/op 1.2006 s/op 1.04
migrate state 1500000 validators, 24 modified, 0 new 633.75 ms/op 711.83 ms/op 0.89
migrate state 1500000 validators, 1700 modified, 1000 new 996.33 ms/op 881.37 ms/op 1.13
migrate state 1500000 validators, 3400 modified, 2000 new 1.1961 s/op 1.2545 s/op 0.95
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5700 ns/op 5.0000 ns/op 0.91
state getBlockRootAtSlot - 250000 vs - 7PWei 391.55 ns/op 1.1247 us/op 0.35
computeProposers - vc 250000 5.7611 ms/op 7.0857 ms/op 0.81
computeEpochShuffling - vc 250000 86.257 ms/op 91.020 ms/op 0.95
getNextSyncCommittee - vc 250000 100.29 ms/op 114.73 ms/op 0.87
computeSigningRoot for AttestationData 19.933 us/op 29.881 us/op 0.67
hash AttestationData serialized data then Buffer.toString(base64) 1.2605 us/op 1.3303 us/op 0.95
toHexString serialized data 842.77 ns/op 899.13 ns/op 0.94
Buffer.toString(base64) 158.75 ns/op 231.69 ns/op 0.69

by benchmarkbot/action

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 overall, dropped some minor comments

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Merging #6581 (79b120e) into unstable (129f300) will increase coverage by 0.21%.
Report is 21 commits behind head on unstable.
The diff coverage is 79.25%.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6581      +/-   ##
============================================
+ Coverage     61.49%   61.70%   +0.21%     
============================================
  Files           556      556              
  Lines         58895    58799      -96     
  Branches       1856     1886      +30     
============================================
+ Hits          36216    36283      +67     
+ Misses        22638    22475     -163     
  Partials         41       41              

@philknows philknows added this to the v1.18.0 milestone Apr 2, 2024
@ensi321 ensi321 requested a review from twoeths April 3, 2024 04:57

if (prelimProposerHead === headBlock && prelimNotReorgedReason !== undefined) {
return {proposerHead, isHeadTimely, notReorgedReason: prelimNotReorgedReason};
}

// -No reorg if we are not proposing on time.-
// Note: Skipping this check as store.time in Lodestar is stored in slot and not unix time
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this comment

@ensi321 ensi321 merged commit b284962 into unstable Apr 3, 2024
16 of 19 checks passed
@ensi321 ensi321 deleted the proposer-boost-reorg-1 branch April 3, 2024 09:28
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.

3 participants