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 35 commits into
base: devnet-5
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 Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 19ee284 Previous: 25c2ee5 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.0555 ms/op 1.9392 ms/op 1.06
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 42.228 us/op 43.709 us/op 0.97
BLS verify - blst 892.38 us/op 758.45 us/op 1.18
BLS verifyMultipleSignatures 3 - blst 1.3788 ms/op 1.1392 ms/op 1.21
BLS verifyMultipleSignatures 8 - blst 1.8997 ms/op 1.6111 ms/op 1.18
BLS verifyMultipleSignatures 32 - blst 5.0369 ms/op 4.7233 ms/op 1.07
BLS verifyMultipleSignatures 64 - blst 8.5839 ms/op 8.8395 ms/op 0.97
BLS verifyMultipleSignatures 128 - blst 16.808 ms/op 16.762 ms/op 1.00
BLS deserializing 10000 signatures 647.72 ms/op 667.45 ms/op 0.97
BLS deserializing 100000 signatures 6.4744 s/op 6.8311 s/op 0.95
BLS verifyMultipleSignatures - same message - 3 - blst 889.60 us/op 941.34 us/op 0.95
BLS verifyMultipleSignatures - same message - 8 - blst 1.0863 ms/op 1.0598 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst 1.6704 ms/op 1.7221 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.5406 ms/op 2.6352 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst 4.1971 ms/op 4.4194 ms/op 0.95
BLS aggregatePubkeys 32 - blst 18.420 us/op 19.713 us/op 0.93
BLS aggregatePubkeys 128 - blst 63.833 us/op 70.130 us/op 0.91
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 71.458 ms/op 52.783 ms/op 1.35
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 49.628 ms/op 61.743 ms/op 0.80
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 46.582 ms/op 38.793 ms/op 1.20
getSlashingsAndExits - default max 63.743 us/op 98.766 us/op 0.65
getSlashingsAndExits - 2k 247.40 us/op 350.39 us/op 0.71
proposeBlockBody type=full, size=empty 4.6848 ms/op 6.5631 ms/op 0.71
isKnown best case - 1 super set check 493.00 ns/op 329.00 ns/op 1.50
isKnown normal case - 2 super set checks 485.00 ns/op 336.00 ns/op 1.44
isKnown worse case - 16 super set checks 480.00 ns/op 303.00 ns/op 1.58
InMemoryCheckpointStateCache - add get delete 3.5320 us/op 3.0060 us/op 1.17
updateUnfinalizedPubkeys - updating 10 pubkeys 721.10 us/op 968.09 us/op 0.74
updateUnfinalizedPubkeys - updating 100 pubkeys 2.5023 ms/op 3.6743 ms/op 0.68
updateUnfinalizedPubkeys - updating 1000 pubkeys 39.031 ms/op 52.970 ms/op 0.74
validate api signedAggregateAndProof - struct 1.5236 ms/op 1.3824 ms/op 1.10
validate gossip signedAggregateAndProof - struct 1.5069 ms/op 1.4387 ms/op 1.05
batch validate gossip attestation - vc 640000 - chunk 32 120.74 us/op 123.57 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 64 109.22 us/op 108.26 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 128 93.333 us/op 109.69 us/op 0.85
batch validate gossip attestation - vc 640000 - chunk 256 93.211 us/op 103.58 us/op 0.90
pickEth1Vote - no votes 897.71 us/op 1.1594 ms/op 0.77
pickEth1Vote - max votes 5.5206 ms/op 7.0794 ms/op 0.78
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.296 ms/op 17.201 ms/op 0.83
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.888 ms/op 22.483 ms/op 0.88
pickEth1Vote - Eth1Data fastSerialize value x2048 335.10 us/op 539.55 us/op 0.62
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.6932 ms/op 5.0929 ms/op 0.53
bytes32 toHexString 575.00 ns/op 435.00 ns/op 1.32
bytes32 Buffer.toString(hex) 422.00 ns/op 255.00 ns/op 1.65
bytes32 Buffer.toString(hex) from Uint8Array 528.00 ns/op 358.00 ns/op 1.47
bytes32 Buffer.toString(hex) + 0x 424.00 ns/op 251.00 ns/op 1.69
Object access 1 prop 0.31900 ns/op 0.14000 ns/op 2.28
Map access 1 prop 0.32000 ns/op 0.13200 ns/op 2.42
Object get x1000 5.0560 ns/op 5.8530 ns/op 0.86
Map get x1000 5.6600 ns/op 6.3010 ns/op 0.90
Object set x1000 25.586 ns/op 45.077 ns/op 0.57
Map set x1000 19.042 ns/op 28.940 ns/op 0.66
Return object 10000 times 0.29690 ns/op 0.30030 ns/op 0.99
Throw Error 10000 times 2.6831 us/op 3.3739 us/op 0.80
toHex 108.81 ns/op 176.27 ns/op 0.62
Buffer.from 100.97 ns/op 163.55 ns/op 0.62
shared Buffer 71.152 ns/op 103.34 ns/op 0.69
fastMsgIdFn sha256 / 200 bytes 1.9670 us/op 2.3440 us/op 0.84
fastMsgIdFn h32 xxhash / 200 bytes 399.00 ns/op 287.00 ns/op 1.39
fastMsgIdFn h64 xxhash / 200 bytes 444.00 ns/op 288.00 ns/op 1.54
fastMsgIdFn sha256 / 1000 bytes 5.9520 us/op 7.4140 us/op 0.80
fastMsgIdFn h32 xxhash / 1000 bytes 537.00 ns/op 414.00 ns/op 1.30
fastMsgIdFn h64 xxhash / 1000 bytes 512.00 ns/op 351.00 ns/op 1.46
fastMsgIdFn sha256 / 10000 bytes 49.044 us/op 64.026 us/op 0.77
fastMsgIdFn h32 xxhash / 10000 bytes 1.9060 us/op 1.9210 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 1.3340 us/op 1.2330 us/op 1.08
send data - 1000 256B messages 9.5669 ms/op 13.525 ms/op 0.71
send data - 1000 512B messages 12.846 ms/op 17.269 ms/op 0.74
send data - 1000 1024B messages 20.543 ms/op 27.303 ms/op 0.75
send data - 1000 1200B messages 22.781 ms/op 19.474 ms/op 1.17
send data - 1000 2048B messages 28.321 ms/op 31.897 ms/op 0.89
send data - 1000 4096B messages 27.257 ms/op 31.012 ms/op 0.88
send data - 1000 16384B messages 60.322 ms/op 67.051 ms/op 0.90
send data - 1000 65536B messages 240.76 ms/op 199.23 ms/op 1.21
enrSubnets - fastDeserialize 64 bits 1.1410 us/op 1.0980 us/op 1.04
enrSubnets - ssz BitVector 64 bits 533.00 ns/op 372.00 ns/op 1.43
enrSubnets - fastDeserialize 4 bits 338.00 ns/op 162.00 ns/op 2.09
enrSubnets - ssz BitVector 4 bits 541.00 ns/op 372.00 ns/op 1.45
prioritizePeers score -10:0 att 32-0.1 sync 2-0 121.54 us/op 152.48 us/op 0.80
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 172.40 us/op 152.39 us/op 1.13
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 250.47 us/op 246.72 us/op 1.02
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 478.91 us/op 414.05 us/op 1.16
prioritizePeers score 0:0 att 64-1 sync 4-1 632.92 us/op 601.56 us/op 1.05
array of 16000 items push then shift 1.2575 us/op 1.6888 us/op 0.74
LinkedList of 16000 items push then shift 7.3160 ns/op 7.6010 ns/op 0.96
array of 16000 items push then pop 85.963 ns/op 125.49 ns/op 0.69
LinkedList of 16000 items push then pop 6.1530 ns/op 7.4100 ns/op 0.83
array of 24000 items push then shift 1.7799 us/op 2.4679 us/op 0.72
LinkedList of 24000 items push then shift 6.7430 ns/op 7.6400 ns/op 0.88
array of 24000 items push then pop 110.40 ns/op 166.54 ns/op 0.66
LinkedList of 24000 items push then pop 6.0210 ns/op 7.4470 ns/op 0.81
intersect bitArray bitLen 8 5.3750 ns/op 6.5870 ns/op 0.82
intersect array and set length 8 39.607 ns/op 46.634 ns/op 0.85
intersect bitArray bitLen 128 25.591 ns/op 29.705 ns/op 0.86
intersect array and set length 128 565.46 ns/op 687.28 ns/op 0.82
bitArray.getTrueBitIndexes() bitLen 128 2.3260 us/op 1.7350 us/op 1.34
bitArray.getTrueBitIndexes() bitLen 248 3.2800 us/op 3.5170 us/op 0.93
bitArray.getTrueBitIndexes() bitLen 512 8.3690 us/op 7.1450 us/op 1.17
Buffer.concat 32 items 1.1000 us/op 974.00 ns/op 1.13
Uint8Array.set 32 items 1.4550 us/op 1.6920 us/op 0.86
Buffer.copy 1.4940 us/op 1.9060 us/op 0.78
Uint8Array.set - with subarray 1.9180 us/op 2.8260 us/op 0.68
Uint8Array.set - without subarray 1.3230 us/op 1.5680 us/op 0.84
getUint32 - dataview 409.00 ns/op 264.00 ns/op 1.55
getUint32 - manual 333.00 ns/op 172.00 ns/op 1.94
Set add up to 64 items then delete first 1.7437 us/op 2.2436 us/op 0.78
OrderedSet add up to 64 items then delete first 2.7372 us/op 3.4037 us/op 0.80
Set add up to 64 items then delete last 1.9689 us/op 2.5686 us/op 0.77
OrderedSet add up to 64 items then delete last 3.0059 us/op 4.0455 us/op 0.74
Set add up to 64 items then delete middle 1.9728 us/op 2.6041 us/op 0.76
OrderedSet add up to 64 items then delete middle 4.3666 us/op 5.5001 us/op 0.79
Set add up to 128 items then delete first 3.8975 us/op 5.2212 us/op 0.75
OrderedSet add up to 128 items then delete first 6.1728 us/op 7.4580 us/op 0.83
Set add up to 128 items then delete last 3.7638 us/op 5.4177 us/op 0.69
OrderedSet add up to 128 items then delete last 5.7764 us/op 7.9275 us/op 0.73
Set add up to 128 items then delete middle 3.7671 us/op 4.9760 us/op 0.76
OrderedSet add up to 128 items then delete middle 11.619 us/op 13.781 us/op 0.84
Set add up to 256 items then delete first 7.9553 us/op 10.782 us/op 0.74
OrderedSet add up to 256 items then delete first 12.626 us/op 15.661 us/op 0.81
Set add up to 256 items then delete last 7.7146 us/op 10.499 us/op 0.73
OrderedSet add up to 256 items then delete last 11.905 us/op 15.875 us/op 0.75
Set add up to 256 items then delete middle 7.7044 us/op 10.205 us/op 0.75
OrderedSet add up to 256 items then delete middle 34.721 us/op 40.557 us/op 0.86
transfer serialized Status (84 B) 1.4520 us/op 1.3640 us/op 1.06
copy serialized Status (84 B) 1.2740 us/op 1.2390 us/op 1.03
transfer serialized SignedVoluntaryExit (112 B) 1.4890 us/op 1.6320 us/op 0.91
copy serialized SignedVoluntaryExit (112 B) 1.2140 us/op 1.3280 us/op 0.91
transfer serialized ProposerSlashing (416 B) 1.7470 us/op 1.8810 us/op 0.93
copy serialized ProposerSlashing (416 B) 1.6370 us/op 1.9410 us/op 0.84
transfer serialized Attestation (485 B) 2.0420 us/op 1.8700 us/op 1.09
copy serialized Attestation (485 B) 1.9120 us/op 1.8110 us/op 1.06
transfer serialized AttesterSlashing (33232 B) 2.3060 us/op 2.2660 us/op 1.02
copy serialized AttesterSlashing (33232 B) 4.3930 us/op 5.4710 us/op 0.80
transfer serialized Small SignedBeaconBlock (128000 B) 2.6260 us/op 3.2060 us/op 0.82
copy serialized Small SignedBeaconBlock (128000 B) 9.9910 us/op 19.032 us/op 0.52
transfer serialized Avg SignedBeaconBlock (200000 B) 2.7320 us/op 4.5530 us/op 0.60
copy serialized Avg SignedBeaconBlock (200000 B) 13.884 us/op 27.905 us/op 0.50
transfer serialized BlobsSidecar (524380 B) 2.8110 us/op 3.1540 us/op 0.89
copy serialized BlobsSidecar (524380 B) 110.32 us/op 82.555 us/op 1.34
transfer serialized Big SignedBeaconBlock (1000000 B) 2.6930 us/op 2.6440 us/op 1.02
copy serialized Big SignedBeaconBlock (1000000 B) 136.29 us/op 222.11 us/op 0.61
pass gossip attestations to forkchoice per slot 2.4190 ms/op 2.8148 ms/op 0.86
forkChoice updateHead vc 100000 bc 64 eq 0 355.56 us/op 444.89 us/op 0.80
forkChoice updateHead vc 600000 bc 64 eq 0 2.8059 ms/op 2.8132 ms/op 1.00
forkChoice updateHead vc 1000000 bc 64 eq 0 3.7059 ms/op 4.8467 ms/op 0.76
forkChoice updateHead vc 600000 bc 320 eq 0 2.0790 ms/op 2.8516 ms/op 0.73
forkChoice updateHead vc 600000 bc 1200 eq 0 2.1347 ms/op 2.8909 ms/op 0.74
forkChoice updateHead vc 600000 bc 7200 eq 0 2.8224 ms/op 3.3225 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 1000 8.9854 ms/op 10.344 ms/op 0.87
forkChoice updateHead vc 600000 bc 64 eq 10000 8.9205 ms/op 10.717 ms/op 0.83
forkChoice updateHead vc 600000 bc 64 eq 300000 11.268 ms/op 13.503 ms/op 0.83
computeDeltas 500000 validators 300 proto nodes 3.2339 ms/op 3.9685 ms/op 0.81
computeDeltas 500000 validators 1200 proto nodes 3.2021 ms/op 3.9902 ms/op 0.80
computeDeltas 500000 validators 7200 proto nodes 3.2596 ms/op 4.1140 ms/op 0.79
computeDeltas 750000 validators 300 proto nodes 4.7922 ms/op 5.9279 ms/op 0.81
computeDeltas 750000 validators 1200 proto nodes 4.9487 ms/op 5.9474 ms/op 0.83
computeDeltas 750000 validators 7200 proto nodes 4.7983 ms/op 5.9845 ms/op 0.80
computeDeltas 1400000 validators 300 proto nodes 9.2828 ms/op 11.322 ms/op 0.82
computeDeltas 1400000 validators 1200 proto nodes 9.1316 ms/op 11.371 ms/op 0.80
computeDeltas 1400000 validators 7200 proto nodes 9.3473 ms/op 11.196 ms/op 0.83
computeDeltas 2100000 validators 300 proto nodes 14.317 ms/op 17.038 ms/op 0.84
computeDeltas 2100000 validators 1200 proto nodes 13.763 ms/op 16.589 ms/op 0.83
computeDeltas 2100000 validators 7200 proto nodes 13.738 ms/op 16.361 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei normalcase 1.3783 ms/op 1.9029 ms/op 0.72
altair processAttestation - 250000 vs - 7PWei worstcase 2.1137 ms/op 2.5582 ms/op 0.83
altair processAttestation - setStatus - 1/6 committees join 62.617 us/op 87.042 us/op 0.72
altair processAttestation - setStatus - 1/3 committees join 141.94 us/op 181.14 us/op 0.78
altair processAttestation - setStatus - 1/2 committees join 196.03 us/op 243.90 us/op 0.80
altair processAttestation - setStatus - 2/3 committees join 264.44 us/op 319.95 us/op 0.83
altair processAttestation - setStatus - 4/5 committees join 396.35 us/op 448.97 us/op 0.88
altair processAttestation - setStatus - 100% committees join 467.58 us/op 543.43 us/op 0.86
altair processBlock - 250000 vs - 7PWei normalcase 4.3834 ms/op 5.8064 ms/op 0.75
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.759 ms/op 25.345 ms/op 0.98
altair processBlock - 250000 vs - 7PWei worstcase 38.611 ms/op 31.729 ms/op 1.22
altair processBlock - 250000 vs - 7PWei worstcase hashState 71.755 ms/op 61.498 ms/op 1.17
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8331 ms/op 1.6901 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei worstcase 21.726 ms/op 19.515 ms/op 1.11
altair processEth1Data - 250000 vs - 7PWei normalcase 261.83 us/op 312.05 us/op 0.84
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.6570 us/op 5.2620 us/op 0.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 29.129 us/op 34.342 us/op 0.85
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.9660 us/op 8.6090 us/op 1.04
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.9730 us/op 5.5600 us/op 0.89
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 122.33 us/op 128.74 us/op 0.95
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3279 ms/op 1.0314 ms/op 1.29
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0559 ms/op 1.5189 ms/op 0.70
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.0936 ms/op 1.4575 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.8962 ms/op 3.6539 ms/op 0.79
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.2249 ms/op 1.5573 ms/op 0.79
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.0214 ms/op 3.8880 ms/op 0.78
Tree 40 250000 create 190.93 ms/op 214.76 ms/op 0.89
Tree 40 250000 get(125000) 112.60 ns/op 148.03 ns/op 0.76
Tree 40 250000 set(125000) 593.36 ns/op 732.45 ns/op 0.81
Tree 40 250000 toArray() 9.6086 ms/op 20.196 ms/op 0.48
Tree 40 250000 iterate all - toArray() + loop 9.3304 ms/op 17.037 ms/op 0.55
Tree 40 250000 iterate all - get(i) 39.261 ms/op 50.518 ms/op 0.78
Array 250000 create 2.2540 ms/op 2.9219 ms/op 0.77
Array 250000 clone - spread 1.1238 ms/op 1.3226 ms/op 0.85
Array 250000 get(125000) 0.58500 ns/op 0.42200 ns/op 1.39
Array 250000 set(125000) 0.59300 ns/op 0.47100 ns/op 1.26
Array 250000 iterate all - loop 77.732 us/op 105.36 us/op 0.74
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.645 ms/op 49.106 ms/op 0.87
Array.fill - length 1000000 2.4115 ms/op 3.2852 ms/op 0.73
Array push - length 1000000 14.964 ms/op 16.757 ms/op 0.89
Array.get 0.26227 ns/op 0.27177 ns/op 0.97
Uint8Array.get 0.33743 ns/op 0.42495 ns/op 0.79
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.789 ms/op 15.898 ms/op 1.06
altair processEpoch - mainnet_e81889 271.34 ms/op 283.49 ms/op 0.96
mainnet_e81889 - altair beforeProcessEpoch 19.992 ms/op 18.433 ms/op 1.08
mainnet_e81889 - altair processJustificationAndFinalization 5.7280 us/op 12.057 us/op 0.48
mainnet_e81889 - altair processInactivityUpdates 4.2969 ms/op 5.5356 ms/op 0.78
mainnet_e81889 - altair processRewardsAndPenalties 42.909 ms/op 34.793 ms/op 1.23
mainnet_e81889 - altair processRegistryUpdates 1.7120 us/op 1.8780 us/op 0.91
mainnet_e81889 - altair processSlashings 780.00 ns/op 417.00 ns/op 1.87
mainnet_e81889 - altair processEth1DataReset 671.00 ns/op 322.00 ns/op 2.08
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4083 ms/op 1.3700 ms/op 1.03
mainnet_e81889 - altair processSlashingsReset 2.2650 us/op 4.2280 us/op 0.54
mainnet_e81889 - altair processRandaoMixesReset 2.6870 us/op 4.2280 us/op 0.64
mainnet_e81889 - altair processHistoricalRootsUpdate 680.00 ns/op 517.00 ns/op 1.32
mainnet_e81889 - altair processParticipationFlagUpdates 1.4800 us/op 1.9420 us/op 0.76
mainnet_e81889 - altair processSyncCommitteeUpdates 638.00 ns/op 401.00 ns/op 1.59
mainnet_e81889 - altair afterProcessEpoch 41.591 ms/op 50.178 ms/op 0.83
capella processEpoch - mainnet_e217614 950.55 ms/op 1.0220 s/op 0.93
mainnet_e217614 - capella beforeProcessEpoch 67.105 ms/op 64.682 ms/op 1.04
mainnet_e217614 - capella processJustificationAndFinalization 6.1290 us/op 15.222 us/op 0.40
mainnet_e217614 - capella processInactivityUpdates 14.707 ms/op 15.879 ms/op 0.93
mainnet_e217614 - capella processRewardsAndPenalties 241.81 ms/op 216.90 ms/op 1.11
mainnet_e217614 - capella processRegistryUpdates 11.835 us/op 11.935 us/op 0.99
mainnet_e217614 - capella processSlashings 740.00 ns/op 348.00 ns/op 2.13
mainnet_e217614 - capella processEth1DataReset 669.00 ns/op 308.00 ns/op 2.17
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.871 ms/op 12.134 ms/op 0.98
mainnet_e217614 - capella processSlashingsReset 2.2020 us/op 2.9550 us/op 0.75
mainnet_e217614 - capella processRandaoMixesReset 3.0570 us/op 4.0780 us/op 0.75
mainnet_e217614 - capella processHistoricalRootsUpdate 704.00 ns/op 498.00 ns/op 1.41
mainnet_e217614 - capella processParticipationFlagUpdates 1.3330 us/op 1.8180 us/op 0.73
mainnet_e217614 - capella afterProcessEpoch 102.66 ms/op 120.14 ms/op 0.85
phase0 processEpoch - mainnet_e58758 298.65 ms/op 339.14 ms/op 0.88
mainnet_e58758 - phase0 beforeProcessEpoch 74.210 ms/op 72.867 ms/op 1.02
mainnet_e58758 - phase0 processJustificationAndFinalization 13.286 us/op 15.301 us/op 0.87
mainnet_e58758 - phase0 processRewardsAndPenalties 30.040 ms/op 29.402 ms/op 1.02
mainnet_e58758 - phase0 processRegistryUpdates 6.0970 us/op 7.7050 us/op 0.79
mainnet_e58758 - phase0 processSlashings 816.00 ns/op 347.00 ns/op 2.35
mainnet_e58758 - phase0 processEth1DataReset 734.00 ns/op 366.00 ns/op 2.01
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.7171 ms/op 1.1944 ms/op 1.44
mainnet_e58758 - phase0 processSlashingsReset 2.0450 us/op 3.4230 us/op 0.60
mainnet_e58758 - phase0 processRandaoMixesReset 2.9340 us/op 3.7040 us/op 0.79
mainnet_e58758 - phase0 processHistoricalRootsUpdate 660.00 ns/op 297.00 ns/op 2.22
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.5820 us/op 2.9940 us/op 0.86
mainnet_e58758 - phase0 afterProcessEpoch 35.829 ms/op 41.917 ms/op 0.85
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3971 ms/op 1.3928 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7282 ms/op 2.3783 ms/op 0.73
altair processInactivityUpdates - 250000 normalcase 16.865 ms/op 14.981 ms/op 1.13
altair processInactivityUpdates - 250000 worstcase 17.297 ms/op 15.010 ms/op 1.15
phase0 processRegistryUpdates - 250000 normalcase 6.1140 us/op 5.8030 us/op 1.05
phase0 processRegistryUpdates - 250000 badcase_full_deposits 297.99 us/op 222.01 us/op 1.34
phase0 processRegistryUpdates - 250000 worstcase 0.5 107.16 ms/op 104.72 ms/op 1.02
altair processRewardsAndPenalties - 250000 normalcase 48.393 ms/op 30.106 ms/op 1.61
altair processRewardsAndPenalties - 250000 worstcase 44.059 ms/op 36.437 ms/op 1.21
phase0 getAttestationDeltas - 250000 normalcase 5.8722 ms/op 6.9900 ms/op 0.84
phase0 getAttestationDeltas - 250000 worstcase 5.9392 ms/op 6.9305 ms/op 0.86
phase0 processSlashings - 250000 worstcase 89.679 us/op 76.705 us/op 1.17
altair processSyncCommitteeUpdates - 250000 101.74 ms/op 117.36 ms/op 0.87
BeaconState.hashTreeRoot - No change 457.00 ns/op 258.00 ns/op 1.77
BeaconState.hashTreeRoot - 1 full validator 138.14 us/op 122.00 us/op 1.13
BeaconState.hashTreeRoot - 32 full validator 1.4964 ms/op 1.4034 ms/op 1.07
BeaconState.hashTreeRoot - 512 full validator 10.796 ms/op 9.0865 ms/op 1.19
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 171.27 us/op 123.58 us/op 1.39
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7281 ms/op 1.5124 ms/op 1.14
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.014 ms/op 22.417 ms/op 1.03
BeaconState.hashTreeRoot - 1 balances 109.11 us/op 88.375 us/op 1.23
BeaconState.hashTreeRoot - 32 balances 988.02 us/op 837.26 us/op 1.18
BeaconState.hashTreeRoot - 512 balances 7.7792 ms/op 7.6953 ms/op 1.01
BeaconState.hashTreeRoot - 250000 balances 164.17 ms/op 167.88 ms/op 0.98
aggregationBits - 2048 els - zipIndexesInBitList 19.619 us/op 46.494 us/op 0.42
byteArrayEquals 32 48.158 ns/op 54.998 ns/op 0.88
Buffer.compare 32 16.233 ns/op 16.872 ns/op 0.96
byteArrayEquals 1024 1.2728 us/op 1.5492 us/op 0.82
Buffer.compare 1024 24.331 ns/op 24.852 ns/op 0.98
byteArrayEquals 16384 20.179 us/op 24.642 us/op 0.82
Buffer.compare 16384 205.71 ns/op 200.25 ns/op 1.03
byteArrayEquals 123687377 152.02 ms/op 186.36 ms/op 0.82
Buffer.compare 123687377 5.4768 ms/op 6.0616 ms/op 0.90
byteArrayEquals 32 - diff last byte 45.132 ns/op 51.453 ns/op 0.88
Buffer.compare 32 - diff last byte 15.547 ns/op 17.051 ns/op 0.91
byteArrayEquals 1024 - diff last byte 1.1983 us/op 1.5802 us/op 0.76
Buffer.compare 1024 - diff last byte 22.838 ns/op 24.890 ns/op 0.92
byteArrayEquals 16384 - diff last byte 19.142 us/op 25.174 us/op 0.76
Buffer.compare 16384 - diff last byte 165.92 ns/op 201.68 ns/op 0.82
byteArrayEquals 123687377 - diff last byte 146.32 ms/op 187.06 ms/op 0.78
Buffer.compare 123687377 - diff last byte 4.1687 ms/op 6.4409 ms/op 0.65
byteArrayEquals 32 - random bytes 4.9780 ns/op 5.0780 ns/op 0.98
Buffer.compare 32 - random bytes 16.771 ns/op 16.796 ns/op 1.00
byteArrayEquals 1024 - random bytes 4.9520 ns/op 5.0420 ns/op 0.98
Buffer.compare 1024 - random bytes 16.550 ns/op 16.782 ns/op 0.99
byteArrayEquals 16384 - random bytes 4.9630 ns/op 5.0460 ns/op 0.98
Buffer.compare 16384 - random bytes 16.505 ns/op 16.930 ns/op 0.97
byteArrayEquals 123687377 - random bytes 7.8100 ns/op 6.3900 ns/op 1.22
Buffer.compare 123687377 - random bytes 19.350 ns/op 18.170 ns/op 1.06
regular array get 100000 times 31.162 us/op 33.013 us/op 0.94
wrappedArray get 100000 times 31.133 us/op 32.552 us/op 0.96
arrayWithProxy get 100000 times 11.124 ms/op 13.081 ms/op 0.85
ssz.Root.equals 44.989 ns/op 45.150 ns/op 1.00
byteArrayEquals 39.367 ns/op 44.493 ns/op 0.88
Buffer.compare 9.2940 ns/op 10.150 ns/op 0.92
processSlot - 1 slots 15.477 us/op 13.188 us/op 1.17
processSlot - 32 slots 2.2560 ms/op 2.9112 ms/op 0.77
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 38.765 ms/op 36.615 ms/op 1.06
getCommitteeAssignments - req 1 vs - 250000 vc 1.8268 ms/op 2.0394 ms/op 0.90
getCommitteeAssignments - req 100 vs - 250000 vc 3.5446 ms/op 3.9935 ms/op 0.89
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8159 ms/op 4.2468 ms/op 0.90
findModifiedValidators - 10000 modified validators 243.54 ms/op 240.57 ms/op 1.01
findModifiedValidators - 1000 modified validators 163.27 ms/op 165.93 ms/op 0.98
findModifiedValidators - 100 modified validators 145.12 ms/op 146.62 ms/op 0.99
findModifiedValidators - 10 modified validators 166.12 ms/op 141.86 ms/op 1.17
findModifiedValidators - 1 modified validators 146.78 ms/op 137.65 ms/op 1.07
findModifiedValidators - no difference 142.89 ms/op 145.45 ms/op 0.98
compare ViewDUs 3.5307 s/op 2.8751 s/op 1.23
compare each validator Uint8Array 1.5125 s/op 1.6409 s/op 0.92
compare ViewDU to Uint8Array 845.74 ms/op 937.43 ms/op 0.90
migrate state 1000000 validators, 24 modified, 0 new 691.92 ms/op 729.44 ms/op 0.95
migrate state 1000000 validators, 1700 modified, 1000 new 954.95 ms/op 967.07 ms/op 0.99
migrate state 1000000 validators, 3400 modified, 2000 new 1.1903 s/op 1.1626 s/op 1.02
migrate state 1500000 validators, 24 modified, 0 new 702.30 ms/op 713.82 ms/op 0.98
migrate state 1500000 validators, 1700 modified, 1000 new 891.13 ms/op 946.18 ms/op 0.94
migrate state 1500000 validators, 3400 modified, 2000 new 1.1787 s/op 1.1576 s/op 1.02
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 7.0800 ns/op 4.1800 ns/op 1.69
state getBlockRootAtSlot - 250000 vs - 7PWei 395.30 ns/op 693.33 ns/op 0.57
computeProposers - vc 250000 6.2046 ms/op 6.6118 ms/op 0.94
computeEpochShuffling - vc 250000 36.359 ms/op 40.555 ms/op 0.90
getNextSyncCommittee - vc 250000 106.34 ms/op 116.23 ms/op 0.91
computeSigningRoot for AttestationData 21.945 us/op 22.905 us/op 0.96
hash AttestationData serialized data then Buffer.toString(base64) 1.2503 us/op 1.5285 us/op 0.82
toHexString serialized data 792.71 ns/op 837.86 ns/op 0.95
Buffer.toString(base64) 137.27 ns/op 181.12 ns/op 0.76
nodejs block root to RootHex using toHex 120.29 ns/op 175.36 ns/op 0.69
nodejs block root to RootHex using toRootHex 81.749 ns/op 88.733 ns/op 0.92
browser block root to RootHex using the deprecated toHexString 210.79 ns/op 217.99 ns/op 0.97
browser block root to RootHex using toHex 165.40 ns/op 174.69 ns/op 0.95
browser block root to RootHex using toRootHex 154.68 ns/op 156.66 ns/op 0.99

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
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 - should clean up remaining TODOs before merging

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 26.04651% with 159 lines in your changes missing coverage. Please review.

Project coverage is 49.01%. Comparing base (25c2ee5) to head (8340137).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7126      +/-   ##
============================================
- Coverage     49.08%   49.01%   -0.08%     
============================================
  Files           600      602       +2     
  Lines         40241    40426     +185     
  Branches       2111     2113       +2     
============================================
+ Hits          19753    19815      +62     
- Misses        20450    20573     +123     
  Partials         38       38              
---- 🚨 Try these New Features:

@twoeths
Copy link
Contributor Author

twoeths commented Nov 20, 2024

lgtm, but I'm concerned that we have no way to verify this PR before devnet 5. Ideally we should have an e2e test to replace phase0 one to let it run until finalized

@ensi321
Copy link
Contributor

ensi321 commented Nov 20, 2024

lgtm, but I'm concerned that we have no way to verify this PR before devnet 5. Ideally we should have an e2e test to replace phase0 one to let it run until finalized

I think we should make a devnet-5 branch and merge this PR into that instead.

@ensi321 ensi321 changed the base branch from unstable to devnet-5 November 20, 2024 16:05
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