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

feat: add down-scoring for metadata ssz size error #6366

Merged
merged 1 commit into from Jan 29, 2024

Conversation

matthewkeil
Copy link
Member

@matthewkeil matthewkeil commented Jan 29, 2024

Motivation

Downscore peers that send invalid metadata. Usually comes from Unknown client so possibly minority client in development that has bugs.

Resolves #6315

Description

Add RequestErrorCode.SSZ_OVER_MAX_SIZE
Apply PeerAction.LowToleranceError to limit to 5 instances before disconnect.

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Merging #6366 (2eea2d6) into unstable (6adbd27) will increase coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6366   +/-   ##
=========================================
  Coverage     60.14%   60.14%           
=========================================
  Files           407      407           
  Lines         46486    46490    +4     
  Branches       1545     1545           
=========================================
+ Hits          27957    27960    +3     
- Misses        18497    18498    +1     
  Partials         32       32           

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: a59fa7d Previous: 6adbd27 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 598.63 us/op 878.16 us/op 0.68
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 84.361 us/op 83.254 us/op 1.01
BLS verify - blst-native 1.3811 ms/op 1.3080 ms/op 1.06
BLS verifyMultipleSignatures 3 - blst-native 2.8887 ms/op 2.7450 ms/op 1.05
BLS verifyMultipleSignatures 8 - blst-native 6.3397 ms/op 6.0248 ms/op 1.05
BLS verifyMultipleSignatures 32 - blst-native 23.191 ms/op 22.013 ms/op 1.05
BLS verifyMultipleSignatures 64 - blst-native 45.660 ms/op 43.351 ms/op 1.05
BLS verifyMultipleSignatures 128 - blst-native 90.277 ms/op 86.605 ms/op 1.04
BLS deserializing 10000 signatures 955.30 ms/op 935.39 ms/op 1.02
BLS deserializing 100000 signatures 9.2248 s/op 9.4435 s/op 0.98
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3570 ms/op 1.3309 ms/op 1.02
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5319 ms/op 1.5029 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3658 ms/op 2.9938 ms/op 0.79
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.4729 ms/op 4.7075 ms/op 0.74
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.6942 ms/op 5.6641 ms/op 1.01
BLS aggregatePubkeys 32 - blst-native 26.107 us/op 26.005 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 102.32 us/op 101.67 us/op 1.01
getAttestationsForBlock 38.998 ms/op 44.473 ms/op 0.88
getSlashingsAndExits - default max 136.05 us/op 172.50 us/op 0.79
getSlashingsAndExits - 2k 346.32 us/op 378.69 us/op 0.91
proposeBlockBody type=full, size=empty 5.6049 ms/op 6.0230 ms/op 0.93
isKnown best case - 1 super set check 334.00 ns/op 312.00 ns/op 1.07
isKnown normal case - 2 super set checks 321.00 ns/op 300.00 ns/op 1.07
isKnown worse case - 16 super set checks 321.00 ns/op 297.00 ns/op 1.08
CheckpointStateCache - add get delete 5.6660 us/op 5.4400 us/op 1.04
validate api signedAggregateAndProof - struct 2.8263 ms/op 2.9528 ms/op 0.96
validate gossip signedAggregateAndProof - struct 2.8282 ms/op 2.9471 ms/op 0.96
validate gossip attestation - vc 640000 1.3532 ms/op 1.4288 ms/op 0.95
batch validate gossip attestation - vc 640000 - chunk 32 156.77 us/op 164.01 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 64 137.01 us/op 144.18 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 128 127.88 us/op 133.63 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 128.63 us/op 135.35 us/op 0.95
pickEth1Vote - no votes 1.1471 ms/op 1.2393 ms/op 0.93
pickEth1Vote - max votes 8.8234 ms/op 9.8853 ms/op 0.89
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.347 ms/op 19.197 ms/op 0.80
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.815 ms/op 25.707 ms/op 0.81
pickEth1Vote - Eth1Data fastSerialize value x2048 601.22 us/op 610.02 us/op 0.99
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.2181 ms/op 7.0936 ms/op 0.59
bytes32 toHexString 474.00 ns/op 530.00 ns/op 0.89
bytes32 Buffer.toString(hex) 277.00 ns/op 306.00 ns/op 0.91
bytes32 Buffer.toString(hex) from Uint8Array 415.00 ns/op 437.00 ns/op 0.95
bytes32 Buffer.toString(hex) + 0x 277.00 ns/op 310.00 ns/op 0.89
Object access 1 prop 0.15500 ns/op 0.16600 ns/op 0.93
Map access 1 prop 0.14600 ns/op 0.15900 ns/op 0.92
Object get x1000 7.4230 ns/op 8.2490 ns/op 0.90
Map get x1000 0.73000 ns/op 0.78600 ns/op 0.93
Object set x1000 49.052 ns/op 51.600 ns/op 0.95
Map set x1000 39.095 ns/op 40.171 ns/op 0.97
Return object 10000 times 0.23600 ns/op 0.23890 ns/op 0.99
Throw Error 10000 times 3.7838 us/op 3.9547 us/op 0.96
fastMsgIdFn sha256 / 200 bytes 3.2190 us/op 3.4140 us/op 0.94
fastMsgIdFn h32 xxhash / 200 bytes 284.00 ns/op 297.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 200 bytes 337.00 ns/op 355.00 ns/op 0.95
fastMsgIdFn sha256 / 1000 bytes 11.185 us/op 11.884 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 412.00 ns/op 432.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 1000 bytes 409.00 ns/op 440.00 ns/op 0.93
fastMsgIdFn sha256 / 10000 bytes 102.97 us/op 109.11 us/op 0.94
fastMsgIdFn h32 xxhash / 10000 bytes 1.8740 us/op 1.9330 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 1.2910 us/op 1.3310 us/op 0.97
send data - 1000 256B messages 17.216 ms/op 19.923 ms/op 0.86
send data - 1000 512B messages 25.404 ms/op 27.585 ms/op 0.92
send data - 1000 1024B messages 38.325 ms/op 43.567 ms/op 0.88
send data - 1000 1200B messages 38.130 ms/op 40.588 ms/op 0.94
send data - 1000 2048B messages 46.194 ms/op 50.858 ms/op 0.91
send data - 1000 4096B messages 41.012 ms/op 45.578 ms/op 0.90
send data - 1000 16384B messages 114.69 ms/op 121.66 ms/op 0.94
send data - 1000 65536B messages 512.79 ms/op 574.28 ms/op 0.89
enrSubnets - fastDeserialize 64 bits 1.3330 us/op 1.3220 us/op 1.01
enrSubnets - ssz BitVector 64 bits 423.00 ns/op 425.00 ns/op 1.00
enrSubnets - fastDeserialize 4 bits 175.00 ns/op 172.00 ns/op 1.02
enrSubnets - ssz BitVector 4 bits 423.00 ns/op 430.00 ns/op 0.98
prioritizePeers score -10:0 att 32-0.1 sync 2-0 98.747 us/op 104.98 us/op 0.94
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 125.40 us/op 130.94 us/op 0.96
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 159.46 us/op 167.42 us/op 0.95
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 316.10 us/op 298.24 us/op 1.06
prioritizePeers score 0:0 att 64-1 sync 4-1 334.39 us/op 355.18 us/op 0.94
array of 16000 items push then shift 1.6216 us/op 1.6358 us/op 0.99
LinkedList of 16000 items push then shift 8.8920 ns/op 9.2780 ns/op 0.96
array of 16000 items push then pop 78.750 ns/op 78.620 ns/op 1.00
LinkedList of 16000 items push then pop 8.6890 ns/op 8.8940 ns/op 0.98
array of 24000 items push then shift 2.3927 us/op 2.3994 us/op 1.00
LinkedList of 24000 items push then shift 8.9370 ns/op 9.0110 ns/op 0.99
array of 24000 items push then pop 93.382 ns/op 103.48 ns/op 0.90
LinkedList of 24000 items push then pop 8.6160 ns/op 9.3180 ns/op 0.92
intersect bitArray bitLen 8 6.3680 ns/op 7.0040 ns/op 0.91
intersect array and set length 8 61.874 ns/op 66.413 ns/op 0.93
intersect bitArray bitLen 128 33.987 ns/op 37.320 ns/op 0.91
intersect array and set length 128 851.17 ns/op 918.25 ns/op 0.93
bitArray.getTrueBitIndexes() bitLen 128 1.4350 us/op 1.5720 us/op 0.91
bitArray.getTrueBitIndexes() bitLen 248 2.3470 us/op 2.5570 us/op 0.92
bitArray.getTrueBitIndexes() bitLen 512 4.6680 us/op 4.9760 us/op 0.94
Buffer.concat 32 items 939.00 ns/op 1.0490 us/op 0.90
Uint8Array.set 32 items 1.5800 us/op 2.0010 us/op 0.79
Set add up to 64 items then delete first 4.3102 us/op 4.4192 us/op 0.98
OrderedSet add up to 64 items then delete first 5.4515 us/op 5.6639 us/op 0.96
Set add up to 64 items then delete last 4.6024 us/op 4.8273 us/op 0.95
OrderedSet add up to 64 items then delete last 5.7282 us/op 6.0377 us/op 0.95
Set add up to 64 items then delete middle 4.5943 us/op 4.7841 us/op 0.96
OrderedSet add up to 64 items then delete middle 7.0049 us/op 7.4237 us/op 0.94
Set add up to 128 items then delete first 9.3025 us/op 9.6600 us/op 0.96
OrderedSet add up to 128 items then delete first 12.354 us/op 12.773 us/op 0.97
Set add up to 128 items then delete last 9.1518 us/op 9.5134 us/op 0.96
OrderedSet add up to 128 items then delete last 11.601 us/op 12.143 us/op 0.96
Set add up to 128 items then delete middle 9.1152 us/op 9.5494 us/op 0.95
OrderedSet add up to 128 items then delete middle 16.888 us/op 18.053 us/op 0.94
Set add up to 256 items then delete first 18.826 us/op 19.338 us/op 0.97
OrderedSet add up to 256 items then delete first 26.318 us/op 26.217 us/op 1.00
Set add up to 256 items then delete last 18.301 us/op 18.805 us/op 0.97
OrderedSet add up to 256 items then delete last 23.375 us/op 24.170 us/op 0.97
Set add up to 256 items then delete middle 18.145 us/op 18.901 us/op 0.96
OrderedSet add up to 256 items then delete middle 44.722 us/op 47.923 us/op 0.93
transfer serialized Status (84 B) 1.6020 us/op 1.7620 us/op 0.91
copy serialized Status (84 B) 1.2310 us/op 1.2770 us/op 0.96
transfer serialized SignedVoluntaryExit (112 B) 1.7040 us/op 1.8600 us/op 0.92
copy serialized SignedVoluntaryExit (112 B) 1.2570 us/op 1.3900 us/op 0.90
transfer serialized ProposerSlashing (416 B) 1.8190 us/op 2.3750 us/op 0.77
copy serialized ProposerSlashing (416 B) 1.5660 us/op 2.2050 us/op 0.71
transfer serialized Attestation (485 B) 1.8830 us/op 2.3980 us/op 0.79
copy serialized Attestation (485 B) 1.5880 us/op 2.0450 us/op 0.78
transfer serialized AttesterSlashing (33232 B) 2.0190 us/op 2.6180 us/op 0.77
copy serialized AttesterSlashing (33232 B) 4.8360 us/op 5.5440 us/op 0.87
transfer serialized Small SignedBeaconBlock (128000 B) 2.4160 us/op 2.9580 us/op 0.82
copy serialized Small SignedBeaconBlock (128000 B) 14.210 us/op 13.642 us/op 1.04
transfer serialized Avg SignedBeaconBlock (200000 B) 2.8120 us/op 2.9110 us/op 0.97
copy serialized Avg SignedBeaconBlock (200000 B) 21.033 us/op 21.188 us/op 0.99
transfer serialized BlobsSidecar (524380 B) 2.6600 us/op 3.0900 us/op 0.86
copy serialized BlobsSidecar (524380 B) 84.984 us/op 92.866 us/op 0.92
transfer serialized Big SignedBeaconBlock (1000000 B) 2.6180 us/op 3.0200 us/op 0.87
copy serialized Big SignedBeaconBlock (1000000 B) 165.42 us/op 184.15 us/op 0.90
pass gossip attestations to forkchoice per slot 3.8756 ms/op 3.9770 ms/op 0.97
forkChoice updateHead vc 100000 bc 64 eq 0 740.67 us/op 710.17 us/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 0 4.3651 ms/op 4.2355 ms/op 1.03
forkChoice updateHead vc 1000000 bc 64 eq 0 7.1735 ms/op 7.1898 ms/op 1.00
forkChoice updateHead vc 600000 bc 320 eq 0 4.2805 ms/op 4.6607 ms/op 0.92
forkChoice updateHead vc 600000 bc 1200 eq 0 4.4977 ms/op 4.5316 ms/op 0.99
forkChoice updateHead vc 600000 bc 7200 eq 0 5.3678 ms/op 5.5304 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 1000 11.549 ms/op 11.529 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 12.023 ms/op 12.352 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 300000 15.958 ms/op 16.453 ms/op 0.97
computeDeltas 500000 validators 300 proto nodes 6.8423 ms/op 6.7701 ms/op 1.01
computeDeltas 500000 validators 1200 proto nodes 6.7126 ms/op 6.8822 ms/op 0.98
computeDeltas 500000 validators 7200 proto nodes 6.6274 ms/op 6.8238 ms/op 0.97
computeDeltas 750000 validators 300 proto nodes 9.9456 ms/op 10.244 ms/op 0.97
computeDeltas 750000 validators 1200 proto nodes 9.9859 ms/op 10.287 ms/op 0.97
computeDeltas 750000 validators 7200 proto nodes 9.8346 ms/op 10.215 ms/op 0.96
computeDeltas 1400000 validators 300 proto nodes 19.377 ms/op 20.270 ms/op 0.96
computeDeltas 1400000 validators 1200 proto nodes 19.133 ms/op 19.965 ms/op 0.96
computeDeltas 1400000 validators 7200 proto nodes 20.039 ms/op 20.593 ms/op 0.97
computeDeltas 2100000 validators 300 proto nodes 31.443 ms/op 30.796 ms/op 1.02
computeDeltas 2100000 validators 1200 proto nodes 31.846 ms/op 31.612 ms/op 1.01
computeDeltas 2100000 validators 7200 proto nodes 32.644 ms/op 32.335 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.9397 ms/op 2.2035 ms/op 1.33
altair processAttestation - 250000 vs - 7PWei worstcase 4.4074 ms/op 3.2616 ms/op 1.35
altair processAttestation - setStatus - 1/6 committees join 202.70 us/op 184.26 us/op 1.10
altair processAttestation - setStatus - 1/3 committees join 391.00 us/op 356.82 us/op 1.10
altair processAttestation - setStatus - 1/2 committees join 524.33 us/op 480.41 us/op 1.09
altair processAttestation - setStatus - 2/3 committees join 643.57 us/op 659.44 us/op 0.98
altair processAttestation - setStatus - 4/5 committees join 1.0906 ms/op 926.79 us/op 1.18
altair processAttestation - setStatus - 100% committees join 1.0257 ms/op 940.48 us/op 1.09
altair processBlock - 250000 vs - 7PWei normalcase 11.656 ms/op 10.354 ms/op 1.13
altair processBlock - 250000 vs - 7PWei normalcase hashState 44.138 ms/op 36.345 ms/op 1.21
altair processBlock - 250000 vs - 7PWei worstcase 47.231 ms/op 46.172 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase hashState 112.83 ms/op 97.346 ms/op 1.16
phase0 processBlock - 250000 vs - 7PWei normalcase 2.5913 ms/op 2.5078 ms/op 1.03
phase0 processBlock - 250000 vs - 7PWei worstcase 30.689 ms/op 29.565 ms/op 1.04
altair processEth1Data - 250000 vs - 7PWei normalcase 562.83 us/op 595.05 us/op 0.95
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 12.450 us/op 9.8350 us/op 1.27
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 63.782 us/op 56.910 us/op 1.12
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 21.033 us/op 15.160 us/op 1.39
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.8400 us/op 7.0760 us/op 1.11
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 144.58 us/op 160.57 us/op 0.90
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0996 ms/op 1.0653 ms/op 1.03
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5752 ms/op 1.4848 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9602 ms/op 1.4638 ms/op 1.34
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.7002 ms/op 3.9414 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4015 ms/op 2.5026 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.3048 ms/op 5.1831 ms/op 1.02
Tree 40 250000 create 367.61 ms/op 358.23 ms/op 1.03
Tree 40 250000 get(125000) 209.02 ns/op 210.69 ns/op 0.99
Tree 40 250000 set(125000) 1.0525 us/op 1.0272 us/op 1.02
Tree 40 250000 toArray() 19.996 ms/op 18.451 ms/op 1.08
Tree 40 250000 iterate all - toArray() + loop 19.752 ms/op 18.580 ms/op 1.06
Tree 40 250000 iterate all - get(i) 68.520 ms/op 66.137 ms/op 1.04
MutableVector 250000 create 11.903 ms/op 14.343 ms/op 0.83
MutableVector 250000 get(125000) 6.6910 ns/op 6.6820 ns/op 1.00
MutableVector 250000 set(125000) 283.37 ns/op 272.90 ns/op 1.04
MutableVector 250000 toArray() 3.4674 ms/op 3.2440 ms/op 1.07
MutableVector 250000 iterate all - toArray() + loop 3.5493 ms/op 3.5392 ms/op 1.00
MutableVector 250000 iterate all - get(i) 1.5664 ms/op 1.5922 ms/op 0.98
Array 250000 create 2.9260 ms/op 2.8882 ms/op 1.01
Array 250000 clone - spread 1.3710 ms/op 1.4446 ms/op 0.95
Array 250000 get(125000) 1.1290 ns/op 1.2660 ns/op 0.89
Array 250000 set(125000) 4.3520 ns/op 4.6000 ns/op 0.95
Array 250000 iterate all - loop 170.72 us/op 193.91 us/op 0.88
effectiveBalanceIncrements clone Uint8Array 300000 28.940 us/op 31.810 us/op 0.91
effectiveBalanceIncrements clone MutableVector 300000 422.00 ns/op 467.00 ns/op 0.90
effectiveBalanceIncrements rw all Uint8Array 300000 204.35 us/op 236.87 us/op 0.86
effectiveBalanceIncrements rw all MutableVector 300000 92.156 ms/op 96.629 ms/op 0.95
phase0 afterProcessEpoch - 250000 vs - 7PWei 116.90 ms/op 128.43 ms/op 0.91
phase0 beforeProcessEpoch - 250000 vs - 7PWei 51.383 ms/op 53.022 ms/op 0.97
altair processEpoch - mainnet_e81889 489.20 ms/op 518.76 ms/op 0.94
mainnet_e81889 - altair beforeProcessEpoch 81.409 ms/op 84.593 ms/op 0.96
mainnet_e81889 - altair processJustificationAndFinalization 13.871 us/op 15.683 us/op 0.88
mainnet_e81889 - altair processInactivityUpdates 5.7571 ms/op 6.1318 ms/op 0.94
mainnet_e81889 - altair processRewardsAndPenalties 60.419 ms/op 62.464 ms/op 0.97
mainnet_e81889 - altair processRegistryUpdates 2.7450 us/op 2.6340 us/op 1.04
mainnet_e81889 - altair processSlashings 516.00 ns/op 471.00 ns/op 1.10
mainnet_e81889 - altair processEth1DataReset 418.00 ns/op 532.00 ns/op 0.79
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4511 ms/op 1.3789 ms/op 1.05
mainnet_e81889 - altair processSlashingsReset 3.3280 us/op 3.6460 us/op 0.91
mainnet_e81889 - altair processRandaoMixesReset 4.6010 us/op 4.1450 us/op 1.11
mainnet_e81889 - altair processHistoricalRootsUpdate 818.00 ns/op 1.0360 us/op 0.79
mainnet_e81889 - altair processParticipationFlagUpdates 1.8560 us/op 1.8650 us/op 1.00
mainnet_e81889 - altair processSyncCommitteeUpdates 587.00 ns/op 617.00 ns/op 0.95
mainnet_e81889 - altair afterProcessEpoch 120.37 ms/op 129.63 ms/op 0.93
capella processEpoch - mainnet_e217614 1.9773 s/op 2.2383 s/op 0.88
mainnet_e217614 - capella beforeProcessEpoch 498.14 ms/op 494.08 ms/op 1.01
mainnet_e217614 - capella processJustificationAndFinalization 19.875 us/op 15.070 us/op 1.32
mainnet_e217614 - capella processInactivityUpdates 18.138 ms/op 20.067 ms/op 0.90
mainnet_e217614 - capella processRewardsAndPenalties 388.97 ms/op 422.29 ms/op 0.92
mainnet_e217614 - capella processRegistryUpdates 19.989 us/op 19.229 us/op 1.04
mainnet_e217614 - capella processSlashings 487.00 ns/op 585.00 ns/op 0.83
mainnet_e217614 - capella processEth1DataReset 376.00 ns/op 468.00 ns/op 0.80
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.4676 ms/op 4.7763 ms/op 0.94
mainnet_e217614 - capella processSlashingsReset 2.9370 us/op 3.7200 us/op 0.79
mainnet_e217614 - capella processRandaoMixesReset 4.2450 us/op 4.7700 us/op 0.89
mainnet_e217614 - capella processHistoricalRootsUpdate 514.00 ns/op 663.00 ns/op 0.78
mainnet_e217614 - capella processParticipationFlagUpdates 1.8270 us/op 1.9050 us/op 0.96
mainnet_e217614 - capella afterProcessEpoch 301.87 ms/op 323.34 ms/op 0.93
phase0 processEpoch - mainnet_e58758 413.75 ms/op 459.94 ms/op 0.90
mainnet_e58758 - phase0 beforeProcessEpoch 118.56 ms/op 147.77 ms/op 0.80
mainnet_e58758 - phase0 processJustificationAndFinalization 14.531 us/op 15.366 us/op 0.95
mainnet_e58758 - phase0 processRewardsAndPenalties 51.790 ms/op 53.852 ms/op 0.96
mainnet_e58758 - phase0 processRegistryUpdates 9.9120 us/op 9.1680 us/op 1.08
mainnet_e58758 - phase0 processSlashings 526.00 ns/op 623.00 ns/op 0.84
mainnet_e58758 - phase0 processEth1DataReset 368.00 ns/op 448.00 ns/op 0.82
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1736 ms/op 1.1288 ms/op 1.04
mainnet_e58758 - phase0 processSlashingsReset 3.2060 us/op 2.7130 us/op 1.18
mainnet_e58758 - phase0 processRandaoMixesReset 3.6840 us/op 4.1010 us/op 0.90
mainnet_e58758 - phase0 processHistoricalRootsUpdate 408.00 ns/op 432.00 ns/op 0.94
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.0510 us/op 3.9980 us/op 1.26
mainnet_e58758 - phase0 afterProcessEpoch 99.820 ms/op 104.94 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4599 ms/op 1.3876 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4754 ms/op 1.4292 ms/op 1.03
altair processInactivityUpdates - 250000 normalcase 22.507 ms/op 21.032 ms/op 1.07
altair processInactivityUpdates - 250000 worstcase 28.844 ms/op 21.931 ms/op 1.32
phase0 processRegistryUpdates - 250000 normalcase 7.2450 us/op 8.2060 us/op 0.88
phase0 processRegistryUpdates - 250000 badcase_full_deposits 338.15 us/op 311.41 us/op 1.09
phase0 processRegistryUpdates - 250000 worstcase 0.5 121.67 ms/op 145.39 ms/op 0.84
altair processRewardsAndPenalties - 250000 normalcase 57.844 ms/op 58.265 ms/op 0.99
altair processRewardsAndPenalties - 250000 worstcase 55.612 ms/op 58.078 ms/op 0.96
phase0 getAttestationDeltas - 250000 normalcase 9.1901 ms/op 9.3345 ms/op 0.98
phase0 getAttestationDeltas - 250000 worstcase 9.1618 ms/op 9.3447 ms/op 0.98
phase0 processSlashings - 250000 worstcase 81.255 us/op 84.376 us/op 0.96
altair processSyncCommitteeUpdates - 250000 152.40 ms/op 152.35 ms/op 1.00
BeaconState.hashTreeRoot - No change 356.00 ns/op 385.00 ns/op 0.92
BeaconState.hashTreeRoot - 1 full validator 113.35 us/op 135.38 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 1.1597 ms/op 1.3947 ms/op 0.83
BeaconState.hashTreeRoot - 512 full validator 12.403 ms/op 14.523 ms/op 0.85
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 136.66 us/op 172.59 us/op 0.79
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8676 ms/op 2.5497 ms/op 0.73
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.019 ms/op 34.243 ms/op 0.70
BeaconState.hashTreeRoot - 1 balances 109.38 us/op 140.03 us/op 0.78
BeaconState.hashTreeRoot - 32 balances 981.06 us/op 1.3222 ms/op 0.74
BeaconState.hashTreeRoot - 512 balances 9.3904 ms/op 11.580 ms/op 0.81
BeaconState.hashTreeRoot - 250000 balances 174.35 ms/op 208.97 ms/op 0.83
aggregationBits - 2048 els - zipIndexesInBitList 17.412 us/op 17.441 us/op 1.00
byteArrayEquals 32 76.897 ns/op 84.475 ns/op 0.91
Buffer.compare 32 56.895 ns/op 63.893 ns/op 0.89
byteArrayEquals 1024 2.0919 us/op 2.3134 us/op 0.90
Buffer.compare 1024 71.485 ns/op 78.348 ns/op 0.91
byteArrayEquals 16384 33.284 us/op 36.617 us/op 0.91
Buffer.compare 16384 275.02 ns/op 299.35 ns/op 0.92
byteArrayEquals 123687377 251.33 ms/op 250.84 ms/op 1.00
Buffer.compare 123687377 6.0743 ms/op 6.0697 ms/op 1.00
byteArrayEquals 32 - diff last byte 76.185 ns/op 73.623 ns/op 1.03
Buffer.compare 32 - diff last byte 57.336 ns/op 66.627 ns/op 0.86
byteArrayEquals 1024 - diff last byte 2.0889 us/op 2.2182 us/op 0.94
Buffer.compare 1024 - diff last byte 72.895 ns/op 77.404 ns/op 0.94
byteArrayEquals 16384 - diff last byte 33.437 us/op 35.329 us/op 0.95
Buffer.compare 16384 - diff last byte 262.00 ns/op 252.87 ns/op 1.04
byteArrayEquals 123687377 - diff last byte 251.75 ms/op 263.93 ms/op 0.95
Buffer.compare 123687377 - diff last byte 6.2645 ms/op 6.3239 ms/op 0.99
byteArrayEquals 32 - random bytes 5.4280 ns/op 5.6040 ns/op 0.97
Buffer.compare 32 - random bytes 62.295 ns/op 65.095 ns/op 0.96
byteArrayEquals 1024 - random bytes 5.3560 ns/op 5.4870 ns/op 0.98
Buffer.compare 1024 - random bytes 61.217 ns/op 63.869 ns/op 0.96
byteArrayEquals 16384 - random bytes 5.3440 ns/op 5.4590 ns/op 0.98
Buffer.compare 16384 - random bytes 61.446 ns/op 64.328 ns/op 0.96
byteArrayEquals 123687377 - random bytes 8.7600 ns/op 8.7800 ns/op 1.00
Buffer.compare 123687377 - random bytes 65.150 ns/op 67.610 ns/op 0.96
regular array get 100000 times 45.562 us/op 46.406 us/op 0.98
wrappedArray get 100000 times 45.352 us/op 46.335 us/op 0.98
arrayWithProxy get 100000 times 14.584 ms/op 15.542 ms/op 0.94
ssz.Root.equals 54.969 ns/op 57.421 ns/op 0.96
byteArrayEquals 53.985 ns/op 56.420 ns/op 0.96
Buffer.compare 11.086 ns/op 11.674 ns/op 0.95
shuffle list - 16384 els 7.0704 ms/op 7.4414 ms/op 0.95
shuffle list - 250000 els 104.27 ms/op 114.09 ms/op 0.91
processSlot - 1 slots 15.277 us/op 17.876 us/op 0.85
processSlot - 32 slots 2.8456 ms/op 3.6131 ms/op 0.79
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 54.927 ms/op 59.843 ms/op 0.92
getCommitteeAssignments - req 1 vs - 250000 vc 2.5098 ms/op 2.5944 ms/op 0.97
getCommitteeAssignments - req 100 vs - 250000 vc 3.7050 ms/op 3.7729 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0241 ms/op 4.1558 ms/op 0.97
findModifiedValidators - 10000 modified validators 510.26 ms/op 601.89 ms/op 0.85
findModifiedValidators - 1000 modified validators 427.42 ms/op 505.40 ms/op 0.85
findModifiedValidators - 100 modified validators 390.24 ms/op 472.83 ms/op 0.83
findModifiedValidators - 10 modified validators 434.66 ms/op 478.87 ms/op 0.91
findModifiedValidators - 1 modified validators 419.02 ms/op 487.18 ms/op 0.86
findModifiedValidators - no difference 430.92 ms/op 464.00 ms/op 0.93
compare ViewDUs 4.3346 s/op 4.4897 s/op 0.97
compare each validator Uint8Array 1.8901 s/op 1.9254 s/op 0.98
compare ViewDU to Uint8Array 1.1525 s/op 1.1934 s/op 0.97
migrate state 1000000 validators, 24 modified, 0 new 747.05 ms/op 827.39 ms/op 0.90
migrate state 1000000 validators, 1700 modified, 1000 new 961.65 ms/op 1.1299 s/op 0.85
migrate state 1000000 validators, 3400 modified, 2000 new 1.2163 s/op 1.3798 s/op 0.88
migrate state 1500000 validators, 24 modified, 0 new 817.77 ms/op 835.35 ms/op 0.98
migrate state 1500000 validators, 1700 modified, 1000 new 1.1220 s/op 1.1728 s/op 0.96
migrate state 1500000 validators, 3400 modified, 2000 new 1.2759 s/op 1.4004 s/op 0.91
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6200 ns/op 4.5000 ns/op 1.03
state getBlockRootAtSlot - 250000 vs - 7PWei 561.82 ns/op 747.79 ns/op 0.75
computeProposers - vc 250000 9.3720 ms/op 9.4483 ms/op 0.99
computeEpochShuffling - vc 250000 109.59 ms/op 107.19 ms/op 1.02
getNextSyncCommittee - vc 250000 159.75 ms/op 156.66 ms/op 1.02
computeSigningRoot for AttestationData 23.198 us/op 30.040 us/op 0.77
hash AttestationData serialized data then Buffer.toString(base64) 2.3746 us/op 2.5208 us/op 0.94
toHexString serialized data 1.0858 us/op 1.1499 us/op 0.94
Buffer.toString(base64) 246.16 ns/op 236.45 ns/op 1.04

by benchmarkbot/action

@twoeths twoeths merged commit 291e178 into unstable Jan 29, 2024
14 of 16 checks passed
@twoeths twoeths deleted the mkeil/metadata-ssz-error branch January 29, 2024 06:55
@@ -31,6 +31,8 @@ export enum RequestErrorCode {
RESP_TIMEOUT = "REQUEST_ERROR_RESP_TIMEOUT",
/** Request rate limited */
REQUEST_RATE_LIMITED = "REQUEST_ERROR_RATE_LIMITED",
/** */
Copy link
Member

Choose a reason for hiding this comment

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

why is this left empty, sounds useful to know later why it was introduced without looking at the PR

Copy link
Contributor

Choose a reason for hiding this comment

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

yes please do a follow up PR @matthewkeil

@wemeetagain
Copy link
Member

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

Downscore clients with SSZ_SNAPPY_ERROR_OVER_SSZ_MAX_SIZE error
4 participants