Skip to content

Conversation

@wemeetagain
Copy link
Member

Motivation

Description

  • Add new BlockInput classes to eventually replace our block input functions
  • These classes track data availability per block root, with preDA, blobs, and columns DA implemented

@wemeetagain wemeetagain requested a review from a team as a code owner April 30, 2025 21:11
@codecov
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.09%. Comparing base (d85e73a) to head (c6da08a).
Report is 20 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7776      +/-   ##
============================================
+ Coverage     56.06%   56.09%   +0.03%     
============================================
  Files           823      823              
  Lines         58014    58036      +22     
  Branches       4462     4465       +3     
============================================
+ Hits          32526    32557      +31     
+ Misses        25420    25412       -8     
+ Partials         68       67       -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.

@wemeetagain wemeetagain mentioned this pull request Apr 30, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 30, 2025

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: 0b703f4 Previous: d8bc6b1 Ratio
phase0 getAttestationDeltas - 250000 worstcase 24.053 ms/op 6.4648 ms/op 3.72
Full benchmark results
Benchmark suite Current: 0b703f4 Previous: d8bc6b1 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.2929 ms/op 969.20 us/op 1.33
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 51.452 us/op 36.004 us/op 1.43
BLS verify - blst 978.46 us/op 742.31 us/op 1.32
BLS verifyMultipleSignatures 3 - blst 1.5569 ms/op 1.1783 ms/op 1.32
BLS verifyMultipleSignatures 8 - blst 2.3686 ms/op 1.6827 ms/op 1.41
BLS verifyMultipleSignatures 32 - blst 7.5907 ms/op 4.9308 ms/op 1.54
BLS verifyMultipleSignatures 64 - blst 11.541 ms/op 9.0419 ms/op 1.28
BLS verifyMultipleSignatures 128 - blst 19.960 ms/op 17.346 ms/op 1.15
BLS deserializing 10000 signatures 760.91 ms/op 684.24 ms/op 1.11
BLS deserializing 100000 signatures 8.3628 s/op 7.0015 s/op 1.19
BLS verifyMultipleSignatures - same message - 3 - blst 1.3675 ms/op 891.18 us/op 1.53
BLS verifyMultipleSignatures - same message - 8 - blst 1.2650 ms/op 1.0124 ms/op 1.25
BLS verifyMultipleSignatures - same message - 32 - blst 1.9818 ms/op 1.6787 ms/op 1.18
BLS verifyMultipleSignatures - same message - 64 - blst 3.3909 ms/op 2.5650 ms/op 1.32
BLS verifyMultipleSignatures - same message - 128 - blst 5.4929 ms/op 4.3682 ms/op 1.26
BLS aggregatePubkeys 32 - blst 22.635 us/op 19.540 us/op 1.16
BLS aggregatePubkeys 128 - blst 79.706 us/op 70.714 us/op 1.13
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 99.155 ms/op 43.165 ms/op 2.30
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 79.437 ms/op 42.166 ms/op 1.88
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 51.818 ms/op 33.454 ms/op 1.55
getSlashingsAndExits - default max 121.03 us/op 72.712 us/op 1.66
getSlashingsAndExits - 2k 480.58 us/op 274.50 us/op 1.75
proposeBlockBody type=full, size=empty 8.3576 ms/op 5.7388 ms/op 1.46
isKnown best case - 1 super set check 230.00 ns/op 204.00 ns/op 1.13
isKnown normal case - 2 super set checks 222.00 ns/op 200.00 ns/op 1.11
isKnown worse case - 16 super set checks 210.00 ns/op 198.00 ns/op 1.06
InMemoryCheckpointStateCache - add get delete 2.5330 us/op 2.3990 us/op 1.06
validate api signedAggregateAndProof - struct 1.5366 ms/op 1.3337 ms/op 1.15
validate gossip signedAggregateAndProof - struct 1.7440 ms/op 1.3444 ms/op 1.30
batch validate gossip attestation - vc 640000 - chunk 32 128.17 us/op 113.54 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 64 104.44 us/op 100.67 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 128 97.335 us/op 93.314 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 256 103.88 us/op 97.259 us/op 1.07
pickEth1Vote - no votes 1.0394 ms/op 985.92 us/op 1.05
pickEth1Vote - max votes 8.1074 ms/op 6.1581 ms/op 1.32
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.548 ms/op 11.010 ms/op 1.50
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 27.070 ms/op 18.274 ms/op 1.48
pickEth1Vote - Eth1Data fastSerialize value x2048 485.24 us/op 428.43 us/op 1.13
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.6475 ms/op 3.8511 ms/op 1.21
bytes32 toHexString 406.00 ns/op 360.00 ns/op 1.13
bytes32 Buffer.toString(hex) 245.00 ns/op 248.00 ns/op 0.99
bytes32 Buffer.toString(hex) from Uint8Array 342.00 ns/op 340.00 ns/op 1.01
bytes32 Buffer.toString(hex) + 0x 253.00 ns/op 252.00 ns/op 1.00
Object access 1 prop 0.12400 ns/op 0.12000 ns/op 1.03
Map access 1 prop 0.13300 ns/op 0.12300 ns/op 1.08
Object get x1000 6.0080 ns/op 5.7310 ns/op 1.05
Map get x1000 6.7110 ns/op 6.4060 ns/op 1.05
Object set x1000 33.111 ns/op 29.040 ns/op 1.14
Map set x1000 22.985 ns/op 20.315 ns/op 1.13
Return object 10000 times 0.29660 ns/op 0.28640 ns/op 1.04
Throw Error 10000 times 4.6020 us/op 4.2267 us/op 1.09
toHex 143.67 ns/op 137.70 ns/op 1.04
Buffer.from 127.59 ns/op 126.19 ns/op 1.01
shared Buffer 89.638 ns/op 91.046 ns/op 0.98
fastMsgIdFn sha256 / 200 bytes 2.3040 us/op 2.2280 us/op 1.03
fastMsgIdFn h32 xxhash / 200 bytes 218.00 ns/op 206.00 ns/op 1.06
fastMsgIdFn h64 xxhash / 200 bytes 272.00 ns/op 270.00 ns/op 1.01
fastMsgIdFn sha256 / 1000 bytes 7.5690 us/op 7.2120 us/op 1.05
fastMsgIdFn h32 xxhash / 1000 bytes 344.00 ns/op 338.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 350.00 ns/op 339.00 ns/op 1.03
fastMsgIdFn sha256 / 10000 bytes 67.124 us/op 63.741 us/op 1.05
fastMsgIdFn h32 xxhash / 10000 bytes 1.8830 us/op 1.8110 us/op 1.04
fastMsgIdFn h64 xxhash / 10000 bytes 1.2630 us/op 1.2100 us/op 1.04
send data - 1000 256B messages 15.530 ms/op 12.061 ms/op 1.29
send data - 1000 512B messages 23.852 ms/op 15.399 ms/op 1.55
send data - 1000 1024B messages 31.377 ms/op 24.045 ms/op 1.30
send data - 1000 1200B messages 32.504 ms/op 21.551 ms/op 1.51
send data - 1000 2048B messages 30.543 ms/op 20.277 ms/op 1.51
send data - 1000 4096B messages 37.108 ms/op 23.956 ms/op 1.55
send data - 1000 16384B messages 95.930 ms/op 70.638 ms/op 1.36
send data - 1000 65536B messages 274.65 ms/op 201.56 ms/op 1.36
enrSubnets - fastDeserialize 64 bits 1.2210 us/op 876.00 ns/op 1.39
enrSubnets - ssz BitVector 64 bits 375.00 ns/op 334.00 ns/op 1.12
enrSubnets - fastDeserialize 4 bits 136.00 ns/op 130.00 ns/op 1.05
enrSubnets - ssz BitVector 4 bits 346.00 ns/op 339.00 ns/op 1.02
prioritizePeers score -10:0 att 32-0.1 sync 2-0 127.26 us/op 118.45 us/op 1.07
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 155.53 us/op 138.40 us/op 1.12
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 217.50 us/op 199.04 us/op 1.09
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 408.94 us/op 374.23 us/op 1.09
prioritizePeers score 0:0 att 64-1 sync 4-1 491.84 us/op 454.97 us/op 1.08
array of 16000 items push then shift 1.6774 us/op 1.5946 us/op 1.05
LinkedList of 16000 items push then shift 8.4920 ns/op 6.9360 ns/op 1.22
array of 16000 items push then pop 84.800 ns/op 75.491 ns/op 1.12
LinkedList of 16000 items push then pop 7.6010 ns/op 6.9730 ns/op 1.09
array of 24000 items push then shift 2.5060 us/op 2.4140 us/op 1.04
LinkedList of 24000 items push then shift 9.2770 ns/op 7.1840 ns/op 1.29
array of 24000 items push then pop 126.56 ns/op 107.75 ns/op 1.17
LinkedList of 24000 items push then pop 8.0560 ns/op 6.9180 ns/op 1.16
intersect bitArray bitLen 8 7.0550 ns/op 6.3250 ns/op 1.12
intersect array and set length 8 40.582 ns/op 37.559 ns/op 1.08
intersect bitArray bitLen 128 30.201 ns/op 29.430 ns/op 1.03
intersect array and set length 128 644.99 ns/op 619.38 ns/op 1.04
bitArray.getTrueBitIndexes() bitLen 128 1.1110 us/op 1.0400 us/op 1.07
bitArray.getTrueBitIndexes() bitLen 248 2.6790 us/op 1.8480 us/op 1.45
bitArray.getTrueBitIndexes() bitLen 512 4.1360 us/op 3.7080 us/op 1.12
Buffer.concat 32 items 709.00 ns/op 618.00 ns/op 1.15
Uint8Array.set 32 items 1.8750 us/op 1.5220 us/op 1.23
Buffer.copy 2.3540 us/op 2.1450 us/op 1.10
Uint8Array.set - with subarray 1.9840 us/op 1.8590 us/op 1.07
Uint8Array.set - without subarray 1.7340 us/op 919.00 ns/op 1.89
getUint32 - dataview 211.00 ns/op 203.00 ns/op 1.04
getUint32 - manual 131.00 ns/op 123.00 ns/op 1.07
Set add up to 64 items then delete first 2.2255 us/op 2.0748 us/op 1.07
OrderedSet add up to 64 items then delete first 4.6448 us/op 3.4908 us/op 1.33
Set add up to 64 items then delete last 3.3420 us/op 2.5479 us/op 1.31
OrderedSet add up to 64 items then delete last 5.1984 us/op 3.8264 us/op 1.36
Set add up to 64 items then delete middle 2.5043 us/op 2.7049 us/op 0.93
OrderedSet add up to 64 items then delete middle 6.8409 us/op 5.5523 us/op 1.23
Set add up to 128 items then delete first 6.6240 us/op 5.2199 us/op 1.27
OrderedSet add up to 128 items then delete first 10.026 us/op 9.9016 us/op 1.01
Set add up to 128 items then delete last 6.3013 us/op 5.7972 us/op 1.09
OrderedSet add up to 128 items then delete last 11.124 us/op 8.5895 us/op 1.30
Set add up to 128 items then delete middle 6.8441 us/op 5.0377 us/op 1.36
OrderedSet add up to 128 items then delete middle 17.861 us/op 14.443 us/op 1.24
Set add up to 256 items then delete first 14.327 us/op 10.788 us/op 1.33
OrderedSet add up to 256 items then delete first 22.677 us/op 16.564 us/op 1.37
Set add up to 256 items then delete last 13.878 us/op 9.6135 us/op 1.44
OrderedSet add up to 256 items then delete last 23.083 us/op 14.390 us/op 1.60
Set add up to 256 items then delete middle 13.173 us/op 9.4586 us/op 1.39
OrderedSet add up to 256 items then delete middle 48.040 us/op 41.607 us/op 1.15
transfer serialized Status (84 B) 2.7340 us/op 2.3590 us/op 1.16
copy serialized Status (84 B) 1.7990 us/op 1.2230 us/op 1.47
transfer serialized SignedVoluntaryExit (112 B) 3.0040 us/op 2.3160 us/op 1.30
copy serialized SignedVoluntaryExit (112 B) 2.1650 us/op 1.2270 us/op 1.76
transfer serialized ProposerSlashing (416 B) 3.2130 us/op 2.3850 us/op 1.35
copy serialized ProposerSlashing (416 B) 1.9180 us/op 1.2970 us/op 1.48
transfer serialized Attestation (485 B) 3.2940 us/op 2.4210 us/op 1.36
copy serialized Attestation (485 B) 2.5640 us/op 1.3030 us/op 1.97
transfer serialized AttesterSlashing (33232 B) 2.9470 us/op 2.4640 us/op 1.20
copy serialized AttesterSlashing (33232 B) 6.1860 us/op 3.5990 us/op 1.72
transfer serialized Small SignedBeaconBlock (128000 B) 3.5860 us/op 3.0630 us/op 1.17
copy serialized Small SignedBeaconBlock (128000 B) 17.629 us/op 9.2560 us/op 1.90
transfer serialized Avg SignedBeaconBlock (200000 B) 4.8060 us/op 3.4920 us/op 1.38
copy serialized Avg SignedBeaconBlock (200000 B) 25.490 us/op 13.847 us/op 1.84
transfer serialized BlobsSidecar (524380 B) 4.8970 us/op 3.8480 us/op 1.27
copy serialized BlobsSidecar (524380 B) 89.564 us/op 61.583 us/op 1.45
transfer serialized Big SignedBeaconBlock (1000000 B) 5.7970 us/op 3.9320 us/op 1.47
copy serialized Big SignedBeaconBlock (1000000 B) 163.38 us/op 113.39 us/op 1.44
pass gossip attestations to forkchoice per slot 2.9417 ms/op 2.8008 ms/op 1.05
forkChoice updateHead vc 100000 bc 64 eq 0 476.62 us/op 450.64 us/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 0 3.7103 ms/op 2.7899 ms/op 1.33
forkChoice updateHead vc 1000000 bc 64 eq 0 5.0016 ms/op 4.7911 ms/op 1.04
forkChoice updateHead vc 600000 bc 320 eq 0 2.9045 ms/op 2.8801 ms/op 1.01
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0710 ms/op 2.8935 ms/op 1.06
forkChoice updateHead vc 600000 bc 7200 eq 0 4.2594 ms/op 3.0596 ms/op 1.39
forkChoice updateHead vc 600000 bc 64 eq 1000 10.843 ms/op 10.337 ms/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 10000 10.602 ms/op 10.469 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 14.822 ms/op 13.429 ms/op 1.10
computeDeltas 500000 validators 300 proto nodes 3.9616 ms/op 3.9582 ms/op 1.00
computeDeltas 500000 validators 1200 proto nodes 3.9425 ms/op 3.8593 ms/op 1.02
computeDeltas 500000 validators 7200 proto nodes 3.9370 ms/op 4.0248 ms/op 0.98
computeDeltas 750000 validators 300 proto nodes 5.9241 ms/op 5.9803 ms/op 0.99
computeDeltas 750000 validators 1200 proto nodes 6.0521 ms/op 7.3732 ms/op 0.82
computeDeltas 750000 validators 7200 proto nodes 6.6974 ms/op 6.5246 ms/op 1.03
computeDeltas 1400000 validators 300 proto nodes 11.849 ms/op 11.585 ms/op 1.02
computeDeltas 1400000 validators 1200 proto nodes 11.293 ms/op 11.968 ms/op 0.94
computeDeltas 1400000 validators 7200 proto nodes 11.073 ms/op 11.413 ms/op 0.97
computeDeltas 2100000 validators 300 proto nodes 16.988 ms/op 16.600 ms/op 1.02
computeDeltas 2100000 validators 1200 proto nodes 16.585 ms/op 16.609 ms/op 1.00
computeDeltas 2100000 validators 7200 proto nodes 16.469 ms/op 16.452 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 2.0284 ms/op 2.2732 ms/op 0.89
altair processAttestation - 250000 vs - 7PWei worstcase 2.9690 ms/op 2.8862 ms/op 1.03
altair processAttestation - setStatus - 1/6 committees join 132.44 us/op 125.66 us/op 1.05
altair processAttestation - setStatus - 1/3 committees join 253.58 us/op 242.05 us/op 1.05
altair processAttestation - setStatus - 1/2 committees join 360.94 us/op 345.29 us/op 1.05
altair processAttestation - setStatus - 2/3 committees join 456.92 us/op 428.04 us/op 1.07
altair processAttestation - setStatus - 4/5 committees join 637.36 us/op 588.27 us/op 1.08
altair processAttestation - setStatus - 100% committees join 741.12 us/op 701.78 us/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase 5.4913 ms/op 4.5316 ms/op 1.21
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.372 ms/op 32.143 ms/op 0.91
altair processBlock - 250000 vs - 7PWei worstcase 34.646 ms/op 35.059 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase hashState 78.642 ms/op 77.712 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6298 ms/op 1.6691 ms/op 0.98
phase0 processBlock - 250000 vs - 7PWei worstcase 20.822 ms/op 21.032 ms/op 0.99
altair processEth1Data - 250000 vs - 7PWei normalcase 333.44 us/op 337.63 us/op 0.99
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.3630 us/op 5.7070 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 44.248 us/op 34.283 us/op 1.29
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.475 us/op 9.7280 us/op 1.18
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.5110 us/op 6.1210 us/op 1.06
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 155.58 us/op 132.75 us/op 1.17
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.8045 ms/op 1.9193 ms/op 0.94
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3148 ms/op 2.3692 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.2802 ms/op 2.3657 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.6009 ms/op 4.5074 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3515 ms/op 2.3574 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.7478 ms/op 4.4324 ms/op 1.07
Tree 40 250000 create 417.98 ms/op 418.59 ms/op 1.00
Tree 40 250000 get(125000) 141.90 ns/op 140.90 ns/op 1.01
Tree 40 250000 set(125000) 1.4882 us/op 1.4320 us/op 1.04
Tree 40 250000 toArray() 18.247 ms/op 15.360 ms/op 1.19
Tree 40 250000 iterate all - toArray() + loop 18.063 ms/op 18.169 ms/op 0.99
Tree 40 250000 iterate all - get(i) 55.831 ms/op 51.727 ms/op 1.08
Array 250000 create 2.4743 ms/op 2.5226 ms/op 0.98
Array 250000 clone - spread 827.92 us/op 828.74 us/op 1.00
Array 250000 get(125000) 0.41800 ns/op 0.41500 ns/op 1.01
Array 250000 set(125000) 0.43800 ns/op 0.44400 ns/op 0.99
Array 250000 iterate all - loop 92.432 us/op 82.834 us/op 1.12
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.588 ms/op 42.949 ms/op 0.99
Array.fill - length 1000000 3.8056 ms/op 3.5643 ms/op 1.07
Array push - length 1000000 13.657 ms/op 12.661 ms/op 1.08
Array.get 0.28058 ns/op 0.27417 ns/op 1.02
Uint8Array.get 0.44065 ns/op 0.43988 ns/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.518 ms/op 16.005 ms/op 1.09
altair processEpoch - mainnet_e81889 255.45 ms/op 234.92 ms/op 1.09
mainnet_e81889 - altair beforeProcessEpoch 18.882 ms/op 18.958 ms/op 1.00
mainnet_e81889 - altair processJustificationAndFinalization 5.5240 us/op 5.5210 us/op 1.00
mainnet_e81889 - altair processInactivityUpdates 4.1386 ms/op 4.2323 ms/op 0.98
mainnet_e81889 - altair processRewardsAndPenalties 35.613 ms/op 39.134 ms/op 0.91
mainnet_e81889 - altair processRegistryUpdates 688.00 ns/op 708.00 ns/op 0.97
mainnet_e81889 - altair processSlashings 182.00 ns/op 187.00 ns/op 0.97
mainnet_e81889 - altair processEth1DataReset 177.00 ns/op 182.00 ns/op 0.97
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2833 ms/op 1.2268 ms/op 1.05
mainnet_e81889 - altair processSlashingsReset 862.00 ns/op 849.00 ns/op 1.02
mainnet_e81889 - altair processRandaoMixesReset 1.1030 us/op 1.1300 us/op 0.98
mainnet_e81889 - altair processHistoricalRootsUpdate 177.00 ns/op 182.00 ns/op 0.97
mainnet_e81889 - altair processParticipationFlagUpdates 514.00 ns/op 513.00 ns/op 1.00
mainnet_e81889 - altair processSyncCommitteeUpdates 144.00 ns/op 143.00 ns/op 1.01
mainnet_e81889 - altair afterProcessEpoch 44.952 ms/op 44.595 ms/op 1.01
capella processEpoch - mainnet_e217614 911.09 ms/op 873.13 ms/op 1.04
mainnet_e217614 - capella beforeProcessEpoch 60.364 ms/op 68.837 ms/op 0.88
mainnet_e217614 - capella processJustificationAndFinalization 5.3200 us/op 5.2430 us/op 1.01
mainnet_e217614 - capella processInactivityUpdates 14.132 ms/op 15.505 ms/op 0.91
mainnet_e217614 - capella processRewardsAndPenalties 172.21 ms/op 170.60 ms/op 1.01
mainnet_e217614 - capella processRegistryUpdates 6.3390 us/op 6.5290 us/op 0.97
mainnet_e217614 - capella processSlashings 174.00 ns/op 186.00 ns/op 0.94
mainnet_e217614 - capella processEth1DataReset 172.00 ns/op 180.00 ns/op 0.96
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.0939 ms/op 4.1598 ms/op 0.98
mainnet_e217614 - capella processSlashingsReset 855.00 ns/op 877.00 ns/op 0.97
mainnet_e217614 - capella processRandaoMixesReset 1.1020 us/op 1.2040 us/op 0.92
mainnet_e217614 - capella processHistoricalRootsUpdate 174.00 ns/op 185.00 ns/op 0.94
mainnet_e217614 - capella processParticipationFlagUpdates 524.00 ns/op 538.00 ns/op 0.97
mainnet_e217614 - capella afterProcessEpoch 115.38 ms/op 143.57 ms/op 0.80
phase0 processEpoch - mainnet_e58758 252.12 ms/op 303.22 ms/op 0.83
mainnet_e58758 - phase0 beforeProcessEpoch 65.204 ms/op 70.511 ms/op 0.92
mainnet_e58758 - phase0 processJustificationAndFinalization 5.7580 us/op 5.4250 us/op 1.06
mainnet_e58758 - phase0 processRewardsAndPenalties 35.696 ms/op 35.254 ms/op 1.01
mainnet_e58758 - phase0 processRegistryUpdates 3.1400 us/op 3.1180 us/op 1.01
mainnet_e58758 - phase0 processSlashings 176.00 ns/op 188.00 ns/op 0.94
mainnet_e58758 - phase0 processEth1DataReset 177.00 ns/op 181.00 ns/op 0.98
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1806 ms/op 1.1805 ms/op 1.00
mainnet_e58758 - phase0 processSlashingsReset 918.00 ns/op 923.00 ns/op 0.99
mainnet_e58758 - phase0 processRandaoMixesReset 1.1470 us/op 1.2130 us/op 0.95
mainnet_e58758 - phase0 processHistoricalRootsUpdate 176.00 ns/op 181.00 ns/op 0.97
mainnet_e58758 - phase0 processParticipationRecordUpdates 863.00 ns/op 856.00 ns/op 1.01
mainnet_e58758 - phase0 afterProcessEpoch 35.508 ms/op 35.667 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3289 ms/op 1.3458 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9343 ms/op 1.9425 ms/op 1.00
altair processInactivityUpdates - 250000 normalcase 16.437 ms/op 16.950 ms/op 0.97
altair processInactivityUpdates - 250000 worstcase 18.344 ms/op 16.481 ms/op 1.11
phase0 processRegistryUpdates - 250000 normalcase 6.1350 us/op 6.8050 us/op 0.90
phase0 processRegistryUpdates - 250000 badcase_full_deposits 259.64 us/op 230.37 us/op 1.13
phase0 processRegistryUpdates - 250000 worstcase 0.5 118.51 ms/op 111.82 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 27.514 ms/op 26.735 ms/op 1.03
altair processRewardsAndPenalties - 250000 worstcase 26.077 ms/op 26.169 ms/op 1.00
phase0 getAttestationDeltas - 250000 normalcase 6.9999 ms/op 6.9801 ms/op 1.00
phase0 getAttestationDeltas - 250000 worstcase 24.053 ms/op 6.4648 ms/op 3.72
phase0 processSlashings - 250000 worstcase 88.945 us/op 77.516 us/op 1.15
altair processSyncCommitteeUpdates - 250000 10.958 ms/op 10.718 ms/op 1.02
BeaconState.hashTreeRoot - No change 229.00 ns/op 211.00 ns/op 1.09
BeaconState.hashTreeRoot - 1 full validator 83.359 us/op 87.180 us/op 0.96
BeaconState.hashTreeRoot - 32 full validator 937.84 us/op 1.1152 ms/op 0.84
BeaconState.hashTreeRoot - 512 full validator 10.005 ms/op 10.308 ms/op 0.97
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 100.02 us/op 119.53 us/op 0.84
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5004 ms/op 1.4803 ms/op 1.01
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.135 ms/op 21.900 ms/op 1.06
BeaconState.hashTreeRoot - 1 balances 69.389 us/op 82.322 us/op 0.84
BeaconState.hashTreeRoot - 32 balances 663.97 us/op 993.37 us/op 0.67
BeaconState.hashTreeRoot - 512 balances 7.4024 ms/op 8.2077 ms/op 0.90
BeaconState.hashTreeRoot - 250000 balances 187.98 ms/op 199.65 ms/op 0.94
aggregationBits - 2048 els - zipIndexesInBitList 23.597 us/op 20.993 us/op 1.12
byteArrayEquals 32 54.393 ns/op 52.537 ns/op 1.04
Buffer.compare 32 18.013 ns/op 16.785 ns/op 1.07
byteArrayEquals 1024 1.6104 us/op 1.5677 us/op 1.03
Buffer.compare 1024 26.311 ns/op 25.170 ns/op 1.05
byteArrayEquals 16384 25.457 us/op 25.034 us/op 1.02
Buffer.compare 16384 202.57 ns/op 175.56 ns/op 1.15
byteArrayEquals 123687377 191.31 ms/op 188.59 ms/op 1.01
Buffer.compare 123687377 7.6058 ms/op 6.0703 ms/op 1.25
byteArrayEquals 32 - diff last byte 51.962 ns/op 52.015 ns/op 1.00
Buffer.compare 32 - diff last byte 16.899 ns/op 16.877 ns/op 1.00
byteArrayEquals 1024 - diff last byte 1.5694 us/op 1.5736 us/op 1.00
Buffer.compare 1024 - diff last byte 26.195 ns/op 24.812 ns/op 1.06
byteArrayEquals 16384 - diff last byte 25.216 us/op 25.067 us/op 1.01
Buffer.compare 16384 - diff last byte 189.60 ns/op 175.22 ns/op 1.08
byteArrayEquals 123687377 - diff last byte 191.10 ms/op 190.83 ms/op 1.00
Buffer.compare 123687377 - diff last byte 8.1783 ms/op 7.5862 ms/op 1.08
byteArrayEquals 32 - random bytes 5.1290 ns/op 5.2050 ns/op 0.99
Buffer.compare 32 - random bytes 17.231 ns/op 17.245 ns/op 1.00
byteArrayEquals 1024 - random bytes 5.1550 ns/op 5.1080 ns/op 1.01
Buffer.compare 1024 - random bytes 17.128 ns/op 16.996 ns/op 1.01
byteArrayEquals 16384 - random bytes 5.0980 ns/op 5.4600 ns/op 0.93
Buffer.compare 16384 - random bytes 16.914 ns/op 17.038 ns/op 0.99
byteArrayEquals 123687377 - random bytes 6.6500 ns/op 6.4600 ns/op 1.03
Buffer.compare 123687377 - random bytes 18.730 ns/op 18.130 ns/op 1.03
regular array get 100000 times 44.299 us/op 32.679 us/op 1.36
wrappedArray get 100000 times 33.265 us/op 32.603 us/op 1.02
arrayWithProxy get 100000 times 11.807 ms/op 12.755 ms/op 0.93
ssz.Root.equals 45.976 ns/op 46.368 ns/op 0.99
byteArrayEquals 45.354 ns/op 45.555 ns/op 1.00
Buffer.compare 10.422 ns/op 10.457 ns/op 1.00
processSlot - 1 slots 10.424 us/op 10.285 us/op 1.01
processSlot - 32 slots 2.6802 ms/op 1.9292 ms/op 1.39
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.8520 ms/op 2.9850 ms/op 1.29
getCommitteeAssignments - req 1 vs - 250000 vc 2.1724 ms/op 2.1192 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 4.1722 ms/op 4.1363 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3961 ms/op 4.4183 ms/op 0.99
findModifiedValidators - 10000 modified validators 809.57 ms/op 726.78 ms/op 1.11
findModifiedValidators - 1000 modified validators 728.68 ms/op 733.58 ms/op 0.99
findModifiedValidators - 100 modified validators 285.24 ms/op 228.44 ms/op 1.25
findModifiedValidators - 10 modified validators 232.64 ms/op 139.67 ms/op 1.67
findModifiedValidators - 1 modified validators 142.18 ms/op 160.90 ms/op 0.88
findModifiedValidators - no difference 151.40 ms/op 181.77 ms/op 0.83
compare ViewDUs 6.3252 s/op 6.0838 s/op 1.04
compare each validator Uint8Array 1.0973 s/op 1.5208 s/op 0.72
compare ViewDU to Uint8Array 1.0785 s/op 1.0463 s/op 1.03
migrate state 1000000 validators, 24 modified, 0 new 891.21 ms/op 811.58 ms/op 1.10
migrate state 1000000 validators, 1700 modified, 1000 new 1.1077 s/op 1.0905 s/op 1.02
migrate state 1000000 validators, 3400 modified, 2000 new 1.3410 s/op 1.2190 s/op 1.10
migrate state 1500000 validators, 24 modified, 0 new 978.15 ms/op 874.69 ms/op 1.12
migrate state 1500000 validators, 1700 modified, 1000 new 1.2951 s/op 1.1343 s/op 1.14
migrate state 1500000 validators, 3400 modified, 2000 new 1.6517 s/op 1.2936 s/op 1.28
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7100 ns/op 4.3700 ns/op 1.08
state getBlockRootAtSlot - 250000 vs - 7PWei 623.34 ns/op 404.06 ns/op 1.54
naive computeProposerIndex 100000 validators 70.014 ms/op 58.628 ms/op 1.19
computeProposerIndex 100000 validators 1.7346 ms/op 1.5707 ms/op 1.10
naiveGetNextSyncCommitteeIndices 1000 validators 8.5544 s/op 8.1241 s/op 1.05
getNextSyncCommitteeIndices 1000 validators 121.03 ms/op 121.67 ms/op 0.99
naiveGetNextSyncCommitteeIndices 10000 validators 9.0621 s/op 7.8513 s/op 1.15
getNextSyncCommitteeIndices 10000 validators 132.21 ms/op 116.45 ms/op 1.14
naiveGetNextSyncCommitteeIndices 100000 validators 9.2026 s/op 7.4951 s/op 1.23
getNextSyncCommitteeIndices 100000 validators 122.59 ms/op 117.38 ms/op 1.04
naive computeShuffledIndex 100000 validators 26.098 s/op 23.553 s/op 1.11
cached computeShuffledIndex 100000 validators 589.38 ms/op 570.72 ms/op 1.03
naive computeShuffledIndex 2000000 validators 523.42 s/op 458.90 s/op 1.14
cached computeShuffledIndex 2000000 validators 69.004 s/op 31.180 s/op 2.21
computeProposers - vc 250000 641.64 us/op 622.21 us/op 1.03
computeEpochShuffling - vc 250000 44.802 ms/op 41.913 ms/op 1.07
getNextSyncCommittee - vc 250000 11.691 ms/op 10.498 ms/op 1.11
computeSigningRoot for AttestationData 30.506 us/op 19.971 us/op 1.53
hash AttestationData serialized data then Buffer.toString(base64) 1.7789 us/op 1.5897 us/op 1.12
toHexString serialized data 1.4771 us/op 1.1695 us/op 1.26
Buffer.toString(base64) 174.37 ns/op 171.07 ns/op 1.02
nodejs block root to RootHex using toHex 152.83 ns/op 143.25 ns/op 1.07
nodejs block root to RootHex using toRootHex 97.282 ns/op 96.502 ns/op 1.01
browser block root to RootHex using the deprecated toHexString 214.51 ns/op 223.28 ns/op 0.96
browser block root to RootHex using toHex 175.29 ns/op 180.31 ns/op 0.97
browser block root to RootHex using toRootHex 170.26 ns/op 164.68 ns/op 1.03

