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

ci: lint yarn lockfiles to analyze and detect security issues #6424

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Feb 13, 2024

Motivation

Lockfile changes are hard to review and we should make sure we don't introduce a malicious dependency either accidentally or from an external contribution. Don't trust, verify.

Description

Add CI job to lint yarn lockfiles to analyze and detect security issues

It only takes 4 seconds to execute the lint task

image

Example of detected issue

> npx lockfile-lint --path yarn.lock --allowed-hosts npm yarn --validate-https
detected invalid host(s) for package: @types/json5@^0.0.29
    expected: registry.npmjs.org,registry.yarnpkg.com
    actual: registry.evil.org

 ✖ Error: security issues detected! 

@nflaig nflaig requested a review from a team as a code owner February 13, 2024 09:29
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

Merging #6424 (81c4bc3) into unstable (1e67579) will increase coverage by 0.03%.
Report is 1 commits behind head on unstable.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6424      +/-   ##
============================================
+ Coverage     61.72%   61.76%   +0.03%     
============================================
  Files           553      553              
  Lines         57856    57856              
  Branches       1829     1829              
============================================
+ Hits          35711    35732      +21     
+ Misses        22108    22089      -19     
+ Partials         37       35       -2     

Copy link
Contributor

@jeluard jeluard left a comment

Choose a reason for hiding this comment

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

Nice, although it doesn't seem to check a lot of things?
Might make sense to also consider npm audit.

Unrelated, but I noticed your PR removes some whitespaces. Might make sense to automate this too. (yaml lint ?)

@nflaig
Copy link
Member Author

nflaig commented Feb 13, 2024

Nice, although it doesn't seem to check a lot of things?

This will detect a malicious packages being injected into your lockfile which is the main concern, it does not verify integrity as you would have to pull the package and cross check the hash but this is already done by yarn itself when installing. There are a few more checks we could enable but those don't seem that useful.

Might make sense to also consider npm audit.

I think there is a yarn equivalent for it too. The problem with audit is that you have to differentiate between dev vs. prod dependencies and you have to run it continuously (cron job or similar) and not on a code change. Definitely something we could improve but a lot might already be covered by Github security alerts and Dependabot PRs bumping vulnerable packages.

Might make sense to automate this too. (yaml lint ?)

