Skip to content

feat: check gas limit consistency with the target#9391

Merged
twoeths merged 10 commits into
unstablefrom
cayman/spec-5236
May 21, 2026
Merged

feat: check gas limit consistency with the target#9391
twoeths merged 10 commits into
unstablefrom
cayman/spec-5236

Conversation

@wemeetagain

Copy link
Copy Markdown
Member

Motivation

  • alpha.8 spec

Description

AI Assistance Disclosure

  • codex

@wemeetagain wemeetagain requested a review from a team as a code owner May 20, 2026 19:21
@wemeetagain wemeetagain changed the title Cayman/spec 5236 feat: check gas limit consistency with the target May 20, 2026

@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: 34ec0f97aa

ℹ️ 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".

// payload sits behind that (EMPTY-parent chains, sibling forks) get IGNORED and will
// re-enter the validator as the head catches up.
// TODO GLOAS: drop this guard once fork choice tracks executed-payload gas_limit by hash.
if (!byteArrayEquals(bid.parentBlockHash, state.latestExecutionPayloadBid.blockHash)) {

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 Check parent hash against executed payload, not latest bid

This guard uses state.latestExecutionPayloadBid.blockHash, but in Gloas that field can diverge from the latest executed EL payload hash after EMPTY-parent transitions (processParentExecutionPayload leaves state.latestBlockHash unchanged while processExecutionPayloadBid still updates latestExecutionPayloadBid). In that state, spec-valid bids with parent_block_hash == state.latestBlockHash are incorrectly IGNORED, and bids pointing to a non-executed bid hash can pass this check. This can cause the node to drop valid gossip bids and accept invalid parent references until head/state alignment changes.

Useful? React with 👍 / 👎.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request implements the is_gas_limit_target_compatible check and the UNKNOWN_PARENT_BLOCK_HASH error for execution payload bid validation in the Gloas fork. It also relocates the getExpectedGasLimit utility to the state-transition package for better accessibility. Feedback was provided to ensure targetGasLimit is explicitly converted to a number for type safety and consistency with other parts of the codebase.

const bidGasLimit = Number(bid.gasLimit);
if (bidGasLimit !== proposerPreferences.message.targetGasLimit) {
const parentGasLimit = Number(state.latestExecutionPayloadBid.gasLimit);
const targetGasLimit = proposerPreferences.message.targetGasLimit;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The targetGasLimit from proposerPreferences.message is likely a bigint (representing a uint64 in the spec). Since isGasLimitTargetCompatible expects a number, it is safer and more consistent with other parts of the codebase (e.g., produceBlockBody.ts) to explicitly convert it using Number().

Suggested change
const targetGasLimit = proposerPreferences.message.targetGasLimit;
const targetGasLimit = Number(proposerPreferences.message.targetGasLimit);

@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d01d8aa Previous: 6ef8199 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.2136 ms/op 843.35 us/op 1.44
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.644 us/op 38.309 us/op 1.03
BLS verify - blst 697.67 us/op 710.87 us/op 0.98
BLS verifyMultipleSignatures 3 - blst 1.3753 ms/op 1.3137 ms/op 1.05
BLS verifyMultipleSignatures 8 - blst 2.1782 ms/op 2.0513 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst 7.0253 ms/op 6.5744 ms/op 1.07
BLS verifyMultipleSignatures 64 - blst 13.399 ms/op 12.839 ms/op 1.04
BLS verifyMultipleSignatures 128 - blst 26.518 ms/op 24.774 ms/op 1.07
BLS deserializing 10000 signatures 642.26 ms/op 622.63 ms/op 1.03
BLS deserializing 100000 signatures 6.4080 s/op 6.1969 s/op 1.03
BLS verifyMultipleSignatures - same message - 3 - blst 706.64 us/op 797.64 us/op 0.89
BLS verifyMultipleSignatures - same message - 8 - blst 953.55 us/op 930.05 us/op 1.03
BLS verifyMultipleSignatures - same message - 32 - blst 1.5338 ms/op 1.5066 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst 2.4718 ms/op 2.3501 ms/op 1.05
BLS verifyMultipleSignatures - same message - 128 - blst 4.1419 ms/op 3.9782 ms/op 1.04
BLS aggregatePubkeys 32 - blst 18.062 us/op 17.546 us/op 1.03
BLS aggregatePubkeys 128 - blst 64.103 us/op 63.394 us/op 1.01
getSlashingsAndExits - default max 54.178 us/op 45.581 us/op 1.19
getSlashingsAndExits - 2k 440.56 us/op 340.53 us/op 1.29
proposeBlockBody type=full, size=empty 1.3063 ms/op 662.93 us/op 1.97
isKnown best case - 1 super set check 191.00 ns/op 160.00 ns/op 1.19
isKnown normal case - 2 super set checks 161.00 ns/op 160.00 ns/op 1.01
isKnown worse case - 16 super set checks 159.00 ns/op 158.00 ns/op 1.01
validate api signedAggregateAndProof - struct 1.5159 ms/op 1.4537 ms/op 1.04
validate gossip signedAggregateAndProof - struct 1.5164 ms/op 1.4530 ms/op 1.04
batch validate gossip attestation - vc 640000 - chunk 32 107.82 us/op 104.05 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 64 93.952 us/op 91.086 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 128 87.303 us/op 84.206 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 256 81.871 us/op 81.756 us/op 1.00
bytes32 toHexString 270.00 ns/op 287.00 ns/op 0.94
bytes32 Buffer.toString(hex) 158.00 ns/op 171.00 ns/op 0.92
bytes32 Buffer.toString(hex) from Uint8Array 226.00 ns/op 235.00 ns/op 0.96
bytes32 Buffer.toString(hex) + 0x 158.00 ns/op 175.00 ns/op 0.90
Return object 10000 times 0.20470 ns/op 0.20720 ns/op 0.99
Throw Error 10000 times 3.5340 us/op 3.2702 us/op 1.08
toHex 96.457 ns/op 88.580 ns/op 1.09
Buffer.from 89.041 ns/op 81.843 ns/op 1.09
shared Buffer 60.519 ns/op 53.652 ns/op 1.13
fastMsgIdFn sha256 / 200 bytes 1.5090 us/op 1.4260 us/op 1.06
fastMsgIdFn h32 xxhash / 200 bytes 157.00 ns/op 152.00 ns/op 1.03
fastMsgIdFn h64 xxhash / 200 bytes 211.00 ns/op 205.00 ns/op 1.03
fastMsgIdFn sha256 / 1000 bytes 4.8500 us/op 4.5830 us/op 1.06
fastMsgIdFn h32 xxhash / 1000 bytes 246.00 ns/op 235.00 ns/op 1.05
fastMsgIdFn h64 xxhash / 1000 bytes 260.00 ns/op 247.00 ns/op 1.05
fastMsgIdFn sha256 / 10000 bytes 42.880 us/op 40.409 us/op 1.06
fastMsgIdFn h32 xxhash / 10000 bytes 1.3010 us/op 1.2090 us/op 1.08
fastMsgIdFn h64 xxhash / 10000 bytes 844.00 ns/op 775.00 ns/op 1.09
send data - 1000 256B messages 4.3786 ms/op 4.3022 ms/op 1.02
send data - 1000 512B messages 4.9004 ms/op 4.3743 ms/op 1.12
send data - 1000 1024B messages 4.7576 ms/op 4.5772 ms/op 1.04
send data - 1000 1200B messages 5.1745 ms/op 4.7144 ms/op 1.10
send data - 1000 2048B messages 6.0900 ms/op 5.0084 ms/op 1.22
send data - 1000 4096B messages 5.7985 ms/op 5.6369 ms/op 1.03
send data - 1000 16384B messages 15.058 ms/op 25.358 ms/op 0.59
send data - 1000 65536B messages 156.49 ms/op 186.35 ms/op 0.84
enrSubnets - fastDeserialize 64 bits 727.00 ns/op 735.00 ns/op 0.99
enrSubnets - ssz BitVector 64 bits 258.00 ns/op 267.00 ns/op 0.97
enrSubnets - fastDeserialize 4 bits 97.000 ns/op 97.000 ns/op 1.00
enrSubnets - ssz BitVector 4 bits 261.00 ns/op 270.00 ns/op 0.97
prioritizePeers score -10:0 att 32-0.1 sync 2-0 208.94 us/op 197.55 us/op 1.06
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 256.29 us/op 242.14 us/op 1.06
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 349.20 us/op 332.46 us/op 1.05
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 606.15 us/op 590.01 us/op 1.03
prioritizePeers score 0:0 att 64-1 sync 4-1 698.69 us/op 686.13 us/op 1.02
array of 16000 items push then shift 1.2278 us/op 1.2082 us/op 1.02
LinkedList of 16000 items push then shift 8.1320 ns/op 7.3040 ns/op 1.11
array of 16000 items push then pop 72.377 ns/op 66.068 ns/op 1.10
LinkedList of 16000 items push then pop 5.7490 ns/op 5.7850 ns/op 0.99
array of 24000 items push then shift 1.7834 us/op 1.7887 us/op 1.00
LinkedList of 24000 items push then shift 7.6110 ns/op 7.0620 ns/op 1.08
array of 24000 items push then pop 102.20 ns/op 91.844 ns/op 1.11
LinkedList of 24000 items push then pop 5.8850 ns/op 5.8660 ns/op 1.00
intersect bitArray bitLen 8 4.5770 ns/op 4.6120 ns/op 0.99
intersect array and set length 8 28.126 ns/op 28.187 ns/op 1.00
intersect bitArray bitLen 128 23.020 ns/op 23.124 ns/op 1.00
intersect array and set length 128 479.54 ns/op 475.42 ns/op 1.01
bitArray.getTrueBitIndexes() bitLen 128 1.0040 us/op 985.00 ns/op 1.02
bitArray.getTrueBitIndexes() bitLen 248 1.7630 us/op 1.6810 us/op 1.05
bitArray.getTrueBitIndexes() bitLen 512 3.6510 us/op 3.4500 us/op 1.06
Full columns - reconstruct all 6 blobs 129.23 us/op 123.11 us/op 1.05
Full columns - reconstruct half of the blobs out of 6 72.059 us/op 84.167 us/op 0.86
Full columns - reconstruct single blob out of 6 33.284 us/op 31.725 us/op 1.05
Half columns - reconstruct all 6 blobs 384.81 ms/op 372.66 ms/op 1.03
Half columns - reconstruct half of the blobs out of 6 192.80 ms/op 187.62 ms/op 1.03
Half columns - reconstruct single blob out of 6 69.652 ms/op 66.743 ms/op 1.04
Full columns - reconstruct all 10 blobs 208.52 us/op 266.81 us/op 0.78
Full columns - reconstruct half of the blobs out of 10 221.89 us/op 126.23 us/op 1.76
Full columns - reconstruct single blob out of 10 32.668 us/op 42.855 us/op 0.76
Half columns - reconstruct all 10 blobs 638.66 ms/op 618.64 ms/op 1.03
Half columns - reconstruct half of the blobs out of 10 321.40 ms/op 309.99 ms/op 1.04
Half columns - reconstruct single blob out of 10 69.439 ms/op 66.625 ms/op 1.04
Full columns - reconstruct all 20 blobs 1.5582 ms/op 1.5943 ms/op 0.98
Full columns - reconstruct half of the blobs out of 20 272.74 us/op 186.79 us/op 1.46
Full columns - reconstruct single blob out of 20 28.063 us/op 28.666 us/op 0.98
Half columns - reconstruct all 20 blobs 1.2951 s/op 1.2375 s/op 1.05
Half columns - reconstruct half of the blobs out of 20 660.03 ms/op 616.79 ms/op 1.07
Half columns - reconstruct single blob out of 20 72.775 ms/op 67.540 ms/op 1.08
Set add up to 64 items then delete first 2.2533 us/op 1.9972 us/op 1.13
OrderedSet add up to 64 items then delete first 3.5632 us/op 3.1885 us/op 1.12
Set add up to 64 items then delete last 2.5043 us/op 2.0343 us/op 1.23
OrderedSet add up to 64 items then delete last 3.4300 us/op 3.1417 us/op 1.09
Set add up to 64 items then delete middle 2.2051 us/op 2.0050 us/op 1.10
OrderedSet add up to 64 items then delete middle 4.8806 us/op 4.5521 us/op 1.07
Set add up to 128 items then delete first 4.3997 us/op 3.9885 us/op 1.10
OrderedSet add up to 128 items then delete first 6.7514 us/op 6.1887 us/op 1.09
Set add up to 128 items then delete last 3.9615 us/op 3.7051 us/op 1.07
OrderedSet add up to 128 items then delete last 5.9448 us/op 5.6214 us/op 1.06
Set add up to 128 items then delete middle 3.9728 us/op 3.6621 us/op 1.08
OrderedSet add up to 128 items then delete middle 12.066 us/op 11.693 us/op 1.03
Set add up to 256 items then delete first 8.0590 us/op 7.7033 us/op 1.05
OrderedSet add up to 256 items then delete first 12.393 us/op 11.897 us/op 1.04
Set add up to 256 items then delete last 7.7903 us/op 7.4735 us/op 1.04
OrderedSet add up to 256 items then delete last 11.800 us/op 11.586 us/op 1.02
Set add up to 256 items then delete middle 7.7751 us/op 7.5824 us/op 1.03
OrderedSet add up to 256 items then delete middle 35.383 us/op 36.241 us/op 0.98
pass gossip attestations to forkchoice per slot 2.5674 ms/op 2.4954 ms/op 1.03
forkChoice updateHead vc 100000 bc 64 eq 0 424.22 us/op 381.00 us/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 0 2.5526 ms/op 2.2715 ms/op 1.12
forkChoice updateHead vc 1000000 bc 64 eq 0 4.2310 ms/op 3.7472 ms/op 1.13
forkChoice updateHead vc 600000 bc 320 eq 0 2.5607 ms/op 2.3029 ms/op 1.11
forkChoice updateHead vc 600000 bc 1200 eq 0 2.5867 ms/op 2.3433 ms/op 1.10
forkChoice updateHead vc 600000 bc 7200 eq 0 2.8788 ms/op 3.1834 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 1000 3.1059 ms/op 2.8761 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 10000 3.2418 ms/op 2.9168 ms/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 300000 7.3278 ms/op 6.6031 ms/op 1.11
computeDeltas 1400000 validators 0% inactive 12.914 ms/op 12.219 ms/op 1.06
computeDeltas 1400000 validators 10% inactive 12.481 ms/op 11.424 ms/op 1.09
computeDeltas 1400000 validators 20% inactive 11.237 ms/op 10.409 ms/op 1.08
computeDeltas 1400000 validators 50% inactive 8.5529 ms/op 8.0940 ms/op 1.06
computeDeltas 2100000 validators 0% inactive 19.507 ms/op 18.229 ms/op 1.07
computeDeltas 2100000 validators 10% inactive 18.973 ms/op 17.222 ms/op 1.10
computeDeltas 2100000 validators 20% inactive 17.478 ms/op 15.792 ms/op 1.11
computeDeltas 2100000 validators 50% inactive 13.624 ms/op 9.2459 ms/op 1.47
altair processAttestation - 250000 vs - 7PWei normalcase 2.5585 ms/op 2.4773 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei worstcase 2.4647 ms/op 3.5677 ms/op 0.69
altair processAttestation - setStatus - 1/6 committees join 98.332 us/op 108.12 us/op 0.91
altair processAttestation - setStatus - 1/3 committees join 198.86 us/op 200.87 us/op 0.99
altair processAttestation - setStatus - 1/2 committees join 276.05 us/op 279.04 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 365.32 us/op 363.93 us/op 1.00
altair processAttestation - setStatus - 4/5 committees join 502.21 us/op 513.10 us/op 0.98
altair processAttestation - setStatus - 100% committees join 609.38 us/op 620.34 us/op 0.98
altair processBlock - 250000 vs - 7PWei normalcase 3.2682 ms/op 4.1849 ms/op 0.78
altair processBlock - 250000 vs - 7PWei normalcase hashState 15.508 ms/op 14.744 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase 20.567 ms/op 23.293 ms/op 0.88
altair processBlock - 250000 vs - 7PWei worstcase hashState 44.005 ms/op 46.001 ms/op 0.96
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4728 ms/op 1.4412 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei worstcase 19.101 ms/op 17.600 ms/op 1.09
altair processEth1Data - 250000 vs - 7PWei normalcase 295.57 us/op 288.40 us/op 1.02
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 4.6430 us/op 6.3690 us/op 0.73
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 21.921 us/op 22.905 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 6.1860 us/op 7.9790 us/op 0.78
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 5.0230 us/op 4.8760 us/op 1.03
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 99.091 us/op 96.229 us/op 1.03
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.6122 ms/op 1.4118 ms/op 1.14
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7577 ms/op 2.0534 ms/op 0.86
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8074 ms/op 1.8072 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8582 ms/op 4.2109 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3404 ms/op 2.1099 ms/op 1.11
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.2921 ms/op 4.0502 ms/op 1.06
Tree 40 250000 create 375.47 ms/op 349.13 ms/op 1.08
Tree 40 250000 get(125000) 97.524 ns/op 90.134 ns/op 1.08
Tree 40 250000 set(125000) 1.0561 us/op 987.64 ns/op 1.07
Tree 40 250000 toArray() 16.213 ms/op 16.206 ms/op 1.00
Tree 40 250000 iterate all - toArray() + loop 13.373 ms/op 16.158 ms/op 0.83
Tree 40 250000 iterate all - get(i) 40.538 ms/op 39.077 ms/op 1.04
Array 250000 create 2.4697 ms/op 2.1687 ms/op 1.14
Array 250000 clone - spread 758.58 us/op 674.11 us/op 1.13
Array 250000 get(125000) 0.30800 ns/op 0.29400 ns/op 1.05
Array 250000 set(125000) 0.31600 ns/op 0.29300 ns/op 1.08
Array 250000 iterate all - loop 60.580 us/op 56.096 us/op 1.08
phase0 afterProcessEpoch - 250000 vs - 7PWei 54.068 ms/op 40.047 ms/op 1.35
Array.fill - length 1000000 2.3518 ms/op 2.1537 ms/op 1.09
Array push - length 1000000 9.8091 ms/op 9.6209 ms/op 1.02
Array.get 0.19919 ns/op 0.20228 ns/op 0.98
Uint8Array.get 0.23357 ns/op 0.23599 ns/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.643 ms/op 19.616 ms/op 0.85
altair processEpoch - mainnet_e81889 362.02 ms/op 276.17 ms/op 1.31
mainnet_e81889 - altair beforeProcessEpoch 33.437 ms/op 39.919 ms/op 0.84
mainnet_e81889 - altair processJustificationAndFinalization 7.5230 us/op 6.7360 us/op 1.12
mainnet_e81889 - altair processInactivityUpdates 4.0831 ms/op 4.8550 ms/op 0.84
mainnet_e81889 - altair processRewardsAndPenalties 20.431 ms/op 20.885 ms/op 0.98
mainnet_e81889 - altair processRegistryUpdates 526.00 ns/op 530.00 ns/op 0.99
mainnet_e81889 - altair processSlashings 144.00 ns/op 135.00 ns/op 1.07
mainnet_e81889 - altair processEth1DataReset 128.00 ns/op 132.00 ns/op 0.97
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7341 ms/op 2.9307 ms/op 0.59
mainnet_e81889 - altair processSlashingsReset 717.00 ns/op 679.00 ns/op 1.06
mainnet_e81889 - altair processRandaoMixesReset 1.3900 us/op 1.3420 us/op 1.04
mainnet_e81889 - altair processHistoricalRootsUpdate 139.00 ns/op 133.00 ns/op 1.05
mainnet_e81889 - altair processParticipationFlagUpdates 436.00 ns/op 435.00 ns/op 1.00
mainnet_e81889 - altair processSyncCommitteeUpdates 109.00 ns/op 116.00 ns/op 0.94
mainnet_e81889 - altair afterProcessEpoch 42.087 ms/op 42.233 ms/op 1.00
capella processEpoch - mainnet_e217614 981.82 ms/op 863.15 ms/op 1.14
mainnet_e217614 - capella beforeProcessEpoch 58.735 ms/op 72.152 ms/op 0.81
mainnet_e217614 - capella processJustificationAndFinalization 7.0120 us/op 6.5370 us/op 1.07
mainnet_e217614 - capella processInactivityUpdates 14.054 ms/op 22.702 ms/op 0.62
mainnet_e217614 - capella processRewardsAndPenalties 101.80 ms/op 97.877 ms/op 1.04
mainnet_e217614 - capella processRegistryUpdates 4.5460 us/op 4.4400 us/op 1.02
mainnet_e217614 - capella processSlashings 133.00 ns/op 127.00 ns/op 1.05
mainnet_e217614 - capella processEth1DataReset 126.00 ns/op 126.00 ns/op 1.00
mainnet_e217614 - capella processEffectiveBalanceUpdates 12.496 ms/op 18.656 ms/op 0.67
mainnet_e217614 - capella processSlashingsReset 692.00 ns/op 695.00 ns/op 1.00
mainnet_e217614 - capella processRandaoMixesReset 1.4830 us/op 1.3580 us/op 1.09
mainnet_e217614 - capella processHistoricalRootsUpdate 137.00 ns/op 126.00 ns/op 1.09
mainnet_e217614 - capella processParticipationFlagUpdates 445.00 ns/op 430.00 ns/op 1.03
mainnet_e217614 - capella afterProcessEpoch 110.01 ms/op 109.52 ms/op 1.00
phase0 processEpoch - mainnet_e58758 355.20 ms/op 313.89 ms/op 1.13
mainnet_e58758 - phase0 beforeProcessEpoch 74.855 ms/op 66.872 ms/op 1.12
mainnet_e58758 - phase0 processJustificationAndFinalization 8.2870 us/op 6.3800 us/op 1.30
mainnet_e58758 - phase0 processRewardsAndPenalties 16.839 ms/op 16.525 ms/op 1.02
mainnet_e58758 - phase0 processRegistryUpdates 2.3620 us/op 2.1910 us/op 1.08
mainnet_e58758 - phase0 processSlashings 135.00 ns/op 130.00 ns/op 1.04
mainnet_e58758 - phase0 processEth1DataReset 125.00 ns/op 127.00 ns/op 0.98
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.8116 ms/op 994.61 us/op 1.82
mainnet_e58758 - phase0 processSlashingsReset 931.00 ns/op 887.00 ns/op 1.05
mainnet_e58758 - phase0 processRandaoMixesReset 1.4010 us/op 1.2890 us/op 1.09
mainnet_e58758 - phase0 processHistoricalRootsUpdate 128.00 ns/op 133.00 ns/op 0.96
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.3720 us/op 1.2390 us/op 1.11
mainnet_e58758 - phase0 afterProcessEpoch 32.104 ms/op 32.577 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1177 ms/op 982.46 us/op 1.14
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6096 ms/op 1.5218 ms/op 1.06
altair processInactivityUpdates - 250000 normalcase 12.084 ms/op 12.504 ms/op 0.97
altair processInactivityUpdates - 250000 worstcase 12.665 ms/op 12.690 ms/op 1.00
phase0 processRegistryUpdates - 250000 normalcase 2.3240 us/op 2.3670 us/op 0.98
phase0 processRegistryUpdates - 250000 badcase_full_deposits 159.45 us/op 145.47 us/op 1.10
phase0 processRegistryUpdates - 250000 worstcase 0.5 77.909 ms/op 60.315 ms/op 1.29
altair processRewardsAndPenalties - 250000 normalcase 16.931 ms/op 16.670 ms/op 1.02
altair processRewardsAndPenalties - 250000 worstcase 15.571 ms/op 16.201 ms/op 0.96
phase0 getAttestationDeltas - 250000 normalcase 5.3124 ms/op 5.3875 ms/op 0.99
phase0 getAttestationDeltas - 250000 worstcase 5.2550 ms/op 5.1873 ms/op 1.01
phase0 processSlashings - 250000 worstcase 59.332 us/op 59.803 us/op 0.99
altair processSyncCommitteeUpdates - 250000 10.728 ms/op 10.151 ms/op 1.06
BeaconState.hashTreeRoot - No change 175.00 ns/op 169.00 ns/op 1.04
BeaconState.hashTreeRoot - 1 full validator 84.793 us/op 73.268 us/op 1.16
BeaconState.hashTreeRoot - 32 full validator 1.0860 ms/op 828.33 us/op 1.31
BeaconState.hashTreeRoot - 512 full validator 6.4388 ms/op 7.4177 ms/op 0.87
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 90.811 us/op 91.293 us/op 0.99
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8590 ms/op 1.3453 ms/op 1.38
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.031 ms/op 16.162 ms/op 1.49
BeaconState.hashTreeRoot - 1 balances 89.554 us/op 70.413 us/op 1.27
BeaconState.hashTreeRoot - 32 balances 785.95 us/op 697.17 us/op 1.13
BeaconState.hashTreeRoot - 512 balances 5.4980 ms/op 5.9960 ms/op 0.92
BeaconState.hashTreeRoot - 250000 balances 177.34 ms/op 137.26 ms/op 1.29
aggregationBits - 2048 els - zipIndexesInBitList 19.275 us/op 19.899 us/op 0.97
regular array get 100000 times 21.914 us/op 22.520 us/op 0.97
wrappedArray get 100000 times 21.968 us/op 22.566 us/op 0.97
arrayWithProxy get 100000 times 9.0821 ms/op 9.5559 ms/op 0.95
ssz.Root.equals 20.456 ns/op 21.057 ns/op 0.97
byteArrayEquals 20.281 ns/op 20.825 ns/op 0.97
Buffer.compare 8.9580 ns/op 9.6800 ns/op 0.93
processSlot - 1 slots 9.0400 us/op 9.7700 us/op 0.93
processSlot - 32 slots 2.4344 ms/op 2.1349 ms/op 1.14
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.4989 ms/op 4.6355 ms/op 0.97
getCommitteeAssignments - req 1 vs - 250000 vc 1.7157 ms/op 1.6128 ms/op 1.06
getCommitteeAssignments - req 100 vs - 250000 vc 3.5167 ms/op 3.3261 ms/op 1.06
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7787 ms/op 3.6107 ms/op 1.05
findModifiedValidators - 10000 modified validators 726.09 ms/op 870.33 ms/op 0.83
findModifiedValidators - 1000 modified validators 550.25 ms/op 453.49 ms/op 1.21
findModifiedValidators - 100 modified validators 266.79 ms/op 341.90 ms/op 0.78
findModifiedValidators - 10 modified validators 193.87 ms/op 210.52 ms/op 0.92
findModifiedValidators - 1 modified validators 168.33 ms/op 168.99 ms/op 1.00
findModifiedValidators - no difference 156.08 ms/op 224.34 ms/op 0.70
migrate state 1500000 validators, 3400 modified, 2000 new 4.2532 s/op 3.2638 s/op 1.30
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.7700 ns/op 3.6400 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 407.41 ns/op 402.03 ns/op 1.01
computeProposerIndex 100000 validators 1.3734 ms/op 1.3087 ms/op 1.05
getNextSyncCommitteeIndices 1000 validators 2.9006 ms/op 2.8129 ms/op 1.03
getNextSyncCommitteeIndices 10000 validators 25.631 ms/op 24.777 ms/op 1.03
getNextSyncCommitteeIndices 100000 validators 86.310 ms/op 87.690 ms/op 0.98
computeProposers - vc 250000 564.98 us/op 559.88 us/op 1.01
computeEpochShuffling - vc 250000 41.776 ms/op 38.836 ms/op 1.08
getNextSyncCommittee - vc 250000 9.6742 ms/op 9.7415 ms/op 0.99
nodejs block root to RootHex using toHex 98.941 ns/op 88.872 ns/op 1.11
nodejs block root to RootHex using toRootHex 60.919 ns/op 55.047 ns/op 1.11
nodejs fromHex(blob) 814.06 us/op 752.31 us/op 1.08
nodejs fromHexInto(blob) 651.68 us/op 601.41 us/op 1.08
nodejs block root to RootHex using the deprecated toHexString 571.97 ns/op 465.29 ns/op 1.23
nodejs byteArrayEquals 32 bytes (block root) 26.155 ns/op 24.706 ns/op 1.06
nodejs byteArrayEquals 48 bytes (pubkey) 37.922 ns/op 35.595 ns/op 1.07
nodejs byteArrayEquals 96 bytes (signature) 38.184 ns/op 32.271 ns/op 1.18
nodejs byteArrayEquals 1024 bytes 46.649 ns/op 39.366 ns/op 1.19
nodejs byteArrayEquals 131072 bytes (blob) 1.7948 us/op 1.6593 us/op 1.08
browser block root to RootHex using toHex 146.82 ns/op 135.77 ns/op 1.08
browser block root to RootHex using toRootHex 132.28 ns/op 123.35 ns/op 1.07
browser fromHex(blob) 1.6186 ms/op 1.4507 ms/op 1.12
browser fromHexInto(blob) 646.77 us/op 611.11 us/op 1.06
browser block root to RootHex using the deprecated toHexString 384.25 ns/op 482.57 ns/op 0.80
browser byteArrayEquals 32 bytes (block root) 28.250 ns/op 27.533 ns/op 1.03
browser byteArrayEquals 48 bytes (pubkey) 39.803 ns/op 39.056 ns/op 1.02
browser byteArrayEquals 96 bytes (signature) 74.404 ns/op 73.400 ns/op 1.01
browser byteArrayEquals 1024 bytes 757.38 ns/op 742.62 ns/op 1.02
browser byteArrayEquals 131072 bytes (blob) 95.812 us/op 93.674 us/op 1.02

by benchmarkbot/action

ensi321
ensi321 previously approved these changes May 20, 2026
const parentGasLimit = parentPayloadVariant.executionPayloadGasLimit;
const targetGasLimit = proposerPreferences.message.targetGasLimit;
if (!isGasLimitTargetCompatible(parentGasLimit, bidGasLimit, targetGasLimit)) {
throw new ExecutionPayloadBidError(GossipAction.REJECT, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

}

// Parent is Gloas: get the variant that matches the parentBlockHash from bid
const parentVariant = this.getBlockHexAndBlockHash(parentRootHex, parentBlockHashFromBid);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is not necessary
parentVariant is exactly the same to parentBlock at line 607 above

@twoeths twoeths merged commit 985999b into unstable May 21, 2026
25 of 26 checks passed
@twoeths twoeths deleted the cayman/spec-5236 branch May 21, 2026 09:29
Comment on lines +143 to +147
// TODO GLOAS: executionPayloadNumber/GasLimit are not tracked in BeaconState post-gloas
// (EIP-7732 removed latestExecutionPayloadHeader). Using 0 as unavailable fallback —
// see initializeForkChoiceFromUnfinalizedState for the same caveat on validation.
executionPayloadNumber: isStatePostGloas(state) ? 0 : state.payloadBlockNumber,
executionPayloadGasLimit: isStatePostGloas(state) ? 0 : state.latestExecutionPayloadHeader.gasLimit,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am bit confused by this comment, why is it not tracked in the state?

it's in state.latestExecutionPayloadBid.gasLimit, or is there a reason this value is not viable to use?

@wemeetagain

Copy link
Copy Markdown
Member Author

🎉 This PR is included in v1.44.0 🎉

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