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: reject builder blocks if engine indicates censorship #6258

Merged
merged 7 commits into from
Jan 9, 2024

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jan 8, 2024

a mechanism was added where local engine could indicate censorship happening by builders via shouldOverrideBuilder
which should make beacon produce engine blocks only irrespective of the builder boost (or to be deprecated builder selection) indicated by the validator.

This PR handles and implements the same.

@g11tech g11tech requested a review from a team as a code owner January 8, 2024 11:19
@g11tech g11tech marked this pull request as draft January 8, 2024 11:21
@philknows philknows added this to the v1.14.0 milestone Jan 8, 2024
Base automatically changed from builder_boost to unstable January 8, 2024 18:05
@g11tech g11tech mentioned this pull request Jan 8, 2024
40 tasks
@g11tech g11tech marked this pull request as ready for review January 8, 2024 18:14
Copy link
Contributor

github-actions bot commented Jan 8, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 0a2b60c Previous: 3927ffd Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 769.43 us/op 555.27 us/op 1.39
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 98.682 us/op 90.165 us/op 1.09
BLS verify - blst-native 1.2999 ms/op 1.3201 ms/op 0.98
BLS verifyMultipleSignatures 3 - blst-native 2.7244 ms/op 2.8556 ms/op 0.95
BLS verifyMultipleSignatures 8 - blst-native 6.0292 ms/op 6.1382 ms/op 0.98
BLS verifyMultipleSignatures 32 - blst-native 21.860 ms/op 22.759 ms/op 0.96
BLS verifyMultipleSignatures 64 - blst-native 43.059 ms/op 47.221 ms/op 0.91
BLS verifyMultipleSignatures 128 - blst-native 85.767 ms/op 94.284 ms/op 0.91
BLS deserializing 10000 signatures 920.66 ms/op 964.84 ms/op 0.95
BLS deserializing 100000 signatures 9.3509 s/op 9.1109 s/op 1.03
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3363 ms/op 1.4072 ms/op 0.95
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5689 ms/op 1.5366 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.8064 ms/op 2.3670 ms/op 1.19
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.2622 ms/op 3.4759 ms/op 1.23
BLS verifyMultipleSignatures - same message - 128 - blst-native 7.1151 ms/op 5.7139 ms/op 1.25
BLS aggregatePubkeys 32 - blst-native 29.804 us/op 26.310 us/op 1.13
BLS aggregatePubkeys 128 - blst-native 97.570 us/op 103.14 us/op 0.95
getAttestationsForBlock 46.229 ms/op 46.722 ms/op 0.99
getSlashingsAndExits - default max 146.93 us/op 179.36 us/op 0.82
getSlashingsAndExits - 2k 441.37 us/op 474.09 us/op 0.93
proposeBlockBody type=full, size=empty 5.5002 ms/op 8.2614 ms/op 0.67
isKnown best case - 1 super set check 337.00 ns/op 416.00 ns/op 0.81
isKnown normal case - 2 super set checks 310.00 ns/op 502.00 ns/op 0.62
isKnown worse case - 16 super set checks 318.00 ns/op 645.00 ns/op 0.49
CheckpointStateCache - add get delete 5.1700 us/op 6.4160 us/op 0.81
validate api signedAggregateAndProof - struct 2.9613 ms/op 2.9512 ms/op 1.00
validate gossip signedAggregateAndProof - struct 2.8197 ms/op 3.0648 ms/op 0.92
validate gossip attestation - vc 640000 1.3745 ms/op 1.4726 ms/op 0.93
batch validate gossip attestation - vc 640000 - chunk 32 163.08 us/op 181.92 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 64 148.65 us/op 157.26 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 128 143.36 us/op 141.50 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 256 137.93 us/op 132.11 us/op 1.04
pickEth1Vote - no votes 1.2287 ms/op 1.2969 ms/op 0.95
pickEth1Vote - max votes 10.142 ms/op 10.325 ms/op 0.98
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.579 ms/op 20.538 ms/op 0.81
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 35.017 ms/op 31.718 ms/op 1.10
pickEth1Vote - Eth1Data fastSerialize value x2048 647.19 us/op 723.19 us/op 0.89
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.6336 ms/op 5.1554 ms/op 1.09
bytes32 toHexString 498.00 ns/op 555.00 ns/op 0.90
bytes32 Buffer.toString(hex) 293.00 ns/op 312.00 ns/op 0.94
bytes32 Buffer.toString(hex) from Uint8Array 415.00 ns/op 422.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 289.00 ns/op 311.00 ns/op 0.93
Object access 1 prop 0.15700 ns/op 0.17100 ns/op 0.92
Map access 1 prop 0.14300 ns/op 0.15400 ns/op 0.93
Object get x1000 7.8060 ns/op 8.0190 ns/op 0.97
Map get x1000 0.75400 ns/op 0.84300 ns/op 0.89
Object set x1000 54.490 ns/op 57.899 ns/op 0.94
Map set x1000 42.154 ns/op 44.051 ns/op 0.96
Return object 10000 times 0.24890 ns/op 0.25510 ns/op 0.98
Throw Error 10000 times 4.0587 us/op 4.0054 us/op 1.01
fastMsgIdFn sha256 / 200 bytes 3.4380 us/op 3.4910 us/op 0.98
fastMsgIdFn h32 xxhash / 200 bytes 313.00 ns/op 300.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 200 bytes 397.00 ns/op 351.00 ns/op 1.13
fastMsgIdFn sha256 / 1000 bytes 11.927 us/op 12.015 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 461.00 ns/op 488.00 ns/op 0.94
fastMsgIdFn h64 xxhash / 1000 bytes 475.00 ns/op 475.00 ns/op 1.00
fastMsgIdFn sha256 / 10000 bytes 106.65 us/op 111.19 us/op 0.96
fastMsgIdFn h32 xxhash / 10000 bytes 2.0320 us/op 2.0840 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 1.3940 us/op 1.4240 us/op 0.98
send data - 1000 256B messages 20.774 ms/op 21.376 ms/op 0.97
send data - 1000 512B messages 28.365 ms/op 31.490 ms/op 0.90
send data - 1000 1024B messages 41.644 ms/op 45.345 ms/op 0.92
send data - 1000 1200B messages 40.318 ms/op 41.349 ms/op 0.98
send data - 1000 2048B messages 50.572 ms/op 50.692 ms/op 1.00
send data - 1000 4096B messages 44.082 ms/op 43.340 ms/op 1.02
send data - 1000 16384B messages 129.33 ms/op 121.15 ms/op 1.07
send data - 1000 65536B messages 510.65 ms/op 567.38 ms/op 0.90
enrSubnets - fastDeserialize 64 bits 1.8220 us/op 1.9750 us/op 0.92
enrSubnets - ssz BitVector 64 bits 566.00 ns/op 598.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 244.00 ns/op 256.00 ns/op 0.95
enrSubnets - ssz BitVector 4 bits 572.00 ns/op 695.00 ns/op 0.82
prioritizePeers score -10:0 att 32-0.1 sync 2-0 129.62 us/op 141.50 us/op 0.92
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 156.14 us/op 174.82 us/op 0.89
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 220.12 us/op 204.23 us/op 1.08
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 384.38 us/op 432.63 us/op 0.89
prioritizePeers score 0:0 att 64-1 sync 4-1 443.30 us/op 436.40 us/op 1.02
array of 16000 items push then shift 1.7080 us/op 1.7901 us/op 0.95
LinkedList of 16000 items push then shift 9.8070 ns/op 10.260 ns/op 0.96
array of 16000 items push then pop 66.450 ns/op 114.17 ns/op 0.58
LinkedList of 16000 items push then pop 9.7010 ns/op 10.688 ns/op 0.91
array of 24000 items push then shift 2.6080 us/op 3.1103 us/op 0.84
LinkedList of 24000 items push then shift 9.7600 ns/op 10.902 ns/op 0.90
array of 24000 items push then pop 156.95 ns/op 183.10 ns/op 0.86
LinkedList of 24000 items push then pop 10.222 ns/op 10.211 ns/op 1.00
intersect bitArray bitLen 8 7.5000 ns/op 7.2670 ns/op 1.03
intersect array and set length 8 97.681 ns/op 80.814 ns/op 1.21
intersect bitArray bitLen 128 46.655 ns/op 39.396 ns/op 1.18
intersect array and set length 128 1.2929 us/op 1.1867 us/op 1.09
bitArray.getTrueBitIndexes() bitLen 128 2.2290 us/op 2.0030 us/op 1.11
bitArray.getTrueBitIndexes() bitLen 248 3.6730 us/op 3.4680 us/op 1.06
bitArray.getTrueBitIndexes() bitLen 512 6.9330 us/op 6.9050 us/op 1.00
Buffer.concat 32 items 1.1240 us/op 1.1850 us/op 0.95
Uint8Array.set 32 items 2.3640 us/op 2.2880 us/op 1.03
Set add up to 64 items then delete first 5.3443 us/op 5.5770 us/op 0.96
OrderedSet add up to 64 items then delete first 6.9426 us/op 7.7212 us/op 0.90
Set add up to 64 items then delete last 5.5778 us/op 6.4551 us/op 0.86
OrderedSet add up to 64 items then delete last 7.5167 us/op 8.1024 us/op 0.93
Set add up to 64 items then delete middle 5.5141 us/op 6.2410 us/op 0.88
OrderedSet add up to 64 items then delete middle 8.7603 us/op 9.3651 us/op 0.94
Set add up to 128 items then delete first 11.091 us/op 12.624 us/op 0.88
OrderedSet add up to 128 items then delete first 15.469 us/op 16.464 us/op 0.94
Set add up to 128 items then delete last 11.086 us/op 12.521 us/op 0.89
OrderedSet add up to 128 items then delete last 14.920 us/op 15.619 us/op 0.96
Set add up to 128 items then delete middle 10.993 us/op 12.597 us/op 0.87
OrderedSet add up to 128 items then delete middle 20.700 us/op 22.546 us/op 0.92
Set add up to 256 items then delete first 22.495 us/op 24.054 us/op 0.94
OrderedSet add up to 256 items then delete first 31.704 us/op 30.706 us/op 1.03
Set add up to 256 items then delete last 22.070 us/op 24.347 us/op 0.91
OrderedSet add up to 256 items then delete last 29.814 us/op 28.661 us/op 1.04
Set add up to 256 items then delete middle 21.912 us/op 24.929 us/op 0.88
OrderedSet add up to 256 items then delete middle 53.644 us/op 57.105 us/op 0.94
transfer serialized Status (84 B) 2.0910 us/op 2.1310 us/op 0.98
copy serialized Status (84 B) 1.7700 us/op 2.0130 us/op 0.88
transfer serialized SignedVoluntaryExit (112 B) 2.1720 us/op 2.4090 us/op 0.90
copy serialized SignedVoluntaryExit (112 B) 1.8930 us/op 2.0570 us/op 0.92
transfer serialized ProposerSlashing (416 B) 2.7170 us/op 3.5950 us/op 0.76
copy serialized ProposerSlashing (416 B) 2.7520 us/op 3.5850 us/op 0.77
transfer serialized Attestation (485 B) 3.0820 us/op 3.7110 us/op 0.83
copy serialized Attestation (485 B) 3.2250 us/op 3.7060 us/op 0.87
transfer serialized AttesterSlashing (33232 B) 3.2730 us/op 3.6820 us/op 0.89
copy serialized AttesterSlashing (33232 B) 9.5670 us/op 10.128 us/op 0.94
transfer serialized Small SignedBeaconBlock (128000 B) 3.4080 us/op 4.0680 us/op 0.84
copy serialized Small SignedBeaconBlock (128000 B) 27.933 us/op 28.118 us/op 0.99
transfer serialized Avg SignedBeaconBlock (200000 B) 4.3240 us/op 5.0730 us/op 0.85
copy serialized Avg SignedBeaconBlock (200000 B) 42.340 us/op 33.050 us/op 1.28
transfer serialized BlobsSidecar (524380 B) 5.4510 us/op 4.6310 us/op 1.18
copy serialized BlobsSidecar (524380 B) 126.73 us/op 203.03 us/op 0.62
transfer serialized Big SignedBeaconBlock (1000000 B) 4.8550 us/op 4.8600 us/op 1.00
copy serialized Big SignedBeaconBlock (1000000 B) 238.09 us/op 221.78 us/op 1.07
pass gossip attestations to forkchoice per slot 4.1690 ms/op 5.3034 ms/op 0.79
forkChoice updateHead vc 100000 bc 64 eq 0 734.77 us/op 845.48 us/op 0.87
forkChoice updateHead vc 600000 bc 64 eq 0 4.7017 ms/op 5.9782 ms/op 0.79
forkChoice updateHead vc 1000000 bc 64 eq 0 8.6541 ms/op 10.241 ms/op 0.85
forkChoice updateHead vc 600000 bc 320 eq 0 4.9032 ms/op 5.4357 ms/op 0.90
forkChoice updateHead vc 600000 bc 1200 eq 0 4.8456 ms/op 5.8088 ms/op 0.83
forkChoice updateHead vc 600000 bc 7200 eq 0 6.3212 ms/op 7.6805 ms/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 1000 11.850 ms/op 16.046 ms/op 0.74
forkChoice updateHead vc 600000 bc 64 eq 10000 13.224 ms/op 15.525 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 300000 20.163 ms/op 38.927 ms/op 0.52
computeDeltas 500000 validators 300 proto nodes 7.3586 ms/op 8.6666 ms/op 0.85
computeDeltas 500000 validators 1200 proto nodes 7.0640 ms/op 8.7024 ms/op 0.81
computeDeltas 500000 validators 7200 proto nodes 7.1608 ms/op 8.8783 ms/op 0.81
computeDeltas 750000 validators 300 proto nodes 10.761 ms/op 13.598 ms/op 0.79
computeDeltas 750000 validators 1200 proto nodes 10.721 ms/op 13.580 ms/op 0.79
computeDeltas 750000 validators 7200 proto nodes 10.473 ms/op 12.681 ms/op 0.83
computeDeltas 1400000 validators 300 proto nodes 18.983 ms/op 22.562 ms/op 0.84
computeDeltas 1400000 validators 1200 proto nodes 19.092 ms/op 22.741 ms/op 0.84
computeDeltas 1400000 validators 7200 proto nodes 19.050 ms/op 23.622 ms/op 0.81
computeDeltas 2100000 validators 300 proto nodes 28.686 ms/op 35.738 ms/op 0.80
computeDeltas 2100000 validators 1200 proto nodes 29.089 ms/op 39.018 ms/op 0.75
computeDeltas 2100000 validators 7200 proto nodes 27.902 ms/op 36.381 ms/op 0.77
computeProposerBoostScoreFromBalances 500000 validators 3.7770 ms/op 4.7245 ms/op 0.80
computeProposerBoostScoreFromBalances 750000 validators 3.8011 ms/op 5.0653 ms/op 0.75
computeProposerBoostScoreFromBalances 1400000 validators 3.7888 ms/op 4.3825 ms/op 0.86
computeProposerBoostScoreFromBalances 2100000 validators 3.7628 ms/op 4.0667 ms/op 0.93
altair processAttestation - 250000 vs - 7PWei normalcase 2.2754 ms/op 2.4028 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei worstcase 3.2400 ms/op 3.5223 ms/op 0.92
altair processAttestation - setStatus - 1/6 committees join 155.85 us/op 199.00 us/op 0.78
altair processAttestation - setStatus - 1/3 committees join 307.28 us/op 381.43 us/op 0.81
altair processAttestation - setStatus - 1/2 committees join 408.25 us/op 518.39 us/op 0.79
altair processAttestation - setStatus - 2/3 committees join 524.39 us/op 653.43 us/op 0.80
altair processAttestation - setStatus - 4/5 committees join 722.90 us/op 913.92 us/op 0.79
altair processAttestation - setStatus - 100% committees join 843.78 us/op 1.0537 ms/op 0.80
altair processBlock - 250000 vs - 7PWei normalcase 9.2044 ms/op 12.107 ms/op 0.76
altair processBlock - 250000 vs - 7PWei normalcase hashState 36.754 ms/op 44.539 ms/op 0.83
altair processBlock - 250000 vs - 7PWei worstcase 44.323 ms/op 42.545 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase hashState 96.082 ms/op 106.82 ms/op 0.90
phase0 processBlock - 250000 vs - 7PWei normalcase 3.1669 ms/op 2.9428 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei worstcase 33.493 ms/op 35.668 ms/op 0.94
altair processEth1Data - 250000 vs - 7PWei normalcase 530.76 us/op 696.40 us/op 0.76
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.9270 us/op 8.1200 us/op 1.22
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 69.033 us/op 45.553 us/op 1.52
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 23.002 us/op 19.196 us/op 1.20
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.134 us/op 14.166 us/op 0.72
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 228.74 us/op 222.66 us/op 1.03
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.9571 ms/op 1.3202 ms/op 1.48
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.7341 ms/op 1.7299 ms/op 1.58
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8968 ms/op 1.9167 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.4706 ms/op 4.8576 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.1284 ms/op 2.9063 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.9718 ms/op 6.0378 ms/op 0.99
Tree 40 250000 create 396.08 ms/op 472.00 ms/op 0.84
Tree 40 250000 get(125000) 211.27 ns/op 243.77 ns/op 0.87
Tree 40 250000 set(125000) 1.1150 us/op 1.4557 us/op 0.77
Tree 40 250000 toArray() 22.858 ms/op 28.303 ms/op 0.81
Tree 40 250000 iterate all - toArray() + loop 22.847 ms/op 27.624 ms/op 0.83
Tree 40 250000 iterate all - get(i) 74.612 ms/op 84.409 ms/op 0.88
MutableVector 250000 create 18.003 ms/op 18.179 ms/op 0.99
MutableVector 250000 get(125000) 6.8090 ns/op 7.6600 ns/op 0.89
MutableVector 250000 set(125000) 291.63 ns/op 391.64 ns/op 0.74
MutableVector 250000 toArray() 3.9450 ms/op 4.2849 ms/op 0.92
MutableVector 250000 iterate all - toArray() + loop 3.8359 ms/op 5.1301 ms/op 0.75
MutableVector 250000 iterate all - get(i) 1.5901 ms/op 1.8732 ms/op 0.85
Array 250000 create 3.6933 ms/op 4.6105 ms/op 0.80
Array 250000 clone - spread 1.4535 ms/op 1.6670 ms/op 0.87
Array 250000 get(125000) 1.2190 ns/op 1.6310 ns/op 0.75
Array 250000 set(125000) 5.3920 ns/op 5.2200 ns/op 1.03
Array 250000 iterate all - loop 173.92 us/op 243.80 us/op 0.71
effectiveBalanceIncrements clone Uint8Array 300000 35.548 us/op 72.659 us/op 0.49
effectiveBalanceIncrements clone MutableVector 300000 409.00 ns/op 1.5620 us/op 0.26
effectiveBalanceIncrements rw all Uint8Array 300000 211.03 us/op 264.97 us/op 0.80
effectiveBalanceIncrements rw all MutableVector 300000 93.276 ms/op 134.50 ms/op 0.69
phase0 afterProcessEpoch - 250000 vs - 7PWei 114.63 ms/op 142.27 ms/op 0.81
phase0 beforeProcessEpoch - 250000 vs - 7PWei 40.221 ms/op 63.767 ms/op 0.63
altair processEpoch - mainnet_e81889 538.28 ms/op 627.07 ms/op 0.86
mainnet_e81889 - altair beforeProcessEpoch 93.250 ms/op 99.209 ms/op 0.94
mainnet_e81889 - altair processJustificationAndFinalization 17.048 us/op 25.334 us/op 0.67
mainnet_e81889 - altair processInactivityUpdates 7.3266 ms/op 7.5775 ms/op 0.97
mainnet_e81889 - altair processRewardsAndPenalties 73.090 ms/op 75.553 ms/op 0.97
mainnet_e81889 - altair processRegistryUpdates 3.8880 us/op 5.8950 us/op 0.66
mainnet_e81889 - altair processSlashings 731.00 ns/op 1.2860 us/op 0.57
mainnet_e81889 - altair processEth1DataReset 653.00 ns/op 1.5940 us/op 0.41
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5577 ms/op 2.1168 ms/op 0.74
mainnet_e81889 - altair processSlashingsReset 3.8240 us/op 8.8390 us/op 0.43
mainnet_e81889 - altair processRandaoMixesReset 7.9360 us/op 15.419 us/op 0.51
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0280 us/op 1.7280 us/op 0.59
mainnet_e81889 - altair processParticipationFlagUpdates 4.2490 us/op 6.6760 us/op 0.64
mainnet_e81889 - altair processSyncCommitteeUpdates 1.3610 us/op 1.6860 us/op 0.81
mainnet_e81889 - altair afterProcessEpoch 132.16 ms/op 148.23 ms/op 0.89
capella processEpoch - mainnet_e217614 2.7098 s/op 2.9338 s/op 0.92
mainnet_e217614 - capella beforeProcessEpoch 541.76 ms/op 695.20 ms/op 0.78
mainnet_e217614 - capella processJustificationAndFinalization 24.084 us/op 28.117 us/op 0.86
mainnet_e217614 - capella processInactivityUpdates 28.320 ms/op 28.085 ms/op 1.01
mainnet_e217614 - capella processRewardsAndPenalties 533.03 ms/op 684.41 ms/op 0.78
mainnet_e217614 - capella processRegistryUpdates 42.521 us/op 46.170 us/op 0.92
mainnet_e217614 - capella processSlashings 1.5260 us/op 1.8310 us/op 0.83
mainnet_e217614 - capella processEth1DataReset 1.2580 us/op 1.2850 us/op 0.98
mainnet_e217614 - capella processEffectiveBalanceUpdates 9.3199 ms/op 17.028 ms/op 0.55
mainnet_e217614 - capella processSlashingsReset 9.5300 us/op 9.2080 us/op 1.03
mainnet_e217614 - capella processRandaoMixesReset 11.967 us/op 19.141 us/op 0.63
mainnet_e217614 - capella processHistoricalRootsUpdate 2.6290 us/op 2.0630 us/op 1.27
mainnet_e217614 - capella processParticipationFlagUpdates 5.6090 us/op 4.8690 us/op 1.15
mainnet_e217614 - capella afterProcessEpoch 350.18 ms/op 496.02 ms/op 0.71
phase0 processEpoch - mainnet_e58758 799.48 ms/op 597.60 ms/op 1.34
mainnet_e58758 - phase0 beforeProcessEpoch 268.44 ms/op 227.45 ms/op 1.18
mainnet_e58758 - phase0 processJustificationAndFinalization 37.712 us/op 38.473 us/op 0.98
mainnet_e58758 - phase0 processRewardsAndPenalties 70.560 ms/op 79.532 ms/op 0.89
mainnet_e58758 - phase0 processRegistryUpdates 22.848 us/op 22.600 us/op 1.01
mainnet_e58758 - phase0 processSlashings 1.1710 us/op 1.4520 us/op 0.81
mainnet_e58758 - phase0 processEth1DataReset 1.3290 us/op 1.3640 us/op 0.97
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.7174 ms/op 1.9981 ms/op 0.86
mainnet_e58758 - phase0 processSlashingsReset 9.3630 us/op 12.756 us/op 0.73
mainnet_e58758 - phase0 processRandaoMixesReset 15.137 us/op 13.523 us/op 1.12
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.6600 us/op 1.4380 us/op 1.15
mainnet_e58758 - phase0 processParticipationRecordUpdates 9.4490 us/op 12.009 us/op 0.79
mainnet_e58758 - phase0 afterProcessEpoch 148.25 ms/op 114.15 ms/op 1.30
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8339 ms/op 1.7003 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.0244 ms/op 2.0011 ms/op 1.01
altair processInactivityUpdates - 250000 normalcase 31.036 ms/op 40.285 ms/op 0.77
altair processInactivityUpdates - 250000 worstcase 43.023 ms/op 31.693 ms/op 1.36
phase0 processRegistryUpdates - 250000 normalcase 18.716 us/op 16.910 us/op 1.11
phase0 processRegistryUpdates - 250000 badcase_full_deposits 535.87 us/op 475.05 us/op 1.13
phase0 processRegistryUpdates - 250000 worstcase 0.5 168.36 ms/op 207.84 ms/op 0.81
altair processRewardsAndPenalties - 250000 normalcase 67.424 ms/op 104.57 ms/op 0.64
altair processRewardsAndPenalties - 250000 worstcase 77.269 ms/op 78.227 ms/op 0.99
phase0 getAttestationDeltas - 250000 normalcase 17.856 ms/op 16.022 ms/op 1.11
phase0 getAttestationDeltas - 250000 worstcase 18.143 ms/op 17.141 ms/op 1.06
phase0 processSlashings - 250000 worstcase 148.21 us/op 119.27 us/op 1.24
altair processSyncCommitteeUpdates - 250000 191.21 ms/op 219.36 ms/op 0.87
BeaconState.hashTreeRoot - No change 268.00 ns/op 433.00 ns/op 0.62
BeaconState.hashTreeRoot - 1 full validator 192.20 us/op 259.88 us/op 0.74
BeaconState.hashTreeRoot - 32 full validator 2.4282 ms/op 2.5697 ms/op 0.94
BeaconState.hashTreeRoot - 512 full validator 21.157 ms/op 21.616 ms/op 0.98
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 252.95 us/op 211.66 us/op 1.20
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.4830 ms/op 2.9941 ms/op 0.83
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.957 ms/op 36.990 ms/op 0.89
BeaconState.hashTreeRoot - 1 balances 136.35 us/op 200.68 us/op 0.68
BeaconState.hashTreeRoot - 32 balances 1.3832 ms/op 1.9968 ms/op 0.69
BeaconState.hashTreeRoot - 512 balances 14.441 ms/op 18.330 ms/op 0.79
BeaconState.hashTreeRoot - 250000 balances 234.01 ms/op 282.05 ms/op 0.83
aggregationBits - 2048 els - zipIndexesInBitList 60.679 us/op 32.232 us/op 1.88
byteArrayEquals 32 85.100 ns/op 89.846 ns/op 0.95
Buffer.compare 32 59.314 ns/op 66.127 ns/op 0.90
byteArrayEquals 1024 2.3548 us/op 2.6221 us/op 0.90
Buffer.compare 1024 75.082 ns/op 97.098 ns/op 0.77
byteArrayEquals 16384 35.985 us/op 40.461 us/op 0.89
Buffer.compare 16384 292.16 ns/op 353.76 ns/op 0.83
byteArrayEquals 123687377 276.87 ms/op 308.70 ms/op 0.90
Buffer.compare 123687377 10.978 ms/op 8.1777 ms/op 1.34
byteArrayEquals 32 - diff last byte 87.089 ns/op 81.071 ns/op 1.07
Buffer.compare 32 - diff last byte 66.812 ns/op 64.126 ns/op 1.04
byteArrayEquals 1024 - diff last byte 2.3528 us/op 2.3398 us/op 1.01
Buffer.compare 1024 - diff last byte 80.452 ns/op 79.359 ns/op 1.01
byteArrayEquals 16384 - diff last byte 36.395 us/op 35.255 us/op 1.03
Buffer.compare 16384 - diff last byte 303.17 ns/op 302.88 ns/op 1.00
byteArrayEquals 123687377 - diff last byte 268.14 ms/op 278.46 ms/op 0.96
Buffer.compare 123687377 - diff last byte 9.8177 ms/op 9.1365 ms/op 1.07
byteArrayEquals 32 - random bytes 7.8670 ns/op 6.6850 ns/op 1.18
Buffer.compare 32 - random bytes 66.533 ns/op 70.525 ns/op 0.94
byteArrayEquals 1024 - random bytes 7.1020 ns/op 6.2350 ns/op 1.14
Buffer.compare 1024 - random bytes 68.166 ns/op 68.696 ns/op 0.99
byteArrayEquals 16384 - random bytes 6.7250 ns/op 7.1580 ns/op 0.94
Buffer.compare 16384 - random bytes 65.180 ns/op 71.921 ns/op 0.91
byteArrayEquals 123687377 - random bytes 10.350 ns/op 10.630 ns/op 0.97
Buffer.compare 123687377 - random bytes 73.330 ns/op 84.910 ns/op 0.86
regular array get 100000 times 49.551 us/op 54.347 us/op 0.91
wrappedArray get 100000 times 50.157 us/op 51.353 us/op 0.98
arrayWithProxy get 100000 times 15.458 ms/op 17.144 ms/op 0.90
ssz.Root.equals 59.305 ns/op 60.412 ns/op 0.98
byteArrayEquals 59.617 ns/op 59.389 ns/op 1.00
Buffer.compare 13.389 ns/op 14.200 ns/op 0.94
shuffle list - 16384 els 7.6625 ms/op 7.7077 ms/op 0.99
shuffle list - 250000 els 110.71 ms/op 115.61 ms/op 0.96
processSlot - 1 slots 20.860 us/op 18.861 us/op 1.11
processSlot - 32 slots 4.1291 ms/op 3.6839 ms/op 1.12
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 69.903 ms/op 57.791 ms/op 1.21
getCommitteeAssignments - req 1 vs - 250000 vc 2.8905 ms/op 2.6841 ms/op 1.08
getCommitteeAssignments - req 100 vs - 250000 vc 4.1884 ms/op 4.0453 ms/op 1.04
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5424 ms/op 4.4373 ms/op 1.02
findModifiedValidators - 10000 modified validators 562.78 ms/op 606.37 ms/op 0.93
findModifiedValidators - 1000 modified validators 554.02 ms/op 449.04 ms/op 1.23
findModifiedValidators - 100 modified validators 654.66 ms/op 423.64 ms/op 1.55
findModifiedValidators - 10 modified validators 562.87 ms/op 435.34 ms/op 1.29
findModifiedValidators - 1 modified validators 517.56 ms/op 406.20 ms/op 1.27
findModifiedValidators - no difference 461.48 ms/op 467.70 ms/op 0.99
compare ViewDUs 5.7453 s/op 5.1207 s/op 1.12
compare each validator Uint8Array 1.8005 s/op 2.2302 s/op 0.81
compare ViewDU to Uint8Array 1.7295 s/op 1.5122 s/op 1.14
migrate state 1000000 validators, 24 modified, 0 new 1.1400 s/op 857.99 ms/op 1.33
migrate state 1000000 validators, 1700 modified, 1000 new 1.6880 s/op 1.0681 s/op 1.58
migrate state 1000000 validators, 3400 modified, 2000 new 1.8207 s/op 1.2766 s/op 1.43
migrate state 1500000 validators, 24 modified, 0 new 1.0588 s/op 748.92 ms/op 1.41
migrate state 1500000 validators, 1700 modified, 1000 new 1.5411 s/op 1.1621 s/op 1.33
migrate state 1500000 validators, 3400 modified, 2000 new 1.8418 s/op 1.3209 s/op 1.39
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.6200 ns/op 4.1000 ns/op 1.61
state getBlockRootAtSlot - 250000 vs - 7PWei 839.97 ns/op 735.12 ns/op 1.14
computeProposers - vc 250000 10.760 ms/op 9.4539 ms/op 1.14
computeEpochShuffling - vc 250000 119.05 ms/op 102.01 ms/op 1.17
getNextSyncCommittee - vc 250000 181.09 ms/op 155.63 ms/op 1.16
computeSigningRoot for AttestationData 36.011 us/op 29.115 us/op 1.24
hash AttestationData serialized data then Buffer.toString(base64) 2.9868 us/op 2.2632 us/op 1.32
toHexString serialized data 1.8121 us/op 1.0476 us/op 1.73
Buffer.toString(base64) 328.57 ns/op 222.88 ns/op 1.47

