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: handle electra attester slashing #7397

Merged
merged 11 commits into from
Jan 30, 2025
Merged

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Jan 25, 2025

Update various places to handle electra attester slashing type:

  • AttesterSlashingRepository
  • submitPoolAttesterSlashingsV2
  • opPool
  • GossipType
  • processAttesterSlashing

@ensi321 ensi321 requested a review from a team as a code owner January 25, 2025 03:10
Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

Good reminder to review open electra todos, I pushed some minor updates. Only a question regarding the db changes which seem unnecessary to me.

@nflaig nflaig added this to the v1.26.0 milestone Jan 25, 2025
Copy link

codecov bot commented Jan 25, 2025

Codecov Report

Attention: Patch coverage is 41.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 48.44%. Comparing base (cf1ecbb) to head (628424f).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7397   +/-   ##
=========================================
  Coverage     48.44%   48.44%           
=========================================
  Files           602      602           
  Lines         40407    40408    +1     
  Branches       2068     2069    +1     
=========================================
+ Hits          19576    19577    +1     
  Misses        20793    20793           
  Partials         38       38           

@ensi321 ensi321 requested a review from nflaig January 29, 2025 22:08
Copy link
Contributor

github-actions bot commented Jan 29, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: f8cdf9b Previous: 1748e2e Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.6687 ms/op 1.5653 ms/op 1.07
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 38.129 us/op 31.954 us/op 1.19
BLS verify - blst 820.58 us/op 874.19 us/op 0.94
BLS verifyMultipleSignatures 3 - blst 1.1951 ms/op 1.3144 ms/op 0.91
BLS verifyMultipleSignatures 8 - blst 1.6171 ms/op 2.1034 ms/op 0.77
BLS verifyMultipleSignatures 32 - blst 4.7950 ms/op 4.4426 ms/op 1.08
BLS verifyMultipleSignatures 64 - blst 8.8321 ms/op 8.3587 ms/op 1.06
BLS verifyMultipleSignatures 128 - blst 16.869 ms/op 16.105 ms/op 1.05
BLS deserializing 10000 signatures 679.70 ms/op 628.11 ms/op 1.08
BLS deserializing 100000 signatures 6.9411 s/op 6.2019 s/op 1.12
BLS verifyMultipleSignatures - same message - 3 - blst 996.67 us/op 945.55 us/op 1.05
BLS verifyMultipleSignatures - same message - 8 - blst 1.0296 ms/op 1.1198 ms/op 0.92
BLS verifyMultipleSignatures - same message - 32 - blst 1.7077 ms/op 1.7039 ms/op 1.00
BLS verifyMultipleSignatures - same message - 64 - blst 2.6048 ms/op 2.5471 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.3777 ms/op 4.1285 ms/op 1.06
BLS aggregatePubkeys 32 - blst 20.101 us/op 17.859 us/op 1.13
BLS aggregatePubkeys 128 - blst 70.387 us/op 62.801 us/op 1.12
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 50.739 ms/op 37.035 ms/op 1.37
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 47.921 ms/op 37.842 ms/op 1.27
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 39.190 ms/op 42.843 ms/op 0.91
getSlashingsAndExits - default max 73.211 us/op 61.673 us/op 1.19
getSlashingsAndExits - 2k 355.43 us/op 278.99 us/op 1.27
proposeBlockBody type=full, size=empty 4.9971 ms/op 4.9624 ms/op 1.01
isKnown best case - 1 super set check 280.00 ns/op 468.00 ns/op 0.60
isKnown normal case - 2 super set checks 260.00 ns/op 443.00 ns/op 0.59
isKnown worse case - 16 super set checks 259.00 ns/op 434.00 ns/op 0.60
InMemoryCheckpointStateCache - add get delete 2.9570 us/op 2.7750 us/op 1.07
validate api signedAggregateAndProof - struct 1.3557 ms/op 1.4030 ms/op 0.97
validate gossip signedAggregateAndProof - struct 1.3311 ms/op 1.4704 ms/op 0.91
batch validate gossip attestation - vc 640000 - chunk 32 117.98 us/op 125.13 us/op 0.94
batch validate gossip attestation - vc 640000 - chunk 64 104.47 us/op 106.23 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 128 108.17 us/op 99.264 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 103.62 us/op 97.643 us/op 1.06
pickEth1Vote - no votes 1.0471 ms/op 832.14 us/op 1.26
pickEth1Vote - max votes 6.5103 ms/op 5.2119 ms/op 1.25
pickEth1Vote - Eth1Data hashTreeRoot value x2048 18.895 ms/op 11.377 ms/op 1.66
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.181 ms/op 18.812 ms/op 1.18
pickEth1Vote - Eth1Data fastSerialize value x2048 498.85 us/op 366.19 us/op 1.36
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.6110 ms/op 2.7871 ms/op 1.30
bytes32 toHexString 464.00 ns/op 691.00 ns/op 0.67
bytes32 Buffer.toString(hex) 243.00 ns/op 434.00 ns/op 0.56
bytes32 Buffer.toString(hex) from Uint8Array 410.00 ns/op 564.00 ns/op 0.73
bytes32 Buffer.toString(hex) + 0x 244.00 ns/op 426.00 ns/op 0.57
Object access 1 prop 0.14700 ns/op 0.32100 ns/op 0.46
Map access 1 prop 0.13300 ns/op 0.33500 ns/op 0.40
Object get x1000 5.9520 ns/op 5.2070 ns/op 1.14
Map get x1000 6.8330 ns/op 5.9370 ns/op 1.15
Object set x1000 35.097 ns/op 22.977 ns/op 1.53
Map set x1000 22.814 ns/op 18.868 ns/op 1.21
Return object 10000 times 0.29210 ns/op 0.30160 ns/op 0.97
Throw Error 10000 times 3.3896 us/op 2.6614 us/op 1.27
toHex 142.36 ns/op 110.21 ns/op 1.29
Buffer.from 145.23 ns/op 103.00 ns/op 1.41
shared Buffer 87.084 ns/op 70.305 ns/op 1.24
fastMsgIdFn sha256 / 200 bytes 2.3310 us/op 2.0490 us/op 1.14
fastMsgIdFn h32 xxhash / 200 bytes 230.00 ns/op 411.00 ns/op 0.56
fastMsgIdFn h64 xxhash / 200 bytes 270.00 ns/op 439.00 ns/op 0.62
fastMsgIdFn sha256 / 1000 bytes 7.4600 us/op 5.9500 us/op 1.25
fastMsgIdFn h32 xxhash / 1000 bytes 372.00 ns/op 535.00 ns/op 0.70
fastMsgIdFn h64 xxhash / 1000 bytes 348.00 ns/op 518.00 ns/op 0.67
fastMsgIdFn sha256 / 10000 bytes 65.480 us/op 49.603 us/op 1.32
fastMsgIdFn h32 xxhash / 10000 bytes 1.8810 us/op 1.9370 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 1.2440 us/op 1.3510 us/op 0.92
send data - 1000 256B messages 12.489 ms/op 11.504 ms/op 1.09
send data - 1000 512B messages 18.283 ms/op 17.497 ms/op 1.04
send data - 1000 1024B messages 28.475 ms/op 20.886 ms/op 1.36
send data - 1000 1200B messages 25.349 ms/op 24.969 ms/op 1.02
send data - 1000 2048B messages 31.102 ms/op 29.938 ms/op 1.04
send data - 1000 4096B messages 27.880 ms/op 25.568 ms/op 1.09
send data - 1000 16384B messages 70.164 ms/op 66.691 ms/op 1.05
send data - 1000 65536B messages 200.60 ms/op 230.88 ms/op 0.87
enrSubnets - fastDeserialize 64 bits 1.0070 us/op 1.1130 us/op 0.90
enrSubnets - ssz BitVector 64 bits 349.00 ns/op 499.00 ns/op 0.70
enrSubnets - fastDeserialize 4 bits 145.00 ns/op 344.00 ns/op 0.42
enrSubnets - ssz BitVector 4 bits 344.00 ns/op 518.00 ns/op 0.66
prioritizePeers score -10:0 att 32-0.1 sync 2-0 136.05 us/op 109.87 us/op 1.24
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 170.07 us/op 130.90 us/op 1.30
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 225.97 us/op 196.67 us/op 1.15
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 405.20 us/op 346.81 us/op 1.17
prioritizePeers score 0:0 att 64-1 sync 4-1 497.92 us/op 395.90 us/op 1.26
array of 16000 items push then shift 1.5949 us/op 1.2170 us/op 1.31
LinkedList of 16000 items push then shift 6.9240 ns/op 7.1550 ns/op 0.97
array of 16000 items push then pop 105.42 ns/op 104.32 ns/op 1.01
LinkedList of 16000 items push then pop 6.8520 ns/op 6.3070 ns/op 1.09
array of 24000 items push then shift 2.3935 us/op 1.9218 us/op 1.25
LinkedList of 24000 items push then shift 7.2280 ns/op 6.3320 ns/op 1.14
array of 24000 items push then pop 137.40 ns/op 106.94 ns/op 1.28
LinkedList of 24000 items push then pop 6.8780 ns/op 6.4680 ns/op 1.06
intersect bitArray bitLen 8 6.3770 ns/op 5.4720 ns/op 1.17
intersect array and set length 8 43.128 ns/op 37.481 ns/op 1.15
intersect bitArray bitLen 128 29.955 ns/op 26.592 ns/op 1.13
intersect array and set length 128 648.49 ns/op 571.67 ns/op 1.13
bitArray.getTrueBitIndexes() bitLen 128 1.3150 us/op 1.4100 us/op 0.93
bitArray.getTrueBitIndexes() bitLen 248 2.0450 us/op 2.1180 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 512 4.0070 us/op 3.7720 us/op 1.06
Buffer.concat 32 items 822.00 ns/op 886.00 ns/op 0.93
Uint8Array.set 32 items 2.1100 us/op 1.6620 us/op 1.27
Buffer.copy 2.8380 us/op 2.3940 us/op 1.19
Uint8Array.set - with subarray 2.7730 us/op 2.3630 us/op 1.17
Uint8Array.set - without subarray 2.0800 us/op 1.7300 us/op 1.20
getUint32 - dataview 223.00 ns/op 417.00 ns/op 0.53
getUint32 - manual 141.00 ns/op 336.00 ns/op 0.42
Set add up to 64 items then delete first 2.1420 us/op 1.7610 us/op 1.22
OrderedSet add up to 64 items then delete first 3.1556 us/op 2.7222 us/op 1.16
Set add up to 64 items then delete last 2.4509 us/op 2.0246 us/op 1.21
OrderedSet add up to 64 items then delete last 3.5776 us/op 3.0132 us/op 1.19
Set add up to 64 items then delete middle 2.5099 us/op 2.0250 us/op 1.24
OrderedSet add up to 64 items then delete middle 5.1245 us/op 4.6284 us/op 1.11
Set add up to 128 items then delete first 5.0184 us/op 4.0406 us/op 1.24
OrderedSet add up to 128 items then delete first 7.6344 us/op 6.6739 us/op 1.14
Set add up to 128 items then delete last 4.9317 us/op 3.7815 us/op 1.30
OrderedSet add up to 128 items then delete last 7.2494 us/op 5.5609 us/op 1.30
Set add up to 128 items then delete middle 4.7829 us/op 3.7100 us/op 1.29
OrderedSet add up to 128 items then delete middle 13.403 us/op 12.261 us/op 1.09
Set add up to 256 items then delete first 10.328 us/op 7.7349 us/op 1.34
OrderedSet add up to 256 items then delete first 15.792 us/op 12.606 us/op 1.25
Set add up to 256 items then delete last 9.7865 us/op 7.3554 us/op 1.33
OrderedSet add up to 256 items then delete last 15.210 us/op 12.072 us/op 1.26
Set add up to 256 items then delete middle 9.7194 us/op 7.4141 us/op 1.31
OrderedSet add up to 256 items then delete middle 41.218 us/op 34.889 us/op 1.18
transfer serialized Status (84 B) 2.6910 us/op 2.4040 us/op 1.12
copy serialized Status (84 B) 1.4800 us/op 1.4050 us/op 1.05
transfer serialized SignedVoluntaryExit (112 B) 2.9800 us/op 2.4860 us/op 1.20
copy serialized SignedVoluntaryExit (112 B) 1.5880 us/op 1.4910 us/op 1.07
transfer serialized ProposerSlashing (416 B) 3.4080 us/op 2.6270 us/op 1.30
copy serialized ProposerSlashing (416 B) 1.7740 us/op 2.6280 us/op 0.68
transfer serialized Attestation (485 B) 2.5790 us/op 3.2590 us/op 0.79
copy serialized Attestation (485 B) 1.4160 us/op 2.6850 us/op 0.53
transfer serialized AttesterSlashing (33232 B) 2.4790 us/op 3.2690 us/op 0.76
copy serialized AttesterSlashing (33232 B) 4.2150 us/op 5.3270 us/op 0.79
transfer serialized Small SignedBeaconBlock (128000 B) 3.2470 us/op 3.5940 us/op 0.90
copy serialized Small SignedBeaconBlock (128000 B) 12.805 us/op 9.6160 us/op 1.33
transfer serialized Avg SignedBeaconBlock (200000 B) 4.1860 us/op 3.7990 us/op 1.10
copy serialized Avg SignedBeaconBlock (200000 B) 18.951 us/op 12.479 us/op 1.52
transfer serialized BlobsSidecar (524380 B) 3.6820 us/op 3.9350 us/op 0.94
copy serialized BlobsSidecar (524380 B) 85.303 us/op 68.446 us/op 1.25
transfer serialized Big SignedBeaconBlock (1000000 B) 3.8830 us/op 4.3800 us/op 0.89
copy serialized Big SignedBeaconBlock (1000000 B) 369.70 us/op 127.23 us/op 2.91
pass gossip attestations to forkchoice per slot 2.6737 ms/op 2.3499 ms/op 1.14
forkChoice updateHead vc 100000 bc 64 eq 0 434.22 us/op 380.96 us/op 1.14
forkChoice updateHead vc 600000 bc 64 eq 0 3.1732 ms/op 2.3445 ms/op 1.35
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7000 ms/op 3.8599 ms/op 1.22
forkChoice updateHead vc 600000 bc 320 eq 0 2.6663 ms/op 2.3089 ms/op 1.15
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8726 ms/op 2.2048 ms/op 1.30
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2023 ms/op 2.4808 ms/op 1.29
forkChoice updateHead vc 600000 bc 64 eq 1000 10.169 ms/op 9.4506 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 10000 10.216 ms/op 9.3398 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 300000 12.593 ms/op 11.232 ms/op 1.12
computeDeltas 500000 validators 300 proto nodes 3.9336 ms/op 3.2276 ms/op 1.22
computeDeltas 500000 validators 1200 proto nodes 3.9856 ms/op 3.1948 ms/op 1.25
computeDeltas 500000 validators 7200 proto nodes 3.9645 ms/op 3.1732 ms/op 1.25
computeDeltas 750000 validators 300 proto nodes 5.9850 ms/op 4.8530 ms/op 1.23
computeDeltas 750000 validators 1200 proto nodes 6.1789 ms/op 4.8287 ms/op 1.28
computeDeltas 750000 validators 7200 proto nodes 6.2061 ms/op 4.8821 ms/op 1.27
computeDeltas 1400000 validators 300 proto nodes 11.632 ms/op 8.9087 ms/op 1.31
computeDeltas 1400000 validators 1200 proto nodes 11.891 ms/op 8.9118 ms/op 1.33
computeDeltas 1400000 validators 7200 proto nodes 13.427 ms/op 8.6853 ms/op 1.55
computeDeltas 2100000 validators 300 proto nodes 18.584 ms/op 13.195 ms/op 1.41
computeDeltas 2100000 validators 1200 proto nodes 17.824 ms/op 13.240 ms/op 1.35
computeDeltas 2100000 validators 7200 proto nodes 18.044 ms/op 13.129 ms/op 1.37
altair processAttestation - 250000 vs - 7PWei normalcase 2.6712 ms/op 1.5966 ms/op 1.67
altair processAttestation - 250000 vs - 7PWei worstcase 3.9578 ms/op 2.3780 ms/op 1.66
altair processAttestation - setStatus - 1/6 committees join 148.35 us/op 89.289 us/op 1.66
altair processAttestation - setStatus - 1/3 committees join 271.93 us/op 160.75 us/op 1.69
altair processAttestation - setStatus - 1/2 committees join 347.23 us/op 242.07 us/op 1.43
altair processAttestation - setStatus - 2/3 committees join 455.05 us/op 323.82 us/op 1.41
altair processAttestation - setStatus - 4/5 committees join 626.87 us/op 455.37 us/op 1.38
altair processAttestation - setStatus - 100% committees join 759.04 us/op 541.69 us/op 1.40
altair processBlock - 250000 vs - 7PWei normalcase 6.2896 ms/op 4.9124 ms/op 1.28
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.281 ms/op 27.527 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase 37.301 ms/op 35.410 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase hashState 86.395 ms/op 73.272 ms/op 1.18
phase0 processBlock - 250000 vs - 7PWei normalcase 2.6689 ms/op 2.1014 ms/op 1.27
phase0 processBlock - 250000 vs - 7PWei worstcase 26.263 ms/op 24.022 ms/op 1.09
altair processEth1Data - 250000 vs - 7PWei normalcase 616.09 us/op 325.26 us/op 1.89
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.2790 us/op 7.2550 us/op 0.87
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 41.677 us/op 14.328 us/op 2.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 13.933 us/op 8.0660 us/op 1.73
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.6900 us/op 7.4020 us/op 0.90
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 161.72 us/op 114.56 us/op 1.41
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 990.14 us/op 1.2485 ms/op 0.79
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4156 ms/op 1.0865 ms/op 1.30
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4771 ms/op 1.0957 ms/op 1.35
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6024 ms/op 2.3358 ms/op 1.54
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4302 ms/op 975.85 us/op 1.47
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.5733 ms/op 2.6651 ms/op 1.34
Tree 40 250000 create 561.78 ms/op 320.26 ms/op 1.75
Tree 40 250000 get(125000) 159.53 ns/op 120.44 ns/op 1.32
Tree 40 250000 set(125000) 1.7390 us/op 1.1879 us/op 1.46
Tree 40 250000 toArray() 21.127 ms/op 12.682 ms/op 1.67
Tree 40 250000 iterate all - toArray() + loop 21.322 ms/op 15.520 ms/op 1.37
Tree 40 250000 iterate all - get(i) 58.819 ms/op 37.881 ms/op 1.55
Array 250000 create 3.8314 ms/op 2.4775 ms/op 1.55
Array 250000 clone - spread 1.7172 ms/op 1.2589 ms/op 1.36
Array 250000 get(125000) 0.45100 ns/op 0.55300 ns/op 0.82
Array 250000 set(125000) 0.47200 ns/op 0.57700 ns/op 0.82
Array 250000 iterate all - loop 87.624 us/op 76.344 us/op 1.15
phase0 afterProcessEpoch - 250000 vs - 7PWei 53.884 ms/op 40.932 ms/op 1.32
Array.fill - length 1000000 3.6380 ms/op 2.5310 ms/op 1.44
Array push - length 1000000 21.159 ms/op 14.168 ms/op 1.49
Array.get 0.28606 ns/op 0.25216 ns/op 1.13
Uint8Array.get 0.46335 ns/op 0.31755 ns/op 1.46
phase0 beforeProcessEpoch - 250000 vs - 7PWei 21.244 ms/op 15.203 ms/op 1.40
altair processEpoch - mainnet_e81889 355.78 ms/op 283.03 ms/op 1.26
mainnet_e81889 - altair beforeProcessEpoch 21.614 ms/op 15.199 ms/op 1.42
mainnet_e81889 - altair processJustificationAndFinalization 16.590 us/op 13.387 us/op 1.24
mainnet_e81889 - altair processInactivityUpdates 5.9904 ms/op 3.5587 ms/op 1.68
mainnet_e81889 - altair processRewardsAndPenalties 40.640 ms/op 49.105 ms/op 0.83
mainnet_e81889 - altair processRegistryUpdates 2.4880 us/op 2.1800 us/op 1.14
mainnet_e81889 - altair processSlashings 593.00 ns/op 811.00 ns/op 0.73
mainnet_e81889 - altair processEth1DataReset 820.00 ns/op 894.00 ns/op 0.92
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4401 ms/op 1.6211 ms/op 0.89
mainnet_e81889 - altair processSlashingsReset 5.2070 us/op 2.6420 us/op 1.97
mainnet_e81889 - altair processRandaoMixesReset 4.7090 us/op 3.3400 us/op 1.41
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0660 us/op 883.00 ns/op 1.21
mainnet_e81889 - altair processParticipationFlagUpdates 1.8860 us/op 1.9310 us/op 0.98
mainnet_e81889 - altair processSyncCommitteeUpdates 1.1500 us/op 819.00 ns/op 1.40
mainnet_e81889 - altair afterProcessEpoch 53.569 ms/op 43.173 ms/op 1.24
capella processEpoch - mainnet_e217614 1.1553 s/op 978.93 ms/op 1.18
mainnet_e217614 - capella beforeProcessEpoch 76.679 ms/op 63.911 ms/op 1.20
mainnet_e217614 - capella processJustificationAndFinalization 28.492 us/op 10.345 us/op 2.75
mainnet_e217614 - capella processInactivityUpdates 18.433 ms/op 12.624 ms/op 1.46
mainnet_e217614 - capella processRewardsAndPenalties 230.20 ms/op 247.84 ms/op 0.93
mainnet_e217614 - capella processRegistryUpdates 14.457 us/op 11.037 us/op 1.31
mainnet_e217614 - capella processSlashings 629.00 ns/op 855.00 ns/op 0.74
mainnet_e217614 - capella processEth1DataReset 466.00 ns/op 820.00 ns/op 0.57
mainnet_e217614 - capella processEffectiveBalanceUpdates 19.565 ms/op 3.5293 ms/op 5.54
mainnet_e217614 - capella processSlashingsReset 3.9870 us/op 1.4820 us/op 2.69
mainnet_e217614 - capella processRandaoMixesReset 5.0900 us/op 3.4940 us/op 1.46
mainnet_e217614 - capella processHistoricalRootsUpdate 637.00 ns/op 758.00 ns/op 0.84
mainnet_e217614 - capella processParticipationFlagUpdates 2.6070 us/op 1.4140 us/op 1.84
mainnet_e217614 - capella afterProcessEpoch 125.11 ms/op 102.03 ms/op 1.23
phase0 processEpoch - mainnet_e58758 429.13 ms/op 311.00 ms/op 1.38
mainnet_e58758 - phase0 beforeProcessEpoch 101.53 ms/op 74.847 ms/op 1.36
mainnet_e58758 - phase0 processJustificationAndFinalization 15.423 us/op 12.726 us/op 1.21
mainnet_e58758 - phase0 processRewardsAndPenalties 22.497 ms/op 30.333 ms/op 0.74
mainnet_e58758 - phase0 processRegistryUpdates 7.7480 us/op 6.9070 us/op 1.12
mainnet_e58758 - phase0 processSlashings 1.0290 us/op 944.00 ns/op 1.09
mainnet_e58758 - phase0 processEth1DataReset 1.0980 us/op 816.00 ns/op 1.35
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2038 ms/op 1.3356 ms/op 0.90
mainnet_e58758 - phase0 processSlashingsReset 3.3200 us/op 2.3740 us/op 1.40
mainnet_e58758 - phase0 processRandaoMixesReset 4.5490 us/op 3.6040 us/op 1.26
mainnet_e58758 - phase0 processHistoricalRootsUpdate 447.00 ns/op 817.00 ns/op 0.55
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.8560 us/op 3.3550 us/op 1.15
mainnet_e58758 - phase0 afterProcessEpoch 44.713 ms/op 35.321 ms/op 1.27
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3955 ms/op 911.91 us/op 1.53
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9984 ms/op 1.2086 ms/op 1.65
altair processInactivityUpdates - 250000 normalcase 17.990 ms/op 15.697 ms/op 1.15
altair processInactivityUpdates - 250000 worstcase 16.065 ms/op 16.515 ms/op 0.97
phase0 processRegistryUpdates - 250000 normalcase 6.1180 us/op 2.6820 us/op 2.28
phase0 processRegistryUpdates - 250000 badcase_full_deposits 277.51 us/op 285.47 us/op 0.97
phase0 processRegistryUpdates - 250000 worstcase 0.5 110.60 ms/op 94.361 ms/op 1.17
altair processRewardsAndPenalties - 250000 normalcase 38.320 ms/op 49.404 ms/op 0.78
altair processRewardsAndPenalties - 250000 worstcase 40.496 ms/op 40.183 ms/op 1.01
phase0 getAttestationDeltas - 250000 normalcase 7.1864 ms/op 4.7672 ms/op 1.51
phase0 getAttestationDeltas - 250000 worstcase 6.8077 ms/op 5.0448 ms/op 1.35
phase0 processSlashings - 250000 worstcase 114.21 us/op 83.007 us/op 1.38
altair processSyncCommitteeUpdates - 250000 139.09 ms/op 92.327 ms/op 1.51
BeaconState.hashTreeRoot - No change 252.00 ns/op 448.00 ns/op 0.56
BeaconState.hashTreeRoot - 1 full validator 103.75 us/op 99.307 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 1.0424 ms/op 1.4092 ms/op 0.74
BeaconState.hashTreeRoot - 512 full validator 10.661 ms/op 11.187 ms/op 0.95
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 126.77 us/op 146.09 us/op 0.87
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6833 ms/op 1.8672 ms/op 0.90
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 21.593 ms/op 23.627 ms/op 0.91
BeaconState.hashTreeRoot - 1 balances 109.43 us/op 121.32 us/op 0.90
BeaconState.hashTreeRoot - 32 balances 971.08 us/op 1.2942 ms/op 0.75
BeaconState.hashTreeRoot - 512 balances 7.7446 ms/op 7.4127 ms/op 1.04
BeaconState.hashTreeRoot - 250000 balances 199.53 ms/op 175.21 ms/op 1.14
aggregationBits - 2048 els - zipIndexesInBitList 29.855 us/op 19.821 us/op 1.51
byteArrayEquals 32 55.294 ns/op 44.536 ns/op 1.24
Buffer.compare 32 17.204 ns/op 14.226 ns/op 1.21
byteArrayEquals 1024 1.6313 us/op 1.1549 us/op 1.41
Buffer.compare 1024 25.251 ns/op 22.023 ns/op 1.15
byteArrayEquals 16384 25.928 us/op 18.358 us/op 1.41
Buffer.compare 16384 207.88 ns/op 189.01 ns/op 1.10
byteArrayEquals 123687377 194.78 ms/op 138.78 ms/op 1.40
Buffer.compare 123687377 8.1734 ms/op 5.3418 ms/op 1.53
byteArrayEquals 32 - diff last byte 52.424 ns/op 43.629 ns/op 1.20
Buffer.compare 32 - diff last byte 17.114 ns/op 14.517 ns/op 1.18
byteArrayEquals 1024 - diff last byte 1.5868 us/op 1.1536 us/op 1.38
Buffer.compare 1024 - diff last byte 26.973 ns/op 22.181 ns/op 1.22
byteArrayEquals 16384 - diff last byte 25.399 us/op 18.503 us/op 1.37
Buffer.compare 16384 - diff last byte 202.97 ns/op 174.71 ns/op 1.16
byteArrayEquals 123687377 - diff last byte 194.45 ms/op 141.80 ms/op 1.37
Buffer.compare 123687377 - diff last byte 8.0083 ms/op 4.0957 ms/op 1.96
byteArrayEquals 32 - random bytes 5.2900 ns/op 4.9130 ns/op 1.08
Buffer.compare 32 - random bytes 17.578 ns/op 16.298 ns/op 1.08
byteArrayEquals 1024 - random bytes 5.3680 ns/op 4.9840 ns/op 1.08
Buffer.compare 1024 - random bytes 17.634 ns/op 15.802 ns/op 1.12
byteArrayEquals 16384 - random bytes 5.3300 ns/op 4.9480 ns/op 1.08
Buffer.compare 16384 - random bytes 17.613 ns/op 15.773 ns/op 1.12
byteArrayEquals 123687377 - random bytes 6.5400 ns/op 7.8900 ns/op 0.83
Buffer.compare 123687377 - random bytes 18.820 ns/op 18.770 ns/op 1.00
regular array get 100000 times 33.390 us/op 29.854 us/op 1.12
wrappedArray get 100000 times 33.532 us/op 29.742 us/op 1.13
arrayWithProxy get 100000 times 12.823 ms/op 9.3537 ms/op 1.37
ssz.Root.equals 46.970 ns/op 43.084 ns/op 1.09
byteArrayEquals 45.994 ns/op 41.808 ns/op 1.10
Buffer.compare 10.676 ns/op 8.7040 ns/op 1.23
processSlot - 1 slots 13.353 us/op 10.923 us/op 1.22
processSlot - 32 slots 2.4850 ms/op 2.4367 ms/op 1.02
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.271 ms/op 40.229 ms/op 0.90
getCommitteeAssignments - req 1 vs - 250000 vc 2.1683 ms/op 1.7251 ms/op 1.26
getCommitteeAssignments - req 100 vs - 250000 vc 4.2042 ms/op 3.4071 ms/op 1.23
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5364 ms/op 3.6537 ms/op 1.24
findModifiedValidators - 10000 modified validators 305.79 ms/op 229.13 ms/op 1.33
findModifiedValidators - 1000 modified validators 179.09 ms/op 133.76 ms/op 1.34
findModifiedValidators - 100 modified validators 223.35 ms/op 142.87 ms/op 1.56
findModifiedValidators - 10 modified validators 185.12 ms/op 130.18 ms/op 1.42
findModifiedValidators - 1 modified validators 178.93 ms/op 121.63 ms/op 1.47
findModifiedValidators - no difference 203.00 ms/op 152.00 ms/op 1.34
compare ViewDUs 3.3714 s/op 3.3439 s/op 1.01
compare each validator Uint8Array 1.1467 s/op 1.6096 s/op 0.71
compare ViewDU to Uint8Array 1.1378 s/op 639.98 ms/op 1.78
migrate state 1000000 validators, 24 modified, 0 new 800.79 ms/op 657.74 ms/op 1.22
migrate state 1000000 validators, 1700 modified, 1000 new 974.56 ms/op 905.18 ms/op 1.08
migrate state 1000000 validators, 3400 modified, 2000 new 1.1353 s/op 1.0738 s/op 1.06
migrate state 1500000 validators, 24 modified, 0 new 761.90 ms/op 738.77 ms/op 1.03
migrate state 1500000 validators, 1700 modified, 1000 new 1.0127 s/op 939.29 ms/op 1.08
migrate state 1500000 validators, 3400 modified, 2000 new 1.1444 s/op 1.1154 s/op 1.03
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.2300 ns/op 6.2100 ns/op 0.84
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0758 us/op 1.0431 us/op 1.03
computeProposers - vc 250000 8.1125 ms/op 6.6853 ms/op 1.21
computeEpochShuffling - vc 250000 42.629 ms/op 34.647 ms/op 1.23
getNextSyncCommittee - vc 250000 138.26 ms/op 111.45 ms/op 1.24
computeSigningRoot for AttestationData 21.766 us/op 28.617 us/op 0.76
hash AttestationData serialized data then Buffer.toString(base64) 1.6099 us/op 1.1232 us/op 1.43
toHexString serialized data 904.53 ns/op 728.97 ns/op 1.24
Buffer.toString(base64) 188.56 ns/op 131.85 ns/op 1.43
nodejs block root to RootHex using toHex 149.08 ns/op 103.30 ns/op 1.44
nodejs block root to RootHex using toRootHex 92.853 ns/op 66.677 ns/op 1.39
browser block root to RootHex using the deprecated toHexString 230.01 ns/op 195.38 ns/op 1.18
browser block root to RootHex using toHex 190.13 ns/op 155.97 ns/op 1.22
browser block root to RootHex using toRootHex 162.76 ns/op 137.94 ns/op 1.18

by benchmarkbot/action

Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

LGTM

@nflaig nflaig merged commit 78a5e72 into unstable Jan 30, 2025
20 checks passed
@nflaig nflaig deleted the nc/electra-attester-slashing branch January 30, 2025 13:40
@wemeetagain
Copy link
Member

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

3 participants