If it is cheap to run it is probably good idea to add that to the CI.

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 56b5d5d Previous: da0bcc8 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 684.79 us/op 584.31 us/op 1.17
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 139.87 us/op 103.46 us/op 1.35
BLS verify - blst-native 1.4818 ms/op 1.3286 ms/op 1.12
BLS verifyMultipleSignatures 3 - blst-native 3.2656 ms/op 2.7982 ms/op 1.17
BLS verifyMultipleSignatures 8 - blst-native 7.0209 ms/op 6.4121 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst-native 26.192 ms/op 22.588 ms/op 1.16
BLS verifyMultipleSignatures 64 - blst-native 49.865 ms/op 44.555 ms/op 1.12
BLS verifyMultipleSignatures 128 - blst-native 95.220 ms/op 88.253 ms/op 1.08
BLS deserializing 10000 signatures 943.91 ms/op 953.60 ms/op 0.99
BLS deserializing 100000 signatures 9.4728 s/op 9.1787 s/op 1.03
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.4200 ms/op 1.3956 ms/op 1.02
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.6050 ms/op 1.5960 ms/op 1.01
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4939 ms/op 2.3926 ms/op 1.04
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.7661 ms/op 3.5314 ms/op 1.07
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.0726 ms/op 5.9130 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 27.871 us/op 27.189 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 108.14 us/op 104.69 us/op 1.03
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 74.465 ms/op 74.780 ms/op 1.00
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 62.234 ms/op 77.285 ms/op 0.81
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 51.201 ms/op 61.405 ms/op 0.83
getSlashingsAndExits - default max 366.07 us/op 413.90 us/op 0.88
getSlashingsAndExits - 2k 415.98 us/op 601.99 us/op 0.69
proposeBlockBody type=full, size=empty 6.0601 ms/op 7.3645 ms/op 0.82
isKnown best case - 1 super set check 364.00 ns/op 603.00 ns/op 0.60
isKnown normal case - 2 super set checks 344.00 ns/op 638.00 ns/op 0.54
isKnown worse case - 16 super set checks 338.00 ns/op 600.00 ns/op 0.56
CheckpointStateCache - add get delete 6.3410 us/op 6.6010 us/op 0.96
validate api signedAggregateAndProof - struct 2.8377 ms/op 2.8612 ms/op 0.99
validate gossip signedAggregateAndProof - struct 2.8729 ms/op 2.8658 ms/op 1.00
validate gossip attestation - vc 640000 1.3836 ms/op 1.5069 ms/op 0.92
batch validate gossip attestation - vc 640000 - chunk 32 168.94 us/op 178.65 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 64 148.00 us/op 166.95 us/op 0.89
batch validate gossip attestation - vc 640000 - chunk 128 137.99 us/op 174.67 us/op 0.79
batch validate gossip attestation - vc 640000 - chunk 256 141.48 us/op 149.41 us/op 0.95
pickEth1Vote - no votes 1.3444 ms/op 1.3603 ms/op 0.99
pickEth1Vote - max votes 10.549 ms/op 10.938 ms/op 0.96
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.550 ms/op 21.652 ms/op 0.90
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 30.919 ms/op 32.850 ms/op 0.94
pickEth1Vote - Eth1Data fastSerialize value x2048 699.39 us/op 780.24 us/op 0.90
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.2887 ms/op 7.3537 ms/op 0.99
bytes32 toHexString 551.00 ns/op 788.00 ns/op 0.70
bytes32 Buffer.toString(hex) 313.00 ns/op 336.00 ns/op 0.93
bytes32 Buffer.toString(hex) from Uint8Array 477.00 ns/op 603.00 ns/op 0.79
bytes32 Buffer.toString(hex) + 0x 298.00 ns/op 353.00 ns/op 0.84
Object access 1 prop 0.17400 ns/op 0.26000 ns/op 0.67
Map access 1 prop 0.15300 ns/op 0.16100 ns/op 0.95
Object get x1000 7.5950 ns/op 11.084 ns/op 0.69
Map get x1000 0.81400 ns/op 0.95400 ns/op 0.85
Object set x1000 54.617 ns/op 82.526 ns/op 0.66
Map set x1000 42.708 ns/op 58.246 ns/op 0.73
Return object 10000 times 0.24700 ns/op 0.35470 ns/op 0.70
Throw Error 10000 times 3.8992 us/op 4.2510 us/op 0.92
fastMsgIdFn sha256 / 200 bytes 3.3840 us/op 3.5150 us/op 0.96
fastMsgIdFn h32 xxhash / 200 bytes 311.00 ns/op 373.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 200 bytes 369.00 ns/op 424.00 ns/op 0.87
fastMsgIdFn sha256 / 1000 bytes 11.526 us/op 12.307 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 452.00 ns/op 536.00 ns/op 0.84
fastMsgIdFn h64 xxhash / 1000 bytes 453.00 ns/op 520.00 ns/op 0.87
fastMsgIdFn sha256 / 10000 bytes 103.90 us/op 110.36 us/op 0.94
fastMsgIdFn h32 xxhash / 10000 bytes 1.9980 us/op 2.1120 us/op 0.95
fastMsgIdFn h64 xxhash / 10000 bytes 1.3820 us/op 1.5040 us/op 0.92
send data - 1000 256B messages 21.027 ms/op 28.096 ms/op 0.75
send data - 1000 512B messages 26.584 ms/op 30.978 ms/op 0.86
send data - 1000 1024B messages 42.215 ms/op 59.815 ms/op 0.71
send data - 1000 1200B messages 39.225 ms/op 50.763 ms/op 0.77
send data - 1000 2048B messages 52.226 ms/op 56.103 ms/op 0.93
send data - 1000 4096B messages 47.777 ms/op 55.215 ms/op 0.87
send data - 1000 16384B messages 112.97 ms/op 138.40 ms/op 0.82
send data - 1000 65536B messages 479.89 ms/op 569.69 ms/op 0.84
enrSubnets - fastDeserialize 64 bits 1.5800 us/op 1.9070 us/op 0.83
enrSubnets - ssz BitVector 64 bits 569.00 ns/op 599.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 251.00 ns/op 236.00 ns/op 1.06
enrSubnets - ssz BitVector 4 bits 605.00 ns/op 629.00 ns/op 0.96
prioritizePeers score -10:0 att 32-0.1 sync 2-0 137.43 us/op 133.11 us/op 1.03
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 151.00 us/op 169.56 us/op 0.89
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 208.06 us/op 216.55 us/op 0.96
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 351.46 us/op 418.85 us/op 0.84
prioritizePeers score 0:0 att 64-1 sync 4-1 362.67 us/op 438.79 us/op 0.83
array of 16000 items push then shift 1.6807 us/op 1.9359 us/op 0.87
LinkedList of 16000 items push then shift 9.0780 ns/op 11.645 ns/op 0.78
array of 16000 items push then pop 108.75 ns/op 134.67 ns/op 0.81
LinkedList of 16000 items push then pop 9.1860 ns/op 16.601 ns/op 0.55
array of 24000 items push then shift 2.6451 us/op 3.1907 us/op 0.83
LinkedList of 24000 items push then shift 9.3210 ns/op 11.260 ns/op 0.83
array of 24000 items push then pop 156.61 ns/op 171.94 ns/op 0.91
LinkedList of 24000 items push then pop 9.0100 ns/op 10.373 ns/op 0.87
intersect bitArray bitLen 8 5.9950 ns/op 8.4990 ns/op 0.71
intersect array and set length 8 73.400 ns/op 128.21 ns/op 0.57
intersect bitArray bitLen 128 38.298 ns/op 47.090 ns/op 0.81
intersect array and set length 128 1.0455 us/op 1.2481 us/op 0.84
bitArray.getTrueBitIndexes() bitLen 128 1.7260 us/op 2.0650 us/op 0.84
bitArray.getTrueBitIndexes() bitLen 248 3.0060 us/op 3.5730 us/op 0.84
bitArray.getTrueBitIndexes() bitLen 512 6.4830 us/op 8.3480 us/op 0.78
Buffer.concat 32 items 1.2090 us/op 1.2530 us/op 0.96
Uint8Array.set 32 items 1.7260 us/op 3.3210 us/op 0.52
Set add up to 64 items then delete first 4.9421 us/op 6.0273 us/op 0.82
OrderedSet add up to 64 items then delete first 6.4665 us/op 8.1330 us/op 0.80
Set add up to 64 items then delete last 5.4621 us/op 6.7598 us/op 0.81
OrderedSet add up to 64 items then delete last 7.0412 us/op 8.0896 us/op 0.87
Set add up to 64 items then delete middle 5.5081 us/op 6.2399 us/op 0.88
OrderedSet add up to 64 items then delete middle 8.4502 us/op 10.031 us/op 0.84
Set add up to 128 items then delete first 10.628 us/op 12.475 us/op 0.85
OrderedSet add up to 128 items then delete first 15.280 us/op 16.317 us/op 0.94
Set add up to 128 items then delete last 10.788 us/op 12.098 us/op 0.89
OrderedSet add up to 128 items then delete last 14.966 us/op 16.019 us/op 0.93
Set add up to 128 items then delete middle 11.368 us/op 12.104 us/op 0.94
OrderedSet add up to 128 items then delete middle 22.432 us/op 25.909 us/op 0.87
Set add up to 256 items then delete first 24.016 us/op 24.704 us/op 0.97
OrderedSet add up to 256 items then delete first 33.019 us/op 35.228 us/op 0.94
Set add up to 256 items then delete last 22.819 us/op 23.556 us/op 0.97
OrderedSet add up to 256 items then delete last 30.624 us/op 34.129 us/op 0.90
Set add up to 256 items then delete middle 22.211 us/op 23.349 us/op 0.95
OrderedSet add up to 256 items then delete middle 53.769 us/op 64.899 us/op 0.83
transfer serialized Status (84 B) 1.9900 us/op 2.2370 us/op 0.89
copy serialized Status (84 B) 1.4380 us/op 1.8340 us/op 0.78
transfer serialized SignedVoluntaryExit (112 B) 2.0910 us/op 2.6600 us/op 0.79
copy serialized SignedVoluntaryExit (112 B) 1.5610 us/op 1.6820 us/op 0.93
transfer serialized ProposerSlashing (416 B) 2.3640 us/op 3.1880 us/op 0.74
copy serialized ProposerSlashing (416 B) 2.0970 us/op 2.5990 us/op 0.81
transfer serialized Attestation (485 B) 2.7050 us/op 2.8750 us/op 0.94
copy serialized Attestation (485 B) 2.5360 us/op 3.1800 us/op 0.80
transfer serialized AttesterSlashing (33232 B) 2.8770 us/op 3.5950 us/op 0.80
copy serialized AttesterSlashing (33232 B) 8.7720 us/op 10.526 us/op 0.83
transfer serialized Small SignedBeaconBlock (128000 B) 3.0220 us/op 4.3980 us/op 0.69
copy serialized Small SignedBeaconBlock (128000 B) 22.885 us/op 32.857 us/op 0.70
transfer serialized Avg SignedBeaconBlock (200000 B) 3.2800 us/op 5.5130 us/op 0.59
copy serialized Avg SignedBeaconBlock (200000 B) 36.134 us/op 50.285 us/op 0.72
transfer serialized BlobsSidecar (524380 B) 3.8510 us/op 6.7480 us/op 0.57
copy serialized BlobsSidecar (524380 B) 85.379 us/op 161.23 us/op 0.53
transfer serialized Big SignedBeaconBlock (1000000 B) 4.0170 us/op 6.1200 us/op 0.66
copy serialized Big SignedBeaconBlock (1000000 B) 363.38 us/op 274.53 us/op 1.32
pass gossip attestations to forkchoice per slot 4.6494 ms/op 4.7416 ms/op 0.98
forkChoice updateHead vc 100000 bc 64 eq 0 732.75 us/op 788.12 us/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 0 4.4511 ms/op 5.5718 ms/op 0.80
forkChoice updateHead vc 1000000 bc 64 eq 0 7.3698 ms/op 8.6122 ms/op 0.86
forkChoice updateHead vc 600000 bc 320 eq 0 4.4779 ms/op 5.4914 ms/op 0.82
forkChoice updateHead vc 600000 bc 1200 eq 0 4.7520 ms/op 5.6945 ms/op 0.83
forkChoice updateHead vc 600000 bc 7200 eq 0 5.9074 ms/op 9.9126 ms/op 0.60
forkChoice updateHead vc 600000 bc 64 eq 1000 12.101 ms/op 12.572 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 10000 13.532 ms/op 14.893 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 300000 20.971 ms/op 59.814 ms/op 0.35
computeDeltas 500000 validators 300 proto nodes 8.3040 ms/op 8.2483 ms/op 1.01
computeDeltas 500000 validators 1200 proto nodes 8.3605 ms/op 7.6901 ms/op 1.09
computeDeltas 500000 validators 7200 proto nodes 7.1775 ms/op 6.9251 ms/op 1.04
computeDeltas 750000 validators 300 proto nodes 11.024 ms/op 9.9810 ms/op 1.10
computeDeltas 750000 validators 1200 proto nodes 10.783 ms/op 10.451 ms/op 1.03
computeDeltas 750000 validators 7200 proto nodes 10.375 ms/op 10.065 ms/op 1.03
computeDeltas 1400000 validators 300 proto nodes 19.701 ms/op 20.570 ms/op 0.96
computeDeltas 1400000 validators 1200 proto nodes 20.152 ms/op 19.252 ms/op 1.05
computeDeltas 1400000 validators 7200 proto nodes 19.467 ms/op 19.751 ms/op 0.99
computeDeltas 2100000 validators 300 proto nodes 28.398 ms/op 31.508 ms/op 0.90
computeDeltas 2100000 validators 1200 proto nodes 27.579 ms/op 32.215 ms/op 0.86
computeDeltas 2100000 validators 7200 proto nodes 27.853 ms/op 30.927 ms/op 0.90
altair processAttestation - 250000 vs - 7PWei normalcase 2.2366 ms/op 2.5199 ms/op 0.89
altair processAttestation - 250000 vs - 7PWei worstcase 3.3868 ms/op 4.2263 ms/op 0.80
altair processAttestation - setStatus - 1/6 committees join 174.57 us/op 207.75 us/op 0.84
altair processAttestation - setStatus - 1/3 committees join 333.80 us/op 401.95 us/op 0.83
altair processAttestation - setStatus - 1/2 committees join 440.77 us/op 503.53 us/op 0.88
altair processAttestation - setStatus - 2/3 committees join 581.62 us/op 673.96 us/op 0.86
altair processAttestation - setStatus - 4/5 committees join 751.90 us/op 858.02 us/op 0.88
altair processAttestation - setStatus - 100% committees join 903.80 us/op 970.11 us/op 0.93
altair processBlock - 250000 vs - 7PWei normalcase 9.9602 ms/op 11.390 ms/op 0.87
altair processBlock - 250000 vs - 7PWei normalcase hashState 35.100 ms/op 45.452 ms/op 0.77
altair processBlock - 250000 vs - 7PWei worstcase 39.685 ms/op 42.842 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 92.878 ms/op 119.45 ms/op 0.78
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4147 ms/op 4.0276 ms/op 0.60
phase0 processBlock - 250000 vs - 7PWei worstcase 28.642 ms/op 32.873 ms/op 0.87
altair processEth1Data - 250000 vs - 7PWei normalcase 540.29 us/op 761.56 us/op 0.71
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.3540 us/op 19.608 us/op 0.48
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 57.101 us/op 97.580 us/op 0.59
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 19.033 us/op 37.925 us/op 0.50
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.115 us/op 24.529 us/op 0.41
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 167.50 us/op 287.11 us/op 0.58
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0219 ms/op 1.6573 ms/op 0.62
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4778 ms/op 2.5652 ms/op 0.58
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4515 ms/op 1.9100 ms/op 0.76
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.0718 ms/op 4.9796 ms/op 0.62
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2713 ms/op 3.1763 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.2439 ms/op 6.3513 ms/op 0.83
Tree 40 250000 create 321.99 ms/op 521.59 ms/op 0.62
Tree 40 250000 get(125000) 191.27 ns/op 222.92 ns/op 0.86
Tree 40 250000 set(125000) 936.98 ns/op 1.4545 us/op 0.64
Tree 40 250000 toArray() 17.978 ms/op 29.102 ms/op 0.62
Tree 40 250000 iterate all - toArray() + loop 18.015 ms/op 26.292 ms/op 0.69
Tree 40 250000 iterate all - get(i) 65.487 ms/op 75.958 ms/op 0.86
MutableVector 250000 create 12.740 ms/op 13.347 ms/op 0.95
MutableVector 250000 get(125000) 6.5500 ns/op 6.6420 ns/op 0.99
MutableVector 250000 set(125000) 278.99 ns/op 495.86 ns/op 0.56
MutableVector 250000 toArray() 3.1764 ms/op 4.5560 ms/op 0.70
MutableVector 250000 iterate all - toArray() + loop 3.2931 ms/op 4.5750 ms/op 0.72
MutableVector 250000 iterate all - get(i) 1.5288 ms/op 1.5613 ms/op 0.98
Array 250000 create 2.8294 ms/op 3.3906 ms/op 0.83
Array 250000 clone - spread 1.3875 ms/op 1.3892 ms/op 1.00
Array 250000 get(125000) 1.1460 ns/op 1.1310 ns/op 1.01
Array 250000 set(125000) 4.2070 ns/op 4.4160 ns/op 0.95
Array 250000 iterate all - loop 168.61 us/op 170.57 us/op 0.99
effectiveBalanceIncrements clone Uint8Array 300000 35.873 us/op 44.535 us/op 0.81
effectiveBalanceIncrements clone MutableVector 300000 444.00 ns/op 405.00 ns/op 1.10
effectiveBalanceIncrements rw all Uint8Array 300000 201.36 us/op 204.05 us/op 0.99
effectiveBalanceIncrements rw all MutableVector 300000 89.750 ms/op 94.994 ms/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 130.88 ms/op 114.60 ms/op 1.14
phase0 beforeProcessEpoch - 250000 vs - 7PWei 37.507 ms/op 50.392 ms/op 0.74
altair processEpoch - mainnet_e81889 509.56 ms/op 587.64 ms/op 0.87
mainnet_e81889 - altair beforeProcessEpoch 85.704 ms/op 87.200 ms/op 0.98
mainnet_e81889 - altair processJustificationAndFinalization 14.728 us/op 20.800 us/op 0.71
mainnet_e81889 - altair processInactivityUpdates 5.8691 ms/op 6.8303 ms/op 0.86
mainnet_e81889 - altair processRewardsAndPenalties 64.191 ms/op 76.364 ms/op 0.84
mainnet_e81889 - altair processRegistryUpdates 2.8130 us/op 2.5830 us/op 1.09
mainnet_e81889 - altair processSlashings 491.00 ns/op 896.00 ns/op 0.55
mainnet_e81889 - altair processEth1DataReset 536.00 ns/op 1.1670 us/op 0.46
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4473 ms/op 2.7135 ms/op 0.53
mainnet_e81889 - altair processSlashingsReset 3.7230 us/op 9.9090 us/op 0.38
mainnet_e81889 - altair processRandaoMixesReset 7.5530 us/op 8.4300 us/op 0.90
mainnet_e81889 - altair processHistoricalRootsUpdate 943.00 ns/op 1.0360 us/op 0.91
mainnet_e81889 - altair processParticipationFlagUpdates 3.2060 us/op 2.8150 us/op 1.14
mainnet_e81889 - altair processSyncCommitteeUpdates 616.00 ns/op 883.00 ns/op 0.70
mainnet_e81889 - altair afterProcessEpoch 124.10 ms/op 124.13 ms/op 1.00
capella processEpoch - mainnet_e217614 2.1255 s/op 3.0721 s/op 0.69
mainnet_e217614 - capella beforeProcessEpoch 511.44 ms/op 646.41 ms/op 0.79
mainnet_e217614 - capella processJustificationAndFinalization 17.247 us/op 25.497 us/op 0.68
mainnet_e217614 - capella processInactivityUpdates 19.071 ms/op 26.025 ms/op 0.73
mainnet_e217614 - capella processRewardsAndPenalties 414.37 ms/op 441.35 ms/op 0.94
mainnet_e217614 - capella processRegistryUpdates 37.118 us/op 27.680 us/op 1.34
mainnet_e217614 - capella processSlashings 517.00 ns/op 922.00 ns/op 0.56
mainnet_e217614 - capella processEth1DataReset 569.00 ns/op 529.00 ns/op 1.08
mainnet_e217614 - capella processEffectiveBalanceUpdates 8.5276 ms/op 4.5719 ms/op 1.87
mainnet_e217614 - capella processSlashingsReset 3.1540 us/op 3.6690 us/op 0.86
mainnet_e217614 - capella processRandaoMixesReset 4.7120 us/op 5.2020 us/op 0.91
mainnet_e217614 - capella processHistoricalRootsUpdate 642.00 ns/op 811.00 ns/op 0.79
mainnet_e217614 - capella processParticipationFlagUpdates 1.7020 us/op 3.3180 us/op 0.51
mainnet_e217614 - capella afterProcessEpoch 334.38 ms/op 325.16 ms/op 1.03
phase0 processEpoch - mainnet_e58758 419.35 ms/op 517.88 ms/op 0.81
mainnet_e58758 - phase0 beforeProcessEpoch 123.71 ms/op 147.65 ms/op 0.84
mainnet_e58758 - phase0 processJustificationAndFinalization 20.649 us/op 15.962 us/op 1.29
mainnet_e58758 - phase0 processRewardsAndPenalties 53.494 ms/op 41.414 ms/op 1.29
mainnet_e58758 - phase0 processRegistryUpdates 15.398 us/op 10.715 us/op 1.44
mainnet_e58758 - phase0 processSlashings 641.00 ns/op 695.00 ns/op 0.92
mainnet_e58758 - phase0 processEth1DataReset 457.00 ns/op 502.00 ns/op 0.91
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1897 ms/op 1.2391 ms/op 0.96
mainnet_e58758 - phase0 processSlashingsReset 3.4710 us/op 8.6120 us/op 0.40
mainnet_e58758 - phase0 processRandaoMixesReset 3.9960 us/op 7.9720 us/op 0.50
mainnet_e58758 - phase0 processHistoricalRootsUpdate 568.00 ns/op 920.00 ns/op 0.62
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.1110 us/op 5.9000 us/op 0.87
mainnet_e58758 - phase0 afterProcessEpoch 96.046 ms/op 101.52 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4460 ms/op 1.6733 ms/op 0.86
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6222 ms/op 1.9521 ms/op 0.83
altair processInactivityUpdates - 250000 normalcase 25.186 ms/op 29.944 ms/op 0.84
altair processInactivityUpdates - 250000 worstcase 26.775 ms/op 28.211 ms/op 0.95
phase0 processRegistryUpdates - 250000 normalcase 11.307 us/op 14.414 us/op 0.78
phase0 processRegistryUpdates - 250000 badcase_full_deposits 418.02 us/op 572.92 us/op 0.73
phase0 processRegistryUpdates - 250000 worstcase 0.5 174.16 ms/op 139.71 ms/op 1.25
altair processRewardsAndPenalties - 250000 normalcase 54.444 ms/op 61.519 ms/op 0.88
altair processRewardsAndPenalties - 250000 worstcase 53.841 ms/op 61.884 ms/op 0.87
phase0 getAttestationDeltas - 250000 normalcase 10.115 ms/op 9.0644 ms/op 1.12
phase0 getAttestationDeltas - 250000 worstcase 9.5195 ms/op 8.8604 ms/op 1.07
phase0 processSlashings - 250000 worstcase 101.61 us/op 130.14 us/op 0.78
altair processSyncCommitteeUpdates - 250000 160.14 ms/op 151.58 ms/op 1.06
BeaconState.hashTreeRoot - No change 489.00 ns/op 380.00 ns/op 1.29
BeaconState.hashTreeRoot - 1 full validator 157.70 us/op 126.93 us/op 1.24
BeaconState.hashTreeRoot - 32 full validator 1.9179 ms/op 1.2962 ms/op 1.48
BeaconState.hashTreeRoot - 512 full validator 16.753 ms/op 12.976 ms/op 1.29
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 175.72 us/op 139.83 us/op 1.26
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1862 ms/op 1.8468 ms/op 1.18
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.187 ms/op 23.910 ms/op 1.18
BeaconState.hashTreeRoot - 1 balances 135.78 us/op 108.18 us/op 1.26
BeaconState.hashTreeRoot - 32 balances 1.4305 ms/op 990.52 us/op 1.44
BeaconState.hashTreeRoot - 512 balances 15.562 ms/op 10.556 ms/op 1.47
BeaconState.hashTreeRoot - 250000 balances 220.39 ms/op 216.91 ms/op 1.02
aggregationBits - 2048 els - zipIndexesInBitList 21.284 us/op 18.685 us/op 1.14
byteArrayEquals 32 77.875 ns/op 76.711 ns/op 1.02
Buffer.compare 32 59.801 ns/op 56.504 ns/op 1.06
byteArrayEquals 1024 2.1419 us/op 2.0921 us/op 1.02
Buffer.compare 1024 75.001 ns/op 71.583 ns/op 1.05
byteArrayEquals 16384 34.127 us/op 33.282 us/op 1.03
Buffer.compare 16384 269.50 ns/op 253.95 ns/op 1.06
byteArrayEquals 123687377 270.03 ms/op 262.41 ms/op 1.03
Buffer.compare 123687377 8.4412 ms/op 8.5577 ms/op 0.99
byteArrayEquals 32 - diff last byte 81.182 ns/op 85.578 ns/op 0.95
Buffer.compare 32 - diff last byte 63.590 ns/op 60.581 ns/op 1.05
byteArrayEquals 1024 - diff last byte 2.1977 us/op 2.3409 us/op 0.94
Buffer.compare 1024 - diff last byte 78.276 ns/op 74.334 ns/op 1.05
byteArrayEquals 16384 - diff last byte 35.286 us/op 34.824 us/op 1.01
Buffer.compare 16384 - diff last byte 274.25 ns/op 294.52 ns/op 0.93
byteArrayEquals 123687377 - diff last byte 274.33 ms/op 268.06 ms/op 1.02
Buffer.compare 123687377 - diff last byte 9.7820 ms/op 8.3847 ms/op 1.17
byteArrayEquals 32 - random bytes 7.0230 ns/op 5.4650 ns/op 1.29
Buffer.compare 32 - random bytes 66.168 ns/op 63.591 ns/op 1.04
byteArrayEquals 1024 - random bytes 6.7170 ns/op 5.7690 ns/op 1.16
Buffer.compare 1024 - random bytes 64.990 ns/op 62.113 ns/op 1.05
byteArrayEquals 16384 - random bytes 7.0910 ns/op 5.7090 ns/op 1.24
Buffer.compare 16384 - random bytes 67.439 ns/op 62.721 ns/op 1.08
byteArrayEquals 123687377 - random bytes 14.800 ns/op 9.0500 ns/op 1.64
Buffer.compare 123687377 - random bytes 78.980 ns/op 73.230 ns/op 1.08
regular array get 100000 times 51.605 us/op 46.242 us/op 1.12
wrappedArray get 100000 times 51.582 us/op 46.529 us/op 1.11
arrayWithProxy get 100000 times 18.246 ms/op 14.781 ms/op 1.23
ssz.Root.equals 61.583 ns/op 55.281 ns/op 1.11
byteArrayEquals 57.422 ns/op 55.507 ns/op 1.03
Buffer.compare 13.253 ns/op 12.055 ns/op 1.10
shuffle list - 16384 els 7.8295 ms/op 7.1632 ms/op 1.09
shuffle list - 250000 els 116.05 ms/op 105.93 ms/op 1.10
processSlot - 1 slots 22.444 us/op 20.794 us/op 1.08
processSlot - 32 slots 3.9078 ms/op 4.4451 ms/op 0.88
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 67.653 ms/op 63.881 ms/op 1.06
getCommitteeAssignments - req 1 vs - 250000 vc 3.1183 ms/op 2.5847 ms/op 1.21
getCommitteeAssignments - req 100 vs - 250000 vc 4.2611 ms/op 3.8028 ms/op 1.12
getCommitteeAssignments - req 1000 vs - 250000 vc 4.8956 ms/op 4.2971 ms/op 1.14
findModifiedValidators - 10000 modified validators 639.17 ms/op 591.52 ms/op 1.08
findModifiedValidators - 1000 modified validators 518.69 ms/op 515.23 ms/op 1.01
findModifiedValidators - 100 modified validators 506.01 ms/op 578.79 ms/op 0.87
findModifiedValidators - 10 modified validators 569.42 ms/op 621.71 ms/op 0.92
findModifiedValidators - 1 modified validators 521.26 ms/op 563.91 ms/op 0.92
findModifiedValidators - no difference 533.99 ms/op 569.46 ms/op 0.94
compare ViewDUs 5.2577 s/op 7.0146 s/op 0.75
compare each validator Uint8Array 1.8775 s/op 2.8349 s/op 0.66
compare ViewDU to Uint8Array 1.5139 s/op 1.8915 s/op 0.80
migrate state 1000000 validators, 24 modified, 0 new 1.0460 s/op 1.1145 s/op 0.94
migrate state 1000000 validators, 1700 modified, 1000 new 1.9592 s/op 1.2479 s/op 1.57
migrate state 1000000 validators, 3400 modified, 2000 new 1.9349 s/op 1.5435 s/op 1.25
migrate state 1500000 validators, 24 modified, 0 new 1.1173 s/op 934.39 ms/op 1.20
migrate state 1500000 validators, 1700 modified, 1000 new 1.3919 s/op 1.4982 s/op 0.93
migrate state 1500000 validators, 3400 modified, 2000 new 1.8580 s/op 1.8684 s/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.3800 ns/op 5.8100 ns/op 0.93
state getBlockRootAtSlot - 250000 vs - 7PWei 816.62 ns/op 821.08 ns/op 0.99
computeProposers - vc 250000 10.992 ms/op 13.372 ms/op 0.82
computeEpochShuffling - vc 250000 122.01 ms/op 126.25 ms/op 0.97
getNextSyncCommittee - vc 250000 182.94 ms/op 202.42 ms/op 0.90
computeSigningRoot for AttestationData 32.801 us/op 35.716 us/op 0.92
hash AttestationData serialized data then Buffer.toString(base64) 2.7086 us/op 2.6142 us/op 1.04
toHexString serialized data 1.4797 us/op 1.7479 us/op 0.85
Buffer.toString(base64) 291.59 ns/op 284.84 ns/op 1.02

by benchmarkbot/action

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

👍

@wemeetagain wemeetagain merged commit 42e8835 into unstable Feb 14, 2024
20 of 22 checks passed
@wemeetagain wemeetagain deleted the nflaig/lint-lockfile branch February 14, 2024 16:31
@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