Skip to content

fix: resolve PTC committee against the referenced block state#9426

Merged
wemeetagain merged 4 commits into
unstablefrom
nflaig/fix-ptc-committee-branch-state
May 30, 2026
Merged

fix: resolve PTC committee against the referenced block state#9426
wemeetagain merged 4 commits into
unstablefrom
nflaig/fix-ptc-committee-branch-state

Conversation

@nflaig
Copy link
Copy Markdown
Member

@nflaig nflaig commented May 30, 2026

same as #9409

@nflaig nflaig requested a review from a team as a code owner May 30, 2026 14:59
Copy link
Copy Markdown
Contributor

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

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 updates the payload attestation validation logic to use the referenced block's branch state instead of the head state. It retrieves the block from fork choice and fetches the corresponding state using chain.regen.getBlockSlotState. The feedback highlights an improvement opportunity: if the attestation's slot is strictly less than the referenced block's slot, it represents a protocol violation. Instead of letting this trigger a caught error in getBlockSlotState that results in an IGNORE action, the code should explicitly check this condition and REJECT the message to prevent spam and avoid unnecessary overhead.

Comment on lines 65 to 71
const block = chain.forkChoice.getBlockHexDefaultStatus(toRootHex(data.beaconBlockRoot));
if (block === null) {
throw new PayloadAttestationError(GossipAction.IGNORE, {
code: PayloadAttestationErrorCode.UNKNOWN_BLOCK_ROOT,
blockRoot: toRootHex(data.beaconBlockRoot),
});
}
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.

high

If the payload attestation's slot (data.slot) is strictly less than the referenced block's slot (block.slot), it represents a static protocol violation (an attestation cannot target a block from a future slot relative to itself). Currently, this case will cause getBlockSlotState to throw a SLOT_BEFORE_BLOCK_SLOT error, which is caught and mapped to UNKNOWN_BLOCK_ROOT with GossipAction.IGNORE.

To prevent peers from spamming these invalid attestations without being penalized, and to avoid the overhead of calling getBlockSlotState for an obviously invalid attestation, we should explicitly check this condition and REJECT the message.

const block = chain.forkChoice.getBlockHexDefaultStatus(toRootHex(data.beaconBlockRoot));
  if (block === null) {
    throw new PayloadAttestationError(GossipAction.IGNORE, {
      code: PayloadAttestationErrorCode.UNKNOWN_BLOCK_ROOT,
      blockRoot: toRootHex(data.beaconBlockRoot),
    });
  }

  if (data.slot < block.slot) {
    throw new PayloadAttestationError(GossipAction.REJECT, {
      code: PayloadAttestationErrorCode.INVALID_BLOCK,
      blockRoot: toRootHex(data.beaconBlockRoot),
    });
  }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

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

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: d3549511a3

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


// Use the referenced block's branch state for the PTC committee check
const state = await chain.regen
.getBlockSlotState(block, data.slot, {dontTransferCache: true}, RegenCaller.validateGossipPayloadAttestationMessage)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject PTC messages whose slot differs from the block

