Skip to content

feat: modify fork digest to distinguish BPO forks#8022

Merged
ensi321 merged 40 commits into
unstablefrom
nflaig/bpo-fork-digest
Jul 8, 2025
Merged

feat: modify fork digest to distinguish BPO forks#8022
ensi321 merged 40 commits into
unstablefrom
nflaig/bpo-fork-digest

Conversation

@nflaig

@nflaig nflaig commented Jun 29, 2025

Copy link
Copy Markdown
Member

Motivation

Description

  • add concept of fork boundaries (ForkBoundary) which include both normal hard-forks (phase0, altair, etc.) and Blob Parameter Only (BPO) forks and are used to un-/subscribe to gossip topics and compute the fork digest primarily for domain separation on the p2p layer
  • mix in blob parameters (BlobParameters) when computing fork digest (computeForkDigest) post-fulu
  • update ENR fork id (ENRForkID) to consider fork boundaries (next fork digest (nfd) will be updated in feat: add next fork digest (nfd) entry to ENR #8023)
  • cache pre-computed fork digests by epoch instead of fork name in genesis config cache

@nflaig nflaig force-pushed the nflaig/bpo-fork-digest branch from 8eeab45 to 8d70582 Compare June 29, 2025 15:08
@nflaig nflaig marked this pull request as ready for review June 29, 2025 15:09
@nflaig nflaig requested a review from a team as a code owner June 29, 2025 15:09
@github-actions

github-actions Bot commented Jun 29, 2025

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: bfd4f9a Previous: d9dc444 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0807 ms/op 766.65 us/op 1.41
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 37.067 us/op 28.783 us/op 1.29
BLS verify - blst 833.84 us/op 908.50 us/op 0.92
BLS verifyMultipleSignatures 3 - blst 1.2014 ms/op 1.5383 ms/op 0.78
BLS verifyMultipleSignatures 8 - blst 1.7875 ms/op 2.1529 ms/op 0.83
BLS verifyMultipleSignatures 32 - blst 5.3545 ms/op 4.6352 ms/op 1.16
BLS verifyMultipleSignatures 64 - blst 9.2515 ms/op 8.3233 ms/op 1.11
BLS verifyMultipleSignatures 128 - blst 17.424 ms/op 15.891 ms/op 1.10
BLS deserializing 10000 signatures 721.68 ms/op 612.79 ms/op 1.18
BLS deserializing 100000 signatures 7.1010 s/op 6.3247 s/op 1.12
BLS verifyMultipleSignatures - same message - 3 - blst 855.09 us/op 931.13 us/op 0.92
BLS verifyMultipleSignatures - same message - 8 - blst 1.0236 ms/op 1.0773 ms/op 0.95
BLS verifyMultipleSignatures - same message - 32 - blst 1.7528 ms/op 1.6422 ms/op 1.07
BLS verifyMultipleSignatures - same message - 64 - blst 2.6909 ms/op 2.4714 ms/op 1.09
BLS verifyMultipleSignatures - same message - 128 - blst 4.3775 ms/op 4.1900 ms/op 1.04
BLS aggregatePubkeys 32 - blst 19.506 us/op 17.862 us/op 1.09
BLS aggregatePubkeys 128 - blst 69.731 us/op 65.292 us/op 1.07
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 68.988 ms/op 46.780 ms/op 1.47
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 49.475 ms/op 48.630 ms/op 1.02
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 38.995 ms/op 31.822 ms/op 1.23
getSlashingsAndExits - default max 77.127 us/op 53.266 us/op 1.45
getSlashingsAndExits - 2k 332.60 us/op 299.55 us/op 1.11
proposeBlockBody type=full, size=empty 7.1647 ms/op 4.6548 ms/op 1.54
isKnown best case - 1 super set check 209.00 ns/op 408.00 ns/op 0.51
isKnown normal case - 2 super set checks 204.00 ns/op 389.00 ns/op 0.52
isKnown worse case - 16 super set checks 201.00 ns/op 388.00 ns/op 0.52
InMemoryCheckpointStateCache - add get delete 2.4090 us/op 2.4140 us/op 1.00
validate api signedAggregateAndProof - struct 1.5817 ms/op 1.3905 ms/op 1.14
validate gossip signedAggregateAndProof - struct 1.4213 ms/op 1.9122 ms/op 0.74
batch validate gossip attestation - vc 640000 - chunk 32 117.73 us/op 108.71 us/op 1.08
batch validate gossip attestation - vc 640000 - chunk 64 104.51 us/op 92.965 us/op 1.12
batch validate gossip attestation - vc 640000 - chunk 128 96.839 us/op 85.331 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 256 99.997 us/op 83.748 us/op 1.19
pickEth1Vote - no votes 933.09 us/op 697.37 us/op 1.34
pickEth1Vote - max votes 5.3517 ms/op 4.9936 ms/op 1.07
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.481 ms/op 10.221 ms/op 1.12
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.827 ms/op 16.461 ms/op 1.02
pickEth1Vote - Eth1Data fastSerialize value x2048 433.16 us/op 312.50 us/op 1.39
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.7703 ms/op 2.3677 ms/op 1.59
bytes32 toHexString 372.00 ns/op 465.00 ns/op 0.80
bytes32 Buffer.toString(hex) 233.00 ns/op 383.00 ns/op 0.61
bytes32 Buffer.toString(hex) from Uint8Array 336.00 ns/op 541.00 ns/op 0.62
bytes32 Buffer.toString(hex) + 0x 235.00 ns/op 401.00 ns/op 0.59
Object access 1 prop 0.11800 ns/op 0.31000 ns/op 0.38
Map access 1 prop 0.12600 ns/op 0.31700 ns/op 0.40
Object get x1000 5.8680 ns/op 5.1430 ns/op 1.14
Map get x1000 6.4300 ns/op 5.8950 ns/op 1.09
Object set x1000 30.814 ns/op 18.319 ns/op 1.68
Map set x1000 20.893 ns/op 16.391 ns/op 1.27
Return object 10000 times 0.29130 ns/op 0.27230 ns/op 1.07
Throw Error 10000 times 4.4675 us/op 3.1888 us/op 1.40
toHex 138.15 ns/op 85.659 ns/op 1.61
Buffer.from 131.03 ns/op 85.995 ns/op 1.52
shared Buffer 87.991 ns/op 59.111 ns/op 1.49
fastMsgIdFn sha256 / 200 bytes 2.2180 us/op 1.8070 us/op 1.23
fastMsgIdFn h32 xxhash / 200 bytes 207.00 ns/op 380.00 ns/op 0.54
fastMsgIdFn h64 xxhash / 200 bytes 266.00 ns/op 442.00 ns/op 0.60
fastMsgIdFn sha256 / 1000 bytes 7.2030 us/op 5.7290 us/op 1.26
fastMsgIdFn h32 xxhash / 1000 bytes 334.00 ns/op 515.00 ns/op 0.65
fastMsgIdFn h64 xxhash / 1000 bytes 339.00 ns/op 513.00 ns/op 0.66
fastMsgIdFn sha256 / 10000 bytes 64.427 us/op 49.084 us/op 1.31
fastMsgIdFn h32 xxhash / 10000 bytes 1.8300 us/op 1.8980 us/op 0.96
fastMsgIdFn h64 xxhash / 10000 bytes 1.2230 us/op 1.3130 us/op 0.93
send data - 1000 256B messages 13.488 ms/op 9.2750 ms/op 1.45
send data - 1000 512B messages 18.077 ms/op 12.677 ms/op 1.43
send data - 1000 1024B messages 30.396 ms/op 20.238 ms/op 1.50
send data - 1000 1200B messages 28.961 ms/op 14.243 ms/op 2.03
send data - 1000 2048B messages 22.316 ms/op 17.395 ms/op 1.28
send data - 1000 4096B messages 28.633 ms/op 17.698 ms/op 1.62
send data - 1000 16384B messages 70.082 ms/op 47.838 ms/op 1.46
send data - 1000 65536B messages 243.76 ms/op 230.18 ms/op 1.06
enrSubnets - fastDeserialize 64 bits 888.00 ns/op 956.00 ns/op 0.93
enrSubnets - ssz BitVector 64 bits 330.00 ns/op 485.00 ns/op 0.68
enrSubnets - fastDeserialize 4 bits 130.00 ns/op 314.00 ns/op 0.41
enrSubnets - ssz BitVector 4 bits 331.00 ns/op 472.00 ns/op 0.70
prioritizePeers score -10:0 att 32-0.1 sync 2-0 121.86 us/op 93.085 us/op 1.31
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 155.96 us/op 110.88 us/op 1.41
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 210.38 us/op 165.25 us/op 1.27
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 391.56 us/op 298.58 us/op 1.31
prioritizePeers score 0:0 att 64-1 sync 4-1 494.04 us/op 361.02 us/op 1.37
array of 16000 items push then shift 1.6464 us/op 1.1755 us/op 1.40
LinkedList of 16000 items push then shift 7.9210 ns/op 6.9680 ns/op 1.14
array of 16000 items push then pop 82.730 ns/op 62.921 ns/op 1.31
LinkedList of 16000 items push then pop 7.3120 ns/op 5.8610 ns/op 1.25
array of 24000 items push then shift 2.4040 us/op 1.7205 us/op 1.40
LinkedList of 24000 items push then shift 7.9550 ns/op 6.2530 ns/op 1.27
array of 24000 items push then pop 115.85 ns/op 84.054 ns/op 1.38
LinkedList of 24000 items push then pop 7.6850 ns/op 5.6890 ns/op 1.35
intersect bitArray bitLen 8 6.4550 ns/op 4.8460 ns/op 1.33
intersect array and set length 8 47.715 ns/op 29.566 ns/op 1.61
intersect bitArray bitLen 128 30.265 ns/op 24.283 ns/op 1.25
intersect array and set length 128 632.87 ns/op 536.90 ns/op 1.18
bitArray.getTrueBitIndexes() bitLen 128 1.0510 us/op 1.1350 us/op 0.93
bitArray.getTrueBitIndexes() bitLen 248 1.8240 us/op 1.8030 us/op 1.01
bitArray.getTrueBitIndexes() bitLen 512 3.8080 us/op 3.2860 us/op 1.16
Buffer.concat 32 items 700.00 ns/op 769.00 ns/op 0.91
Uint8Array.set 32 items 973.00 ns/op 1.0810 us/op 0.90
Buffer.copy 2.0860 us/op 2.0380 us/op 1.02
Uint8Array.set - with subarray 1.9130 us/op 1.7400 us/op 1.10
Uint8Array.set - without subarray 1.2030 us/op 1.2050 us/op 1.00
getUint32 - dataview 202.00 ns/op 373.00 ns/op 0.54
getUint32 - manual 120.00 ns/op 295.00 ns/op 0.41
Set add up to 64 items then delete first 2.3685 us/op 1.7762 us/op 1.33
OrderedSet add up to 64 items then delete first 3.6416 us/op 2.7467 us/op 1.33
Set add up to 64 items then delete last 2.9532 us/op 1.8701 us/op 1.58
OrderedSet add up to 64 items then delete last 4.6812 us/op 2.8049 us/op 1.67
Set add up to 64 items then delete middle 2.8847 us/op 1.8574 us/op 1.55
OrderedSet add up to 64 items then delete middle 6.5391 us/op 4.2017 us/op 1.56
Set add up to 128 items then delete first 7.0687 us/op 3.6768 us/op 1.92
OrderedSet add up to 128 items then delete first 9.0126 us/op 5.8210 us/op 1.55
Set add up to 128 items then delete last 5.5458 us/op 3.5483 us/op 1.56
OrderedSet add up to 128 items then delete last 8.1395 us/op 5.4554 us/op 1.49
Set add up to 128 items then delete middle 6.1228 us/op 3.5604 us/op 1.72
OrderedSet add up to 128 items then delete middle 17.049 us/op 11.122 us/op 1.53
Set add up to 256 items then delete first 12.624 us/op 7.2430 us/op 1.74
OrderedSet add up to 256 items then delete first 18.176 us/op 11.696 us/op 1.55
Set add up to 256 items then delete last 10.608 us/op 7.0278 us/op 1.51
OrderedSet add up to 256 items then delete last 16.435 us/op 11.477 us/op 1.43
Set add up to 256 items then delete middle 10.275 us/op 7.5249 us/op 1.37
OrderedSet add up to 256 items then delete middle 44.616 us/op 34.131 us/op 1.31
transfer serialized Status (84 B) 2.2400 us/op 1.9680 us/op 1.14
copy serialized Status (84 B) 1.1920 us/op 1.2450 us/op 0.96
transfer serialized SignedVoluntaryExit (112 B) 2.3020 us/op 2.0080 us/op 1.15
copy serialized SignedVoluntaryExit (112 B) 1.2330 us/op 1.2560 us/op 0.98
transfer serialized ProposerSlashing (416 B) 2.2100 us/op 2.0340 us/op 1.09
copy serialized ProposerSlashing (416 B) 1.1980 us/op 1.3760 us/op 0.87
transfer serialized Attestation (485 B) 2.2110 us/op 2.0670 us/op 1.07
copy serialized Attestation (485 B) 1.6100 us/op 1.3430 us/op 1.20
transfer serialized AttesterSlashing (33232 B) 2.9250 us/op 2.3000 us/op 1.27
copy serialized AttesterSlashing (33232 B) 5.6890 us/op 3.4750 us/op 1.64
transfer serialized Small SignedBeaconBlock (128000 B) 4.0860 us/op 2.5330 us/op 1.61
copy serialized Small SignedBeaconBlock (128000 B) 15.915 us/op 8.7420 us/op 1.82
transfer serialized Avg SignedBeaconBlock (200000 B) 3.9040 us/op 2.6980 us/op 1.45
copy serialized Avg SignedBeaconBlock (200000 B) 17.359 us/op 12.430 us/op 1.40
transfer serialized BlobsSidecar (524380 B) 4.3880 us/op 2.9980 us/op 1.46
copy serialized BlobsSidecar (524380 B) 96.159 us/op 52.791 us/op 1.82
transfer serialized Big SignedBeaconBlock (1000000 B) 5.4790 us/op 3.3490 us/op 1.64
copy serialized Big SignedBeaconBlock (1000000 B) 314.91 us/op 105.12 us/op 3.00
pass gossip attestations to forkchoice per slot 2.7287 ms/op 2.3654 ms/op 1.15
forkChoice updateHead vc 100000 bc 64 eq 0 448.07 us/op 364.17 us/op 1.23
forkChoice updateHead vc 600000 bc 64 eq 0 2.8466 ms/op 2.2335 ms/op 1.27
forkChoice updateHead vc 1000000 bc 64 eq 0 5.1522 ms/op 3.6148 ms/op 1.43
forkChoice updateHead vc 600000 bc 320 eq 0 2.8629 ms/op 2.0974 ms/op 1.36
forkChoice updateHead vc 600000 bc 1200 eq 0 3.5054 ms/op 2.2201 ms/op 1.58
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2247 ms/op 2.4049 ms/op 1.34
forkChoice updateHead vc 600000 bc 64 eq 1000 10.410 ms/op 8.9827 ms/op 1.16
forkChoice updateHead vc 600000 bc 64 eq 10000 10.325 ms/op 9.3761 ms/op 1.10
forkChoice updateHead vc 600000 bc 64 eq 300000 15.192 ms/op 9.9771 ms/op 1.52
computeDeltas 500000 validators 300 proto nodes 4.0819 ms/op 3.0735 ms/op 1.33
computeDeltas 500000 validators 1200 proto nodes 4.1538 ms/op 3.0655 ms/op 1.35
computeDeltas 500000 validators 7200 proto nodes 4.2301 ms/op 3.0223 ms/op 1.40
computeDeltas 750000 validators 300 proto nodes 6.2857 ms/op 4.6262 ms/op 1.36
computeDeltas 750000 validators 1200 proto nodes 6.6841 ms/op 4.6218 ms/op 1.45
computeDeltas 750000 validators 7200 proto nodes 6.5773 ms/op 4.6926 ms/op 1.40
computeDeltas 1400000 validators 300 proto nodes 11.211 ms/op 8.5988 ms/op 1.30
computeDeltas 1400000 validators 1200 proto nodes 10.939 ms/op 8.4740 ms/op 1.29
computeDeltas 1400000 validators 7200 proto nodes 10.995 ms/op 8.5768 ms/op 1.28
computeDeltas 2100000 validators 300 proto nodes 16.360 ms/op 12.968 ms/op 1.26
computeDeltas 2100000 validators 1200 proto nodes 16.664 ms/op 13.328 ms/op 1.25
computeDeltas 2100000 validators 7200 proto nodes 16.321 ms/op 13.034 ms/op 1.25
altair processAttestation - 250000 vs - 7PWei normalcase 2.1275 ms/op 1.6864 ms/op 1.26
altair processAttestation - 250000 vs - 7PWei worstcase 3.2886 ms/op 2.3905 ms/op 1.38
altair processAttestation - setStatus - 1/6 committees join 126.52 us/op 88.804 us/op 1.42
altair processAttestation - setStatus - 1/3 committees join 240.40 us/op 190.38 us/op 1.26
altair processAttestation - setStatus - 1/2 committees join 347.22 us/op 269.30 us/op 1.29
altair processAttestation - setStatus - 2/3 committees join 428.69 us/op 351.99 us/op 1.22
altair processAttestation - setStatus - 4/5 committees join 592.39 us/op 487.82 us/op 1.21
altair processAttestation - setStatus - 100% committees join 711.39 us/op 583.18 us/op 1.22
altair processBlock - 250000 vs - 7PWei normalcase 4.4106 ms/op 4.0752 ms/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.266 ms/op 22.133 ms/op 1.14
altair processBlock - 250000 vs - 7PWei worstcase 31.792 ms/op 41.176 ms/op 0.77
altair processBlock - 250000 vs - 7PWei worstcase hashState 66.886 ms/op 83.669 ms/op 0.80
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6782 ms/op 1.9468 ms/op 0.86
phase0 processBlock - 250000 vs - 7PWei worstcase 22.255 ms/op 22.869 ms/op 0.97
altair processEth1Data - 250000 vs - 7PWei normalcase 351.25 us/op 277.08 us/op 1.27
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.5630 us/op 6.9150 us/op 0.80
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 42.254 us/op 32.913 us/op 1.28
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.9160 us/op 8.8410 us/op 1.12
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.6340 us/op 5.5470 us/op 1.20
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 160.25 us/op 140.36 us/op 1.14
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.8282 ms/op 1.2594 ms/op 1.45
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3695 ms/op 1.7915 ms/op 1.32
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.3037 ms/op 1.7454 ms/op 1.32
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.8135 ms/op 3.5622 ms/op 1.35
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4277 ms/op 1.7908 ms/op 1.36
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.9679 ms/op 3.6289 ms/op 1.37
Tree 40 250000 create 439.42 ms/op 346.75 ms/op 1.27
Tree 40 250000 get(125000) 141.68 ns/op 110.39 ns/op 1.28
Tree 40 250000 set(125000) 1.4598 us/op 1.2176 us/op 1.20
Tree 40 250000 toArray() 15.406 ms/op 9.4869 ms/op 1.62
Tree 40 250000 iterate all - toArray() + loop 15.665 ms/op 9.6104 ms/op 1.63
Tree 40 250000 iterate all - get(i) 52.051 ms/op 40.145 ms/op 1.30
Array 250000 create 2.4510 ms/op 2.2879 ms/op 1.07
Array 250000 clone - spread 814.64 us/op 598.09 us/op 1.36
Array 250000 get(125000) 0.40500 ns/op 0.53800 ns/op 0.75
Array 250000 set(125000) 0.42400 ns/op 0.58900 ns/op 0.72
Array 250000 iterate all - loop 99.821 us/op 75.966 us/op 1.31
phase0 afterProcessEpoch - 250000 vs - 7PWei 41.999 ms/op 38.222 ms/op 1.10
Array.fill - length 1000000 3.5390 ms/op 2.5347 ms/op 1.40
Array push - length 1000000 12.919 ms/op 9.2726 ms/op 1.39
Array.get 0.27625 ns/op 0.25456 ns/op 1.09
Uint8Array.get 0.43620 ns/op 0.34274 ns/op 1.27
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.325 ms/op 11.810 ms/op 1.38
altair processEpoch - mainnet_e81889 278.66 ms/op 261.91 ms/op 1.06
mainnet_e81889 - altair beforeProcessEpoch 17.739 ms/op 14.209 ms/op 1.25
mainnet_e81889 - altair processJustificationAndFinalization 5.2450 us/op 4.6510 us/op 1.13
mainnet_e81889 - altair processInactivityUpdates 4.1894 ms/op 3.1499 ms/op 1.33
mainnet_e81889 - altair processRewardsAndPenalties 39.136 ms/op 42.817 ms/op 0.91
mainnet_e81889 - altair processRegistryUpdates 692.00 ns/op 854.00 ns/op 0.81
mainnet_e81889 - altair processSlashings 186.00 ns/op 414.00 ns/op 0.45
mainnet_e81889 - altair processEth1DataReset 182.00 ns/op 403.00 ns/op 0.45
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1662 ms/op 1.0134 ms/op 1.15
mainnet_e81889 - altair processSlashingsReset 860.00 ns/op 1.2630 us/op 0.68
mainnet_e81889 - altair processRandaoMixesReset 1.1170 us/op 1.3860 us/op 0.81
mainnet_e81889 - altair processHistoricalRootsUpdate 182.00 ns/op 393.00 ns/op 0.46
mainnet_e81889 - altair processParticipationFlagUpdates 511.00 ns/op 703.00 ns/op 0.73
mainnet_e81889 - altair processSyncCommitteeUpdates 143.00 ns/op 365.00 ns/op 0.39
mainnet_e81889 - altair afterProcessEpoch 44.829 ms/op 40.437 ms/op 1.11
capella processEpoch - mainnet_e217614 935.11 ms/op 905.57 ms/op 1.03
mainnet_e217614 - capella beforeProcessEpoch 63.925 ms/op 55.907 ms/op 1.14
mainnet_e217614 - capella processJustificationAndFinalization 5.1580 us/op 4.2870 us/op 1.20
mainnet_e217614 - capella processInactivityUpdates 14.784 ms/op 10.847 ms/op 1.36
mainnet_e217614 - capella processRewardsAndPenalties 165.66 ms/op 191.36 ms/op 0.87
mainnet_e217614 - capella processRegistryUpdates 6.2680 us/op 6.0890 us/op 1.03
mainnet_e217614 - capella processSlashings 186.00 ns/op 406.00 ns/op 0.46
mainnet_e217614 - capella processEth1DataReset 181.00 ns/op 394.00 ns/op 0.46
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.1342 ms/op 10.293 ms/op 0.40
mainnet_e217614 - capella processSlashingsReset 855.00 ns/op 1.2300 us/op 0.70
mainnet_e217614 - capella processRandaoMixesReset 1.1330 us/op 1.2580 us/op 0.90
mainnet_e217614 - capella processHistoricalRootsUpdate 181.00 ns/op 409.00 ns/op 0.44
mainnet_e217614 - capella processParticipationFlagUpdates 519.00 ns/op 705.00 ns/op 0.74
mainnet_e217614 - capella afterProcessEpoch 114.20 ms/op 99.450 ms/op 1.15
phase0 processEpoch - mainnet_e58758 295.92 ms/op 272.39 ms/op 1.09
mainnet_e58758 - phase0 beforeProcessEpoch 77.097 ms/op 70.412 ms/op 1.09
mainnet_e58758 - phase0 processJustificationAndFinalization 5.4660 us/op 4.6540 us/op 1.17
mainnet_e58758 - phase0 processRewardsAndPenalties 35.799 ms/op 37.043 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 2.9870 us/op 2.7730 us/op 1.08
mainnet_e58758 - phase0 processSlashings 184.00 ns/op 404.00 ns/op 0.46
mainnet_e58758 - phase0 processEth1DataReset 183.00 ns/op 405.00 ns/op 0.45
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1883 ms/op 981.61 us/op 1.21
mainnet_e58758 - phase0 processSlashingsReset 1.1450 us/op 965.00 ns/op 1.19
mainnet_e58758 - phase0 processRandaoMixesReset 1.1700 us/op 1.2530 us/op 0.93
mainnet_e58758 - phase0 processHistoricalRootsUpdate 183.00 ns/op 407.00 ns/op 0.45
mainnet_e58758 - phase0 processParticipationRecordUpdates 864.00 ns/op 1.1510 us/op 0.75
mainnet_e58758 - phase0 afterProcessEpoch 35.604 ms/op 31.210 ms/op 1.14
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3225 ms/op 990.69 us/op 1.33
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9184 ms/op 1.2615 ms/op 1.52
altair processInactivityUpdates - 250000 normalcase 17.366 ms/op 18.026 ms/op 0.96
altair processInactivityUpdates - 250000 worstcase 16.910 ms/op 18.138 ms/op 0.93
phase0 processRegistryUpdates - 250000 normalcase 6.3800 us/op 2.5700 us/op 2.48
phase0 processRegistryUpdates - 250000 badcase_full_deposits 232.20 us/op 281.07 us/op 0.83
phase0 processRegistryUpdates - 250000 worstcase 0.5 92.854 ms/op 91.937 ms/op 1.01
altair processRewardsAndPenalties - 250000 normalcase 27.653 ms/op 31.826 ms/op 0.87
altair processRewardsAndPenalties - 250000 worstcase 26.680 ms/op 25.955 ms/op 1.03
phase0 getAttestationDeltas - 250000 normalcase 7.3613 ms/op 5.4598 ms/op 1.35
phase0 getAttestationDeltas - 250000 worstcase 6.8020 ms/op 4.9806 ms/op 1.37
phase0 processSlashings - 250000 worstcase 78.839 us/op 81.558 us/op 0.97
altair processSyncCommitteeUpdates - 250000 10.952 ms/op 9.7937 ms/op 1.12
BeaconState.hashTreeRoot - No change 213.00 ns/op 446.00 ns/op 0.48
BeaconState.hashTreeRoot - 1 full validator 81.606 us/op 80.067 us/op 1.02
BeaconState.hashTreeRoot - 32 full validator 945.40 us/op 888.12 us/op 1.06
BeaconState.hashTreeRoot - 512 full validator 8.7132 ms/op 11.054 ms/op 0.79
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 96.324 us/op 88.274 us/op 1.09
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4937 ms/op 1.5350 ms/op 0.97
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.317 ms/op 24.051 ms/op 1.14
BeaconState.hashTreeRoot - 1 balances 77.331 us/op 85.991 us/op 0.90
BeaconState.hashTreeRoot - 32 balances 1.1616 ms/op 744.91 us/op 1.56
BeaconState.hashTreeRoot - 512 balances 6.6626 ms/op 6.0146 ms/op 1.11
BeaconState.hashTreeRoot - 250000 balances 188.70 ms/op 173.21 ms/op 1.09
aggregationBits - 2048 els - zipIndexesInBitList 21.195 us/op 16.644 us/op 1.27
byteArrayEquals 32 53.104 ns/op 47.402 ns/op 1.12
Buffer.compare 32 16.957 ns/op 15.684 ns/op 1.08
byteArrayEquals 1024 1.5734 us/op 1.2462 us/op 1.26
Buffer.compare 1024 25.624 ns/op 24.387 ns/op 1.05
byteArrayEquals 16384 25.063 us/op 19.835 us/op 1.26
Buffer.compare 16384 199.95 ns/op 170.67 ns/op 1.17
byteArrayEquals 123687377 185.22 ms/op 143.21 ms/op 1.29
Buffer.compare 123687377 6.5542 ms/op 5.3222 ms/op 1.23
byteArrayEquals 32 - diff last byte 51.683 ns/op 40.435 ns/op 1.28
Buffer.compare 32 - diff last byte 16.542 ns/op 14.335 ns/op 1.15
byteArrayEquals 1024 - diff last byte 1.5693 us/op 1.1491 us/op 1.37
Buffer.compare 1024 - diff last byte 26.605 ns/op 20.589 ns/op 1.29
byteArrayEquals 16384 - diff last byte 25.278 us/op 18.331 us/op 1.38
Buffer.compare 16384 - diff last byte 203.57 ns/op 186.13 ns/op 1.09
byteArrayEquals 123687377 - diff last byte 190.81 ms/op 151.98 ms/op 1.26
Buffer.compare 123687377 - diff last byte 7.1092 ms/op 3.8472 ms/op 1.85
byteArrayEquals 32 - random bytes 5.1390 ns/op 4.9630 ns/op 1.04
Buffer.compare 32 - random bytes 17.095 ns/op 16.270 ns/op 1.05
byteArrayEquals 1024 - random bytes 5.1020 ns/op 4.9070 ns/op 1.04
Buffer.compare 1024 - random bytes 17.080 ns/op 15.997 ns/op 1.07
byteArrayEquals 16384 - random bytes 5.0940 ns/op 4.8560 ns/op 1.05
Buffer.compare 16384 - random bytes 17.047 ns/op 13.849 ns/op 1.23
byteArrayEquals 123687377 - random bytes 6.3700 ns/op 7.0900 ns/op 0.90
Buffer.compare 123687377 - random bytes 18.550 ns/op 16.720 ns/op 1.11
regular array get 100000 times 44.315 us/op 30.763 us/op 1.44
wrappedArray get 100000 times 41.423 us/op 30.791 us/op 1.35
arrayWithProxy get 100000 times 12.772 ms/op 9.5031 ms/op 1.34
ssz.Root.equals 46.438 ns/op 42.359 ns/op 1.10
byteArrayEquals 45.555 ns/op 42.941 ns/op 1.06
Buffer.compare 10.368 ns/op 9.3510 ns/op 1.11
processSlot - 1 slots 10.273 us/op 8.4020 us/op 1.22
processSlot - 32 slots 2.0198 ms/op 2.7813 ms/op 0.73
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.0577 ms/op 1.9844 ms/op 1.54
getCommitteeAssignments - req 1 vs - 250000 vc 2.1378 ms/op 1.8108 ms/op 1.18
getCommitteeAssignments - req 100 vs - 250000 vc 4.1430 ms/op 3.5470 ms/op 1.17
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4217 ms/op 3.7767 ms/op 1.17
findModifiedValidators - 10000 modified validators 770.29 ms/op 739.53 ms/op 1.04
findModifiedValidators - 1000 modified validators 751.76 ms/op 672.99 ms/op 1.12
findModifiedValidators - 100 modified validators 186.42 ms/op 258.44 ms/op 0.72
findModifiedValidators - 10 modified validators 187.91 ms/op 203.82 ms/op 0.92
findModifiedValidators - 1 modified validators 187.50 ms/op 164.41 ms/op 1.14
findModifiedValidators - no difference 170.31 ms/op 134.40 ms/op 1.27
compare ViewDUs 6.6507 s/op 6.0434 s/op 1.10
compare each validator Uint8Array 1.9733 s/op 1.7045 s/op 1.16
compare ViewDU to Uint8Array 1.6295 s/op 701.32 ms/op 2.32
migrate state 1000000 validators, 24 modified, 0 new 958.93 ms/op 782.55 ms/op 1.23
migrate state 1000000 validators, 1700 modified, 1000 new 1.3221 s/op 1.1528 s/op 1.15
migrate state 1000000 validators, 3400 modified, 2000 new 1.4111 s/op 1.2623 s/op 1.12
migrate state 1500000 validators, 24 modified, 0 new 912.51 ms/op 804.86 ms/op 1.13
migrate state 1500000 validators, 1700 modified, 1000 new 1.1047 s/op 994.34 ms/op 1.11
migrate state 1500000 validators, 3400 modified, 2000 new 1.3109 s/op 1.3223 s/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1600 ns/op 5.9000 ns/op 0.71
state getBlockRootAtSlot - 250000 vs - 7PWei 377.97 ns/op 499.99 ns/op 0.76
naive computeProposerIndex 100000 validators 51.864 ms/op 42.243 ms/op 1.23
computeProposerIndex 100000 validators 1.5276 ms/op 1.2142 ms/op 1.26
naiveGetNextSyncCommitteeIndices 1000 validators 8.2436 s/op 6.0219 s/op 1.37
getNextSyncCommitteeIndices 1000 validators 117.57 ms/op 94.160 ms/op 1.25
naiveGetNextSyncCommitteeIndices 10000 validators 7.7681 s/op 6.1259 s/op 1.27
getNextSyncCommitteeIndices 10000 validators 118.12 ms/op 91.668 ms/op 1.29
naiveGetNextSyncCommitteeIndices 100000 validators 8.1367 s/op 6.6734 s/op 1.22
getNextSyncCommitteeIndices 100000 validators 132.96 ms/op 98.923 ms/op 1.34
naive computeShuffledIndex 100000 validators 26.131 s/op 19.589 s/op 1.33
cached computeShuffledIndex 100000 validators 580.52 ms/op 436.25 ms/op 1.33
naive computeShuffledIndex 2000000 validators 486.80 s/op 436.51 s/op 1.12
cached computeShuffledIndex 2000000 validators 36.243 s/op 24.006 s/op 1.51
computeProposers - vc 250000 608.07 us/op 491.35 us/op 1.24
computeEpochShuffling - vc 250000 42.564 ms/op 35.135 ms/op 1.21
getNextSyncCommittee - vc 250000 10.346 ms/op 8.5011 ms/op 1.22
computeSigningRoot for AttestationData 24.202 us/op 19.341 us/op 1.25
hash AttestationData serialized data then Buffer.toString(base64) 1.5780 us/op 1.0827 us/op 1.46
toHexString serialized data 1.2589 us/op 868.27 ns/op 1.45
Buffer.toString(base64) 170.64 ns/op 111.11 ns/op 1.54
nodejs block root to RootHex using toHex 131.72 ns/op 108.83 ns/op 1.21
nodejs block root to RootHex using toRootHex 84.315 ns/op 74.266 ns/op 1.14
browser block root to RootHex using the deprecated toHexString 210.07 ns/op 184.87 ns/op 1.14
browser block root to RootHex using toHex 170.81 ns/op 156.44 ns/op 1.09
browser block root to RootHex using toRootHex 158.69 ns/op 144.21 ns/op 1.10

by benchmarkbot/action

@codecov

codecov Bot commented Jun 29, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 62.97872% with 87 lines in your changes missing coverage. Please review.

Project coverage is 55.78%. Comparing base (d9dc444) to head (bf11b46).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8022      +/-   ##
============================================
+ Coverage     55.68%   55.78%   +0.09%     
============================================
  Files           835      834       -1     
  Lines         59476    59535      +59     
  Branches       4585     4599      +14     
============================================
+ Hits          33119    33211      +92     
+ Misses        26290    26256      -34     
- Partials         67       68       +1     
🚀 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.

Comment thread packages/beacon-node/src/network/core/networkCore.ts Outdated
Comment thread packages/beacon-node/src/network/discv5/utils.ts Outdated
Comment thread packages/beacon-node/src/network/reqresp/ReqRespBeaconNode.ts Outdated
Comment thread packages/beacon-node/src/network/reqresp/handlers/status.ts Outdated
Comment thread packages/reqresp/test/unit/response/index.test.ts Outdated
Comment thread packages/config/src/forkConfig/index.ts
Comment thread packages/config/src/forkConfig/index.ts
Comment thread packages/config/src/forkConfig/index.ts Outdated
Comment thread packages/config/src/forkConfig/index.ts Outdated
Comment thread packages/beacon-node/src/network/gossip/gossipsub.ts Outdated

@ensi321 ensi321 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.

Thank you for making these changes 🙏

This part of Lodestar codebase is very confusing and it makes it difficult to implement this change correctly.

Comment thread packages/config/src/forkConfig/index.ts
Comment thread packages/config/src/forkConfig/index.ts
@philknows philknows added this to the v1.32.0 milestone Jul 8, 2025
@ensi321 ensi321 merged commit 48f2ff7 into unstable Jul 8, 2025
25 of 27 checks passed
@ensi321 ensi321 deleted the nflaig/bpo-fork-digest branch July 8, 2025 15:55
@wemeetagain

Copy link
Copy Markdown
Member

🎉 This PR is included in v1.32.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