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

Open
wants to merge 27 commits into
base: unstable
Choose a base branch
from
Open

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 Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: cc5c38a Previous: 2e5265b Ratio
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 221.15 us/op 45.485 us/op 4.86
BLS verifyMultipleSignatures 3 - blst 4.3017 ms/op 1.1527 ms/op 3.73
BLS verifyMultipleSignatures 8 - blst 7.0629 ms/op 1.6375 ms/op 4.31
BLS verifyMultipleSignatures 32 - blst 22.968 ms/op 4.7806 ms/op 4.80
BLS verifyMultipleSignatures 64 - blst 44.939 ms/op 8.9230 ms/op 5.04
BLS verifyMultipleSignatures 128 - blst 82.759 ms/op 17.000 ms/op 4.87
BLS deserializing 10000 signatures 2.3749 s/op 674.17 ms/op 3.52
BLS verifyMultipleSignatures - same message - 32 - blst 5.2746 ms/op 1.6781 ms/op 3.14
BLS verifyMultipleSignatures - same message - 64 - blst 8.4347 ms/op 2.5408 ms/op 3.32
BLS aggregatePubkeys 32 - blst 69.289 us/op 19.073 us/op 3.63
BLS aggregatePubkeys 128 - blst 235.48 us/op 68.246 us/op 3.45
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 154.21 ms/op 47.301 ms/op 3.26
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 127.37 ms/op 36.716 ms/op 3.47
getSlashingsAndExits - default max 380.70 us/op 86.584 us/op 4.40
getSlashingsAndExits - 2k 949.80 us/op 256.36 us/op 3.70
proposeBlockBody type=full, size=empty 19.405 ms/op 5.7276 ms/op 3.39
isKnown best case - 1 super set check 1.1840 us/op 273.00 ns/op 4.34
isKnown normal case - 2 super set checks 1.1470 us/op 267.00 ns/op 4.30
isKnown worse case - 16 super set checks 1.2760 us/op 271.00 ns/op 4.71
validate api signedAggregateAndProof - struct 7.0148 ms/op 1.3548 ms/op 5.18
validate gossip signedAggregateAndProof - struct 6.4776 ms/op 1.3324 ms/op 4.86
batch validate gossip attestation - vc 640000 - chunk 32 540.64 us/op 120.77 us/op 4.48
pickEth1Vote - max votes 21.137 ms/op 6.0681 ms/op 3.48
send data - 1000 65536B messages 1.1545 s/op 218.24 ms/op 5.29
enrSubnets - fastDeserialize 64 bits 3.3220 us/op 1.0890 us/op 3.05
enrSubnets - ssz BitVector 64 bits 1.0780 us/op 334.00 ns/op 3.23
enrSubnets - fastDeserialize 4 bits 448.00 ns/op 139.00 ns/op 3.22
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 1.2342 ms/op 400.56 us/op 3.08
Buffer.concat 32 items 3.2760 us/op 879.00 ns/op 3.73
getUint32 - manual 472.00 ns/op 141.00 ns/op 3.35
Set add up to 128 items then delete first 15.820 us/op 4.8092 us/op 3.29
Set add up to 128 items then delete last 15.032 us/op 4.8433 us/op 3.10
OrderedSet add up to 256 items then delete first 44.795 us/op 14.497 us/op 3.09
pass gossip attestations to forkchoice per slot 10.304 ms/op 2.7928 ms/op 3.69
forkChoice updateHead vc 100000 bc 64 eq 0 1.7086 ms/op 448.16 us/op 3.81
forkChoice updateHead vc 600000 bc 64 eq 0 11.732 ms/op 2.6426 ms/op 4.44
forkChoice updateHead vc 1000000 bc 64 eq 0 15.734 ms/op 4.7497 ms/op 3.31
forkChoice updateHead vc 600000 bc 320 eq 0 10.737 ms/op 2.6412 ms/op 4.07
forkChoice updateHead vc 600000 bc 1200 eq 0 12.968 ms/op 2.8108 ms/op 4.61
forkChoice updateHead vc 600000 bc 7200 eq 0 10.452 ms/op 3.2127 ms/op 3.25
forkChoice updateHead vc 600000 bc 64 eq 1000 37.522 ms/op 10.395 ms/op 3.61
forkChoice updateHead vc 600000 bc 64 eq 10000 38.668 ms/op 10.067 ms/op 3.84
forkChoice updateHead vc 600000 bc 64 eq 300000 54.651 ms/op 13.382 ms/op 4.08
computeDeltas 500000 validators 300 proto nodes 12.001 ms/op 3.8727 ms/op 3.10
computeDeltas 500000 validators 1200 proto nodes 12.305 ms/op 3.9015 ms/op 3.15
computeDeltas 500000 validators 7200 proto nodes 12.627 ms/op 3.8872 ms/op 3.25
computeDeltas 1400000 validators 300 proto nodes 34.134 ms/op 10.917 ms/op 3.13
computeDeltas 2100000 validators 1200 proto nodes 50.068 ms/op 16.350 ms/op 3.06
altair processAttestation - setStatus - 100% committees join 2.0995 ms/op 669.31 us/op 3.14
phase0 processBlock - 250000 vs - 7PWei normalcase 6.2531 ms/op 1.6138 ms/op 3.87
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 404.26 us/op 113.18 us/op 3.57
phase0 afterProcessEpoch - 250000 vs - 7PWei 160.19 ms/op 47.876 ms/op 3.35
Array.fill - length 1000000 11.695 ms/op 3.5911 ms/op 3.26
Array push - length 1000000 56.860 ms/op 12.393 ms/op 4.59
altair processRewardsAndPenalties - 250000 normalcase 93.281 ms/op 27.551 ms/op 3.39
BeaconState.hashTreeRoot - No change 882.00 ns/op 249.00 ns/op 3.54
BeaconState.hashTreeRoot - 512 full validator 32.109 ms/op 9.7886 ms/op 3.28
byteArrayEquals 32 172.12 ns/op 57.192 ns/op 3.01
Buffer.compare 32 56.969 ns/op 17.055 ns/op 3.34
Buffer.compare 1024 82.941 ns/op 24.600 ns/op 3.37
byteArrayEquals 16384 78.284 us/op 24.935 us/op 3.14
Buffer.compare 16384 680.55 ns/op 186.09 ns/op 3.66
getCommitteeAssignments - req 1000 vs - 250000 vc 13.664 ms/op 4.1699 ms/op 3.28
findModifiedValidators - 10000 modified validators 998.33 ms/op 226.75 ms/op 4.40
findModifiedValidators - 1000 modified validators 1.1434 s/op 164.65 ms/op 6.94
findModifiedValidators - 100 modified validators 560.57 ms/op 153.96 ms/op 3.64
findModifiedValidators - 10 modified validators 523.53 ms/op 152.26 ms/op 3.44
findModifiedValidators - 1 modified validators 516.31 ms/op 152.23 ms/op 3.39
compare ViewDU to Uint8Array 3.0608 s/op 1.0075 s/op 3.04
migrate state 1000000 validators, 24 modified, 0 new 2.5311 s/op 761.69 ms/op 3.32
migrate state 1000000 validators, 1700 modified, 1000 new 2.9535 s/op 961.73 ms/op 3.07
migrate state 1000000 validators, 3400 modified, 2000 new 3.5177 s/op 1.1539 s/op 3.05
migrate state 1500000 validators, 24 modified, 0 new 2.2836 s/op 717.28 ms/op 3.18
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 14.310 ns/op 4.2800 ns/op 3.34
computeProposers - vc 250000 27.949 ms/op 6.7528 ms/op 4.14
computeEpochShuffling - vc 250000 150.60 ms/op 40.061 ms/op 3.76
getNextSyncCommittee - vc 250000 425.35 ms/op 126.99 ms/op 3.35
hash AttestationData serialized data then Buffer.toString(base64) 5.4162 us/op 1.5227 us/op 3.56
toHexString serialized data 3.4826 us/op 867.43 ns/op 4.01
Buffer.toString(base64) 581.91 ns/op 183.88 ns/op 3.16
nodejs block root to RootHex using toHex 624.73 ns/op 154.69 ns/op 4.04
nodejs block root to RootHex using toRootHex 342.93 ns/op 96.509 ns/op 3.55
browser block root to RootHex using the deprecated toHexString 817.11 ns/op 224.06 ns/op 3.65
browser block root to RootHex using toHex 634.84 ns/op 183.61 ns/op 3.46
browser block root to RootHex using toRootHex 571.36 ns/op 160.37 ns/op 3.56
Full benchmark results
Benchmark suite Current: cc5c38a Previous: 2e5265b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 5.1187 ms/op 1.9106 ms/op 2.68
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 221.15 us/op 45.485 us/op 4.86
BLS verify - blst 1.9514 ms/op 705.97 us/op 2.76
BLS verifyMultipleSignatures 3 - blst 4.3017 ms/op 1.1527 ms/op 3.73
BLS verifyMultipleSignatures 8 - blst 7.0629 ms/op 1.6375 ms/op 4.31
BLS verifyMultipleSignatures 32 - blst 22.968 ms/op 4.7806 ms/op 4.80
BLS verifyMultipleSignatures 64 - blst 44.939 ms/op 8.9230 ms/op 5.04
BLS verifyMultipleSignatures 128 - blst 82.759 ms/op 17.000 ms/op 4.87
BLS deserializing 10000 signatures 2.3749 s/op 674.17 ms/op 3.52
BLS deserializing 100000 signatures 20.119 s/op 6.7303 s/op 2.99
BLS verifyMultipleSignatures - same message - 3 - blst 2.5055 ms/op 872.35 us/op 2.87
BLS verifyMultipleSignatures - same message - 8 - blst 2.9063 ms/op 1.0108 ms/op 2.88
BLS verifyMultipleSignatures - same message - 32 - blst 5.2746 ms/op 1.6781 ms/op 3.14
BLS verifyMultipleSignatures - same message - 64 - blst 8.4347 ms/op 2.5408 ms/op 3.32
BLS verifyMultipleSignatures - same message - 128 - blst 10.170 ms/op 4.2463 ms/op 2.40
BLS aggregatePubkeys 32 - blst 69.289 us/op 19.073 us/op 3.63
BLS aggregatePubkeys 128 - blst 235.48 us/op 68.246 us/op 3.45
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 151.38 ms/op 63.527 ms/op 2.38
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 154.21 ms/op 47.301 ms/op 3.26
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 127.37 ms/op 36.716 ms/op 3.47
getSlashingsAndExits - default max 380.70 us/op 86.584 us/op 4.40
getSlashingsAndExits - 2k 949.80 us/op 256.36 us/op 3.70
proposeBlockBody type=full, size=empty 19.405 ms/op 5.7276 ms/op 3.39
isKnown best case - 1 super set check 1.1840 us/op 273.00 ns/op 4.34
isKnown normal case - 2 super set checks 1.1470 us/op 267.00 ns/op 4.30
isKnown worse case - 16 super set checks 1.2760 us/op 271.00 ns/op 4.71
InMemoryCheckpointStateCache - add get delete 11.194 us/op 2.9680 us/op 3.77
updateUnfinalizedPubkeys - updating 10 pubkeys 3.1415 ms/op 787.66 us/op 3.99
updateUnfinalizedPubkeys - updating 100 pubkeys 13.347 ms/op 3.3386 ms/op 4.00
updateUnfinalizedPubkeys - updating 1000 pubkeys 236.63 ms/op 50.318 ms/op 4.70
validate api signedAggregateAndProof - struct 7.0148 ms/op 1.3548 ms/op 5.18
validate gossip signedAggregateAndProof - struct 6.4776 ms/op 1.3324 ms/op 4.86
batch validate gossip attestation - vc 640000 - chunk 32 540.64 us/op 120.77 us/op 4.48
batch validate gossip attestation - vc 640000 - chunk 64 330.91 us/op 111.30 us/op 2.97
batch validate gossip attestation - vc 640000 - chunk 128 283.73 us/op 107.82 us/op 2.63
batch validate gossip attestation - vc 640000 - chunk 256 242.96 us/op 101.30 us/op 2.40
pickEth1Vote - no votes 2.6591 ms/op 1.0309 ms/op 2.58
pickEth1Vote - max votes 21.137 ms/op 6.0681 ms/op 3.48
pickEth1Vote - Eth1Data hashTreeRoot value x2048 35.399 ms/op 15.522 ms/op 2.28
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 38.726 ms/op 18.882 ms/op 2.05
pickEth1Vote - Eth1Data fastSerialize value x2048 1.0683 ms/op 460.93 us/op 2.32
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.6254 ms/op 4.1122 ms/op 2.10
bytes32 toHexString 1.0520 us/op 423.00 ns/op 2.49
bytes32 Buffer.toString(hex) 582.00 ns/op 248.00 ns/op 2.35
bytes32 Buffer.toString(hex) from Uint8Array 979.00 ns/op 377.00 ns/op 2.60
bytes32 Buffer.toString(hex) + 0x 650.00 ns/op 252.00 ns/op 2.58
Object access 1 prop 0.39100 ns/op 0.13900 ns/op 2.81
Map access 1 prop 0.30200 ns/op 0.13200 ns/op 2.29
Object get x1000 11.337 ns/op 5.9270 ns/op 1.91
Map get x1000 10.170 ns/op 6.2940 ns/op 1.62
Object set x1000 73.709 ns/op 31.695 ns/op 2.33
Map set x1000 40.396 ns/op 21.607 ns/op 1.87
Return object 10000 times 0.46590 ns/op 0.28240 ns/op 1.65
Throw Error 10000 times 6.9627 us/op 3.2823 us/op 2.12
toHex 265.99 ns/op 154.22 ns/op 1.72
Buffer.from 299.25 ns/op 136.88 ns/op 2.19
shared Buffer 217.48 ns/op 89.600 ns/op 2.43
fastMsgIdFn sha256 / 200 bytes 3.9120 us/op 2.1540 us/op 1.82
fastMsgIdFn h32 xxhash / 200 bytes 362.00 ns/op 220.00 ns/op 1.65
fastMsgIdFn h64 xxhash / 200 bytes 472.00 ns/op 255.00 ns/op 1.85
fastMsgIdFn sha256 / 1000 bytes 14.881 us/op 7.0130 us/op 2.12
fastMsgIdFn h32 xxhash / 1000 bytes 722.00 ns/op 340.00 ns/op 2.12
fastMsgIdFn h64 xxhash / 1000 bytes 706.00 ns/op 334.00 ns/op 2.11
fastMsgIdFn sha256 / 10000 bytes 144.78 us/op 62.078 us/op 2.33
fastMsgIdFn h32 xxhash / 10000 bytes 3.8460 us/op 1.7240 us/op 2.23
fastMsgIdFn h64 xxhash / 10000 bytes 2.8590 us/op 1.1390 us/op 2.51
send data - 1000 256B messages 31.923 ms/op 11.658 ms/op 2.74
send data - 1000 512B messages 40.549 ms/op 14.782 ms/op 2.74
send data - 1000 1024B messages 69.686 ms/op 24.380 ms/op 2.86
send data - 1000 1200B messages 61.221 ms/op 26.105 ms/op 2.35
send data - 1000 2048B messages 69.214 ms/op 30.605 ms/op 2.26
send data - 1000 4096B messages 80.554 ms/op 29.947 ms/op 2.69
send data - 1000 16384B messages 209.86 ms/op 70.462 ms/op 2.98
send data - 1000 65536B messages 1.1545 s/op 218.24 ms/op 5.29
enrSubnets - fastDeserialize 64 bits 3.3220 us/op 1.0890 us/op 3.05
enrSubnets - ssz BitVector 64 bits 1.0780 us/op 334.00 ns/op 3.23
enrSubnets - fastDeserialize 4 bits 448.00 ns/op 139.00 ns/op 3.22
enrSubnets - ssz BitVector 4 bits 784.00 ns/op 339.00 ns/op 2.31
prioritizePeers score -10:0 att 32-0.1 sync 2-0 292.69 us/op 147.69 us/op 1.98
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 344.22 us/op 148.65 us/op 2.32
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 625.38 us/op 242.20 us/op 2.58
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 1.2342 ms/op 400.56 us/op 3.08
prioritizePeers score 0:0 att 64-1 sync 4-1 1.4039 ms/op 609.90 us/op 2.30
array of 16000 items push then shift 5.3852 us/op 1.6177 us/op 3.33
LinkedList of 16000 items push then shift 19.769 ns/op 6.9440 ns/op 2.85
array of 16000 items push then pop 267.51 ns/op 114.02 ns/op 2.35
LinkedList of 16000 items push then pop 15.810 ns/op 6.8190 ns/op 2.32
array of 24000 items push then shift 4.7749 us/op 2.3857 us/op 2.00
LinkedList of 24000 items push then shift 15.659 ns/op 6.9090 ns/op 2.27
array of 24000 items push then pop 315.76 ns/op 143.72 ns/op 2.20
LinkedList of 24000 items push then pop 15.616 ns/op 6.7660 ns/op 2.31
intersect bitArray bitLen 8 16.842 ns/op 6.2670 ns/op 2.69
intersect array and set length 8 90.406 ns/op 44.892 ns/op 2.01
intersect bitArray bitLen 128 63.492 ns/op 29.197 ns/op 2.17
intersect array and set length 128 1.3094 us/op 663.73 ns/op 1.97
bitArray.getTrueBitIndexes() bitLen 128 5.0300 us/op 2.0020 us/op 2.51
bitArray.getTrueBitIndexes() bitLen 248 5.4780 us/op 2.7880 us/op 1.96
bitArray.getTrueBitIndexes() bitLen 512 14.218 us/op 5.8460 us/op 2.43
Buffer.concat 32 items 3.2760 us/op 879.00 ns/op 3.73
Uint8Array.set 32 items 3.1540 us/op 1.4300 us/op 2.21
Buffer.copy 3.9740 us/op 1.5040 us/op 2.64
Uint8Array.set - with subarray 5.7880 us/op 2.2250 us/op 2.60
Uint8Array.set - without subarray 3.0650 us/op 1.1940 us/op 2.57
getUint32 - dataview 659.00 ns/op 221.00 ns/op 2.98
getUint32 - manual 472.00 ns/op 141.00 ns/op 3.35
Set add up to 64 items then delete first 5.5755 us/op 2.0969 us/op 2.66
OrderedSet add up to 64 items then delete first 9.4551 us/op 3.1563 us/op 3.00
Set add up to 64 items then delete last 5.0723 us/op 2.4003 us/op 2.11
OrderedSet add up to 64 items then delete last 10.132 us/op 3.7027 us/op 2.74
Set add up to 64 items then delete middle 6.3831 us/op 2.4462 us/op 2.61
OrderedSet add up to 64 items then delete middle 11.291 us/op 5.0942 us/op 2.22
Set add up to 128 items then delete first 15.820 us/op 4.8092 us/op 3.29
OrderedSet add up to 128 items then delete first 20.005 us/op 6.9556 us/op 2.88
Set add up to 128 items then delete last 15.032 us/op 4.8433 us/op 3.10
OrderedSet add up to 128 items then delete last 18.531 us/op 7.3495 us/op 2.52
Set add up to 128 items then delete middle 10.014 us/op 4.7519 us/op 2.11
OrderedSet add up to 128 items then delete middle 36.761 us/op 13.105 us/op 2.81
Set add up to 256 items then delete first 25.457 us/op 9.6078 us/op 2.65
OrderedSet add up to 256 items then delete first 44.795 us/op 14.497 us/op 3.09
Set add up to 256 items then delete last 26.972 us/op 9.5841 us/op 2.81
OrderedSet add up to 256 items then delete last 40.663 us/op 14.908 us/op 2.73
Set add up to 256 items then delete middle 27.776 us/op 9.6047 us/op 2.89
OrderedSet add up to 256 items then delete middle 100.37 us/op 39.315 us/op 2.55
transfer serialized Status (84 B) 3.4890 us/op 1.3030 us/op 2.68
copy serialized Status (84 B) 2.8100 us/op 1.0450 us/op 2.69
transfer serialized SignedVoluntaryExit (112 B) 3.9220 us/op 1.3680 us/op 2.87
copy serialized SignedVoluntaryExit (112 B) 3.4360 us/op 1.0890 us/op 3.16
transfer serialized ProposerSlashing (416 B) 4.6310 us/op 1.5180 us/op 3.05
copy serialized ProposerSlashing (416 B) 4.7740 us/op 1.9620 us/op 2.43
transfer serialized Attestation (485 B) 5.7690 us/op 1.9460 us/op 2.96
copy serialized Attestation (485 B) 4.7620 us/op 2.0230 us/op 2.35
transfer serialized AttesterSlashing (33232 B) 6.8420 us/op 2.5760 us/op 2.66
copy serialized AttesterSlashing (33232 B) 15.833 us/op 6.4090 us/op 2.47
transfer serialized Small SignedBeaconBlock (128000 B) 7.9310 us/op 2.5150 us/op 3.15
copy serialized Small SignedBeaconBlock (128000 B) 42.733 us/op 17.015 us/op 2.51
transfer serialized Avg SignedBeaconBlock (200000 B) 9.9730 us/op 2.9040 us/op 3.43
copy serialized Avg SignedBeaconBlock (200000 B) 70.976 us/op 22.199 us/op 3.20
transfer serialized BlobsSidecar (524380 B) 10.180 us/op 2.4650 us/op 4.13
copy serialized BlobsSidecar (524380 B) 217.91 us/op 203.84 us/op 1.07
transfer serialized Big SignedBeaconBlock (1000000 B) 10.814 us/op 2.8850 us/op 3.75
copy serialized Big SignedBeaconBlock (1000000 B) 378.97 us/op 148.46 us/op 2.55
pass gossip attestations to forkchoice per slot 10.304 ms/op 2.7928 ms/op 3.69
forkChoice updateHead vc 100000 bc 64 eq 0 1.7086 ms/op 448.16 us/op 3.81
forkChoice updateHead vc 600000 bc 64 eq 0 11.732 ms/op 2.6426 ms/op 4.44
forkChoice updateHead vc 1000000 bc 64 eq 0 15.734 ms/op 4.7497 ms/op 3.31
forkChoice updateHead vc 600000 bc 320 eq 0 10.737 ms/op 2.6412 ms/op 4.07
forkChoice updateHead vc 600000 bc 1200 eq 0 12.968 ms/op 2.8108 ms/op 4.61
forkChoice updateHead vc 600000 bc 7200 eq 0 10.452 ms/op 3.2127 ms/op 3.25
forkChoice updateHead vc 600000 bc 64 eq 1000 37.522 ms/op 10.395 ms/op 3.61
forkChoice updateHead vc 600000 bc 64 eq 10000 38.668 ms/op 10.067 ms/op 3.84
forkChoice updateHead vc 600000 bc 64 eq 300000 54.651 ms/op 13.382 ms/op 4.08
computeDeltas 500000 validators 300 proto nodes 12.001 ms/op 3.8727 ms/op 3.10
computeDeltas 500000 validators 1200 proto nodes 12.305 ms/op 3.9015 ms/op 3.15
computeDeltas 500000 validators 7200 proto nodes 12.627 ms/op 3.8872 ms/op 3.25
computeDeltas 750000 validators 300 proto nodes 16.780 ms/op 5.7349 ms/op 2.93
computeDeltas 750000 validators 1200 proto nodes 16.899 ms/op 5.8157 ms/op 2.91
computeDeltas 750000 validators 7200 proto nodes 16.373 ms/op 5.7781 ms/op 2.83
computeDeltas 1400000 validators 300 proto nodes 34.134 ms/op 10.917 ms/op 3.13
computeDeltas 1400000 validators 1200 proto nodes 29.160 ms/op 10.892 ms/op 2.68
computeDeltas 1400000 validators 7200 proto nodes 32.318 ms/op 10.921 ms/op 2.96
computeDeltas 2100000 validators 300 proto nodes 45.260 ms/op 16.200 ms/op 2.79
computeDeltas 2100000 validators 1200 proto nodes 50.068 ms/op 16.350 ms/op 3.06
computeDeltas 2100000 validators 7200 proto nodes 46.163 ms/op 16.332 ms/op 2.83
altair processAttestation - 250000 vs - 7PWei normalcase 5.5664 ms/op 1.8563 ms/op 3.00
altair processAttestation - 250000 vs - 7PWei worstcase 3.6678 ms/op 2.7594 ms/op 1.33
altair processAttestation - setStatus - 1/6 committees join 293.40 us/op 119.37 us/op 2.46
altair processAttestation - setStatus - 1/3 committees join 509.87 us/op 228.21 us/op 2.23
altair processAttestation - setStatus - 1/2 committees join 718.44 us/op 320.78 us/op 2.24
altair processAttestation - setStatus - 2/3 committees join 1.1163 ms/op 410.32 us/op 2.72
altair processAttestation - setStatus - 4/5 committees join 1.4103 ms/op 569.19 us/op 2.48
altair processAttestation - setStatus - 100% committees join 2.0995 ms/op 669.31 us/op 3.14
altair processBlock - 250000 vs - 7PWei normalcase 10.610 ms/op 4.7251 ms/op 2.25
altair processBlock - 250000 vs - 7PWei normalcase hashState 57.893 ms/op 27.491 ms/op 2.11
altair processBlock - 250000 vs - 7PWei worstcase 69.782 ms/op 30.747 ms/op 2.27
altair processBlock - 250000 vs - 7PWei worstcase hashState 183.57 ms/op 68.855 ms/op 2.67
phase0 processBlock - 250000 vs - 7PWei normalcase 6.2531 ms/op 1.6138 ms/op 3.87
phase0 processBlock - 250000 vs - 7PWei worstcase 44.942 ms/op 19.414 ms/op 2.31
altair processEth1Data - 250000 vs - 7PWei normalcase 550.92 us/op 302.53 us/op 1.82
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.6610 us/op 4.8990 us/op 1.97
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 48.469 us/op 27.224 us/op 1.78
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.240 us/op 8.5550 us/op 1.20
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 13.427 us/op 5.0680 us/op 2.65
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 404.26 us/op 113.18 us/op 3.57
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 3.2478 ms/op 1.0894 ms/op 2.98
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 3.2506 ms/op 1.4814 ms/op 2.19
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 4.3501 ms/op 1.4673 ms/op 2.96
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 10.611 ms/op 3.6411 ms/op 2.91
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 4.1697 ms/op 1.5472 ms/op 2.70
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 10.452 ms/op 3.6768 ms/op 2.84
Tree 40 250000 create 546.14 ms/op 219.15 ms/op 2.49
Tree 40 250000 get(125000) 362.03 ns/op 141.68 ns/op 2.56
Tree 40 250000 set(125000) 939.21 ns/op 642.25 ns/op 1.46
Tree 40 250000 toArray() 36.182 ms/op 14.920 ms/op 2.42
Tree 40 250000 iterate all - toArray() + loop 31.009 ms/op 14.649 ms/op 2.12
Tree 40 250000 iterate all - get(i) 131.26 ms/op 50.201 ms/op 2.61
Array 250000 create 4.0346 ms/op 2.7622 ms/op 1.46
Array 250000 clone - spread 1.6750 ms/op 1.4527 ms/op 1.15
Array 250000 get(125000) 0.61200 ns/op 0.41200 ns/op 1.49
Array 250000 set(125000) 1.0250 ns/op 0.43100 ns/op 2.38
Array 250000 iterate all - loop 296.93 us/op 81.256 us/op 3.65
phase0 afterProcessEpoch - 250000 vs - 7PWei 160.19 ms/op 47.876 ms/op 3.35
Array.fill - length 1000000 11.695 ms/op 3.5911 ms/op 3.26
Array push - length 1000000 56.860 ms/op 12.393 ms/op 4.59
Array.get 0.72055 ns/op 0.26163 ns/op 2.75
Uint8Array.get 0.98739 ns/op 0.41989 ns/op 2.35
phase0 beforeProcessEpoch - 250000 vs - 7PWei 33.805 ms/op 16.383 ms/op 2.06
altair processEpoch - mainnet_e81889 726.16 ms/op 280.43 ms/op 2.59
mainnet_e81889 - altair beforeProcessEpoch 24.934 ms/op 17.766 ms/op 1.40
mainnet_e81889 - altair processJustificationAndFinalization 40.588 us/op 12.112 us/op 3.35
mainnet_e81889 - altair processInactivityUpdates 16.568 ms/op 5.0529 ms/op 3.28
mainnet_e81889 - altair processRewardsAndPenalties 91.476 ms/op 44.895 ms/op 2.04
mainnet_e81889 - altair processRegistryUpdates 3.6540 us/op 1.6090 us/op 2.27
mainnet_e81889 - altair processSlashings 1.2420 us/op 347.00 ns/op 3.58
mainnet_e81889 - altair processEth1DataReset 745.00 ns/op 306.00 ns/op 2.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.5929 ms/op 1.9291 ms/op 1.86
mainnet_e81889 - altair processSlashingsReset 4.6140 us/op 2.7690 us/op 1.67
mainnet_e81889 - altair processRandaoMixesReset 9.3190 us/op 5.0280 us/op 1.85
mainnet_e81889 - altair processHistoricalRootsUpdate 985.00 ns/op 500.00 ns/op 1.97
mainnet_e81889 - altair processParticipationFlagUpdates 1.7530 us/op 2.0250 us/op 0.87
mainnet_e81889 - altair processSyncCommitteeUpdates 602.00 ns/op 430.00 ns/op 1.40
mainnet_e81889 - altair afterProcessEpoch 77.040 ms/op 49.775 ms/op 1.55
capella processEpoch - mainnet_e217614 1.3813 s/op 1.0315 s/op 1.34
mainnet_e217614 - capella beforeProcessEpoch 121.95 ms/op 72.849 ms/op 1.67
mainnet_e217614 - capella processJustificationAndFinalization 15.849 us/op 13.642 us/op 1.16
mainnet_e217614 - capella processInactivityUpdates 23.899 ms/op 16.665 ms/op 1.43
mainnet_e217614 - capella processRewardsAndPenalties 283.33 ms/op 222.56 ms/op 1.27
mainnet_e217614 - capella processRegistryUpdates 14.253 us/op 12.651 us/op 1.13
mainnet_e217614 - capella processSlashings 383.00 ns/op 366.00 ns/op 1.05
mainnet_e217614 - capella processEth1DataReset 361.00 ns/op 338.00 ns/op 1.07
mainnet_e217614 - capella processEffectiveBalanceUpdates 8.6522 ms/op 11.482 ms/op 0.75
mainnet_e217614 - capella processSlashingsReset 3.4060 us/op 3.3110 us/op 1.03
mainnet_e217614 - capella processRandaoMixesReset 13.785 us/op 3.7910 us/op 3.64
mainnet_e217614 - capella processHistoricalRootsUpdate 1.0400 us/op 369.00 ns/op 2.82
mainnet_e217614 - capella processParticipationFlagUpdates 3.3240 us/op 2.0760 us/op 1.60
mainnet_e217614 - capella afterProcessEpoch 204.86 ms/op 121.22 ms/op 1.69
phase0 processEpoch - mainnet_e58758 619.08 ms/op 327.32 ms/op 1.89
mainnet_e58758 - phase0 beforeProcessEpoch 131.04 ms/op 66.395 ms/op 1.97
mainnet_e58758 - phase0 processJustificationAndFinalization 20.375 us/op 14.126 us/op 1.44
mainnet_e58758 - phase0 processRewardsAndPenalties 28.057 ms/op 29.650 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 10.210 us/op 6.7860 us/op 1.50
mainnet_e58758 - phase0 processSlashings 420.00 ns/op 399.00 ns/op 1.05
mainnet_e58758 - phase0 processEth1DataReset 493.00 ns/op 320.00 ns/op 1.54
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.4125 ms/op 1.7039 ms/op 0.83
mainnet_e58758 - phase0 processSlashingsReset 3.7490 us/op 2.9450 us/op 1.27
mainnet_e58758 - phase0 processRandaoMixesReset 4.1330 us/op 3.8560 us/op 1.07
mainnet_e58758 - phase0 processHistoricalRootsUpdate 504.00 ns/op 404.00 ns/op 1.25
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.6710 us/op 2.8540 us/op 2.34
mainnet_e58758 - phase0 afterProcessEpoch 115.72 ms/op 42.547 ms/op 2.72
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8174 ms/op 1.8034 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.4506 ms/op 2.2071 ms/op 1.56
altair processInactivityUpdates - 250000 normalcase 38.088 ms/op 14.361 ms/op 2.65
altair processInactivityUpdates - 250000 worstcase 40.988 ms/op 14.474 ms/op 2.83
phase0 processRegistryUpdates - 250000 normalcase 22.197 us/op 6.3980 us/op 3.47
phase0 processRegistryUpdates - 250000 badcase_full_deposits 553.88 us/op 238.07 us/op 2.33
phase0 processRegistryUpdates - 250000 worstcase 0.5 237.06 ms/op 121.30 ms/op 1.95
altair processRewardsAndPenalties - 250000 normalcase 93.281 ms/op 27.551 ms/op 3.39
altair processRewardsAndPenalties - 250000 worstcase 76.157 ms/op 37.436 ms/op 2.03
phase0 getAttestationDeltas - 250000 normalcase 19.677 ms/op 7.4162 ms/op 2.65
phase0 getAttestationDeltas - 250000 worstcase 13.353 ms/op 7.0716 ms/op 1.89
phase0 processSlashings - 250000 worstcase 166.68 us/op 78.678 us/op 2.12
altair processSyncCommitteeUpdates - 250000 366.82 ms/op 123.70 ms/op 2.97
BeaconState.hashTreeRoot - No change 882.00 ns/op 249.00 ns/op 3.54
BeaconState.hashTreeRoot - 1 full validator 301.21 us/op 111.51 us/op 2.70
BeaconState.hashTreeRoot - 32 full validator 2.5998 ms/op 1.1640 ms/op 2.23
BeaconState.hashTreeRoot - 512 full validator 32.109 ms/op 9.7886 ms/op 3.28
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 337.19 us/op 152.31 us/op 2.21
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 5.0494 ms/op 1.6681 ms/op 3.03
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 53.333 ms/op 22.163 ms/op 2.41
BeaconState.hashTreeRoot - 1 balances 236.88 us/op 110.13 us/op 2.15
BeaconState.hashTreeRoot - 32 balances 2.5258 ms/op 896.23 us/op 2.82
BeaconState.hashTreeRoot - 512 balances 18.227 ms/op 7.7297 ms/op 2.36
BeaconState.hashTreeRoot - 250000 balances 408.68 ms/op 176.30 ms/op 2.32
aggregationBits - 2048 els - zipIndexesInBitList 69.794 us/op 23.091 us/op 3.02
byteArrayEquals 32 172.12 ns/op 57.192 ns/op 3.01
Buffer.compare 32 56.969 ns/op 17.055 ns/op 3.34
byteArrayEquals 1024 4.6286 us/op 1.5664 us/op 2.95
Buffer.compare 1024 82.941 ns/op 24.600 ns/op 3.37
byteArrayEquals 16384 78.284 us/op 24.935 us/op 3.14
Buffer.compare 16384 680.55 ns/op 186.09 ns/op 3.66
byteArrayEquals 123687377 346.24 ms/op 187.59 ms/op 1.85
Buffer.compare 123687377 9.2983 ms/op 6.4598 ms/op 1.44
byteArrayEquals 32 - diff last byte 107.21 ns/op 51.675 ns/op 2.07
Buffer.compare 32 - diff last byte 36.460 ns/op 16.848 ns/op 2.16
byteArrayEquals 1024 - diff last byte 3.0737 us/op 1.5551 us/op 1.98
Buffer.compare 1024 - diff last byte 57.254 ns/op 24.753 ns/op 2.31
byteArrayEquals 16384 - diff last byte 59.786 us/op 24.793 us/op 2.41
Buffer.compare 16384 - diff last byte 460.97 ns/op 192.31 ns/op 2.40
byteArrayEquals 123687377 - diff last byte 339.95 ms/op 191.89 ms/op 1.77
Buffer.compare 123687377 - diff last byte 10.381 ms/op 6.4832 ms/op 1.60
byteArrayEquals 32 - random bytes 9.8410 ns/op 5.2490 ns/op 1.87
Buffer.compare 32 - random bytes 21.570 ns/op 17.655 ns/op 1.22
byteArrayEquals 1024 - random bytes 7.9100 ns/op 5.2360 ns/op 1.51
Buffer.compare 1024 - random bytes 25.476 ns/op 17.450 ns/op 1.46
byteArrayEquals 16384 - random bytes 9.6400 ns/op 5.1730 ns/op 1.86
Buffer.compare 16384 - random bytes 37.071 ns/op 17.337 ns/op 2.14
byteArrayEquals 123687377 - random bytes 14.030 ns/op 6.4900 ns/op 2.16
Buffer.compare 123687377 - random bytes 55.990 ns/op 18.700 ns/op 2.99
regular array get 100000 times 86.487 us/op 43.104 us/op 2.01
wrappedArray get 100000 times 55.477 us/op 34.078 us/op 1.63
arrayWithProxy get 100000 times 30.646 ms/op 13.837 ms/op 2.21
ssz.Root.equals 70.305 ns/op 46.910 ns/op 1.50
byteArrayEquals 61.645 ns/op 46.231 ns/op 1.33
Buffer.compare 15.631 ns/op 10.505 ns/op 1.49
processSlot - 1 slots 28.691 us/op 13.911 us/op 2.06
processSlot - 32 slots 4.7356 ms/op 2.6823 ms/op 1.77
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 78.331 ms/op 36.212 ms/op 2.16
getCommitteeAssignments - req 1 vs - 250000 vc 8.4355 ms/op 2.0609 ms/op 4.09
getCommitteeAssignments - req 100 vs - 250000 vc 15.805 ms/op 3.9873 ms/op 3.96
getCommitteeAssignments - req 1000 vs - 250000 vc 13.664 ms/op 4.1699 ms/op 3.28
findModifiedValidators - 10000 modified validators 998.33 ms/op 226.75 ms/op 4.40
findModifiedValidators - 1000 modified validators 1.1434 s/op 164.65 ms/op 6.94
findModifiedValidators - 100 modified validators 560.57 ms/op 153.96 ms/op 3.64
findModifiedValidators - 10 modified validators 523.53 ms/op 152.26 ms/op 3.44
findModifiedValidators - 1 modified validators 516.31 ms/op 152.23 ms/op 3.39
findModifiedValidators - no difference 474.75 ms/op 168.35 ms/op 2.82
compare ViewDUs 6.3924 s/op 2.9207 s/op 2.19
compare each validator Uint8Array 2.9311 s/op 1.5692 s/op 1.87
compare ViewDU to Uint8Array 3.0608 s/op 1.0075 s/op 3.04
migrate state 1000000 validators, 24 modified, 0 new 2.5311 s/op 761.69 ms/op 3.32
migrate state 1000000 validators, 1700 modified, 1000 new 2.9535 s/op 961.73 ms/op 3.07
migrate state 1000000 validators, 3400 modified, 2000 new 3.5177 s/op 1.1539 s/op 3.05
migrate state 1500000 validators, 24 modified, 0 new 2.2836 s/op 717.28 ms/op 3.18
migrate state 1500000 validators, 1700 modified, 1000 new 2.9277 s/op 987.65 ms/op 2.96
migrate state 1500000 validators, 3400 modified, 2000 new 3.3526 s/op 1.1428 s/op 2.93
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 14.310 ns/op 4.2800 ns/op 3.34
state getBlockRootAtSlot - 250000 vs - 7PWei 1.9649 us/op 716.59 ns/op 2.74
computeProposers - vc 250000 27.949 ms/op 6.7528 ms/op 4.14
computeEpochShuffling - vc 250000 150.60 ms/op 40.061 ms/op 3.76
getNextSyncCommittee - vc 250000 425.35 ms/op 126.99 ms/op 3.35
computeSigningRoot for AttestationData 69.873 us/op 24.968 us/op 2.80
hash AttestationData serialized data then Buffer.toString(base64) 5.4162 us/op 1.5227 us/op 3.56
toHexString serialized data 3.4826 us/op 867.43 ns/op 4.01
Buffer.toString(base64) 581.91 ns/op 183.88 ns/op 3.16
nodejs block root to RootHex using toHex 624.73 ns/op 154.69 ns/op 4.04
nodejs block root to RootHex using toRootHex 342.93 ns/op 96.509 ns/op 3.55
browser block root to RootHex using the deprecated toHexString 817.11 ns/op 224.06 ns/op 3.65
browser block root to RootHex using toHex 634.84 ns/op 183.61 ns/op 3.46
browser block root to RootHex using toRootHex 571.36 ns/op 160.37 ns/op 3.56

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
@ensi321 ensi321 marked this pull request as ready for review November 6, 2024 15:20
@ensi321 ensi321 requested a review from a team as a code owner November 6, 2024 15:20
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