Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

refactor: remove beaconAttestationBatchValidation flag #7129

Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Oct 7, 2024

Motivation

  • beaconAttestationBatchValidation was created at the 1st release of batch attestation validation, and its performance is great compared to sequential attestation validation since then
  • handling this flag takes us more time to maintain gossip attestation validation, for example:
    • we don't run the sequential attestation validation anymore but still have to maintain it
    • we always have attDataBase64 through our queue but still need to handle its null value

Description

  • remove beaconAttestationBatchValidation
  • better typing for SequentialGossipHandlers vs BatchGossipHandlers
  • clean up unused code due to that

prerequisite for #7126
cc @ensi321 @nflaig

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 49.11%. Comparing base (0d1fd9c) to head (0571fd5).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7129      +/-   ##
============================================
+ Coverage     49.04%   49.11%   +0.06%     
============================================
  Files           596      596              
  Lines         39743    39662      -81     
  Branches       2065     2062       -3     
============================================
- Hits          19493    19480      -13     
+ Misses        20209    20141      -68     
  Partials         41       41              

@twoeths twoeths changed the title chore: remove beaconAttestationBatchValidation flag refactor: remove beaconAttestationBatchValidation flag Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: e7a9a3a Previous: 0d1fd9c Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.9536 ms/op 1.8512 ms/op 1.06
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 46.425 us/op 39.441 us/op 1.18
BLS verify - blst 755.27 us/op 852.98 us/op 0.89
BLS verifyMultipleSignatures 3 - blst 1.1624 ms/op 1.4373 ms/op 0.81
BLS verifyMultipleSignatures 8 - blst 1.6280 ms/op 2.0655 ms/op 0.79
BLS verifyMultipleSignatures 32 - blst 4.7473 ms/op 4.4732 ms/op 1.06
BLS verifyMultipleSignatures 64 - blst 9.0089 ms/op 8.1416 ms/op 1.11
BLS verifyMultipleSignatures 128 - blst 17.135 ms/op 15.782 ms/op 1.09
BLS deserializing 10000 signatures 673.97 ms/op 603.08 ms/op 1.12
BLS deserializing 100000 signatures 6.9011 s/op 6.0504 s/op 1.14
BLS verifyMultipleSignatures - same message - 3 - blst 881.55 us/op 939.94 us/op 0.94
BLS verifyMultipleSignatures - same message - 8 - blst 1.0385 ms/op 1.1121 ms/op 0.93
BLS verifyMultipleSignatures - same message - 32 - blst 1.6899 ms/op 1.6300 ms/op 1.04
BLS verifyMultipleSignatures - same message - 64 - blst 2.6158 ms/op 2.4197 ms/op 1.08
BLS verifyMultipleSignatures - same message - 128 - blst 4.2743 ms/op 4.1835 ms/op 1.02
BLS aggregatePubkeys 32 - blst 19.886 us/op 17.921 us/op 1.11
BLS aggregatePubkeys 128 - blst 70.150 us/op 63.060 us/op 1.11
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 54.352 ms/op 58.388 ms/op 0.93
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 51.020 ms/op 40.352 ms/op 1.26
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 34.253 ms/op 28.706 ms/op 1.19
getSlashingsAndExits - default max 91.419 us/op 80.735 us/op 1.13
getSlashingsAndExits - 2k 262.56 us/op 269.88 us/op 0.97
proposeBlockBody type=full, size=empty 5.8801 ms/op 5.1155 ms/op 1.15
isKnown best case - 1 super set check 292.00 ns/op 566.00 ns/op 0.52
isKnown normal case - 2 super set checks 293.00 ns/op 542.00 ns/op 0.54
isKnown worse case - 16 super set checks 274.00 ns/op 519.00 ns/op 0.53
InMemoryCheckpointStateCache - add get delete 2.7010 us/op 3.2790 us/op 0.82
updateUnfinalizedPubkeys - updating 10 pubkeys 476.61 us/op 678.84 us/op 0.70
updateUnfinalizedPubkeys - updating 100 pubkeys 3.2475 ms/op 2.4769 ms/op 1.31
updateUnfinalizedPubkeys - updating 1000 pubkeys 46.697 ms/op 37.960 ms/op 1.23
validate api signedAggregateAndProof - struct 1.3534 ms/op 1.9665 ms/op 0.69
validate gossip signedAggregateAndProof - struct 1.3479 ms/op 1.9115 ms/op 0.71
batch validate gossip attestation - vc 640000 - chunk 32 122.60 us/op 129.87 us/op 0.94
batch validate gossip attestation - vc 640000 - chunk 64 109.06 us/op 116.78 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 128 102.24 us/op 104.72 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 256 99.530 us/op 102.28 us/op 0.97
pickEth1Vote - no votes 1.0886 ms/op 846.22 us/op 1.29
pickEth1Vote - max votes 5.6255 ms/op 4.4186 ms/op 1.27
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.545 ms/op 9.9643 ms/op 1.36
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.222 ms/op 13.724 ms/op 1.25
pickEth1Vote - Eth1Data fastSerialize value x2048 462.68 us/op 357.46 us/op 1.29
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.9632 ms/op 2.0672 ms/op 1.43
bytes32 toHexString 428.00 ns/op 585.00 ns/op 0.73
bytes32 Buffer.toString(hex) 268.00 ns/op 445.00 ns/op 0.60
bytes32 Buffer.toString(hex) from Uint8Array 366.00 ns/op 542.00 ns/op 0.68
bytes32 Buffer.toString(hex) + 0x 267.00 ns/op 442.00 ns/op 0.60
Object access 1 prop 0.13300 ns/op 0.33300 ns/op 0.40
Map access 1 prop 0.13900 ns/op 0.32700 ns/op 0.43
Object get x1000 5.9410 ns/op 5.1200 ns/op 1.16
Map get x1000 6.6930 ns/op 5.8540 ns/op 1.14
Object set x1000 32.511 ns/op 22.954 ns/op 1.42
Map set x1000 22.097 ns/op 18.840 ns/op 1.17
Return object 10000 times 0.28960 ns/op 0.30080 ns/op 0.96
Throw Error 10000 times 3.3239 us/op 2.7184 us/op 1.22
toHex 145.42 ns/op 111.52 ns/op 1.30
Buffer.from 134.72 ns/op 102.96 ns/op 1.31
shared Buffer 83.816 ns/op 69.944 ns/op 1.20
fastMsgIdFn sha256 / 200 bytes 2.2260 us/op 2.0710 us/op 1.07
fastMsgIdFn h32 xxhash / 200 bytes 232.00 ns/op 412.00 ns/op 0.56
fastMsgIdFn h64 xxhash / 200 bytes 274.00 ns/op 459.00 ns/op 0.60
fastMsgIdFn sha256 / 1000 bytes 7.3420 us/op 5.9260 us/op 1.24
fastMsgIdFn h32 xxhash / 1000 bytes 364.00 ns/op 546.00 ns/op 0.67
fastMsgIdFn h64 xxhash / 1000 bytes 343.00 ns/op 537.00 ns/op 0.64
fastMsgIdFn sha256 / 10000 bytes 65.237 us/op 49.986 us/op 1.31
fastMsgIdFn h32 xxhash / 10000 bytes 1.8450 us/op 1.9500 us/op 0.95
fastMsgIdFn h64 xxhash / 10000 bytes 1.2140 us/op 1.3550 us/op 0.90
send data - 1000 256B messages 11.597 ms/op 9.4972 ms/op 1.22
send data - 1000 512B messages 16.577 ms/op 13.188 ms/op 1.26
send data - 1000 1024B messages 28.646 ms/op 24.936 ms/op 1.15
send data - 1000 1200B messages 28.031 ms/op 22.437 ms/op 1.25
send data - 1000 2048B messages 19.456 ms/op 28.732 ms/op 0.68
send data - 1000 4096B messages 29.656 ms/op 25.077 ms/op 1.18
send data - 1000 16384B messages 70.034 ms/op 63.834 ms/op 1.10
send data - 1000 65536B messages 207.77 ms/op 233.01 ms/op 0.89
enrSubnets - fastDeserialize 64 bits 1.0830 us/op 1.1600 us/op 0.93
enrSubnets - ssz BitVector 64 bits 350.00 ns/op 521.00 ns/op 0.67
enrSubnets - fastDeserialize 4 bits 148.00 ns/op 325.00 ns/op 0.46
enrSubnets - ssz BitVector 4 bits 350.00 ns/op 518.00 ns/op 0.68
prioritizePeers score -10:0 att 32-0.1 sync 2-0 146.46 us/op 109.66 us/op 1.34
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 162.89 us/op 137.38 us/op 1.19
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 247.70 us/op 201.24 us/op 1.23
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 412.69 us/op 333.69 us/op 1.24
prioritizePeers score 0:0 att 64-1 sync 4-1 608.39 us/op 423.20 us/op 1.44
array of 16000 items push then shift 1.5761 us/op 1.2336 us/op 1.28
LinkedList of 16000 items push then shift 6.8050 ns/op 7.5650 ns/op 0.90
array of 16000 items push then pop 117.62 ns/op 99.399 ns/op 1.18
LinkedList of 16000 items push then pop 6.7830 ns/op 6.1760 ns/op 1.10
array of 24000 items push then shift 2.3404 us/op 1.8010 us/op 1.30
LinkedList of 24000 items push then shift 6.8820 ns/op 6.8930 ns/op 1.00
array of 24000 items push then pop 131.55 ns/op 125.49 ns/op 1.05
LinkedList of 24000 items push then pop 7.0040 ns/op 6.1900 ns/op 1.13
intersect bitArray bitLen 8 6.4040 ns/op 5.1430 ns/op 1.25
intersect array and set length 8 46.182 ns/op 37.152 ns/op 1.24
intersect bitArray bitLen 128 29.923 ns/op 25.386 ns/op 1.18
intersect array and set length 128 670.99 ns/op 549.85 ns/op 1.22
bitArray.getTrueBitIndexes() bitLen 128 1.8900 us/op 1.4880 us/op 1.27
bitArray.getTrueBitIndexes() bitLen 248 2.8240 us/op 2.2750 us/op 1.24
bitArray.getTrueBitIndexes() bitLen 512 6.1250 us/op 4.1950 us/op 1.46
Buffer.concat 32 items 910.00 ns/op 948.00 ns/op 0.96
Uint8Array.set 32 items 1.5630 us/op 1.5160 us/op 1.03
Buffer.copy 1.7120 us/op 1.7490 us/op 0.98
Uint8Array.set - with subarray 2.5560 us/op 2.2670 us/op 1.13
Uint8Array.set - without subarray 1.5400 us/op 1.5110 us/op 1.02
getUint32 - dataview 235.00 ns/op 386.00 ns/op 0.61
getUint32 - manual 161.00 ns/op 331.00 ns/op 0.49
Set add up to 64 items then delete first 2.1892 us/op 1.6622 us/op 1.32
OrderedSet add up to 64 items then delete first 3.3199 us/op 2.7679 us/op 1.20
Set add up to 64 items then delete last 2.4546 us/op 1.9191 us/op 1.28
OrderedSet add up to 64 items then delete last 3.6194 us/op 3.0305 us/op 1.19
Set add up to 64 items then delete middle 2.4874 us/op 2.0029 us/op 1.24
OrderedSet add up to 64 items then delete middle 5.1081 us/op 4.2560 us/op 1.20
Set add up to 128 items then delete first 5.1002 us/op 3.7615 us/op 1.36
OrderedSet add up to 128 items then delete first 7.8626 us/op 5.8568 us/op 1.34
Set add up to 128 items then delete last 4.8806 us/op 3.6270 us/op 1.35
OrderedSet add up to 128 items then delete last 7.2950 us/op 5.5414 us/op 1.32
Set add up to 128 items then delete middle 5.0354 us/op 3.6341 us/op 1.39
OrderedSet add up to 128 items then delete middle 13.753 us/op 11.264 us/op 1.22
Set add up to 256 items then delete first 10.399 us/op 7.3960 us/op 1.41
OrderedSet add up to 256 items then delete first 16.341 us/op 11.963 us/op 1.37
Set add up to 256 items then delete last 9.8136 us/op 7.2074 us/op 1.36
OrderedSet add up to 256 items then delete last 14.695 us/op 11.202 us/op 1.31
Set add up to 256 items then delete middle 9.6919 us/op 7.1048 us/op 1.36
OrderedSet add up to 256 items then delete middle 41.343 us/op 34.528 us/op 1.20
transfer serialized Status (84 B) 1.3400 us/op 1.4030 us/op 0.96
copy serialized Status (84 B) 1.0780 us/op 1.2000 us/op 0.90
transfer serialized SignedVoluntaryExit (112 B) 1.3950 us/op 1.5450 us/op 0.90
copy serialized SignedVoluntaryExit (112 B) 1.1110 us/op 1.3420 us/op 0.83
transfer serialized ProposerSlashing (416 B) 1.5850 us/op 1.6980 us/op 0.93
copy serialized ProposerSlashing (416 B) 1.3370 us/op 2.1530 us/op 0.62
transfer serialized Attestation (485 B) 1.5370 us/op 2.0920 us/op 0.73
copy serialized Attestation (485 B) 1.3370 us/op 2.0210 us/op 0.66
transfer serialized AttesterSlashing (33232 B) 2.4140 us/op 2.2850 us/op 1.06
copy serialized AttesterSlashing (33232 B) 5.0540 us/op 5.1650 us/op 0.98
transfer serialized Small SignedBeaconBlock (128000 B) 1.9180 us/op 2.7910 us/op 0.69
copy serialized Small SignedBeaconBlock (128000 B) 14.445 us/op 9.5210 us/op 1.52
transfer serialized Avg SignedBeaconBlock (200000 B) 2.5220 us/op 2.4920 us/op 1.01
copy serialized Avg SignedBeaconBlock (200000 B) 20.202 us/op 11.831 us/op 1.71
transfer serialized BlobsSidecar (524380 B) 2.2870 us/op 3.0330 us/op 0.75
copy serialized BlobsSidecar (524380 B) 71.388 us/op 73.961 us/op 0.97
transfer serialized Big SignedBeaconBlock (1000000 B) 2.5250 us/op 3.1730 us/op 0.80
copy serialized Big SignedBeaconBlock (1000000 B) 162.16 us/op 132.52 us/op 1.22
pass gossip attestations to forkchoice per slot 2.7477 ms/op 2.4098 ms/op 1.14
forkChoice updateHead vc 100000 bc 64 eq 0 484.98 us/op 472.22 us/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 0 3.0587 ms/op 2.6057 ms/op 1.17
forkChoice updateHead vc 1000000 bc 64 eq 0 5.3983 ms/op 4.0555 ms/op 1.33
forkChoice updateHead vc 600000 bc 320 eq 0 3.0822 ms/op 2.4924 ms/op 1.24
forkChoice updateHead vc 600000 bc 1200 eq 0 3.7537 ms/op 2.5436 ms/op 1.48
forkChoice updateHead vc 600000 bc 7200 eq 0 3.7980 ms/op 2.7706 ms/op 1.37
forkChoice updateHead vc 600000 bc 64 eq 1000 10.432 ms/op 9.6252 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 10000 10.850 ms/op 9.4451 ms/op 1.15
forkChoice updateHead vc 600000 bc 64 eq 300000 15.023 ms/op 11.589 ms/op 1.30
computeDeltas 500000 validators 300 proto nodes 3.5415 ms/op 3.0197 ms/op 1.17
computeDeltas 500000 validators 1200 proto nodes 3.5805 ms/op 3.0237 ms/op 1.18
computeDeltas 500000 validators 7200 proto nodes 3.5847 ms/op 3.1144 ms/op 1.15
computeDeltas 750000 validators 300 proto nodes 5.2582 ms/op 4.4246 ms/op 1.19
computeDeltas 750000 validators 1200 proto nodes 5.1230 ms/op 4.3886 ms/op 1.17
computeDeltas 750000 validators 7200 proto nodes 5.1640 ms/op 4.5213 ms/op 1.14
computeDeltas 1400000 validators 300 proto nodes 9.6919 ms/op 8.6127 ms/op 1.13
computeDeltas 1400000 validators 1200 proto nodes 9.6703 ms/op 8.5352 ms/op 1.13
computeDeltas 1400000 validators 7200 proto nodes 9.7600 ms/op 8.5737 ms/op 1.14
computeDeltas 2100000 validators 300 proto nodes 14.728 ms/op 13.151 ms/op 1.12
computeDeltas 2100000 validators 1200 proto nodes 14.309 ms/op 12.746 ms/op 1.12
computeDeltas 2100000 validators 7200 proto nodes 14.631 ms/op 12.778 ms/op 1.15
altair processAttestation - 250000 vs - 7PWei normalcase 1.7744 ms/op 1.4115 ms/op 1.26
altair processAttestation - 250000 vs - 7PWei worstcase 2.7344 ms/op 2.0993 ms/op 1.30
altair processAttestation - setStatus - 1/6 committees join 113.58 us/op 72.076 us/op 1.58
altair processAttestation - setStatus - 1/3 committees join 231.56 us/op 146.36 us/op 1.58
altair processAttestation - setStatus - 1/2 committees join 320.14 us/op 183.48 us/op 1.74
altair processAttestation - setStatus - 2/3 committees join 413.10 us/op 278.70 us/op 1.48
altair processAttestation - setStatus - 4/5 committees join 550.24 us/op 431.82 us/op 1.27
altair processAttestation - setStatus - 100% committees join 673.01 us/op 514.96 us/op 1.31
altair processBlock - 250000 vs - 7PWei normalcase 4.8189 ms/op 5.2211 ms/op 0.92
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.717 ms/op 26.210 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase 33.325 ms/op 34.790 ms/op 0.96
altair processBlock - 250000 vs - 7PWei worstcase hashState 67.103 ms/op 76.777 ms/op 0.87
phase0 processBlock - 250000 vs - 7PWei normalcase 1.7362 ms/op 2.0183 ms/op 0.86
phase0 processBlock - 250000 vs - 7PWei worstcase 19.459 ms/op 22.970 ms/op 0.85
altair processEth1Data - 250000 vs - 7PWei normalcase 278.07 us/op 259.01 us/op 1.07
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.8020 us/op 6.1370 us/op 0.78
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 28.072 us/op 28.803 us/op 0.97
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.9100 us/op 9.7820 us/op 0.81
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.1140 us/op 5.8820 us/op 0.87
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 110.52 us/op 131.53 us/op 0.84
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1063 ms/op 864.55 us/op 1.28
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4599 ms/op 1.2773 ms/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4780 ms/op 1.1102 ms/op 1.33
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.7636 ms/op 2.9440 ms/op 1.28
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4977 ms/op 1.1777 ms/op 1.27
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6652 ms/op 3.1553 ms/op 1.16
Tree 40 250000 create 209.35 ms/op 228.02 ms/op 0.92
Tree 40 250000 get(125000) 147.38 ns/op 119.08 ns/op 1.24
Tree 40 250000 set(125000) 649.39 ns/op 545.30 ns/op 1.19
Tree 40 250000 toArray() 15.121 ms/op 24.008 ms/op 0.63
Tree 40 250000 iterate all - toArray() + loop 15.022 ms/op 22.474 ms/op 0.67
Tree 40 250000 iterate all - get(i) 50.630 ms/op 56.913 ms/op 0.89
Array 250000 create 2.8176 ms/op 3.8791 ms/op 0.73
Array 250000 clone - spread 1.4438 ms/op 1.2256 ms/op 1.18
Array 250000 get(125000) 0.41500 ns/op 0.59700 ns/op 0.70
Array 250000 set(125000) 0.43400 ns/op 0.60600 ns/op 0.72
Array 250000 iterate all - loop 82.929 us/op 76.362 us/op 1.09
phase0 afterProcessEpoch - 250000 vs - 7PWei 94.167 ms/op 86.728 ms/op 1.09
Array.fill - length 1000000 3.6440 ms/op 2.7566 ms/op 1.32
Array push - length 1000000 16.359 ms/op 17.435 ms/op 0.94
Array.get 0.27703 ns/op 0.27840 ns/op 1.00
Uint8Array.get 0.44256 ns/op 0.36012 ns/op 1.23
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.613 ms/op 23.350 ms/op 0.71
altair processEpoch - mainnet_e81889 299.71 ms/op 276.08 ms/op 1.09
mainnet_e81889 - altair beforeProcessEpoch 18.444 ms/op 23.343 ms/op 0.79
mainnet_e81889 - altair processJustificationAndFinalization 12.127 us/op 16.318 us/op 0.74
mainnet_e81889 - altair processInactivityUpdates 5.1142 ms/op 4.6084 ms/op 1.11
mainnet_e81889 - altair processRewardsAndPenalties 42.769 ms/op 49.484 ms/op 0.86
mainnet_e81889 - altair processRegistryUpdates 1.9480 us/op 2.0300 us/op 0.96
mainnet_e81889 - altair processSlashings 378.00 ns/op 721.00 ns/op 0.52
mainnet_e81889 - altair processEth1DataReset 306.00 ns/op 714.00 ns/op 0.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4704 ms/op 1.6882 ms/op 0.87
mainnet_e81889 - altair processSlashingsReset 2.6640 us/op 2.6200 us/op 1.02
mainnet_e81889 - altair processRandaoMixesReset 3.3220 us/op 3.2170 us/op 1.03
mainnet_e81889 - altair processHistoricalRootsUpdate 332.00 ns/op 742.00 ns/op 0.45
mainnet_e81889 - altair processParticipationFlagUpdates 2.9170 us/op 4.2740 us/op 0.68
mainnet_e81889 - altair processSyncCommitteeUpdates 501.00 ns/op 850.00 ns/op 0.59
mainnet_e81889 - altair afterProcessEpoch 96.279 ms/op 82.189 ms/op 1.17
capella processEpoch - mainnet_e217614 1.0850 s/op 1.2437 s/op 0.87
mainnet_e217614 - capella beforeProcessEpoch 75.114 ms/op 140.75 ms/op 0.53
mainnet_e217614 - capella processJustificationAndFinalization 16.726 us/op 22.496 us/op 0.74
mainnet_e217614 - capella processInactivityUpdates 18.764 ms/op 24.694 ms/op 0.76
mainnet_e217614 - capella processRewardsAndPenalties 219.13 ms/op 303.03 ms/op 0.72
mainnet_e217614 - capella processRegistryUpdates 16.815 us/op 16.256 us/op 1.03
mainnet_e217614 - capella processSlashings 492.00 ns/op 960.00 ns/op 0.51
mainnet_e217614 - capella processEth1DataReset 470.00 ns/op 995.00 ns/op 0.47
mainnet_e217614 - capella processEffectiveBalanceUpdates 17.442 ms/op 18.998 ms/op 0.92
mainnet_e217614 - capella processSlashingsReset 4.7390 us/op 4.9010 us/op 0.97
mainnet_e217614 - capella processRandaoMixesReset 6.6910 us/op 7.4200 us/op 0.90
mainnet_e217614 - capella processHistoricalRootsUpdate 839.00 ns/op 1.1200 us/op 0.75
mainnet_e217614 - capella processParticipationFlagUpdates 2.5250 us/op 5.4880 us/op 0.46
mainnet_e217614 - capella afterProcessEpoch 256.54 ms/op 202.38 ms/op 1.27
phase0 processEpoch - mainnet_e58758 352.50 ms/op 401.07 ms/op 0.88
mainnet_e58758 - phase0 beforeProcessEpoch 74.514 ms/op 122.65 ms/op 0.61
mainnet_e58758 - phase0 processJustificationAndFinalization 15.803 us/op 19.905 us/op 0.79
mainnet_e58758 - phase0 processRewardsAndPenalties 34.028 ms/op 25.219 ms/op 1.35
mainnet_e58758 - phase0 processRegistryUpdates 7.0820 us/op 12.576 us/op 0.56
mainnet_e58758 - phase0 processSlashings 367.00 ns/op 979.00 ns/op 0.37
mainnet_e58758 - phase0 processEth1DataReset 338.00 ns/op 951.00 ns/op 0.36
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2487 ms/op 1.4756 ms/op 0.85
mainnet_e58758 - phase0 processSlashingsReset 2.8040 us/op 6.5900 us/op 0.43
mainnet_e58758 - phase0 processRandaoMixesReset 4.2810 us/op 7.1580 us/op 0.60
mainnet_e58758 - phase0 processHistoricalRootsUpdate 293.00 ns/op 1.4820 us/op 0.20
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.8880 us/op 4.6910 us/op 0.62
mainnet_e58758 - phase0 afterProcessEpoch 80.818 ms/op 66.784 ms/op 1.21
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.7543 ms/op 966.36 us/op 1.82
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5815 ms/op 1.9654 ms/op 1.31
altair processInactivityUpdates - 250000 normalcase 15.893 ms/op 20.650 ms/op 0.77
altair processInactivityUpdates - 250000 worstcase 15.767 ms/op 24.639 ms/op 0.64
phase0 processRegistryUpdates - 250000 normalcase 8.2670 us/op 6.0020 us/op 1.38
phase0 processRegistryUpdates - 250000 badcase_full_deposits 276.84 us/op 332.41 us/op 0.83
phase0 processRegistryUpdates - 250000 worstcase 0.5 118.62 ms/op 126.69 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 39.212 ms/op 59.693 ms/op 0.66
altair processRewardsAndPenalties - 250000 worstcase 39.174 ms/op 45.258 ms/op 0.87
phase0 getAttestationDeltas - 250000 normalcase 7.7356 ms/op 6.3114 ms/op 1.23
phase0 getAttestationDeltas - 250000 worstcase 7.4044 ms/op 6.6061 ms/op 1.12
phase0 processSlashings - 250000 worstcase 97.388 us/op 91.586 us/op 1.06
altair processSyncCommitteeUpdates - 250000 129.54 ms/op 105.07 ms/op 1.23
BeaconState.hashTreeRoot - No change 236.00 ns/op 455.00 ns/op 0.52
BeaconState.hashTreeRoot - 1 full validator 120.27 us/op 147.54 us/op 0.82
BeaconState.hashTreeRoot - 32 full validator 1.2385 ms/op 1.4310 ms/op 0.87
BeaconState.hashTreeRoot - 512 full validator 12.932 ms/op 8.4238 ms/op 1.54
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 147.59 us/op 91.510 us/op 1.61
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0186 ms/op 1.8866 ms/op 1.07
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.340 ms/op 21.464 ms/op 1.13
BeaconState.hashTreeRoot - 1 balances 90.035 us/op 89.457 us/op 1.01
BeaconState.hashTreeRoot - 32 balances 1.2295 ms/op 726.01 us/op 1.69
BeaconState.hashTreeRoot - 512 balances 8.1063 ms/op 6.6603 ms/op 1.22
BeaconState.hashTreeRoot - 250000 balances 156.35 ms/op 130.03 ms/op 1.20
aggregationBits - 2048 els - zipIndexesInBitList 25.418 us/op 23.726 us/op 1.07
byteArrayEquals 32 55.568 ns/op 47.490 ns/op 1.17
Buffer.compare 32 17.821 ns/op 15.093 ns/op 1.18
byteArrayEquals 1024 1.6411 us/op 1.2427 us/op 1.32
Buffer.compare 1024 27.104 ns/op 22.716 ns/op 1.19
byteArrayEquals 16384 27.411 us/op 19.735 us/op 1.39
Buffer.compare 16384 197.77 ns/op 178.22 ns/op 1.11
byteArrayEquals 123687377 199.20 ms/op 150.11 ms/op 1.33
Buffer.compare 123687377 7.6446 ms/op 4.3862 ms/op 1.74
byteArrayEquals 32 - diff last byte 57.257 ns/op 46.648 ns/op 1.23
Buffer.compare 32 - diff last byte 18.857 ns/op 15.796 ns/op 1.19
byteArrayEquals 1024 - diff last byte 1.6849 us/op 1.2502 us/op 1.35
Buffer.compare 1024 - diff last byte 28.555 ns/op 24.032 ns/op 1.19
byteArrayEquals 16384 - diff last byte 26.830 us/op 19.838 us/op 1.35
Buffer.compare 16384 - diff last byte 217.69 ns/op 201.91 ns/op 1.08
byteArrayEquals 123687377 - diff last byte 201.08 ms/op 144.07 ms/op 1.40
Buffer.compare 123687377 - diff last byte 8.4460 ms/op 5.4276 ms/op 1.56
byteArrayEquals 32 - random bytes 5.3320 ns/op 4.8040 ns/op 1.11
Buffer.compare 32 - random bytes 17.949 ns/op 15.070 ns/op 1.19
byteArrayEquals 1024 - random bytes 5.3400 ns/op 4.7800 ns/op 1.12
Buffer.compare 1024 - random bytes 17.976 ns/op 14.797 ns/op 1.21
byteArrayEquals 16384 - random bytes 5.2930 ns/op 4.7000 ns/op 1.13
Buffer.compare 16384 - random bytes 17.869 ns/op 14.832 ns/op 1.20
byteArrayEquals 123687377 - random bytes 6.6200 ns/op 7.5600 ns/op 0.88
Buffer.compare 123687377 - random bytes 19.320 ns/op 17.680 ns/op 1.09
regular array get 100000 times 35.545 us/op 29.324 us/op 1.21
wrappedArray get 100000 times 34.261 us/op 29.330 us/op 1.17
arrayWithProxy get 100000 times 13.806 ms/op 10.186 ms/op 1.36
ssz.Root.equals 47.462 ns/op 44.283 ns/op 1.07
byteArrayEquals 46.820 ns/op 43.086 ns/op 1.09
Buffer.compare 10.902 ns/op 9.1160 ns/op 1.20
shuffle list - 16384 els 6.4547 ms/op 5.3620 ms/op 1.20
shuffle list - 250000 els 96.077 ms/op 79.830 ms/op 1.20
processSlot - 1 slots 13.172 us/op 12.714 us/op 1.04
processSlot - 32 slots 2.9359 ms/op 2.5557 ms/op 1.15
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.924 ms/op 38.478 ms/op 0.96
getCommitteeAssignments - req 1 vs - 250000 vc 2.1160 ms/op 1.8144 ms/op 1.17
getCommitteeAssignments - req 100 vs - 250000 vc 4.2984 ms/op 3.4647 ms/op 1.24
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5307 ms/op 3.7900 ms/op 1.20
findModifiedValidators - 10000 modified validators 256.16 ms/op 229.85 ms/op 1.11
findModifiedValidators - 1000 modified validators 160.40 ms/op 136.68 ms/op 1.17
findModifiedValidators - 100 modified validators 155.24 ms/op 139.80 ms/op 1.11
findModifiedValidators - 10 modified validators 142.11 ms/op 141.79 ms/op 1.00
findModifiedValidators - 1 modified validators 155.35 ms/op 145.86 ms/op 1.06
findModifiedValidators - no difference 153.76 ms/op 139.20 ms/op 1.10
compare ViewDUs 3.0986 s/op 3.0761 s/op 1.01
compare each validator Uint8Array 1.6260 s/op 1.5870 s/op 1.02
compare ViewDU to Uint8Array 999.83 ms/op 772.85 ms/op 1.29
migrate state 1000000 validators, 24 modified, 0 new 913.20 ms/op 805.87 ms/op 1.13
migrate state 1000000 validators, 1700 modified, 1000 new 1.1862 s/op 1.0616 s/op 1.12
migrate state 1000000 validators, 3400 modified, 2000 new 1.2671 s/op 1.2092 s/op 1.05
migrate state 1500000 validators, 24 modified, 0 new 836.99 ms/op 762.24 ms/op 1.10
migrate state 1500000 validators, 1700 modified, 1000 new 1.1607 s/op 1.1511 s/op 1.01
migrate state 1500000 validators, 3400 modified, 2000 new 1.4078 s/op 1.3126 s/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6700 ns/op 6.4000 ns/op 0.73
state getBlockRootAtSlot - 250000 vs - 7PWei 615.03 ns/op 415.03 ns/op 1.48
computeProposers - vc 250000 7.8433 ms/op 5.5841 ms/op 1.40
computeEpochShuffling - vc 250000 97.000 ms/op 78.132 ms/op 1.24
getNextSyncCommittee - vc 250000 155.94 ms/op 95.009 ms/op 1.64
computeSigningRoot for AttestationData 26.605 us/op 25.349 us/op 1.05
hash AttestationData serialized data then Buffer.toString(base64) 1.7423 us/op 1.2006 us/op 1.45
toHexString serialized data 967.25 ns/op 862.56 ns/op 1.12
Buffer.toString(base64) 215.55 ns/op 165.31 ns/op 1.30
nodejs block root to RootHex using toHex 170.31 ns/op 115.54 ns/op 1.47
nodejs block root to RootHex using toRootHex 106.66 ns/op 74.927 ns/op 1.42
browser block root to RootHex using the deprecated toHexString 246.12 ns/op 227.98 ns/op 1.08
browser block root to RootHex using toHex 197.92 ns/op 176.07 ns/op 1.12
browser block root to RootHex using toRootHex 188.91 ns/op 148.12 ns/op 1.28

by benchmarkbot/action

@twoeths twoeths marked this pull request as ready for review October 7, 2024 06:16
@twoeths twoeths requested a review from a team as a code owner October 7, 2024 06:16
@wemeetagain wemeetagain merged commit 1fa3f37 into unstable Oct 7, 2024
21 checks passed
@wemeetagain wemeetagain deleted the te/remove_beaconAttestationBatchValidation_flag branch October 7, 2024 19:31
ensi321 pushed a commit that referenced this pull request Oct 10, 2024
* chore: remove beaconAttestationBatchValidation flag

* chore: refactor SequentialGossipHandlers vs BatchGossipHandlers

* chore: remove unused validateGossipAttestation() function

* chore: lint

* chore: fix lint

* chore: SequentialGossipType vs BatchGossipType

* chore: simplify getGossipHandlers()
philknows pushed a commit that referenced this pull request Oct 18, 2024
* chore: remove beaconAttestationBatchValidation flag

* chore: refactor SequentialGossipHandlers vs BatchGossipHandlers

* chore: remove unused validateGossipAttestation() function

* chore: lint

* chore: fix lint

* chore: SequentialGossipType vs BatchGossipType

* chore: simplify getGossipHandlers()
@wemeetagain
Copy link
Member

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