Skip to content

Commit

Permalink
chore: fix yarn install warnings related to vitest (#6232)
Browse files Browse the repository at this point in the history
* Restore yarn warnings lint script to previous version

* Add vite package resolution

* Update vite-plugin-node-polyfills package to 0.18.0
  • Loading branch information
nflaig authored Dec 25, 2023
1 parent 6f4a9d6 commit 592c147
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 31 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"typescript-docs-verifier": "^2.5.0",
"vite-plugin-node-polyfills": "^0.17.0",
"vite-plugin-node-polyfills": "^0.18.0",
"vite-plugin-top-level-await": "^1.3.1",
"vitest": "^1.0.2",
"vitest-when": "^0.3.0",
Expand All @@ -108,6 +108,7 @@
"resolutions": {
"dns-over-http-resolver": "^2.1.1",
"chai": "^4.3.10",
"loupe": "^2.3.6"
"loupe": "^2.3.6",
"vite": "^5.0.0"
}
}
15 changes: 1 addition & 14 deletions scripts/assert_no_yarn_warnings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,8 @@ OUTPUT=$(yarn install --check-files 2>&1)

echo $OUTPUT

MATCH=("warning")

# There are few yarn warnings we can't find a fix for. Excluding those.
# TODO: Keep checking occasionally if the warnings are fixed upstream.
EXCLUDE=("Pattern \[\".*\"\] is trying to unpack in the same destination")
ARGS=()

for m in "${MATCH[@]}"; do ARGS+=(-e "$m"); done
for e in "${EXCLUDE[@]}"; do ARGS+=(--exclude "$e"); done
COMMAND="grep -qi ${ARGS[@]}"

echo "Running $COMMAND"

# grep the output for 'warning'
if echo "$OUTPUT" | ${COMMAND}; then
if echo "$OUTPUT" | grep -qi 'warning'; then
echo "There were warnings in yarn install --check-files"
exit 1
else
Expand Down
28 changes: 13 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4943,15 +4943,6 @@ buffer-indexof-polyfill@~1.0.0:
resolved "https://registry.yarnpkg.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz#d2732135c5999c64b277fcf9b1abe3498254729c"
integrity sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==

"buffer-polyfill@npm:buffer@^6.0.3", buffer@^6.0.3:
name buffer-polyfill
version "6.0.3"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
dependencies:
base64-js "^1.3.1"
ieee754 "^1.2.1"

buffer-xor@^1.0.3:
version "1.0.3"
resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz"
Expand Down Expand Up @@ -4981,6 +4972,15 @@ buffer@^5.2.1, buffer@^5.4.3, buffer@^5.5.0, buffer@^5.7.1:
base64-js "^1.3.1"
ieee754 "^1.1.13"

buffer@^6.0.3:
name buffer-polyfill
version "6.0.3"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
dependencies:
base64-js "^1.3.1"
ieee754 "^1.2.1"

buffers@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
Expand Down Expand Up @@ -15191,15 +15191,13 @@ vite-node@1.0.2:
picocolors "^1.0.0"
vite "^5.0.0"

vite-plugin-node-polyfills@^0.17.0:
version "0.17.0"
resolved "https://registry.yarnpkg.com/vite-plugin-node-polyfills/-/vite-plugin-node-polyfills-0.17.0.tgz#1044a4955174ddaeedbc3679b179e1efac9da006"
integrity sha512-iPmPn7376e5u6QvoTSJa16hf5Q0DFwHFXJk2uYpsNlmI3JdPms7hWyh55o+OysJ5jo9J5XPhLC9sMOYifwFd1w==
vite-plugin-node-polyfills@^0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/vite-plugin-node-polyfills/-/vite-plugin-node-polyfills-0.18.0.tgz#2ad147960f7a35dbbb1c9f9c1ae928bd0f438c1e"
integrity sha512-zkdLD3gpOhLFyxYRMJ5apk0RcODhomuS3XQgExowiX8naoc251JfcP3toqnfDlMdF0xuPYahre/H38xAcq8ApA==
dependencies:
"@rollup/plugin-inject" "^5.0.5"
buffer-polyfill "npm:buffer@^6.0.3"
node-stdlib-browser "^1.2.0"
process "^0.11.10"

vite-plugin-top-level-await@^1.3.1:
version "1.3.1"
Expand Down

1 comment on commit 592c147

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

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

Benchmark suite Current: 592c147 Previous: 6f4a9d6 Ratio
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 65.322 us/op 20.203 us/op 3.23
Full benchmark results
Benchmark suite Current: 592c147 Previous: 6f4a9d6 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 907.02 us/op 653.19 us/op 1.39
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.748 us/op 57.318 us/op 0.87
BLS verify - blst-native 1.0506 ms/op 1.0587 ms/op 0.99
BLS verifyMultipleSignatures 3 - blst-native 2.2425 ms/op 2.2601 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst-native 4.9645 ms/op 5.0102 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst-native 18.247 ms/op 18.426 ms/op 0.99
BLS verifyMultipleSignatures 64 - blst-native 35.953 ms/op 36.667 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst-native 71.369 ms/op 72.946 ms/op 0.98
BLS deserializing 10000 signatures 787.65 ms/op 807.82 ms/op 0.98
BLS deserializing 100000 signatures 8.0244 s/op 8.1169 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1342 ms/op 1.0650 ms/op 1.07
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2849 ms/op 1.3434 ms/op 0.96
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.0209 ms/op 1.9135 ms/op 1.06
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.8664 ms/op 3.8045 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst-native 4.7827 ms/op 5.0260 ms/op 0.95
BLS aggregatePubkeys 32 - blst-native 21.803 us/op 22.298 us/op 0.98
BLS aggregatePubkeys 128 - blst-native 84.720 us/op 87.905 us/op 0.96
getAttestationsForBlock 35.122 ms/op 33.017 ms/op 1.06
getSlashingsAndExits - default max 92.657 us/op 120.87 us/op 0.77
getSlashingsAndExits - 2k 297.23 us/op 305.81 us/op 0.97
proposeBlockBody type=full, size=empty 3.8611 ms/op 3.5120 ms/op 1.10
isKnown best case - 1 super set check 324.00 ns/op 251.00 ns/op 1.29
isKnown normal case - 2 super set checks 336.00 ns/op 245.00 ns/op 1.37
isKnown worse case - 16 super set checks 356.00 ns/op 248.00 ns/op 1.44
CheckpointStateCache - add get delete 3.6510 us/op 3.4280 us/op 1.07
validate api signedAggregateAndProof - struct 2.3322 ms/op 2.4910 ms/op 0.94
validate gossip signedAggregateAndProof - struct 2.3889 ms/op 2.3527 ms/op 1.02
validate gossip attestation - vc 640000 1.1377 ms/op 1.0789 ms/op 1.05
batch validate gossip attestation - vc 640000 - chunk 32 132.73 us/op 131.29 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 118.81 us/op 118.16 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 128 113.37 us/op 114.44 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 256 108.21 us/op 107.56 us/op 1.01
pickEth1Vote - no votes 928.88 us/op 919.36 us/op 1.01
pickEth1Vote - max votes 8.9913 ms/op 8.8087 ms/op 1.02
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.102 ms/op 17.782 ms/op 1.19
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.910 ms/op 21.497 ms/op 1.34
pickEth1Vote - Eth1Data fastSerialize value x2048 431.60 us/op 438.92 us/op 0.98
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.3803 ms/op 6.9836 ms/op 1.06
bytes32 toHexString 432.00 ns/op 338.00 ns/op 1.28
bytes32 Buffer.toString(hex) 300.00 ns/op 183.00 ns/op 1.64
bytes32 Buffer.toString(hex) from Uint8Array 418.00 ns/op 307.00 ns/op 1.36
bytes32 Buffer.toString(hex) + 0x 301.00 ns/op 202.00 ns/op 1.49
Object access 1 prop 0.18600 ns/op 0.10800 ns/op 1.72
Map access 1 prop 0.17600 ns/op 0.095000 ns/op 1.85
Object get x1000 4.7410 ns/op 5.3590 ns/op 0.88
Map get x1000 0.69100 ns/op 0.63400 ns/op 1.09
Object set x1000 25.133 ns/op 25.666 ns/op 0.98
Map set x1000 17.015 ns/op 17.515 ns/op 0.97
Return object 10000 times 0.21230 ns/op 0.21580 ns/op 0.98
Throw Error 10000 times 2.6206 us/op 2.7305 us/op 0.96
fastMsgIdFn sha256 / 200 bytes 1.8310 us/op 1.8230 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 278.00 ns/op 195.00 ns/op 1.43
fastMsgIdFn h64 xxhash / 200 bytes 347.00 ns/op 238.00 ns/op 1.46
fastMsgIdFn sha256 / 1000 bytes 5.9010 us/op 6.0020 us/op 0.98
fastMsgIdFn h32 xxhash / 1000 bytes 390.00 ns/op 313.00 ns/op 1.25
fastMsgIdFn h64 xxhash / 1000 bytes 407.00 ns/op 300.00 ns/op 1.36
fastMsgIdFn sha256 / 10000 bytes 49.835 us/op 53.289 us/op 0.94
fastMsgIdFn h32 xxhash / 10000 bytes 1.6950 us/op 1.6610 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.1640 us/op 1.1100 us/op 1.05
send data - 1000 256B messages 12.698 ms/op 11.579 ms/op 1.10
send data - 1000 512B messages 15.088 ms/op 16.735 ms/op 0.90
send data - 1000 1024B messages 22.395 ms/op 24.703 ms/op 0.91
send data - 1000 1200B messages 28.314 ms/op 15.395 ms/op 1.84
send data - 1000 2048B messages 33.459 ms/op 31.619 ms/op 1.06
send data - 1000 4096B messages 30.064 ms/op 31.153 ms/op 0.97
send data - 1000 16384B messages 91.277 ms/op 93.511 ms/op 0.98
send data - 1000 65536B messages 434.23 ms/op 379.97 ms/op 1.14
enrSubnets - fastDeserialize 64 bits 914.00 ns/op 834.00 ns/op 1.10
enrSubnets - ssz BitVector 64 bits 417.00 ns/op 308.00 ns/op 1.35
enrSubnets - fastDeserialize 4 bits 195.00 ns/op 115.00 ns/op 1.70
enrSubnets - ssz BitVector 4 bits 417.00 ns/op 309.00 ns/op 1.35
prioritizePeers score -10:0 att 32-0.1 sync 2-0 86.072 us/op 67.732 us/op 1.27
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 83.762 us/op 78.235 us/op 1.07
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 110.26 us/op 106.47 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 196.54 us/op 181.23 us/op 1.08
prioritizePeers score 0:0 att 64-1 sync 4-1 213.95 us/op 205.62 us/op 1.04
array of 16000 items push then shift 1.2363 us/op 1.2753 us/op 0.97
LinkedList of 16000 items push then shift 6.6490 ns/op 5.7850 ns/op 1.15
array of 16000 items push then pop 60.947 ns/op 41.773 ns/op 1.46
LinkedList of 16000 items push then pop 5.5550 ns/op 5.5890 ns/op 0.99
array of 24000 items push then shift 1.7899 us/op 1.8819 us/op 0.95
LinkedList of 24000 items push then shift 6.1690 ns/op 5.7300 ns/op 1.08
array of 24000 items push then pop 87.948 ns/op 103.74 ns/op 0.85
LinkedList of 24000 items push then pop 5.5090 ns/op 5.4920 ns/op 1.00
intersect bitArray bitLen 8 4.6060 ns/op 4.9080 ns/op 0.94
intersect array and set length 8 46.786 ns/op 48.363 ns/op 0.97
intersect bitArray bitLen 128 26.241 ns/op 27.413 ns/op 0.96
intersect array and set length 128 676.42 ns/op 682.60 ns/op 0.99
bitArray.getTrueBitIndexes() bitLen 128 1.1840 us/op 1.0330 us/op 1.15
bitArray.getTrueBitIndexes() bitLen 248 1.9530 us/op 1.8600 us/op 1.05
bitArray.getTrueBitIndexes() bitLen 512 3.7820 us/op 3.4420 us/op 1.10
Buffer.concat 32 items 942.00 ns/op 814.00 ns/op 1.16
Uint8Array.set 32 items 1.8590 us/op 2.2220 us/op 0.84
Set add up to 64 items then delete first 1.6606 us/op 1.7473 us/op 0.95
OrderedSet add up to 64 items then delete first 2.4917 us/op 2.6913 us/op 0.93
Set add up to 64 items then delete last 1.8652 us/op 2.0147 us/op 0.93
OrderedSet add up to 64 items then delete last 2.7697 us/op 2.9824 us/op 0.93
Set add up to 64 items then delete middle 1.8235 us/op 1.9864 us/op 0.92
OrderedSet add up to 64 items then delete middle 3.8760 us/op 4.2141 us/op 0.92
Set add up to 128 items then delete first 3.6117 us/op 3.9308 us/op 0.92
OrderedSet add up to 128 items then delete first 5.6915 us/op 6.1537 us/op 0.92
Set add up to 128 items then delete last 3.4862 us/op 3.8131 us/op 0.91
OrderedSet add up to 128 items then delete last 5.2551 us/op 5.7237 us/op 0.92
Set add up to 128 items then delete middle 3.4628 us/op 3.7729 us/op 0.92
OrderedSet add up to 128 items then delete middle 10.009 us/op 10.667 us/op 0.94
Set add up to 256 items then delete first 7.1028 us/op 7.6739 us/op 0.93
OrderedSet add up to 256 items then delete first 11.743 us/op 12.173 us/op 0.96
Set add up to 256 items then delete last 7.0369 us/op 7.4517 us/op 0.94
OrderedSet add up to 256 items then delete last 10.858 us/op 11.369 us/op 0.96
Set add up to 256 items then delete middle 6.9565 us/op 7.3938 us/op 0.94
OrderedSet add up to 256 items then delete middle 32.881 us/op 30.530 us/op 1.08
transfer serialized Status (84 B) 1.3690 us/op 1.2810 us/op 1.07
copy serialized Status (84 B) 1.3600 us/op 1.0600 us/op 1.28
transfer serialized SignedVoluntaryExit (112 B) 1.7630 us/op 1.3860 us/op 1.27
copy serialized SignedVoluntaryExit (112 B) 1.5190 us/op 1.1150 us/op 1.36
transfer serialized ProposerSlashing (416 B) 2.7530 us/op 1.6320 us/op 1.69
copy serialized ProposerSlashing (416 B) 2.9360 us/op 1.5420 us/op 1.90
transfer serialized Attestation (485 B) 2.4270 us/op 1.6920 us/op 1.43
copy serialized Attestation (485 B) 2.5710 us/op 1.3820 us/op 1.86
transfer serialized AttesterSlashing (33232 B) 2.4120 us/op 1.5030 us/op 1.60
copy serialized AttesterSlashing (33232 B) 4.6730 us/op 3.2550 us/op 1.44
transfer serialized Small SignedBeaconBlock (128000 B) 3.1210 us/op 1.6040 us/op 1.95
copy serialized Small SignedBeaconBlock (128000 B) 9.2370 us/op 8.5050 us/op 1.09
transfer serialized Avg SignedBeaconBlock (200000 B) 2.5030 us/op 1.6960 us/op 1.48
copy serialized Avg SignedBeaconBlock (200000 B) 13.107 us/op 12.001 us/op 1.09
transfer serialized BlobsSidecar (524380 B) 2.9100 us/op 1.9610 us/op 1.48
copy serialized BlobsSidecar (524380 B) 74.740 us/op 198.19 us/op 0.38
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2290 us/op 2.2870 us/op 1.41
copy serialized Big SignedBeaconBlock (1000000 B) 161.18 us/op 145.64 us/op 1.11
pass gossip attestations to forkchoice per slot 2.7191 ms/op 2.6793 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 516.77 us/op 432.56 us/op 1.19
forkChoice updateHead vc 600000 bc 64 eq 0 2.5958 ms/op 2.8867 ms/op 0.90
forkChoice updateHead vc 1000000 bc 64 eq 0 4.4349 ms/op 4.3698 ms/op 1.01
forkChoice updateHead vc 600000 bc 320 eq 0 2.5843 ms/op 2.6583 ms/op 0.97
forkChoice updateHead vc 600000 bc 1200 eq 0 2.6518 ms/op 2.7170 ms/op 0.98
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2864 ms/op 3.2696 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 1000 9.4540 ms/op 9.9172 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 10000 9.7975 ms/op 9.7727 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 11.592 ms/op 11.835 ms/op 0.98
computeDeltas 500000 validators 300 proto nodes 2.9815 ms/op 3.2119 ms/op 0.93
computeDeltas 500000 validators 1200 proto nodes 2.8968 ms/op 3.0051 ms/op 0.96
computeDeltas 500000 validators 7200 proto nodes 2.8940 ms/op 3.0289 ms/op 0.96
computeDeltas 750000 validators 300 proto nodes 4.4529 ms/op 4.4867 ms/op 0.99
computeDeltas 750000 validators 1200 proto nodes 4.4744 ms/op 4.6809 ms/op 0.96
computeDeltas 750000 validators 7200 proto nodes 4.4220 ms/op 4.6005 ms/op 0.96
computeDeltas 1400000 validators 300 proto nodes 8.5677 ms/op 8.5076 ms/op 1.01
computeDeltas 1400000 validators 1200 proto nodes 8.5956 ms/op 8.6880 ms/op 0.99
computeDeltas 1400000 validators 7200 proto nodes 8.5750 ms/op 8.9337 ms/op 0.96
computeDeltas 2100000 validators 300 proto nodes 12.945 ms/op 13.102 ms/op 0.99
computeDeltas 2100000 validators 1200 proto nodes 13.205 ms/op 13.448 ms/op 0.98
computeDeltas 2100000 validators 7200 proto nodes 13.107 ms/op 13.346 ms/op 0.98
computeProposerBoostScoreFromBalances 500000 validators 3.2951 ms/op 3.1945 ms/op 1.03
computeProposerBoostScoreFromBalances 750000 validators 3.0830 ms/op 3.1997 ms/op 0.96
computeProposerBoostScoreFromBalances 1400000 validators 3.1155 ms/op 3.2313 ms/op 0.96
computeProposerBoostScoreFromBalances 2100000 validators 3.1300 ms/op 3.2009 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei normalcase 1.4480 ms/op 1.5489 ms/op 0.93
altair processAttestation - 250000 vs - 7PWei worstcase 2.2185 ms/op 2.3765 ms/op 0.93
altair processAttestation - setStatus - 1/6 committees join 74.151 us/op 81.275 us/op 0.91
altair processAttestation - setStatus - 1/3 committees join 134.65 us/op 134.84 us/op 1.00
altair processAttestation - setStatus - 1/2 committees join 194.80 us/op 203.91 us/op 0.96
altair processAttestation - setStatus - 2/3 committees join 255.19 us/op 262.15 us/op 0.97
altair processAttestation - setStatus - 4/5 committees join 377.53 us/op 379.87 us/op 0.99
altair processAttestation - setStatus - 100% committees join 478.52 us/op 463.51 us/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase 9.0862 ms/op 6.0362 ms/op 1.51
altair processBlock - 250000 vs - 7PWei normalcase hashState 31.901 ms/op 28.054 ms/op 1.14
altair processBlock - 250000 vs - 7PWei worstcase 32.970 ms/op 30.026 ms/op 1.10
altair processBlock - 250000 vs - 7PWei worstcase hashState 77.738 ms/op 73.430 ms/op 1.06
phase0 processBlock - 250000 vs - 7PWei normalcase 2.6466 ms/op 1.7703 ms/op 1.49
phase0 processBlock - 250000 vs - 7PWei worstcase 25.212 ms/op 24.328 ms/op 1.04
altair processEth1Data - 250000 vs - 7PWei normalcase 293.45 us/op 285.61 us/op 1.03
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 12.191 us/op 7.3460 us/op 1.66
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 65.322 us/op 20.203 us/op 3.23
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.4610 us/op 5.8330 us/op 1.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.0970 us/op 5.5310 us/op 0.92
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 92.489 us/op 85.649 us/op 1.08
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1565 ms/op 807.16 us/op 1.43
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.2487 ms/op 986.10 us/op 1.27
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 973.66 us/op 961.18 us/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.7283 ms/op 2.9297 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4546 ms/op 1.8806 ms/op 0.77
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8200 ms/op 4.2965 ms/op 0.89
Tree 40 250000 create 255.33 ms/op 275.28 ms/op 0.93
Tree 40 250000 get(125000) 101.27 ns/op 112.61 ns/op 0.90
Tree 40 250000 set(125000) 778.05 ns/op 739.66 ns/op 1.05
Tree 40 250000 toArray() 16.079 ms/op 9.6013 ms/op 1.67
Tree 40 250000 iterate all - toArray() + loop 17.400 ms/op 9.7071 ms/op 1.79
Tree 40 250000 iterate all - get(i) 44.917 ms/op 38.544 ms/op 1.17
MutableVector 250000 create 9.0659 ms/op 8.9418 ms/op 1.01
MutableVector 250000 get(125000) 5.3240 ns/op 5.5260 ns/op 0.96
MutableVector 250000 set(125000) 191.32 ns/op 213.76 ns/op 0.90
MutableVector 250000 toArray() 2.3283 ms/op 2.4991 ms/op 0.93
MutableVector 250000 iterate all - toArray() + loop 2.4078 ms/op 2.5021 ms/op 0.96
MutableVector 250000 iterate all - get(i) 1.3307 ms/op 1.3035 ms/op 1.02
Array 250000 create 2.1078 ms/op 2.0116 ms/op 1.05
Array 250000 clone - spread 1.0841 ms/op 1.0336 ms/op 1.05
Array 250000 get(125000) 1.0160 ns/op 0.88600 ns/op 1.15
Array 250000 set(125000) 1.2190 ns/op 1.0870 ns/op 1.12
Array 250000 iterate all - loop 153.15 us/op 147.31 us/op 1.04
effectiveBalanceIncrements clone Uint8Array 300000 13.355 us/op 18.450 us/op 0.72
effectiveBalanceIncrements clone MutableVector 300000 398.00 ns/op 283.00 ns/op 1.41
effectiveBalanceIncrements rw all Uint8Array 300000 182.93 us/op 176.93 us/op 1.03
effectiveBalanceIncrements rw all MutableVector 300000 64.071 ms/op 61.421 ms/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 73.057 ms/op 74.177 ms/op 0.98
phase0 beforeProcessEpoch - 250000 vs - 7PWei 43.696 ms/op 41.026 ms/op 1.07
altair processEpoch - mainnet_e81889 411.80 ms/op 377.20 ms/op 1.09
mainnet_e81889 - altair beforeProcessEpoch 65.525 ms/op 67.144 ms/op 0.98
mainnet_e81889 - altair processJustificationAndFinalization 6.4160 us/op 6.3320 us/op 1.01
mainnet_e81889 - altair processInactivityUpdates 3.9963 ms/op 3.9051 ms/op 1.02
mainnet_e81889 - altair processRewardsAndPenalties 59.768 ms/op 47.426 ms/op 1.26
mainnet_e81889 - altair processRegistryUpdates 2.0420 us/op 1.1070 us/op 1.84
mainnet_e81889 - altair processSlashings 654.00 ns/op 307.00 ns/op 2.13
mainnet_e81889 - altair processEth1DataReset 543.00 ns/op 256.00 ns/op 2.12
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7551 ms/op 988.39 us/op 1.78
mainnet_e81889 - altair processSlashingsReset 2.5220 us/op 1.4220 us/op 1.77
mainnet_e81889 - altair processRandaoMixesReset 3.2740 us/op 1.9730 us/op 1.66
mainnet_e81889 - altair processHistoricalRootsUpdate 847.00 ns/op 466.00 ns/op 1.82
mainnet_e81889 - altair processParticipationFlagUpdates 1.8350 us/op 1000.0 ns/op 1.83
mainnet_e81889 - altair processSyncCommitteeUpdates 601.00 ns/op 206.00 ns/op 2.92
mainnet_e81889 - altair afterProcessEpoch 76.094 ms/op 77.021 ms/op 0.99
capella processEpoch - mainnet_e217614 1.8391 s/op 1.6498 s/op 1.11
mainnet_e217614 - capella beforeProcessEpoch 423.99 ms/op 426.09 ms/op 1.00
mainnet_e217614 - capella processJustificationAndFinalization 8.6740 us/op 9.0200 us/op 0.96
mainnet_e217614 - capella processInactivityUpdates 13.127 ms/op 12.563 ms/op 1.04
mainnet_e217614 - capella processRewardsAndPenalties 356.26 ms/op 345.76 ms/op 1.03
mainnet_e217614 - capella processRegistryUpdates 18.422 us/op 12.972 us/op 1.42
mainnet_e217614 - capella processSlashings 536.00 ns/op 303.00 ns/op 1.77
mainnet_e217614 - capella processEth1DataReset 643.00 ns/op 252.00 ns/op 2.55
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.6015 ms/op 3.3544 ms/op 1.37
mainnet_e217614 - capella processSlashingsReset 2.9050 us/op 1.6950 us/op 1.71
mainnet_e217614 - capella processRandaoMixesReset 3.2250 us/op 1.4520 us/op 2.22
mainnet_e217614 - capella processHistoricalRootsUpdate 638.00 ns/op 301.00 ns/op 2.12
mainnet_e217614 - capella processParticipationFlagUpdates 1.7640 us/op 797.00 ns/op 2.21
mainnet_e217614 - capella afterProcessEpoch 194.91 ms/op 189.40 ms/op 1.03
phase0 processEpoch - mainnet_e58758 410.08 ms/op 391.82 ms/op 1.05
mainnet_e58758 - phase0 beforeProcessEpoch 102.86 ms/op 116.46 ms/op 0.88
mainnet_e58758 - phase0 processJustificationAndFinalization 10.950 us/op 7.2140 us/op 1.52
mainnet_e58758 - phase0 processRewardsAndPenalties 50.957 ms/op 48.027 ms/op 1.06
mainnet_e58758 - phase0 processRegistryUpdates 7.0530 us/op 3.9290 us/op 1.80
mainnet_e58758 - phase0 processSlashings 649.00 ns/op 265.00 ns/op 2.45
mainnet_e58758 - phase0 processEth1DataReset 487.00 ns/op 212.00 ns/op 2.30
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.4023 ms/op 849.17 us/op 1.65
mainnet_e58758 - phase0 processSlashingsReset 2.0230 us/op 1.7220 us/op 1.17
mainnet_e58758 - phase0 processRandaoMixesReset 2.8320 us/op 1.7800 us/op 1.59
mainnet_e58758 - phase0 processHistoricalRootsUpdate 514.00 ns/op 245.00 ns/op 2.10
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.8550 us/op 2.7330 us/op 1.04
mainnet_e58758 - phase0 afterProcessEpoch 60.067 ms/op 64.892 ms/op 0.93
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6740 ms/op 1.0109 ms/op 1.66
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.0873 ms/op 1.4037 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 22.680 ms/op 22.494 ms/op 1.01
altair processInactivityUpdates - 250000 worstcase 22.261 ms/op 22.906 ms/op 0.97
phase0 processRegistryUpdates - 250000 normalcase 3.4300 us/op 3.2690 us/op 1.05
phase0 processRegistryUpdates - 250000 badcase_full_deposits 390.30 us/op 213.42 us/op 1.83
phase0 processRegistryUpdates - 250000 worstcase 0.5 127.75 ms/op 104.55 ms/op 1.22
altair processRewardsAndPenalties - 250000 normalcase 59.381 ms/op 54.283 ms/op 1.09
altair processRewardsAndPenalties - 250000 worstcase 58.324 ms/op 51.863 ms/op 1.12
phase0 getAttestationDeltas - 250000 normalcase 5.6716 ms/op 5.8003 ms/op 0.98
phase0 getAttestationDeltas - 250000 worstcase 5.6654 ms/op 5.2318 ms/op 1.08
phase0 processSlashings - 250000 worstcase 83.052 us/op 50.341 us/op 1.65
altair processSyncCommitteeUpdates - 250000 120.30 ms/op 105.51 ms/op 1.14
BeaconState.hashTreeRoot - No change 323.00 ns/op 190.00 ns/op 1.70
BeaconState.hashTreeRoot - 1 full validator 144.40 us/op 144.99 us/op 1.00
BeaconState.hashTreeRoot - 32 full validator 1.7379 ms/op 1.1704 ms/op 1.48
BeaconState.hashTreeRoot - 512 full validator 14.698 ms/op 16.649 ms/op 0.88
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 162.05 us/op 148.13 us/op 1.09
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9621 ms/op 1.5775 ms/op 1.24
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 29.319 ms/op 23.700 ms/op 1.24
BeaconState.hashTreeRoot - 1 balances 126.88 us/op 128.86 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 950.00 us/op 1.1232 ms/op 0.85
BeaconState.hashTreeRoot - 512 balances 9.5242 ms/op 10.608 ms/op 0.90
BeaconState.hashTreeRoot - 250000 balances 154.08 ms/op 178.45 ms/op 0.86
aggregationBits - 2048 els - zipIndexesInBitList 10.487 us/op 38.754 us/op 0.27
byteArrayEquals 32 63.985 ns/op 61.205 ns/op 1.05
Buffer.compare 32 38.764 ns/op 35.904 ns/op 1.08
byteArrayEquals 1024 1.7406 us/op 1.6276 us/op 1.07
Buffer.compare 1024 46.018 ns/op 41.646 ns/op 1.10
byteArrayEquals 16384 27.660 us/op 25.876 us/op 1.07
Buffer.compare 16384 230.80 ns/op 211.92 ns/op 1.09
byteArrayEquals 123687377 207.94 ms/op 203.80 ms/op 1.02
Buffer.compare 123687377 3.7136 ms/op 5.3449 ms/op 0.69
byteArrayEquals 32 - diff last byte 61.464 ns/op 57.443 ns/op 1.07
Buffer.compare 32 - diff last byte 39.006 ns/op 34.748 ns/op 1.12
byteArrayEquals 1024 - diff last byte 1.7440 us/op 1.5847 us/op 1.10
Buffer.compare 1024 - diff last byte 47.193 ns/op 41.457 ns/op 1.14
byteArrayEquals 16384 - diff last byte 27.807 us/op 25.256 us/op 1.10
Buffer.compare 16384 - diff last byte 220.08 ns/op 202.72 ns/op 1.09
byteArrayEquals 123687377 - diff last byte 206.00 ms/op 189.02 ms/op 1.09
Buffer.compare 123687377 - diff last byte 4.0857 ms/op 5.2833 ms/op 0.77
byteArrayEquals 32 - random bytes 4.5160 ns/op 4.1820 ns/op 1.08
Buffer.compare 32 - random bytes 40.050 ns/op 36.113 ns/op 1.11
byteArrayEquals 1024 - random bytes 4.3570 ns/op 4.1520 ns/op 1.05
Buffer.compare 1024 - random bytes 37.933 ns/op 33.936 ns/op 1.12
byteArrayEquals 16384 - random bytes 4.3690 ns/op 4.1320 ns/op 1.06
Buffer.compare 16384 - random bytes 37.882 ns/op 33.869 ns/op 1.12
byteArrayEquals 123687377 - random bytes 7.6400 ns/op 6.5600 ns/op 1.16
Buffer.compare 123687377 - random bytes 41.260 ns/op 35.900 ns/op 1.15
regular array get 100000 times 40.550 us/op 38.420 us/op 1.06
wrappedArray get 100000 times 40.457 us/op 38.520 us/op 1.05
arrayWithProxy get 100000 times 10.322 ms/op 10.240 ms/op 1.01
ssz.Root.equals 54.596 ns/op 58.502 ns/op 0.93
byteArrayEquals 53.374 ns/op 53.801 ns/op 0.99
Buffer.compare 9.5080 ns/op 9.6760 ns/op 0.98
shuffle list - 16384 els 4.5352 ms/op 4.5922 ms/op 0.99
shuffle list - 250000 els 67.637 ms/op 68.686 ms/op 0.98
processSlot - 1 slots 14.281 us/op 14.206 us/op 1.01
processSlot - 32 slots 2.7485 ms/op 3.1814 ms/op 0.86
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 51.186 ms/op 56.420 ms/op 0.91
getCommitteeAssignments - req 1 vs - 250000 vc 2.2252 ms/op 2.2352 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.2855 ms/op 3.3757 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 3.5894 ms/op 3.6310 ms/op 0.99
findModifiedValidators - 10000 modified validators 419.57 ms/op 425.27 ms/op 0.99
findModifiedValidators - 1000 modified validators 323.61 ms/op 347.80 ms/op 0.93
findModifiedValidators - 100 modified validators 297.64 ms/op 303.27 ms/op 0.98
findModifiedValidators - 10 modified validators 297.55 ms/op 271.94 ms/op 1.09
findModifiedValidators - 1 modified validators 288.07 ms/op 314.09 ms/op 0.92
findModifiedValidators - no difference 323.10 ms/op 285.97 ms/op 1.13
compare ViewDUs 3.9315 s/op 3.7229 s/op 1.06
compare each validator Uint8Array 1.6450 s/op 1.8065 s/op 0.91
compare ViewDU to Uint8Array 746.93 ms/op 787.20 ms/op 0.95
migrate state 1000000 validators, 24 modified, 0 new 758.48 ms/op 694.95 ms/op 1.09
migrate state 1000000 validators, 1700 modified, 1000 new 966.06 ms/op 930.26 ms/op 1.04
migrate state 1000000 validators, 3400 modified, 2000 new 1.1745 s/op 1.1465 s/op 1.02
migrate state 1500000 validators, 24 modified, 0 new 738.90 ms/op 693.49 ms/op 1.07
migrate state 1500000 validators, 1700 modified, 1000 new 998.45 ms/op 947.75 ms/op 1.05
migrate state 1500000 validators, 3400 modified, 2000 new 1.1351 s/op 1.1601 s/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2300 ns/op 3.5000 ns/op 1.21
state getBlockRootAtSlot - 250000 vs - 7PWei 862.94 ns/op 633.93 ns/op 1.36
computeProposers - vc 250000 6.5636 ms/op 6.0951 ms/op 1.08
computeEpochShuffling - vc 250000 65.894 ms/op 65.260 ms/op 1.01
getNextSyncCommittee - vc 250000 110.79 ms/op 100.29 ms/op 1.10
computeSigningRoot for AttestationData 27.931 us/op 21.825 us/op 1.28
hash AttestationData serialized data then Buffer.toString(base64) 1.1564 us/op 1.1498 us/op 1.01
toHexString serialized data 746.89 ns/op 730.95 ns/op 1.02
Buffer.toString(base64) 152.70 ns/op 143.96 ns/op 1.06

Please sign in to comment.