Skip to content

feat: add produceBlockV4WithBid endpoint - #10072

Draft
nflaig wants to merge 2 commits into
nflaig/extract-produce-gloas-blockfrom
nflaig/produce-block-v4-with-bid
Draft

nflaig wants to merge 2 commits into
nflaig/extract-produce-gloas-blockfrom
nflaig/produce-block-v4-with-bid

Conversation

@nflaig

@nflaig nflaig commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Implements ethereum/beacon-APIs#627. A validator client that selects the execution payload bid itself, from builders it queries directly or from the execution_payload_bid SSE topic, can ask any beacon node to build a block with it. The beacon node only weighs the supplied bid against its local payload, an invalid bid or an active circuit breaker falls back to the local payload.

  • add POST /eth/v4/validator/blocks/{slot}/with_bid, the signed bid as body, builder_boost_factor and include_payload as query params
  • share the gloas block production of produceBlockV4, a supplied bid takes the place of builder API and p2p bids
  • count discarded supplied bids in beacon_block_production_supplied_bids_discarded_total

Builds on #10073.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T20:21:55.013451Z 637d7ec PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 637d7ecec2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

builder_boost_factor: builderBoostFactor.toString(),
include_payload: includePayload,
},
body: ssz.gloas.SignedExecutionPayloadBid.toJson(signedExecutionPayloadBid),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Select the supplied bid codec by fork

When slot is on Heze, these hard-coded Gloas codecs omit or reject Heze's required inclusionListBits field, which is added to SignedExecutionPayloadBid in packages/types/src/heze/sszTypes.ts:43-57. Both the JSON and SSZ request paths therefore cannot transport a valid Heze bid, even though this endpoint accepts every post-Gloas fork and its response codec already dispatches by version. Resolve the fork from the slot or version header and use its SignedExecutionPayloadBid codec for serialization and parsing.

AGENTS.md reference: AGENTS.md:L202-L210

Useful? React with 👍 / 👎.