When data.beaconBlockRoot points to any known Gloas block from an earlier slot, this regenerates that block's state forward to the current data.slot, so the PTC lookup can succeed and the gossip handler will call notifyPtcMessages for the old block root. The Gloas on_payload_attestation_message flow uses the stored state for data.beacon_block_root and returns without updating votes when data.slot != state.slot (specrefs/functions.yml), so advancing here accepts and applies votes that should be ignored; use the block's actual post-state/slot or explicitly reject/ignore slot mismatches before checking the PTC.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 30, 2026

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: d4d2a7b Previous: ff43f01 Ratio
Full columns - reconstruct all 20 blobs 506.53 us/op 2.1248 ms/op 0.24
Full benchmark results
Benchmark suite Current: d4d2a7b Previous: ff43f01 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 839.85 us/op 1.4649 ms/op 0.57
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 37.594 us/op 42.099 us/op 0.89
BLS verify - blst 625.84 us/op 715.81 us/op 0.87
BLS verifyMultipleSignatures 3 - blst 1.2889 ms/op 1.3562 ms/op 0.95
BLS verifyMultipleSignatures 8 - blst 2.0346 ms/op 2.1086 ms/op 0.96
BLS verifyMultipleSignatures 32 - blst 6.4100 ms/op 6.6683 ms/op 0.96
BLS verifyMultipleSignatures 64 - blst 12.502 ms/op 12.789 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst 24.392 ms/op 25.679 ms/op 0.95
BLS deserializing 10000 signatures 609.94 ms/op 613.44 ms/op 0.99
BLS deserializing 100000 signatures 6.1525 s/op 6.1398 s/op 1.00
BLS verifyMultipleSignatures - same message - 3 - blst 751.06 us/op 772.81 us/op 0.97
BLS verifyMultipleSignatures - same message - 8 - blst 817.92 us/op 802.98 us/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst 1.5074 ms/op 1.4739 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst 2.3348 ms/op 2.2473 ms/op 1.04
BLS verifyMultipleSignatures - same message - 128 - blst 3.9510 ms/op 3.8332 ms/op 1.03
BLS aggregatePubkeys 32 - blst 17.130 us/op 16.988 us/op 1.01
BLS aggregatePubkeys 128 - blst 61.302 us/op 60.422 us/op 1.01
getSlashingsAndExits - default max 46.683 us/op 47.046 us/op 0.99
getSlashingsAndExits - 2k 380.89 us/op 362.30 us/op 1.05
proposeBlockBody type=full, size=empty 732.38 us/op 749.41 us/op 0.98
isKnown best case - 1 super set check 160.00 ns/op 165.00 ns/op 0.97
isKnown normal case - 2 super set checks 155.00 ns/op 159.00 ns/op 0.97
isKnown worse case - 16 super set checks 160.00 ns/op 164.00 ns/op 0.98
validate api signedAggregateAndProof - struct 1.4604 ms/op 1.4059 ms/op 1.04
validate gossip signedAggregateAndProof - struct 1.4495 ms/op 1.4041 ms/op 1.03
batch validate gossip attestation - vc 640000 - chunk 32 109.51 us/op 104.05 us/op 1.05
batch validate gossip attestation - vc 640000 - chunk 64 95.064 us/op 91.400 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 128 87.560 us/op 85.234 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 256 81.788 us/op 84.332 us/op 0.97
bytes32 toHexString 272.00 ns/op 273.00 ns/op 1.00
bytes32 Buffer.toString(hex) 154.00 ns/op 161.00 ns/op 0.96
bytes32 Buffer.toString(hex) from Uint8Array 210.00 ns/op 227.00 ns/op 0.93
bytes32 Buffer.toString(hex) + 0x 157.00 ns/op 164.00 ns/op 0.96
Return object 10000 times 0.21330 ns/op 0.20510 ns/op 1.04
Throw Error 10000 times 3.2828 us/op 3.1974 us/op 1.03
toHex 86.518 ns/op 84.797 ns/op 1.02
Buffer.from 77.555 ns/op 83.441 ns/op 0.93
shared Buffer 54.107 ns/op 49.672 ns/op 1.09
fastMsgIdFn sha256 / 200 bytes 1.4370 us/op 1.4220 us/op 1.01
fastMsgIdFn h32 xxhash / 200 bytes 149.00 ns/op 150.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 200 bytes 187.00 ns/op 196.00 ns/op 0.95
fastMsgIdFn sha256 / 1000 bytes 4.6050 us/op 4.6060 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 230.00 ns/op 235.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 1000 bytes 232.00 ns/op 246.00 ns/op 0.94
fastMsgIdFn sha256 / 10000 bytes 40.085 us/op 40.715 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 1.2100 us/op 1.2160 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 770.00 ns/op 780.00 ns/op 0.99
send data - 1000 256B messages 4.0931 ms/op 4.4319 ms/op 0.92
send data - 1000 512B messages 4.2831 ms/op 4.5625 ms/op 0.94
send data - 1000 1024B messages 4.5428 ms/op 4.5637 ms/op 1.00
send data - 1000 1200B messages 4.9313 ms/op 4.7993 ms/op 1.03
send data - 1000 2048B messages 5.1963 ms/op 5.1604 ms/op 1.01
send data - 1000 4096B messages 5.6755 ms/op 6.1352 ms/op 0.93
send data - 1000 16384B messages 19.437 ms/op 36.680 ms/op 0.53
send data - 1000 65536B messages 103.04 ms/op 186.82 ms/op 0.55
enrSubnets - fastDeserialize 64 bits 722.00 ns/op 705.00 ns/op 1.02
enrSubnets - ssz BitVector 64 bits 251.00 ns/op 254.00 ns/op 0.99
enrSubnets - fastDeserialize 4 bits 103.00 ns/op 97.000 ns/op 1.06
enrSubnets - ssz BitVector 4 bits 249.00 ns/op 253.00 ns/op 0.98
prioritizePeers score -10:0 att 32-0.1 sync 2-0 197.68 us/op 199.86 us/op 0.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 239.61 us/op 244.88 us/op 0.98
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 339.75 us/op 338.42 us/op 1.00
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 598.60 us/op 597.07 us/op 1.00
prioritizePeers score 0:0 att 64-1 sync 4-1 696.40 us/op 717.07 us/op 0.97
array of 16000 items push then shift 1.2666 us/op 1.2516 us/op 1.01
LinkedList of 16000 items push then shift 7.4820 ns/op 7.9860 ns/op 0.94
array of 16000 items push then pop 90.520 ns/op 77.308 ns/op 1.17
LinkedList of 16000 items push then pop 5.9830 ns/op 6.0800 ns/op 0.98
array of 24000 items push then shift 1.7934 us/op 1.8672 us/op 0.96
LinkedList of 24000 items push then shift 7.0920 ns/op 7.7330 ns/op 0.92
array of 24000 items push then pop 109.94 ns/op 109.76 ns/op 1.00
LinkedList of 24000 items push then pop 5.8000 ns/op 6.2000 ns/op 0.94
intersect bitArray bitLen 8 4.5930 ns/op 4.6390 ns/op 0.99
intersect array and set length 8 27.987 ns/op 29.062 ns/op 0.96
intersect bitArray bitLen 128 23.775 ns/op 23.687 ns/op 1.00
intersect array and set length 128 473.57 ns/op 506.15 ns/op 0.94
bitArray.getTrueBitIndexes() bitLen 128 1.0040 us/op 1.0100 us/op 0.99
bitArray.getTrueBitIndexes() bitLen 248 1.7390 us/op 1.7660 us/op 0.98
bitArray.getTrueBitIndexes() bitLen 512 3.5200 us/op 3.5470 us/op 0.99
Full columns - reconstruct all 6 blobs 175.46 us/op 134.26 us/op 1.31
Full columns - reconstruct half of the blobs out of 6 91.714 us/op 66.417 us/op 1.38
Full columns - reconstruct single blob out of 6 31.375 us/op 81.738 us/op 0.38
Half columns - reconstruct all 6 blobs 378.58 ms/op 375.28 ms/op 1.01
Half columns - reconstruct half of the blobs out of 6 190.82 ms/op 189.13 ms/op 1.01
Half columns - reconstruct single blob out of 6 67.387 ms/op 67.204 ms/op 1.00
Full columns - reconstruct all 10 blobs 280.61 us/op 296.09 us/op 0.95
Full columns - reconstruct half of the blobs out of 10 169.25 us/op 147.66 us/op 1.15
Full columns - reconstruct single blob out of 10 31.143 us/op 32.069 us/op 0.97
Half columns - reconstruct all 10 blobs 621.97 ms/op 628.92 ms/op 0.99
Half columns - reconstruct half of the blobs out of 10 314.35 ms/op 313.80 ms/op 1.00
Half columns - reconstruct single blob out of 10 67.704 ms/op 67.055 ms/op 1.01
Full columns - reconstruct all 20 blobs 506.53 us/op 2.1248 ms/op 0.24
Full columns - reconstruct half of the blobs out of 20 218.23 us/op 270.61 us/op 0.81
Full columns - reconstruct single blob out of 20 31.531 us/op 29.131 us/op 1.08
Half columns - reconstruct all 20 blobs 1.2936 s/op 1.1948 s/op 1.08
Half columns - reconstruct half of the blobs out of 20 626.79 ms/op 599.98 ms/op 1.04
Half columns - reconstruct single blob out of 20 67.916 ms/op 64.181 ms/op 1.06
Set add up to 64 items then delete first 2.0922 us/op 2.4000 us/op 0.87
OrderedSet add up to 64 items then delete first 3.2699 us/op 3.1481 us/op 1.04
Set add up to 64 items then delete last 2.1817 us/op 2.1963 us/op 0.99
OrderedSet add up to 64 items then delete last 3.3461 us/op 3.0365 us/op 1.10
Set add up to 64 items then delete middle 2.1671 us/op 1.9830 us/op 1.09
OrderedSet add up to 64 items then delete middle 5.8205 us/op 4.3811 us/op 1.33
Set add up to 128 items then delete first 4.2046 us/op 3.9176 us/op 1.07
OrderedSet add up to 128 items then delete first 6.1920 us/op 6.0883 us/op 1.02
Set add up to 128 items then delete last 4.2837 us/op 3.5555 us/op 1.20
OrderedSet add up to 128 items then delete last 6.2839 us/op 5.3891 us/op 1.17
Set add up to 128 items then delete middle 4.7325 us/op 3.5946 us/op 1.32
OrderedSet add up to 128 items then delete middle 13.235 us/op 10.846 us/op 1.22
Set add up to 256 items then delete first 9.7908 us/op 7.3294 us/op 1.34
OrderedSet add up to 256 items then delete first 12.910 us/op 11.307 us/op 1.14
Set add up to 256 items then delete last 8.8508 us/op 7.2297 us/op 1.22
OrderedSet add up to 256 items then delete last 15.193 us/op 10.839 us/op 1.40
Set add up to 256 items then delete middle 8.8791 us/op 7.1898 us/op 1.23
OrderedSet add up to 256 items then delete middle 39.352 us/op 32.893 us/op 1.20
pass gossip attestations to forkchoice per slot 2.5216 ms/op 2.4638 ms/op 1.02
forkChoice updateHead vc 100000 bc 64 eq 0 382.47 us/op 373.87 us/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 0 2.3158 ms/op 2.2148 ms/op 1.05
forkChoice updateHead vc 1000000 bc 64 eq 0 3.8491 ms/op 3.6892 ms/op 1.04
forkChoice updateHead vc 600000 bc 320 eq 0 2.3216 ms/op 2.2479 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 2.5614 ms/op 2.3933 ms/op 1.07
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1368 ms/op 3.0365 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 1000 2.8189 ms/op 2.8269 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 2.9154 ms/op 2.8955 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 6.5716 ms/op 6.7827 ms/op 0.97
computeDeltas 1400000 validators 0% inactive 12.263 ms/op 12.023 ms/op 1.02
computeDeltas 1400000 validators 10% inactive 11.450 ms/op 11.217 ms/op 1.02
computeDeltas 1400000 validators 20% inactive 10.656 ms/op 10.221 ms/op 1.04
computeDeltas 1400000 validators 50% inactive 8.0268 ms/op 7.8913 ms/op 1.02
computeDeltas 2100000 validators 0% inactive 18.375 ms/op 18.112 ms/op 1.01
computeDeltas 2100000 validators 10% inactive 17.152 ms/op 16.881 ms/op 1.02
computeDeltas 2100000 validators 20% inactive 15.716 ms/op 15.361 ms/op 1.02
computeDeltas 2100000 validators 50% inactive 9.1611 ms/op 8.9063 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 2.3526 ms/op 1.8803 ms/op 1.25
altair processAttestation - 250000 vs - 7PWei worstcase 2.9377 ms/op 2.6677 ms/op 1.10
altair processAttestation - setStatus - 1/6 committees join 100.90 us/op 98.156 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 201.20 us/op 183.75 us/op 1.09
altair processAttestation - setStatus - 1/2 committees join 274.54 us/op 267.46 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 345.24 us/op 363.24 us/op 0.95
altair processAttestation - setStatus - 4/5 committees join 486.79 us/op 487.03 us/op 1.00
altair processAttestation - setStatus - 100% committees join 590.08 us/op 575.68 us/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase 4.3885 ms/op 4.1239 ms/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase hashState 15.109 ms/op 15.634 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase 22.152 ms/op 21.234 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase hashState 42.208 ms/op 42.939 ms/op 0.98
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4087 ms/op 1.3543 ms/op 1.04
phase0 processBlock - 250000 vs - 7PWei worstcase 17.289 ms/op 16.318 ms/op 1.06
altair processEth1Data - 250000 vs - 7PWei normalcase 296.92 us/op 293.66 us/op 1.01
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.0050 us/op 7.8140 us/op 0.38
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 20.244 us/op 20.816 us/op 0.97
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.4400 us/op 7.5900 us/op 0.72
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.3820 us/op 4.4200 us/op 0.77
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 86.416 us/op 94.112 us/op 0.92
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3379 ms/op 1.4362 ms/op 0.93
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7455 ms/op 1.8397 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.7529 ms/op 1.8064 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.5248 ms/op 3.5322 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0182 ms/op 1.9737 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7632 ms/op 4.3328 ms/op 0.87
Tree 40 250000 create 324.58 ms/op 346.85 ms/op 0.94
Tree 40 250000 get(125000) 93.138 ns/op 93.379 ns/op 1.00
Tree 40 250000 set(125000) 996.41 ns/op 1.0324 us/op 0.97
Tree 40 250000 toArray() 13.423 ms/op 17.857 ms/op 0.75
Tree 40 250000 iterate all - toArray() + loop 14.706 ms/op 18.917 ms/op 0.78
Tree 40 250000 iterate all - get(i) 40.479 ms/op 42.398 ms/op 0.95
Array 250000 create 2.1376 ms/op 2.4062 ms/op 0.89
Array 250000 clone - spread 666.47 us/op 725.90 us/op 0.92
Array 250000 get(125000) 0.29600 ns/op 0.28900 ns/op 1.02
Array 250000 set(125000) 0.30200 ns/op 0.29200 ns/op 1.03
Array 250000 iterate all - loop 57.518 us/op 56.396 us/op 1.02
phase0 afterProcessEpoch - 250000 vs - 7PWei 60.869 ms/op 61.960 ms/op 0.98
Array.fill - length 1000000 2.1652 ms/op 2.1808 ms/op 0.99
Array push - length 1000000 9.6028 ms/op 10.283 ms/op 0.93
Array.get 0.20636 ns/op 0.20115 ns/op 1.03
Uint8Array.get 0.23386 ns/op 0.23777 ns/op 0.98
phase0 beforeProcessEpoch - 250000 vs - 7PWei 14.498 ms/op 14.835 ms/op 0.98
altair processEpoch - mainnet_e81889 272.74 ms/op 274.79 ms/op 0.99
mainnet_e81889 - altair beforeProcessEpoch 15.747 ms/op 15.718 ms/op 1.00
mainnet_e81889 - altair processJustificationAndFinalization 6.3100 us/op 6.0220 us/op 1.05
mainnet_e81889 - altair processInactivityUpdates 4.9042 ms/op 4.2669 ms/op 1.15
mainnet_e81889 - altair processRewardsAndPenalties 19.927 ms/op 19.697 ms/op 1.01
mainnet_e81889 - altair processRegistryUpdates 523.00 ns/op 542.00 ns/op 0.96
mainnet_e81889 - altair processSlashings 129.00 ns/op 133.00 ns/op 0.97
mainnet_e81889 - altair processEth1DataReset 129.00 ns/op 127.00 ns/op 1.02
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.4458 ms/op 3.3286 ms/op 0.73
mainnet_e81889 - altair processSlashingsReset 672.00 ns/op 698.00 ns/op 0.96
mainnet_e81889 - altair processRandaoMixesReset 1.2650 us/op 1.3770 us/op 0.92
mainnet_e81889 - altair processHistoricalRootsUpdate 127.00 ns/op 125.00 ns/op 1.02
mainnet_e81889 - altair processParticipationFlagUpdates 421.00 ns/op 437.00 ns/op 0.96
mainnet_e81889 - altair processSyncCommitteeUpdates 104.00 ns/op 106.00 ns/op 0.98
mainnet_e81889 - altair afterProcessEpoch 40.736 ms/op 42.088 ms/op 0.97
capella processEpoch - mainnet_e217614 800.97 ms/op 825.12 ms/op 0.97
mainnet_e217614 - capella beforeProcessEpoch 55.163 ms/op 57.995 ms/op 0.95
mainnet_e217614 - capella processJustificationAndFinalization 6.0770 us/op 6.3620 us/op 0.96
mainnet_e217614 - capella processInactivityUpdates 15.744 ms/op 16.973 ms/op 0.93
mainnet_e217614 - capella processRewardsAndPenalties 91.162 ms/op 93.702 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 4.4240 us/op 4.4200 us/op 1.00
mainnet_e217614 - capella processSlashings 128.00 ns/op 133.00 ns/op 0.96
mainnet_e217614 - capella processEth1DataReset 126.00 ns/op 123.00 ns/op 1.02
mainnet_e217614 - capella processEffectiveBalanceUpdates 13.810 ms/op 17.946 ms/op 0.77
mainnet_e217614 - capella processSlashingsReset 674.00 ns/op 685.00 ns/op 0.98
mainnet_e217614 - capella processRandaoMixesReset 1.2610 us/op 1.3010 us/op 0.97
mainnet_e217614 - capella processHistoricalRootsUpdate 125.00 ns/op 124.00 ns/op 1.01
mainnet_e217614 - capella processParticipationFlagUpdates 415.00 ns/op 422.00 ns/op 0.98
mainnet_e217614 - capella afterProcessEpoch 106.02 ms/op 105.66 ms/op 1.00
phase0 processEpoch - mainnet_e58758 321.07 ms/op 333.61 ms/op 0.96
mainnet_e58758 - phase0 beforeProcessEpoch 75.331 ms/op 72.565 ms/op 1.04
mainnet_e58758 - phase0 processJustificationAndFinalization 6.5590 us/op 6.8510 us/op 0.96
mainnet_e58758 - phase0 processRewardsAndPenalties 15.538 ms/op 16.873 ms/op 0.92
mainnet_e58758 - phase0 processRegistryUpdates 2.2250 us/op 2.2780 us/op 0.98
mainnet_e58758 - phase0 processSlashings 125.00 ns/op 127.00 ns/op 0.98
mainnet_e58758 - phase0 processEth1DataReset 126.00 ns/op 264.00 ns/op 0.48
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 964.22 us/op 830.08 us/op 1.16
mainnet_e58758 - phase0 processSlashingsReset 894.00 ns/op 997.00 ns/op 0.90
mainnet_e58758 - phase0 processRandaoMixesReset 1.3290 us/op 1.3780 us/op 0.96
mainnet_e58758 - phase0 processHistoricalRootsUpdate 128.00 ns/op 135.00 ns/op 0.95
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.1310 us/op 1.1740 us/op 0.96
mainnet_e58758 - phase0 afterProcessEpoch 33.046 ms/op 34.877 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 normalcase 951.14 us/op 1.0009 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4827 ms/op 1.5448 ms/op 0.96
altair processInactivityUpdates - 250000 normalcase 12.384 ms/op 13.197 ms/op 0.94
altair processInactivityUpdates - 250000 worstcase 12.546 ms/op 12.545 ms/op 1.00
phase0 processRegistryUpdates - 250000 normalcase 2.0380 us/op 2.0240 us/op 1.01
phase0 processRegistryUpdates - 250000 badcase_full_deposits 129.89 us/op 140.11 us/op 0.93
phase0 processRegistryUpdates - 250000 worstcase 0.5 55.727 ms/op 60.391 ms/op 0.92
altair processRewardsAndPenalties - 250000 normalcase 15.623 ms/op 17.091 ms/op 0.91
altair processRewardsAndPenalties - 250000 worstcase 15.169 ms/op 16.299 ms/op 0.93
phase0 getAttestationDeltas - 250000 normalcase 5.3003 ms/op 5.2285 ms/op 1.01
phase0 getAttestationDeltas - 250000 worstcase 5.3174 ms/op 5.3326 ms/op 1.00
phase0 processSlashings - 250000 worstcase 57.051 us/op 63.833 us/op 0.89
altair processSyncCommitteeUpdates - 250000 9.9065 ms/op 10.369 ms/op 0.96
BeaconState.hashTreeRoot - No change 162.00 ns/op 161.00 ns/op 1.01
BeaconState.hashTreeRoot - 1 full validator 84.948 us/op 90.146 us/op 0.94
BeaconState.hashTreeRoot - 32 full validator 912.64 us/op 871.03 us/op 1.05
BeaconState.hashTreeRoot - 512 full validator 9.1122 ms/op 9.0366 ms/op 1.01
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 100.57 us/op 111.21 us/op 0.90
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3779 ms/op 1.4646 ms/op 0.94
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.856 ms/op 19.196 ms/op 0.93
BeaconState.hashTreeRoot - 1 balances 80.708 us/op 85.842 us/op 0.94
BeaconState.hashTreeRoot - 32 balances 769.80 us/op 797.76 us/op 0.96
BeaconState.hashTreeRoot - 512 balances 6.7944 ms/op 6.3721 ms/op 1.07
BeaconState.hashTreeRoot - 250000 balances 130.19 ms/op 141.77 ms/op 0.92
aggregationBits - 2048 els - zipIndexesInBitList 19.612 us/op 20.064 us/op 0.98
regular array get 100000 times 22.259 us/op 22.684 us/op 0.98
wrappedArray get 100000 times 22.378 us/op 22.639 us/op 0.99
arrayWithProxy get 100000 times 9.2292 ms/op 17.422 ms/op 0.53
ssz.Root.equals 20.838 ns/op 21.150 ns/op 0.99
byteArrayEquals 20.653 ns/op 20.940 ns/op 0.99
Buffer.compare 8.5400 ns/op 8.7000 ns/op 0.98
processSlot - 1 slots 9.8020 us/op 10.561 us/op 0.93
processSlot - 32 slots 2.2102 ms/op 2.1867 ms/op 1.01
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 5.1273 ms/op 4.6360 ms/op 1.11
getCommitteeAssignments - req 1 vs - 250000 vc 1.6327 ms/op 1.6373 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.3620 ms/op 3.3925 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6239 ms/op 3.5816 ms/op 1.01
findModifiedValidators - 10000 modified validators 742.79 ms/op 821.86 ms/op 0.90
findModifiedValidators - 1000 modified validators 524.51 ms/op 539.62 ms/op 0.97
findModifiedValidators - 100 modified validators 275.94 ms/op 353.55 ms/op 0.78
findModifiedValidators - 10 modified validators 236.27 ms/op 209.55 ms/op 1.13
findModifiedValidators - 1 modified validators 124.03 ms/op 157.38 ms/op 0.79
findModifiedValidators - no difference 142.58 ms/op 156.32 ms/op 0.91
migrate state 1500000 validators, 3400 modified, 2000 new 2.8492 s/op 3.1804 s/op 0.90
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.5600 ns/op 3.6100 ns/op 0.99
state getBlockRootAtSlot - 250000 vs - 7PWei 338.85 ns/op 366.00 ns/op 0.93
computeProposerIndex 100000 validators 1.2886 ms/op 1.3204 ms/op 0.98
getNextSyncCommitteeIndices 1000 validators 2.8226 ms/op 2.8527 ms/op 0.99
getNextSyncCommitteeIndices 10000 validators 24.851 ms/op 24.933 ms/op 1.00
getNextSyncCommitteeIndices 100000 validators 81.346 ms/op 87.304 ms/op 0.93
computeProposers - vc 250000 539.26 us/op 542.82 us/op 0.99
computeEpochShuffling - vc 250000 38.820 ms/op 38.218 ms/op 1.02
getNextSyncCommittee - vc 250000 9.2385 ms/op 9.2396 ms/op 1.00
nodejs block root to RootHex using toHex 85.331 ns/op 87.435 ns/op 0.98
nodejs block root to RootHex using toRootHex 50.714 ns/op 51.464 ns/op 0.99
nodejs fromHex(blob) 706.64 us/op 766.96 us/op 0.92
nodejs fromHexInto(blob) 614.39 us/op 610.14 us/op 1.01
nodejs block root to RootHex using the deprecated toHexString 479.09 ns/op 482.44 ns/op 0.99
nodejs byteArrayEquals 32 bytes (block root) 25.558 ns/op 25.668 ns/op 1.00
nodejs byteArrayEquals 48 bytes (pubkey) 37.131 ns/op 37.188 ns/op 1.00
nodejs byteArrayEquals 96 bytes (signature) 32.838 ns/op 33.006 ns/op 0.99
nodejs byteArrayEquals 1024 bytes 39.502 ns/op 41.004 ns/op 0.96
nodejs byteArrayEquals 131072 bytes (blob) 1.7273 us/op 1.7314 us/op 1.00
browser block root to RootHex using toHex 145.12 ns/op 142.46 ns/op 1.02
browser block root to RootHex using toRootHex 132.67 ns/op 128.01 ns/op 1.04
browser fromHex(blob) 1.8669 ms/op 1.4823 ms/op 1.26
browser fromHexInto(blob) 602.83 us/op 606.29 us/op 0.99
browser block root to RootHex using the deprecated toHexString 466.35 ns/op 327.46 ns/op 1.42
browser byteArrayEquals 32 bytes (block root) 26.895 ns/op 27.306 ns/op 0.98
browser byteArrayEquals 48 bytes (pubkey) 37.817 ns/op 38.816 ns/op 0.97
browser byteArrayEquals 96 bytes (signature) 70.861 ns/op 72.078 ns/op 0.98
browser byteArrayEquals 1024 bytes 721.77 ns/op 736.41 ns/op 0.98
browser byteArrayEquals 131072 bytes (blob) 91.100 us/op 93.344 us/op 0.98

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 1070262 into unstable May 30, 2026
19 of 20 checks passed
@wemeetagain wemeetagain deleted the nflaig/fix-ptc-committee-branch-state branch May 30, 2026 18:13
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.

2 participants