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

fix: enforce strict timeout for builder to provide bid #7151

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 11, 2024

Motivation

Adhere to spec and enforce BUILDER_PROPOSAL_DELAY_TOLERANCE when requesting a bid from builder via getHeader api. This timeout is enforced by mev-boost (and other sidecars) as well but those allow to configure it and play timing games.

Description

  • Enforce strict timeout on getHeader request as per builder spec
  • Make race-cutoff of local vs. builder block relative to slot start to avoid edge cases that could delay block proposal past 2 seconds in the slot which increases the risk of orphaning the block

@nflaig nflaig requested a review from a team as a code owner October 11, 2024 11:36
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.17%. Comparing base (4b7d871) to head (8bb3298).
Report is 9 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7151      +/-   ##
============================================
+ Coverage     49.12%   49.17%   +0.04%     
============================================
  Files           597      597              
  Lines         39718    39765      +47     
  Branches       2085     2090       +5     
============================================
+ Hits          19512    19554      +42     
- Misses        20165    20170       +5     
  Partials         41       41              

Copy link
Contributor

github-actions bot commented Oct 11, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: c068eb6 Previous: 105a388 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8332 ms/op 1.9589 ms/op 0.94
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 42.168 us/op 48.283 us/op 0.87
BLS verify - blst 864.66 us/op 917.35 us/op 0.94
BLS verifyMultipleSignatures 3 - blst 1.2813 ms/op 1.3348 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst 2.0484 ms/op 1.8510 ms/op 1.11
BLS verifyMultipleSignatures 32 - blst 4.4690 ms/op 5.0314 ms/op 0.89
BLS verifyMultipleSignatures 64 - blst 8.4507 ms/op 9.3885 ms/op 0.90
BLS verifyMultipleSignatures 128 - blst 15.986 ms/op 18.279 ms/op 0.87
BLS deserializing 10000 signatures 614.38 ms/op 692.94 ms/op 0.89
BLS deserializing 100000 signatures 6.2470 s/op 6.9283 s/op 0.90
BLS verifyMultipleSignatures - same message - 3 - blst 967.45 us/op 980.20 us/op 0.99
BLS verifyMultipleSignatures - same message - 8 - blst 1.0762 ms/op 1.0559 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst 1.6582 ms/op 1.7129 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.4167 ms/op 2.6391 ms/op 0.92
BLS verifyMultipleSignatures - same message - 128 - blst 3.9420 ms/op 4.4777 ms/op 0.88
BLS aggregatePubkeys 32 - blst 18.375 us/op 20.168 us/op 0.91
BLS aggregatePubkeys 128 - blst 63.775 us/op 70.459 us/op 0.91
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 62.843 ms/op 73.014 ms/op 0.86
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 43.166 ms/op 55.332 ms/op 0.78
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 28.800 ms/op 34.130 ms/op 0.84
getSlashingsAndExits - default max 66.323 us/op 100.33 us/op 0.66
getSlashingsAndExits - 2k 255.77 us/op 284.95 us/op 0.90
proposeBlockBody type=full, size=empty 5.3088 ms/op 6.3102 ms/op 0.84
isKnown best case - 1 super set check 470.00 ns/op 331.00 ns/op 1.42
isKnown normal case - 2 super set checks 488.00 ns/op 317.00 ns/op 1.54
isKnown worse case - 16 super set checks 456.00 ns/op 302.00 ns/op 1.51
InMemoryCheckpointStateCache - add get delete 2.6780 us/op 3.4290 us/op 0.78
updateUnfinalizedPubkeys - updating 10 pubkeys 652.85 us/op 901.67 us/op 0.72
updateUnfinalizedPubkeys - updating 100 pubkeys 2.7854 ms/op 3.4325 ms/op 0.81
updateUnfinalizedPubkeys - updating 1000 pubkeys 37.006 ms/op 53.943 ms/op 0.69
validate api signedAggregateAndProof - struct 1.9821 ms/op 1.4600 ms/op 1.36
validate gossip signedAggregateAndProof - struct 1.9639 ms/op 1.4307 ms/op 1.37
batch validate gossip attestation - vc 640000 - chunk 32 118.53 us/op 135.66 us/op 0.87
batch validate gossip attestation - vc 640000 - chunk 64 109.06 us/op 118.56 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 128 106.24 us/op 116.26 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 256 100.97 us/op 112.31 us/op 0.90
pickEth1Vote - no votes 880.77 us/op 1.2760 ms/op 0.69
pickEth1Vote - max votes 5.8078 ms/op 7.2900 ms/op 0.80
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.735 ms/op 14.253 ms/op 0.75
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.582 ms/op 20.521 ms/op 1.00
pickEth1Vote - Eth1Data fastSerialize value x2048 368.34 us/op 531.67 us/op 0.69
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.4193 ms/op 4.0610 ms/op 0.60
bytes32 toHexString 810.00 ns/op 569.00 ns/op 1.42
bytes32 Buffer.toString(hex) 533.00 ns/op 272.00 ns/op 1.96
bytes32 Buffer.toString(hex) from Uint8Array 635.00 ns/op 454.00 ns/op 1.40
bytes32 Buffer.toString(hex) + 0x 499.00 ns/op 280.00 ns/op 1.78
Object access 1 prop 0.33700 ns/op 0.17700 ns/op 1.90
Map access 1 prop 0.34000 ns/op 0.14400 ns/op 2.36
Object get x1000 5.1590 ns/op 9.0120 ns/op 0.57
Map get x1000 5.9120 ns/op 6.9210 ns/op 0.85
Object set x1000 23.490 ns/op 36.771 ns/op 0.64
Map set x1000 19.632 ns/op 24.149 ns/op 0.81
Return object 10000 times 0.30970 ns/op 0.31990 ns/op 0.97
Throw Error 10000 times 2.8566 us/op 3.5562 us/op 0.80
toHex 118.33 ns/op 173.42 ns/op 0.68
Buffer.from 111.69 ns/op 154.39 ns/op 0.72
shared Buffer 72.712 ns/op 99.954 ns/op 0.73
fastMsgIdFn sha256 / 200 bytes 2.0740 us/op 2.4700 us/op 0.84
fastMsgIdFn h32 xxhash / 200 bytes 469.00 ns/op 263.00 ns/op 1.78
fastMsgIdFn h64 xxhash / 200 bytes 482.00 ns/op 289.00 ns/op 1.67
fastMsgIdFn sha256 / 1000 bytes 6.1380 us/op 7.9870 us/op 0.77
fastMsgIdFn h32 xxhash / 1000 bytes 590.00 ns/op 406.00 ns/op 1.45
fastMsgIdFn h64 xxhash / 1000 bytes 555.00 ns/op 384.00 ns/op 1.45
fastMsgIdFn sha256 / 10000 bytes 50.395 us/op 69.354 us/op 0.73
fastMsgIdFn h32 xxhash / 10000 bytes 2.0380 us/op 2.0250 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.3920 us/op 1.3360 us/op 1.04
send data - 1000 256B messages 10.712 ms/op 15.305 ms/op 0.70
send data - 1000 512B messages 16.265 ms/op 19.794 ms/op 0.82
send data - 1000 1024B messages 27.426 ms/op 29.978 ms/op 0.91
send data - 1000 1200B messages 24.621 ms/op 28.176 ms/op 0.87
send data - 1000 2048B messages 29.779 ms/op 33.046 ms/op 0.90
send data - 1000 4096B messages 32.546 ms/op 34.133 ms/op 0.95
send data - 1000 16384B messages 79.079 ms/op 74.801 ms/op 1.06
send data - 1000 65536B messages 298.57 ms/op 239.46 ms/op 1.25
enrSubnets - fastDeserialize 64 bits 1.8420 us/op 1.4460 us/op 1.27
enrSubnets - ssz BitVector 64 bits 687.00 ns/op 412.00 ns/op 1.67
enrSubnets - fastDeserialize 4 bits 397.00 ns/op 161.00 ns/op 2.47
enrSubnets - ssz BitVector 4 bits 686.00 ns/op 371.00 ns/op 1.85
prioritizePeers score -10:0 att 32-0.1 sync 2-0 212.15 us/op 185.23 us/op 1.15
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 152.50 us/op 157.76 us/op 0.97
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 339.07 us/op 253.62 us/op 1.34
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 515.30 us/op 461.31 us/op 1.12
prioritizePeers score 0:0 att 64-1 sync 4-1 639.07 us/op 754.05 us/op 0.85
array of 16000 items push then shift 1.3470 us/op 1.7243 us/op 0.78
LinkedList of 16000 items push then shift 6.7520 ns/op 7.7490 ns/op 0.87
array of 16000 items push then pop 111.81 ns/op 130.48 ns/op 0.86
LinkedList of 16000 items push then pop 6.3950 ns/op 7.5030 ns/op 0.85
array of 24000 items push then shift 1.9523 us/op 2.5192 us/op 0.77
LinkedList of 24000 items push then shift 7.5330 ns/op 7.8920 ns/op 0.95
array of 24000 items push then pop 137.22 ns/op 181.58 ns/op 0.76
LinkedList of 24000 items push then pop 6.3620 ns/op 7.5700 ns/op 0.84
intersect bitArray bitLen 8 5.6550 ns/op 6.8780 ns/op 0.82
intersect array and set length 8 38.673 ns/op 49.919 ns/op 0.77
intersect bitArray bitLen 128 28.273 ns/op 31.219 ns/op 0.91
intersect array and set length 128 709.95 ns/op 808.78 ns/op 0.88
bitArray.getTrueBitIndexes() bitLen 128 2.3240 us/op 2.0190 us/op 1.15
bitArray.getTrueBitIndexes() bitLen 248 4.0550 us/op 3.4730 us/op 1.17
bitArray.getTrueBitIndexes() bitLen 512 8.2690 us/op 8.1110 us/op 1.02
Buffer.concat 32 items 1.0620 us/op 997.00 ns/op 1.07
Uint8Array.set 32 items 2.1660 us/op 1.7070 us/op 1.27
Buffer.copy 2.2620 us/op 1.8830 us/op 1.20
Uint8Array.set - with subarray 3.4110 us/op 2.9500 us/op 1.16
Uint8Array.set - without subarray 2.5530 us/op 2.1300 us/op 1.20
getUint32 - dataview 471.00 ns/op 258.00 ns/op 1.83
getUint32 - manual 433.00 ns/op 184.00 ns/op 2.35
Set add up to 64 items then delete first 1.8663 us/op 2.4449 us/op 0.76
OrderedSet add up to 64 items then delete first 2.9251 us/op 4.1721 us/op 0.70
Set add up to 64 items then delete last 2.2097 us/op 2.9284 us/op 0.75
OrderedSet add up to 64 items then delete last 3.1852 us/op 4.0657 us/op 0.78
Set add up to 64 items then delete middle 2.1493 us/op 2.6961 us/op 0.80
OrderedSet add up to 64 items then delete middle 5.3639 us/op 5.6195 us/op 0.95
Set add up to 128 items then delete first 4.2834 us/op 5.6956 us/op 0.75
OrderedSet add up to 128 items then delete first 6.6019 us/op 8.5829 us/op 0.77
Set add up to 128 items then delete last 4.0601 us/op 5.5308 us/op 0.73
OrderedSet add up to 128 items then delete last 7.3397 us/op 8.2333 us/op 0.89
Set add up to 128 items then delete middle 4.0762 us/op 5.2729 us/op 0.77
OrderedSet add up to 128 items then delete middle 13.359 us/op 16.487 us/op 0.81
Set add up to 256 items then delete first 10.749 us/op 11.355 us/op 0.95
OrderedSet add up to 256 items then delete first 15.423 us/op 20.008 us/op 0.77
Set add up to 256 items then delete last 7.9735 us/op 11.603 us/op 0.69
OrderedSet add up to 256 items then delete last 14.943 us/op 17.296 us/op 0.86
Set add up to 256 items then delete middle 8.0414 us/op 12.082 us/op 0.67
OrderedSet add up to 256 items then delete middle 39.219 us/op 50.582 us/op 0.78
transfer serialized Status (84 B) 1.5970 us/op 1.8670 us/op 0.86
copy serialized Status (84 B) 1.4280 us/op 1.4180 us/op 1.01
transfer serialized SignedVoluntaryExit (112 B) 1.7110 us/op 2.0530 us/op 0.83
copy serialized SignedVoluntaryExit (112 B) 1.4360 us/op 1.3240 us/op 1.08
transfer serialized ProposerSlashing (416 B) 2.2750 us/op 1.9250 us/op 1.18
copy serialized ProposerSlashing (416 B) 2.1070 us/op 1.9900 us/op 1.06
transfer serialized Attestation (485 B) 2.2930 us/op 2.0410 us/op 1.12
copy serialized Attestation (485 B) 2.3890 us/op 2.2080 us/op 1.08
transfer serialized AttesterSlashing (33232 B) 3.0210 us/op 2.2130 us/op 1.37
copy serialized AttesterSlashing (33232 B) 10.788 us/op 7.5360 us/op 1.43
transfer serialized Small SignedBeaconBlock (128000 B) 3.5720 us/op 3.5120 us/op 1.02
copy serialized Small SignedBeaconBlock (128000 B) 22.747 us/op 24.115 us/op 0.94
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5310 us/op 4.6760 us/op 0.76
copy serialized Avg SignedBeaconBlock (200000 B) 32.679 us/op 38.577 us/op 0.85
transfer serialized BlobsSidecar (524380 B) 2.9450 us/op 4.4800 us/op 0.66
copy serialized BlobsSidecar (524380 B) 77.531 us/op 89.658 us/op 0.86
transfer serialized Big SignedBeaconBlock (1000000 B) 4.2740 us/op 5.8560 us/op 0.73
copy serialized Big SignedBeaconBlock (1000000 B) 172.48 us/op 191.62 us/op 0.90
pass gossip attestations to forkchoice per slot 2.5254 ms/op 3.0003 ms/op 0.84
forkChoice updateHead vc 100000 bc 64 eq 0 354.62 us/op 501.49 us/op 0.71
forkChoice updateHead vc 600000 bc 64 eq 0 2.3841 ms/op 4.5545 ms/op 0.52
forkChoice updateHead vc 1000000 bc 64 eq 0 3.9093 ms/op 5.8229 ms/op 0.67
forkChoice updateHead vc 600000 bc 320 eq 0 2.2458 ms/op 3.2135 ms/op 0.70
forkChoice updateHead vc 600000 bc 1200 eq 0 2.3348 ms/op 3.2000 ms/op 0.73
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9672 ms/op 4.1597 ms/op 0.71
forkChoice updateHead vc 600000 bc 64 eq 1000 9.5261 ms/op 10.774 ms/op 0.88
forkChoice updateHead vc 600000 bc 64 eq 10000 9.9894 ms/op 10.887 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 300000 12.095 ms/op 14.961 ms/op 0.81
computeDeltas 500000 validators 300 proto nodes 3.4537 ms/op 4.3056 ms/op 0.80
computeDeltas 500000 validators 1200 proto nodes 3.4606 ms/op 4.5730 ms/op 0.76
computeDeltas 500000 validators 7200 proto nodes 4.0067 ms/op 5.3946 ms/op 0.74
computeDeltas 750000 validators 300 proto nodes 6.5247 ms/op 7.6273 ms/op 0.86
computeDeltas 750000 validators 1200 proto nodes 5.1322 ms/op 7.8006 ms/op 0.66
computeDeltas 750000 validators 7200 proto nodes 5.2523 ms/op 7.3640 ms/op 0.71
computeDeltas 1400000 validators 300 proto nodes 9.7173 ms/op 13.251 ms/op 0.73
computeDeltas 1400000 validators 1200 proto nodes 9.5591 ms/op 13.329 ms/op 0.72
computeDeltas 1400000 validators 7200 proto nodes 9.6196 ms/op 13.040 ms/op 0.74
computeDeltas 2100000 validators 300 proto nodes 14.617 ms/op 20.737 ms/op 0.70
computeDeltas 2100000 validators 1200 proto nodes 14.571 ms/op 22.547 ms/op 0.65
computeDeltas 2100000 validators 7200 proto nodes 15.164 ms/op 19.992 ms/op 0.76
altair processAttestation - 250000 vs - 7PWei normalcase 1.6198 ms/op 2.4071 ms/op 0.67
altair processAttestation - 250000 vs - 7PWei worstcase 2.2533 ms/op 3.4483 ms/op 0.65
altair processAttestation - setStatus - 1/6 committees join 73.448 us/op 113.37 us/op 0.65
altair processAttestation - setStatus - 1/3 committees join 141.06 us/op 228.88 us/op 0.62
altair processAttestation - setStatus - 1/2 committees join 183.57 us/op 366.88 us/op 0.50
altair processAttestation - setStatus - 2/3 committees join 266.41 us/op 407.76 us/op 0.65
altair processAttestation - setStatus - 4/5 committees join 399.39 us/op 621.97 us/op 0.64
altair processAttestation - setStatus - 100% committees join 485.42 us/op 647.93 us/op 0.75
altair processBlock - 250000 vs - 7PWei normalcase 3.1883 ms/op 5.5023 ms/op 0.58
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.853 ms/op 30.131 ms/op 0.82
altair processBlock - 250000 vs - 7PWei worstcase 35.444 ms/op 39.201 ms/op 0.90
altair processBlock - 250000 vs - 7PWei worstcase hashState 71.380 ms/op 95.654 ms/op 0.75
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4243 ms/op 2.4563 ms/op 0.58
phase0 processBlock - 250000 vs - 7PWei worstcase 22.782 ms/op 26.694 ms/op 0.85
altair processEth1Data - 250000 vs - 7PWei normalcase 248.71 us/op 425.42 us/op 0.58
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.3530 us/op 8.7000 us/op 0.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 29.146 us/op 43.460 us/op 0.67
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.1810 us/op 12.315 us/op 0.75
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.1830 us/op 8.6440 us/op 0.72
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 122.84 us/op 161.25 us/op 0.76
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 839.54 us/op 1.3626 ms/op 0.62
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1631 ms/op 1.7440 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1858 ms/op 1.6929 ms/op 0.70
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.9587 ms/op 4.4631 ms/op 0.66
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.2503 ms/op 2.0063 ms/op 0.62
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9741 ms/op 4.7288 ms/op 0.63
Tree 40 250000 create 174.76 ms/op 301.61 ms/op 0.58
Tree 40 250000 get(125000) 115.71 ns/op 176.21 ns/op 0.66
Tree 40 250000 set(125000) 516.00 ns/op 841.76 ns/op 0.61
Tree 40 250000 toArray() 10.841 ms/op 25.103 ms/op 0.43
Tree 40 250000 iterate all - toArray() + loop 10.162 ms/op 21.567 ms/op 0.47
Tree 40 250000 iterate all - get(i) 41.427 ms/op 62.120 ms/op 0.67
Array 250000 create 2.2914 ms/op 3.9736 ms/op 0.58
Array 250000 clone - spread 1.2347 ms/op 2.0542 ms/op 0.60
Array 250000 get(125000) 0.58700 ns/op 0.49300 ns/op 1.19
Array 250000 set(125000) 0.58800 ns/op 0.49300 ns/op 1.19
Array 250000 iterate all - loop 77.518 us/op 116.75 us/op 0.66
phase0 afterProcessEpoch - 250000 vs - 7PWei 73.605 ms/op 100.24 ms/op 0.73
Array.fill - length 1000000 2.5067 ms/op 5.2444 ms/op 0.48
Array push - length 1000000 14.055 ms/op 14.905 ms/op 0.94
Array.get 0.25400 ns/op 0.29632 ns/op 0.86
Uint8Array.get 0.33424 ns/op 0.46337 ns/op 0.72
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.547 ms/op 21.600 ms/op 0.63
altair processEpoch - mainnet_e81889 305.81 ms/op 361.52 ms/op 0.85
mainnet_e81889 - altair beforeProcessEpoch 16.146 ms/op 21.389 ms/op 0.75
mainnet_e81889 - altair processJustificationAndFinalization 11.651 us/op 21.274 us/op 0.55
mainnet_e81889 - altair processInactivityUpdates 4.0006 ms/op 7.2493 ms/op 0.55
mainnet_e81889 - altair processRewardsAndPenalties 55.872 ms/op 49.540 ms/op 1.13
mainnet_e81889 - altair processRegistryUpdates 2.0010 us/op 2.5050 us/op 0.80
mainnet_e81889 - altair processSlashings 767.00 ns/op 869.00 ns/op 0.88
mainnet_e81889 - altair processEth1DataReset 663.00 ns/op 522.00 ns/op 1.27
mainnet_e81889 - altair processEffectiveBalanceUpdates 998.97 us/op 1.7607 ms/op 0.57
mainnet_e81889 - altair processSlashingsReset 1.4530 us/op 6.9520 us/op 0.21
mainnet_e81889 - altair processRandaoMixesReset 1.6280 us/op 6.7420 us/op 0.24
mainnet_e81889 - altair processHistoricalRootsUpdate 400.00 ns/op 972.00 ns/op 0.41
mainnet_e81889 - altair processParticipationFlagUpdates 1.4520 us/op 4.0540 us/op 0.36
mainnet_e81889 - altair processSyncCommitteeUpdates 607.00 ns/op 741.00 ns/op 0.82
mainnet_e81889 - altair afterProcessEpoch 78.969 ms/op 103.73 ms/op 0.76
capella processEpoch - mainnet_e217614 859.51 ms/op 1.3604 s/op 0.63
mainnet_e217614 - capella beforeProcessEpoch 64.863 ms/op 79.138 ms/op 0.82
mainnet_e217614 - capella processJustificationAndFinalization 12.554 us/op 17.473 us/op 0.72
mainnet_e217614 - capella processInactivityUpdates 16.809 ms/op 18.004 ms/op 0.93
mainnet_e217614 - capella processRewardsAndPenalties 212.54 ms/op 218.62 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 13.836 us/op 15.959 us/op 0.87
mainnet_e217614 - capella processSlashings 867.00 ns/op 453.00 ns/op 1.91
mainnet_e217614 - capella processEth1DataReset 728.00 ns/op 296.00 ns/op 2.46
mainnet_e217614 - capella processEffectiveBalanceUpdates 7.1019 ms/op 18.283 ms/op 0.39
mainnet_e217614 - capella processSlashingsReset 3.5030 us/op 3.1810 us/op 1.10
mainnet_e217614 - capella processRandaoMixesReset 4.8350 us/op 4.5560 us/op 1.06
mainnet_e217614 - capella processHistoricalRootsUpdate 798.00 ns/op 625.00 ns/op 1.28
mainnet_e217614 - capella processParticipationFlagUpdates 3.6160 us/op 2.0360 us/op 1.78
mainnet_e217614 - capella afterProcessEpoch 198.25 ms/op 244.88 ms/op 0.81
phase0 processEpoch - mainnet_e58758 338.20 ms/op 329.84 ms/op 1.03
mainnet_e58758 - phase0 beforeProcessEpoch 53.693 ms/op 80.233 ms/op 0.67
mainnet_e58758 - phase0 processJustificationAndFinalization 15.075 us/op 16.256 us/op 0.93
mainnet_e58758 - phase0 processRewardsAndPenalties 26.931 ms/op 38.479 ms/op 0.70
mainnet_e58758 - phase0 processRegistryUpdates 6.4710 us/op 8.7690 us/op 0.74
mainnet_e58758 - phase0 processSlashings 731.00 ns/op 426.00 ns/op 1.72
mainnet_e58758 - phase0 processEth1DataReset 817.00 ns/op 390.00 ns/op 2.09
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.1046 ms/op 1.2618 ms/op 1.67
mainnet_e58758 - phase0 processSlashingsReset 3.0660 us/op 3.5620 us/op 0.86
mainnet_e58758 - phase0 processRandaoMixesReset 3.0670 us/op 5.1310 us/op 0.60
mainnet_e58758 - phase0 processHistoricalRootsUpdate 692.00 ns/op 549.00 ns/op 1.26
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.9220 us/op 3.6370 us/op 0.80
mainnet_e58758 - phase0 afterProcessEpoch 65.156 ms/op 81.595 ms/op 0.80
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0094 ms/op 1.4704 ms/op 0.69
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9537 ms/op 2.9734 ms/op 0.66
altair processInactivityUpdates - 250000 normalcase 14.091 ms/op 18.091 ms/op 0.78
altair processInactivityUpdates - 250000 worstcase 14.573 ms/op 17.260 ms/op 0.84
phase0 processRegistryUpdates - 250000 normalcase 6.0250 us/op 7.1730 us/op 0.84
phase0 processRegistryUpdates - 250000 badcase_full_deposits 327.84 us/op 279.06 us/op 1.17
phase0 processRegistryUpdates - 250000 worstcase 0.5 127.92 ms/op 120.48 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 42.721 ms/op 44.476 ms/op 0.96
altair processRewardsAndPenalties - 250000 worstcase 46.739 ms/op 40.177 ms/op 1.16
phase0 getAttestationDeltas - 250000 normalcase 6.1868 ms/op 7.5387 ms/op 0.82
phase0 getAttestationDeltas - 250000 worstcase 5.8917 ms/op 8.1708 ms/op 0.72
phase0 processSlashings - 250000 worstcase 85.840 us/op 98.246 us/op 0.87
altair processSyncCommitteeUpdates - 250000 100.06 ms/op 125.65 ms/op 0.80
BeaconState.hashTreeRoot - No change 448.00 ns/op 237.00 ns/op 1.89
BeaconState.hashTreeRoot - 1 full validator 79.402 us/op 100.82 us/op 0.79
BeaconState.hashTreeRoot - 32 full validator 1.0329 ms/op 951.40 us/op 1.09
BeaconState.hashTreeRoot - 512 full validator 8.1317 ms/op 8.9813 ms/op 0.91
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 87.383 us/op 115.35 us/op 0.76
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.2550 ms/op 1.7247 ms/op 0.73
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.692 ms/op 18.776 ms/op 1.10
BeaconState.hashTreeRoot - 1 balances 108.99 us/op 83.987 us/op 1.30
BeaconState.hashTreeRoot - 32 balances 1.0394 ms/op 756.36 us/op 1.37
BeaconState.hashTreeRoot - 512 balances 10.145 ms/op 9.2611 ms/op 1.10
BeaconState.hashTreeRoot - 250000 balances 155.42 ms/op 162.77 ms/op 0.95
aggregationBits - 2048 els - zipIndexesInBitList 20.964 us/op 28.181 us/op 0.74
byteArrayEquals 32 46.406 ns/op 55.831 ns/op 0.83
Buffer.compare 32 15.721 ns/op 17.696 ns/op 0.89
byteArrayEquals 1024 1.2609 us/op 1.6022 us/op 0.79
Buffer.compare 1024 23.790 ns/op 25.813 ns/op 0.92
byteArrayEquals 16384 19.987 us/op 25.595 us/op 0.78
Buffer.compare 16384 194.40 ns/op 203.56 ns/op 0.96
byteArrayEquals 123687377 149.58 ms/op 199.51 ms/op 0.75
Buffer.compare 123687377 5.4427 ms/op 8.7140 ms/op 0.62
byteArrayEquals 32 - diff last byte 45.769 ns/op 56.333 ns/op 0.81
Buffer.compare 32 - diff last byte 15.056 ns/op 18.616 ns/op 0.81
byteArrayEquals 1024 - diff last byte 1.2116 us/op 1.6990 us/op 0.71
Buffer.compare 1024 - diff last byte 22.952 ns/op 28.058 ns/op 0.82
byteArrayEquals 16384 - diff last byte 19.395 us/op 27.252 us/op 0.71
Buffer.compare 16384 - diff last byte 158.77 ns/op 215.99 ns/op 0.74
byteArrayEquals 123687377 - diff last byte 145.70 ms/op 203.98 ms/op 0.71
Buffer.compare 123687377 - diff last byte 5.4945 ms/op 8.4067 ms/op 0.65
byteArrayEquals 32 - random bytes 4.7310 ns/op 5.8400 ns/op 0.81
Buffer.compare 32 - random bytes 15.388 ns/op 18.857 ns/op 0.82
byteArrayEquals 1024 - random bytes 4.7350 ns/op 5.5670 ns/op 0.85
Buffer.compare 1024 - random bytes 14.824 ns/op 18.632 ns/op 0.80
byteArrayEquals 16384 - random bytes 4.7180 ns/op 5.6200 ns/op 0.84
Buffer.compare 16384 - random bytes 14.937 ns/op 18.882 ns/op 0.79
byteArrayEquals 123687377 - random bytes 7.4500 ns/op 6.9500 ns/op 1.07
Buffer.compare 123687377 - random bytes 17.600 ns/op 20.540 ns/op 0.86
regular array get 100000 times 29.561 us/op 39.664 us/op 0.75
wrappedArray get 100000 times 29.763 us/op 34.103 us/op 0.87
arrayWithProxy get 100000 times 9.8480 ms/op 14.026 ms/op 0.70
ssz.Root.equals 42.018 ns/op 47.759 ns/op 0.88
byteArrayEquals 43.406 ns/op 47.095 ns/op 0.92
Buffer.compare 9.7360 ns/op 10.870 ns/op 0.90
shuffle list - 16384 els 5.4179 ms/op 6.5438 ms/op 0.83
shuffle list - 250000 els 81.096 ms/op 95.230 ms/op 0.85
processSlot - 1 slots 9.8410 us/op 12.443 us/op 0.79
processSlot - 32 slots 1.8454 ms/op 2.2181 ms/op 0.83
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.150 ms/op 37.315 ms/op 1.00
getCommitteeAssignments - req 1 vs - 250000 vc 1.7976 ms/op 2.2936 ms/op 0.78
getCommitteeAssignments - req 100 vs - 250000 vc 3.5786 ms/op 4.4802 ms/op 0.80
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8049 ms/op 4.7630 ms/op 0.80
findModifiedValidators - 10000 modified validators 243.72 ms/op 256.40 ms/op 0.95
findModifiedValidators - 1000 modified validators 163.07 ms/op 195.55 ms/op 0.83
findModifiedValidators - 100 modified validators 151.37 ms/op 164.30 ms/op 0.92
findModifiedValidators - 10 modified validators 139.81 ms/op 179.34 ms/op 0.78
findModifiedValidators - 1 modified validators 148.39 ms/op 179.08 ms/op 0.83
findModifiedValidators - no difference 135.43 ms/op 215.63 ms/op 0.63
compare ViewDUs 3.0865 s/op 3.5164 s/op 0.88
compare each validator Uint8Array 970.24 ms/op 1.4214 s/op 0.68
compare ViewDU to Uint8Array 825.81 ms/op 1.3078 s/op 0.63
migrate state 1000000 validators, 24 modified, 0 new 836.64 ms/op 927.49 ms/op 0.90
migrate state 1000000 validators, 1700 modified, 1000 new 966.22 ms/op 1.1027 s/op 0.88
migrate state 1000000 validators, 3400 modified, 2000 new 1.2223 s/op 1.2909 s/op 0.95
migrate state 1500000 validators, 24 modified, 0 new 838.08 ms/op 896.39 ms/op 0.93
migrate state 1500000 validators, 1700 modified, 1000 new 1.0414 s/op 1.1315 s/op 0.92
migrate state 1500000 validators, 3400 modified, 2000 new 1.1046 s/op 1.5035 s/op 0.73
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.9500 ns/op 5.3400 ns/op 1.11
state getBlockRootAtSlot - 250000 vs - 7PWei 402.94 ns/op 694.88 ns/op 0.58
computeProposers - vc 250000 5.3403 ms/op 7.9666 ms/op 0.67
computeEpochShuffling - vc 250000 80.017 ms/op 100.35 ms/op 0.80
getNextSyncCommittee - vc 250000 96.894 ms/op 142.51 ms/op 0.68
computeSigningRoot for AttestationData 20.110 us/op 28.736 us/op 0.70
hash AttestationData serialized data then Buffer.toString(base64) 1.1545 us/op 1.6936 us/op 0.68
toHexString serialized data 752.63 ns/op 991.75 ns/op 0.76
Buffer.toString(base64) 142.81 ns/op 216.85 ns/op 0.66
nodejs block root to RootHex using toHex 124.62 ns/op 179.95 ns/op 0.69
nodejs block root to RootHex using toRootHex 78.940 ns/op 105.57 ns/op 0.75
browser block root to RootHex using the deprecated toHexString 212.39 ns/op 259.42 ns/op 0.82
browser block root to RootHex using toHex 169.55 ns/op 200.98 ns/op 0.84
browser block root to RootHex using toRootHex 147.36 ns/op 182.02 ns/op 0.81

by benchmarkbot/action

* Duration given to the builder to provide a `SignedBuilderBid` before the deadline
* is reached, aborting the external builder flow in favor of the local build process.
*/
const BUILDER_PROPOSAL_DELAY_TOLERANCE = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is too tight, 1.5 sec seems more reasonable

Copy link
Member Author

Choose a reason for hiding this comment

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

mev-boost uses a default value of 950ms (slightly lower to account for passing response to CL), this is what all other CLs use and the spec defines

Copy link
Member Author

Choose a reason for hiding this comment

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

as discussed on discord, this is as per spec

@nflaig nflaig merged commit 5adb4ef into unstable Oct 15, 2024
20 checks passed
@nflaig nflaig deleted the nflaig/builder-stricter-timeout branch October 15, 2024 03:50
philknows pushed a commit that referenced this pull request Oct 18, 2024
* fix: enforce strict timeout for builder to provide bid

* Use math.round
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.

4 participants