@nflaig
nflaig force-pushed the nflaig/produce-block-v4-with-bid branch from 637d7ec to f5d3c08 Compare September 12, 2026 20:35
@nflaig
nflaig changed the base branch from unstable to nflaig/extract-produce-gloas-block September 12, 2026 20:35
@nflaig
nflaig marked this pull request as draft September 12, 2026 20:39
@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: ec85a50 Previous: bb3ffba Ratio
send data - 1000 4096B messages 15.386 ms/op 109.47 ms/op 0.14
archive index / 1 slots / 128 columns / legacy 2.3505 ms/op 9.3528 ms/op 0.25
archive index / 8 slots / 8 columns / legacy 795.31 us/op 3.4270 ms/op 0.23
Full benchmark results
Benchmark suite Current: ec85a50 Previous: bb3ffba Ratio
getPubkeys - native cache - req 1000 vs - 250000 vc 406.03 us/op 404.60 us/op 1.00
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.615 us/op 38.338 us/op 1.03
BLS verify - blst 881.93 us/op 868.80 us/op 1.02
BLS verifyMultipleSignatures 3 - blst 1.3869 ms/op 1.3461 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst 2.2299 ms/op 2.2073 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst 7.3145 ms/op 7.2606 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst 14.077 ms/op 13.902 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst 26.783 ms/op 26.605 ms/op 1.01
BLS deserializing 10000 signatures 628.16 ms/op 618.98 ms/op 1.01
BLS deserializing 100000 signatures 6.2795 s/op 6.1813 s/op 1.02
BLS verifyMultipleSignatures - same message - 3 - blst 934.29 us/op 923.89 us/op 1.01
BLS verifyMultipleSignatures - same message - 8 - blst 1.0605 ms/op 1.0469 ms/op 1.01
BLS verifyMultipleSignatures - same message - 32 - blst 1.6638 ms/op 1.6426 ms/op 1.01
BLS verifyMultipleSignatures - same message - 64 - blst 2.4711 ms/op 2.4342 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.0635 ms/op 4.0245 ms/op 1.01
BLS aggregatePubkeys 32 - blst 19.318 us/op 19.021 us/op 1.02
BLS aggregatePubkeys 128 - blst 69.980 us/op 69.151 us/op 1.01
getSlashingsAndExits - default max 38.677 us/op 42.254 us/op 0.92
getSlashingsAndExits - 2k 328.03 us/op 323.69 us/op 1.01
proposeBlockBody type=full, size=empty 681.52 us/op 685.14 us/op 0.99
isKnown best case - 1 super set check 167.00 ns/op 161.00 ns/op 1.04
isKnown normal case - 2 super set checks 166.00 ns/op 164.00 ns/op 1.01
isKnown worse case - 16 super set checks 164.00 ns/op 161.00 ns/op 1.02
validate api signedAggregateAndProof - struct 1.5261 ms/op 1.5189 ms/op 1.00
validate gossip signedAggregateAndProof - struct 1.5268 ms/op 1.5005 ms/op 1.02
batch validate gossip attestation - vc 640000 - chunk 32 121.52 us/op 120.97 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 64 104.17 us/op 102.48 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 93.536 us/op 92.452 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 256 94.732 us/op 92.235 us/op 1.03
bytes32 toHexString 291.00 ns/op 287.00 ns/op 1.01
bytes32 Buffer.toString(hex) 163.00 ns/op 162.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 230.00 ns/op 235.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 165.00 ns/op 162.00 ns/op 1.02
Return object 10000 times 0.21040 ns/op 0.20730 ns/op 1.01
Throw Error 10000 times 3.2985 us/op 3.2639 us/op 1.01
toHex 97.612 ns/op 99.077 ns/op 0.99
Buffer.from 87.682 ns/op 89.053 ns/op 0.98
shared Buffer 59.796 ns/op 59.665 ns/op 1.00
fastMsgIdFn sha256 / 200 bytes 1.4690 us/op 1.4650 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 153.00 ns/op 152.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 200 bytes 204.00 ns/op 199.00 ns/op 1.03
fastMsgIdFn sha256 / 1000 bytes 4.6980 us/op 4.6790 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 245.00 ns/op 237.00 ns/op 1.03
fastMsgIdFn h64 xxhash / 1000 bytes 250.00 ns/op 245.00 ns/op 1.02
fastMsgIdFn sha256 / 10000 bytes 41.408 us/op 40.973 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.2570 us/op 1.2350 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 820.00 ns/op 805.00 ns/op 1.02
send data - 1000 256B messages 3.8356 ms/op 3.8427 ms/op 1.00
send data - 1000 512B messages 4.9983 ms/op 4.6353 ms/op 1.08
send data - 1000 1024B messages 5.1480 ms/op 5.1933 ms/op 0.99
send data - 1000 1200B messages 5.7817 ms/op 5.8873 ms/op 0.98
send data - 1000 2048B messages 12.396 ms/op 11.221 ms/op 1.10
send data - 1000 4096B messages 15.386 ms/op 109.47 ms/op 0.14
send data - 1000 16384B messages 525.19 ms/op 438.25 ms/op 1.20
send data - 1000 65536B messages 1.9203 s/op 1.6538 s/op 1.16
enrSubnets - fastDeserialize 64 bits 755.00 ns/op 741.00 ns/op 1.02
enrSubnets - ssz BitVector 64 bits 277.00 ns/op 275.00 ns/op 1.01
enrSubnets - fastDeserialize 4 bits 100.00 ns/op 103.00 ns/op 0.97
enrSubnets - ssz BitVector 4 bits 271.00 ns/op 272.00 ns/op 1.00
prioritizePeers score -10:0 att 32-0.1 sync 2-0 203.94 us/op 201.37 us/op 1.01
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 227.19 us/op 228.38 us/op 0.99
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 328.78 us/op 325.48 us/op 1.01
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 580.22 us/op 591.87 us/op 0.98
prioritizePeers score 0:0 att 64-1 sync 4-1 678.84 us/op 674.32 us/op 1.01
archive index / 1 slot / archive root index lookup 16.340 us/op 17.815 us/op 0.92
archive index / 1 slot / archive block lookup, decode and hash 2.6835 ms/op 2.6807 ms/op 1.00
archive index / 1 slots / 1 columns / legacy 21.405 us/op 19.732 us/op 1.08
archive index / 1 slots / 1 columns / flat files 142.85 us/op 138.72 us/op 1.03
archive index / 1 slots / 8 columns / legacy 79.615 us/op 80.418 us/op 0.99
archive index / 1 slots / 8 columns / flat files 357.48 us/op 330.96 us/op 1.08
archive index / 1 slots / 128 columns / legacy 2.3505 ms/op 9.3528 ms/op 0.25
archive index / 1 slots / 128 columns / flat files 4.2530 ms/op 4.1255 ms/op 1.03
archive index / 8 slots / 1 columns / legacy 179.09 us/op 162.10 us/op 1.10
archive index / 8 slots / 1 columns / flat files 1.0224 ms/op 987.30 us/op 1.04
archive index / 8 slots / 8 columns / legacy 795.31 us/op 3.4270 ms/op 0.23
archive index / 8 slots / 8 columns / flat files 2.9067 ms/op 3.3520 ms/op 0.87
archive index / 8 slots / 128 columns / legacy 79.394 ms/op 61.071 ms/op 1.30
archive index / 8 slots / 128 columns / flat files 187.63 ms/op 189.43 ms/op 0.99
head state / 1 slot / archive root index lookup 17.457 us/op 15.303 us/op 1.14
head state / 1 slot / archive block lookup, decode and hash 2.7610 ms/op 2.6850 ms/op 1.03
head state / 1 slots / 1 columns / legacy 22.249 us/op 20.716 us/op 1.07
head state / 1 slots / 1 columns / flat files 130.00 us/op 126.18 us/op 1.03
head state / 1 slots / 8 columns / legacy 75.012 us/op 72.515 us/op 1.03
head state / 1 slots / 8 columns / flat files 353.32 us/op 312.56 us/op 1.13
head state / 1 slots / 128 columns / legacy 12.468 ms/op 9.4878 ms/op 1.31
head state / 1 slots / 128 columns / flat files 4.4013 ms/op 4.2075 ms/op 1.05
head state / 8 slots / 1 columns / legacy 175.21 us/op 168.59 us/op 1.04
head state / 8 slots / 1 columns / flat files 977.25 us/op 911.45 us/op 1.07
head state / 8 slots / 8 columns / legacy 1.0450 ms/op 783.82 us/op 1.33
head state / 8 slots / 8 columns / flat files 2.8828 ms/op 2.8238 ms/op 1.02
head state / 8 slots / 128 columns / legacy 84.571 ms/op 66.117 ms/op 1.28
head state / 8 slots / 128 columns / flat files 217.58 ms/op 201.15 ms/op 1.08
array of 16000 items push then shift 1.2966 us/op 1.2810 us/op 1.01
LinkedList of 16000 items push then shift 6.8420 ns/op 6.5780 ns/op 1.04
array of 16000 items push then pop 80.681 ns/op 76.697 ns/op 1.05
LinkedList of 16000 items push then pop 5.9710 ns/op 5.8900 ns/op 1.01
array of 24000 items push then shift 1.9232 us/op 1.8909 us/op 1.02
LinkedList of 24000 items push then shift 6.3110 ns/op 6.2050 ns/op 1.02
array of 24000 items push then pop 114.39 ns/op 105.33 ns/op 1.09
LinkedList of 24000 items push then pop 5.9570 ns/op 5.8790 ns/op 1.01
intersect bitArray bitLen 8 3.8720 ns/op 3.9110 ns/op 0.99
intersect array and set length 8 29.446 ns/op 30.523 ns/op 0.96
intersect bitArray bitLen 128 23.222 ns/op 22.869 ns/op 1.02
intersect array and set length 128 517.16 ns/op 500.48 ns/op 1.03
bitArray.getTrueBitIndexes() bitLen 128 925.00 ns/op 908.00 ns/op 1.02
bitArray.getTrueBitIndexes() bitLen 248 1.6860 us/op 1.6470 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 512 3.5230 us/op 3.4080 us/op 1.03
Full columns - reconstruct all 6 blobs 151.99 us/op 154.62 us/op 0.98
Full columns - reconstruct half of the blobs out of 6 73.147 us/op 67.438 us/op 1.08
Full columns - reconstruct single blob out of 6 32.507 us/op 35.018 us/op 0.93
Half columns - reconstruct all 6 blobs 394.97 ms/op 374.03 ms/op 1.06
Half columns - reconstruct half of the blobs out of 6 198.66 ms/op 185.49 ms/op 1.07
Half columns - reconstruct single blob out of 6 70.048 ms/op 65.792 ms/op 1.06
Set add up to 64 items then delete first 1.6755 us/op 1.6586 us/op 1.01
OrderedSet add up to 64 items then delete first 2.5206 us/op 2.5090 us/op 1.00
Set add up to 64 items then delete last 2.0281 us/op 1.8877 us/op 1.07
OrderedSet add up to 64 items then delete last 2.8499 us/op 2.7588 us/op 1.03
Set add up to 64 items then delete middle 2.0329 us/op 1.8851 us/op 1.08
OrderedSet add up to 64 items then delete middle 4.3048 us/op 4.2009 us/op 1.02
Set add up to 128 items then delete first 3.8760 us/op 3.8014 us/op 1.02
OrderedSet add up to 128 items then delete first 5.8378 us/op 5.6191 us/op 1.04
Set add up to 128 items then delete last 3.7162 us/op 3.6088 us/op 1.03
OrderedSet add up to 128 items then delete last 5.4409 us/op 5.4227 us/op 1.00
Set add up to 128 items then delete middle 3.7999 us/op 3.6786 us/op 1.03
OrderedSet add up to 128 items then delete middle 11.130 us/op 11.018 us/op 1.01
Set add up to 256 items then delete first 7.8544 us/op 7.4556 us/op 1.05
OrderedSet add up to 256 items then delete first 11.975 us/op 11.490 us/op 1.04
Set add up to 256 items then delete last 7.4251 us/op 7.1881 us/op 1.03
OrderedSet add up to 256 items then delete last 11.410 us/op 10.867 us/op 1.05
Set add up to 256 items then delete middle 7.3654 us/op 7.1040 us/op 1.04
OrderedSet add up to 256 items then delete middle 35.548 us/op 33.613 us/op 1.06
runFastConfirmationRules vc:100000 bc:96 eq:0 6.2859 ms/op 4.7691 ms/op 1.32
runFastConfirmationRules vc:600000 bc:96 eq:0 34.272 ms/op 33.299 ms/op 1.03
runFastConfirmationRules vc:1000000 bc:96 eq:0 57.227 ms/op 55.644 ms/op 1.03
runFastConfirmationRules vc:600000 bc:320 eq:0 34.470 ms/op 33.458 ms/op 1.03
runFastConfirmationRules vc:100000 bc:96 eq:1000 1.1323 s/op 1.1061 s/op 1.02
pass gossip attestations to forkchoice per slot 2.6018 ms/op 2.5273 ms/op 1.03
forkChoice updateHead vc 100000 bc 64 eq 0 439.35 us/op 448.62 us/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 0 2.5869 ms/op 2.6154 ms/op 0.99
forkChoice updateHead vc 1000000 bc 64 eq 0 4.4888 ms/op 4.4396 ms/op 1.01
forkChoice updateHead vc 600000 bc 320 eq 0 2.7726 ms/op 2.6438 ms/op 1.05
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7458 ms/op 2.6833 ms/op 1.02
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1170 ms/op 3.1572 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 1000 2.6126 ms/op 2.8017 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 10000 2.7735 ms/op 2.8239 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 300000 7.1121 ms/op 7.0370 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 0 gloas boosted 2.6283 ms/op 2.5920 ms/op 1.01
computeDeltas 1400000 validators 0% inactive 13.731 ms/op 13.628 ms/op 1.01
computeDeltas 1400000 validators 10% inactive 12.731 ms/op 12.890 ms/op 0.99
computeDeltas 1400000 validators 20% inactive 12.077 ms/op 11.744 ms/op 1.03
computeDeltas 1400000 validators 50% inactive 9.8242 ms/op 9.3084 ms/op 1.06
computeDeltas 2100000 validators 0% inactive 20.235 ms/op 20.131 ms/op 1.01
computeDeltas 2100000 validators 10% inactive 19.214 ms/op 18.643 ms/op 1.03
computeDeltas 2100000 validators 20% inactive 17.983 ms/op 17.598 ms/op 1.02
computeDeltas 2100000 validators 50% inactive 14.810 ms/op 14.370 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 1.5597 ms/op 1.5644 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei worstcase 2.3846 ms/op 2.3696 ms/op 1.01
altair processAttestation - setStatus - 1/6 committees join 102.26 us/op 102.38 us/op 1.00
altair processAttestation - setStatus - 1/3 committees join 197.50 us/op 202.25 us/op 0.98
altair processAttestation - setStatus - 1/2 committees join 284.99 us/op 277.85 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 370.49 us/op 365.46 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 519.11 us/op 519.77 us/op 1.00
altair processAttestation - setStatus - 100% committees join 607.30 us/op 597.71 us/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase 3.4651 ms/op 3.2209 ms/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 19.845 ms/op 19.458 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase 22.733 ms/op 22.074 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 50.000 ms/op 45.288 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei normalcase 1.2764 ms/op 1.2631 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei worstcase 19.467 ms/op 19.119 ms/op 1.02
altair processEth1Data - 250000 vs - 7PWei normalcase 301.93 us/op 305.04 us/op 0.99
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.2890 us/op 3.2590 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 21.191 us/op 20.932 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.9440 us/op 5.7640 us/op 1.03
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.7860 us/op 3.7340 us/op 1.01
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 101.39 us/op 101.76 us/op 1.00
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.4151 ms/op 1.3934 ms/op 1.02
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8548 ms/op 1.8338 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8612 ms/op 1.8182 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6622 ms/op 3.2433 ms/op 1.13
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.1633 ms/op 2.0668 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0098 ms/op 3.5791 ms/op 1.12
Tree 40 250000 create 314.59 ms/op 313.73 ms/op 1.00
Tree 40 250000 get(125000) 102.93 ns/op 98.369 ns/op 1.05
Tree 40 250000 set(125000) 1.0755 us/op 1.0588 us/op 1.02
Tree 40 250000 toArray() 9.8830 ms/op 9.8264 ms/op 1.01
Tree 40 250000 iterate all - toArray() + loop 9.7950 ms/op 9.7966 ms/op 1.00
Tree 40 250000 iterate all - get(i) 35.033 ms/op 33.777 ms/op 1.04
Array 250000 create 2.3218 ms/op 2.2750 ms/op 1.02
Array 250000 clone - spread 757.47 us/op 741.45 us/op 1.02
Array 250000 get(125000) 0.29100 ns/op 0.29200 ns/op 1.00
Array 250000 set(125000) 0.29400 ns/op 0.29400 ns/op 1.00
Array 250000 iterate all - loop 56.168 us/op 55.414 us/op 1.01
phase0 afterProcessEpoch - 250000 vs - 7PWei 59.829 ms/op 37.654 ms/op 1.59
Array.fill - length 1000000 4.1746 ms/op 4.1269 ms/op 1.01
Array push - length 1000000 13.664 ms/op 13.070 ms/op 1.05
Array.get 0.20327 ns/op 0.19695 ns/op 1.03
Uint8Array.get 0.27022 ns/op 0.24937 ns/op 1.08
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.563 ms/op 11.984 ms/op 1.13
altair processEpoch - mainnet_e81889 193.83 ms/op 188.55 ms/op 1.03
mainnet_e81889 - altair beforeProcessEpoch 46.369 ms/op 45.030 ms/op 1.03
mainnet_e81889 - altair processJustificationAndFinalization 4.3200 us/op 4.3020 us/op 1.00
mainnet_e81889 - altair processInactivityUpdates 3.5492 ms/op 3.5244 ms/op 1.01
mainnet_e81889 - altair processRewardsAndPenalties 16.937 ms/op 16.645 ms/op 1.02
mainnet_e81889 - altair processRegistryUpdates 558.00 ns/op 552.00 ns/op 1.01
mainnet_e81889 - altair processSlashings 139.00 ns/op 143.00 ns/op 0.97
mainnet_e81889 - altair processEth1DataReset 135.00 ns/op 136.00 ns/op 0.99
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6752 ms/op 1.6693 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 671.00 ns/op 665.00 ns/op 1.01
mainnet_e81889 - altair processRandaoMixesReset 858.00 ns/op 844.00 ns/op 1.02
mainnet_e81889 - altair processHistoricalRootsUpdate 138.00 ns/op 141.00 ns/op 0.98
mainnet_e81889 - altair processParticipationFlagUpdates 437.00 ns/op 429.00 ns/op 1.02
mainnet_e81889 - altair processSyncCommitteeUpdates 109.00 ns/op 111.00 ns/op 0.98
mainnet_e81889 - altair afterProcessEpoch 40.608 ms/op 39.367 ms/op 1.03
capella processEpoch - mainnet_e217614 653.11 ms/op 596.06 ms/op 1.10
mainnet_e217614 - capella beforeProcessEpoch 64.510 ms/op 58.779 ms/op 1.10
mainnet_e217614 - capella processJustificationAndFinalization 4.5100 us/op 4.3850 us/op 1.03
mainnet_e217614 - capella processInactivityUpdates 10.993 ms/op 11.476 ms/op 0.96
mainnet_e217614 - capella processRewardsAndPenalties 91.873 ms/op 91.887 ms/op 1.00
mainnet_e217614 - capella processRegistryUpdates 4.5850 us/op 4.3380 us/op 1.06
mainnet_e217614 - capella processSlashings 136.00 ns/op 146.00 ns/op 0.93
mainnet_e217614 - capella processEth1DataReset 134.00 ns/op 145.00 ns/op 0.92
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.9818 ms/op 5.3947 ms/op 1.11
mainnet_e217614 - capella processSlashingsReset 667.00 ns/op 665.00 ns/op 1.00
mainnet_e217614 - capella processRandaoMixesReset 901.00 ns/op 892.00 ns/op 1.01
mainnet_e217614 - capella processHistoricalRootsUpdate 135.00 ns/op 146.00 ns/op 0.92
mainnet_e217614 - capella processParticipationFlagUpdates 447.00 ns/op 434.00 ns/op 1.03
mainnet_e217614 - capella afterProcessEpoch 108.51 ms/op 107.03 ms/op 1.01
phase0 processEpoch - mainnet_e58758 195.06 ms/op 183.63 ms/op 1.06
mainnet_e58758 - phase0 beforeProcessEpoch 41.331 ms/op 37.588 ms/op 1.10
mainnet_e58758 - phase0 processJustificationAndFinalization 4.5070 us/op 4.4300 us/op 1.02
mainnet_e58758 - phase0 processRewardsAndPenalties 15.583 ms/op 15.619 ms/op 1.00
mainnet_e58758 - phase0 processRegistryUpdates 2.2370 us/op 2.2140 us/op 1.01
mainnet_e58758 - phase0 processSlashings 137.00 ns/op 146.00 ns/op 0.94
mainnet_e58758 - phase0 processEth1DataReset 135.00 ns/op 139.00 ns/op 0.97
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 866.95 us/op 847.30 us/op 1.02
mainnet_e58758 - phase0 processSlashingsReset 814.00 ns/op 792.00 ns/op 1.03
mainnet_e58758 - phase0 processRandaoMixesReset 914.00 ns/op 903.00 ns/op 1.01
mainnet_e58758 - phase0 processHistoricalRootsUpdate 136.00 ns/op 144.00 ns/op 0.94
mainnet_e58758 - phase0 processParticipationRecordUpdates 947.00 ns/op 903.00 ns/op 1.05
mainnet_e58758 - phase0 afterProcessEpoch 55.531 ms/op 32.435 ms/op 1.71
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1078 ms/op 991.79 us/op 1.12
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7708 ms/op 1.5977 ms/op 1.11
gloas processInactivityUpdates - 250000 inactivity leak all eligible missed target 9.6172 ms/op 8.9231 ms/op 1.08
phase0 processRegistryUpdates - 250000 normalcase 2.5670 us/op 2.8020 us/op 0.92
phase0 processRegistryUpdates - 250000 badcase_full_deposits 149.56 us/op 154.87 us/op 0.97
phase0 processRegistryUpdates - 250000 worstcase 0.5 70.975 ms/op 47.268 ms/op 1.50
altair processRewardsAndPenalties - 250000 normalcase 14.980 ms/op 13.706 ms/op 1.09
altair processRewardsAndPenalties - 250000 worstcase 15.332 ms/op 13.394 ms/op 1.14
phase0 getAttestationDeltas - 250000 normalcase 5.6985 ms/op 5.4131 ms/op 1.05
phase0 getAttestationDeltas - 250000 worstcase 5.7517 ms/op 5.4763 ms/op 1.05
phase0 processSlashings - 250000 worstcase 62.230 us/op 73.347 us/op 0.85
altair processSyncCommitteeUpdates - 250000 10.008 ms/op 9.6447 ms/op 1.04
BeaconState.hashTreeRoot - No change 175.00 ns/op 174.00 ns/op 1.01
BeaconState.hashTreeRoot - 1 full validator 66.729 us/op 57.819 us/op 1.15
BeaconState.hashTreeRoot - 32 full validator 739.27 us/op 628.70 us/op 1.18
BeaconState.hashTreeRoot - 512 full validator 6.6404 ms/op 6.3450 ms/op 1.05
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 74.121 us/op 71.427 us/op 1.04
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1539 ms/op 1.0509 ms/op 1.10
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.790 ms/op 13.527 ms/op 1.02
BeaconState.hashTreeRoot - 1 balances 57.438 us/op 56.064 us/op 1.02
BeaconState.hashTreeRoot - 32 balances 578.07 us/op 550.95 us/op 1.05
BeaconState.hashTreeRoot - 512 balances 4.7356 ms/op 4.9010 ms/op 0.97
BeaconState.hashTreeRoot - 250000 balances 102.78 ms/op 103.89 ms/op 0.99
aggregationBits - 2048 els - zipIndexesInBitList 19.895 us/op 18.930 us/op 1.05
regular array get 100000 times 23.403 us/op 22.265 us/op 1.05
wrappedArray get 100000 times 23.211 us/op 22.265 us/op 1.04
arrayWithProxy get 100000 times 10.116 ms/op 10.188 ms/op 0.99
ssz.Root.equals 21.672 ns/op 21.096 ns/op 1.03
byteArrayEquals 21.301 ns/op 20.871 ns/op 1.02
Buffer.compare 8.8720 ns/op 8.7580 ns/op 1.01
processSlot - 1 slots 10.096 us/op 8.0610 us/op 1.25
processSlot - 32 slots 1.9480 ms/op 1.5882 ms/op 1.23
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.3991 ms/op 2.2563 ms/op 1.95
getCommitteeAssignments - req 1 vs - 250000 vc 1.6724 ms/op 1.6512 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 3.3871 ms/op 3.3469 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6614 ms/op 3.6143 ms/op 1.01
findModifiedValidators - 10000 modified validators 882.68 ms/op 766.59 ms/op 1.15
findModifiedValidators - 1000 modified validators 587.16 ms/op 696.77 ms/op 0.84
findModifiedValidators - 100 modified validators 472.68 ms/op 332.74 ms/op 1.42
findModifiedValidators - 10 modified validators 317.42 ms/op 254.36 ms/op 1.25
findModifiedValidators - 1 modified validators 230.29 ms/op 272.36 ms/op 0.85
findModifiedValidators - no difference 213.75 ms/op 202.04 ms/op 1.06
migrate state 1500000 validators, 3400 modified, 2000 new 2.8620 s/op 2.7128 s/op 1.06
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.4400 ns/op 3.6600 ns/op 0.94
state getBlockRootAtSlot - 250000 vs - 7PWei 285.52 ns/op 291.90 ns/op 0.98
computeProposerIndex 100000 validators 1.3560 ms/op 1.3591 ms/op 1.00
getNextSyncCommitteeIndices 1000 validators 2.8651 ms/op 2.8427 ms/op 1.01
getNextSyncCommitteeIndices 10000 validators 25.737 ms/op 25.674 ms/op 1.00
getNextSyncCommitteeIndices 100000 validators 87.127 ms/op 87.105 ms/op 1.00
computeProposers - vc 250000 587.91 us/op 572.83 us/op 1.03
computeEpochShuffling - vc 250000 39.184 ms/op 39.045 ms/op 1.00
getNextSyncCommittee - vc 250000 9.4156 ms/op 9.4334 ms/op 1.00
nodejs block root to RootHex using toHex 106.42 ns/op 98.305 ns/op 1.08
nodejs block root to RootHex using toRootHex 66.043 ns/op 63.475 ns/op 1.04
nodejs fromHex(blob) 982.14 us/op 961.86 us/op 1.02
nodejs fromHexInto(blob) 652.38 us/op 658.17 us/op 0.99
nodejs block root to RootHex using the deprecated toHexString 644.81 ns/op 630.55 ns/op 1.02
nodejs byteArrayEquals 32 bytes (block root) 26.393 ns/op 26.047 ns/op 1.01
nodejs byteArrayEquals 48 bytes (pubkey) 38.024 ns/op 37.136 ns/op 1.02
nodejs byteArrayEquals 96 bytes (signature) 36.445 ns/op 37.403 ns/op 0.97
nodejs byteArrayEquals 1024 bytes 42.467 ns/op 44.944 ns/op 0.94
nodejs byteArrayEquals 131072 bytes (blob) 1.7895 us/op 1.7565 us/op 1.02
browser block root to RootHex using toHex 147.10 ns/op 143.86 ns/op 1.02
browser block root to RootHex using toRootHex 132.56 ns/op 128.74 ns/op 1.03
browser fromHex(blob) 1.7720 ms/op 1.7926 ms/op 0.99
browser fromHexInto(blob) 659.98 us/op 656.31 us/op 1.01
browser block root to RootHex using the deprecated toHexString 455.81 ns/op 412.96 ns/op 1.10
browser byteArrayEquals 32 bytes (block root) 27.545 ns/op 27.409 ns/op 1.00
browser byteArrayEquals 48 bytes (pubkey) 38.858 ns/op 38.645 ns/op 1.01
browser byteArrayEquals 96 bytes (signature) 72.618 ns/op 72.648 ns/op 1.00
browser byteArrayEquals 1024 bytes 738.91 ns/op 734.74 ns/op 1.01
browser byteArrayEquals 131072 bytes (blob) 93.349 us/op 93.287 us/op 1.00

