Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use SubnetID type from CL spec instead of number #7298

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Dec 13, 2024

Motivation

Makes it easier to compare our implementation against CL spec

Description

Use SubnetID type from CL spec instead of number

From specs/phase0/p2p-interface.md?plain=1#L182

Name SSZ equivalent Description
SubnetID uint64 subnet identifier

Depends on #7297

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 46.66667% with 24 lines in your changes missing coverage. Please review.

Project coverage is 48.76%. Comparing base (ba1d41b) to head (cabb2aa).

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7298   +/-   ##
=========================================
  Coverage     48.76%   48.76%           
=========================================
  Files           601      601           
  Lines         40203    40203           
  Branches       2061     2061           
=========================================
  Hits          19607    19607           
  Misses        20558    20558           
  Partials         38       38           

@nflaig nflaig force-pushed the nflaig/BLOB_SIDECAR_SUBNET_COUNT branch from 48f6c94 to 67075e9 Compare December 13, 2024 21:00
Base automatically changed from nflaig/BLOB_SIDECAR_SUBNET_COUNT to unstable December 14, 2024 00:23
@nflaig nflaig marked this pull request as ready for review December 15, 2024 12:25
@nflaig nflaig requested a review from a team as a code owner December 15, 2024 12:25
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b3303ee Previous: ba1d41b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.0184 ms/op 1.7607 ms/op 1.15
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 45.714 us/op 37.655 us/op 1.21
BLS verify - blst 1.1312 ms/op 876.12 us/op 1.29
BLS verifyMultipleSignatures 3 - blst 1.4422 ms/op 1.6657 ms/op 0.87
BLS verifyMultipleSignatures 8 - blst 2.5325 ms/op 2.1395 ms/op 1.18
BLS verifyMultipleSignatures 32 - blst 7.1404 ms/op 4.4744 ms/op 1.60
BLS verifyMultipleSignatures 64 - blst 11.075 ms/op 8.1407 ms/op 1.36
BLS verifyMultipleSignatures 128 - blst 17.442 ms/op 15.629 ms/op 1.12
BLS deserializing 10000 signatures 707.95 ms/op 565.57 ms/op 1.25
BLS deserializing 100000 signatures 7.0149 s/op 5.9869 s/op 1.17
BLS verifyMultipleSignatures - same message - 3 - blst 982.07 us/op 913.33 us/op 1.08
BLS verifyMultipleSignatures - same message - 8 - blst 1.0858 ms/op 1.0418 ms/op 1.04
BLS verifyMultipleSignatures - same message - 32 - blst 1.7653 ms/op 1.6477 ms/op 1.07
BLS verifyMultipleSignatures - same message - 64 - blst 2.6227 ms/op 2.4209 ms/op 1.08
BLS verifyMultipleSignatures - same message - 128 - blst 4.4691 ms/op 4.1633 ms/op 1.07
BLS aggregatePubkeys 32 - blst 20.208 us/op 16.818 us/op 1.20
BLS aggregatePubkeys 128 - blst 71.923 us/op 58.227 us/op 1.24
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 55.916 ms/op 90.254 ms/op 0.62
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 55.930 ms/op 60.488 ms/op 0.92
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 49.686 ms/op 36.256 ms/op 1.37
getSlashingsAndExits - default max 85.639 us/op 64.382 us/op 1.33
getSlashingsAndExits - 2k 281.07 us/op 220.26 us/op 1.28
proposeBlockBody type=full, size=empty 5.9597 ms/op 4.8843 ms/op 1.22
isKnown best case - 1 super set check 301.00 ns/op 466.00 ns/op 0.65
isKnown normal case - 2 super set checks 283.00 ns/op 460.00 ns/op 0.62
isKnown worse case - 16 super set checks 285.00 ns/op 460.00 ns/op 0.62
InMemoryCheckpointStateCache - add get delete 3.0180 us/op 2.4720 us/op 1.22
validate api signedAggregateAndProof - struct 2.1256 ms/op 1.7801 ms/op 1.19
validate gossip signedAggregateAndProof - struct 1.5341 ms/op 1.8973 ms/op 0.81
batch validate gossip attestation - vc 640000 - chunk 32 134.02 us/op 116.40 us/op 1.15
batch validate gossip attestation - vc 640000 - chunk 64 121.07 us/op 103.97 us/op 1.16
batch validate gossip attestation - vc 640000 - chunk 128 111.67 us/op 93.027 us/op 1.20
batch validate gossip attestation - vc 640000 - chunk 256 103.49 us/op 90.153 us/op 1.15
pickEth1Vote - no votes 1.0488 ms/op 888.11 us/op 1.18
pickEth1Vote - max votes 6.5886 ms/op 4.4351 ms/op 1.49
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.558 ms/op 9.5468 ms/op 1.21
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.584 ms/op 12.810 ms/op 1.68
pickEth1Vote - Eth1Data fastSerialize value x2048 478.71 us/op 380.73 us/op 1.26
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.1440 ms/op 1.9922 ms/op 2.08
bytes32 toHexString 407.00 ns/op 609.00 ns/op 0.67
bytes32 Buffer.toString(hex) 236.00 ns/op 430.00 ns/op 0.55
bytes32 Buffer.toString(hex) from Uint8Array 346.00 ns/op 526.00 ns/op 0.66
bytes32 Buffer.toString(hex) + 0x 243.00 ns/op 426.00 ns/op 0.57
Object access 1 prop 0.12700 ns/op 0.32000 ns/op 0.40
Map access 1 prop 0.12500 ns/op 0.32200 ns/op 0.39
Object get x1000 5.5700 ns/op 5.5120 ns/op 1.01
Map get x1000 6.0670 ns/op 6.1200 ns/op 0.99
Object set x1000 30.279 ns/op 22.518 ns/op 1.34
Map set x1000 21.517 ns/op 18.814 ns/op 1.14
Return object 10000 times 0.27680 ns/op 0.29580 ns/op 0.94
Throw Error 10000 times 3.1829 us/op 2.6289 us/op 1.21
toHex 140.86 ns/op 112.70 ns/op 1.25
Buffer.from 129.24 ns/op 105.06 ns/op 1.23
shared Buffer 83.963 ns/op 70.159 ns/op 1.20
fastMsgIdFn sha256 / 200 bytes 2.1880 us/op 2.0130 us/op 1.09
fastMsgIdFn h32 xxhash / 200 bytes 223.00 ns/op 401.00 ns/op 0.56
fastMsgIdFn h64 xxhash / 200 bytes 272.00 ns/op 437.00 ns/op 0.62
fastMsgIdFn sha256 / 1000 bytes 7.4040 us/op 5.8980 us/op 1.26
fastMsgIdFn h32 xxhash / 1000 bytes 336.00 ns/op 521.00 ns/op 0.64
fastMsgIdFn h64 xxhash / 1000 bytes 332.00 ns/op 507.00 ns/op 0.65
fastMsgIdFn sha256 / 10000 bytes 61.441 us/op 49.368 us/op 1.24
fastMsgIdFn h32 xxhash / 10000 bytes 1.7440 us/op 1.8700 us/op 0.93
fastMsgIdFn h64 xxhash / 10000 bytes 1.1710 us/op 1.3160 us/op 0.89
send data - 1000 256B messages 11.653 ms/op 9.4730 ms/op 1.23
send data - 1000 512B messages 19.038 ms/op 12.599 ms/op 1.51
send data - 1000 1024B messages 23.575 ms/op 20.328 ms/op 1.16
send data - 1000 1200B messages 27.281 ms/op 21.737 ms/op 1.26
send data - 1000 2048B messages 32.556 ms/op 28.768 ms/op 1.13
send data - 1000 4096B messages 32.641 ms/op 26.073 ms/op 1.25
send data - 1000 16384B messages 74.342 ms/op 60.155 ms/op 1.24
send data - 1000 65536B messages 211.16 ms/op 221.23 ms/op 0.95
enrSubnets - fastDeserialize 64 bits 1.1270 us/op 1.1630 us/op 0.97
enrSubnets - ssz BitVector 64 bits 353.00 ns/op 495.00 ns/op 0.71
enrSubnets - fastDeserialize 4 bits 161.00 ns/op 316.00 ns/op 0.51
enrSubnets - ssz BitVector 4 bits 371.00 ns/op 494.00 ns/op 0.75
prioritizePeers score -10:0 att 32-0.1 sync 2-0 174.67 us/op 141.74 us/op 1.23
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 165.07 us/op 118.03 us/op 1.40
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 340.55 us/op 248.67 us/op 1.37
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 660.23 us/op 480.84 us/op 1.37
prioritizePeers score 0:0 att 64-1 sync 4-1 990.46 us/op 651.16 us/op 1.52
array of 16000 items push then shift 1.6379 us/op 1.2920 us/op 1.27
LinkedList of 16000 items push then shift 7.1150 ns/op 6.3350 ns/op 1.12
array of 16000 items push then pop 110.55 ns/op 78.048 ns/op 1.42
LinkedList of 16000 items push then pop 6.9000 ns/op 6.2110 ns/op 1.11
array of 24000 items push then shift 2.4005 us/op 1.8845 us/op 1.27
LinkedList of 24000 items push then shift 7.3000 ns/op 6.3760 ns/op 1.14
array of 24000 items push then pop 146.26 ns/op 108.27 ns/op 1.35
LinkedList of 24000 items push then pop 7.0480 ns/op 6.3100 ns/op 1.12
intersect bitArray bitLen 8 6.3560 ns/op 5.3150 ns/op 1.20
intersect array and set length 8 43.483 ns/op 40.612 ns/op 1.07
intersect bitArray bitLen 128 29.865 ns/op 26.401 ns/op 1.13
intersect array and set length 128 656.67 ns/op 591.42 ns/op 1.11
bitArray.getTrueBitIndexes() bitLen 128 2.0310 us/op 2.2920 us/op 0.89
bitArray.getTrueBitIndexes() bitLen 248 3.3800 us/op 3.5980 us/op 0.94
bitArray.getTrueBitIndexes() bitLen 512 8.0510 us/op 6.9360 us/op 1.16
Buffer.concat 32 items 963.00 ns/op 1.0130 us/op 0.95
Uint8Array.set 32 items 1.6530 us/op 1.5590 us/op 1.06
Buffer.copy 2.2390 us/op 1.8520 us/op 1.21
Uint8Array.set - with subarray 3.3630 us/op 2.3250 us/op 1.45
Uint8Array.set - without subarray 1.9450 us/op 1.6390 us/op 1.19
getUint32 - dataview 246.00 ns/op 398.00 ns/op 0.62
getUint32 - manual 165.00 ns/op 336.00 ns/op 0.49
Set add up to 64 items then delete first 2.2023 us/op 1.7544 us/op 1.26
OrderedSet add up to 64 items then delete first 3.3432 us/op 2.7372 us/op 1.22
Set add up to 64 items then delete last 2.4746 us/op 2.0175 us/op 1.23
OrderedSet add up to 64 items then delete last 3.6153 us/op 3.1587 us/op 1.14
Set add up to 64 items then delete middle 2.5947 us/op 2.0466 us/op 1.27
OrderedSet add up to 64 items then delete middle 5.1021 us/op 4.5461 us/op 1.12
Set add up to 128 items then delete first 5.2679 us/op 3.9369 us/op 1.34
OrderedSet add up to 128 items then delete first 7.5797 us/op 5.8804 us/op 1.29
Set add up to 128 items then delete last 4.8843 us/op 3.9299 us/op 1.24
OrderedSet add up to 128 items then delete last 7.3323 us/op 6.1137 us/op 1.20
Set add up to 128 items then delete middle 5.0430 us/op 3.9181 us/op 1.29
OrderedSet add up to 128 items then delete middle 13.212 us/op 11.581 us/op 1.14
Set add up to 256 items then delete first 10.028 us/op 7.7004 us/op 1.30
OrderedSet add up to 256 items then delete first 15.734 us/op 11.595 us/op 1.36
Set add up to 256 items then delete last 10.240 us/op 7.6905 us/op 1.33
OrderedSet add up to 256 items then delete last 14.915 us/op 12.045 us/op 1.24
Set add up to 256 items then delete middle 9.9118 us/op 7.6572 us/op 1.29
OrderedSet add up to 256 items then delete middle 41.043 us/op 34.531 us/op 1.19
transfer serialized Status (84 B) 1.4940 us/op 1.4910 us/op 1.00
copy serialized Status (84 B) 1.3240 us/op 1.3010 us/op 1.02
transfer serialized SignedVoluntaryExit (112 B) 1.7660 us/op 1.6620 us/op 1.06
copy serialized SignedVoluntaryExit (112 B) 1.4230 us/op 1.3670 us/op 1.04
transfer serialized ProposerSlashing (416 B) 2.6320 us/op 2.1740 us/op 1.21
copy serialized ProposerSlashing (416 B) 2.8160 us/op 2.2130 us/op 1.27
transfer serialized Attestation (485 B) 2.7360 us/op 1.9420 us/op 1.41
copy serialized Attestation (485 B) 2.7410 us/op 1.8440 us/op 1.49
transfer serialized AttesterSlashing (33232 B) 2.6830 us/op 2.0390 us/op 1.32
copy serialized AttesterSlashing (33232 B) 5.5810 us/op 4.1490 us/op 1.35
transfer serialized Small SignedBeaconBlock (128000 B) 2.4190 us/op 2.5710 us/op 0.94
copy serialized Small SignedBeaconBlock (128000 B) 18.551 us/op 9.2250 us/op 2.01
transfer serialized Avg SignedBeaconBlock (200000 B) 3.9860 us/op 2.7750 us/op 1.44
copy serialized Avg SignedBeaconBlock (200000 B) 21.868 us/op 12.577 us/op 1.74
transfer serialized BlobsSidecar (524380 B) 3.0160 us/op 3.2220 us/op 0.94
copy serialized BlobsSidecar (524380 B) 73.660 us/op 68.508 us/op 1.08
transfer serialized Big SignedBeaconBlock (1000000 B) 2.5170 us/op 3.4240 us/op 0.74
copy serialized Big SignedBeaconBlock (1000000 B) 157.96 us/op 199.75 us/op 0.79
pass gossip attestations to forkchoice per slot 2.8840 ms/op 2.2961 ms/op 1.26
forkChoice updateHead vc 100000 bc 64 eq 0 460.60 us/op 355.99 us/op 1.29
forkChoice updateHead vc 600000 bc 64 eq 0 3.0179 ms/op 2.0388 ms/op 1.48
forkChoice updateHead vc 1000000 bc 64 eq 0 4.8938 ms/op 3.8750 ms/op 1.26
forkChoice updateHead vc 600000 bc 320 eq 0 2.7577 ms/op 2.3905 ms/op 1.15
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9961 ms/op 2.0613 ms/op 1.45
forkChoice updateHead vc 600000 bc 7200 eq 0 3.9042 ms/op 2.6537 ms/op 1.47
forkChoice updateHead vc 600000 bc 64 eq 1000 10.693 ms/op 8.4602 ms/op 1.26
forkChoice updateHead vc 600000 bc 64 eq 10000 10.452 ms/op 9.2299 ms/op 1.13
forkChoice updateHead vc 600000 bc 64 eq 300000 14.273 ms/op 11.265 ms/op 1.27
computeDeltas 500000 validators 300 proto nodes 4.0111 ms/op 3.1993 ms/op 1.25
computeDeltas 500000 validators 1200 proto nodes 4.0161 ms/op 3.2458 ms/op 1.24
computeDeltas 500000 validators 7200 proto nodes 4.0654 ms/op 3.1807 ms/op 1.28
computeDeltas 750000 validators 300 proto nodes 6.1229 ms/op 4.8855 ms/op 1.25
computeDeltas 750000 validators 1200 proto nodes 6.1491 ms/op 4.8379 ms/op 1.27
computeDeltas 750000 validators 7200 proto nodes 6.1291 ms/op 4.7751 ms/op 1.28
computeDeltas 1400000 validators 300 proto nodes 11.086 ms/op 8.6338 ms/op 1.28
computeDeltas 1400000 validators 1200 proto nodes 11.227 ms/op 8.6900 ms/op 1.29
computeDeltas 1400000 validators 7200 proto nodes 11.086 ms/op 8.5877 ms/op 1.29
computeDeltas 2100000 validators 300 proto nodes 17.439 ms/op 13.422 ms/op 1.30
computeDeltas 2100000 validators 1200 proto nodes 17.351 ms/op 13.574 ms/op 1.28
computeDeltas 2100000 validators 7200 proto nodes 17.152 ms/op 13.370 ms/op 1.28
altair processAttestation - 250000 vs - 7PWei normalcase 1.7163 ms/op 1.4296 ms/op 1.20
altair processAttestation - 250000 vs - 7PWei worstcase 2.5146 ms/op 2.1342 ms/op 1.18
altair processAttestation - setStatus - 1/6 committees join 86.985 us/op 64.088 us/op 1.36
altair processAttestation - setStatus - 1/3 committees join 172.95 us/op 143.60 us/op 1.20
altair processAttestation - setStatus - 1/2 committees join 248.08 us/op 176.08 us/op 1.41
altair processAttestation - setStatus - 2/3 committees join 328.77 us/op 235.72 us/op 1.39
altair processAttestation - setStatus - 4/5 committees join 468.09 us/op 368.62 us/op 1.27
altair processAttestation - setStatus - 100% committees join 558.88 us/op 426.67 us/op 1.31
altair processBlock - 250000 vs - 7PWei normalcase 4.1982 ms/op 3.1448 ms/op 1.33
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.853 ms/op 25.216 ms/op 1.22
altair processBlock - 250000 vs - 7PWei worstcase 46.049 ms/op 37.172 ms/op 1.24
altair processBlock - 250000 vs - 7PWei worstcase hashState 95.589 ms/op 72.035 ms/op 1.33
phase0 processBlock - 250000 vs - 7PWei normalcase 1.9460 ms/op 1.7886 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei worstcase 21.811 ms/op 21.866 ms/op 1.00
altair processEth1Data - 250000 vs - 7PWei normalcase 291.59 us/op 282.91 us/op 1.03
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.9610 us/op 5.1590 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 32.772 us/op 17.515 us/op 1.87
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 12.565 us/op 8.5710 us/op 1.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.3720 us/op 5.4520 us/op 0.99
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 190.28 us/op 64.321 us/op 2.96
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.6035 ms/op 1.3461 ms/op 1.19
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.7446 ms/op 1.2180 ms/op 2.25
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4506 ms/op 1.1567 ms/op 1.25
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.5762 ms/op 2.8185 ms/op 1.27
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2056 ms/op 1.0497 ms/op 2.10
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6101 ms/op 2.5519 ms/op 1.41
Tree 40 250000 create 213.79 ms/op 184.58 ms/op 1.16
Tree 40 250000 get(125000) 144.10 ns/op 113.19 ns/op 1.27
Tree 40 250000 set(125000) 668.55 ns/op 562.02 ns/op 1.19
Tree 40 250000 toArray() 15.424 ms/op 9.7692 ms/op 1.58
Tree 40 250000 iterate all - toArray() + loop 15.146 ms/op 9.8879 ms/op 1.53
Tree 40 250000 iterate all - get(i) 53.714 ms/op 40.862 ms/op 1.31
Array 250000 create 2.9095 ms/op 2.3547 ms/op 1.24
Array 250000 clone - spread 1.5124 ms/op 1.3536 ms/op 1.12
Array 250000 get(125000) 0.41700 ns/op 0.57700 ns/op 0.72
Array 250000 set(125000) 0.43500 ns/op 0.58300 ns/op 0.75
Array 250000 iterate all - loop 98.592 us/op 77.369 us/op 1.27
phase0 afterProcessEpoch - 250000 vs - 7PWei 50.066 ms/op 41.600 ms/op 1.20
Array.fill - length 1000000 3.6813 ms/op 2.6117 ms/op 1.41
Array push - length 1000000 16.942 ms/op 14.089 ms/op 1.20
Array.get 0.27147 ns/op 0.23607 ns/op 1.15
Uint8Array.get 0.43100 ns/op 0.31300 ns/op 1.38
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.091 ms/op 17.116 ms/op 1.00
altair processEpoch - mainnet_e81889 303.49 ms/op 268.07 ms/op 1.13
mainnet_e81889 - altair beforeProcessEpoch 21.833 ms/op 16.048 ms/op 1.36
mainnet_e81889 - altair processJustificationAndFinalization 19.500 us/op 5.7720 us/op 3.38
mainnet_e81889 - altair processInactivityUpdates 5.0005 ms/op 3.8625 ms/op 1.29
mainnet_e81889 - altair processRewardsAndPenalties 63.011 ms/op 60.311 ms/op 1.04
mainnet_e81889 - altair processRegistryUpdates 2.8490 us/op 1.8850 us/op 1.51
mainnet_e81889 - altair processSlashings 750.00 ns/op 737.00 ns/op 1.02
mainnet_e81889 - altair processEth1DataReset 510.00 ns/op 714.00 ns/op 0.71
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.6971 ms/op 1.5505 ms/op 1.74
mainnet_e81889 - altair processSlashingsReset 4.8100 us/op 2.4260 us/op 1.98
mainnet_e81889 - altair processRandaoMixesReset 5.7720 us/op 2.9320 us/op 1.97
mainnet_e81889 - altair processHistoricalRootsUpdate 563.00 ns/op 708.00 ns/op 0.80
mainnet_e81889 - altair processParticipationFlagUpdates 3.1270 us/op 1.8930 us/op 1.65
mainnet_e81889 - altair processSyncCommitteeUpdates 680.00 ns/op 436.00 ns/op 1.56
mainnet_e81889 - altair afterProcessEpoch 49.537 ms/op 42.181 ms/op 1.17
capella processEpoch - mainnet_e217614 1.1473 s/op 985.13 ms/op 1.16
mainnet_e217614 - capella beforeProcessEpoch 68.480 ms/op 65.607 ms/op 1.04
mainnet_e217614 - capella processJustificationAndFinalization 22.612 us/op 7.9580 us/op 2.84
mainnet_e217614 - capella processInactivityUpdates 16.062 ms/op 14.102 ms/op 1.14
mainnet_e217614 - capella processRewardsAndPenalties 263.93 ms/op 223.21 ms/op 1.18
mainnet_e217614 - capella processRegistryUpdates 21.309 us/op 11.436 us/op 1.86
mainnet_e217614 - capella processSlashings 610.00 ns/op 727.00 ns/op 0.84
mainnet_e217614 - capella processEth1DataReset 539.00 ns/op 709.00 ns/op 0.76
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.470 ms/op 12.206 ms/op 0.94
mainnet_e217614 - capella processSlashingsReset 5.4220 us/op 3.4070 us/op 1.59
mainnet_e217614 - capella processRandaoMixesReset 6.4020 us/op 7.6770 us/op 0.83
mainnet_e217614 - capella processHistoricalRootsUpdate 567.00 ns/op 825.00 ns/op 0.69
mainnet_e217614 - capella processParticipationFlagUpdates 2.1580 us/op 2.0430 us/op 1.06
mainnet_e217614 - capella afterProcessEpoch 122.53 ms/op 101.19 ms/op 1.21
phase0 processEpoch - mainnet_e58758 338.19 ms/op 319.24 ms/op 1.06
mainnet_e58758 - phase0 beforeProcessEpoch 88.571 ms/op 81.139 ms/op 1.09
mainnet_e58758 - phase0 processJustificationAndFinalization 22.041 us/op 14.665 us/op 1.50
mainnet_e58758 - phase0 processRewardsAndPenalties 43.260 ms/op 29.741 ms/op 1.45
mainnet_e58758 - phase0 processRegistryUpdates 8.6370 us/op 6.7520 us/op 1.28
mainnet_e58758 - phase0 processSlashings 514.00 ns/op 760.00 ns/op 0.68
mainnet_e58758 - phase0 processEth1DataReset 484.00 ns/op 702.00 ns/op 0.69
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.1064 ms/op 1.4134 ms/op 1.49
mainnet_e58758 - phase0 processSlashingsReset 4.1850 us/op 5.0550 us/op 0.83
mainnet_e58758 - phase0 processRandaoMixesReset 4.3360 us/op 3.6870 us/op 1.18
mainnet_e58758 - phase0 processHistoricalRootsUpdate 497.00 ns/op 726.00 ns/op 0.68
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.7300 us/op 3.2430 us/op 1.46
mainnet_e58758 - phase0 afterProcessEpoch 43.382 ms/op 35.798 ms/op 1.21
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.1805 ms/op 1.0347 ms/op 2.11
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.3811 ms/op 1.7198 ms/op 1.38
altair processInactivityUpdates - 250000 normalcase 20.213 ms/op 16.636 ms/op 1.22
altair processInactivityUpdates - 250000 worstcase 19.721 ms/op 15.536 ms/op 1.27
phase0 processRegistryUpdates - 250000 normalcase 10.304 us/op 6.1970 us/op 1.66
phase0 processRegistryUpdates - 250000 badcase_full_deposits 433.98 us/op 170.59 us/op 2.54
phase0 processRegistryUpdates - 250000 worstcase 0.5 131.96 ms/op 116.59 ms/op 1.13
altair processRewardsAndPenalties - 250000 normalcase 48.283 ms/op 42.943 ms/op 1.12
altair processRewardsAndPenalties - 250000 worstcase 45.633 ms/op 34.620 ms/op 1.32
phase0 getAttestationDeltas - 250000 normalcase 7.4103 ms/op 6.6629 ms/op 1.11
phase0 getAttestationDeltas - 250000 worstcase 7.0522 ms/op 5.8653 ms/op 1.20
phase0 processSlashings - 250000 worstcase 119.42 us/op 96.582 us/op 1.24
altair processSyncCommitteeUpdates - 250000 120.66 ms/op 99.577 ms/op 1.21
BeaconState.hashTreeRoot - No change 227.00 ns/op 424.00 ns/op 0.54
BeaconState.hashTreeRoot - 1 full validator 102.76 us/op 82.275 us/op 1.25
BeaconState.hashTreeRoot - 32 full validator 1.2910 ms/op 941.80 us/op 1.37
BeaconState.hashTreeRoot - 512 full validator 11.148 ms/op 7.8018 ms/op 1.43
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 178.73 us/op 118.32 us/op 1.51
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7086 ms/op 1.4421 ms/op 1.18
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.600 ms/op 20.079 ms/op 1.18
BeaconState.hashTreeRoot - 1 balances 118.41 us/op 87.438 us/op 1.35
BeaconState.hashTreeRoot - 32 balances 1.0727 ms/op 832.97 us/op 1.29
BeaconState.hashTreeRoot - 512 balances 7.9291 ms/op 6.2785 ms/op 1.26
BeaconState.hashTreeRoot - 250000 balances 182.67 ms/op 140.30 ms/op 1.30
aggregationBits - 2048 els - zipIndexesInBitList 23.623 us/op 19.622 us/op 1.20
byteArrayEquals 32 53.546 ns/op 48.282 ns/op 1.11
Buffer.compare 32 17.119 ns/op 16.047 ns/op 1.07
byteArrayEquals 1024 1.5558 us/op 1.2744 us/op 1.22
Buffer.compare 1024 24.133 ns/op 24.772 ns/op 0.97
byteArrayEquals 16384 24.974 us/op 20.267 us/op 1.23
Buffer.compare 16384 202.59 ns/op 168.22 ns/op 1.20
byteArrayEquals 123687377 187.26 ms/op 152.88 ms/op 1.22
Buffer.compare 123687377 6.2284 ms/op 4.0266 ms/op 1.55
byteArrayEquals 32 - diff last byte 51.659 ns/op 47.470 ns/op 1.09
Buffer.compare 32 - diff last byte 16.757 ns/op 16.177 ns/op 1.04
byteArrayEquals 1024 - diff last byte 1.5549 us/op 1.2578 us/op 1.24
Buffer.compare 1024 - diff last byte 25.532 ns/op 24.941 ns/op 1.02
byteArrayEquals 16384 - diff last byte 24.780 us/op 20.101 us/op 1.23
Buffer.compare 16384 - diff last byte 198.11 ns/op 198.15 ns/op 1.00
byteArrayEquals 123687377 - diff last byte 187.29 ms/op 151.42 ms/op 1.24
Buffer.compare 123687377 - diff last byte 6.2518 ms/op 4.7521 ms/op 1.32
byteArrayEquals 32 - random bytes 5.0650 ns/op 4.9890 ns/op 1.02
Buffer.compare 32 - random bytes 16.818 ns/op 16.173 ns/op 1.04
byteArrayEquals 1024 - random bytes 5.0500 ns/op 4.9500 ns/op 1.02
Buffer.compare 1024 - random bytes 16.786 ns/op 16.049 ns/op 1.05
byteArrayEquals 16384 - random bytes 5.2610 ns/op 4.8930 ns/op 1.08
Buffer.compare 16384 - random bytes 16.908 ns/op 16.047 ns/op 1.05
byteArrayEquals 123687377 - random bytes 6.3800 ns/op 7.8700 ns/op 0.81
Buffer.compare 123687377 - random bytes 19.510 ns/op 18.950 ns/op 1.03
regular array get 100000 times 42.620 us/op 31.092 us/op 1.37
wrappedArray get 100000 times 32.327 us/op 31.111 us/op 1.04
arrayWithProxy get 100000 times 13.927 ms/op 9.8035 ms/op 1.42
ssz.Root.equals 45.499 ns/op 40.307 ns/op 1.13
byteArrayEquals 44.632 ns/op 42.621 ns/op 1.05
Buffer.compare 10.171 ns/op 9.2320 ns/op 1.10
processSlot - 1 slots 19.240 us/op 15.588 us/op 1.23
processSlot - 32 slots 2.3604 ms/op 2.0459 ms/op 1.15
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 42.233 ms/op 37.009 ms/op 1.14
getCommitteeAssignments - req 1 vs - 250000 vc 2.0941 ms/op 1.8106 ms/op 1.16
getCommitteeAssignments - req 100 vs - 250000 vc 4.1003 ms/op 3.4733 ms/op 1.18
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3824 ms/op 3.7418 ms/op 1.17
findModifiedValidators - 10000 modified validators 239.07 ms/op 230.59 ms/op 1.04
findModifiedValidators - 1000 modified validators 170.89 ms/op 148.75 ms/op 1.15
findModifiedValidators - 100 modified validators 137.88 ms/op 142.53 ms/op 0.97
findModifiedValidators - 10 modified validators 144.31 ms/op 140.58 ms/op 1.03
findModifiedValidators - 1 modified validators 134.84 ms/op 131.24 ms/op 1.03
findModifiedValidators - no difference 157.93 ms/op 137.34 ms/op 1.15
compare ViewDUs 3.0651 s/op 3.0442 s/op 1.01
compare each validator Uint8Array 1.8467 s/op 1.4692 s/op 1.26
compare ViewDU to Uint8Array 959.80 ms/op 690.88 ms/op 1.39
migrate state 1000000 validators, 24 modified, 0 new 759.60 ms/op 686.73 ms/op 1.11
migrate state 1000000 validators, 1700 modified, 1000 new 1.0451 s/op 924.08 ms/op 1.13
migrate state 1000000 validators, 3400 modified, 2000 new 1.2441 s/op 1.1342 s/op 1.10
migrate state 1500000 validators, 24 modified, 0 new 787.23 ms/op 702.53 ms/op 1.12
migrate state 1500000 validators, 1700 modified, 1000 new 1.0310 s/op 935.46 ms/op 1.10
migrate state 1500000 validators, 3400 modified, 2000 new 1.2712 s/op 1.1418 s/op 1.11
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3400 ns/op 5.9400 ns/op 0.73
state getBlockRootAtSlot - 250000 vs - 7PWei 932.89 ns/op 661.70 ns/op 1.41
computeProposers - vc 250000 6.8553 ms/op 5.7746 ms/op 1.19
computeEpochShuffling - vc 250000 41.900 ms/op 34.654 ms/op 1.21
getNextSyncCommittee - vc 250000 140.93 ms/op 103.33 ms/op 1.36
computeSigningRoot for AttestationData 25.084 us/op 24.347 us/op 1.03
hash AttestationData serialized data then Buffer.toString(base64) 1.5769 us/op 1.2092 us/op 1.30
toHexString serialized data 905.86 ns/op 774.12 ns/op 1.17
Buffer.toString(base64) 180.33 ns/op 143.13 ns/op 1.26
nodejs block root to RootHex using toHex 150.34 ns/op 119.99 ns/op 1.25
nodejs block root to RootHex using toRootHex 94.988 ns/op 76.216 ns/op 1.25
browser block root to RootHex using the deprecated toHexString 223.51 ns/op 207.31 ns/op 1.08
browser block root to RootHex using toHex 182.23 ns/op 163.71 ns/op 1.11
browser block root to RootHex using toRootHex 160.53 ns/op 141.92 ns/op 1.13

by benchmarkbot/action

@@ -146,7 +146,7 @@ function aggregateSignatureInto(
* Format `signature` into an efficient `contribution` to add more signatures in with aggregateSignatureInto()
*/
function signatureToAggregate(
subnet: number,
subnet: Subnet,
Copy link
Member

Choose a reason for hiding this comment

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

Should this be SubnetID ?

Copy link
Member Author

Choose a reason for hiding this comment

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

so the CL spec only uses the SubnetID for attestation and blob sidecar subnets, for sync committee we have SubcommitteeIndex (aliased to Subnet above) which is equal the subnet id

@nflaig nflaig requested a review from wemeetagain December 19, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants