Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

refactor: reuse utils added in block production race refactor #6422

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Feb 13, 2024

Motivation

De-duplicate some code, consistent logging across bn and vc

Description

#6241 added a util to format block values. This PR just reuses it on the vc side to ensure we have consistent logging.

@nflaig nflaig requested a review from a team as a code owner February 13, 2024 09:20
*/
export function prettyWeiToEth(wei: bigint, suffix = false): string {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed option to omit suffix as it is unused and would just lead to inconsistent logs.

We can discuss how we wanna log ETH values (with / without suffix), I am fine with either as long as we do it consistently.

@@ -74,11 +74,6 @@ export function wrapPromise<T>(promise: PromiseLike<T>): PromiseResult<T> {
return result;
}

/**
* ArrayToTuple converts an `Array<T>` to `[T, ...T]`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment seemed misplaced

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

Merging #6422 (1820535) into unstable (da0bcc8) will decrease coverage by 0.01%.
The diff coverage is 85.71%.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6422      +/-   ##
============================================
- Coverage     61.72%   61.71%   -0.01%     
============================================
  Files           553      553              
  Lines         57856    57839      -17     
  Branches       1829     1829              
============================================
- Hits          35711    35696      -15     
+ Misses        22108    22106       -2     
  Partials         37       37              

Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 9ac7028 Previous: da0bcc8 Ratio
Map set x1000 18.694 ns/op 58.246 ns/op 0.32
Set add up to 64 items then delete first 1.9078 us/op 6.0273 us/op 0.32
Set add up to 128 items then delete first 4.0849 us/op 12.475 us/op 0.33
Set add up to 128 items then delete last 3.9148 us/op 12.098 us/op 0.32
Set add up to 128 items then delete middle 3.9135 us/op 12.104 us/op 0.32
Set add up to 256 items then delete first 8.0765 us/op 24.704 us/op 0.33
forkChoice updateHead vc 600000 bc 64 eq 300000 12.896 ms/op 59.814 ms/op 0.22
Full benchmark results
Benchmark suite Current: 9ac7028 Previous: da0bcc8 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 725.88 us/op 584.31 us/op 1.24
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 53.237 us/op 103.46 us/op 0.51
BLS verify - blst-native 1.1173 ms/op 1.3286 ms/op 0.84
BLS verifyMultipleSignatures 3 - blst-native 2.4022 ms/op 2.7982 ms/op 0.86
BLS verifyMultipleSignatures 8 - blst-native 5.1740 ms/op 6.4121 ms/op 0.81
BLS verifyMultipleSignatures 32 - blst-native 18.945 ms/op 22.588 ms/op 0.84
BLS verifyMultipleSignatures 64 - blst-native 37.394 ms/op 44.555 ms/op 0.84
BLS verifyMultipleSignatures 128 - blst-native 76.961 ms/op 88.253 ms/op 0.87
BLS deserializing 10000 signatures 838.47 ms/op 953.60 ms/op 0.88
BLS deserializing 100000 signatures 8.5832 s/op 9.1787 s/op 0.94
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2979 ms/op 1.3956 ms/op 0.93
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.3436 ms/op 1.5960 ms/op 0.84
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3068 ms/op 2.3926 ms/op 0.96
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.6180 ms/op 3.5314 ms/op 1.31
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.2836 ms/op 5.9130 ms/op 0.89
BLS aggregatePubkeys 32 - blst-native 24.159 us/op 27.189 us/op 0.89
BLS aggregatePubkeys 128 - blst-native 92.551 us/op 104.69 us/op 0.88
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 48.554 ms/op 74.780 ms/op 0.65
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 37.987 ms/op 77.285 ms/op 0.49
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 29.880 ms/op 61.405 ms/op 0.49
getSlashingsAndExits - default max 353.21 us/op 413.90 us/op 0.85
getSlashingsAndExits - 2k 380.75 us/op 601.99 us/op 0.63
proposeBlockBody type=full, size=empty 3.7103 ms/op 7.3645 ms/op 0.50
isKnown best case - 1 super set check 411.00 ns/op 603.00 ns/op 0.68
isKnown normal case - 2 super set checks 465.00 ns/op 638.00 ns/op 0.73
isKnown worse case - 16 super set checks 518.00 ns/op 600.00 ns/op 0.86
CheckpointStateCache - add get delete 3.6030 us/op 6.6010 us/op 0.55
validate api signedAggregateAndProof - struct 2.4309 ms/op 2.8612 ms/op 0.85
validate gossip signedAggregateAndProof - struct 2.4224 ms/op 2.8658 ms/op 0.85
validate gossip attestation - vc 640000 1.1557 ms/op 1.5069 ms/op 0.77
batch validate gossip attestation - vc 640000 - chunk 32 142.54 us/op 178.65 us/op 0.80
batch validate gossip attestation - vc 640000 - chunk 64 128.70 us/op 166.95 us/op 0.77
batch validate gossip attestation - vc 640000 - chunk 128 126.42 us/op 174.67 us/op 0.72
batch validate gossip attestation - vc 640000 - chunk 256 126.34 us/op 149.41 us/op 0.85
pickEth1Vote - no votes 1.0156 ms/op 1.3603 ms/op 0.75
pickEth1Vote - max votes 10.695 ms/op 10.938 ms/op 0.98
pickEth1Vote - Eth1Data hashTreeRoot value x2048 22.975 ms/op 21.652 ms/op 1.06
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 31.412 ms/op 32.850 ms/op 0.96
pickEth1Vote - Eth1Data fastSerialize value x2048 435.64 us/op 780.24 us/op 0.56
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.3363 ms/op 7.3537 ms/op 0.45
bytes32 toHexString 465.00 ns/op 788.00 ns/op 0.59
bytes32 Buffer.toString(hex) 327.00 ns/op 336.00 ns/op 0.97
bytes32 Buffer.toString(hex) from Uint8Array 447.00 ns/op 603.00 ns/op 0.74
bytes32 Buffer.toString(hex) + 0x 348.00 ns/op 353.00 ns/op 0.99
Object access 1 prop 0.22600 ns/op 0.26000 ns/op 0.87
Map access 1 prop 0.20400 ns/op 0.16100 ns/op 1.27
Object get x1000 5.6490 ns/op 11.084 ns/op 0.51
Map get x1000 0.79500 ns/op 0.95400 ns/op 0.83
Object set x1000 28.805 ns/op 82.526 ns/op 0.35
Map set x1000 18.694 ns/op 58.246 ns/op 0.32
Return object 10000 times 0.24080 ns/op 0.35470 ns/op 0.68
Throw Error 10000 times 2.9301 us/op 4.2510 us/op 0.69
fastMsgIdFn sha256 / 200 bytes 2.1810 us/op 3.5150 us/op 0.62
fastMsgIdFn h32 xxhash / 200 bytes 358.00 ns/op 373.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 200 bytes 365.00 ns/op 424.00 ns/op 0.86
fastMsgIdFn sha256 / 1000 bytes 6.4260 us/op 12.307 us/op 0.52
fastMsgIdFn h32 xxhash / 1000 bytes 453.00 ns/op 536.00 ns/op 0.85
fastMsgIdFn h64 xxhash / 1000 bytes 461.00 ns/op 520.00 ns/op 0.89
fastMsgIdFn sha256 / 10000 bytes 54.586 us/op 110.36 us/op 0.49
fastMsgIdFn h32 xxhash / 10000 bytes 1.8480 us/op 2.1120 us/op 0.88
fastMsgIdFn h64 xxhash / 10000 bytes 1.2440 us/op 1.5040 us/op 0.83
send data - 1000 256B messages 14.228 ms/op 28.096 ms/op 0.51
send data - 1000 512B messages 17.476 ms/op 30.978 ms/op 0.56
send data - 1000 1024B messages 27.264 ms/op 59.815 ms/op 0.46
send data - 1000 1200B messages 35.741 ms/op 50.763 ms/op 0.70
send data - 1000 2048B messages 41.272 ms/op 56.103 ms/op 0.74
send data - 1000 4096B messages 37.745 ms/op 55.215 ms/op 0.68
send data - 1000 16384B messages 90.751 ms/op 138.40 ms/op 0.66
send data - 1000 65536B messages 348.43 ms/op 569.69 ms/op 0.61
enrSubnets - fastDeserialize 64 bits 1.0880 us/op 1.9070 us/op 0.57
enrSubnets - ssz BitVector 64 bits 451.00 ns/op 599.00 ns/op 0.75
enrSubnets - fastDeserialize 4 bits 221.00 ns/op 236.00 ns/op 0.94
enrSubnets - ssz BitVector 4 bits 482.00 ns/op 629.00 ns/op 0.77
prioritizePeers score -10:0 att 32-0.1 sync 2-0 88.280 us/op 133.11 us/op 0.66
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 81.712 us/op 169.56 us/op 0.48
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 141.31 us/op 216.55 us/op 0.65
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 254.74 us/op 418.85 us/op 0.61
prioritizePeers score 0:0 att 64-1 sync 4-1 264.38 us/op 438.79 us/op 0.60
array of 16000 items push then shift 1.3665 us/op 1.9359 us/op 0.71
LinkedList of 16000 items push then shift 9.7360 ns/op 11.645 ns/op 0.84
array of 16000 items push then pop 114.94 ns/op 134.67 ns/op 0.85
LinkedList of 16000 items push then pop 8.6590 ns/op 16.601 ns/op 0.52
array of 24000 items push then shift 1.9612 us/op 3.1907 us/op 0.61
LinkedList of 24000 items push then shift 7.5010 ns/op 11.260 ns/op 0.67
array of 24000 items push then pop 150.02 ns/op 171.94 ns/op 0.87
LinkedList of 24000 items push then pop 5.9900 ns/op 10.373 ns/op 0.58
intersect bitArray bitLen 8 4.6740 ns/op 8.4990 ns/op 0.55
intersect array and set length 8 52.780 ns/op 128.21 ns/op 0.41
intersect bitArray bitLen 128 28.903 ns/op 47.090 ns/op 0.61
intersect array and set length 128 907.50 ns/op 1.2481 us/op 0.73
bitArray.getTrueBitIndexes() bitLen 128 1.6740 us/op 2.0650 us/op 0.81
bitArray.getTrueBitIndexes() bitLen 248 2.9540 us/op 3.5730 us/op 0.83
bitArray.getTrueBitIndexes() bitLen 512 5.8580 us/op 8.3480 us/op 0.70
Buffer.concat 32 items 888.00 ns/op 1.2530 us/op 0.71
Uint8Array.set 32 items 1.9280 us/op 3.3210 us/op 0.58
Set add up to 64 items then delete first 1.9078 us/op 6.0273 us/op 0.32
OrderedSet add up to 64 items then delete first 2.9662 us/op 8.1330 us/op 0.36
Set add up to 64 items then delete last 2.6632 us/op 6.7598 us/op 0.39
OrderedSet add up to 64 items then delete last 4.3871 us/op 8.0896 us/op 0.54
Set add up to 64 items then delete middle 2.7276 us/op 6.2399 us/op 0.44
OrderedSet add up to 64 items then delete middle 4.3192 us/op 10.031 us/op 0.43
Set add up to 128 items then delete first 4.0849 us/op 12.475 us/op 0.33
OrderedSet add up to 128 items then delete first 5.9727 us/op 16.317 us/op 0.37
Set add up to 128 items then delete last 3.9148 us/op 12.098 us/op 0.32
OrderedSet add up to 128 items then delete last 6.1505 us/op 16.019 us/op 0.38
Set add up to 128 items then delete middle 3.9135 us/op 12.104 us/op 0.32
OrderedSet add up to 128 items then delete middle 11.619 us/op 25.909 us/op 0.45
Set add up to 256 items then delete first 8.0765 us/op 24.704 us/op 0.33
OrderedSet add up to 256 items then delete first 12.202 us/op 35.228 us/op 0.35
Set add up to 256 items then delete last 8.6149 us/op 23.556 us/op 0.37
OrderedSet add up to 256 items then delete last 12.326 us/op 34.129 us/op 0.36
Set add up to 256 items then delete middle 8.0819 us/op 23.349 us/op 0.35
OrderedSet add up to 256 items then delete middle 33.113 us/op 64.899 us/op 0.51
transfer serialized Status (84 B) 1.6140 us/op 2.2370 us/op 0.72
copy serialized Status (84 B) 1.1630 us/op 1.8340 us/op 0.63
transfer serialized SignedVoluntaryExit (112 B) 1.4100 us/op 2.6600 us/op 0.53
copy serialized SignedVoluntaryExit (112 B) 1.1290 us/op 1.6820 us/op 0.67
transfer serialized ProposerSlashing (416 B) 1.4850 us/op 3.1880 us/op 0.47
copy serialized ProposerSlashing (416 B) 1.3530 us/op 2.5990 us/op 0.52
transfer serialized Attestation (485 B) 1.5710 us/op 2.8750 us/op 0.55
copy serialized Attestation (485 B) 1.4680 us/op 3.1800 us/op 0.46
transfer serialized AttesterSlashing (33232 B) 1.6150 us/op 3.5950 us/op 0.45
copy serialized AttesterSlashing (33232 B) 3.6330 us/op 10.526 us/op 0.35
transfer serialized Small SignedBeaconBlock (128000 B) 1.7890 us/op 4.3980 us/op 0.41
copy serialized Small SignedBeaconBlock (128000 B) 9.8130 us/op 32.857 us/op 0.30
transfer serialized Avg SignedBeaconBlock (200000 B) 1.8250 us/op 5.5130 us/op 0.33
copy serialized Avg SignedBeaconBlock (200000 B) 12.334 us/op 50.285 us/op 0.25
transfer serialized BlobsSidecar (524380 B) 2.3250 us/op 6.7480 us/op 0.34
copy serialized BlobsSidecar (524380 B) 77.593 us/op 161.23 us/op 0.48
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9780 us/op 6.1200 us/op 0.49
copy serialized Big SignedBeaconBlock (1000000 B) 148.33 us/op 274.53 us/op 0.54
pass gossip attestations to forkchoice per slot 2.8569 ms/op 4.7416 ms/op 0.60
forkChoice updateHead vc 100000 bc 64 eq 0 555.58 us/op 788.12 us/op 0.70
forkChoice updateHead vc 600000 bc 64 eq 0 2.6926 ms/op 5.5718 ms/op 0.48
forkChoice updateHead vc 1000000 bc 64 eq 0 4.5931 ms/op 8.6122 ms/op 0.53
forkChoice updateHead vc 600000 bc 320 eq 0 2.6919 ms/op 5.4914 ms/op 0.49
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8299 ms/op 5.6945 ms/op 0.50
forkChoice updateHead vc 600000 bc 7200 eq 0 4.0313 ms/op 9.9126 ms/op 0.41
forkChoice updateHead vc 600000 bc 64 eq 1000 10.293 ms/op 12.572 ms/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 10000 10.307 ms/op 14.893 ms/op 0.69
forkChoice updateHead vc 600000 bc 64 eq 300000 12.896 ms/op 59.814 ms/op 0.22
computeDeltas 500000 validators 300 proto nodes 3.5524 ms/op 8.2483 ms/op 0.43
computeDeltas 500000 validators 1200 proto nodes 3.3662 ms/op 7.6901 ms/op 0.44
computeDeltas 500000 validators 7200 proto nodes 3.3697 ms/op 6.9251 ms/op 0.49
computeDeltas 750000 validators 300 proto nodes 5.4207 ms/op 9.9810 ms/op 0.54
computeDeltas 750000 validators 1200 proto nodes 4.9977 ms/op 10.451 ms/op 0.48
computeDeltas 750000 validators 7200 proto nodes 5.1809 ms/op 10.065 ms/op 0.51
computeDeltas 1400000 validators 300 proto nodes 9.9779 ms/op 20.570 ms/op 0.49
computeDeltas 1400000 validators 1200 proto nodes 10.138 ms/op 19.252 ms/op 0.53
computeDeltas 1400000 validators 7200 proto nodes 9.7523 ms/op 19.751 ms/op 0.49
computeDeltas 2100000 validators 300 proto nodes 14.560 ms/op 31.508 ms/op 0.46
computeDeltas 2100000 validators 1200 proto nodes 14.264 ms/op 32.215 ms/op 0.44
computeDeltas 2100000 validators 7200 proto nodes 14.496 ms/op 30.927 ms/op 0.47
altair processAttestation - 250000 vs - 7PWei normalcase 2.1303 ms/op 2.5199 ms/op 0.85
altair processAttestation - 250000 vs - 7PWei worstcase 2.2143 ms/op 4.2263 ms/op 0.52
altair processAttestation - setStatus - 1/6 committees join 99.789 us/op 207.75 us/op 0.48
altair processAttestation - setStatus - 1/3 committees join 197.46 us/op 401.95 us/op 0.49
altair processAttestation - setStatus - 1/2 committees join 292.72 us/op 503.53 us/op 0.58
altair processAttestation - setStatus - 2/3 committees join 401.83 us/op 673.96 us/op 0.60
altair processAttestation - setStatus - 4/5 committees join 530.90 us/op 858.02 us/op 0.62
altair processAttestation - setStatus - 100% committees join 626.18 us/op 970.11 us/op 0.65
altair processBlock - 250000 vs - 7PWei normalcase 7.5146 ms/op 11.390 ms/op 0.66
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.350 ms/op 45.452 ms/op 0.65
altair processBlock - 250000 vs - 7PWei worstcase 34.344 ms/op 42.842 ms/op 0.80
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.831 ms/op 119.45 ms/op 0.63
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4853 ms/op 4.0276 ms/op 0.37
phase0 processBlock - 250000 vs - 7PWei worstcase 24.691 ms/op 32.873 ms/op 0.75
altair processEth1Data - 250000 vs - 7PWei normalcase 336.46 us/op 761.56 us/op 0.44
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 14.613 us/op 19.608 us/op 0.75
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 53.449 us/op 97.580 us/op 0.55
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 24.634 us/op 37.925 us/op 0.65
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 17.204 us/op 24.529 us/op 0.70
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 196.01 us/op 287.11 us/op 0.68
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1509 ms/op 1.6573 ms/op 0.69
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7216 ms/op 2.5652 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6739 ms/op 1.9100 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.5645 ms/op 4.9796 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.1329 ms/op 3.1763 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.2249 ms/op 6.3513 ms/op 0.67
Tree 40 250000 create 272.81 ms/op 521.59 ms/op 0.52
Tree 40 250000 get(125000) 111.54 ns/op 222.92 ns/op 0.50
Tree 40 250000 set(125000) 761.02 ns/op 1.4545 us/op 0.52
Tree 40 250000 toArray() 10.198 ms/op 29.102 ms/op 0.35
Tree 40 250000 iterate all - toArray() + loop 9.9424 ms/op 26.292 ms/op 0.38
Tree 40 250000 iterate all - get(i) 48.132 ms/op 75.958 ms/op 0.63
MutableVector 250000 create 12.371 ms/op 13.347 ms/op 0.93
MutableVector 250000 get(125000) 5.6470 ns/op 6.6420 ns/op 0.85
MutableVector 250000 set(125000) 211.42 ns/op 495.86 ns/op 0.43
MutableVector 250000 toArray() 2.8723 ms/op 4.5560 ms/op 0.63
MutableVector 250000 iterate all - toArray() + loop 3.2574 ms/op 4.5750 ms/op 0.71
MutableVector 250000 iterate all - get(i) 1.2845 ms/op 1.5613 ms/op 0.82
Array 250000 create 3.0291 ms/op 3.3906 ms/op 0.89
Array 250000 clone - spread 1.2315 ms/op 1.3892 ms/op 0.89
Array 250000 get(125000) 1.0760 ns/op 1.1310 ns/op 0.95
Array 250000 set(125000) 1.2930 ns/op 4.4160 ns/op 0.29
Array 250000 iterate all - loop 154.98 us/op 170.57 us/op 0.91
effectiveBalanceIncrements clone Uint8Array 300000 15.581 us/op 44.535 us/op 0.35
effectiveBalanceIncrements clone MutableVector 300000 451.00 ns/op 405.00 ns/op 1.11
effectiveBalanceIncrements rw all Uint8Array 300000 186.58 us/op 204.05 us/op 0.91
effectiveBalanceIncrements rw all MutableVector 300000 68.087 ms/op 94.994 ms/op 0.72
phase0 afterProcessEpoch - 250000 vs - 7PWei 80.327 ms/op 114.60 ms/op 0.70
phase0 beforeProcessEpoch - 250000 vs - 7PWei 42.783 ms/op 50.392 ms/op 0.85
altair processEpoch - mainnet_e81889 396.20 ms/op 587.64 ms/op 0.67
mainnet_e81889 - altair beforeProcessEpoch 73.220 ms/op 87.200 ms/op 0.84
mainnet_e81889 - altair processJustificationAndFinalization 10.747 us/op 20.800 us/op 0.52
mainnet_e81889 - altair processInactivityUpdates 3.9541 ms/op 6.8303 ms/op 0.58
mainnet_e81889 - altair processRewardsAndPenalties 57.366 ms/op 76.364 ms/op 0.75
mainnet_e81889 - altair processRegistryUpdates 1.3900 us/op 2.5830 us/op 0.54
mainnet_e81889 - altair processSlashings 501.00 ns/op 896.00 ns/op 0.56
mainnet_e81889 - altair processEth1DataReset 538.00 ns/op 1.1670 us/op 0.46
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7185 ms/op 2.7135 ms/op 0.63
mainnet_e81889 - altair processSlashingsReset 2.1150 us/op 9.9090 us/op 0.21
mainnet_e81889 - altair processRandaoMixesReset 4.0790 us/op 8.4300 us/op 0.48
mainnet_e81889 - altair processHistoricalRootsUpdate 660.00 ns/op 1.0360 us/op 0.64
mainnet_e81889 - altair processParticipationFlagUpdates 1.5450 us/op 2.8150 us/op 0.55
mainnet_e81889 - altair processSyncCommitteeUpdates 601.00 ns/op 883.00 ns/op 0.68
mainnet_e81889 - altair afterProcessEpoch 81.256 ms/op 124.13 ms/op 0.65
capella processEpoch - mainnet_e217614 1.9915 s/op 3.0721 s/op 0.65
mainnet_e217614 - capella beforeProcessEpoch 413.46 ms/op 646.41 ms/op 0.64
mainnet_e217614 - capella processJustificationAndFinalization 15.763 us/op 25.497 us/op 0.62
mainnet_e217614 - capella processInactivityUpdates 15.397 ms/op 26.025 ms/op 0.59
mainnet_e217614 - capella processRewardsAndPenalties 363.16 ms/op 441.35 ms/op 0.82
mainnet_e217614 - capella processRegistryUpdates 7.7890 us/op 27.680 us/op 0.28
mainnet_e217614 - capella processSlashings 529.00 ns/op 922.00 ns/op 0.57
mainnet_e217614 - capella processEth1DataReset 497.00 ns/op 529.00 ns/op 0.94
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.7291 ms/op 4.5719 ms/op 0.82
mainnet_e217614 - capella processSlashingsReset 1.7080 us/op 3.6690 us/op 0.47
mainnet_e217614 - capella processRandaoMixesReset 2.2210 us/op 5.2020 us/op 0.43
mainnet_e217614 - capella processHistoricalRootsUpdate 572.00 ns/op 811.00 ns/op 0.71
mainnet_e217614 - capella processParticipationFlagUpdates 1.6590 us/op 3.3180 us/op 0.50
mainnet_e217614 - capella afterProcessEpoch 191.97 ms/op 325.16 ms/op 0.59
phase0 processEpoch - mainnet_e58758 387.31 ms/op 517.88 ms/op 0.75
mainnet_e58758 - phase0 beforeProcessEpoch 107.61 ms/op 147.65 ms/op 0.73
mainnet_e58758 - phase0 processJustificationAndFinalization 10.309 us/op 15.962 us/op 0.65
mainnet_e58758 - phase0 processRewardsAndPenalties 53.020 ms/op 41.414 ms/op 1.28
mainnet_e58758 - phase0 processRegistryUpdates 7.0000 us/op 10.715 us/op 0.65
mainnet_e58758 - phase0 processSlashings 582.00 ns/op 695.00 ns/op 0.84
mainnet_e58758 - phase0 processEth1DataReset 572.00 ns/op 502.00 ns/op 1.14
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3618 ms/op 1.2391 ms/op 1.10
mainnet_e58758 - phase0 processSlashingsReset 2.2350 us/op 8.6120 us/op 0.26
mainnet_e58758 - phase0 processRandaoMixesReset 2.4730 us/op 7.9720 us/op 0.31
mainnet_e58758 - phase0 processHistoricalRootsUpdate 506.00 ns/op 920.00 ns/op 0.55
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.5680 us/op 5.9000 us/op 0.44
mainnet_e58758 - phase0 afterProcessEpoch 63.094 ms/op 101.52 ms/op 0.62
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0187 ms/op 1.6733 ms/op 0.61
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1529 ms/op 1.9521 ms/op 0.59
altair processInactivityUpdates - 250000 normalcase 21.480 ms/op 29.944 ms/op 0.72
altair processInactivityUpdates - 250000 worstcase 20.461 ms/op 28.211 ms/op 0.73
phase0 processRegistryUpdates - 250000 normalcase 5.6260 us/op 14.414 us/op 0.39
phase0 processRegistryUpdates - 250000 badcase_full_deposits 240.89 us/op 572.92 us/op 0.42
phase0 processRegistryUpdates - 250000 worstcase 0.5 106.72 ms/op 139.71 ms/op 0.76
altair processRewardsAndPenalties - 250000 normalcase 54.406 ms/op 61.519 ms/op 0.88
altair processRewardsAndPenalties - 250000 worstcase 55.678 ms/op 61.884 ms/op 0.90
phase0 getAttestationDeltas - 250000 normalcase 4.7542 ms/op 9.0644 ms/op 0.52
phase0 getAttestationDeltas - 250000 worstcase 5.4230 ms/op 8.8604 ms/op 0.61
phase0 processSlashings - 250000 worstcase 80.528 us/op 130.14 us/op 0.62
altair processSyncCommitteeUpdates - 250000 106.45 ms/op 151.58 ms/op 0.70
BeaconState.hashTreeRoot - No change 319.00 ns/op 380.00 ns/op 0.84
BeaconState.hashTreeRoot - 1 full validator 158.52 us/op 126.93 us/op 1.25
BeaconState.hashTreeRoot - 32 full validator 1.6656 ms/op 1.2962 ms/op 1.28
BeaconState.hashTreeRoot - 512 full validator 16.979 ms/op 12.976 ms/op 1.31
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 182.66 us/op 139.83 us/op 1.31
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5169 ms/op 1.8468 ms/op 1.36
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.877 ms/op 23.910 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 130.65 us/op 108.18 us/op 1.21
BeaconState.hashTreeRoot - 32 balances 1.4049 ms/op 990.52 us/op 1.42
BeaconState.hashTreeRoot - 512 balances 11.140 ms/op 10.556 ms/op 1.06
BeaconState.hashTreeRoot - 250000 balances 191.87 ms/op 216.91 ms/op 0.88
aggregationBits - 2048 els - zipIndexesInBitList 10.365 us/op 18.685 us/op 0.55
byteArrayEquals 32 64.561 ns/op 76.711 ns/op 0.84
Buffer.compare 32 38.775 ns/op 56.504 ns/op 0.69
byteArrayEquals 1024 1.7729 us/op 2.0921 us/op 0.85
Buffer.compare 1024 45.799 ns/op 71.583 ns/op 0.64
byteArrayEquals 16384 28.360 us/op 33.282 us/op 0.85
Buffer.compare 16384 223.20 ns/op 253.95 ns/op 0.88
byteArrayEquals 123687377 206.05 ms/op 262.41 ms/op 0.79
Buffer.compare 123687377 3.7462 ms/op 8.5577 ms/op 0.44
byteArrayEquals 32 - diff last byte 61.341 ns/op 85.578 ns/op 0.72
Buffer.compare 32 - diff last byte 38.997 ns/op 60.581 ns/op 0.64
byteArrayEquals 1024 - diff last byte 1.7362 us/op 2.3409 us/op 0.74
Buffer.compare 1024 - diff last byte 44.370 ns/op 74.334 ns/op 0.60
byteArrayEquals 16384 - diff last byte 26.916 us/op 34.824 us/op 0.77
Buffer.compare 16384 - diff last byte 217.77 ns/op 294.52 ns/op 0.74
byteArrayEquals 123687377 - diff last byte 205.32 ms/op 268.06 ms/op 0.77
Buffer.compare 123687377 - diff last byte 4.1077 ms/op 8.3847 ms/op 0.49
byteArrayEquals 32 - random bytes 4.5710 ns/op 5.4650 ns/op 0.84
Buffer.compare 32 - random bytes 38.516 ns/op 63.591 ns/op 0.61
byteArrayEquals 1024 - random bytes 4.4250 ns/op 5.7690 ns/op 0.77
Buffer.compare 1024 - random bytes 36.533 ns/op 62.113 ns/op 0.59
byteArrayEquals 16384 - random bytes 4.3820 ns/op 5.7090 ns/op 0.77
Buffer.compare 16384 - random bytes 36.585 ns/op 62.721 ns/op 0.58
byteArrayEquals 123687377 - random bytes 7.8000 ns/op 9.0500 ns/op 0.86
Buffer.compare 123687377 - random bytes 39.830 ns/op 73.230 ns/op 0.54
regular array get 100000 times 41.672 us/op 46.242 us/op 0.90
wrappedArray get 100000 times 41.442 us/op 46.529 us/op 0.89
arrayWithProxy get 100000 times 9.8051 ms/op 14.781 ms/op 0.66
ssz.Root.equals 56.760 ns/op 55.281 ns/op 1.03
byteArrayEquals 53.967 ns/op 55.507 ns/op 0.97
Buffer.compare 10.074 ns/op 12.055 ns/op 0.84
shuffle list - 16384 els 4.5099 ms/op 7.1632 ms/op 0.63
shuffle list - 250000 els 66.776 ms/op 105.93 ms/op 0.63
processSlot - 1 slots 17.432 us/op 20.794 us/op 0.84
processSlot - 32 slots 4.1368 ms/op 4.4451 ms/op 0.93
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 48.251 ms/op 63.881 ms/op 0.76
getCommitteeAssignments - req 1 vs - 250000 vc 2.2703 ms/op 2.5847 ms/op 0.88
getCommitteeAssignments - req 100 vs - 250000 vc 3.4222 ms/op 3.8028 ms/op 0.90
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7147 ms/op 4.2971 ms/op 0.86
findModifiedValidators - 10000 modified validators 444.95 ms/op 591.52 ms/op 0.75
findModifiedValidators - 1000 modified validators 359.99 ms/op 515.23 ms/op 0.70
findModifiedValidators - 100 modified validators 352.32 ms/op 578.79 ms/op 0.61
findModifiedValidators - 10 modified validators 336.65 ms/op 621.71 ms/op 0.54
findModifiedValidators - 1 modified validators 322.91 ms/op 563.91 ms/op 0.57
findModifiedValidators - no difference 329.61 ms/op 569.46 ms/op 0.58
compare ViewDUs 4.0157 s/op 7.0146 s/op 0.57
compare each validator Uint8Array 1.5339 s/op 2.8349 s/op 0.54
compare ViewDU to Uint8Array 1.1708 s/op 1.8915 s/op 0.62
migrate state 1000000 validators, 24 modified, 0 new 694.08 ms/op 1.1145 s/op 0.62
migrate state 1000000 validators, 1700 modified, 1000 new 947.80 ms/op 1.2479 s/op 0.76
migrate state 1000000 validators, 3400 modified, 2000 new 1.1561 s/op 1.5435 s/op 0.75
migrate state 1500000 validators, 24 modified, 0 new 754.18 ms/op 934.39 ms/op 0.81
migrate state 1500000 validators, 1700 modified, 1000 new 1.0991 s/op 1.4982 s/op 0.73
migrate state 1500000 validators, 3400 modified, 2000 new 1.2244 s/op 1.8684 s/op 0.66
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.1000 ns/op 5.8100 ns/op 0.88
state getBlockRootAtSlot - 250000 vs - 7PWei 525.80 ns/op 821.08 ns/op 0.64
computeProposers - vc 250000 6.4447 ms/op 13.372 ms/op 0.48
computeEpochShuffling - vc 250000 71.235 ms/op 126.25 ms/op 0.56
getNextSyncCommittee - vc 250000 111.21 ms/op 202.42 ms/op 0.55
computeSigningRoot for AttestationData 23.211 us/op 35.716 us/op 0.65
hash AttestationData serialized data then Buffer.toString(base64) 1.3441 us/op 2.6142 us/op 0.51
toHexString serialized data 851.48 ns/op 1.7479 us/op 0.49
Buffer.toString(base64) 232.98 ns/op 284.84 ns/op 0.82

by benchmarkbot/action

@wemeetagain wemeetagain merged commit d384213 into unstable Feb 14, 2024
14 of 15 checks passed
@wemeetagain wemeetagain deleted the nflaig/reuse-utils-from-6241 branch February 14, 2024 16:29
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.16.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants