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

fix: ignore empty ids/statuses arrays when filtering validators #6876

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jun 11, 2024

Motivation

Prysm VC is sending an empty array of statuses when calling POST /eth/v1/beacon/states/head/validators. While previously, when using the GET method, clients would just omit the query param, with the new POST endpoint it's more likely that we receive an empty array. The spec does not specifically note that there must be at least on item in the array, we should handle an empty array in the same way as if the statuses property is omitted, as otherwise it would always return no validators.

Description

Ignore empty ids/statuses when filtering validators

@nflaig nflaig requested a review from a team as a code owner June 11, 2024 10:26
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.76%. Comparing base (4e86094) to head (0884c81).

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6876   +/-   ##
=========================================
  Coverage     62.76%   62.76%           
=========================================
  Files           578      578           
  Lines         61273    61273           
  Branches       2112     2116    +4     
=========================================
  Hits          38455    38455           
  Misses        22780    22780           
  Partials         38       38           

@nflaig nflaig changed the title fix: ignore empty ids/statuses when filtering validators fix: ignore empty ids/statuses arrays when filtering validators Jun 11, 2024
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 2542748 Previous: 26e9bc4 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 423.52 us/op 519.42 us/op 0.82
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 45.755 us/op 58.876 us/op 0.78
BLS verify - blst-native 1.2340 ms/op 1.2415 ms/op 0.99
BLS verifyMultipleSignatures 3 - blst-native 2.6248 ms/op 2.6368 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 5.8500 ms/op 5.8206 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 21.435 ms/op 21.343 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst-native 42.235 ms/op 41.971 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst-native 84.002 ms/op 83.511 ms/op 1.01
BLS deserializing 10000 signatures 862.65 ms/op 869.06 ms/op 0.99
BLS deserializing 100000 signatures 8.8286 s/op 8.7299 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2828 ms/op 1.2502 ms/op 1.03
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4640 ms/op 1.4644 ms/op 1.00
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2859 ms/op 2.2452 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3476 ms/op 3.8425 ms/op 0.87
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.9046 ms/op 5.4766 ms/op 1.26
BLS aggregatePubkeys 32 - blst-native 25.493 us/op 25.167 us/op 1.01
BLS aggregatePubkeys 128 - blst-native 100.07 us/op 97.857 us/op 1.02
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 77.727 ms/op 57.352 ms/op 1.36
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 54.126 ms/op 54.937 ms/op 0.99
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 38.535 ms/op 35.776 ms/op 1.08
getSlashingsAndExits - default max 130.07 us/op 102.94 us/op 1.26
getSlashingsAndExits - 2k 317.02 us/op 323.26 us/op 0.98
proposeBlockBody type=full, size=empty 6.1043 ms/op 5.7112 ms/op 1.07
isKnown best case - 1 super set check 486.00 ns/op 343.00 ns/op 1.42
isKnown normal case - 2 super set checks 564.00 ns/op 318.00 ns/op 1.77
isKnown worse case - 16 super set checks 472.00 ns/op 431.00 ns/op 1.10
InMemoryCheckpointStateCache - add get delete 6.4810 us/op 5.5500 us/op 1.17
validate api signedAggregateAndProof - struct 2.7577 ms/op 2.6960 ms/op 1.02
validate gossip signedAggregateAndProof - struct 2.7751 ms/op 2.6381 ms/op 1.05
validate gossip attestation - vc 640000 1.3374 ms/op 1.2744 ms/op 1.05
batch validate gossip attestation - vc 640000 - chunk 32 163.55 us/op 150.11 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 64 142.38 us/op 133.81 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 128 129.74 us/op 115.97 us/op 1.12
batch validate gossip attestation - vc 640000 - chunk 256 126.46 us/op 111.46 us/op 1.13
pickEth1Vote - no votes 1.2048 ms/op 1.0144 ms/op 1.19
pickEth1Vote - max votes 11.085 ms/op 8.3237 ms/op 1.33
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.511 ms/op 14.925 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 23.882 ms/op 19.871 ms/op 1.20
pickEth1Vote - Eth1Data fastSerialize value x2048 571.04 us/op 457.63 us/op 1.25
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.7624 ms/op 5.2902 ms/op 1.09
bytes32 toHexString 622.00 ns/op 422.00 ns/op 1.47
bytes32 Buffer.toString(hex) 288.00 ns/op 247.00 ns/op 1.17
bytes32 Buffer.toString(hex) from Uint8Array 521.00 ns/op 352.00 ns/op 1.48
bytes32 Buffer.toString(hex) + 0x 294.00 ns/op 247.00 ns/op 1.19
Object access 1 prop 0.21000 ns/op 0.14900 ns/op 1.41
Map access 1 prop 0.14700 ns/op 0.13800 ns/op 1.07
Object get x1000 6.3520 ns/op 5.8170 ns/op 1.09
Map get x1000 7.0580 ns/op 6.4440 ns/op 1.10
Object set x1000 55.518 ns/op 30.914 ns/op 1.80
Map set x1000 36.373 ns/op 21.234 ns/op 1.71
Return object 10000 times 0.34160 ns/op 0.28060 ns/op 1.22
Throw Error 10000 times 3.7809 us/op 3.2572 us/op 1.16
fastMsgIdFn sha256 / 200 bytes 2.5080 us/op 2.0970 us/op 1.20
fastMsgIdFn h32 xxhash / 200 bytes 314.00 ns/op 224.00 ns/op 1.40
fastMsgIdFn h64 xxhash / 200 bytes 296.00 ns/op 268.00 ns/op 1.10
fastMsgIdFn sha256 / 1000 bytes 7.5730 us/op 6.7920 us/op 1.11
fastMsgIdFn h32 xxhash / 1000 bytes 453.00 ns/op 340.00 ns/op 1.33
fastMsgIdFn h64 xxhash / 1000 bytes 374.00 ns/op 334.00 ns/op 1.12
fastMsgIdFn sha256 / 10000 bytes 71.677 us/op 60.218 us/op 1.19
fastMsgIdFn h32 xxhash / 10000 bytes 2.0270 us/op 1.7520 us/op 1.16
fastMsgIdFn h64 xxhash / 10000 bytes 1.2970 us/op 1.1590 us/op 1.12
send data - 1000 256B messages 14.687 ms/op 11.364 ms/op 1.29
send data - 1000 512B messages 19.288 ms/op 15.810 ms/op 1.22
send data - 1000 1024B messages 28.453 ms/op 24.777 ms/op 1.15
send data - 1000 1200B messages 34.339 ms/op 25.329 ms/op 1.36
send data - 1000 2048B messages 39.655 ms/op 31.225 ms/op 1.27
send data - 1000 4096B messages 38.399 ms/op 30.807 ms/op 1.25
send data - 1000 16384B messages 79.724 ms/op 66.629 ms/op 1.20
send data - 1000 65536B messages 235.28 ms/op 202.68 ms/op 1.16
enrSubnets - fastDeserialize 64 bits 1.6360 us/op 997.00 ns/op 1.64
enrSubnets - ssz BitVector 64 bits 481.00 ns/op 354.00 ns/op 1.36
enrSubnets - fastDeserialize 4 bits 220.00 ns/op 154.00 ns/op 1.43
enrSubnets - ssz BitVector 4 bits 476.00 ns/op 355.00 ns/op 1.34
prioritizePeers score -10:0 att 32-0.1 sync 2-0 246.00 us/op 134.21 us/op 1.83
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 214.22 us/op 146.87 us/op 1.46
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 351.47 us/op 260.58 us/op 1.35
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 482.97 us/op 393.32 us/op 1.23
prioritizePeers score 0:0 att 64-1 sync 4-1 986.93 us/op 596.60 us/op 1.65
array of 16000 items push then shift 1.7490 us/op 1.5420 us/op 1.13
LinkedList of 16000 items push then shift 9.1240 ns/op 6.8030 ns/op 1.34
array of 16000 items push then pop 163.08 ns/op 103.43 ns/op 1.58
LinkedList of 16000 items push then pop 8.9990 ns/op 6.6180 ns/op 1.36
array of 24000 items push then shift 2.6336 us/op 2.2665 us/op 1.16
LinkedList of 24000 items push then shift 9.9980 ns/op 6.7740 ns/op 1.48
array of 24000 items push then pop 228.34 ns/op 129.19 ns/op 1.77
LinkedList of 24000 items push then pop 8.9830 ns/op 6.8140 ns/op 1.32
intersect bitArray bitLen 8 6.7170 ns/op 6.2100 ns/op 1.08
intersect array and set length 8 79.477 ns/op 49.387 ns/op 1.61
intersect bitArray bitLen 128 30.956 ns/op 29.562 ns/op 1.05
intersect array and set length 128 974.41 ns/op 701.75 ns/op 1.39
bitArray.getTrueBitIndexes() bitLen 128 2.5420 us/op 2.0040 us/op 1.27
bitArray.getTrueBitIndexes() bitLen 248 4.5580 us/op 3.3380 us/op 1.37
bitArray.getTrueBitIndexes() bitLen 512 10.875 us/op 6.4130 us/op 1.70
Buffer.concat 32 items 1.0790 us/op 942.00 ns/op 1.15
Uint8Array.set 32 items 2.0610 us/op 1.5240 us/op 1.35
Buffer.copy 2.2210 us/op 1.9000 us/op 1.17
Uint8Array.set - with subarray 3.4200 us/op 2.8040 us/op 1.22
Uint8Array.set - without subarray 2.0010 us/op 1.5370 us/op 1.30
Set add up to 64 items then delete first 2.5755 us/op 2.1659 us/op 1.19
OrderedSet add up to 64 items then delete first 3.8786 us/op 3.1726 us/op 1.22
Set add up to 64 items then delete last 3.0577 us/op 2.6097 us/op 1.17
OrderedSet add up to 64 items then delete last 4.8411 us/op 4.3227 us/op 1.12
Set add up to 64 items then delete middle 3.0710 us/op 2.9462 us/op 1.04
OrderedSet add up to 64 items then delete middle 5.8470 us/op 5.2838 us/op 1.11
Set add up to 128 items then delete first 5.9853 us/op 5.5458 us/op 1.08
OrderedSet add up to 128 items then delete first 7.9817 us/op 7.3523 us/op 1.09
Set add up to 128 items then delete last 5.8716 us/op 5.2998 us/op 1.11
OrderedSet add up to 128 items then delete last 8.3918 us/op 7.7345 us/op 1.08
Set add up to 128 items then delete middle 6.0755 us/op 5.6294 us/op 1.08
OrderedSet add up to 128 items then delete middle 16.354 us/op 15.938 us/op 1.03
Set add up to 256 items then delete first 13.399 us/op 10.609 us/op 1.26
OrderedSet add up to 256 items then delete first 19.300 us/op 17.568 us/op 1.10
Set add up to 256 items then delete last 13.475 us/op 10.364 us/op 1.30
OrderedSet add up to 256 items then delete last 20.801 us/op 16.185 us/op 1.29
Set add up to 256 items then delete middle 13.257 us/op 10.949 us/op 1.21
OrderedSet add up to 256 items then delete middle 45.776 us/op 42.338 us/op 1.08
transfer serialized Status (84 B) 1.5900 us/op 1.4220 us/op 1.12
copy serialized Status (84 B) 1.3250 us/op 1.1870 us/op 1.12
transfer serialized SignedVoluntaryExit (112 B) 1.7060 us/op 1.5290 us/op 1.12
copy serialized SignedVoluntaryExit (112 B) 1.4530 us/op 1.2800 us/op 1.14
transfer serialized ProposerSlashing (416 B) 2.6270 us/op 1.8690 us/op 1.41
copy serialized ProposerSlashing (416 B) 2.1500 us/op 1.5940 us/op 1.35
transfer serialized Attestation (485 B) 2.4210 us/op 1.6600 us/op 1.46
copy serialized Attestation (485 B) 2.1910 us/op 1.7390 us/op 1.26
transfer serialized AttesterSlashing (33232 B) 3.2560 us/op 1.8980 us/op 1.72
copy serialized AttesterSlashing (33232 B) 8.9460 us/op 6.5810 us/op 1.36
transfer serialized Small SignedBeaconBlock (128000 B) 3.0340 us/op 2.7350 us/op 1.11
copy serialized Small SignedBeaconBlock (128000 B) 22.438 us/op 19.992 us/op 1.12
transfer serialized Avg SignedBeaconBlock (200000 B) 4.3020 us/op 3.3480 us/op 1.28
copy serialized Avg SignedBeaconBlock (200000 B) 33.610 us/op 27.346 us/op 1.23
transfer serialized BlobsSidecar (524380 B) 4.6480 us/op 3.9110 us/op 1.19
copy serialized BlobsSidecar (524380 B) 185.58 us/op 92.737 us/op 2.00
transfer serialized Big SignedBeaconBlock (1000000 B) 3.4710 us/op 3.6900 us/op 0.94
copy serialized Big SignedBeaconBlock (1000000 B) 162.85 us/op 185.62 us/op 0.88
pass gossip attestations to forkchoice per slot 3.1733 ms/op 3.0558 ms/op 1.04
forkChoice updateHead vc 100000 bc 64 eq 0 504.11 us/op 496.46 us/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 0 3.6804 ms/op 3.4424 ms/op 1.07
forkChoice updateHead vc 1000000 bc 64 eq 0 5.7925 ms/op 5.6930 ms/op 1.02
forkChoice updateHead vc 600000 bc 320 eq 0 3.3355 ms/op 3.3580 ms/op 0.99
forkChoice updateHead vc 600000 bc 1200 eq 0 3.8144 ms/op 3.4941 ms/op 1.09
forkChoice updateHead vc 600000 bc 7200 eq 0 4.9722 ms/op 4.6043 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 1000 11.370 ms/op 10.783 ms/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 10000 11.451 ms/op 11.078 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 300000 20.951 ms/op 17.519 ms/op 1.20
computeDeltas 500000 validators 300 proto nodes 3.8642 ms/op 4.3188 ms/op 0.89
computeDeltas 500000 validators 1200 proto nodes 4.3553 ms/op 4.2249 ms/op 1.03
computeDeltas 500000 validators 7200 proto nodes 4.5183 ms/op 4.2645 ms/op 1.06
computeDeltas 750000 validators 300 proto nodes 6.4783 ms/op 7.0848 ms/op 0.91
computeDeltas 750000 validators 1200 proto nodes 6.1115 ms/op 7.2221 ms/op 0.85
computeDeltas 750000 validators 7200 proto nodes 7.2503 ms/op 5.9511 ms/op 1.22
computeDeltas 1400000 validators 300 proto nodes 13.039 ms/op 10.607 ms/op 1.23
computeDeltas 1400000 validators 1200 proto nodes 12.433 ms/op 10.461 ms/op 1.19
computeDeltas 1400000 validators 7200 proto nodes 14.954 ms/op 11.751 ms/op 1.27
computeDeltas 2100000 validators 300 proto nodes 25.510 ms/op 17.173 ms/op 1.49
computeDeltas 2100000 validators 1200 proto nodes 27.336 ms/op 17.546 ms/op 1.56
computeDeltas 2100000 validators 7200 proto nodes 33.703 ms/op 16.479 ms/op 2.05
altair processAttestation - 250000 vs - 7PWei normalcase 5.5047 ms/op 2.3588 ms/op 2.33
altair processAttestation - 250000 vs - 7PWei worstcase 7.7115 ms/op 4.0432 ms/op 1.91
altair processAttestation - setStatus - 1/6 committees join 219.20 us/op 139.07 us/op 1.58
altair processAttestation - setStatus - 1/3 committees join 468.04 us/op 211.76 us/op 2.21
altair processAttestation - setStatus - 1/2 committees join 654.56 us/op 275.88 us/op 2.37
altair processAttestation - setStatus - 2/3 committees join 779.23 us/op 349.93 us/op 2.23
altair processAttestation - setStatus - 4/5 committees join 955.75 us/op 600.62 us/op 1.59
altair processAttestation - setStatus - 100% committees join 897.72 us/op 645.37 us/op 1.39
altair processBlock - 250000 vs - 7PWei normalcase 10.722 ms/op 5.8120 ms/op 1.84
altair processBlock - 250000 vs - 7PWei normalcase hashState 56.473 ms/op 26.226 ms/op 2.15
altair processBlock - 250000 vs - 7PWei worstcase 66.453 ms/op 43.799 ms/op 1.52
altair processBlock - 250000 vs - 7PWei worstcase hashState 150.11 ms/op 90.550 ms/op 1.66
phase0 processBlock - 250000 vs - 7PWei normalcase 4.2541 ms/op 2.3775 ms/op 1.79
phase0 processBlock - 250000 vs - 7PWei worstcase 46.322 ms/op 28.976 ms/op 1.60
altair processEth1Data - 250000 vs - 7PWei normalcase 878.63 us/op 482.45 us/op 1.82
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 11.717 us/op 7.2220 us/op 1.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 42.303 us/op 38.282 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 17.510 us/op 12.496 us/op 1.40
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 13.391 us/op 7.6170 us/op 1.76
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 160.94 us/op 128.33 us/op 1.25
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 872.25 us/op 671.26 us/op 1.30
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1477 ms/op 944.11 us/op 1.22
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2420 ms/op 898.58 us/op 1.38
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8701 ms/op 2.5675 ms/op 1.51
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.6046 ms/op 1.6422 ms/op 1.59
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 7.5195 ms/op 4.6207 ms/op 1.63
Tree 40 250000 create 553.13 ms/op 262.17 ms/op 2.11
Tree 40 250000 get(125000) 215.66 ns/op 160.45 ns/op 1.34
Tree 40 250000 set(125000) 1.9693 us/op 979.52 ns/op 2.01
Tree 40 250000 toArray() 28.202 ms/op 23.482 ms/op 1.20
Tree 40 250000 iterate all - toArray() + loop 27.074 ms/op 25.527 ms/op 1.06
Tree 40 250000 iterate all - get(i) 64.073 ms/op 58.836 ms/op 1.09
MutableVector 250000 create 18.423 ms/op 9.5298 ms/op 1.93
MutableVector 250000 get(125000) 6.9870 ns/op 8.1350 ns/op 0.86
MutableVector 250000 set(125000) 497.21 ns/op 232.74 ns/op 2.14
MutableVector 250000 toArray() 5.7230 ms/op 3.9805 ms/op 1.44
MutableVector 250000 iterate all - toArray() + loop 5.4090 ms/op 4.2108 ms/op 1.28
MutableVector 250000 iterate all - get(i) 1.7983 ms/op 1.6594 ms/op 1.08
Array 250000 create 4.5251 ms/op 3.9067 ms/op 1.16
Array 250000 clone - spread 1.7069 ms/op 1.5845 ms/op 1.08
Array 250000 get(125000) 0.44800 ns/op 0.44200 ns/op 1.01
Array 250000 set(125000) 0.47700 ns/op 0.45300 ns/op 1.05
Array 250000 iterate all - loop 86.766 us/op 109.09 us/op 0.80
effectiveBalanceIncrements clone Uint8Array 300000 53.745 us/op 39.969 us/op 1.34
effectiveBalanceIncrements clone MutableVector 300000 138.00 ns/op 134.00 ns/op 1.03
effectiveBalanceIncrements rw all Uint8Array 300000 206.87 us/op 197.95 us/op 1.05
effectiveBalanceIncrements rw all MutableVector 300000 108.08 ms/op 72.856 ms/op 1.48
phase0 afterProcessEpoch - 250000 vs - 7PWei 95.179 ms/op 88.647 ms/op 1.07
phase0 beforeProcessEpoch - 250000 vs - 7PWei 51.980 ms/op 44.834 ms/op 1.16
altair processEpoch - mainnet_e81889 461.34 ms/op 404.09 ms/op 1.14
mainnet_e81889 - altair beforeProcessEpoch 60.557 ms/op 79.383 ms/op 0.76
mainnet_e81889 - altair processJustificationAndFinalization 14.993 us/op 15.058 us/op 1.00
mainnet_e81889 - altair processInactivityUpdates 7.7516 ms/op 8.4820 ms/op 0.91
mainnet_e81889 - altair processRewardsAndPenalties 44.696 ms/op 47.082 ms/op 0.95
mainnet_e81889 - altair processRegistryUpdates 2.4400 us/op 2.7720 us/op 0.88
mainnet_e81889 - altair processSlashings 404.00 ns/op 507.00 ns/op 0.80
mainnet_e81889 - altair processEth1DataReset 342.00 ns/op 394.00 ns/op 0.87
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.0009 ms/op 1.2024 ms/op 1.66
mainnet_e81889 - altair processSlashingsReset 3.3730 us/op 3.0720 us/op 1.10
mainnet_e81889 - altair processRandaoMixesReset 5.2670 us/op 5.4890 us/op 0.96
mainnet_e81889 - altair processHistoricalRootsUpdate 492.00 ns/op 579.00 ns/op 0.85
mainnet_e81889 - altair processParticipationFlagUpdates 1.8550 us/op 1.9560 us/op 0.95
mainnet_e81889 - altair processSyncCommitteeUpdates 472.00 ns/op 499.00 ns/op 0.95
mainnet_e81889 - altair afterProcessEpoch 96.059 ms/op 94.067 ms/op 1.02
capella processEpoch - mainnet_e217614 1.6056 s/op 1.3883 s/op 1.16
mainnet_e217614 - capella beforeProcessEpoch 330.23 ms/op 299.46 ms/op 1.10
mainnet_e217614 - capella processJustificationAndFinalization 17.534 us/op 18.639 us/op 0.94
mainnet_e217614 - capella processInactivityUpdates 24.977 ms/op 20.391 ms/op 1.22
mainnet_e217614 - capella processRewardsAndPenalties 267.17 ms/op 262.89 ms/op 1.02
mainnet_e217614 - capella processRegistryUpdates 17.032 us/op 17.114 us/op 1.00
mainnet_e217614 - capella processSlashings 487.00 ns/op 427.00 ns/op 1.14
mainnet_e217614 - capella processEth1DataReset 441.00 ns/op 1.1270 us/op 0.39
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.3842 ms/op 5.1686 ms/op 1.04
mainnet_e217614 - capella processSlashingsReset 8.1240 us/op 3.9270 us/op 2.07
mainnet_e217614 - capella processRandaoMixesReset 5.6570 us/op 5.8190 us/op 0.97
mainnet_e217614 - capella processHistoricalRootsUpdate 871.00 ns/op 502.00 ns/op 1.74
mainnet_e217614 - capella processParticipationFlagUpdates 3.4240 us/op 3.0450 us/op 1.12
mainnet_e217614 - capella afterProcessEpoch 299.51 ms/op 247.77 ms/op 1.21
phase0 processEpoch - mainnet_e58758 429.56 ms/op 400.19 ms/op 1.07
mainnet_e58758 - phase0 beforeProcessEpoch 127.29 ms/op 130.58 ms/op 0.97
mainnet_e58758 - phase0 processJustificationAndFinalization 14.275 us/op 20.769 us/op 0.69
mainnet_e58758 - phase0 processRewardsAndPenalties 38.809 ms/op 27.665 ms/op 1.40
mainnet_e58758 - phase0 processRegistryUpdates 9.0070 us/op 9.9850 us/op 0.90
mainnet_e58758 - phase0 processSlashings 370.00 ns/op 410.00 ns/op 0.90
mainnet_e58758 - phase0 processEth1DataReset 388.00 ns/op 418.00 ns/op 0.93
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1076 ms/op 956.96 us/op 1.16
mainnet_e58758 - phase0 processSlashingsReset 2.9490 us/op 3.1070 us/op 0.95
mainnet_e58758 - phase0 processRandaoMixesReset 3.9940 us/op 6.8370 us/op 0.58
mainnet_e58758 - phase0 processHistoricalRootsUpdate 373.00 ns/op 401.00 ns/op 0.93
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.5930 us/op 3.3520 us/op 0.77
mainnet_e58758 - phase0 afterProcessEpoch 81.734 ms/op 80.930 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6303 ms/op 1.1480 ms/op 1.42
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.8393 ms/op 2.2797 ms/op 1.25
altair processInactivityUpdates - 250000 normalcase 23.493 ms/op 18.622 ms/op 1.26
altair processInactivityUpdates - 250000 worstcase 21.265 ms/op 19.150 ms/op 1.11
phase0 processRegistryUpdates - 250000 normalcase 8.8470 us/op 7.7480 us/op 1.14
phase0 processRegistryUpdates - 250000 badcase_full_deposits 288.02 us/op 281.15 us/op 1.02
phase0 processRegistryUpdates - 250000 worstcase 0.5 128.74 ms/op 127.86 ms/op 1.01
altair processRewardsAndPenalties - 250000 normalcase 43.985 ms/op 48.046 ms/op 0.92
altair processRewardsAndPenalties - 250000 worstcase 54.534 ms/op 45.093 ms/op 1.21
phase0 getAttestationDeltas - 250000 normalcase 8.1105 ms/op 9.1923 ms/op 0.88
phase0 getAttestationDeltas - 250000 worstcase 9.0161 ms/op 10.176 ms/op 0.89
phase0 processSlashings - 250000 worstcase 133.69 us/op 111.06 us/op 1.20
altair processSyncCommitteeUpdates - 250000 137.16 ms/op 142.30 ms/op 0.96
BeaconState.hashTreeRoot - No change 394.00 ns/op 346.00 ns/op 1.14
BeaconState.hashTreeRoot - 1 full validator 131.63 us/op 158.68 us/op 0.83
BeaconState.hashTreeRoot - 32 full validator 1.1912 ms/op 1.6272 ms/op 0.73
BeaconState.hashTreeRoot - 512 full validator 14.250 ms/op 13.650 ms/op 1.04
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 154.95 us/op 132.57 us/op 1.17
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0150 ms/op 1.8266 ms/op 1.10
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.243 ms/op 22.801 ms/op 1.24
BeaconState.hashTreeRoot - 1 balances 116.20 us/op 95.582 us/op 1.22
BeaconState.hashTreeRoot - 32 balances 1.1411 ms/op 1.1308 ms/op 1.01
BeaconState.hashTreeRoot - 512 balances 9.7217 ms/op 12.653 ms/op 0.77
BeaconState.hashTreeRoot - 250000 balances 183.87 ms/op 185.16 ms/op 0.99
aggregationBits - 2048 els - zipIndexesInBitList 35.106 us/op 31.426 us/op 1.12
byteArrayEquals 32 58.433 ns/op 54.299 ns/op 1.08
Buffer.compare 32 51.121 ns/op 46.387 ns/op 1.10
byteArrayEquals 1024 1.6581 us/op 1.6068 us/op 1.03
Buffer.compare 1024 57.515 ns/op 54.759 ns/op 1.05
byteArrayEquals 16384 27.179 us/op 25.402 us/op 1.07
Buffer.compare 16384 262.73 ns/op 240.00 ns/op 1.09
byteArrayEquals 123687377 204.50 ms/op 191.73 ms/op 1.07
Buffer.compare 123687377 8.8517 ms/op 9.3186 ms/op 0.95
byteArrayEquals 32 - diff last byte 56.208 ns/op 54.126 ns/op 1.04
Buffer.compare 32 - diff last byte 47.939 ns/op 45.915 ns/op 1.04
byteArrayEquals 1024 - diff last byte 1.6319 us/op 1.5728 us/op 1.04
Buffer.compare 1024 - diff last byte 56.632 ns/op 58.656 ns/op 0.97
byteArrayEquals 16384 - diff last byte 26.003 us/op 25.026 us/op 1.04
Buffer.compare 16384 - diff last byte 252.70 ns/op 241.39 ns/op 1.05
byteArrayEquals 123687377 - diff last byte 201.45 ms/op 191.43 ms/op 1.05
Buffer.compare 123687377 - diff last byte 9.5725 ms/op 8.3215 ms/op 1.15
byteArrayEquals 32 - random bytes 5.6890 ns/op 5.2280 ns/op 1.09
Buffer.compare 32 - random bytes 50.327 ns/op 48.714 ns/op 1.03
byteArrayEquals 1024 - random bytes 5.5050 ns/op 5.2190 ns/op 1.05
Buffer.compare 1024 - random bytes 48.134 ns/op 46.836 ns/op 1.03
byteArrayEquals 16384 - random bytes 5.4200 ns/op 5.1840 ns/op 1.05
Buffer.compare 16384 - random bytes 47.861 ns/op 45.534 ns/op 1.05
byteArrayEquals 123687377 - random bytes 6.8600 ns/op 6.4800 ns/op 1.06
Buffer.compare 123687377 - random bytes 50.790 ns/op 48.200 ns/op 1.05
regular array get 100000 times 39.798 us/op 33.933 us/op 1.17
wrappedArray get 100000 times 37.033 us/op 32.849 us/op 1.13
arrayWithProxy get 100000 times 13.879 ms/op 12.810 ms/op 1.08
ssz.Root.equals 49.905 ns/op 45.693 ns/op 1.09
byteArrayEquals 48.493 ns/op 44.876 ns/op 1.08
Buffer.compare 11.490 ns/op 10.319 ns/op 1.11
shuffle list - 16384 els 6.7946 ms/op 6.4350 ms/op 1.06
shuffle list - 250000 els 100.82 ms/op 93.681 ms/op 1.08
processSlot - 1 slots 17.974 us/op 13.748 us/op 1.31
processSlot - 32 slots 4.0101 ms/op 3.0297 ms/op 1.32
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 39.291 ms/op 37.287 ms/op 1.05
getCommitteeAssignments - req 1 vs - 250000 vc 2.3161 ms/op 2.2143 ms/op 1.05
getCommitteeAssignments - req 100 vs - 250000 vc 4.3946 ms/op 4.1999 ms/op 1.05
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6793 ms/op 4.5662 ms/op 1.02
findModifiedValidators - 10000 modified validators 266.50 ms/op 297.91 ms/op 0.89
findModifiedValidators - 1000 modified validators 193.70 ms/op 195.41 ms/op 0.99
findModifiedValidators - 100 modified validators 187.68 ms/op 214.67 ms/op 0.87
findModifiedValidators - 10 modified validators 167.39 ms/op 255.91 ms/op 0.65
findModifiedValidators - 1 modified validators 143.93 ms/op 262.26 ms/op 0.55
findModifiedValidators - no difference 153.10 ms/op 219.66 ms/op 0.70
compare ViewDUs 3.0920 s/op 3.6250 s/op 0.85
compare each validator Uint8Array 1.6966 s/op 1.2542 s/op 1.35
compare ViewDU to Uint8Array 1.1082 s/op 1.0210 s/op 1.09
migrate state 1000000 validators, 24 modified, 0 new 635.94 ms/op 572.24 ms/op 1.11
migrate state 1000000 validators, 1700 modified, 1000 new 867.00 ms/op 773.49 ms/op 1.12
migrate state 1000000 validators, 3400 modified, 2000 new 1.1347 s/op 1.0637 s/op 1.07
migrate state 1500000 validators, 24 modified, 0 new 600.41 ms/op 709.86 ms/op 0.85
migrate state 1500000 validators, 1700 modified, 1000 new 845.51 ms/op 894.52 ms/op 0.95
migrate state 1500000 validators, 3400 modified, 2000 new 1.0574 s/op 1.0717 s/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7900 ns/op 4.7500 ns/op 1.01
state getBlockRootAtSlot - 250000 vs - 7PWei 865.70 ns/op 469.77 ns/op 1.84
computeProposers - vc 250000 8.0191 ms/op 7.4461 ms/op 1.08
computeEpochShuffling - vc 250000 95.790 ms/op 94.728 ms/op 1.01
getNextSyncCommittee - vc 250000 122.51 ms/op 127.02 ms/op 0.96
computeSigningRoot for AttestationData 22.524 us/op 23.356 us/op 0.96
hash AttestationData serialized data then Buffer.toString(base64) 1.5204 us/op 1.5867 us/op 0.96
toHexString serialized data 909.21 ns/op 958.92 ns/op 0.95
Buffer.toString(base64) 196.54 ns/op 210.74 ns/op 0.93

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 3be656b into unstable Jun 11, 2024
21 checks passed
@wemeetagain wemeetagain deleted the nflaig/ignore-empty-arrays branch June 11, 2024 15:02
@wemeetagain
Copy link
Member

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

2 participants