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: bound AttesterSlashing instances when producing block #6139

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Nov 29, 2023

Motivation

Failed to setup dev network and slash a lot of validators there

Description

When producing blocks, include MAX_ATTESTER_SLASHINGS at most, or vc failed to deserialize it from json, see this error #6135

Closes #6135

@twoeths twoeths requested a review from a team as a code owner November 29, 2023 03:29
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: bd4856b Previous: 248b64c Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 744.27 us/op 721.34 us/op 1.03
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 82.123 us/op 58.808 us/op 1.40
BLS verify - blst-native 1.3014 ms/op 1.0515 ms/op 1.24
BLS verifyMultipleSignatures 3 - blst-native 2.7424 ms/op 2.2681 ms/op 1.21
BLS verifyMultipleSignatures 8 - blst-native 6.0332 ms/op 4.9597 ms/op 1.22
BLS verifyMultipleSignatures 32 - blst-native 21.989 ms/op 18.263 ms/op 1.20
BLS verifyMultipleSignatures 64 - blst-native 43.313 ms/op 36.052 ms/op 1.20
BLS verifyMultipleSignatures 128 - blst-native 86.382 ms/op 72.656 ms/op 1.19
BLS deserializing 10000 signatures 916.38 ms/op 782.41 ms/op 1.17
BLS deserializing 100000 signatures 9.1780 s/op 7.8599 s/op 1.17
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3143 ms/op 1.0825 ms/op 1.21
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4837 ms/op 1.2389 ms/op 1.20
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.9709 ms/op 1.9340 ms/op 1.54
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.1287 ms/op 3.5968 ms/op 1.15
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.5326 ms/op 4.7065 ms/op 1.18
BLS aggregatePubkeys 32 - blst-native 25.093 us/op 21.629 us/op 1.16
BLS aggregatePubkeys 128 - blst-native 98.699 us/op 84.790 us/op 1.16
getAttestationsForBlock 41.952 ms/op 38.722 ms/op 1.08
isKnown best case - 1 super set check 305.00 ns/op 402.00 ns/op 0.76
isKnown normal case - 2 super set checks 294.00 ns/op 372.00 ns/op 0.79
isKnown worse case - 16 super set checks 298.00 ns/op 346.00 ns/op 0.86
CheckpointStateCache - add get delete 5.5790 us/op 4.1430 us/op 1.35
validate api signedAggregateAndProof - struct 2.7334 ms/op 2.3151 ms/op 1.18
validate gossip signedAggregateAndProof - struct 2.7393 ms/op 2.3302 ms/op 1.18
validate gossip attestation - vc 640000 1.3409 ms/op 1.1339 ms/op 1.18
batch validate gossip attestation - vc 640000 - chunk 32 160.14 us/op 139.84 us/op 1.15
batch validate gossip attestation - vc 640000 - chunk 64 141.76 us/op 127.15 us/op 1.11
batch validate gossip attestation - vc 640000 - chunk 128 131.03 us/op 119.58 us/op 1.10
batch validate gossip attestation - vc 640000 - chunk 256 130.29 us/op 112.93 us/op 1.15
pickEth1Vote - no votes 1.1029 ms/op 883.95 us/op 1.25
pickEth1Vote - max votes 9.0561 ms/op 5.8068 ms/op 1.56
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.910 ms/op 11.492 ms/op 1.91
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 32.811 ms/op 18.392 ms/op 1.78
pickEth1Vote - Eth1Data fastSerialize value x2048 553.03 us/op 418.07 us/op 1.32
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.4001 ms/op 4.5388 ms/op 1.63
bytes32 toHexString 467.00 ns/op 453.00 ns/op 1.03
bytes32 Buffer.toString(hex) 287.00 ns/op 343.00 ns/op 0.84
bytes32 Buffer.toString(hex) from Uint8Array 427.00 ns/op 429.00 ns/op 1.00
bytes32 Buffer.toString(hex) + 0x 282.00 ns/op 315.00 ns/op 0.90
Object access 1 prop 0.15000 ns/op 0.19900 ns/op 0.75
Map access 1 prop 0.13600 ns/op 0.18400 ns/op 0.74
Object get x1000 7.0630 ns/op 5.6730 ns/op 1.25
Map get x1000 0.74100 ns/op 0.75100 ns/op 0.99
Object set x1000 47.629 ns/op 25.555 ns/op 1.86
Map set x1000 37.148 ns/op 17.117 ns/op 2.17
Return object 10000 times 0.22790 ns/op 0.22740 ns/op 1.00
Throw Error 10000 times 3.7496 us/op 2.8388 us/op 1.32
fastMsgIdFn sha256 / 200 bytes 3.1600 us/op 1.9610 us/op 1.61
fastMsgIdFn h32 xxhash / 200 bytes 260.00 ns/op 301.00 ns/op 0.86
fastMsgIdFn h64 xxhash / 200 bytes 334.00 ns/op 346.00 ns/op 0.97
fastMsgIdFn sha256 / 1000 bytes 11.090 us/op 6.1810 us/op 1.79
fastMsgIdFn h32 xxhash / 1000 bytes 388.00 ns/op 426.00 ns/op 0.91
fastMsgIdFn h64 xxhash / 1000 bytes 399.00 ns/op 414.00 ns/op 0.96
fastMsgIdFn sha256 / 10000 bytes 100.87 us/op 53.542 us/op 1.88
fastMsgIdFn h32 xxhash / 10000 bytes 1.8230 us/op 1.8330 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 1.2560 us/op 1.2470 us/op 1.01
send data - 1000 256B messages 17.669 ms/op 11.414 ms/op 1.55
send data - 1000 512B messages 24.740 ms/op 15.324 ms/op 1.61
send data - 1000 1024B messages 38.994 ms/op 22.410 ms/op 1.74
send data - 1000 1200B messages 33.691 ms/op 26.448 ms/op 1.27
send data - 1000 2048B messages 40.578 ms/op 33.577 ms/op 1.21
send data - 1000 4096B messages 41.821 ms/op 30.003 ms/op 1.39
send data - 1000 16384B messages 105.38 ms/op 82.027 ms/op 1.28
send data - 1000 65536B messages 486.04 ms/op 445.16 ms/op 1.09
enrSubnets - fastDeserialize 64 bits 1.2260 us/op 1.0110 us/op 1.21
enrSubnets - ssz BitVector 64 bits 432.00 ns/op 410.00 ns/op 1.05
enrSubnets - fastDeserialize 4 bits 163.00 ns/op 203.00 ns/op 0.80
enrSubnets - ssz BitVector 4 bits 422.00 ns/op 410.00 ns/op 1.03
prioritizePeers score -10:0 att 32-0.1 sync 2-0 106.56 us/op 65.784 us/op 1.62
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 128.05 us/op 77.930 us/op 1.64
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 168.67 us/op 110.21 us/op 1.53
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 292.75 us/op 191.78 us/op 1.53
prioritizePeers score 0:0 att 64-1 sync 4-1 340.10 us/op 206.89 us/op 1.64
array of 16000 items push then shift 1.5939 us/op 1.3376 us/op 1.19
LinkedList of 16000 items push then shift 8.8230 ns/op 6.1020 ns/op 1.45
array of 16000 items push then pop 74.406 ns/op 70.466 ns/op 1.06
LinkedList of 16000 items push then pop 8.6360 ns/op 5.7750 ns/op 1.50
array of 24000 items push then shift 2.4572 us/op 1.9458 us/op 1.26
LinkedList of 24000 items push then shift 8.8530 ns/op 6.5830 ns/op 1.34
array of 24000 items push then pop 119.73 ns/op 86.333 ns/op 1.39
LinkedList of 24000 items push then pop 8.5480 ns/op 6.0010 ns/op 1.42
intersect bitArray bitLen 8 6.3290 ns/op 5.3650 ns/op 1.18
intersect array and set length 8 61.702 ns/op 49.134 ns/op 1.26
intersect bitArray bitLen 128 33.495 ns/op 28.040 ns/op 1.19
intersect array and set length 128 849.53 ns/op 690.90 ns/op 1.23
bitArray.getTrueBitIndexes() bitLen 128 1.4250 us/op 1.2030 us/op 1.18
bitArray.getTrueBitIndexes() bitLen 248 2.2830 us/op 1.9010 us/op 1.20
bitArray.getTrueBitIndexes() bitLen 512 4.5910 us/op 3.7810 us/op 1.21
Buffer.concat 32 items 895.00 ns/op 943.00 ns/op 0.95
Uint8Array.set 32 items 1.6300 us/op 1.8880 us/op 0.86
Set add up to 64 items then delete first 4.2758 us/op 1.7847 us/op 2.40
OrderedSet add up to 64 items then delete first 5.2512 us/op 2.6867 us/op 1.95
Set add up to 64 items then delete last 4.4786 us/op 1.9878 us/op 2.25
OrderedSet add up to 64 items then delete last 5.5990 us/op 2.9900 us/op 1.87
Set add up to 64 items then delete middle 4.4804 us/op 2.0418 us/op 2.19
OrderedSet add up to 64 items then delete middle 7.1756 us/op 4.1934 us/op 1.71
Set add up to 128 items then delete first 8.9749 us/op 3.9054 us/op 2.30
OrderedSet add up to 128 items then delete first 11.901 us/op 6.1387 us/op 1.94
Set add up to 128 items then delete last 8.8519 us/op 4.1001 us/op 2.16
OrderedSet add up to 128 items then delete last 11.285 us/op 5.7025 us/op 1.98
Set add up to 128 items then delete middle 9.1377 us/op 3.8006 us/op 2.40
OrderedSet add up to 128 items then delete middle 17.105 us/op 10.663 us/op 1.60
Set add up to 256 items then delete first 18.083 us/op 7.6962 us/op 2.35
OrderedSet add up to 256 items then delete first 24.831 us/op 12.213 us/op 2.03
Set add up to 256 items then delete last 17.786 us/op 7.5426 us/op 2.36
OrderedSet add up to 256 items then delete last 23.154 us/op 11.402 us/op 2.03
Set add up to 256 items then delete middle 18.367 us/op 7.4030 us/op 2.48
OrderedSet add up to 256 items then delete middle 45.270 us/op 31.129 us/op 1.45
transfer serialized Status (84 B) 1.8160 us/op 1.4330 us/op 1.27
copy serialized Status (84 B) 1.5580 us/op 1.2470 us/op 1.25
transfer serialized SignedVoluntaryExit (112 B) 1.8760 us/op 1.4550 us/op 1.29
copy serialized SignedVoluntaryExit (112 B) 1.5710 us/op 1.3060 us/op 1.20
transfer serialized ProposerSlashing (416 B) 2.2430 us/op 2.6570 us/op 0.84
copy serialized ProposerSlashing (416 B) 2.0890 us/op 2.1320 us/op 0.98
transfer serialized Attestation (485 B) 2.3900 us/op 2.0110 us/op 1.19
copy serialized Attestation (485 B) 2.2690 us/op 2.1710 us/op 1.05
transfer serialized AttesterSlashing (33232 B) 2.6340 us/op 2.3660 us/op 1.11
copy serialized AttesterSlashing (33232 B) 5.9820 us/op 5.6280 us/op 1.06
transfer serialized Small SignedBeaconBlock (128000 B) 2.5900 us/op 2.9380 us/op 0.88
copy serialized Small SignedBeaconBlock (128000 B) 16.212 us/op 10.130 us/op 1.60
transfer serialized Avg SignedBeaconBlock (200000 B) 2.8290 us/op 2.9440 us/op 0.96
copy serialized Avg SignedBeaconBlock (200000 B) 22.719 us/op 13.529 us/op 1.68
transfer serialized BlobsSidecar (524380 B) 3.0340 us/op 2.6140 us/op 1.16
copy serialized BlobsSidecar (524380 B) 133.30 us/op 83.466 us/op 1.60
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1430 us/op 2.8590 us/op 1.10
copy serialized Big SignedBeaconBlock (1000000 B) 210.69 us/op 230.34 us/op 0.91
pass gossip attestations to forkchoice per slot 3.9093 ms/op 2.7913 ms/op 1.40
forkChoice updateHead vc 100000 bc 64 eq 0 696.80 us/op 464.07 us/op 1.50
forkChoice updateHead vc 600000 bc 64 eq 0 4.7161 ms/op 2.9140 ms/op 1.62
forkChoice updateHead vc 1000000 bc 64 eq 0 7.1093 ms/op 4.3870 ms/op 1.62
forkChoice updateHead vc 600000 bc 320 eq 0 4.2191 ms/op 2.5996 ms/op 1.62
forkChoice updateHead vc 600000 bc 1200 eq 0 4.3026 ms/op 2.7985 ms/op 1.54
forkChoice updateHead vc 600000 bc 7200 eq 0 5.9129 ms/op 3.4079 ms/op 1.74
forkChoice updateHead vc 600000 bc 64 eq 1000 11.549 ms/op 9.9445 ms/op 1.16
forkChoice updateHead vc 600000 bc 64 eq 10000 12.239 ms/op 9.6908 ms/op 1.26
forkChoice updateHead vc 600000 bc 64 eq 300000 18.177 ms/op 12.088 ms/op 1.50
computeDeltas 500000 validators 300 proto nodes 6.7602 ms/op 3.2696 ms/op 2.07
computeDeltas 500000 validators 1200 proto nodes 6.5817 ms/op 3.1771 ms/op 2.07
computeDeltas 500000 validators 7200 proto nodes 6.3979 ms/op 3.0388 ms/op 2.11
computeDeltas 750000 validators 300 proto nodes 9.6845 ms/op 4.6756 ms/op 2.07
computeDeltas 750000 validators 1200 proto nodes 9.8193 ms/op 4.7163 ms/op 2.08
computeDeltas 750000 validators 7200 proto nodes 9.6919 ms/op 4.5701 ms/op 2.12
computeDeltas 1400000 validators 300 proto nodes 18.847 ms/op 8.8973 ms/op 2.12
computeDeltas 1400000 validators 1200 proto nodes 18.464 ms/op 9.6214 ms/op 1.92
computeDeltas 1400000 validators 7200 proto nodes 18.209 ms/op 9.7586 ms/op 1.87
computeDeltas 2100000 validators 300 proto nodes 28.043 ms/op 14.877 ms/op 1.88
computeDeltas 2100000 validators 1200 proto nodes 27.924 ms/op 14.355 ms/op 1.95
computeDeltas 2100000 validators 7200 proto nodes 28.056 ms/op 15.613 ms/op 1.80
computeProposerBoostScoreFromBalances 500000 validators 3.7069 ms/op 3.5260 ms/op 1.05
computeProposerBoostScoreFromBalances 750000 validators 3.6914 ms/op 3.5423 ms/op 1.04
computeProposerBoostScoreFromBalances 1400000 validators 3.6723 ms/op 3.6051 ms/op 1.02
computeProposerBoostScoreFromBalances 2100000 validators 3.6272 ms/op 3.4655 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei normalcase 2.2045 ms/op 1.9945 ms/op 1.11
altair processAttestation - 250000 vs - 7PWei worstcase 3.2162 ms/op 2.5389 ms/op 1.27
altair processAttestation - setStatus - 1/6 committees join 179.30 us/op 112.30 us/op 1.60
altair processAttestation - setStatus - 1/3 committees join 333.73 us/op 200.05 us/op 1.67
altair processAttestation - setStatus - 1/2 committees join 474.45 us/op 292.82 us/op 1.62
altair processAttestation - setStatus - 2/3 committees join 572.82 us/op 385.31 us/op 1.49
altair processAttestation - setStatus - 4/5 committees join 818.18 us/op 520.95 us/op 1.57
altair processAttestation - setStatus - 100% committees join 925.30 us/op 602.82 us/op 1.53
altair processBlock - 250000 vs - 7PWei normalcase 9.2090 ms/op 8.4755 ms/op 1.09
altair processBlock - 250000 vs - 7PWei normalcase hashState 39.668 ms/op 33.145 ms/op 1.20
altair processBlock - 250000 vs - 7PWei worstcase 44.189 ms/op 36.089 ms/op 1.22
altair processBlock - 250000 vs - 7PWei worstcase hashState 105.25 ms/op 79.849 ms/op 1.32
phase0 processBlock - 250000 vs - 7PWei normalcase 2.8925 ms/op 2.5830 ms/op 1.12
phase0 processBlock - 250000 vs - 7PWei worstcase 31.234 ms/op 27.429 ms/op 1.14
altair processEth1Data - 250000 vs - 7PWei normalcase 524.23 us/op 380.20 us/op 1.38
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 15.095 us/op 10.784 us/op 1.40
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 57.689 us/op 46.181 us/op 1.25
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 29.604 us/op 17.702 us/op 1.67
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.3140 us/op 13.092 us/op 0.64
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 183.28 us/op 173.32 us/op 1.06
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.4979 ms/op 939.51 us/op 2.66
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.7534 ms/op 1.5439 ms/op 1.78
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.7901 ms/op 1.4320 ms/op 1.95
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.4990 ms/op 2.5264 ms/op 1.38
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2683 ms/op 2.1984 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.6415 ms/op 3.5885 ms/op 1.29
Tree 40 250000 create 354.04 ms/op 293.89 ms/op 1.20
Tree 40 250000 get(125000) 191.08 ns/op 112.83 ns/op 1.69
Tree 40 250000 set(125000) 983.93 ns/op 777.66 ns/op 1.27
Tree 40 250000 toArray() 18.297 ms/op 20.763 ms/op 0.88
Tree 40 250000 iterate all - toArray() + loop 18.388 ms/op 11.185 ms/op 1.64
Tree 40 250000 iterate all - get(i) 69.142 ms/op 48.869 ms/op 1.41
MutableVector 250000 create 18.100 ms/op 8.4395 ms/op 2.14
MutableVector 250000 get(125000) 6.5670 ns/op 6.0770 ns/op 1.08
MutableVector 250000 set(125000) 253.41 ns/op 272.31 ns/op 0.93
MutableVector 250000 toArray() 3.1098 ms/op 3.1450 ms/op 0.99
MutableVector 250000 iterate all - toArray() + loop 3.4416 ms/op 2.3390 ms/op 1.47
MutableVector 250000 iterate all - get(i) 1.5579 ms/op 1.3331 ms/op 1.17
Array 250000 create 2.9030 ms/op 2.5315 ms/op 1.15
Array 250000 clone - spread 1.2777 ms/op 1.1630 ms/op 1.10
Array 250000 get(125000) 1.0560 ns/op 1.0360 ns/op 1.02
Array 250000 set(125000) 4.1480 ns/op 1.2550 ns/op 3.31
Array 250000 iterate all - loop 168.27 us/op 158.29 us/op 1.06
effectiveBalanceIncrements clone Uint8Array 300000 27.029 us/op 14.548 us/op 1.86
effectiveBalanceIncrements clone MutableVector 300000 373.00 ns/op 403.00 ns/op 0.93
effectiveBalanceIncrements rw all Uint8Array 300000 203.38 us/op 187.15 us/op 1.09
effectiveBalanceIncrements rw all MutableVector 300000 84.320 ms/op 62.846 ms/op 1.34
phase0 afterProcessEpoch - 250000 vs - 7PWei 115.87 ms/op 77.246 ms/op 1.50
phase0 beforeProcessEpoch - 250000 vs - 7PWei 51.935 ms/op 33.808 ms/op 1.54
altair processEpoch - mainnet_e81889 542.67 ms/op 434.93 ms/op 1.25
mainnet_e81889 - altair beforeProcessEpoch 80.644 ms/op 73.883 ms/op 1.09
mainnet_e81889 - altair processJustificationAndFinalization 22.312 us/op 19.055 us/op 1.17
mainnet_e81889 - altair processInactivityUpdates 5.5643 ms/op 4.2335 ms/op 1.31
mainnet_e81889 - altair processRewardsAndPenalties 73.189 ms/op 57.498 ms/op 1.27
mainnet_e81889 - altair processRegistryUpdates 3.8110 us/op 3.2570 us/op 1.17
mainnet_e81889 - altair processSlashings 794.00 ns/op 1.0360 us/op 0.77
mainnet_e81889 - altair processEth1DataReset 899.00 ns/op 985.00 ns/op 0.91
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.5808 ms/op 1.0035 ms/op 2.57
mainnet_e81889 - altair processSlashingsReset 4.5700 us/op 4.4710 us/op 1.02
mainnet_e81889 - altair processRandaoMixesReset 7.3700 us/op 5.8480 us/op 1.26
mainnet_e81889 - altair processHistoricalRootsUpdate 1.4290 us/op 1.0290 us/op 1.39
mainnet_e81889 - altair processParticipationFlagUpdates 2.6910 us/op 2.8930 us/op 0.93
mainnet_e81889 - altair processSyncCommitteeUpdates 793.00 ns/op 1.0170 us/op 0.78
mainnet_e81889 - altair afterProcessEpoch 122.78 ms/op 84.825 ms/op 1.45
capella processEpoch - mainnet_e217614 2.1978 s/op 1.7560 s/op 1.25
mainnet_e217614 - capella beforeProcessEpoch 481.07 ms/op 387.88 ms/op 1.24
mainnet_e217614 - capella processJustificationAndFinalization 17.788 us/op 7.0120 us/op 2.54
mainnet_e217614 - capella processInactivityUpdates 19.038 ms/op 16.742 ms/op 1.14
mainnet_e217614 - capella processRewardsAndPenalties 559.78 ms/op 461.03 ms/op 1.21
mainnet_e217614 - capella processRegistryUpdates 33.890 us/op 20.778 us/op 1.63
mainnet_e217614 - capella processSlashings 976.00 ns/op 679.00 ns/op 1.44
mainnet_e217614 - capella processEth1DataReset 893.00 ns/op 611.00 ns/op 1.46
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.4802 ms/op 3.4500 ms/op 1.30
mainnet_e217614 - capella processSlashingsReset 3.8810 us/op 1.9930 us/op 1.95
mainnet_e217614 - capella processRandaoMixesReset 5.2630 us/op 3.5150 us/op 1.50
mainnet_e217614 - capella processHistoricalRootsUpdate 643.00 ns/op 572.00 ns/op 1.12
mainnet_e217614 - capella processParticipationFlagUpdates 2.2710 us/op 1.6460 us/op 1.38
mainnet_e217614 - capella afterProcessEpoch 348.14 ms/op 213.00 ms/op 1.63
phase0 processEpoch - mainnet_e58758 561.92 ms/op 361.74 ms/op 1.55
mainnet_e58758 - phase0 beforeProcessEpoch 142.92 ms/op 124.49 ms/op 1.15
mainnet_e58758 - phase0 processJustificationAndFinalization 25.280 us/op 11.938 us/op 2.12
mainnet_e58758 - phase0 processRewardsAndPenalties 76.891 ms/op 51.115 ms/op 1.50
mainnet_e58758 - phase0 processRegistryUpdates 11.210 us/op 6.4010 us/op 1.75
mainnet_e58758 - phase0 processSlashings 572.00 ns/op 617.00 ns/op 0.93
mainnet_e58758 - phase0 processEth1DataReset 601.00 ns/op 547.00 ns/op 1.10
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0722 ms/op 880.36 us/op 2.35
mainnet_e58758 - phase0 processSlashingsReset 3.1050 us/op 2.4690 us/op 1.26
mainnet_e58758 - phase0 processRandaoMixesReset 5.9220 us/op 2.9070 us/op 2.04
mainnet_e58758 - phase0 processHistoricalRootsUpdate 714.00 ns/op 519.00 ns/op 1.38
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.2050 us/op 3.3650 us/op 1.55
mainnet_e58758 - phase0 afterProcessEpoch 98.418 ms/op 65.205 ms/op 1.51
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3058 ms/op 991.60 us/op 1.32
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.6520 ms/op 1.1226 ms/op 2.36
altair processInactivityUpdates - 250000 normalcase 28.324 ms/op 16.574 ms/op 1.71
altair processInactivityUpdates - 250000 worstcase 27.112 ms/op 18.375 ms/op 1.48
phase0 processRegistryUpdates - 250000 normalcase 16.386 us/op 5.4020 us/op 3.03
phase0 processRegistryUpdates - 250000 badcase_full_deposits 683.49 us/op 348.06 us/op 1.96
phase0 processRegistryUpdates - 250000 worstcase 0.5 143.10 ms/op 105.99 ms/op 1.35
altair processRewardsAndPenalties - 250000 normalcase 92.672 ms/op 67.200 ms/op 1.38
altair processRewardsAndPenalties - 250000 worstcase 86.162 ms/op 64.456 ms/op 1.34
phase0 getAttestationDeltas - 250000 normalcase 8.7340 ms/op 5.5742 ms/op 1.57
phase0 getAttestationDeltas - 250000 worstcase 8.8292 ms/op 5.1119 ms/op 1.73
phase0 processSlashings - 250000 worstcase 2.3568 ms/op 1.5516 ms/op 1.52
altair processSyncCommitteeUpdates - 250000 153.33 ms/op 112.51 ms/op 1.36
BeaconState.hashTreeRoot - No change 256.00 ns/op 313.00 ns/op 0.82
BeaconState.hashTreeRoot - 1 full validator 130.98 us/op 138.40 us/op 0.95
BeaconState.hashTreeRoot - 32 full validator 1.6750 ms/op 1.1668 ms/op 1.44
BeaconState.hashTreeRoot - 512 full validator 20.614 ms/op 16.894 ms/op 1.22
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 182.54 us/op 106.30 us/op 1.72
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2782 ms/op 1.4698 ms/op 1.55
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.871 ms/op 19.708 ms/op 1.46
BeaconState.hashTreeRoot - 1 balances 128.04 us/op 91.520 us/op 1.40
BeaconState.hashTreeRoot - 32 balances 1.4177 ms/op 859.43 us/op 1.65
BeaconState.hashTreeRoot - 512 balances 14.260 ms/op 9.9996 ms/op 1.43
BeaconState.hashTreeRoot - 250000 balances 235.65 ms/op 193.97 ms/op 1.21
aggregationBits - 2048 els - zipIndexesInBitList 17.024 us/op 16.946 us/op 1.00
byteArrayEquals 32 74.286 ns/op 62.998 ns/op 1.18
Buffer.compare 32 55.794 ns/op 38.567 ns/op 1.45
byteArrayEquals 1024 2.0277 us/op 1.6782 us/op 1.21
Buffer.compare 1024 71.800 ns/op 45.343 ns/op 1.58
byteArrayEquals 16384 32.309 us/op 26.329 us/op 1.23
Buffer.compare 16384 257.44 ns/op 216.89 ns/op 1.19
byteArrayEquals 123687377 246.70 ms/op 214.82 ms/op 1.15
Buffer.compare 123687377 6.5697 ms/op 7.5090 ms/op 0.87
byteArrayEquals 32 - diff last byte 79.760 ns/op 68.630 ns/op 1.16
Buffer.compare 32 - diff last byte 57.696 ns/op 45.048 ns/op 1.28
byteArrayEquals 1024 - diff last byte 2.0678 us/op 1.7132 us/op 1.21
Buffer.compare 1024 - diff last byte 71.824 ns/op 45.591 ns/op 1.58
byteArrayEquals 16384 - diff last byte 32.943 us/op 27.095 us/op 1.22
Buffer.compare 16384 - diff last byte 256.06 ns/op 225.05 ns/op 1.14
byteArrayEquals 123687377 - diff last byte 253.58 ms/op 219.52 ms/op 1.16
Buffer.compare 123687377 - diff last byte 7.1966 ms/op 7.3654 ms/op 0.98
byteArrayEquals 32 - random bytes 5.3090 ns/op 5.5610 ns/op 0.95
Buffer.compare 32 - random bytes 61.829 ns/op 39.037 ns/op 1.58
byteArrayEquals 1024 - random bytes 5.3740 ns/op 5.8130 ns/op 0.92
Buffer.compare 1024 - random bytes 61.223 ns/op 38.284 ns/op 1.60
byteArrayEquals 16384 - random bytes 5.5430 ns/op 5.8640 ns/op 0.95
Buffer.compare 16384 - random bytes 61.623 ns/op 37.548 ns/op 1.64
byteArrayEquals 123687377 - random bytes 8.7200 ns/op 19.090 ns/op 0.46
Buffer.compare 123687377 - random bytes 65.720 ns/op 49.110 ns/op 1.34
regular array get 100000 times 46.033 us/op 43.738 us/op 1.05
wrappedArray get 100000 times 45.702 us/op 41.745 us/op 1.09
arrayWithProxy get 100000 times 15.079 ms/op 10.900 ms/op 1.38
ssz.Root.equals 54.568 ns/op 55.577 ns/op 0.98
byteArrayEquals 57.705 ns/op 54.777 ns/op 1.05
Buffer.compare 11.649 ns/op 10.403 ns/op 1.12
shuffle list - 16384 els 7.3192 ms/op 4.8334 ms/op 1.51
shuffle list - 250000 els 103.52 ms/op 71.351 ms/op 1.45
processSlot - 1 slots 20.841 us/op 15.697 us/op 1.33
processSlot - 32 slots 4.0693 ms/op 2.8431 ms/op 1.43
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 58.996 ms/op 49.134 ms/op 1.20
getCommitteeAssignments - req 1 vs - 250000 vc 2.5470 ms/op 2.1878 ms/op 1.16
getCommitteeAssignments - req 100 vs - 250000 vc 3.7323 ms/op 3.6931 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0987 ms/op 3.7812 ms/op 1.08
findModifiedValidators - 10000 modified validators 538.43 ms/op 492.69 ms/op 1.09
findModifiedValidators - 1000 modified validators 407.88 ms/op 350.93 ms/op 1.16
findModifiedValidators - 100 modified validators 439.79 ms/op 351.96 ms/op 1.25
findModifiedValidators - 10 modified validators 429.15 ms/op 320.67 ms/op 1.34
findModifiedValidators - 1 modified validators 391.40 ms/op 321.48 ms/op 1.22
findModifiedValidators - no difference 367.14 ms/op 308.34 ms/op 1.19
compare ViewDUs 5.0268 s/op 4.1643 s/op 1.21
compare each validator Uint8Array 1.6891 s/op 1.4691 s/op 1.15
compare ViewDU to Uint8Array 1.0984 s/op 1.0421 s/op 1.05
migrate state 1000000 validators, 24 modified, 0 new 896.86 ms/op 754.71 ms/op 1.19
migrate state 1000000 validators, 1700 modified, 1000 new 1.2143 s/op 994.20 ms/op 1.22
migrate state 1000000 validators, 3400 modified, 2000 new 1.4810 s/op 1.2467 s/op 1.19
migrate state 1500000 validators, 24 modified, 0 new 909.09 ms/op 663.06 ms/op 1.37
migrate state 1500000 validators, 1700 modified, 1000 new 1.2294 s/op 949.23 ms/op 1.30
migrate state 1500000 validators, 3400 modified, 2000 new 1.4899 s/op 1.0932 s/op 1.36
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2800 ns/op 4.0100 ns/op 1.07
state getBlockRootAtSlot - 250000 vs - 7PWei 867.84 ns/op 935.17 ns/op 0.93
computeProposers - vc 250000 9.6615 ms/op 6.8803 ms/op 1.40
computeEpochShuffling - vc 250000 103.24 ms/op 69.861 ms/op 1.48
getNextSyncCommittee - vc 250000 152.43 ms/op 114.48 ms/op 1.33
computeSigningRoot for AttestationData 27.259 us/op 30.474 us/op 0.89
hash AttestationData serialized data then Buffer.toString(base64) 2.2882 us/op 1.2555 us/op 1.82
toHexString serialized data 1.0855 us/op 867.84 ns/op 1.25
Buffer.toString(base64) 222.84 ns/op 157.25 ns/op 1.42

by benchmarkbot/action

Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

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

Does this ensure that we pick the most profitable AttesterSlashing messages?

@wemeetagain wemeetagain merged commit 691fbc0 into unstable Dec 1, 2023
15 checks passed
@wemeetagain wemeetagain deleted the tuyen/bound_attester_slashings_in_block branch December 1, 2023 19:02
@wemeetagain
Copy link
Member

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

Failed to produce block - Invalid list length 8 over limit 2
3 participants