Skip to content

feat: wire up proposer_preferences gossip topic - #9275

Merged
wemeetagain merged 8 commits into
unstablefrom
nflaig/proposer-preferences-gossip
Apr 25, 2026
Merged

feat: wire up proposer_preferences gossip topic#9275
wemeetagain merged 8 commits into
unstablefrom
nflaig/proposer-preferences-gossip

Conversation

@nflaig

@nflaig nflaig commented Apr 24, 2026

Copy link
Copy Markdown
Member

No description provided.

@nflaig
nflaig requested a review from a team as a code owner April 24, 2026 21:55

@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: d817b4893f

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

Comment thread packages/beacon-node/src/chain/validation/proposerPreferences.ts Outdated

@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 ProposerPreferences gossip topic and validation logic for the Gloas fork. It introduces a SeenProposerPreferences cache, error types, and signature verification routines. The feedback identifies a performance optimization in the validation flow to avoid unnecessary state fetches for duplicate messages and suggests increasing the expectedMessageRate in gossip scoring to accurately reflect network activity.

Comment thread packages/beacon-node/src/chain/validation/proposerPreferences.ts Outdated
Comment thread packages/beacon-node/src/network/gossip/scoringParameters.ts Outdated
@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: bd0acb0 Previous: dfb984e Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 827.09 us/op 884.03 us/op 0.94
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 37.097 us/op 38.477 us/op 0.96
BLS verify - blst 609.84 us/op 686.06 us/op 0.89
BLS verifyMultipleSignatures 3 - blst 1.2601 ms/op 1.3123 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst 2.0026 ms/op 2.0813 ms/op 0.96
BLS verifyMultipleSignatures 32 - blst 6.2743 ms/op 6.5533 ms/op 0.96
BLS verifyMultipleSignatures 64 - blst 12.222 ms/op 12.766 ms/op 0.96
BLS verifyMultipleSignatures 128 - blst 23.883 ms/op 24.976 ms/op 0.96
BLS deserializing 10000 signatures 606.16 ms/op 630.89 ms/op 0.96
BLS deserializing 100000 signatures 6.0917 s/op 6.3029 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst 760.07 us/op 779.59 us/op 0.97
BLS verifyMultipleSignatures - same message - 8 - blst 881.09 us/op 920.36 us/op 0.96
BLS verifyMultipleSignatures - same message - 32 - blst 1.4340 ms/op 1.4992 ms/op 0.96
BLS verifyMultipleSignatures - same message - 64 - blst 2.3062 ms/op 2.4073 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst 3.8670 ms/op 4.0295 ms/op 0.96
BLS aggregatePubkeys 32 - blst 16.837 us/op 17.526 us/op 0.96
BLS aggregatePubkeys 128 - blst 59.915 us/op 62.424 us/op 0.96
getSlashingsAndExits - default max 43.973 us/op 45.811 us/op 0.96
getSlashingsAndExits - 2k 331.29 us/op 334.50 us/op 0.99
proposeBlockBody type=full, size=empty 628.17 us/op 678.12 us/op 0.93
isKnown best case - 1 super set check 167.00 ns/op 168.00 ns/op 0.99
isKnown normal case - 2 super set checks 166.00 ns/op 164.00 ns/op 1.01
isKnown worse case - 16 super set checks 173.00 ns/op 165.00 ns/op 1.05
validate api signedAggregateAndProof - struct 1.4032 ms/op 1.4763 ms/op 0.95
validate gossip signedAggregateAndProof - struct 1.4044 ms/op 1.4758 ms/op 0.95
batch validate gossip attestation - vc 640000 - chunk 32 100.99 us/op 104.83 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 64 88.263 us/op 92.527 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 128 82.782 us/op 85.487 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 256 79.451 us/op 82.571 us/op 0.96
bytes32 toHexString 280.00 ns/op 286.00 ns/op 0.98
bytes32 Buffer.toString(hex) 186.00 ns/op 167.00 ns/op 1.11
bytes32 Buffer.toString(hex) from Uint8Array 242.00 ns/op 236.00 ns/op 1.03
bytes32 Buffer.toString(hex) + 0x 185.00 ns/op 163.00 ns/op 1.13
Return object 10000 times 0.20340 ns/op 0.21010 ns/op 0.97
Throw Error 10000 times 3.1261 us/op 3.3099 us/op 0.94
toHex 86.672 ns/op 89.266 ns/op 0.97
Buffer.from 79.755 ns/op 82.575 ns/op 0.97
shared Buffer 52.975 ns/op 54.662 ns/op 0.97
fastMsgIdFn sha256 / 200 bytes 1.4020 us/op 1.4880 us/op 0.94
fastMsgIdFn h32 xxhash / 200 bytes 169.00 ns/op 145.00 ns/op 1.17
fastMsgIdFn h64 xxhash / 200 bytes 212.00 ns/op 193.00 ns/op 1.10
fastMsgIdFn sha256 / 1000 bytes 4.5540 us/op 4.8200 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 240.00 ns/op 233.00 ns/op 1.03
fastMsgIdFn h64 xxhash / 1000 bytes 256.00 ns/op 238.00 ns/op 1.08
fastMsgIdFn sha256 / 10000 bytes 40.262 us/op 42.541 us/op 0.95
fastMsgIdFn h32 xxhash / 10000 bytes 1.2230 us/op 1.2440 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 801.00 ns/op 793.00 ns/op 1.01
send data - 1000 256B messages 3.9959 ms/op 4.2274 ms/op 0.95
send data - 1000 512B messages 4.0878 ms/op 4.2085 ms/op 0.97
send data - 1000 1024B messages 4.2602 ms/op 4.3843 ms/op 0.97
send data - 1000 1200B messages 4.4416 ms/op 4.6226 ms/op 0.96
send data - 1000 2048B messages 4.6303 ms/op 4.8690 ms/op 0.95
send data - 1000 4096B messages 5.3411 ms/op 5.6118 ms/op 0.95
send data - 1000 16384B messages 36.684 ms/op 15.249 ms/op 2.41
send data - 1000 65536B messages 140.16 ms/op 219.81 ms/op 0.64
enrSubnets - fastDeserialize 64 bits 762.00 ns/op 750.00 ns/op 1.02
enrSubnets - ssz BitVector 64 bits 262.00 ns/op 256.00 ns/op 1.02
enrSubnets - fastDeserialize 4 bits 110.00 ns/op 97.000 ns/op 1.13
enrSubnets - ssz BitVector 4 bits 261.00 ns/op 258.00 ns/op 1.01
prioritizePeers score -10:0 att 32-0.1 sync 2-0 195.34 us/op 200.34 us/op 0.98
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 233.74 us/op 241.14 us/op 0.97
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 341.13 us/op 349.19 us/op 0.98
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 596.16 us/op 605.36 us/op 0.98
prioritizePeers score 0:0 att 64-1 sync 4-1 671.79 us/op 692.62 us/op 0.97
array of 16000 items push then shift 1.2068 us/op 1.2435 us/op 0.97
LinkedList of 16000 items push then shift 7.4400 ns/op 7.2540 ns/op 1.03
array of 16000 items push then pop 67.096 ns/op 66.455 ns/op 1.01
LinkedList of 16000 items push then pop 5.8650 ns/op 5.9010 ns/op 0.99
array of 24000 items push then shift 1.7671 us/op 1.8236 us/op 0.97
LinkedList of 24000 items push then shift 6.6520 ns/op 6.9340 ns/op 0.96
array of 24000 items push then pop 94.962 ns/op 91.254 ns/op 1.04
LinkedList of 24000 items push then pop 5.7840 ns/op 5.9340 ns/op 0.97
intersect bitArray bitLen 8 4.5550 ns/op 4.6900 ns/op 0.97
intersect array and set length 8 27.917 ns/op 28.843 ns/op 0.97
intersect bitArray bitLen 128 23.232 ns/op 23.673 ns/op 0.98
intersect array and set length 128 470.81 ns/op 488.64 ns/op 0.96
bitArray.getTrueBitIndexes() bitLen 128 988.00 ns/op 1.0980 us/op 0.90
bitArray.getTrueBitIndexes() bitLen 248 1.6820 us/op 1.9030 us/op 0.88
bitArray.getTrueBitIndexes() bitLen 512 3.4120 us/op 3.8980 us/op 0.88
Full columns - reconstruct all 6 blobs 196.03 us/op 218.61 us/op 0.90
Full columns - reconstruct half of the blobs out of 6 95.501 us/op 177.15 us/op 0.54
Full columns - reconstruct single blob out of 6 31.265 us/op 32.185 us/op 0.97
Half columns - reconstruct all 6 blobs 362.25 ms/op 380.05 ms/op 0.95
Half columns - reconstruct half of the blobs out of 6 180.74 ms/op 190.18 ms/op 0.95
Half columns - reconstruct single blob out of 6 64.386 ms/op 68.778 ms/op 0.94
Full columns - reconstruct all 10 blobs 265.49 us/op 204.22 us/op 1.30
Full columns - reconstruct half of the blobs out of 10 151.56 us/op 122.79 us/op 1.23
Full columns - reconstruct single blob out of 10 29.073 us/op 29.613 us/op 0.98
Half columns - reconstruct all 10 blobs 601.54 ms/op 639.34 ms/op 0.94
Half columns - reconstruct half of the blobs out of 10 301.56 ms/op 322.76 ms/op 0.93
Half columns - reconstruct single blob out of 10 65.445 ms/op 70.438 ms/op 0.93
Full columns - reconstruct all 20 blobs 1.4079 ms/op 1.0815 ms/op 1.30
Full columns - reconstruct half of the blobs out of 20 364.74 us/op 221.57 us/op 1.65
Full columns - reconstruct single blob out of 20 40.954 us/op 28.766 us/op 1.42
Half columns - reconstruct all 20 blobs 1.2055 s/op 1.2702 s/op 0.95
Half columns - reconstruct half of the blobs out of 20 601.54 ms/op 629.80 ms/op 0.96
Half columns - reconstruct single blob out of 20 65.046 ms/op 67.293 ms/op 0.97
Set add up to 64 items then delete first 1.9678 us/op 2.4493 us/op 0.80
OrderedSet add up to 64 items then delete first 3.1023 us/op 3.2202 us/op 0.96
Set add up to 64 items then delete last 1.9478 us/op 2.3244 us/op 0.84
OrderedSet add up to 64 items then delete last 3.0523 us/op 3.1809 us/op 0.96
Set add up to 64 items then delete middle 1.9489 us/op 2.0195 us/op 0.97
OrderedSet add up to 64 items then delete middle 4.4562 us/op 4.6187 us/op 0.96
Set add up to 128 items then delete first 3.8901 us/op 4.0835 us/op 0.95
OrderedSet add up to 128 items then delete first 6.0302 us/op 6.3450 us/op 0.95
Set add up to 128 items then delete last 3.5566 us/op 3.7263 us/op 0.95
OrderedSet add up to 128 items then delete last 5.4661 us/op 5.7043 us/op 0.96
Set add up to 128 items then delete middle 3.5694 us/op 3.7071 us/op 0.96
OrderedSet add up to 128 items then delete middle 10.957 us/op 11.396 us/op 0.96
Set add up to 256 items then delete first 7.2937 us/op 7.5087 us/op 0.97
OrderedSet add up to 256 items then delete first 12.128 us/op 12.073 us/op 1.00
Set add up to 256 items then delete last 7.0934 us/op 7.3776 us/op 0.96
OrderedSet add up to 256 items then delete last 10.965 us/op 11.105 us/op 0.99
Set add up to 256 items then delete middle 7.3505 us/op 7.3667 us/op 1.00
OrderedSet add up to 256 items then delete middle 37.246 us/op 34.660 us/op 1.07
pass gossip attestations to forkchoice per slot 2.4366 ms/op 2.4876 ms/op 0.98
forkChoice updateHead vc 100000 bc 64 eq 0 370.56 us/op 379.45 us/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 0 2.6466 ms/op 2.2626 ms/op 1.17
forkChoice updateHead vc 1000000 bc 64 eq 0 3.6737 ms/op 3.8039 ms/op 0.97
forkChoice updateHead vc 600000 bc 320 eq 0 2.2279 ms/op 2.2988 ms/op 0.97
forkChoice updateHead vc 600000 bc 1200 eq 0 2.2519 ms/op 2.3568 ms/op 0.96
forkChoice updateHead vc 600000 bc 7200 eq 0 2.7678 ms/op 3.0930 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 1000 2.7846 ms/op 2.8620 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 10000 2.8429 ms/op 2.9195 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 300000 6.3184 ms/op 6.4117 ms/op 0.99
computeDeltas 1400000 validators 0% inactive 11.909 ms/op 12.215 ms/op 0.97
computeDeltas 1400000 validators 10% inactive 11.129 ms/op 11.355 ms/op 0.98
computeDeltas 1400000 validators 20% inactive 10.135 ms/op 10.370 ms/op 0.98
computeDeltas 1400000 validators 50% inactive 7.8424 ms/op 8.0041 ms/op 0.98
computeDeltas 2100000 validators 0% inactive 17.911 ms/op 18.204 ms/op 0.98
computeDeltas 2100000 validators 10% inactive 17.780 ms/op 17.118 ms/op 1.04
computeDeltas 2100000 validators 20% inactive 15.403 ms/op 15.678 ms/op 0.98
computeDeltas 2100000 validators 50% inactive 9.1085 ms/op 9.1661 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei normalcase 1.8487 ms/op 1.8765 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei worstcase 2.5976 ms/op 3.0733 ms/op 0.85
altair processAttestation - setStatus - 1/6 committees join 101.82 us/op 98.490 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 197.75 us/op 195.33 us/op 1.01
altair processAttestation - setStatus - 1/2 committees join 274.20 us/op 272.69 us/op 1.01
altair processAttestation - setStatus - 2/3 committees join 356.42 us/op 346.45 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 488.15 us/op 484.38 us/op 1.01
altair processAttestation - setStatus - 100% committees join 581.26 us/op 590.82 us/op 0.98
altair processBlock - 250000 vs - 7PWei normalcase 3.7250 ms/op 4.9003 ms/op 0.76
altair processBlock - 250000 vs - 7PWei normalcase hashState 15.475 ms/op 16.985 ms/op 0.91
altair processBlock - 250000 vs - 7PWei worstcase 20.494 ms/op 21.622 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase hashState 40.704 ms/op 45.051 ms/op 0.90
phase0 processBlock - 250000 vs - 7PWei normalcase 1.1939 ms/op 1.3433 ms/op 0.89
phase0 processBlock - 250000 vs - 7PWei worstcase 16.135 ms/op 16.954 ms/op 0.95
altair processEth1Data - 250000 vs - 7PWei normalcase 271.50 us/op 280.42 us/op 0.97
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.0450 us/op 2.9400 us/op 1.04
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 18.835 us/op 21.188 us/op 0.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.3640 us/op 5.3500 us/op 1.00
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.4970 us/op 3.3350 us/op 1.05
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 85.437 us/op 85.846 us/op 1.00
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3213 ms/op 1.3422 ms/op 0.98
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7209 ms/op 1.7660 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.7149 ms/op 1.7578 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6231 ms/op 3.7068 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9836 ms/op 1.9967 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.1569 ms/op 4.0332 ms/op 1.03
Tree 40 250000 create 304.62 ms/op 331.77 ms/op 0.92
Tree 40 250000 get(125000) 85.881 ns/op 89.108 ns/op 0.96
Tree 40 250000 set(125000) 927.74 ns/op 983.41 ns/op 0.94
Tree 40 250000 toArray() 11.178 ms/op 15.777 ms/op 0.71
Tree 40 250000 iterate all - toArray() + loop 11.365 ms/op 15.930 ms/op 0.71
Tree 40 250000 iterate all - get(i) 33.842 ms/op 38.451 ms/op 0.88
Array 250000 create 2.0357 ms/op 2.2780 ms/op 0.89
Array 250000 clone - spread 626.36 us/op 662.98 us/op 0.94
Array 250000 get(125000) 0.27800 ns/op 0.29400 ns/op 0.95
Array 250000 set(125000) 0.28000 ns/op 0.29600 ns/op 0.95
Array 250000 iterate all - loop 54.330 us/op 56.773 us/op 0.96
phase0 afterProcessEpoch - 250000 vs - 7PWei 38.199 ms/op 40.424 ms/op 0.94
Array.fill - length 1000000 2.0093 ms/op 2.1958 ms/op 0.92
Array push - length 1000000 8.0657 ms/op 9.2622 ms/op 0.87
Array.get 0.19472 ns/op 0.20663 ns/op 0.94
Uint8Array.get 0.21835 ns/op 0.23444 ns/op 0.93
phase0 beforeProcessEpoch - 250000 vs - 7PWei 14.638 ms/op 15.085 ms/op 0.97
altair processEpoch - mainnet_e81889 254.54 ms/op 282.31 ms/op 0.90
mainnet_e81889 - altair beforeProcessEpoch 16.216 ms/op 17.313 ms/op 0.94
mainnet_e81889 - altair processJustificationAndFinalization 5.6440 us/op 6.3560 us/op 0.89
mainnet_e81889 - altair processInactivityUpdates 5.0983 ms/op 6.0327 ms/op 0.85
mainnet_e81889 - altair processRewardsAndPenalties 19.874 ms/op 20.569 ms/op 0.97
mainnet_e81889 - altair processRegistryUpdates 517.00 ns/op 543.00 ns/op 0.95
mainnet_e81889 - altair processSlashings 122.00 ns/op 138.00 ns/op 0.88
mainnet_e81889 - altair processEth1DataReset 122.00 ns/op 123.00 ns/op 0.99
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4761 ms/op 7.4788 ms/op 0.20
mainnet_e81889 - altair processSlashingsReset 678.00 ns/op 741.00 ns/op 0.91
mainnet_e81889 - altair processRandaoMixesReset 1.0610 us/op 1.3910 us/op 0.76
mainnet_e81889 - altair processHistoricalRootsUpdate 122.00 ns/op 134.00 ns/op 0.91
mainnet_e81889 - altair processParticipationFlagUpdates 412.00 ns/op 433.00 ns/op 0.95
mainnet_e81889 - altair processSyncCommitteeUpdates 96.000 ns/op 114.00 ns/op 0.84
mainnet_e81889 - altair afterProcessEpoch 38.873 ms/op 43.841 ms/op 0.89
capella processEpoch - mainnet_e217614 812.97 ms/op 859.48 ms/op 0.95
mainnet_e217614 - capella beforeProcessEpoch 64.554 ms/op 62.188 ms/op 1.04
mainnet_e217614 - capella processJustificationAndFinalization 5.6890 us/op 6.3340 us/op 0.90
mainnet_e217614 - capella processInactivityUpdates 16.940 ms/op 17.515 ms/op 0.97
mainnet_e217614 - capella processRewardsAndPenalties 83.856 ms/op 93.989 ms/op 0.89
mainnet_e217614 - capella processRegistryUpdates 4.3210 us/op 4.4900 us/op 0.96
mainnet_e217614 - capella processSlashings 124.00 ns/op 133.00 ns/op 0.93
mainnet_e217614 - capella processEth1DataReset 124.00 ns/op 126.00 ns/op 0.98
mainnet_e217614 - capella processEffectiveBalanceUpdates 13.469 ms/op 16.501 ms/op 0.82
mainnet_e217614 - capella processSlashingsReset 651.00 ns/op 709.00 ns/op 0.92
mainnet_e217614 - capella processRandaoMixesReset 1.1070 us/op 1.3270 us/op 0.83
mainnet_e217614 - capella processHistoricalRootsUpdate 126.00 ns/op 129.00 ns/op 0.98
mainnet_e217614 - capella processParticipationFlagUpdates 415.00 ns/op 423.00 ns/op 0.98
mainnet_e217614 - capella afterProcessEpoch 105.65 ms/op 112.36 ms/op 0.94
phase0 processEpoch - mainnet_e58758 282.05 ms/op 327.47 ms/op 0.86
mainnet_e58758 - phase0 beforeProcessEpoch 59.258 ms/op 69.562 ms/op 0.85
mainnet_e58758 - phase0 processJustificationAndFinalization 5.2730 us/op 6.4920 us/op 0.81
mainnet_e58758 - phase0 processRewardsAndPenalties 15.414 ms/op 16.962 ms/op 0.91
mainnet_e58758 - phase0 processRegistryUpdates 2.1890 us/op 2.3000 us/op 0.95
mainnet_e58758 - phase0 processSlashings 124.00 ns/op 140.00 ns/op 0.89
mainnet_e58758 - phase0 processEth1DataReset 125.00 ns/op 133.00 ns/op 0.94
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 778.96 us/op 1.0514 ms/op 0.74
mainnet_e58758 - phase0 processSlashingsReset 838.00 ns/op 915.00 ns/op 0.92
mainnet_e58758 - phase0 processRandaoMixesReset 1.0660 us/op 1.2510 us/op 0.85
mainnet_e58758 - phase0 processHistoricalRootsUpdate 128.00 ns/op 136.00 ns/op 0.94
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.0360 us/op 1.1450 us/op 0.90
mainnet_e58758 - phase0 afterProcessEpoch 32.070 ms/op 33.842 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 normalcase 947.52 us/op 992.17 us/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1639 ms/op 1.5472 ms/op 0.75
altair processInactivityUpdates - 250000 normalcase 11.106 ms/op 13.229 ms/op 0.84
altair processInactivityUpdates - 250000 worstcase 11.037 ms/op 11.684 ms/op 0.94
phase0 processRegistryUpdates - 250000 normalcase 2.1520 us/op 2.1010 us/op 1.02
phase0 processRegistryUpdates - 250000 badcase_full_deposits 142.89 us/op 143.83 us/op 0.99
phase0 processRegistryUpdates - 250000 worstcase 0.5 58.659 ms/op 62.072 ms/op 0.95
altair processRewardsAndPenalties - 250000 normalcase 15.378 ms/op 17.170 ms/op 0.90
altair processRewardsAndPenalties - 250000 worstcase 14.811 ms/op 16.720 ms/op 0.89
phase0 getAttestationDeltas - 250000 normalcase 5.0322 ms/op 5.2748 ms/op 0.95
phase0 getAttestationDeltas - 250000 worstcase 5.1263 ms/op 5.3941 ms/op 0.95
phase0 processSlashings - 250000 worstcase 56.942 us/op 57.109 us/op 1.00
altair processSyncCommitteeUpdates - 250000 9.5258 ms/op 10.298 ms/op 0.93
BeaconState.hashTreeRoot - No change 190.00 ns/op 192.00 ns/op 0.99
BeaconState.hashTreeRoot - 1 full validator 65.178 us/op 84.048 us/op 0.78
BeaconState.hashTreeRoot - 32 full validator 823.81 us/op 992.32 us/op 0.83
BeaconState.hashTreeRoot - 512 full validator 6.6398 ms/op 7.5720 ms/op 0.88
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 79.942 us/op 97.980 us/op 0.82
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.2805 ms/op 1.4205 ms/op 0.90
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 14.470 ms/op 18.402 ms/op 0.79
BeaconState.hashTreeRoot - 1 balances 66.670 us/op 85.347 us/op 0.78
BeaconState.hashTreeRoot - 32 balances 681.44 us/op 779.43 us/op 0.87
BeaconState.hashTreeRoot - 512 balances 5.3075 ms/op 6.0564 ms/op 0.88
BeaconState.hashTreeRoot - 250000 balances 129.63 ms/op 139.50 ms/op 0.93
aggregationBits - 2048 els - zipIndexesInBitList 18.629 us/op 19.625 us/op 0.95
regular array get 100000 times 21.866 us/op 23.397 us/op 0.93
wrappedArray get 100000 times 22.085 us/op 23.532 us/op 0.94
arrayWithProxy get 100000 times 9.0767 ms/op 9.9041 ms/op 0.92
ssz.Root.equals 20.539 ns/op 21.920 ns/op 0.94
byteArrayEquals 20.299 ns/op 21.770 ns/op 0.93
Buffer.compare 8.3570 ns/op 9.0360 ns/op 0.92
processSlot - 1 slots 8.2890 us/op 10.750 us/op 0.77
processSlot - 32 slots 2.0046 ms/op 2.2691 ms/op 0.88
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.9388 ms/op 3.2481 ms/op 1.52
getCommitteeAssignments - req 1 vs - 250000 vc 1.5850 ms/op 1.6456 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 3.2826 ms/op 3.3644 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 3.5293 ms/op 3.6186 ms/op 0.98
findModifiedValidators - 10000 modified validators 725.14 ms/op 616.00 ms/op 1.18
findModifiedValidators - 1000 modified validators 525.19 ms/op 425.24 ms/op 1.24
findModifiedValidators - 100 modified validators 277.59 ms/op 305.94 ms/op 0.91
findModifiedValidators - 10 modified validators 209.62 ms/op 226.54 ms/op 0.93
findModifiedValidators - 1 modified validators 174.98 ms/op 139.41 ms/op 1.26
findModifiedValidators - no difference 142.81 ms/op 146.57 ms/op 0.97
migrate state 1500000 validators, 3400 modified, 2000 new 2.7446 s/op 2.9298 s/op 0.94
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.5900 ns/op 3.6500 ns/op 0.98
state getBlockRootAtSlot - 250000 vs - 7PWei 323.51 ns/op 336.29 ns/op 0.96
computeProposerIndex 100000 validators 1.2665 ms/op 1.3308 ms/op 0.95
getNextSyncCommitteeIndices 1000 validators 2.7219 ms/op 2.8415 ms/op 0.96
getNextSyncCommitteeIndices 10000 validators 23.866 ms/op 25.285 ms/op 0.94
getNextSyncCommitteeIndices 100000 validators 82.887 ms/op 88.623 ms/op 0.94
computeProposers - vc 250000 527.47 us/op 575.40 us/op 0.92
computeEpochShuffling - vc 250000 37.542 ms/op 39.557 ms/op 0.95
getNextSyncCommittee - vc 250000 8.9997 ms/op 9.6957 ms/op 0.93
nodejs block root to RootHex using toHex 89.506 ns/op 93.021 ns/op 0.96
nodejs block root to RootHex using toRootHex 54.114 ns/op 57.144 ns/op 0.95
nodejs fromHex(blob) 716.61 us/op 718.87 us/op 1.00
nodejs fromHexInto(blob) 599.49 us/op 643.47 us/op 0.93
nodejs block root to RootHex using the deprecated toHexString 462.73 ns/op 462.29 ns/op 1.00
nodejs byteArrayEquals 32 bytes (block root) 24.701 ns/op 25.539 ns/op 0.97
nodejs byteArrayEquals 48 bytes (pubkey) 35.884 ns/op 36.892 ns/op 0.97
nodejs byteArrayEquals 96 bytes (signature) 31.725 ns/op 33.209 ns/op 0.96
nodejs byteArrayEquals 1024 bytes 38.083 ns/op 40.970 ns/op 0.93
nodejs byteArrayEquals 131072 bytes (blob) 1.6589 us/op 1.7232 us/op 0.96
browser block root to RootHex using toHex 137.12 ns/op 141.57 ns/op 0.97
browser block root to RootHex using toRootHex 123.56 ns/op 128.04 ns/op 0.97
browser fromHex(blob) 1.4009 ms/op 1.4586 ms/op 0.96
browser fromHexInto(blob) 617.91 us/op 650.72 us/op 0.95
browser block root to RootHex using the deprecated toHexString 464.13 ns/op 453.65 ns/op 1.02
browser byteArrayEquals 32 bytes (block root) 26.897 ns/op 27.771 ns/op 0.97
browser byteArrayEquals 48 bytes (pubkey) 37.820 ns/op 38.834 ns/op 0.97
browser byteArrayEquals 96 bytes (signature) 70.754 ns/op 72.381 ns/op 0.98
browser byteArrayEquals 1024 bytes 726.65 ns/op 735.92 ns/op 0.99
browser byteArrayEquals 131072 bytes (blob) 91.488 us/op 93.522 us/op 0.98

