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: add devnet-5 support #7246

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

feat: add devnet-5 support #7246

wants to merge 10 commits into from

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Nov 26, 2024

No description provided.

* feat: refactor SeenAttestationDatas for SinlgeAttestation

* feat: add SingleAttestation type

* feat: ssz utils for SingleAttestation

* feat: implement SingleAttestation for network processor and gossip queue

* fix: add SingleAttestation for phase0 and altair

* fix: define and publish SingleAttestation for all forks

* Fix electra SingleAttestation type mapping

* Update api and eventstream

* Update validator client

* Update attestation unit test variables

* chore: SeenAttestationDatas unit tests

* chore: sszBytes unit tests

* Use CommitteeIndex type

* refactor: get/set functions of SeenAttestationDatas

* Always emit single_attestation event

* Validation use new SeenAttDataKey

* validateAttestationNoSignatureCheck first draft

* Add aggregation and committee bits to cache

* AttestationPool accepts SingleAttestation

* Update SingleAttestation event stream

* Update aggregate validation

* Polish

* Lint

* fix check-types

* Remove committee bit cache

* Update attestation pool unit tests

* Lint

* Remove unused committeeBits from attestation data cache

* Fix spec reference comment

* fix: getSeenAttDataKeyFromSignedAggregateAndProof

* Update beacon-api spec tests to run against v3.0.0-alpha.9

---------

Co-authored-by: Nico Flaig <[email protected]>
Co-authored-by: NC <[email protected]>
Copy link
Contributor

github-actions bot commented Nov 26, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 9dd8e2e Previous: 64eb015 Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 11.327 ms/op 37.084 ms/op 0.31
Array push - length 1000000 10.206 ms/op 40.846 ms/op 0.25
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6493 ms/op 5.0592 ms/op 0.33
Full benchmark results
Benchmark suite Current: 9dd8e2e Previous: 64eb015 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.9151 ms/op 2.1753 ms/op 0.88
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 52.828 us/op 67.606 us/op 0.78
BLS verify - blst 915.01 us/op 916.60 us/op 1.00
BLS verifyMultipleSignatures 3 - blst 1.4988 ms/op 1.3247 ms/op 1.13
BLS verifyMultipleSignatures 8 - blst 2.0344 ms/op 1.9759 ms/op 1.03
BLS verifyMultipleSignatures 32 - blst 4.4826 ms/op 7.0878 ms/op 0.63
BLS verifyMultipleSignatures 64 - blst 8.0375 ms/op 10.320 ms/op 0.78
BLS verifyMultipleSignatures 128 - blst 15.313 ms/op 20.134 ms/op 0.76
BLS deserializing 10000 signatures 607.48 ms/op 769.00 ms/op 0.79
BLS deserializing 100000 signatures 6.1681 s/op 7.4681 s/op 0.83
BLS verifyMultipleSignatures - same message - 3 - blst 951.89 us/op 960.70 us/op 0.99
BLS verifyMultipleSignatures - same message - 8 - blst 1.0449 ms/op 1.0181 ms/op 1.03
BLS verifyMultipleSignatures - same message - 32 - blst 1.5422 ms/op 1.7953 ms/op 0.86
BLS verifyMultipleSignatures - same message - 64 - blst 2.4292 ms/op 2.6869 ms/op 0.90
BLS verifyMultipleSignatures - same message - 128 - blst 3.9894 ms/op 4.5014 ms/op 0.89
BLS aggregatePubkeys 32 - blst 17.711 us/op 20.827 us/op 0.85
BLS aggregatePubkeys 128 - blst 61.827 us/op 73.689 us/op 0.84
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 73.559 ms/op 62.278 ms/op 1.18
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 55.238 ms/op 58.530 ms/op 0.94
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 37.363 ms/op 44.326 ms/op 0.84
getSlashingsAndExits - default max 66.189 us/op 116.01 us/op 0.57
getSlashingsAndExits - 2k 349.85 us/op 359.07 us/op 0.97
proposeBlockBody type=full, size=empty 5.8675 ms/op 7.7504 ms/op 0.76
isKnown best case - 1 super set check 772.00 ns/op 526.00 ns/op 1.47
isKnown normal case - 2 super set checks 821.00 ns/op 569.00 ns/op 1.44
isKnown worse case - 16 super set checks 795.00 ns/op 530.00 ns/op 1.50
InMemoryCheckpointStateCache - add get delete 3.7000 us/op 3.5200 us/op 1.05
validate api signedAggregateAndProof - struct 1.6926 ms/op 1.6175 ms/op 1.05
validate gossip signedAggregateAndProof - struct 1.5400 ms/op 1.7813 ms/op 0.86
batch validate gossip attestation - vc 640000 - chunk 32 120.72 us/op 151.31 us/op 0.80
batch validate gossip attestation - vc 640000 - chunk 64 104.18 us/op 140.22 us/op 0.74
batch validate gossip attestation - vc 640000 - chunk 128 93.279 us/op 140.54 us/op 0.66
batch validate gossip attestation - vc 640000 - chunk 256 90.369 us/op 147.98 us/op 0.61
pickEth1Vote - no votes 776.99 us/op 1.5844 ms/op 0.49
pickEth1Vote - max votes 5.4628 ms/op 11.358 ms/op 0.48
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.319 ms/op 21.088 ms/op 0.68
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 15.830 ms/op 33.431 ms/op 0.47
pickEth1Vote - Eth1Data fastSerialize value x2048 364.00 us/op 649.48 us/op 0.56
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.0931 ms/op 4.4810 ms/op 0.69
bytes32 toHexString 601.00 ns/op 854.00 ns/op 0.70
bytes32 Buffer.toString(hex) 434.00 ns/op 315.00 ns/op 1.38
bytes32 Buffer.toString(hex) from Uint8Array 515.00 ns/op 524.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 437.00 ns/op 293.00 ns/op 1.49
Object access 1 prop 0.32400 ns/op 0.20700 ns/op 1.57
Map access 1 prop 0.32200 ns/op 0.16100 ns/op 2.00
Object get x1000 5.6010 ns/op 6.7870 ns/op 0.83
Map get x1000 5.6910 ns/op 7.1870 ns/op 0.79
Object set x1000 22.631 ns/op 63.311 ns/op 0.36
Map set x1000 18.771 ns/op 41.228 ns/op 0.46
Return object 10000 times 0.29100 ns/op 0.33950 ns/op 0.86
Throw Error 10000 times 2.6487 us/op 3.9370 us/op 0.67
toHex 112.89 ns/op 202.49 ns/op 0.56
Buffer.from 106.53 ns/op 192.31 ns/op 0.55
shared Buffer 69.905 ns/op 109.24 ns/op 0.64
fastMsgIdFn sha256 / 200 bytes 2.0140 us/op 2.6760 us/op 0.75
fastMsgIdFn h32 xxhash / 200 bytes 402.00 ns/op 343.00 ns/op 1.17
fastMsgIdFn h64 xxhash / 200 bytes 450.00 ns/op 308.00 ns/op 1.46
fastMsgIdFn sha256 / 1000 bytes 5.9730 us/op 8.5350 us/op 0.70
fastMsgIdFn h32 xxhash / 1000 bytes 548.00 ns/op 523.00 ns/op 1.05
fastMsgIdFn h64 xxhash / 1000 bytes 520.00 ns/op 404.00 ns/op 1.29
fastMsgIdFn sha256 / 10000 bytes 50.001 us/op 70.815 us/op 0.71
fastMsgIdFn h32 xxhash / 10000 bytes 1.9410 us/op 2.1020 us/op 0.92
fastMsgIdFn h64 xxhash / 10000 bytes 1.3330 us/op 1.3850 us/op 0.96
send data - 1000 256B messages 11.386 ms/op 17.917 ms/op 0.64
send data - 1000 512B messages 13.544 ms/op 24.837 ms/op 0.55
send data - 1000 1024B messages 22.479 ms/op 33.736 ms/op 0.67
send data - 1000 1200B messages 24.115 ms/op 37.078 ms/op 0.65
send data - 1000 2048B messages 31.340 ms/op 46.960 ms/op 0.67
send data - 1000 4096B messages 26.292 ms/op 51.288 ms/op 0.51
send data - 1000 16384B messages 60.694 ms/op 99.623 ms/op 0.61
send data - 1000 65536B messages 262.10 ms/op 290.72 ms/op 0.90
enrSubnets - fastDeserialize 64 bits 1.3720 us/op 1.7720 us/op 0.77
enrSubnets - ssz BitVector 64 bits 635.00 ns/op 572.00 ns/op 1.11
enrSubnets - fastDeserialize 4 bits 375.00 ns/op 254.00 ns/op 1.48
enrSubnets - ssz BitVector 4 bits 607.00 ns/op 527.00 ns/op 1.15
prioritizePeers score -10:0 att 32-0.1 sync 2-0 173.47 us/op 280.98 us/op 0.62
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 134.63 us/op 314.94 us/op 0.43
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 295.00 us/op 602.91 us/op 0.49
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 448.40 us/op 615.13 us/op 0.73
prioritizePeers score 0:0 att 64-1 sync 4-1 862.92 us/op 1.2699 ms/op 0.68
array of 16000 items push then shift 1.4021 us/op 1.9536 us/op 0.72
LinkedList of 16000 items push then shift 10.084 ns/op 15.730 ns/op 0.64
array of 16000 items push then pop 144.48 ns/op 229.66 ns/op 0.63
LinkedList of 16000 items push then pop 6.4060 ns/op 12.659 ns/op 0.51
array of 24000 items push then shift 2.0396 us/op 3.0235 us/op 0.67
LinkedList of 24000 items push then shift 6.9160 ns/op 11.867 ns/op 0.58
array of 24000 items push then pop 183.71 ns/op 236.21 ns/op 0.78
LinkedList of 24000 items push then pop 9.5630 ns/op 9.1910 ns/op 1.04
intersect bitArray bitLen 8 5.7090 ns/op 7.4420 ns/op 0.77
intersect array and set length 8 99.478 ns/op 82.874 ns/op 1.20
intersect bitArray bitLen 128 26.469 ns/op 33.126 ns/op 0.80
intersect array and set length 128 990.79 ns/op 1.0180 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 128 3.5720 us/op 2.7610 us/op 1.29
bitArray.getTrueBitIndexes() bitLen 248 4.5380 us/op 5.2900 us/op 0.86
bitArray.getTrueBitIndexes() bitLen 512 10.793 us/op 10.653 us/op 1.01
Buffer.concat 32 items 1.1020 us/op 1.2840 us/op 0.86
Uint8Array.set 32 items 1.8940 us/op 2.1500 us/op 0.88
Buffer.copy 1.9050 us/op 2.5980 us/op 0.73
Uint8Array.set - with subarray 2.7670 us/op 3.7780 us/op 0.73
Uint8Array.set - without subarray 1.7660 us/op 1.9950 us/op 0.89
getUint32 - dataview 441.00 ns/op 389.00 ns/op 1.13
getUint32 - manual 384.00 ns/op 352.00 ns/op 1.09
Set add up to 64 items then delete first 1.8371 us/op 3.3592 us/op 0.55
OrderedSet add up to 64 items then delete first 4.1825 us/op 5.4020 us/op 0.77
Set add up to 64 items then delete last 2.9566 us/op 3.8164 us/op 0.77
OrderedSet add up to 64 items then delete last 4.7485 us/op 5.9708 us/op 0.80
Set add up to 64 items then delete middle 2.9933 us/op 3.9159 us/op 0.76
OrderedSet add up to 64 items then delete middle 6.4657 us/op 8.3545 us/op 0.77
Set add up to 128 items then delete first 5.9967 us/op 8.6570 us/op 0.69
OrderedSet add up to 128 items then delete first 10.281 us/op 12.367 us/op 0.83
Set add up to 128 items then delete last 6.0514 us/op 8.2078 us/op 0.74
OrderedSet add up to 128 items then delete last 9.9068 us/op 12.338 us/op 0.80
Set add up to 128 items then delete middle 6.0882 us/op 7.4449 us/op 0.82
OrderedSet add up to 128 items then delete middle 15.504 us/op 19.338 us/op 0.80
Set add up to 256 items then delete first 11.998 us/op 18.078 us/op 0.66
OrderedSet add up to 256 items then delete first 20.623 us/op 26.396 us/op 0.78
Set add up to 256 items then delete last 12.185 us/op 17.380 us/op 0.70
OrderedSet add up to 256 items then delete last 19.973 us/op 25.308 us/op 0.79
Set add up to 256 items then delete middle 11.771 us/op 15.623 us/op 0.75
OrderedSet add up to 256 items then delete middle 42.373 us/op 53.283 us/op 0.80
transfer serialized Status (84 B) 1.8020 us/op 1.7800 us/op 1.01
copy serialized Status (84 B) 1.6540 us/op 1.5220 us/op 1.09
transfer serialized SignedVoluntaryExit (112 B) 2.0230 us/op 1.7780 us/op 1.14
copy serialized SignedVoluntaryExit (112 B) 1.7110 us/op 1.4860 us/op 1.15
transfer serialized ProposerSlashing (416 B) 2.4040 us/op 2.1510 us/op 1.12
copy serialized ProposerSlashing (416 B) 2.3900 us/op 2.4080 us/op 0.99
transfer serialized Attestation (485 B) 2.2210 us/op 2.3790 us/op 0.93
copy serialized Attestation (485 B) 2.2970 us/op 2.4510 us/op 0.94
transfer serialized AttesterSlashing (33232 B) 2.5550 us/op 2.8990 us/op 0.88
copy serialized AttesterSlashing (33232 B) 6.3930 us/op 10.591 us/op 0.60
transfer serialized Small SignedBeaconBlock (128000 B) 3.3210 us/op 3.9120 us/op 0.85
copy serialized Small SignedBeaconBlock (128000 B) 12.645 us/op 33.139 us/op 0.38
transfer serialized Avg SignedBeaconBlock (200000 B) 2.1980 us/op 4.4310 us/op 0.50
copy serialized Avg SignedBeaconBlock (200000 B) 11.789 us/op 53.401 us/op 0.22
transfer serialized BlobsSidecar (524380 B) 2.6190 us/op 6.5750 us/op 0.40
copy serialized BlobsSidecar (524380 B) 72.578 us/op 165.04 us/op 0.44
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9280 us/op 5.8650 us/op 0.50
copy serialized Big SignedBeaconBlock (1000000 B) 182.51 us/op 551.22 us/op 0.33
pass gossip attestations to forkchoice per slot 2.4254 ms/op 3.3650 ms/op 0.72
forkChoice updateHead vc 100000 bc 64 eq 0 443.74 us/op 1.2806 ms/op 0.35
forkChoice updateHead vc 600000 bc 64 eq 0 2.3687 ms/op 5.2573 ms/op 0.45
forkChoice updateHead vc 1000000 bc 64 eq 0 3.9532 ms/op 6.8726 ms/op 0.58
forkChoice updateHead vc 600000 bc 320 eq 0 2.3413 ms/op 4.0167 ms/op 0.58
forkChoice updateHead vc 600000 bc 1200 eq 0 2.2834 ms/op 4.4697 ms/op 0.51
forkChoice updateHead vc 600000 bc 7200 eq 0 2.8080 ms/op 5.0860 ms/op 0.55
forkChoice updateHead vc 600000 bc 64 eq 1000 9.0753 ms/op 12.335 ms/op 0.74
forkChoice updateHead vc 600000 bc 64 eq 10000 8.9928 ms/op 12.083 ms/op 0.74
forkChoice updateHead vc 600000 bc 64 eq 300000 11.327 ms/op 37.084 ms/op 0.31
computeDeltas 500000 validators 300 proto nodes 3.3274 ms/op 5.2711 ms/op 0.63
computeDeltas 500000 validators 1200 proto nodes 3.2204 ms/op 6.5298 ms/op 0.49
computeDeltas 500000 validators 7200 proto nodes 3.2726 ms/op 6.2988 ms/op 0.52
computeDeltas 750000 validators 300 proto nodes 4.8824 ms/op 8.4042 ms/op 0.58
computeDeltas 750000 validators 1200 proto nodes 4.9259 ms/op 8.5595 ms/op 0.58
computeDeltas 750000 validators 7200 proto nodes 4.9507 ms/op 9.1306 ms/op 0.54
computeDeltas 1400000 validators 300 proto nodes 12.098 ms/op 15.576 ms/op 0.78
computeDeltas 1400000 validators 1200 proto nodes 9.1616 ms/op 12.601 ms/op 0.73
computeDeltas 1400000 validators 7200 proto nodes 9.0383 ms/op 12.897 ms/op 0.70
computeDeltas 2100000 validators 300 proto nodes 13.245 ms/op 18.782 ms/op 0.71
computeDeltas 2100000 validators 1200 proto nodes 13.880 ms/op 19.930 ms/op 0.70
computeDeltas 2100000 validators 7200 proto nodes 13.517 ms/op 19.735 ms/op 0.68
altair processAttestation - 250000 vs - 7PWei normalcase 1.4268 ms/op 2.6254 ms/op 0.54
altair processAttestation - 250000 vs - 7PWei worstcase 2.0895 ms/op 3.1422 ms/op 0.66
altair processAttestation - setStatus - 1/6 committees join 66.510 us/op 113.03 us/op 0.59
altair processAttestation - setStatus - 1/3 committees join 128.51 us/op 215.61 us/op 0.60
altair processAttestation - setStatus - 1/2 committees join 183.94 us/op 280.51 us/op 0.66
altair processAttestation - setStatus - 2/3 committees join 256.53 us/op 396.02 us/op 0.65
altair processAttestation - setStatus - 4/5 committees join 386.01 us/op 578.24 us/op 0.67
altair processAttestation - setStatus - 100% committees join 452.85 us/op 675.72 us/op 0.67
altair processBlock - 250000 vs - 7PWei normalcase 3.4643 ms/op 4.9905 ms/op 0.69
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.297 ms/op 28.637 ms/op 0.92
altair processBlock - 250000 vs - 7PWei worstcase 35.981 ms/op 50.108 ms/op 0.72
altair processBlock - 250000 vs - 7PWei worstcase hashState 70.968 ms/op 87.661 ms/op 0.81
phase0 processBlock - 250000 vs - 7PWei normalcase 1.9892 ms/op 2.7546 ms/op 0.72
phase0 processBlock - 250000 vs - 7PWei worstcase 20.806 ms/op 26.771 ms/op 0.78
altair processEth1Data - 250000 vs - 7PWei normalcase 262.29 us/op 401.89 us/op 0.65
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.8280 us/op 7.1300 us/op 0.68
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 29.767 us/op 47.788 us/op 0.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.8340 us/op 12.593 us/op 0.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.0750 us/op 7.4700 us/op 0.68
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 138.87 us/op 144.32 us/op 0.96
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3678 ms/op 1.2633 ms/op 1.08
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1597 ms/op 1.6843 ms/op 0.69
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2503 ms/op 1.6899 ms/op 0.74
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.7997 ms/op 4.8858 ms/op 0.57
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.2516 ms/op 1.7893 ms/op 0.70
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9235 ms/op 5.8669 ms/op 0.50
Tree 40 250000 create 181.28 ms/op 467.44 ms/op 0.39
Tree 40 250000 get(125000) 116.20 ns/op 170.00 ns/op 0.68
Tree 40 250000 set(125000) 553.73 ns/op 838.71 ns/op 0.66
Tree 40 250000 toArray() 9.9030 ms/op 22.991 ms/op 0.43
Tree 40 250000 iterate all - toArray() + loop 10.126 ms/op 22.693 ms/op 0.45
Tree 40 250000 iterate all - get(i) 45.694 ms/op 62.529 ms/op 0.73
Array 250000 create 2.2668 ms/op 4.1336 ms/op 0.55
Array 250000 clone - spread 1.2804 ms/op 1.7261 ms/op 0.74
Array 250000 get(125000) 0.56500 ns/op 0.50300 ns/op 1.12
Array 250000 set(125000) 0.57100 ns/op 0.51400 ns/op 1.11
Array 250000 iterate all - loop 74.899 us/op 102.71 us/op 0.73
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.005 ms/op 59.003 ms/op 0.68
Array.fill - length 1000000 2.5344 ms/op 6.2827 ms/op 0.40
Array push - length 1000000 10.206 ms/op 40.846 ms/op 0.25
Array.get 0.25680 ns/op 0.32523 ns/op 0.79
Uint8Array.get 0.33044 ns/op 0.47666 ns/op 0.69
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.885 ms/op 25.226 ms/op 0.67
altair processEpoch - mainnet_e81889 258.81 ms/op 359.56 ms/op 0.72
mainnet_e81889 - altair beforeProcessEpoch 15.832 ms/op 23.130 ms/op 0.68
mainnet_e81889 - altair processJustificationAndFinalization 8.9790 us/op 18.893 us/op 0.48
mainnet_e81889 - altair processInactivityUpdates 4.2790 ms/op 7.1031 ms/op 0.60
mainnet_e81889 - altair processRewardsAndPenalties 44.355 ms/op 41.343 ms/op 1.07
mainnet_e81889 - altair processRegistryUpdates 1.7220 us/op 1.9340 us/op 0.89
mainnet_e81889 - altair processSlashings 719.00 ns/op 498.00 ns/op 1.44
mainnet_e81889 - altair processEth1DataReset 641.00 ns/op 410.00 ns/op 1.56
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3807 ms/op 1.9743 ms/op 0.70
mainnet_e81889 - altair processSlashingsReset 1.2880 us/op 2.9260 us/op 0.44
mainnet_e81889 - altair processRandaoMixesReset 2.4900 us/op 3.7430 us/op 0.67
mainnet_e81889 - altair processHistoricalRootsUpdate 725.00 ns/op 428.00 ns/op 1.69
mainnet_e81889 - altair processParticipationFlagUpdates 1.7700 us/op 2.5600 us/op 0.69
mainnet_e81889 - altair processSyncCommitteeUpdates 642.00 ns/op 502.00 ns/op 1.28
mainnet_e81889 - altair afterProcessEpoch 41.881 ms/op 53.537 ms/op 0.78
capella processEpoch - mainnet_e217614 904.25 ms/op 1.1084 s/op 0.82
mainnet_e217614 - capella beforeProcessEpoch 66.301 ms/op 77.539 ms/op 0.86
mainnet_e217614 - capella processJustificationAndFinalization 10.272 us/op 19.776 us/op 0.52
mainnet_e217614 - capella processInactivityUpdates 16.254 ms/op 18.927 ms/op 0.86
mainnet_e217614 - capella processRewardsAndPenalties 223.36 ms/op 230.04 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 6.1230 us/op 15.088 us/op 0.41
mainnet_e217614 - capella processSlashings 749.00 ns/op 562.00 ns/op 1.33
mainnet_e217614 - capella processEth1DataReset 669.00 ns/op 350.00 ns/op 1.91
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.8782 ms/op 17.490 ms/op 0.34
mainnet_e217614 - capella processSlashingsReset 2.5210 us/op 6.6460 us/op 0.38
mainnet_e217614 - capella processRandaoMixesReset 3.1590 us/op 4.8140 us/op 0.66
mainnet_e217614 - capella processHistoricalRootsUpdate 719.00 ns/op 776.00 ns/op 0.93
mainnet_e217614 - capella processParticipationFlagUpdates 1.3460 us/op 2.0480 us/op 0.66
mainnet_e217614 - capella afterProcessEpoch 100.48 ms/op 129.97 ms/op 0.77
phase0 processEpoch - mainnet_e58758 303.74 ms/op 366.05 ms/op 0.83
mainnet_e58758 - phase0 beforeProcessEpoch 75.229 ms/op 81.181 ms/op 0.93
mainnet_e58758 - phase0 processJustificationAndFinalization 12.825 us/op 19.417 us/op 0.66
mainnet_e58758 - phase0 processRewardsAndPenalties 26.035 ms/op 28.654 ms/op 0.91
mainnet_e58758 - phase0 processRegistryUpdates 5.7630 us/op 9.2600 us/op 0.62
mainnet_e58758 - phase0 processSlashings 714.00 ns/op 545.00 ns/op 1.31
mainnet_e58758 - phase0 processEth1DataReset 661.00 ns/op 577.00 ns/op 1.15
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 812.00 us/op 1.3461 ms/op 0.60
mainnet_e58758 - phase0 processSlashingsReset 1.2820 us/op 3.7760 us/op 0.34
mainnet_e58758 - phase0 processRandaoMixesReset 2.6780 us/op 6.0740 us/op 0.44
mainnet_e58758 - phase0 processHistoricalRootsUpdate 703.00 ns/op 532.00 ns/op 1.32
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.7520 us/op 4.0280 us/op 0.68
mainnet_e58758 - phase0 afterProcessEpoch 33.517 ms/op 49.103 ms/op 0.68
phase0 processEffectiveBalanceUpdates - 250000 normalcase 977.79 us/op 1.7299 ms/op 0.57
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6493 ms/op 5.0592 ms/op 0.33
altair processInactivityUpdates - 250000 normalcase 17.208 ms/op 21.355 ms/op 0.81
altair processInactivityUpdates - 250000 worstcase 15.181 ms/op 19.229 ms/op 0.79
phase0 processRegistryUpdates - 250000 normalcase 5.2950 us/op 13.129 us/op 0.40
phase0 processRegistryUpdates - 250000 badcase_full_deposits 304.73 us/op 361.28 us/op 0.84
phase0 processRegistryUpdates - 250000 worstcase 0.5 112.22 ms/op 134.98 ms/op 0.83
altair processRewardsAndPenalties - 250000 normalcase 40.023 ms/op 44.447 ms/op 0.90
altair processRewardsAndPenalties - 250000 worstcase 40.435 ms/op 53.638 ms/op 0.75
phase0 getAttestationDeltas - 250000 normalcase 6.8525 ms/op 12.817 ms/op 0.53
phase0 getAttestationDeltas - 250000 worstcase 6.2779 ms/op 9.7929 ms/op 0.64
phase0 processSlashings - 250000 worstcase 93.779 us/op 110.28 us/op 0.85
altair processSyncCommitteeUpdates - 250000 94.314 ms/op 160.32 ms/op 0.59
BeaconState.hashTreeRoot - No change 422.00 ns/op 314.00 ns/op 1.34
BeaconState.hashTreeRoot - 1 full validator 109.38 us/op 174.79 us/op 0.63
BeaconState.hashTreeRoot - 32 full validator 1.4434 ms/op 1.2350 ms/op 1.17
BeaconState.hashTreeRoot - 512 full validator 10.196 ms/op 12.210 ms/op 0.84
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 141.50 us/op 168.25 us/op 0.84
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2493 ms/op 2.2705 ms/op 0.99
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 25.190 ms/op 27.540 ms/op 0.91
BeaconState.hashTreeRoot - 1 balances 103.84 us/op 122.50 us/op 0.85
BeaconState.hashTreeRoot - 32 balances 979.09 us/op 1.1899 ms/op 0.82
BeaconState.hashTreeRoot - 512 balances 7.2031 ms/op 8.9544 ms/op 0.80
BeaconState.hashTreeRoot - 250000 balances 176.56 ms/op 207.52 ms/op 0.85
aggregationBits - 2048 els - zipIndexesInBitList 20.723 us/op 33.576 us/op 0.62
byteArrayEquals 32 47.494 ns/op 58.719 ns/op 0.81
Buffer.compare 32 15.925 ns/op 19.741 ns/op 0.81
byteArrayEquals 1024 1.2385 us/op 1.8375 us/op 0.67
Buffer.compare 1024 25.372 ns/op 30.693 ns/op 0.83
byteArrayEquals 16384 19.779 us/op 26.878 us/op 0.74
Buffer.compare 16384 174.26 ns/op 212.25 ns/op 0.82
byteArrayEquals 123687377 146.92 ms/op 227.40 ms/op 0.65
Buffer.compare 123687377 3.8873 ms/op 11.411 ms/op 0.34
byteArrayEquals 32 - diff last byte 46.826 ns/op 61.514 ns/op 0.76
Buffer.compare 32 - diff last byte 15.936 ns/op 20.127 ns/op 0.79
byteArrayEquals 1024 - diff last byte 1.2315 us/op 1.8097 us/op 0.68
Buffer.compare 1024 - diff last byte 23.516 ns/op 28.819 ns/op 0.82
byteArrayEquals 16384 - diff last byte 19.582 us/op 27.876 us/op 0.70
Buffer.compare 16384 - diff last byte 198.25 ns/op 210.91 ns/op 0.94
byteArrayEquals 123687377 - diff last byte 147.46 ms/op 204.41 ms/op 0.72
Buffer.compare 123687377 - diff last byte 4.8268 ms/op 9.3300 ms/op 0.52
byteArrayEquals 32 - random bytes 5.2180 ns/op 5.5320 ns/op 0.94
Buffer.compare 32 - random bytes 16.343 ns/op 18.932 ns/op 0.86
byteArrayEquals 1024 - random bytes 4.8210 ns/op 5.6410 ns/op 0.85
Buffer.compare 1024 - random bytes 16.130 ns/op 19.621 ns/op 0.82
byteArrayEquals 16384 - random bytes 4.8490 ns/op 5.6670 ns/op 0.86
Buffer.compare 16384 - random bytes 16.159 ns/op 19.679 ns/op 0.82
byteArrayEquals 123687377 - random bytes 7.8200 ns/op 6.8400 ns/op 1.14
Buffer.compare 123687377 - random bytes 19.820 ns/op 20.070 ns/op 0.99
regular array get 100000 times 30.448 us/op 38.328 us/op 0.79
wrappedArray get 100000 times 30.413 us/op 46.233 us/op 0.66
arrayWithProxy get 100000 times 10.814 ms/op 15.979 ms/op 0.68
ssz.Root.equals 43.438 ns/op 49.039 ns/op 0.89
byteArrayEquals 42.985 ns/op 49.342 ns/op 0.87
Buffer.compare 9.4910 ns/op 11.521 ns/op 0.82
processSlot - 1 slots 9.6460 us/op 16.017 us/op 0.60
processSlot - 32 slots 1.8699 ms/op 3.3897 ms/op 0.55
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 35.057 ms/op 37.336 ms/op 0.94
getCommitteeAssignments - req 1 vs - 250000 vc 1.8141 ms/op 2.1806 ms/op 0.83
getCommitteeAssignments - req 100 vs - 250000 vc 3.5222 ms/op 4.2460 ms/op 0.83
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7875 ms/op 4.5495 ms/op 0.83
findModifiedValidators - 10000 modified validators 237.77 ms/op 299.39 ms/op 0.79
findModifiedValidators - 1000 modified validators 155.54 ms/op 200.36 ms/op 0.78
findModifiedValidators - 100 modified validators 145.32 ms/op 241.35 ms/op 0.60
findModifiedValidators - 10 modified validators 138.31 ms/op 210.53 ms/op 0.66
findModifiedValidators - 1 modified validators 149.14 ms/op 178.62 ms/op 0.83
findModifiedValidators - no difference 144.91 ms/op 194.46 ms/op 0.75
compare ViewDUs 3.4307 s/op 3.5308 s/op 0.97
compare each validator Uint8Array 1.6142 s/op 1.4081 s/op 1.15
compare ViewDU to Uint8Array 691.61 ms/op 1.1004 s/op 0.63
migrate state 1000000 validators, 24 modified, 0 new 671.26 ms/op 710.93 ms/op 0.94
migrate state 1000000 validators, 1700 modified, 1000 new 835.81 ms/op 960.91 ms/op 0.87
migrate state 1000000 validators, 3400 modified, 2000 new 1.1323 s/op 1.2237 s/op 0.93
migrate state 1500000 validators, 24 modified, 0 new 648.61 ms/op 728.41 ms/op 0.89
migrate state 1500000 validators, 1700 modified, 1000 new 835.48 ms/op 936.50 ms/op 0.89
migrate state 1500000 validators, 3400 modified, 2000 new 1.0421 s/op 1.1647 s/op 0.89
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.9500 ns/op 4.8800 ns/op 1.22
state getBlockRootAtSlot - 250000 vs - 7PWei 679.50 ns/op 734.76 ns/op 0.92
computeProposers - vc 250000 5.2789 ms/op 8.2840 ms/op 0.64
computeEpochShuffling - vc 250000 34.057 ms/op 43.527 ms/op 0.78
getNextSyncCommittee - vc 250000 92.205 ms/op 141.99 ms/op 0.65
computeSigningRoot for AttestationData 19.061 us/op 23.428 us/op 0.81
hash AttestationData serialized data then Buffer.toString(base64) 1.1412 us/op 1.6673 us/op 0.68
toHexString serialized data 736.75 ns/op 1.0285 us/op 0.72
Buffer.toString(base64) 135.52 ns/op 196.12 ns/op 0.69
nodejs block root to RootHex using toHex 110.18 ns/op 189.84 ns/op 0.58
nodejs block root to RootHex using toRootHex 75.843 ns/op 96.987 ns/op 0.78
browser block root to RootHex using the deprecated toHexString 206.82 ns/op 259.37 ns/op 0.80
browser block root to RootHex using toHex 162.63 ns/op 186.13 ns/op 0.87
browser block root to RootHex using toRootHex 143.29 ns/op 177.21 ns/op 0.81

by benchmarkbot/action

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 23.75000% with 183 lines in your changes missing coverage. Please review.

Project coverage is 48.42%. Comparing base (64eb015) to head (0346c43).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7246      +/-   ##
============================================
- Coverage     48.51%   48.42%   -0.09%     
============================================
  Files           600      602       +2     
  Lines         40138    40337     +199     
  Branches       2058     2061       +3     
============================================
+ Hits          19471    19535      +64     
- Misses        20629    20764     +135     
  Partials         38       38              

nflaig and others added 7 commits November 28, 2024 08:43
…7256)

* fix: select correct gossip type when publishing single attestation

* Add SingleAttestation as alias to phase0 ssz types
* fix: remove aggregation bits from seen attestation cache

* Allow passing null as aggregationBits to test pre-electra case

* Only create aggregationBits once for the first attestation

* Avoid second getSingleTrueBit call
…#7261)

* fix: return correct type from attestation validation when using cache

* Remove type casts

* Remove unused import

* Use ternary operator instead of if-else

* Fix aggregationBits type issue

* Add comment
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