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: implement SingleAttestation #7126

Draft
wants to merge 25 commits into
base: unstable
Choose a base branch
from
Draft

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Oct 4, 2024

Motivation

Description

  • [te] Modify SeenAttestationData cache
  • [te] New SingleAttestation types, sszUtils to extract data
  • [te] Modify NetworkProcessor/GossipQueue/GossipHandler
  • [nc]Modify unaggregated attestation validation
  • [nc]Modify aggregated attestation validation
  • [nc]Modify opPool AttestationPool
  • [nf] API to validate Attestation (may convert to SingleAttestation?)
  • [nf] API to convert Attestation to SingleAttestation then publish (this should not be required as vc submits SingleAttestation post-electra which can be gossiped as is, we might need it to emit single_attestation event pre-electa as noted in comment)
  • [nf] validator change, may wait for the api spec PR

Copy link
Contributor

github-actions bot commented Oct 4, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 6b4648d Previous: 06b4c2d Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.0851 ms/op 2.2642 ms/op 0.92
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.361 us/op 69.775 us/op 0.71
BLS verify - blst 847.45 us/op 1.0233 ms/op 0.83
BLS verifyMultipleSignatures 3 - blst 1.5601 ms/op 1.5842 ms/op 0.98
BLS verifyMultipleSignatures 8 - blst 2.7158 ms/op 2.5115 ms/op 1.08
BLS verifyMultipleSignatures 32 - blst 6.7910 ms/op 6.5633 ms/op 1.03
BLS verifyMultipleSignatures 64 - blst 10.553 ms/op 11.133 ms/op 0.95
BLS verifyMultipleSignatures 128 - blst 17.049 ms/op 20.299 ms/op 0.84
BLS deserializing 10000 signatures 674.29 ms/op 752.85 ms/op 0.90
BLS deserializing 100000 signatures 6.7899 s/op 7.2695 s/op 0.93
BLS verifyMultipleSignatures - same message - 3 - blst 876.60 us/op 935.86 us/op 0.94
BLS verifyMultipleSignatures - same message - 8 - blst 1.0400 ms/op 1.0577 ms/op 0.98
BLS verifyMultipleSignatures - same message - 32 - blst 1.7101 ms/op 1.8107 ms/op 0.94
BLS verifyMultipleSignatures - same message - 64 - blst 2.5869 ms/op 2.7299 ms/op 0.95
BLS verifyMultipleSignatures - same message - 128 - blst 4.3539 ms/op 4.7750 ms/op 0.91
BLS aggregatePubkeys 32 - blst 19.338 us/op 21.806 us/op 0.89
BLS aggregatePubkeys 128 - blst 69.429 us/op 77.726 us/op 0.89
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 82.201 ms/op 79.474 ms/op 1.03
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 56.821 ms/op 68.149 ms/op 0.83
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 51.526 ms/op 54.022 ms/op 0.95
getSlashingsAndExits - default max 85.969 us/op 215.80 us/op 0.40
getSlashingsAndExits - 2k 293.20 us/op 500.51 us/op 0.59
proposeBlockBody type=full, size=empty 5.6632 ms/op 8.3371 ms/op 0.68
isKnown best case - 1 super set check 275.00 ns/op 705.00 ns/op 0.39
isKnown normal case - 2 super set checks 265.00 ns/op 741.00 ns/op 0.36
isKnown worse case - 16 super set checks 263.00 ns/op 734.00 ns/op 0.36
InMemoryCheckpointStateCache - add get delete 2.5440 us/op 5.1650 us/op 0.49
updateUnfinalizedPubkeys - updating 10 pubkeys 889.10 us/op 1.6693 ms/op 0.53
updateUnfinalizedPubkeys - updating 100 pubkeys 3.2340 ms/op 6.3416 ms/op 0.51
updateUnfinalizedPubkeys - updating 1000 pubkeys 49.670 ms/op 84.247 ms/op 0.59
validate api signedAggregateAndProof - struct 2.6062 ms/op 1.9358 ms/op 1.35
validate gossip signedAggregateAndProof - struct 2.5823 ms/op 1.8343 ms/op 1.41
batch validate gossip attestation - vc 640000 - chunk 32 130.05 us/op 159.07 us/op 0.82
batch validate gossip attestation - vc 640000 - chunk 64 112.72 us/op 134.14 us/op 0.84
batch validate gossip attestation - vc 640000 - chunk 128 111.20 us/op 119.56 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 256 100.72 us/op 108.45 us/op 0.93
pickEth1Vote - no votes 992.01 us/op 1.0872 ms/op 0.91
pickEth1Vote - max votes 5.6521 ms/op 6.8299 ms/op 0.83
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.382 ms/op 14.225 ms/op 1.08
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.650 ms/op 17.707 ms/op 1.39
pickEth1Vote - Eth1Data fastSerialize value x2048 440.07 us/op 489.10 us/op 0.90
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.5255 ms/op 2.9889 ms/op 1.18
bytes32 toHexString 418.00 ns/op 489.00 ns/op 0.85
bytes32 Buffer.toString(hex) 249.00 ns/op 284.00 ns/op 0.88
bytes32 Buffer.toString(hex) from Uint8Array 352.00 ns/op 470.00 ns/op 0.75
bytes32 Buffer.toString(hex) + 0x 255.00 ns/op 288.00 ns/op 0.89
Object access 1 prop 0.13600 ns/op 0.20000 ns/op 0.68
Map access 1 prop 0.13700 ns/op 0.14100 ns/op 0.97
Object get x1000 5.8260 ns/op 6.2420 ns/op 0.93
Map get x1000 6.1580 ns/op 6.5660 ns/op 0.94
Object set x1000 30.668 ns/op 42.821 ns/op 0.72
Map set x1000 21.026 ns/op 30.148 ns/op 0.70
Return object 10000 times 0.27750 ns/op 0.31060 ns/op 0.89
Throw Error 10000 times 3.3139 us/op 3.6302 us/op 0.91
toHex 138.09 ns/op 178.57 ns/op 0.77
Buffer.from 131.25 ns/op 158.32 ns/op 0.83
shared Buffer 83.895 ns/op 99.318 ns/op 0.84
fastMsgIdFn sha256 / 200 bytes 2.1730 us/op 2.3800 us/op 0.91
fastMsgIdFn h32 xxhash / 200 bytes 237.00 ns/op 292.00 ns/op 0.81
fastMsgIdFn h64 xxhash / 200 bytes 265.00 ns/op 283.00 ns/op 0.94
fastMsgIdFn sha256 / 1000 bytes 7.2170 us/op 7.8470 us/op 0.92
fastMsgIdFn h32 xxhash / 1000 bytes 345.00 ns/op 404.00 ns/op 0.85
fastMsgIdFn h64 xxhash / 1000 bytes 330.00 ns/op 360.00 ns/op 0.92
fastMsgIdFn sha256 / 10000 bytes 63.421 us/op 66.916 us/op 0.95
fastMsgIdFn h32 xxhash / 10000 bytes 1.7730 us/op 1.8780 us/op 0.94
fastMsgIdFn h64 xxhash / 10000 bytes 1.1650 us/op 1.2410 us/op 0.94
send data - 1000 256B messages 11.936 ms/op 13.163 ms/op 0.91
send data - 1000 512B messages 16.505 ms/op 17.538 ms/op 0.94
send data - 1000 1024B messages 25.113 ms/op 27.848 ms/op 0.90
send data - 1000 1200B messages 26.548 ms/op 28.765 ms/op 0.92
send data - 1000 2048B messages 31.549 ms/op 34.714 ms/op 0.91
send data - 1000 4096B messages 30.663 ms/op 33.672 ms/op 0.91
send data - 1000 16384B messages 70.996 ms/op 75.829 ms/op 0.94
send data - 1000 65536B messages 220.76 ms/op 226.25 ms/op 0.98
enrSubnets - fastDeserialize 64 bits 1.0740 us/op 1.2320 us/op 0.87
enrSubnets - ssz BitVector 64 bits 344.00 ns/op 416.00 ns/op 0.83
enrSubnets - fastDeserialize 4 bits 143.00 ns/op 178.00 ns/op 0.80
enrSubnets - ssz BitVector 4 bits 345.00 ns/op 439.00 ns/op 0.79
prioritizePeers score -10:0 att 32-0.1 sync 2-0 164.54 us/op 171.78 us/op 0.96
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 160.71 us/op 174.10 us/op 0.92
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 403.88 us/op 271.11 us/op 1.49
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 670.78 us/op 488.27 us/op 1.37
prioritizePeers score 0:0 att 64-1 sync 4-1 850.24 us/op 663.24 us/op 1.28
array of 16000 items push then shift 1.6365 us/op 1.6774 us/op 0.98
LinkedList of 16000 items push then shift 6.8260 ns/op 7.9920 ns/op 0.85
array of 16000 items push then pop 108.96 ns/op 128.96 ns/op 0.84
LinkedList of 16000 items push then pop 6.7620 ns/op 7.7530 ns/op 0.87
array of 24000 items push then shift 2.3219 us/op 2.4967 us/op 0.93
LinkedList of 24000 items push then shift 6.8780 ns/op 8.6550 ns/op 0.79
array of 24000 items push then pop 120.43 ns/op 174.31 ns/op 0.69
LinkedList of 24000 items push then pop 6.7180 ns/op 8.6110 ns/op 0.78
intersect bitArray bitLen 8 6.1940 ns/op 7.1120 ns/op 0.87
intersect array and set length 8 42.637 ns/op 57.282 ns/op 0.74
intersect bitArray bitLen 128 28.941 ns/op 31.722 ns/op 0.91
intersect array and set length 128 635.63 ns/op 848.98 ns/op 0.75
bitArray.getTrueBitIndexes() bitLen 128 2.0500 us/op 1.6110 us/op 1.27
bitArray.getTrueBitIndexes() bitLen 248 4.0130 us/op 2.8010 us/op 1.43
bitArray.getTrueBitIndexes() bitLen 512 8.4720 us/op 6.1080 us/op 1.39
Buffer.concat 32 items 1.0170 us/op 1.0810 us/op 0.94
Uint8Array.set 32 items 1.9210 us/op 2.2080 us/op 0.87
Buffer.copy 2.2100 us/op 2.4250 us/op 0.91
Uint8Array.set - with subarray 2.9350 us/op 3.3440 us/op 0.88
Uint8Array.set - without subarray 1.7360 us/op 1.6840 us/op 1.03
getUint32 - dataview 222.00 ns/op 298.00 ns/op 0.74
getUint32 - manual 143.00 ns/op 233.00 ns/op 0.61
Set add up to 64 items then delete first 2.0754 us/op 2.5983 us/op 0.80
OrderedSet add up to 64 items then delete first 3.0853 us/op 3.9284 us/op 0.79
Set add up to 64 items then delete last 2.3902 us/op 3.1416 us/op 0.76
OrderedSet add up to 64 items then delete last 3.4587 us/op 4.8114 us/op 0.72
Set add up to 64 items then delete middle 2.4102 us/op 3.1527 us/op 0.76
OrderedSet add up to 64 items then delete middle 5.0255 us/op 5.7934 us/op 0.87
Set add up to 128 items then delete first 4.8609 us/op 6.4026 us/op 0.76
OrderedSet add up to 128 items then delete first 7.4660 us/op 9.7599 us/op 0.76
Set add up to 128 items then delete last 4.7427 us/op 6.2224 us/op 0.76
OrderedSet add up to 128 items then delete last 6.8970 us/op 9.1490 us/op 0.75
Set add up to 128 items then delete middle 4.6347 us/op 6.0866 us/op 0.76
OrderedSet add up to 128 items then delete middle 12.998 us/op 16.456 us/op 0.79
Set add up to 256 items then delete first 9.7545 us/op 12.862 us/op 0.76
OrderedSet add up to 256 items then delete first 15.409 us/op 20.081 us/op 0.77
Set add up to 256 items then delete last 9.1925 us/op 11.574 us/op 0.79
OrderedSet add up to 256 items then delete last 13.866 us/op 17.467 us/op 0.79
Set add up to 256 items then delete middle 9.2735 us/op 11.422 us/op 0.81
OrderedSet add up to 256 items then delete middle 40.946 us/op 46.571 us/op 0.88
transfer serialized Status (84 B) 1.4360 us/op 1.6230 us/op 0.88
copy serialized Status (84 B) 1.2330 us/op 1.3300 us/op 0.93
transfer serialized SignedVoluntaryExit (112 B) 1.7630 us/op 1.7150 us/op 1.03
copy serialized SignedVoluntaryExit (112 B) 1.4540 us/op 1.4230 us/op 1.02
transfer serialized ProposerSlashing (416 B) 2.7490 us/op 2.1350 us/op 1.29
copy serialized ProposerSlashing (416 B) 2.7100 us/op 2.5770 us/op 1.05
transfer serialized Attestation (485 B) 2.3440 us/op 2.4090 us/op 0.97
copy serialized Attestation (485 B) 2.1680 us/op 2.6450 us/op 0.82
transfer serialized AttesterSlashing (33232 B) 2.6460 us/op 2.7110 us/op 0.98
copy serialized AttesterSlashing (33232 B) 5.3640 us/op 8.0310 us/op 0.67
transfer serialized Small SignedBeaconBlock (128000 B) 3.6560 us/op 2.5170 us/op 1.45
copy serialized Small SignedBeaconBlock (128000 B) 14.299 us/op 15.688 us/op 0.91
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6760 us/op 3.0360 us/op 1.21
copy serialized Avg SignedBeaconBlock (200000 B) 19.482 us/op 22.966 us/op 0.85
transfer serialized BlobsSidecar (524380 B) 3.0020 us/op 3.5780 us/op 0.84
copy serialized BlobsSidecar (524380 B) 79.661 us/op 75.650 us/op 1.05
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2570 us/op 4.2210 us/op 0.77
copy serialized Big SignedBeaconBlock (1000000 B) 162.98 us/op 171.55 us/op 0.95
pass gossip attestations to forkchoice per slot 2.8197 ms/op 3.0034 ms/op 0.94
forkChoice updateHead vc 100000 bc 64 eq 0 458.19 us/op 480.74 us/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 0 3.4187 ms/op 3.8343 ms/op 0.89
forkChoice updateHead vc 1000000 bc 64 eq 0 4.9055 ms/op 5.1756 ms/op 0.95
forkChoice updateHead vc 600000 bc 320 eq 0 2.7977 ms/op 3.0472 ms/op 0.92
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8407 ms/op 2.9577 ms/op 0.96
forkChoice updateHead vc 600000 bc 7200 eq 0 3.6033 ms/op 5.6023 ms/op 0.64
forkChoice updateHead vc 600000 bc 64 eq 1000 10.532 ms/op 10.512 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 10.364 ms/op 10.411 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 13.801 ms/op 14.587 ms/op 0.95
computeDeltas 500000 validators 300 proto nodes 4.1159 ms/op 4.2527 ms/op 0.97
computeDeltas 500000 validators 1200 proto nodes 4.0017 ms/op 4.2477 ms/op 0.94
computeDeltas 500000 validators 7200 proto nodes 3.9653 ms/op 4.2624 ms/op 0.93
computeDeltas 750000 validators 300 proto nodes 5.9310 ms/op 6.1556 ms/op 0.96
computeDeltas 750000 validators 1200 proto nodes 5.9718 ms/op 6.1428 ms/op 0.97
computeDeltas 750000 validators 7200 proto nodes 6.0696 ms/op 6.2998 ms/op 0.96
computeDeltas 1400000 validators 300 proto nodes 11.996 ms/op 11.790 ms/op 1.02
computeDeltas 1400000 validators 1200 proto nodes 11.752 ms/op 11.638 ms/op 1.01
computeDeltas 1400000 validators 7200 proto nodes 11.722 ms/op 11.521 ms/op 1.02
computeDeltas 2100000 validators 300 proto nodes 17.734 ms/op 16.647 ms/op 1.07
computeDeltas 2100000 validators 1200 proto nodes 17.538 ms/op 16.560 ms/op 1.06
computeDeltas 2100000 validators 7200 proto nodes 17.460 ms/op 16.483 ms/op 1.06
altair processAttestation - 250000 vs - 7PWei normalcase 2.1525 ms/op 1.7019 ms/op 1.26
altair processAttestation - 250000 vs - 7PWei worstcase 3.0655 ms/op 2.5084 ms/op 1.22
altair processAttestation - setStatus - 1/6 committees join 101.46 us/op 84.545 us/op 1.20
altair processAttestation - setStatus - 1/3 committees join 179.40 us/op 171.03 us/op 1.05
altair processAttestation - setStatus - 1/2 committees join 269.29 us/op 238.41 us/op 1.13
altair processAttestation - setStatus - 2/3 committees join 335.95 us/op 308.21 us/op 1.09
altair processAttestation - setStatus - 4/5 committees join 494.41 us/op 454.40 us/op 1.09
altair processAttestation - setStatus - 100% committees join 597.73 us/op 537.41 us/op 1.11
altair processBlock - 250000 vs - 7PWei normalcase 4.6419 ms/op 3.7211 ms/op 1.25
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.611 ms/op 26.016 ms/op 0.98
altair processBlock - 250000 vs - 7PWei worstcase 38.803 ms/op 36.113 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase hashState 77.941 ms/op 65.995 ms/op 1.18
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4425 ms/op 1.6803 ms/op 1.45
phase0 processBlock - 250000 vs - 7PWei worstcase 24.961 ms/op 19.411 ms/op 1.29
altair processEth1Data - 250000 vs - 7PWei normalcase 333.11 us/op 301.64 us/op 1.10
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.7780 us/op 4.6350 us/op 1.25
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 42.569 us/op 26.285 us/op 1.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 13.636 us/op 7.9790 us/op 1.71
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.2690 us/op 4.7920 us/op 1.52
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 170.08 us/op 111.10 us/op 1.53
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3207 ms/op 1.0840 ms/op 1.22
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8285 ms/op 1.4656 ms/op 1.25
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8766 ms/op 1.5203 ms/op 1.23
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9184 ms/op 3.6401 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5641 ms/op 1.4701 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9171 ms/op 3.4920 ms/op 1.12
Tree 40 250000 create 236.12 ms/op 224.07 ms/op 1.05
Tree 40 250000 get(125000) 156.53 ns/op 147.44 ns/op 1.06
Tree 40 250000 set(125000) 732.50 ns/op 605.79 ns/op 1.21
Tree 40 250000 toArray() 22.169 ms/op 14.249 ms/op 1.56
Tree 40 250000 iterate all - toArray() + loop 21.974 ms/op 14.330 ms/op 1.53
Tree 40 250000 iterate all - get(i) 58.248 ms/op 50.218 ms/op 1.16
Array 250000 create 3.4864 ms/op 2.7128 ms/op 1.29
Array 250000 clone - spread 1.4941 ms/op 1.3091 ms/op 1.14
Array 250000 get(125000) 0.44300 ns/op 0.40300 ns/op 1.10
Array 250000 set(125000) 0.47300 ns/op 0.41500 ns/op 1.14
Array 250000 iterate all - loop 99.381 us/op 101.67 us/op 0.98
phase0 afterProcessEpoch - 250000 vs - 7PWei 55.367 ms/op 49.259 ms/op 1.12
Array.fill - length 1000000 4.1343 ms/op 3.4132 ms/op 1.21
Array push - length 1000000 24.557 ms/op 12.149 ms/op 2.02
Array.get 0.29634 ns/op 0.26555 ns/op 1.12
Uint8Array.get 0.46674 ns/op 0.41810 ns/op 1.12
phase0 beforeProcessEpoch - 250000 vs - 7PWei 22.865 ms/op 17.489 ms/op 1.31
altair processEpoch - mainnet_e81889 338.28 ms/op 276.35 ms/op 1.22
mainnet_e81889 - altair beforeProcessEpoch 21.337 ms/op 17.980 ms/op 1.19
mainnet_e81889 - altair processJustificationAndFinalization 17.680 us/op 12.355 us/op 1.43
mainnet_e81889 - altair processInactivityUpdates 8.0030 ms/op 4.8404 ms/op 1.65
mainnet_e81889 - altair processRewardsAndPenalties 50.286 ms/op 40.039 ms/op 1.26
mainnet_e81889 - altair processRegistryUpdates 2.7370 us/op 1.7880 us/op 1.53
mainnet_e81889 - altair processSlashings 499.00 ns/op 405.00 ns/op 1.23
mainnet_e81889 - altair processEth1DataReset 524.00 ns/op 335.00 ns/op 1.56
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6558 ms/op 1.8790 ms/op 0.88
mainnet_e81889 - altair processSlashingsReset 3.8910 us/op 2.5660 us/op 1.52
mainnet_e81889 - altair processRandaoMixesReset 5.6680 us/op 4.0640 us/op 1.39
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0420 us/op 659.00 ns/op 1.58
mainnet_e81889 - altair processParticipationFlagUpdates 2.6010 us/op 1.7330 us/op 1.50
mainnet_e81889 - altair processSyncCommitteeUpdates 508.00 ns/op 427.00 ns/op 1.19
mainnet_e81889 - altair afterProcessEpoch 53.591 ms/op 50.772 ms/op 1.06
capella processEpoch - mainnet_e217614 1.1492 s/op 1.0135 s/op 1.13
mainnet_e217614 - capella beforeProcessEpoch 73.256 ms/op 82.383 ms/op 0.89
mainnet_e217614 - capella processJustificationAndFinalization 16.422 us/op 15.842 us/op 1.04
mainnet_e217614 - capella processInactivityUpdates 19.959 ms/op 17.543 ms/op 1.14
mainnet_e217614 - capella processRewardsAndPenalties 253.57 ms/op 223.33 ms/op 1.14
mainnet_e217614 - capella processRegistryUpdates 18.951 us/op 13.418 us/op 1.41
mainnet_e217614 - capella processSlashings 844.00 ns/op 452.00 ns/op 1.87
mainnet_e217614 - capella processEth1DataReset 382.00 ns/op 354.00 ns/op 1.08
mainnet_e217614 - capella processEffectiveBalanceUpdates 18.628 ms/op 14.621 ms/op 1.27
mainnet_e217614 - capella processSlashingsReset 5.8490 us/op 4.1750 us/op 1.40
mainnet_e217614 - capella processRandaoMixesReset 5.2600 us/op 4.7530 us/op 1.11
mainnet_e217614 - capella processHistoricalRootsUpdate 605.00 ns/op 964.00 ns/op 0.63
mainnet_e217614 - capella processParticipationFlagUpdates 4.1140 us/op 2.1010 us/op 1.96
mainnet_e217614 - capella afterProcessEpoch 130.16 ms/op 127.70 ms/op 1.02
phase0 processEpoch - mainnet_e58758 411.31 ms/op 326.50 ms/op 1.26
mainnet_e58758 - phase0 beforeProcessEpoch 97.547 ms/op 77.405 ms/op 1.26
mainnet_e58758 - phase0 processJustificationAndFinalization 17.867 us/op 16.775 us/op 1.07
mainnet_e58758 - phase0 processRewardsAndPenalties 38.576 ms/op 28.938 ms/op 1.33
mainnet_e58758 - phase0 processRegistryUpdates 7.6790 us/op 9.8060 us/op 0.78
mainnet_e58758 - phase0 processSlashings 374.00 ns/op 466.00 ns/op 0.80
mainnet_e58758 - phase0 processEth1DataReset 342.00 ns/op 366.00 ns/op 0.93
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.9631 ms/op 1.2291 ms/op 2.41
mainnet_e58758 - phase0 processSlashingsReset 3.3950 us/op 2.5480 us/op 1.33
mainnet_e58758 - phase0 processRandaoMixesReset 4.5610 us/op 3.7430 us/op 1.22
mainnet_e58758 - phase0 processHistoricalRootsUpdate 320.00 ns/op 376.00 ns/op 0.85
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.4140 us/op 3.1270 us/op 1.41
mainnet_e58758 - phase0 afterProcessEpoch 43.656 ms/op 43.937 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9153 ms/op 1.9365 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.4291 ms/op 2.2963 ms/op 1.06
altair processInactivityUpdates - 250000 normalcase 19.279 ms/op 14.566 ms/op 1.32
altair processInactivityUpdates - 250000 worstcase 17.822 ms/op 16.141 ms/op 1.10
phase0 processRegistryUpdates - 250000 normalcase 7.2410 us/op 7.0250 us/op 1.03
phase0 processRegistryUpdates - 250000 badcase_full_deposits 332.40 us/op 312.36 us/op 1.06
phase0 processRegistryUpdates - 250000 worstcase 0.5 130.90 ms/op 127.93 ms/op 1.02
altair processRewardsAndPenalties - 250000 normalcase 40.947 ms/op 37.573 ms/op 1.09
altair processRewardsAndPenalties - 250000 worstcase 45.819 ms/op 35.955 ms/op 1.27
phase0 getAttestationDeltas - 250000 normalcase 8.6213 ms/op 7.7508 ms/op 1.11
phase0 getAttestationDeltas - 250000 worstcase 7.9396 ms/op 7.4666 ms/op 1.06
phase0 processSlashings - 250000 worstcase 108.40 us/op 89.296 us/op 1.21
altair processSyncCommitteeUpdates - 250000 134.18 ms/op 124.33 ms/op 1.08
BeaconState.hashTreeRoot - No change 328.00 ns/op 267.00 ns/op 1.23
BeaconState.hashTreeRoot - 1 full validator 134.77 us/op 93.586 us/op 1.44
BeaconState.hashTreeRoot - 32 full validator 1.6194 ms/op 1.1361 ms/op 1.43
BeaconState.hashTreeRoot - 512 full validator 11.979 ms/op 10.097 ms/op 1.19
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 181.01 us/op 114.49 us/op 1.58
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.3900 ms/op 1.4589 ms/op 1.64
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.031 ms/op 20.835 ms/op 1.30
BeaconState.hashTreeRoot - 1 balances 130.85 us/op 93.184 us/op 1.40
BeaconState.hashTreeRoot - 32 balances 1.3616 ms/op 840.87 us/op 1.62
BeaconState.hashTreeRoot - 512 balances 8.8287 ms/op 7.6803 ms/op 1.15
BeaconState.hashTreeRoot - 250000 balances 176.83 ms/op 153.77 ms/op 1.15
aggregationBits - 2048 els - zipIndexesInBitList 26.918 us/op 26.247 us/op 1.03
byteArrayEquals 32 54.578 ns/op 54.540 ns/op 1.00
Buffer.compare 32 17.442 ns/op 17.373 ns/op 1.00
byteArrayEquals 1024 1.6099 us/op 1.6156 us/op 1.00
Buffer.compare 1024 25.238 ns/op 24.840 ns/op 1.02
byteArrayEquals 16384 25.630 us/op 25.658 us/op 1.00
Buffer.compare 16384 198.52 ns/op 194.48 ns/op 1.02
byteArrayEquals 123687377 195.38 ms/op 194.38 ms/op 1.01
Buffer.compare 123687377 6.3051 ms/op 7.5644 ms/op 0.83
byteArrayEquals 32 - diff last byte 52.597 ns/op 53.624 ns/op 0.98
Buffer.compare 32 - diff last byte 17.101 ns/op 17.465 ns/op 0.98
byteArrayEquals 1024 - diff last byte 1.5855 us/op 1.6308 us/op 0.97
Buffer.compare 1024 - diff last byte 26.150 ns/op 25.450 ns/op 1.03
byteArrayEquals 16384 - diff last byte 25.254 us/op 25.829 us/op 0.98
Buffer.compare 16384 - diff last byte 187.63 ns/op 202.71 ns/op 0.93
byteArrayEquals 123687377 - diff last byte 186.52 ms/op 189.78 ms/op 0.98
Buffer.compare 123687377 - diff last byte 6.2974 ms/op 6.1649 ms/op 1.02
byteArrayEquals 32 - random bytes 4.9920 ns/op 5.0800 ns/op 0.98
Buffer.compare 32 - random bytes 16.672 ns/op 17.132 ns/op 0.97
byteArrayEquals 1024 - random bytes 5.0190 ns/op 5.1070 ns/op 0.98
Buffer.compare 1024 - random bytes 16.657 ns/op 17.092 ns/op 0.97
byteArrayEquals 16384 - random bytes 5.0040 ns/op 5.0930 ns/op 0.98
Buffer.compare 16384 - random bytes 16.851 ns/op 17.412 ns/op 0.97
byteArrayEquals 123687377 - random bytes 6.2500 ns/op 6.4500 ns/op 0.97
Buffer.compare 123687377 - random bytes 17.940 ns/op 18.490 ns/op 0.97
regular array get 100000 times 41.342 us/op 34.731 us/op 1.19
wrappedArray get 100000 times 31.919 us/op 33.183 us/op 0.96
arrayWithProxy get 100000 times 13.903 ms/op 13.341 ms/op 1.04
ssz.Root.equals 45.963 ns/op 45.720 ns/op 1.01
byteArrayEquals 45.583 ns/op 45.116 ns/op 1.01
Buffer.compare 10.388 ns/op 10.330 ns/op 1.01
processSlot - 1 slots 15.283 us/op 11.679 us/op 1.31
processSlot - 32 slots 2.8425 ms/op 2.1561 ms/op 1.32
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 44.088 ms/op 36.599 ms/op 1.20
getCommitteeAssignments - req 1 vs - 250000 vc 2.0509 ms/op 2.1613 ms/op 0.95
getCommitteeAssignments - req 100 vs - 250000 vc 3.9822 ms/op 4.2952 ms/op 0.93
getCommitteeAssignments - req 1000 vs - 250000 vc 4.2407 ms/op 4.4900 ms/op 0.94
findModifiedValidators - 10000 modified validators 240.87 ms/op 258.03 ms/op 0.93
findModifiedValidators - 1000 modified validators 154.92 ms/op 176.68 ms/op 0.88
findModifiedValidators - 100 modified validators 139.06 ms/op 160.38 ms/op 0.87
findModifiedValidators - 10 modified validators 137.69 ms/op 152.13 ms/op 0.91
findModifiedValidators - 1 modified validators 140.61 ms/op 153.14 ms/op 0.92
findModifiedValidators - no difference 153.11 ms/op 167.39 ms/op 0.91
compare ViewDUs 3.2073 s/op 3.3091 s/op 0.97
compare each validator Uint8Array 1.5385 s/op 1.4704 s/op 1.05
compare ViewDU to Uint8Array 981.10 ms/op 1.2361 s/op 0.79
migrate state 1000000 validators, 24 modified, 0 new 777.14 ms/op 757.73 ms/op 1.03
migrate state 1000000 validators, 1700 modified, 1000 new 1.0164 s/op 923.05 ms/op 1.10
migrate state 1000000 validators, 3400 modified, 2000 new 1.2084 s/op 1.1167 s/op 1.08
migrate state 1500000 validators, 24 modified, 0 new 779.37 ms/op 750.72 ms/op 1.04
migrate state 1500000 validators, 1700 modified, 1000 new 1.0328 s/op 994.39 ms/op 1.04
migrate state 1500000 validators, 3400 modified, 2000 new 1.2857 s/op 1.1480 s/op 1.12
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2000 ns/op 4.3200 ns/op 0.97
state getBlockRootAtSlot - 250000 vs - 7PWei 884.24 ns/op 449.20 ns/op 1.97
computeProposers - vc 250000 7.5073 ms/op 7.8054 ms/op 0.96
computeEpochShuffling - vc 250000 40.934 ms/op 42.055 ms/op 0.97
getNextSyncCommittee - vc 250000 128.39 ms/op 124.04 ms/op 1.04
computeSigningRoot for AttestationData 26.288 us/op 16.864 us/op 1.56
hash AttestationData serialized data then Buffer.toString(base64) 1.5433 us/op 1.5935 us/op 0.97
toHexString serialized data 872.86 ns/op 904.86 ns/op 0.96
Buffer.toString(base64) 176.72 ns/op 185.40 ns/op 0.95
nodejs block root to RootHex using toHex 146.42 ns/op 150.48 ns/op 0.97
nodejs block root to RootHex using toRootHex 92.667 ns/op 95.790 ns/op 0.97
browser block root to RootHex using the deprecated toHexString 222.16 ns/op 228.65 ns/op 0.97
browser block root to RootHex using toHex 177.63 ns/op 183.14 ns/op 0.97
browser block root to RootHex using toRootHex 158.00 ns/op 163.18 ns/op 0.97

by benchmarkbot/action

@ensi321
Copy link
Contributor

ensi321 commented Oct 17, 2024

Closing as the SingleAttestation proposal fell out of favour and will not be included in Electra as per ACDC 144

@ensi321 ensi321 closed this Oct 17, 2024
@ensi321 ensi321 reopened this Nov 1, 2024
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