Skip to content

Commit

Permalink
chore: upgrade classic-level (#6793)
Browse files Browse the repository at this point in the history
* chore: upgrade classic-level

* chore: address comments
  • Loading branch information
jeluard authored May 16, 2024
1 parent c39b914 commit a6b10df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"@types/node": "^20.11.28",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/browser": "^1.6.0",
"@vitest/coverage-v8": "^1.6.0",
"crypto-browserify": "^3.12.0",
"dotenv": "^16.4.5",
"electron": "^26.2.2",
Expand All @@ -78,10 +78,10 @@
"ts-node": "^10.9.2",
"typescript": "^5.4.2",
"typescript-docs-verifier": "^2.5.0",
"vite": "^5.2.11",
"vite-plugin-dts": "^3.9.1",
"vite-plugin-node-polyfills": "^0.21.0",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-dts": "^3.9.1",
"vite": "^5.2.11",
"vitest": "^1.6.0",
"vitest-when": "^0.3.1",
"wait-port": "^1.1.0",
Expand Down
13 changes: 9 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4809,14 +4809,14 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
safe-buffer "^5.0.1"

classic-level@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.2.0.tgz#2d52bdec8e7a27f534e67fdeb890abef3e643c27"
integrity sha512-qw5B31ANxSluWz9xBzklRWTUAJ1SXIdaVKTVS7HcTGKOAmExx65Wo5BUICW+YGORe2FOUaDghoI9ZDxj82QcFg==
version "1.4.1"
resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.4.1.tgz#169ecf9f9c6200ad42a98c8576af449c1badbaee"
integrity sha512-qGx/KJl3bvtOHrGau2WklEZuXhS3zme+jf+fsu6Ej7W7IP/C49v7KNlWIsT1jZu0YnfzSIYDGcEWpCa1wKGWXQ==
dependencies:
abstract-level "^1.0.2"
catering "^2.1.0"
module-error "^1.0.1"
napi-macros "~2.0.0"
napi-macros "^2.2.2"
node-gyp-build "^4.3.0"

clean-stack@^2.0.0:
Expand Down Expand Up @@ -9500,6 +9500,11 @@ nanoid@^3.3.7:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==

napi-macros@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044"
integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==

napi-macros@~2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz"
Expand Down

1 comment on commit a6b10df

@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: a6b10df Previous: c39b914 Ratio
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 24.738 ms/op 4.3282 ms/op 5.72
Full benchmark results
Benchmark suite Current: a6b10df Previous: c39b914 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 865.89 us/op 646.15 us/op 1.34
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 50.521 us/op 50.522 us/op 1.00
BLS verify - blst-native 1.1215 ms/op 1.1868 ms/op 0.94
BLS verifyMultipleSignatures 3 - blst-native 2.1930 ms/op 2.1848 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 4.7277 ms/op 4.6922 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 17.307 ms/op 17.242 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst-native 34.198 ms/op 34.237 ms/op 1.00
BLS verifyMultipleSignatures 128 - blst-native 67.589 ms/op 67.862 ms/op 1.00
BLS deserializing 10000 signatures 792.78 ms/op 784.88 ms/op 1.01
BLS deserializing 100000 signatures 8.1287 s/op 7.9082 s/op 1.03
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1225 ms/op 1.1590 ms/op 0.97
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2717 ms/op 1.3768 ms/op 0.92
BLS verifyMultipleSignatures - same message - 32 - blst-native 1.9735 ms/op 2.1221 ms/op 0.93
BLS verifyMultipleSignatures - same message - 64 - blst-native 2.9501 ms/op 3.1232 ms/op 0.94
BLS verifyMultipleSignatures - same message - 128 - blst-native 4.9003 ms/op 4.9829 ms/op 0.98
BLS aggregatePubkeys 32 - blst-native 24.257 us/op 24.782 us/op 0.98
BLS aggregatePubkeys 128 - blst-native 94.734 us/op 97.379 us/op 0.97
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 43.870 ms/op 43.242 ms/op 1.01
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 42.645 ms/op 42.575 ms/op 1.00
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 22.076 ms/op 22.745 ms/op 0.97
getSlashingsAndExits - default max 201.03 us/op 90.428 us/op 2.22
getSlashingsAndExits - 2k 566.51 us/op 469.57 us/op 1.21
proposeBlockBody type=full, size=empty 4.6676 ms/op 4.3003 ms/op 1.09
isKnown best case - 1 super set check 350.00 ns/op 346.00 ns/op 1.01
isKnown normal case - 2 super set checks 661.00 ns/op 332.00 ns/op 1.99
isKnown worse case - 16 super set checks 657.00 ns/op 335.00 ns/op 1.96
InMemoryCheckpointStateCache - add get delete 5.5510 us/op 4.1390 us/op 1.34
validate api signedAggregateAndProof - struct 2.0792 ms/op 2.1166 ms/op 0.98
validate gossip signedAggregateAndProof - struct 2.0699 ms/op 2.0573 ms/op 1.01
validate gossip attestation - vc 640000 1.2161 ms/op 1.1626 ms/op 1.05
batch validate gossip attestation - vc 640000 - chunk 32 157.47 us/op 157.24 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 64 137.45 us/op 151.90 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 128 122.18 us/op 128.54 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 256 120.03 us/op 124.11 us/op 0.97
pickEth1Vote - no votes 899.85 us/op 855.50 us/op 1.05
pickEth1Vote - max votes 12.218 ms/op 5.2683 ms/op 2.32
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.366 ms/op 20.243 ms/op 1.06
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.440 ms/op 14.069 ms/op 1.52
pickEth1Vote - Eth1Data fastSerialize value x2048 490.93 us/op 436.36 us/op 1.13
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.9281 ms/op 3.1525 ms/op 1.25
bytes32 toHexString 464.00 ns/op 480.00 ns/op 0.97
bytes32 Buffer.toString(hex) 384.00 ns/op 312.00 ns/op 1.23
bytes32 Buffer.toString(hex) from Uint8Array 513.00 ns/op 428.00 ns/op 1.20
bytes32 Buffer.toString(hex) + 0x 373.00 ns/op 319.00 ns/op 1.17
Object access 1 prop 0.26200 ns/op 0.21000 ns/op 1.25
Map access 1 prop 0.21500 ns/op 0.22500 ns/op 0.96
Object get x1000 4.9660 ns/op 5.7470 ns/op 0.86
Map get x1000 0.83400 ns/op 0.74000 ns/op 1.13
Object set x1000 27.247 ns/op 24.949 ns/op 1.09
Map set x1000 20.924 ns/op 17.281 ns/op 1.21
Return object 10000 times 0.23210 ns/op 0.23180 ns/op 1.00
Throw Error 10000 times 2.8482 us/op 2.7000 us/op 1.05
fastMsgIdFn sha256 / 200 bytes 2.0970 us/op 1.9690 us/op 1.07
fastMsgIdFn h32 xxhash / 200 bytes 377.00 ns/op 321.00 ns/op 1.17
fastMsgIdFn h64 xxhash / 200 bytes 398.00 ns/op 347.00 ns/op 1.15
fastMsgIdFn sha256 / 1000 bytes 6.4000 us/op 6.1560 us/op 1.04
fastMsgIdFn h32 xxhash / 1000 bytes 484.00 ns/op 424.00 ns/op 1.14
fastMsgIdFn h64 xxhash / 1000 bytes 451.00 ns/op 410.00 ns/op 1.10
fastMsgIdFn sha256 / 10000 bytes 52.545 us/op 52.812 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.8810 us/op 1.8230 us/op 1.03
fastMsgIdFn h64 xxhash / 10000 bytes 1.2980 us/op 1.2580 us/op 1.03
send data - 1000 256B messages 12.504 ms/op 9.9478 ms/op 1.26
send data - 1000 512B messages 16.298 ms/op 13.484 ms/op 1.21
send data - 1000 1024B messages 24.152 ms/op 22.257 ms/op 1.09
send data - 1000 1200B messages 24.518 ms/op 23.592 ms/op 1.04
send data - 1000 2048B messages 31.907 ms/op 30.002 ms/op 1.06
send data - 1000 4096B messages 31.141 ms/op 26.283 ms/op 1.18
send data - 1000 16384B messages 81.656 ms/op 65.830 ms/op 1.24
send data - 1000 65536B messages 346.28 ms/op 340.82 ms/op 1.02
enrSubnets - fastDeserialize 64 bits 1.0710 us/op 962.00 ns/op 1.11
enrSubnets - ssz BitVector 64 bits 550.00 ns/op 453.00 ns/op 1.21
enrSubnets - fastDeserialize 4 bits 263.00 ns/op 260.00 ns/op 1.01
enrSubnets - ssz BitVector 4 bits 552.00 ns/op 490.00 ns/op 1.13
prioritizePeers score -10:0 att 32-0.1 sync 2-0 149.32 us/op 159.19 us/op 0.94
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 236.42 us/op 194.18 us/op 1.22
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 296.63 us/op 270.90 us/op 1.09
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 428.81 us/op 402.14 us/op 1.07
prioritizePeers score 0:0 att 64-1 sync 4-1 508.62 us/op 466.70 us/op 1.09
array of 16000 items push then shift 1.2719 us/op 1.2637 us/op 1.01
LinkedList of 16000 items push then shift 7.3510 ns/op 7.4050 ns/op 0.99
array of 16000 items push then pop 101.07 ns/op 92.359 ns/op 1.09
LinkedList of 16000 items push then pop 5.9780 ns/op 5.8350 ns/op 1.02
array of 24000 items push then shift 1.8606 us/op 1.9059 us/op 0.98
LinkedList of 24000 items push then shift 6.7890 ns/op 6.9570 ns/op 0.98
array of 24000 items push then pop 117.05 ns/op 127.37 ns/op 0.92
LinkedList of 24000 items push then pop 5.9870 ns/op 5.6430 ns/op 1.06
intersect bitArray bitLen 8 4.5920 ns/op 4.6760 ns/op 0.98
intersect array and set length 8 61.157 ns/op 50.839 ns/op 1.20
intersect bitArray bitLen 128 28.444 ns/op 33.806 ns/op 0.84
intersect array and set length 128 758.18 ns/op 730.95 ns/op 1.04
bitArray.getTrueBitIndexes() bitLen 128 1.4150 us/op 1.4200 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 248 2.0870 us/op 2.3350 us/op 0.89
bitArray.getTrueBitIndexes() bitLen 512 4.0000 us/op 4.5180 us/op 0.89
Buffer.concat 32 items 929.00 ns/op 808.00 ns/op 1.15
Uint8Array.set 32 items 2.0720 us/op 1.4080 us/op 1.47
Set add up to 64 items then delete first 1.8386 us/op 1.6632 us/op 1.11
OrderedSet add up to 64 items then delete first 2.6980 us/op 2.7053 us/op 1.00
Set add up to 64 items then delete last 1.9957 us/op 1.9962 us/op 1.00
OrderedSet add up to 64 items then delete last 3.1818 us/op 2.9581 us/op 1.08
Set add up to 64 items then delete middle 2.0093 us/op 1.9943 us/op 1.01
OrderedSet add up to 64 items then delete middle 4.3867 us/op 4.2215 us/op 1.04
Set add up to 128 items then delete first 3.8630 us/op 4.1881 us/op 0.92
OrderedSet add up to 128 items then delete first 5.8488 us/op 6.3428 us/op 0.92
Set add up to 128 items then delete last 3.8475 us/op 4.1185 us/op 0.93
OrderedSet add up to 128 items then delete last 6.0533 us/op 6.5127 us/op 0.93
Set add up to 128 items then delete middle 3.8288 us/op 3.7616 us/op 1.02
OrderedSet add up to 128 items then delete middle 11.079 us/op 10.719 us/op 1.03
Set add up to 256 items then delete first 7.5175 us/op 7.3992 us/op 1.02
OrderedSet add up to 256 items then delete first 11.810 us/op 12.007 us/op 0.98
Set add up to 256 items then delete last 7.6271 us/op 7.4321 us/op 1.03
OrderedSet add up to 256 items then delete last 11.935 us/op 11.141 us/op 1.07
Set add up to 256 items then delete middle 7.5044 us/op 7.4259 us/op 1.01
OrderedSet add up to 256 items then delete middle 31.751 us/op 30.391 us/op 1.04
transfer serialized Status (84 B) 1.3370 us/op 1.4460 us/op 0.92
copy serialized Status (84 B) 1.1670 us/op 1.2180 us/op 0.96
transfer serialized SignedVoluntaryExit (112 B) 1.4580 us/op 1.5130 us/op 0.96
copy serialized SignedVoluntaryExit (112 B) 1.1880 us/op 1.2070 us/op 0.98
transfer serialized ProposerSlashing (416 B) 1.5890 us/op 2.7360 us/op 0.58
copy serialized ProposerSlashing (416 B) 1.7800 us/op 1.9010 us/op 0.94
transfer serialized Attestation (485 B) 1.9120 us/op 2.0500 us/op 0.93
copy serialized Attestation (485 B) 2.3460 us/op 1.9860 us/op 1.18
transfer serialized AttesterSlashing (33232 B) 2.1310 us/op 1.9550 us/op 1.09
copy serialized AttesterSlashing (33232 B) 5.5580 us/op 5.2840 us/op 1.05
transfer serialized Small SignedBeaconBlock (128000 B) 2.6410 us/op 2.1040 us/op 1.26
copy serialized Small SignedBeaconBlock (128000 B) 10.118 us/op 9.1350 us/op 1.11
transfer serialized Avg SignedBeaconBlock (200000 B) 2.4590 us/op 2.0310 us/op 1.21
copy serialized Avg SignedBeaconBlock (200000 B) 14.225 us/op 12.255 us/op 1.16
transfer serialized BlobsSidecar (524380 B) 2.6320 us/op 2.3030 us/op 1.14
copy serialized BlobsSidecar (524380 B) 97.900 us/op 76.294 us/op 1.28
transfer serialized Big SignedBeaconBlock (1000000 B) 2.7320 us/op 2.5590 us/op 1.07
copy serialized Big SignedBeaconBlock (1000000 B) 187.46 us/op 131.76 us/op 1.42
pass gossip attestations to forkchoice per slot 2.8075 ms/op 2.8133 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 467.73 us/op 478.94 us/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 0 3.0401 ms/op 2.7015 ms/op 1.13
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7556 ms/op 4.4085 ms/op 1.08
forkChoice updateHead vc 600000 bc 320 eq 0 2.8213 ms/op 2.7330 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9706 ms/op 3.0858 ms/op 0.96
forkChoice updateHead vc 600000 bc 7200 eq 0 4.3681 ms/op 3.3882 ms/op 1.29
forkChoice updateHead vc 600000 bc 64 eq 1000 10.091 ms/op 9.8430 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 10000 9.8541 ms/op 9.7544 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 13.705 ms/op 11.977 ms/op 1.14
computeDeltas 500000 validators 300 proto nodes 3.1114 ms/op 3.1758 ms/op 0.98
computeDeltas 500000 validators 1200 proto nodes 3.0324 ms/op 3.0580 ms/op 0.99
computeDeltas 500000 validators 7200 proto nodes 3.1133 ms/op 3.1692 ms/op 0.98
computeDeltas 750000 validators 300 proto nodes 4.6116 ms/op 4.7377 ms/op 0.97
computeDeltas 750000 validators 1200 proto nodes 4.5040 ms/op 4.6250 ms/op 0.97
computeDeltas 750000 validators 7200 proto nodes 4.6149 ms/op 4.8031 ms/op 0.96
computeDeltas 1400000 validators 300 proto nodes 8.5423 ms/op 8.7778 ms/op 0.97
computeDeltas 1400000 validators 1200 proto nodes 8.5246 ms/op 8.7448 ms/op 0.97
computeDeltas 1400000 validators 7200 proto nodes 8.6712 ms/op 8.7144 ms/op 1.00
computeDeltas 2100000 validators 300 proto nodes 13.370 ms/op 13.758 ms/op 0.97
computeDeltas 2100000 validators 1200 proto nodes 13.827 ms/op 13.067 ms/op 1.06
computeDeltas 2100000 validators 7200 proto nodes 13.199 ms/op 13.417 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei normalcase 1.4385 ms/op 1.8392 ms/op 0.78
altair processAttestation - 250000 vs - 7PWei worstcase 2.1106 ms/op 3.0223 ms/op 0.70
altair processAttestation - setStatus - 1/6 committees join 68.292 us/op 103.31 us/op 0.66
altair processAttestation - setStatus - 1/3 committees join 143.33 us/op 184.10 us/op 0.78
altair processAttestation - setStatus - 1/2 committees join 196.03 us/op 273.33 us/op 0.72
altair processAttestation - setStatus - 2/3 committees join 264.83 us/op 359.67 us/op 0.74
altair processAttestation - setStatus - 4/5 committees join 407.29 us/op 511.77 us/op 0.80
altair processAttestation - setStatus - 100% committees join 491.39 us/op 579.12 us/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase 8.6209 ms/op 7.7869 ms/op 1.11
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.489 ms/op 30.065 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase 33.044 ms/op 29.526 ms/op 1.12
altair processBlock - 250000 vs - 7PWei worstcase hashState 85.303 ms/op 85.006 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei normalcase 1.7507 ms/op 2.1560 ms/op 0.81
phase0 processBlock - 250000 vs - 7PWei worstcase 25.446 ms/op 27.734 ms/op 0.92
altair processEth1Data - 250000 vs - 7PWei normalcase 269.37 us/op 272.56 us/op 0.99
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 14.802 us/op 15.225 us/op 0.97
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 55.098 us/op 67.691 us/op 0.81
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 22.755 us/op 15.654 us/op 1.45
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.6860 us/op 14.665 us/op 0.52
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 154.26 us/op 137.49 us/op 1.12
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 910.62 us/op 1.0357 ms/op 0.88
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.2340 ms/op 1.5764 ms/op 0.78
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.3305 ms/op 1.1477 ms/op 2.03
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 7.9254 ms/op 3.0947 ms/op 2.56
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 5.0116 ms/op 2.3523 ms/op 2.13
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 24.738 ms/op 4.3282 ms/op 5.72
Tree 40 250000 create 1.0471 s/op 190.91 ms/op 5.48
Tree 40 250000 get(125000) 217.43 ns/op 122.68 ns/op 1.77
Tree 40 250000 set(125000) 1.5328 us/op 539.43 ns/op 2.84
Tree 40 250000 toArray() 79.870 ms/op 18.480 ms/op 4.32
Tree 40 250000 iterate all - toArray() + loop 65.275 ms/op 16.382 ms/op 3.98
Tree 40 250000 iterate all - get(i) 83.842 ms/op 51.577 ms/op 1.63
MutableVector 250000 create 25.190 ms/op 13.951 ms/op 1.81
MutableVector 250000 get(125000) 8.7450 ns/op 5.7060 ns/op 1.53
MutableVector 250000 set(125000) 1.0307 us/op 412.85 ns/op 2.50
MutableVector 250000 toArray() 5.8557 ms/op 2.9795 ms/op 1.97
MutableVector 250000 iterate all - toArray() + loop 7.0875 ms/op 2.5932 ms/op 2.73
MutableVector 250000 iterate all - get(i) 1.4157 ms/op 1.3530 ms/op 1.05
Array 250000 create 5.5960 ms/op 2.2512 ms/op 2.49
Array 250000 clone - spread 1.7052 ms/op 1.1019 ms/op 1.55
Array 250000 get(125000) 1.3680 ns/op 1.0680 ns/op 1.28
Array 250000 set(125000) 4.9820 ns/op 1.2380 ns/op 4.02
Array 250000 iterate all - loop 179.39 us/op 157.08 us/op 1.14
effectiveBalanceIncrements clone Uint8Array 300000 37.558 us/op 14.545 us/op 2.58
effectiveBalanceIncrements clone MutableVector 300000 436.00 ns/op 408.00 ns/op 1.07
effectiveBalanceIncrements rw all Uint8Array 300000 242.44 us/op 185.16 us/op 1.31
effectiveBalanceIncrements rw all MutableVector 300000 123.36 ms/op 99.392 ms/op 1.24
phase0 afterProcessEpoch - 250000 vs - 7PWei 119.47 ms/op 76.355 ms/op 1.56
phase0 beforeProcessEpoch - 250000 vs - 7PWei 136.23 ms/op 46.381 ms/op 2.94
altair processEpoch - mainnet_e81889 816.22 ms/op 391.50 ms/op 2.08
mainnet_e81889 - altair beforeProcessEpoch 130.51 ms/op 59.712 ms/op 2.19
mainnet_e81889 - altair processJustificationAndFinalization 37.067 us/op 10.406 us/op 3.56
mainnet_e81889 - altair processInactivityUpdates 19.304 ms/op 7.0145 ms/op 2.75
mainnet_e81889 - altair processRewardsAndPenalties 88.887 ms/op 54.415 ms/op 1.63
mainnet_e81889 - altair processRegistryUpdates 9.0610 us/op 2.6720 us/op 3.39
mainnet_e81889 - altair processSlashings 1.5810 us/op 630.00 ns/op 2.51
mainnet_e81889 - altair processEth1DataReset 1.6780 us/op 711.00 ns/op 2.36
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7718 ms/op 979.15 us/op 1.81
mainnet_e81889 - altair processSlashingsReset 7.1290 us/op 2.5070 us/op 2.84
mainnet_e81889 - altair processRandaoMixesReset 15.682 us/op 3.3630 us/op 4.66
mainnet_e81889 - altair processHistoricalRootsUpdate 1.6970 us/op 979.00 ns/op 1.73
mainnet_e81889 - altair processParticipationFlagUpdates 2.5710 us/op 2.0240 us/op 1.27
mainnet_e81889 - altair processSyncCommitteeUpdates 862.00 ns/op 820.00 ns/op 1.05
mainnet_e81889 - altair afterProcessEpoch 82.640 ms/op 85.531 ms/op 0.97
capella processEpoch - mainnet_e217614 1.4162 s/op 1.3466 s/op 1.05
mainnet_e217614 - capella beforeProcessEpoch 250.58 ms/op 252.92 ms/op 0.99
mainnet_e217614 - capella processJustificationAndFinalization 13.883 us/op 14.159 us/op 0.98
mainnet_e217614 - capella processInactivityUpdates 14.555 ms/op 12.932 ms/op 1.13
mainnet_e217614 - capella processRewardsAndPenalties 245.26 ms/op 237.95 ms/op 1.03
mainnet_e217614 - capella processRegistryUpdates 29.888 us/op 18.048 us/op 1.66
mainnet_e217614 - capella processSlashings 1.5660 us/op 606.00 ns/op 2.58
mainnet_e217614 - capella processEth1DataReset 1.4460 us/op 515.00 ns/op 2.81
mainnet_e217614 - capella processEffectiveBalanceUpdates 23.860 ms/op 3.1965 ms/op 7.46
mainnet_e217614 - capella processSlashingsReset 7.6090 us/op 1.3680 us/op 5.56
mainnet_e217614 - capella processRandaoMixesReset 10.400 us/op 2.9240 us/op 3.56
mainnet_e217614 - capella processHistoricalRootsUpdate 1.5540 us/op 540.00 ns/op 2.88
mainnet_e217614 - capella processParticipationFlagUpdates 5.1340 us/op 1.3910 us/op 3.69
mainnet_e217614 - capella afterProcessEpoch 274.25 ms/op 217.85 ms/op 1.26
phase0 processEpoch - mainnet_e58758 561.14 ms/op 422.78 ms/op 1.33
mainnet_e58758 - phase0 beforeProcessEpoch 162.63 ms/op 108.66 ms/op 1.50
mainnet_e58758 - phase0 processJustificationAndFinalization 24.849 us/op 11.355 us/op 2.19
mainnet_e58758 - phase0 processRewardsAndPenalties 33.152 ms/op 27.849 ms/op 1.19
mainnet_e58758 - phase0 processRegistryUpdates 14.798 us/op 8.3280 us/op 1.78
mainnet_e58758 - phase0 processSlashings 1.2210 us/op 438.00 ns/op 2.79
mainnet_e58758 - phase0 processEth1DataReset 949.00 ns/op 621.00 ns/op 1.53
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0228 ms/op 1.3737 ms/op 0.74
mainnet_e58758 - phase0 processSlashingsReset 5.8170 us/op 2.4320 us/op 2.39
mainnet_e58758 - phase0 processRandaoMixesReset 5.6200 us/op 3.9750 us/op 1.41
mainnet_e58758 - phase0 processHistoricalRootsUpdate 715.00 ns/op 600.00 ns/op 1.19
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.8030 us/op 3.1480 us/op 1.21
mainnet_e58758 - phase0 afterProcessEpoch 77.098 ms/op 66.279 ms/op 1.16
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0410 ms/op 941.40 us/op 1.11
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.3337 ms/op 1.0740 ms/op 1.24
altair processInactivityUpdates - 250000 normalcase 13.820 ms/op 14.611 ms/op 0.95
altair processInactivityUpdates - 250000 worstcase 13.022 ms/op 16.441 ms/op 0.79
phase0 processRegistryUpdates - 250000 normalcase 11.293 us/op 5.6460 us/op 2.00
phase0 processRegistryUpdates - 250000 badcase_full_deposits 391.52 us/op 417.96 us/op 0.94
phase0 processRegistryUpdates - 250000 worstcase 0.5 112.38 ms/op 112.15 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 35.406 ms/op 51.299 ms/op 0.69
altair processRewardsAndPenalties - 250000 worstcase 39.794 ms/op 41.170 ms/op 0.97
phase0 getAttestationDeltas - 250000 normalcase 7.0924 ms/op 6.9411 ms/op 1.02
phase0 getAttestationDeltas - 250000 worstcase 5.8098 ms/op 6.1543 ms/op 0.94
phase0 processSlashings - 250000 worstcase 80.027 us/op 82.564 us/op 0.97
altair processSyncCommitteeUpdates - 250000 107.27 ms/op 107.98 ms/op 0.99
BeaconState.hashTreeRoot - No change 359.00 ns/op 427.00 ns/op 0.84
BeaconState.hashTreeRoot - 1 full validator 116.80 us/op 110.77 us/op 1.05
BeaconState.hashTreeRoot - 32 full validator 1.2870 ms/op 990.07 us/op 1.30
BeaconState.hashTreeRoot - 512 full validator 13.123 ms/op 13.896 ms/op 0.94
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 156.03 us/op 112.45 us/op 1.39
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8813 ms/op 2.7628 ms/op 0.68
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.128 ms/op 24.166 ms/op 0.96
BeaconState.hashTreeRoot - 1 balances 100.49 us/op 81.143 us/op 1.24
BeaconState.hashTreeRoot - 32 balances 942.39 us/op 1.0474 ms/op 0.90
BeaconState.hashTreeRoot - 512 balances 8.3900 ms/op 7.5712 ms/op 1.11
BeaconState.hashTreeRoot - 250000 balances 164.22 ms/op 146.41 ms/op 1.12
aggregationBits - 2048 els - zipIndexesInBitList 18.919 us/op 19.346 us/op 0.98
byteArrayEquals 32 64.868 ns/op 66.990 ns/op 0.97
Buffer.compare 32 38.830 ns/op 38.784 ns/op 1.00
byteArrayEquals 1024 1.7733 us/op 1.9006 us/op 0.93
Buffer.compare 1024 45.673 ns/op 46.958 ns/op 0.97
byteArrayEquals 16384 28.165 us/op 28.067 us/op 1.00
Buffer.compare 16384 217.40 ns/op 218.97 ns/op 0.99
byteArrayEquals 123687377 199.91 ms/op 214.71 ms/op 0.93
Buffer.compare 123687377 4.4974 ms/op 4.8997 ms/op 0.92
byteArrayEquals 32 - diff last byte 62.969 ns/op 65.223 ns/op 0.97
Buffer.compare 32 - diff last byte 38.259 ns/op 39.954 ns/op 0.96
byteArrayEquals 1024 - diff last byte 1.7683 us/op 1.7434 us/op 1.01
Buffer.compare 1024 - diff last byte 46.592 ns/op 47.793 ns/op 0.97
byteArrayEquals 16384 - diff last byte 28.295 us/op 30.126 us/op 0.94
Buffer.compare 16384 - diff last byte 223.80 ns/op 215.55 ns/op 1.04
byteArrayEquals 123687377 - diff last byte 208.19 ms/op 200.66 ms/op 1.04
Buffer.compare 123687377 - diff last byte 6.0828 ms/op 4.7715 ms/op 1.27
byteArrayEquals 32 - random bytes 5.0050 ns/op 4.5390 ns/op 1.10
Buffer.compare 32 - random bytes 40.703 ns/op 38.467 ns/op 1.06
byteArrayEquals 1024 - random bytes 4.5460 ns/op 5.2240 ns/op 0.87
Buffer.compare 1024 - random bytes 39.578 ns/op 37.511 ns/op 1.06
byteArrayEquals 16384 - random bytes 4.5170 ns/op 4.5730 ns/op 0.99
Buffer.compare 16384 - random bytes 37.463 ns/op 39.515 ns/op 0.95
byteArrayEquals 123687377 - random bytes 7.9100 ns/op 7.7600 ns/op 1.02
Buffer.compare 123687377 - random bytes 42.850 ns/op 43.720 ns/op 0.98
regular array get 100000 times 41.275 us/op 40.970 us/op 1.01
wrappedArray get 100000 times 41.205 us/op 40.952 us/op 1.01
arrayWithProxy get 100000 times 10.255 ms/op 10.722 ms/op 0.96
ssz.Root.equals 55.511 ns/op 55.196 ns/op 1.01
byteArrayEquals 56.206 ns/op 53.941 ns/op 1.04
Buffer.compare 9.4530 ns/op 9.6950 ns/op 0.98
shuffle list - 16384 els 5.6971 ms/op 6.0021 ms/op 0.95
shuffle list - 250000 els 83.155 ms/op 84.797 ms/op 0.98
processSlot - 1 slots 17.636 us/op 12.521 us/op 1.41
processSlot - 32 slots 3.3500 ms/op 2.0804 ms/op 1.61
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 47.136 ms/op 45.578 ms/op 1.03
getCommitteeAssignments - req 1 vs - 250000 vc 2.3439 ms/op 2.4789 ms/op 0.95
getCommitteeAssignments - req 100 vs - 250000 vc 3.4777 ms/op 3.6190 ms/op 0.96
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7419 ms/op 4.0071 ms/op 0.93
findModifiedValidators - 10000 modified validators 290.37 ms/op 355.28 ms/op 0.82
findModifiedValidators - 1000 modified validators 179.14 ms/op 207.30 ms/op 0.86
findModifiedValidators - 100 modified validators 160.24 ms/op 159.13 ms/op 1.01
findModifiedValidators - 10 modified validators 141.79 ms/op 164.21 ms/op 0.86
findModifiedValidators - 1 modified validators 211.88 ms/op 156.02 ms/op 1.36
findModifiedValidators - no difference 189.25 ms/op 174.30 ms/op 1.09
compare ViewDUs 3.4397 s/op 3.4390 s/op 1.00
compare each validator Uint8Array 1.8470 s/op 1.4776 s/op 1.25
compare ViewDU to Uint8Array 1.0904 s/op 839.46 ms/op 1.30
migrate state 1000000 validators, 24 modified, 0 new 655.11 ms/op 653.53 ms/op 1.00
migrate state 1000000 validators, 1700 modified, 1000 new 970.57 ms/op 989.27 ms/op 0.98
migrate state 1000000 validators, 3400 modified, 2000 new 1.3245 s/op 1.4183 s/op 0.93
migrate state 1500000 validators, 24 modified, 0 new 748.97 ms/op 660.08 ms/op 1.13
migrate state 1500000 validators, 1700 modified, 1000 new 1.0843 s/op 1.0591 s/op 1.02
migrate state 1500000 validators, 3400 modified, 2000 new 1.3973 s/op 1.3462 s/op 1.04
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8700 ns/op 5.2300 ns/op 0.93
state getBlockRootAtSlot - 250000 vs - 7PWei 481.17 ns/op 1.1831 us/op 0.41
computeProposers - vc 250000 6.0773 ms/op 6.8425 ms/op 0.89
computeEpochShuffling - vc 250000 82.285 ms/op 86.840 ms/op 0.95
getNextSyncCommittee - vc 250000 108.09 ms/op 119.14 ms/op 0.91
computeSigningRoot for AttestationData 20.640 us/op 19.607 us/op 1.05
hash AttestationData serialized data then Buffer.toString(base64) 1.2969 us/op 1.2949 us/op 1.00
toHexString serialized data 797.14 ns/op 799.26 ns/op 1.00
Buffer.toString(base64) 150.67 ns/op 197.86 ns/op 0.76

Please sign in to comment.