by benchmarkbot/action

@matthewkeil matthewkeil force-pushed the cayman/block-input branch from ba1219b to 8654a6a Compare May 4, 2025 17:24
Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

Did a partial review through the abstract class. Started looking at the concrete classes but wanted to read them fully before making comments. Will come back to this tomorrow to start added my thoughts for the concrete classes

nflaig
nflaig previously approved these changes May 8, 2025
Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

Just a tiny nit but otherwise looks good

this.columnsCache.set(columnSidecar.index, {columnSidecar, source, seenTimestampSec, peerIdStr});

const sampledColumns = this.getSampledColumns();
const hasAllData = this.state.hasAllData || sampledColumns.length === this.custodyConfig.sampledColumns.length;
Copy link
Member

Choose a reason for hiding this comment

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

With dynamic custody in mind i think we should run this check and not rely on the state.hasAllData

Suggested change
const hasAllData = this.state.hasAllData || sampledColumns.length === this.custodyConfig.sampledColumns.length;
const hasAllData = sampledColumns.length === this.custodyConfig.sampledColumns.length;

Copy link
Member Author

Choose a reason for hiding this comment

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

We shouldn't be dealing with an updating object here. We should make a copy of the sampled/custodied columns on block input creation (or pass in copies directly) so updates don't affect the single block input.

Sampling updates can be handled per-slot when we're synced at the tip. (A custody update can take effect the next slot).
Sampling updates can be handled per-batch when we're range syncing. (A custody update can take effect the next batch).
And in either case, the update may trigger a data backfill.

Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

Looks fine. Merging as-is. Can update later if necessary

@matthewkeil matthewkeil enabled auto-merge (squash) May 12, 2025 13:42
@wemeetagain wemeetagain disabled auto-merge May 12, 2025 15:43
@wemeetagain wemeetagain merged commit 3658525 into unstable May 12, 2025
18 of 20 checks passed
@wemeetagain wemeetagain deleted the cayman/block-input branch May 12, 2025 15:44
@wemeetagain
Copy link
Member Author

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