by benchmarkbot/action

Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

Looks like type checks are failing because produceBlockV3 tests are not yet updated

packages/beacon-node/src/api/impl/validator/index.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Merging #6258 (b51d931) into unstable (ea49409) will not change coverage.
Report is 2 commits behind head on unstable.
The diff coverage is n/a.

❗ Current head b51d931 differs from pull request most recent head f9c89f4. Consider uploading reports for the commit f9c89f4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6258   +/-   ##
=========================================
  Coverage     80.38%   80.38%           
=========================================
  Files           202      202           
  Lines         19622    19622           
  Branches       1176     1176           
=========================================
  Hits          15773    15773           
  Misses         3821     3821           
  Partials         28       28           


[routes.validator.BuilderSelection.BuilderOnly, 0, 2, 0, false, "builder"],
[routes.validator.BuilderSelection.ExecutionOnly, 2, 0, 1, false, "engine"],
[routes.validator.BuilderSelection.BuilderOnly, 1, 1, 0, true, "builder"],
Copy link
Member

Choose a reason for hiding this comment

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

In this case we produce a builder block even though the execution client asked us to override builder, are we fine with this behavior, maybe we should at least log a warning that builders are suspected to censor transactions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will be changed in followup PR where builderselection will be removed on the beacon side (didn't want to mix it in this PR), so just ignore for now, followup on builderselection coming shortly

Copy link
Member

@nflaig nflaig 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 0f377dd into unstable Jan 9, 2024
14 of 15 checks passed
@g11tech g11tech deleted the override-builder branch January 9, 2024 14:27
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.14.0 🎉

ensi321 pushed a commit to ensi321/lodestar that referenced this pull request Jan 22, 2024
…#6258)

* feat: reject builder blocks if engine indicates censorship

* apply feeback

* fix tests

* small refac and test fixes and selection test extenstion for override combinations

* make typing tighter for blindedblock

* apply feedbac

* Fix typo

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
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.

5 participants