by benchmarkbot/action

**Motivation**

When a supplied bid fails validation, `produceBlockV4WithBid` falls back
exclusively to local payload production, even if a matching P2P bid is
available. A slow local build can therefore delay the proposal
unnecessarily.

In one case observed on plataberget, a produceBlockV4WithBid request
arrived 603 ms into the slot and took 3.483 seconds to return a local
block due to a slow Engine getPayloadV6 API call, resulting in an
orphaned block. A matching P2P bid was already available. If its beacon
block had been ready by the existing two-second slot cutoff, this
fallback could have returned after approximately 1.397 seconds, about
2.086 seconds sooner.

**Description**

Consider the best matching P2P bid immediately after a supplied bid
fails validation, while local payload production continues in parallel.
Apply the existing minimum bid and boost rules to select between the two
blocks. A ready P2P block can be returned at the existing cutoff without
waiting for slow local production.

Valid supplied bids and builder circuit-breaker behavior remain
unchanged.

Add tests covering parent matching, local payload preference, immediate
fallback, and returning a P2P block while local production is pending.

Validation: all 46 targeted block-production tests pass, along with
lint, beacon-node type-checking, and the build.

**AI Assistance Disclosure**

- [x] External Contributors: I have read the [contributor
guidelines](https://github.com/ChainSafe/lodestar/blob/unstable/CONTRIBUTING.md#ai-assistance-notice)
and disclosed my usage of AI below.

This PR was written primarily by OpenAI Codex - GPT-6, including the
implementation and tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants