这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@matthewkeil
Copy link
Member

@matthewkeil matthewkeil commented Oct 28, 2025

Motivation

Spec will be updated to have check of signatures via reqresp. Proacative fix inline with Lighthouse and Prysm

sigp/lighthouse#7650

Comment on lines -459 to -470
// TODO(fulu) not in use, remove?
export type ValidateColumnSidecarsProps = Pick<
FetchByRootAndValidateColumnsProps,
"config" | "peerMeta" | "blockRoot" | "missing"
> & {
slot: number;
blobCount: number;
needed?: fulu.DataColumnSidecars;
needToPublish?: fulu.DataColumnSidecars;
};

// TODO(fulu) not in use, remove?
Copy link
Member Author

Choose a reason for hiding this comment

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

These were unused. Removed them instead of updating the inner function call for validation

@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 0d63e74 Previous: 6832b02 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 892.69 us/op 1.0244 ms/op 0.87
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 36.562 us/op 36.965 us/op 0.99
BLS verify - blst 846.08 us/op 906.53 us/op 0.93
BLS verifyMultipleSignatures 3 - blst 1.2832 ms/op 1.3234 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst 1.8838 ms/op 1.7174 ms/op 1.10
BLS verifyMultipleSignatures 32 - blst 4.9483 ms/op 5.0455 ms/op 0.98
BLS verifyMultipleSignatures 64 - blst 9.6612 ms/op 9.3483 ms/op 1.03
BLS verifyMultipleSignatures 128 - blst 17.864 ms/op 17.935 ms/op 1.00
BLS deserializing 10000 signatures 706.74 ms/op 724.66 ms/op 0.98
BLS deserializing 100000 signatures 6.8893 s/op 7.1260 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst 863.17 us/op 886.84 us/op 0.97
BLS verifyMultipleSignatures - same message - 8 - blst 971.71 us/op 1.0035 ms/op 0.97
BLS verifyMultipleSignatures - same message - 32 - blst 1.6579 ms/op 1.7209 ms/op 0.96
BLS verifyMultipleSignatures - same message - 64 - blst 2.4638 ms/op 2.6353 ms/op 0.93
BLS verifyMultipleSignatures - same message - 128 - blst 4.2739 ms/op 4.4320 ms/op 0.96
BLS aggregatePubkeys 32 - blst 19.543 us/op 19.656 us/op 0.99
BLS aggregatePubkeys 128 - blst 70.151 us/op 70.443 us/op 1.00
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 49.384 ms/op 52.121 ms/op 0.95
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 45.299 ms/op 46.236 ms/op 0.98
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 34.503 ms/op 36.213 ms/op 0.95
getSlashingsAndExits - default max 71.376 us/op 73.103 us/op 0.98
getSlashingsAndExits - 2k 297.38 us/op 288.93 us/op 1.03
isKnown best case - 1 super set check 205.00 ns/op 210.00 ns/op 0.98
isKnown normal case - 2 super set checks 203.00 ns/op 206.00 ns/op 0.99
isKnown worse case - 16 super set checks 204.00 ns/op 211.00 ns/op 0.97
InMemoryCheckpointStateCache - add get delete 2.4000 us/op 2.3280 us/op 1.03
validate api signedAggregateAndProof - struct 1.3642 ms/op 1.3461 ms/op 1.01
validate gossip signedAggregateAndProof - struct 1.3648 ms/op 1.3607 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 114.49 us/op 116.10 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 64 102.40 us/op 101.43 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 128 96.363 us/op 93.822 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 256 99.528 us/op 96.240 us/op 1.03
pickEth1Vote - no votes 967.31 us/op 942.28 us/op 1.03
pickEth1Vote - max votes 7.8264 ms/op 5.1378 ms/op 1.52
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.456 ms/op 10.734 ms/op 1.25
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.852 ms/op 14.677 ms/op 1.28
pickEth1Vote - Eth1Data fastSerialize value x2048 418.94 us/op 450.47 us/op 0.93
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.8233 ms/op 2.1352 ms/op 1.32
bytes32 toHexString 366.00 ns/op 362.00 ns/op 1.01
bytes32 Buffer.toString(hex) 243.00 ns/op 242.00 ns/op 1.00
bytes32 Buffer.toString(hex) from Uint8Array 324.00 ns/op 324.00 ns/op 1.00
bytes32 Buffer.toString(hex) + 0x 250.00 ns/op 246.00 ns/op 1.02
Object access 1 prop 0.11300 ns/op 0.11700 ns/op 0.97
Map access 1 prop 0.11700 ns/op 0.12600 ns/op 0.93
Object get x1000 5.8140 ns/op 5.8580 ns/op 0.99
Map get x1000 6.3610 ns/op 6.3630 ns/op 1.00
Object set x1000 33.021 ns/op 31.049 ns/op 1.06
Map set x1000 20.674 ns/op 19.869 ns/op 1.04
Return object 10000 times 0.29280 ns/op 0.28550 ns/op 1.03
Throw Error 10000 times 4.5095 us/op 4.1949 us/op 1.07
toHex 140.79 ns/op 140.82 ns/op 1.00
Buffer.from 134.74 ns/op 134.60 ns/op 1.00
shared Buffer 84.303 ns/op 83.510 ns/op 1.01
fastMsgIdFn sha256 / 200 bytes 2.1910 us/op 2.1450 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 198.00 ns/op 304.00 ns/op 0.65
fastMsgIdFn h64 xxhash / 200 bytes 267.00 ns/op 260.00 ns/op 1.03
fastMsgIdFn sha256 / 1000 bytes 7.5210 us/op 7.2880 us/op 1.03
fastMsgIdFn h32 xxhash / 1000 bytes 332.00 ns/op 336.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 1000 bytes 344.00 ns/op 332.00 ns/op 1.04
fastMsgIdFn sha256 / 10000 bytes 65.433 us/op 64.968 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.8790 us/op 1.8510 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.3790 us/op 1.2310 us/op 1.12
100 bytes - compress - snappyjs 1.6508 us/op 1.3242 us/op 1.25
100 bytes - compress - snappy 1.0292 us/op 1.1067 us/op 0.93
100 bytes - compress - #snappy 1.1926 us/op 1.3070 us/op 0.91
200 bytes - compress - snappyjs 1.7366 us/op 1.9305 us/op 0.90
200 bytes - compress - snappy 1.1557 us/op 1.2714 us/op 0.91
200 bytes - compress - #snappy 1.8328 us/op 1.8654 us/op 0.98
300 bytes - compress - snappyjs 2.2182 us/op 2.2527 us/op 0.98
300 bytes - compress - snappy 1.2221 us/op 1.2211 us/op 1.00
300 bytes - compress - #snappy 2.1648 us/op 2.1460 us/op 1.01
400 bytes - compress - snappyjs 2.3833 us/op 2.6232 us/op 0.91
400 bytes - compress - snappy 1.2365 us/op 1.3116 us/op 0.94
400 bytes - compress - #snappy 2.4300 us/op 2.4157 us/op 1.01
500 bytes - compress - snappyjs 2.9060 us/op 2.8273 us/op 1.03
500 bytes - compress - snappy 1.2850 us/op 1.3339 us/op 0.96
500 bytes - compress - #snappy 2.7610 us/op 2.7380 us/op 1.01
1000 bytes - compress - snappyjs 4.9169 us/op 4.1641 us/op 1.18
1000 bytes - compress - snappy 1.5546 us/op 1.7583 us/op 0.88
1000 bytes - compress - #snappy 4.4792 us/op 4.3446 us/op 1.03
10000 bytes - compress - snappyjs 29.815 us/op 30.171 us/op 0.99
10000 bytes - compress - snappy 28.111 us/op 40.049 us/op 0.70
10000 bytes - compress - #snappy 29.401 us/op 30.350 us/op 0.97
100 bytes - uncompress - snappyjs 767.09 ns/op 794.70 ns/op 0.97
100 bytes - uncompress - snappy 1.0135 us/op 1.0323 us/op 0.98
100 bytes - uncompress - #snappy 678.29 ns/op 707.95 ns/op 0.96
200 bytes - uncompress - snappyjs 1.0339 us/op 1.4731 us/op 0.70
200 bytes - uncompress - snappy 1.0681 us/op 1.1917 us/op 0.90
200 bytes - uncompress - #snappy 992.92 ns/op 1.3551 us/op 0.73
300 bytes - uncompress - snappyjs 1.3699 us/op 1.5647 us/op 0.88
300 bytes - uncompress - snappy 1.0944 us/op 1.0631 us/op 1.03
300 bytes - uncompress - #snappy 1.3288 us/op 1.5908 us/op 0.84
400 bytes - uncompress - snappyjs 1.8299 us/op 1.4482 us/op 1.26
400 bytes - uncompress - snappy 1.1167 us/op 1.1310 us/op 0.99
400 bytes - uncompress - #snappy 1.4817 us/op 1.6472 us/op 0.90
500 bytes - uncompress - snappyjs 1.7395 us/op 1.7124 us/op 1.02
500 bytes - uncompress - snappy 1.2082 us/op 1.1647 us/op 1.04
500 bytes - uncompress - #snappy 1.7114 us/op 1.2338 us/op 1.39
1000 bytes - uncompress - snappyjs 2.0255 us/op 2.4596 us/op 0.82
1000 bytes - uncompress - snappy 1.5827 us/op 1.4856 us/op 1.07
1000 bytes - uncompress - #snappy 2.0291 us/op 1.9644 us/op 1.03
10000 bytes - uncompress - snappyjs 14.594 us/op 15.586 us/op 0.94
10000 bytes - uncompress - snappy 28.835 us/op 26.707 us/op 1.08
10000 bytes - uncompress - #snappy 13.923 us/op 16.040 us/op 0.87
send data - 1000 256B messages 15.620 ms/op 16.219 ms/op 0.96
send data - 1000 512B messages 20.056 ms/op 19.743 ms/op 1.02
send data - 1000 1024B messages 27.758 ms/op 28.029 ms/op 0.99
send data - 1000 1200B messages 26.958 ms/op 26.716 ms/op 1.01
send data - 1000 2048B messages 27.588 ms/op 27.893 ms/op 0.99
send data - 1000 4096B messages 35.476 ms/op 30.558 ms/op 1.16
send data - 1000 16384B messages 46.479 ms/op 47.464 ms/op 0.98
send data - 1000 65536B messages 112.21 ms/op 127.16 ms/op 0.88
enrSubnets - fastDeserialize 64 bits 896.00 ns/op 930.00 ns/op 0.96
enrSubnets - ssz BitVector 64 bits 344.00 ns/op 333.00 ns/op 1.03
enrSubnets - fastDeserialize 4 bits 124.00 ns/op 130.00 ns/op 0.95
enrSubnets - ssz BitVector 4 bits 339.00 ns/op 333.00 ns/op 1.02
prioritizePeers score -10:0 att 32-0.1 sync 2-0 231.63 us/op 249.65 us/op 0.93
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 262.79 us/op 270.63 us/op 0.97
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 380.78 us/op 398.62 us/op 0.96
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 710.19 us/op 732.37 us/op 0.97
prioritizePeers score 0:0 att 64-1 sync 4-1 878.66 us/op 899.74 us/op 0.98
array of 16000 items push then shift 1.6345 us/op 1.6499 us/op 0.99
LinkedList of 16000 items push then shift 7.3550 ns/op 7.7470 ns/op 0.95
array of 16000 items push then pop 79.488 ns/op 79.608 ns/op 1.00
LinkedList of 16000 items push then pop 7.3390 ns/op 7.4040 ns/op 0.99
array of 24000 items push then shift 2.4096 us/op 2.4516 us/op 0.98
LinkedList of 24000 items push then shift 7.3670 ns/op 7.4660 ns/op 0.99
array of 24000 items push then pop 107.17 ns/op 111.75 ns/op 0.96
LinkedList of 24000 items push then pop 7.3490 ns/op 7.5530 ns/op 0.97
intersect bitArray bitLen 8 6.4710 ns/op 6.3780 ns/op 1.01
intersect array and set length 8 38.932 ns/op 39.119 ns/op 1.00
intersect bitArray bitLen 128 30.234 ns/op 30.816 ns/op 0.98
intersect array and set length 128 649.44 ns/op 636.75 ns/op 1.02
bitArray.getTrueBitIndexes() bitLen 128 1.0190 us/op 1.0020 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 248 1.8040 us/op 1.7810 us/op 1.01
bitArray.getTrueBitIndexes() bitLen 512 3.7160 us/op 3.6790 us/op 1.01
Full columns - reconstruct all 6 blobs 74.861 us/op 116.87 us/op 0.64
Full columns - reconstruct half of the blobs out of 6 40.062 us/op 46.413 us/op 0.86
Full columns - reconstruct single blob out of 6 18.617 us/op 20.906 us/op 0.89
Half columns - reconstruct all 6 blobs 270.53 ms/op 275.78 ms/op 0.98
Half columns - reconstruct half of the blobs out of 6 141.01 ms/op 142.65 ms/op 0.99
Half columns - reconstruct single blob out of 6 52.731 ms/op 50.305 ms/op 1.05
Full columns - reconstruct all 10 blobs 152.54 us/op 120.16 us/op 1.27
Full columns - reconstruct half of the blobs out of 10 68.974 us/op 67.390 us/op 1.02
Full columns - reconstruct single blob out of 10 19.621 us/op 20.415 us/op 0.96
Half columns - reconstruct all 10 blobs 456.40 ms/op 454.05 ms/op 1.01
Half columns - reconstruct half of the blobs out of 10 232.71 ms/op 231.97 ms/op 1.00
Half columns - reconstruct single blob out of 10 53.032 ms/op 50.672 ms/op 1.05
Full columns - reconstruct all 20 blobs 366.58 us/op 214.35 us/op 1.71
Full columns - reconstruct half of the blobs out of 20 170.21 us/op 104.79 us/op 1.62
Full columns - reconstruct single blob out of 20 23.316 us/op 18.963 us/op 1.23
Half columns - reconstruct all 20 blobs 896.40 ms/op 929.00 ms/op 0.96
Half columns - reconstruct half of the blobs out of 20 447.72 ms/op 457.66 ms/op 0.98
Half columns - reconstruct single blob out of 20 51.583 ms/op 52.105 ms/op 0.99
Buffer.concat 32 items 617.00 ns/op 653.00 ns/op 0.94
Uint8Array.set 32 items 1.9580 us/op 1.0830 us/op 1.81
Buffer.copy 2.2070 us/op 2.1440 us/op 1.03
Uint8Array.set - with subarray 1.8270 us/op 1.5580 us/op 1.17
Uint8Array.set - without subarray 1.3810 us/op 858.00 ns/op 1.61
getUint32 - dataview 195.00 ns/op 196.00 ns/op 0.99
getUint32 - manual 117.00 ns/op 121.00 ns/op 0.97
Set add up to 64 items then delete first 3.1215 us/op 2.4648 us/op 1.27
OrderedSet add up to 64 items then delete first 4.6076 us/op 3.2873 us/op 1.40
Set add up to 64 items then delete last 2.5708 us/op 2.4756 us/op 1.04
OrderedSet add up to 64 items then delete last 4.8235 us/op 4.0686 us/op 1.19
Set add up to 64 items then delete middle 3.5298 us/op 2.5144 us/op 1.40
OrderedSet add up to 64 items then delete middle 7.8493 us/op 6.3582 us/op 1.23
Set add up to 128 items then delete first 7.6096 us/op 5.1870 us/op 1.47
OrderedSet add up to 128 items then delete first 12.116 us/op 8.5040 us/op 1.42
Set add up to 128 items then delete last 7.0052 us/op 5.9656 us/op 1.17
OrderedSet add up to 128 items then delete last 11.152 us/op 9.1416 us/op 1.22
Set add up to 128 items then delete middle 6.7870 us/op 5.0739 us/op 1.34
OrderedSet add up to 128 items then delete middle 17.671 us/op 14.489 us/op 1.22
Set add up to 256 items then delete first 15.267 us/op 10.252 us/op 1.49
OrderedSet add up to 256 items then delete first 23.211 us/op 16.006 us/op 1.45
Set add up to 256 items then delete last 14.123 us/op 10.770 us/op 1.31
OrderedSet add up to 256 items then delete last 20.928 us/op 16.227 us/op 1.29
Set add up to 256 items then delete middle 14.263 us/op 9.8667 us/op 1.45
OrderedSet add up to 256 items then delete middle 50.098 us/op 45.464 us/op 1.10
transfer serialized Status (84 B) 2.8450 us/op 2.2460 us/op 1.27
copy serialized Status (84 B) 1.3070 us/op 1.2080 us/op 1.08
transfer serialized SignedVoluntaryExit (112 B) 2.5350 us/op 2.2720 us/op 1.12
copy serialized SignedVoluntaryExit (112 B) 1.5430 us/op 1.2500 us/op 1.23
transfer serialized ProposerSlashing (416 B) 2.5800 us/op 2.3200 us/op 1.11
copy serialized ProposerSlashing (416 B) 1.7540 us/op 1.2920 us/op 1.36
transfer serialized Attestation (485 B) 3.0890 us/op 2.3560 us/op 1.31
copy serialized Attestation (485 B) 1.7170 us/op 1.2820 us/op 1.34
transfer serialized AttesterSlashing (33232 B) 3.5910 us/op 3.1880 us/op 1.13
copy serialized AttesterSlashing (33232 B) 7.0040 us/op 4.3470 us/op 1.61
transfer serialized Small SignedBeaconBlock (128000 B) 4.1690 us/op 3.1790 us/op 1.31
copy serialized Small SignedBeaconBlock (128000 B) 23.744 us/op 14.478 us/op 1.64
transfer serialized Avg SignedBeaconBlock (200000 B) 5.2240 us/op 7.2920 us/op 0.72
copy serialized Avg SignedBeaconBlock (200000 B) 31.606 us/op 21.618 us/op 1.46
transfer serialized BlobsSidecar (524380 B) 9.2790 us/op 4.8480 us/op 1.91
copy serialized BlobsSidecar (524380 B) 106.82 us/op 64.206 us/op 1.66
transfer serialized Big SignedBeaconBlock (1000000 B) 15.643 us/op 4.7640 us/op 3.28
copy serialized Big SignedBeaconBlock (1000000 B) 224.44 us/op 123.25 us/op 1.82
pass gossip attestations to forkchoice per slot 2.8124 ms/op 3.0526 ms/op 0.92
forkChoice updateHead vc 100000 bc 64 eq 0 485.82 us/op 493.47 us/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 0 2.8884 ms/op 2.9290 ms/op 0.99
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7641 ms/op 4.8172 ms/op 0.99
forkChoice updateHead vc 600000 bc 320 eq 0 2.9155 ms/op 2.8917 ms/op 1.01
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9221 ms/op 4.0157 ms/op 0.73
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1397 ms/op 3.1457 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 1000 2.9648 ms/op 2.8503 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 10000 3.0005 ms/op 2.9651 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 10.138 ms/op 9.8510 ms/op 1.03
computeDeltas 1400000 validators 0% inactive 13.813 ms/op 13.751 ms/op 1.00
computeDeltas 1400000 validators 10% inactive 12.788 ms/op 12.859 ms/op 0.99
computeDeltas 1400000 validators 20% inactive 11.697 ms/op 11.626 ms/op 1.01
computeDeltas 1400000 validators 50% inactive 9.0112 ms/op 8.7441 ms/op 1.03
computeDeltas 2100000 validators 0% inactive 20.943 ms/op 20.463 ms/op 1.02
computeDeltas 2100000 validators 10% inactive 19.375 ms/op 19.097 ms/op 1.01
computeDeltas 2100000 validators 20% inactive 17.480 ms/op 17.524 ms/op 1.00
computeDeltas 2100000 validators 50% inactive 13.385 ms/op 13.276 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.1301 ms/op 2.5245 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei worstcase 2.9610 ms/op 3.3473 ms/op 0.88
altair processAttestation - setStatus - 1/6 committees join 118.27 us/op 139.43 us/op 0.85
altair processAttestation - setStatus - 1/3 committees join 230.77 us/op 240.85 us/op 0.96
altair processAttestation - setStatus - 1/2 committees join 324.52 us/op 340.35 us/op 0.95
altair processAttestation - setStatus - 2/3 committees join 415.91 us/op 434.24 us/op 0.96
altair processAttestation - setStatus - 4/5 committees join 559.97 us/op 601.51 us/op 0.93
altair processAttestation - setStatus - 100% committees join 690.36 us/op 728.92 us/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 4.3855 ms/op 4.7155 ms/op 0.93
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.095 ms/op 27.384 ms/op 1.17
altair processBlock - 250000 vs - 7PWei worstcase 34.634 ms/op 31.169 ms/op 1.11
altair processBlock - 250000 vs - 7PWei worstcase hashState 72.536 ms/op 70.807 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6126 ms/op 1.5600 ms/op 1.03
phase0 processBlock - 250000 vs - 7PWei worstcase 21.797 ms/op 21.183 ms/op 1.03
altair processEth1Data - 250000 vs - 7PWei normalcase 357.14 us/op 325.89 us/op 1.10
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.1150 us/op 6.1470 us/op 0.99
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 45.732 us/op 43.069 us/op 1.06
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 12.118 us/op 11.160 us/op 1.09
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.5120 us/op 6.9910 us/op 1.07
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 164.92 us/op 172.16 us/op 0.96
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.4493 ms/op 1.8458 ms/op 1.33
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.4866 ms/op 2.4376 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.4607 ms/op 2.4778 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.1945 ms/op 4.8474 ms/op 1.07
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4958 ms/op 2.4390 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.6162 ms/op 4.9685 ms/op 0.93
Tree 40 250000 create 558.95 ms/op 445.89 ms/op 1.25
Tree 40 250000 get(125000) 139.30 ns/op 139.09 ns/op 1.00
Tree 40 250000 set(125000) 1.6431 us/op 1.4514 us/op 1.13
Tree 40 250000 toArray() 19.380 ms/op 16.559 ms/op 1.17
Tree 40 250000 iterate all - toArray() + loop 15.859 ms/op 19.403 ms/op 0.82
Tree 40 250000 iterate all - get(i) 54.490 ms/op 57.786 ms/op 0.94
Array 250000 create 2.9089 ms/op 3.2638 ms/op 0.89
Array 250000 clone - spread 820.46 us/op 1.4230 ms/op 0.58
Array 250000 get(125000) 0.40700 ns/op 0.42200 ns/op 0.96
Array 250000 set(125000) 0.43200 ns/op 0.43800 ns/op 0.99
Array 250000 iterate all - loop 98.996 us/op 111.43 us/op 0.89
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.080 ms/op 42.099 ms/op 1.00
Array.fill - length 1000000 3.4182 ms/op 3.4215 ms/op 1.00
Array push - length 1000000 14.047 ms/op 15.429 ms/op 0.91
Array.get 0.27810 ns/op 0.27722 ns/op 1.00
Uint8Array.get 0.44069 ns/op 0.44066 ns/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.370 ms/op 16.685 ms/op 0.98
altair processEpoch - mainnet_e81889 275.47 ms/op 255.06 ms/op 1.08
mainnet_e81889 - altair beforeProcessEpoch 25.972 ms/op 18.485 ms/op 1.41
mainnet_e81889 - altair processJustificationAndFinalization 5.8230 us/op 5.2920 us/op 1.10
mainnet_e81889 - altair processInactivityUpdates 4.7101 ms/op 4.7007 ms/op 1.00
mainnet_e81889 - altair processRewardsAndPenalties 37.088 ms/op 42.358 ms/op 0.88
mainnet_e81889 - altair processRegistryUpdates 677.00 ns/op 748.00 ns/op 0.91
mainnet_e81889 - altair processSlashings 184.00 ns/op 287.00 ns/op 0.64
mainnet_e81889 - altair processEth1DataReset 176.00 ns/op 190.00 ns/op 0.93
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2285 ms/op 1.3692 ms/op 0.90
mainnet_e81889 - altair processSlashingsReset 949.00 ns/op 1.1520 us/op 0.82
mainnet_e81889 - altair processRandaoMixesReset 1.2470 us/op 1.4320 us/op 0.87
mainnet_e81889 - altair processHistoricalRootsUpdate 176.00 ns/op 245.00 ns/op 0.72
mainnet_e81889 - altair processParticipationFlagUpdates 664.00 ns/op 554.00 ns/op 1.20
mainnet_e81889 - altair processSyncCommitteeUpdates 141.00 ns/op 145.00 ns/op 0.97
mainnet_e81889 - altair afterProcessEpoch 45.530 ms/op 48.178 ms/op 0.95
capella processEpoch - mainnet_e217614 957.36 ms/op 1.0959 s/op 0.87
mainnet_e217614 - capella beforeProcessEpoch 60.103 ms/op 64.623 ms/op 0.93
mainnet_e217614 - capella processJustificationAndFinalization 5.2100 us/op 5.3550 us/op 0.97
mainnet_e217614 - capella processInactivityUpdates 15.044 ms/op 15.089 ms/op 1.00
mainnet_e217614 - capella processRewardsAndPenalties 181.24 ms/op 186.83 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 6.6210 us/op 6.6390 us/op 1.00
mainnet_e217614 - capella processSlashings 179.00 ns/op 183.00 ns/op 0.98
mainnet_e217614 - capella processEth1DataReset 181.00 ns/op 182.00 ns/op 0.99
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.5101 ms/op 4.3141 ms/op 1.05
mainnet_e217614 - capella processSlashingsReset 934.00 ns/op 908.00 ns/op 1.03
mainnet_e217614 - capella processRandaoMixesReset 1.2050 us/op 1.2280 us/op 0.98
mainnet_e217614 - capella processHistoricalRootsUpdate 226.00 ns/op 186.00 ns/op 1.22
mainnet_e217614 - capella processParticipationFlagUpdates 556.00 ns/op 605.00 ns/op 0.92
mainnet_e217614 - capella afterProcessEpoch 117.59 ms/op 124.34 ms/op 0.95
phase0 processEpoch - mainnet_e58758 370.10 ms/op 309.47 ms/op 1.20
mainnet_e58758 - phase0 beforeProcessEpoch 98.497 ms/op 97.461 ms/op 1.01
mainnet_e58758 - phase0 processJustificationAndFinalization 5.9730 us/op 6.5250 us/op 0.92
mainnet_e58758 - phase0 processRewardsAndPenalties 41.673 ms/op 40.063 ms/op 1.04
mainnet_e58758 - phase0 processRegistryUpdates 3.2860 us/op 3.3790 us/op 0.97
mainnet_e58758 - phase0 processSlashings 186.00 ns/op 191.00 ns/op 0.97
mainnet_e58758 - phase0 processEth1DataReset 190.00 ns/op 183.00 ns/op 1.04
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 4.3977 ms/op 1.2644 ms/op 3.48
mainnet_e58758 - phase0 processSlashingsReset 1.2070 us/op 984.00 ns/op 1.23
mainnet_e58758 - phase0 processRandaoMixesReset 1.3460 us/op 1.2100 us/op 1.11
mainnet_e58758 - phase0 processHistoricalRootsUpdate 189.00 ns/op 211.00 ns/op 0.90
mainnet_e58758 - phase0 processParticipationRecordUpdates 982.00 ns/op 896.00 ns/op 1.10
mainnet_e58758 - phase0 afterProcessEpoch 37.455 ms/op 37.058 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3996 ms/op 1.3745 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 5.9633 ms/op 2.0562 ms/op 2.90
altair processInactivityUpdates - 250000 normalcase 18.894 ms/op 18.188 ms/op 1.04
altair processInactivityUpdates - 250000 worstcase 19.843 ms/op 18.063 ms/op 1.10
phase0 processRegistryUpdates - 250000 normalcase 8.7540 us/op 6.8440 us/op 1.28
phase0 processRegistryUpdates - 250000 badcase_full_deposits 297.92 us/op 303.32 us/op 0.98
phase0 processRegistryUpdates - 250000 worstcase 0.5 103.27 ms/op 114.90 ms/op 0.90
altair processRewardsAndPenalties - 250000 normalcase 27.380 ms/op 27.181 ms/op 1.01
altair processRewardsAndPenalties - 250000 worstcase 27.278 ms/op 26.786 ms/op 1.02
phase0 getAttestationDeltas - 250000 normalcase 18.417 ms/op 23.082 ms/op 0.80
phase0 getAttestationDeltas - 250000 worstcase 7.6443 ms/op 5.8840 ms/op 1.30
phase0 processSlashings - 250000 worstcase 121.58 us/op 111.28 us/op 1.09
altair processSyncCommitteeUpdates - 250000 12.842 ms/op 12.034 ms/op 1.07
BeaconState.hashTreeRoot - No change 226.00 ns/op 213.00 ns/op 1.06
BeaconState.hashTreeRoot - 1 full validator 101.36 us/op 75.766 us/op 1.34
BeaconState.hashTreeRoot - 32 full validator 1.1098 ms/op 816.22 us/op 1.36
BeaconState.hashTreeRoot - 512 full validator 13.088 ms/op 11.628 ms/op 1.13
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 132.80 us/op 93.080 us/op 1.43
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8935 ms/op 1.4569 ms/op 1.30
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 29.661 ms/op 29.737 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 83.559 us/op 84.849 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 1.1573 ms/op 917.14 us/op 1.26
BeaconState.hashTreeRoot - 512 balances 9.8349 ms/op 8.9433 ms/op 1.10
BeaconState.hashTreeRoot - 250000 balances 200.87 ms/op 198.12 ms/op 1.01
aggregationBits - 2048 els - zipIndexesInBitList 26.055 us/op 23.159 us/op 1.13
byteArrayEquals 32 55.458 ns/op 53.863 ns/op 1.03
Buffer.compare 32 18.021 ns/op 17.308 ns/op 1.04
byteArrayEquals 1024 1.6522 us/op 1.6052 us/op 1.03
Buffer.compare 1024 25.541 ns/op 25.884 ns/op 0.99
byteArrayEquals 16384 26.512 us/op 25.586 us/op 1.04
Buffer.compare 16384 210.92 ns/op 200.56 ns/op 1.05
byteArrayEquals 123687377 198.81 ms/op 192.86 ms/op 1.03
Buffer.compare 123687377 10.139 ms/op 6.2304 ms/op 1.63
byteArrayEquals 32 - diff last byte 54.530 ns/op 52.322 ns/op 1.04
Buffer.compare 32 - diff last byte 17.490 ns/op 17.027 ns/op 1.03
byteArrayEquals 1024 - diff last byte 1.6433 us/op 1.5811 us/op 1.04
Buffer.compare 1024 - diff last byte 25.593 ns/op 25.056 ns/op 1.02
byteArrayEquals 16384 - diff last byte 26.180 us/op 25.221 us/op 1.04
Buffer.compare 16384 - diff last byte 212.85 ns/op 195.71 ns/op 1.09
byteArrayEquals 123687377 - diff last byte 215.52 ms/op 193.03 ms/op 1.12
Buffer.compare 123687377 - diff last byte 11.012 ms/op 7.1107 ms/op 1.55
byteArrayEquals 32 - random bytes 5.3940 ns/op 5.2270 ns/op 1.03
Buffer.compare 32 - random bytes 20.789 ns/op 17.187 ns/op 1.21
byteArrayEquals 1024 - random bytes 5.5460 ns/op 5.2310 ns/op 1.06
Buffer.compare 1024 - random bytes 18.345 ns/op 17.215 ns/op 1.07
byteArrayEquals 16384 - random bytes 6.3510 ns/op 5.1650 ns/op 1.23
Buffer.compare 16384 - random bytes 18.683 ns/op 17.340 ns/op 1.08
byteArrayEquals 123687377 - random bytes 6.8100 ns/op 6.5000 ns/op 1.05
Buffer.compare 123687377 - random bytes 19.600 ns/op 18.390 ns/op 1.07
regular array get 100000 times 38.498 us/op 33.821 us/op 1.14
wrappedArray get 100000 times 35.666 us/op 33.801 us/op 1.06
arrayWithProxy get 100000 times 14.586 ms/op 13.500 ms/op 1.08
ssz.Root.equals 48.777 ns/op 47.430 ns/op 1.03
byteArrayEquals 48.592 ns/op 46.494 ns/op 1.05
Buffer.compare 11.224 ns/op 10.393 ns/op 1.08
processSlot - 1 slots 11.554 us/op 10.042 us/op 1.15
processSlot - 32 slots 2.6378 ms/op 2.0562 ms/op 1.28
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.3626 ms/op 2.9924 ms/op 1.46
getCommitteeAssignments - req 1 vs - 250000 vc 2.1720 ms/op 2.1010 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 4.2520 ms/op 4.1211 ms/op 1.03
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5897 ms/op 4.4252 ms/op 1.04
findModifiedValidators - 10000 modified validators 990.86 ms/op 738.69 ms/op 1.34
findModifiedValidators - 1000 modified validators 785.16 ms/op 676.13 ms/op 1.16
findModifiedValidators - 100 modified validators 257.58 ms/op 281.38 ms/op 0.92
findModifiedValidators - 10 modified validators 259.15 ms/op 170.69 ms/op 1.52
findModifiedValidators - 1 modified validators 254.45 ms/op 138.99 ms/op 1.83
findModifiedValidators - no difference 217.78 ms/op 182.93 ms/op 1.19
compare ViewDUs 6.5882 s/op 6.3337 s/op 1.04
compare each validator Uint8Array 1.1458 s/op 1.3261 s/op 0.86
compare ViewDU to Uint8Array 1.2502 s/op 1.2375 s/op 1.01
migrate state 1000000 validators, 24 modified, 0 new 1.2367 s/op 891.28 ms/op 1.39
migrate state 1000000 validators, 1700 modified, 1000 new 1.5556 s/op 1.1475 s/op 1.36
migrate state 1000000 validators, 3400 modified, 2000 new 1.7709 s/op 1.2915 s/op 1.37
migrate state 1500000 validators, 24 modified, 0 new 1.0326 s/op 873.62 ms/op 1.18
migrate state 1500000 validators, 1700 modified, 1000 new 1.2027 s/op 1.0328 s/op 1.16
migrate state 1500000 validators, 3400 modified, 2000 new 1.2216 s/op 1.1721 s/op 1.04
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3300 ns/op 4.1800 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 480.65 ns/op 567.41 ns/op 0.85
naive computeProposerIndex 100000 validators 53.043 ms/op 52.987 ms/op 1.00
computeProposerIndex 100000 validators 1.5068 ms/op 1.5135 ms/op 1.00
naiveGetNextSyncCommitteeIndices 1000 validators 7.6652 s/op 7.9675 s/op 0.96
getNextSyncCommitteeIndices 1000 validators 121.35 ms/op 121.30 ms/op 1.00
naiveGetNextSyncCommitteeIndices 10000 validators 8.0033 s/op 7.5104 s/op 1.07
getNextSyncCommitteeIndices 10000 validators 126.20 ms/op 117.85 ms/op 1.07
naiveGetNextSyncCommitteeIndices 100000 validators 7.3305 s/op 7.6020 s/op 0.96
getNextSyncCommitteeIndices 100000 validators 121.00 ms/op 120.40 ms/op 1.00
naive computeShuffledIndex 100000 validators 23.957 s/op 26.154 s/op 0.92
cached computeShuffledIndex 100000 validators 550.01 ms/op 583.13 ms/op 0.94
naive computeShuffledIndex 2000000 validators 501.93 s/op 558.68 s/op 0.90
cached computeShuffledIndex 2000000 validators 37.524 s/op 32.063 s/op 1.17
computeProposers - vc 250000 650.32 us/op 635.02 us/op 1.02
computeEpochShuffling - vc 250000 42.328 ms/op 41.939 ms/op 1.01
getNextSyncCommittee - vc 250000 10.618 ms/op 11.635 ms/op 0.91
computeSigningRoot for AttestationData 21.166 us/op 20.657 us/op 1.02
hash AttestationData serialized data then Buffer.toString(base64) 1.6052 us/op 1.6330 us/op 0.98
toHexString serialized data 1.1817 us/op 1.2035 us/op 0.98
Buffer.toString(base64) 160.68 ns/op 170.96 ns/op 0.94
nodejs block root to RootHex using toHex 160.63 ns/op 152.83 ns/op 1.05
nodejs block root to RootHex using toRootHex 87.711 ns/op 92.391 ns/op 0.95
nodejs fromHex(blob) 118.23 us/op 111.92 us/op 1.06
nodejs fromHexInto(blob) 831.00 us/op 845.90 us/op 0.98
nodejs block root to RootHex using the deprecated toHexString 214.07 ns/op 215.82 ns/op 0.99
browser block root to RootHex using toHex 184.60 ns/op 177.61 ns/op 1.04
browser block root to RootHex using toRootHex 173.30 ns/op 174.12 ns/op 1.00
browser fromHex(blob) 809.24 us/op 800.44 us/op 1.01
browser fromHexInto(blob) 833.12 us/op 819.38 us/op 1.02
browser block root to RootHex using the deprecated toHexString 818.35 ns/op 854.77 ns/op 0.96

by benchmarkbot/action

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 20.61069% with 104 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.96%. Comparing base (6832b02) to head (92dc960).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8580      +/-   ##
============================================
- Coverage     51.99%   51.96%   -0.04%     
============================================
  Files           848      848              
  Lines         65857    65928      +71     
  Branches       4808     4814       +6     
============================================
+ Hits          34242    34258      +16     
- Misses        31547    31602      +55     
  Partials         68       68              
🚀 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.

@matthewkeil matthewkeil marked this pull request as ready for review October 30, 2025 19:08
@matthewkeil matthewkeil requested a review from a team as a code owner October 30, 2025 19:08
@philknows philknows added this to the v1.36.0 milestone Oct 31, 2025
}

if (chain !== null) {
const headState = await chain.getHeadState();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is correct, need to get block state (same as in gossip validation)

const blockState = await chain.regen
.getBlockSlotState(parentRoot, blockHeader.slot, {dontTransferCache: true}, RegenCaller.validateGossipDataColumn)

Copy link
Member Author

@matthewkeil matthewkeil Oct 31, 2025

Choose a reason for hiding this comment

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

No, not needed. Only thing that is used to calculate the signing root is the slot of the object being signed. Not sure why we use the state in gossip actually. I think just because it has the keys on the epochCtx

Copy link
Member

Choose a reason for hiding this comment

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

I am pretty sure in some re-org scenario or when we validate sidecars from a different chain the pubkey2index could be different between the states

pubkey: epochCtx.index2pubkey[signedBlockHeader.message.proposerIndex],

this seems unlikely but we also use the state slot to compute the domain which can very likely be wrong around fork boundary if we always use the head state

const stateForkInfo = chainForkConfig.getForkInfo(stateSlot);

@twoeths should probably double check this

Copy link
Member Author

Choose a reason for hiding this comment

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

The validator/proposer indices changes based on slot-root but the key cache does not to my knowledge

Copy link
Contributor

Choose a reason for hiding this comment

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

agree with @nflaig that we need to use the state of parent root dialing to block header slot
the context is the same to gossip, we need to use a state of the same "view/branch" of the message to handle reorg scenario. We dial to block header slot to handle fork boundary

const stateForkInfo = chainForkConfig.getForkInfo(stateSlot);

using head state is mostly correct for stable network condition but it does not work all the time, and there is no advantage doing that except for more concise code so let's just not use it

Copy link
Member Author

Choose a reason for hiding this comment

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

Its not possible with byRoot code is why I switched it. The state transition has not been run yet, thus there is no state cached, when we attempt to verify the signature. But sending the blocks for validation (partial but not has_all_data will need to happen before the full block input goes through the process pipeline

Copy link
Member

Choose a reason for hiding this comment

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

Its not possible with byRoot code is why I switched it. The state transition has not been run yet, thus there is no state cached, when we attempt to verify the signature.

it works on gossip, why wouldn't it work here?

Copy link
Contributor

Choose a reason for hiding this comment

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

we need state of parent dialing to block slot (not the state of block itself) so should be able to do that

@matthewkeil matthewkeil requested review from nflaig and twoeths November 3, 2025 19:06
@matthewkeil matthewkeil requested a review from nflaig November 3, 2025 20:52
nflaig
nflaig previously approved these changes Nov 3, 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

@nflaig nflaig enabled auto-merge (squash) November 3, 2025 21:22
@nflaig nflaig disabled auto-merge November 3, 2025 21:23
@nflaig
Copy link
Member

nflaig commented Nov 3, 2025

/gemini review

Copy link
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 introduces signature verification for blob and data column sidecars received over req/resp, aligning with upcoming specification changes. The implementation is well-structured, adding new signature set creation functions and passing the IBeaconChain instance to validation functions where BLS verification is necessary. A key improvement is the more robust validation of sidecars by comparing the full SignedBeaconBlockHeader. The use of an optional chain parameter in validation functions is a good design choice, allowing control over when signature verification is performed, which is particularly useful for testing and historical sync scenarios. My feedback includes a couple of suggestions to improve parameter naming in packages/state-transition/src/signatureSets/proposer.ts for better code clarity and maintainability.

@nflaig nflaig merged commit f3703b7 into unstable Nov 3, 2025
24 of 27 checks passed
@nflaig nflaig deleted the mkeil/signature-verification-reqresp branch November 3, 2025 21:36
@wemeetagain
Copy link
Member

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

6 participants