by benchmarkbot/action

@nflaig nflaig added the spec-gloas Issues targeting the Glamsterdam spec version label Apr 24, 2026
@nflaig
nflaig marked this pull request as draft April 24, 2026 22:30
@nflaig
nflaig marked this pull request as ready for review April 24, 2026 22:35
ensi321
ensi321 previously approved these changes Apr 24, 2026

@ensi321 ensi321 left a comment

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.

Not fully reviewed but this is low risk to merge

@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: f5a3f03a30

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

Comment thread packages/beacon-node/src/chain/validation/proposerPreferences.ts Outdated
@nflaig

nflaig commented Apr 24, 2026

Copy link
Copy Markdown
Member Author

going to merge this into glamsterdam-devnet-0 branch for now

nflaig added a commit that referenced this pull request Apr 24, 2026

@wemeetagain wemeetagain left a comment

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.

lgtm, everything looks good

@wemeetagain
wemeetagain merged commit 66d2c10 into unstable Apr 25, 2026
19 checks passed
@wemeetagain
wemeetagain deleted the nflaig/proposer-preferences-gossip branch April 25, 2026 18:30
@codecov

codecov Bot commented Apr 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.58%. Comparing base (dfb984e) to head (47b9e95).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #9275   +/-   ##
=========================================
  Coverage     52.58%   52.58%           
=========================================
  Files           848      848           
  Lines         61136    61136           
  Branches       4505     4505           
=========================================
  Hits          32147    32147           
  Misses        28925    28925           
  Partials         64       64           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

] = getTopicScoreParams(config, precomputedParams, {
topicWeight: PROPOSER_PREFERENCES_WEIGHT,
// Upper bound ~64 messages per epoch: one per proposer across the current + next epoch.
expectedMessageRate: 64 / SLOTS_PER_EPOCH,

@nflaig nflaig Apr 25, 2026

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.

could be more if there is a epoch boundary reorg which causes dependent root to change but this also depends on how clients will broadcast these, either way this seems fine

dropOpts: {type: DropType.count, count: 1},
},
[GossipType.proposer_preferences]: {
maxLength: 1024,

@nflaig nflaig Apr 25, 2026

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.

this queue is likely way too long but not sure that really matters much

@wemeetagain

Copy link
Copy Markdown
Member

🎉 This PR is included in v1.43.0 🎉

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

Labels

spec-gloas Issues targeting the Glamsterdam spec version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants