Skip to content

Commit

Permalink
chore: update ssz for optional type availability (#5948)
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech authored Sep 11, 2023
1 parent d51ee94 commit 4dcbbb7
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"dependencies": {
"@chainsafe/persistent-merkle-tree": "^0.5.0",
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@lodestar/config": "^1.11.1",
"@lodestar/params": "^1.11.1",
"@lodestar/types": "^1.11.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"@chainsafe/libp2p-noise": "^13.0.0",
"@chainsafe/persistent-merkle-tree": "^0.5.0",
"@chainsafe/prometheus-gc-stats": "^1.0.0",
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@chainsafe/threads": "^1.11.1",
"@ethersproject/abi": "^5.7.0",
"@fastify/bearer-auth": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@chainsafe/bls-keystore": "^2.0.0",
"@chainsafe/blst": "^0.2.9",
"@chainsafe/discv5": "^5.1.0",
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@chainsafe/threads": "^1.11.1",
"@libp2p/crypto": "^2.0.2",
"@libp2p/peer-id": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"blockchain"
],
"dependencies": {
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@lodestar/params": "^1.11.1",
"@lodestar/types": "^1.11.1"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"check-readme": "typescript-docs-verifier"
},
"dependencies": {
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@lodestar/config": "^1.11.1",
"@lodestar/utils": "^1.11.1",
"@types/levelup": "^4.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/fork-choice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"check-readme": "typescript-docs-verifier"
},
"dependencies": {
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@lodestar/config": "^1.11.1",
"@lodestar/params": "^1.11.1",
"@lodestar/state-transition": "^1.11.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/light-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"dependencies": {
"@chainsafe/bls": "7.1.1",
"@chainsafe/persistent-merkle-tree": "^0.5.0",
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@lodestar/api": "^1.11.1",
"@lodestar/config": "^1.11.1",
"@lodestar/params": "^1.11.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/state-transition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@chainsafe/bls": "7.1.1",
"@chainsafe/persistent-merkle-tree": "^0.5.0",
"@chainsafe/persistent-ts": "^0.19.1",
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@lodestar/config": "^1.11.1",
"@lodestar/params": "^1.11.1",
"@lodestar/types": "^1.11.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"types": "lib/index.d.ts",
"dependencies": {
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@lodestar/params": "^1.11.1"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
],
"dependencies": {
"@chainsafe/bls": "7.1.1",
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/ssz": "^0.12.0",
"@lodestar/api": "^1.11.1",
"@lodestar/config": "^1.11.1",
"@lodestar/db": "^1.11.1",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -636,14 +636,6 @@
resolved "https://registry.yarnpkg.com/@chainsafe/prometheus-gc-stats/-/prometheus-gc-stats-1.0.2.tgz#585f8f1555251db156d7e50ef8c86dd4f3e78f70"
integrity sha512-h3mFKduSX85XMVbOdWOYvx9jNq99jGcRVNyW5goGOqju1CsI+ZJLhu5z4zBb/G+ksL0R4uLVulu/mIMe7Y0rNg==

"@chainsafe/ssz@^0.10.2":
version "0.10.2"
resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e"
integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==
dependencies:
"@chainsafe/as-sha256" "^0.3.1"
"@chainsafe/persistent-merkle-tree" "^0.5.0"

"@chainsafe/ssz@^0.11.1":
version "0.11.1"
resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.11.1.tgz#d4aec883af2ec5196ae67b96242c467da20b2476"
Expand All @@ -652,6 +644,14 @@
"@chainsafe/as-sha256" "^0.4.1"
"@chainsafe/persistent-merkle-tree" "^0.6.1"

"@chainsafe/ssz@^0.12.0":
version "0.12.0"
resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.12.0.tgz#60dbbd855d2d39d3bc032f44d18a094c364501ae"
integrity sha512-FZUvB7NsQBQc+/3+QSCaqHjKMAXs+M4NiFsskOcRVm1G2FN19u/Er+783YeIpX8Ld9mLplvn2qv33vQedcul0w==
dependencies:
"@chainsafe/as-sha256" "^0.4.1"
"@chainsafe/persistent-merkle-tree" "^0.6.1"

"@chainsafe/threads@^1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@chainsafe/threads/-/threads-1.11.1.tgz#0b3b8c76f5875043ef6d47aeeb681dc80378f205"
Expand Down

1 comment on commit 4dcbbb7

@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: 4dcbbb7 Previous: d51ee94 Ratio
BeaconState.hashTreeRoot - 512 balances 14.263 ms/op 4.7255 ms/op 3.02
Full benchmark results
Benchmark suite Current: 4dcbbb7 Previous: d51ee94 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 877.98 us/op 989.95 us/op 0.89
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 77.358 us/op 99.049 us/op 0.78
BLS verify - blst-native 1.2940 ms/op 1.3403 ms/op 0.97
BLS verifyMultipleSignatures 3 - blst-native 2.7208 ms/op 2.8101 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst-native 5.9759 ms/op 6.3816 ms/op 0.94
BLS verifyMultipleSignatures 32 - blst-native 21.935 ms/op 22.790 ms/op 0.96
BLS verifyMultipleSignatures 64 - blst-native 42.975 ms/op 44.655 ms/op 0.96
BLS verifyMultipleSignatures 128 - blst-native 85.579 ms/op 90.877 ms/op 0.94
BLS deserializing 10000 signatures 887.97 ms/op 915.27 ms/op 0.97
BLS deserializing 100000 signatures 8.7645 s/op 9.0618 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2809 ms/op 1.3601 ms/op 0.94
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4411 ms/op 1.5152 ms/op 0.95
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4214 ms/op 2.3320 ms/op 1.04
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.6242 ms/op 3.8011 ms/op 0.95
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.4593 ms/op 6.4160 ms/op 0.85
BLS aggregatePubkeys 32 - blst-native 24.924 us/op 26.075 us/op 0.96
BLS aggregatePubkeys 128 - blst-native 95.962 us/op 99.855 us/op 0.96
getAttestationsForBlock 38.008 ms/op 34.173 ms/op 1.11
isKnown best case - 1 super set check 268.00 ns/op 267.00 ns/op 1.00
isKnown normal case - 2 super set checks 259.00 ns/op 267.00 ns/op 0.97
isKnown worse case - 16 super set checks 251.00 ns/op 268.00 ns/op 0.94
CheckpointStateCache - add get delete 4.8350 us/op 4.9110 us/op 0.98
validate api signedAggregateAndProof - struct 2.7223 ms/op 2.6347 ms/op 1.03
validate gossip signedAggregateAndProof - struct 2.6623 ms/op 2.6576 ms/op 1.00
validate gossip attestation - vc 640000 1.2994 ms/op 1.2981 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 151.06 us/op 143.89 us/op 1.05
batch validate gossip attestation - vc 640000 - chunk 64 134.36 us/op 123.25 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 128 126.96 us/op 114.00 us/op 1.11
batch validate gossip attestation - vc 640000 - chunk 256 123.54 us/op 112.97 us/op 1.09
pickEth1Vote - no votes 1.1249 ms/op 1.1343 ms/op 0.99
pickEth1Vote - max votes 12.128 ms/op 9.9728 ms/op 1.22
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.344 ms/op 8.7616 ms/op 2.44
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.259 ms/op 15.427 ms/op 1.57
pickEth1Vote - Eth1Data fastSerialize value x2048 556.14 us/op 581.54 us/op 0.96
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.2747 ms/op 4.1979 ms/op 1.73
bytes32 toHexString 444.00 ns/op 465.00 ns/op 0.95
bytes32 Buffer.toString(hex) 284.00 ns/op 283.00 ns/op 1.00
bytes32 Buffer.toString(hex) from Uint8Array 408.00 ns/op 437.00 ns/op 0.93
bytes32 Buffer.toString(hex) + 0x 279.00 ns/op 288.00 ns/op 0.97
Object access 1 prop 0.14300 ns/op 0.15900 ns/op 0.90
Map access 1 prop 0.13900 ns/op 0.14000 ns/op 0.99
Object get x1000 7.4460 ns/op 7.5740 ns/op 0.98
Map get x1000 0.56000 ns/op 0.59000 ns/op 0.95
Object set x1000 44.248 ns/op 48.165 ns/op 0.92
Map set x1000 34.967 ns/op 38.493 ns/op 0.91
Return object 10000 times 0.21760 ns/op 0.24170 ns/op 0.90
Throw Error 10000 times 3.6812 us/op 3.8557 us/op 0.95
fastMsgIdFn sha256 / 200 bytes 3.0680 us/op 3.3080 us/op 0.93
fastMsgIdFn h32 xxhash / 200 bytes 244.00 ns/op 304.00 ns/op 0.80
fastMsgIdFn h64 xxhash / 200 bytes 305.00 ns/op 348.00 ns/op 0.88
fastMsgIdFn sha256 / 1000 bytes 10.565 us/op 11.366 us/op 0.93
fastMsgIdFn h32 xxhash / 1000 bytes 356.00 ns/op 454.00 ns/op 0.78
fastMsgIdFn h64 xxhash / 1000 bytes 372.00 ns/op 426.00 ns/op 0.87
fastMsgIdFn sha256 / 10000 bytes 96.363 us/op 101.89 us/op 0.95
fastMsgIdFn h32 xxhash / 10000 bytes 1.7790 us/op 1.9550 us/op 0.91
fastMsgIdFn h64 xxhash / 10000 bytes 1.2220 us/op 1.3040 us/op 0.94
enrSubnets - fastDeserialize 64 bits 1.1370 us/op 1.1840 us/op 0.96
enrSubnets - ssz BitVector 64 bits 403.00 ns/op 412.00 ns/op 0.98
enrSubnets - fastDeserialize 4 bits 171.00 ns/op 157.00 ns/op 1.09
enrSubnets - ssz BitVector 4 bits 389.00 ns/op 410.00 ns/op 0.95
prioritizePeers score -10:0 att 32-0.1 sync 2-0 95.029 us/op 99.464 us/op 0.96
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 121.74 us/op 127.62 us/op 0.95
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 153.22 us/op 157.16 us/op 0.97
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 269.52 us/op 282.59 us/op 0.95
prioritizePeers score 0:0 att 64-1 sync 4-1 320.23 us/op 327.68 us/op 0.98
array of 16000 items push then shift 1.5612 us/op 1.6375 us/op 0.95
LinkedList of 16000 items push then shift 8.6130 ns/op 8.9530 ns/op 0.96
array of 16000 items push then pop 72.354 ns/op 89.209 ns/op 0.81
LinkedList of 16000 items push then pop 8.3450 ns/op 8.9150 ns/op 0.94
array of 24000 items push then shift 2.3014 us/op 2.4434 us/op 0.94
LinkedList of 24000 items push then shift 8.6400 ns/op 9.0880 ns/op 0.95
array of 24000 items push then pop 94.261 ns/op 108.72 ns/op 0.87
LinkedList of 24000 items push then pop 8.4260 ns/op 8.6450 ns/op 0.97
intersect bitArray bitLen 8 6.5850 ns/op 6.8270 ns/op 0.96
intersect array and set length 8 53.808 ns/op 55.384 ns/op 0.97
intersect bitArray bitLen 128 31.104 ns/op 31.934 ns/op 0.97
intersect array and set length 128 732.30 ns/op 760.04 ns/op 0.96
bitArray.getTrueBitIndexes() bitLen 128 1.4030 us/op 1.5290 us/op 0.92
bitArray.getTrueBitIndexes() bitLen 248 2.3980 us/op 2.4960 us/op 0.96
bitArray.getTrueBitIndexes() bitLen 512 4.7920 us/op 5.0720 us/op 0.94
Buffer.concat 32 items 1.0140 us/op 983.00 ns/op 1.03
Uint8Array.set 32 items 2.0530 us/op 1.8830 us/op 1.09
Set add up to 64 items then delete first 4.9264 us/op 4.6642 us/op 1.06
OrderedSet add up to 64 items then delete first 5.9832 us/op 5.5821 us/op 1.07
Set add up to 64 items then delete last 4.6031 us/op 5.0399 us/op 0.91
OrderedSet add up to 64 items then delete last 5.6327 us/op 5.9604 us/op 0.95
Set add up to 64 items then delete middle 4.5832 us/op 4.6665 us/op 0.98
OrderedSet add up to 64 items then delete middle 6.9845 us/op 7.3428 us/op 0.95
Set add up to 128 items then delete first 9.1651 us/op 9.8546 us/op 0.93
OrderedSet add up to 128 items then delete first 12.047 us/op 12.584 us/op 0.96
Set add up to 128 items then delete last 8.7393 us/op 9.5131 us/op 0.92
OrderedSet add up to 128 items then delete last 10.998 us/op 11.881 us/op 0.93
Set add up to 128 items then delete middle 9.1181 us/op 9.6559 us/op 0.94
OrderedSet add up to 128 items then delete middle 16.729 us/op 17.798 us/op 0.94
Set add up to 256 items then delete first 18.742 us/op 19.654 us/op 0.95
OrderedSet add up to 256 items then delete first 24.719 us/op 25.480 us/op 0.97
Set add up to 256 items then delete last 18.221 us/op 19.445 us/op 0.94
OrderedSet add up to 256 items then delete last 22.903 us/op 24.046 us/op 0.95
Set add up to 256 items then delete middle 17.842 us/op 19.186 us/op 0.93
OrderedSet add up to 256 items then delete middle 44.263 us/op 45.806 us/op 0.97
transfer serialized Status (84 B) 1.8390 us/op 1.9010 us/op 0.97
copy serialized Status (84 B) 1.5450 us/op 1.6600 us/op 0.93
transfer serialized SignedVoluntaryExit (112 B) 1.9030 us/op 2.1250 us/op 0.90
copy serialized SignedVoluntaryExit (112 B) 1.5990 us/op 1.7570 us/op 0.91
transfer serialized ProposerSlashing (416 B) 2.1160 us/op 3.0670 us/op 0.69
copy serialized ProposerSlashing (416 B) 1.8890 us/op 2.6860 us/op 0.70
transfer serialized Attestation (485 B) 2.1320 us/op 2.5640 us/op 0.83
copy serialized Attestation (485 B) 1.8740 us/op 2.1370 us/op 0.88
transfer serialized AttesterSlashing (33232 B) 2.2270 us/op 2.2940 us/op 0.97
copy serialized AttesterSlashing (33232 B) 4.9020 us/op 6.1610 us/op 0.80
transfer serialized Small SignedBeaconBlock (128000 B) 2.4630 us/op 2.8870 us/op 0.85
copy serialized Small SignedBeaconBlock (128000 B) 12.200 us/op 13.625 us/op 0.90
transfer serialized Avg SignedBeaconBlock (200000 B) 2.7980 us/op 3.1480 us/op 0.89
copy serialized Avg SignedBeaconBlock (200000 B) 18.442 us/op 20.419 us/op 0.90
transfer serialized BlobsSidecar (524380 B) 3.1310 us/op 3.1730 us/op 0.99
copy serialized BlobsSidecar (524380 B) 73.981 us/op 79.050 us/op 0.94
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1240 us/op 3.0230 us/op 1.03
copy serialized Big SignedBeaconBlock (1000000 B) 163.18 us/op 161.25 us/op 1.01
pass gossip attestations to forkchoice per slot 3.7422 ms/op 3.6629 ms/op 1.02
forkChoice updateHead vc 100000 bc 64 eq 0 705.28 us/op 667.39 us/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 0 4.2239 ms/op 4.2037 ms/op 1.00
forkChoice updateHead vc 1000000 bc 64 eq 0 7.1197 ms/op 7.2906 ms/op 0.98
forkChoice updateHead vc 600000 bc 320 eq 0 4.1234 ms/op 4.1531 ms/op 0.99
forkChoice updateHead vc 600000 bc 1200 eq 0 4.2431 ms/op 4.2444 ms/op 1.00
forkChoice updateHead vc 600000 bc 7200 eq 0 5.0793 ms/op 5.2219 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 1000 11.204 ms/op 11.416 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 10000 12.155 ms/op 12.104 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 16.493 ms/op 16.095 ms/op 1.02
computeDeltas 500000 validators 300 proto nodes 6.2723 ms/op 6.2620 ms/op 1.00
computeDeltas 500000 validators 1200 proto nodes 6.1783 ms/op 6.1801 ms/op 1.00
computeDeltas 500000 validators 7200 proto nodes 6.1358 ms/op 6.1750 ms/op 0.99
computeDeltas 750000 validators 300 proto nodes 9.2484 ms/op 9.2956 ms/op 0.99
computeDeltas 750000 validators 1200 proto nodes 9.3323 ms/op 9.3243 ms/op 1.00
computeDeltas 750000 validators 7200 proto nodes 9.2074 ms/op 9.3666 ms/op 0.98
computeDeltas 1400000 validators 300 proto nodes 17.580 ms/op 17.714 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 17.514 ms/op 17.848 ms/op 0.98
computeDeltas 1400000 validators 7200 proto nodes 17.798 ms/op 18.440 ms/op 0.97
computeDeltas 2100000 validators 300 proto nodes 26.711 ms/op 26.702 ms/op 1.00
computeDeltas 2100000 validators 1200 proto nodes 26.377 ms/op 26.983 ms/op 0.98
computeDeltas 2100000 validators 7200 proto nodes 26.700 ms/op 27.433 ms/op 0.97
computeProposerBoostScoreFromBalances 500000 validators 3.2168 ms/op 3.4012 ms/op 0.95
computeProposerBoostScoreFromBalances 750000 validators 3.2367 ms/op 3.3007 ms/op 0.98
computeProposerBoostScoreFromBalances 1400000 validators 3.2503 ms/op 3.2428 ms/op 1.00
computeProposerBoostScoreFromBalances 2100000 validators 3.2584 ms/op 3.2122 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.4130 ms/op 2.3164 ms/op 1.04
altair processAttestation - 250000 vs - 7PWei worstcase 2.9819 ms/op 3.2420 ms/op 0.92
altair processAttestation - setStatus - 1/6 committees join 166.99 us/op 181.53 us/op 0.92
altair processAttestation - setStatus - 1/3 committees join 322.14 us/op 347.12 us/op 0.93
altair processAttestation - setStatus - 1/2 committees join 422.56 us/op 465.05 us/op 0.91
altair processAttestation - setStatus - 2/3 committees join 536.34 us/op 592.72 us/op 0.90
altair processAttestation - setStatus - 4/5 committees join 764.98 us/op 794.05 us/op 0.96
altair processAttestation - setStatus - 100% committees join 878.40 us/op 955.21 us/op 0.92
altair processBlock - 250000 vs - 7PWei normalcase 6.8554 ms/op 9.1252 ms/op 0.75
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.595 ms/op 17.396 ms/op 1.76
altair processBlock - 250000 vs - 7PWei worstcase 36.397 ms/op 39.131 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 89.248 ms/op 59.609 ms/op 1.50
phase0 processBlock - 250000 vs - 7PWei normalcase 2.9083 ms/op 2.8829 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei worstcase 29.147 ms/op 29.315 ms/op 0.99
altair processEth1Data - 250000 vs - 7PWei normalcase 480.22 us/op 610.90 us/op 0.79
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 14.000 us/op 10.173 us/op 1.38
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 73.963 us/op 71.276 us/op 1.04
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 21.434 us/op 19.316 us/op 1.11
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 17.909 us/op 14.557 us/op 1.23
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 257.19 us/op 154.14 us/op 1.67
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.1312 ms/op 1.3824 ms/op 1.54
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8505 ms/op 1.6765 ms/op 1.10
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.7697 ms/op 1.7787 ms/op 1.56
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.7259 ms/op 3.3238 ms/op 1.12
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3403 ms/op 2.3987 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.5069 ms/op 4.4988 ms/op 1.22
Tree 40 250000 create 318.08 ms/op 316.14 ms/op 1.01
Tree 40 250000 get(125000) 201.16 ns/op 198.44 ns/op 1.01
Tree 40 250000 set(125000) 963.88 ns/op 922.57 ns/op 1.04
Tree 40 250000 toArray() 18.964 ms/op 18.733 ms/op 1.01
Tree 40 250000 iterate all - toArray() + loop 18.997 ms/op 18.764 ms/op 1.01
Tree 40 250000 iterate all - get(i) 67.199 ms/op 67.587 ms/op 0.99
MutableVector 250000 create 15.813 ms/op 9.6366 ms/op 1.64
MutableVector 250000 get(125000) 6.5680 ns/op 6.4840 ns/op 1.01
MutableVector 250000 set(125000) 235.07 ns/op 260.76 ns/op 0.90
MutableVector 250000 toArray() 3.0548 ms/op 3.2982 ms/op 0.93
MutableVector 250000 iterate all - toArray() + loop 3.1008 ms/op 3.3726 ms/op 0.92
MutableVector 250000 iterate all - get(i) 1.5435 ms/op 1.5069 ms/op 1.02
Array 250000 create 2.7517 ms/op 3.0693 ms/op 0.90
Array 250000 clone - spread 1.0064 ms/op 1.3167 ms/op 0.76
Array 250000 get(125000) 0.50600 ns/op 0.61700 ns/op 0.82
Array 250000 set(125000) 0.57000 ns/op 0.70600 ns/op 0.81
Array 250000 iterate all - loop 82.335 us/op 83.088 us/op 0.99
effectiveBalanceIncrements clone Uint8Array 300000 22.611 us/op 31.857 us/op 0.71
effectiveBalanceIncrements clone MutableVector 300000 273.00 ns/op 393.00 ns/op 0.69
effectiveBalanceIncrements rw all Uint8Array 300000 176.47 us/op 182.41 us/op 0.97
effectiveBalanceIncrements rw all MutableVector 300000 74.799 ms/op 85.195 ms/op 0.88
phase0 afterProcessEpoch - 250000 vs - 7PWei 113.76 ms/op 119.98 ms/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 41.924 ms/op 33.629 ms/op 1.25
altair processEpoch - mainnet_e81889 482.25 ms/op 325.35 ms/op 1.48
mainnet_e81889 - altair beforeProcessEpoch 62.609 ms/op 63.630 ms/op 0.98
mainnet_e81889 - altair processJustificationAndFinalization 19.940 us/op 16.659 us/op 1.20
mainnet_e81889 - altair processInactivityUpdates 7.3170 ms/op 7.2124 ms/op 1.01
mainnet_e81889 - altair processRewardsAndPenalties 75.133 ms/op 63.494 ms/op 1.18
mainnet_e81889 - altair processRegistryUpdates 3.8760 us/op 2.5010 us/op 1.55
mainnet_e81889 - altair processSlashings 948.00 ns/op 407.00 ns/op 2.33
mainnet_e81889 - altair processEth1DataReset 1.0600 us/op 770.00 ns/op 1.38
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.4532 ms/op 1.2815 ms/op 1.91
mainnet_e81889 - altair processSlashingsReset 4.5150 us/op 5.1190 us/op 0.88
mainnet_e81889 - altair processRandaoMixesReset 7.1780 us/op 6.2880 us/op 1.14
mainnet_e81889 - altair processHistoricalRootsUpdate 985.00 ns/op 782.00 ns/op 1.26
mainnet_e81889 - altair processParticipationFlagUpdates 2.5640 us/op 2.6680 us/op 0.96
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0900 us/op 542.00 ns/op 2.01
mainnet_e81889 - altair afterProcessEpoch 121.36 ms/op 134.27 ms/op 0.90
capella processEpoch - mainnet_e217614 1.4618 s/op 1.0225 s/op 1.43
mainnet_e217614 - capella beforeProcessEpoch 225.47 ms/op 245.97 ms/op 0.92
mainnet_e217614 - capella processJustificationAndFinalization 22.055 us/op 16.338 us/op 1.35
mainnet_e217614 - capella processInactivityUpdates 17.976 ms/op 15.230 ms/op 1.18
mainnet_e217614 - capella processRewardsAndPenalties 287.40 ms/op 288.79 ms/op 1.00
mainnet_e217614 - capella processRegistryUpdates 26.275 us/op 19.449 us/op 1.35
mainnet_e217614 - capella processSlashings 1.3240 us/op 592.00 ns/op 2.24
mainnet_e217614 - capella processEth1DataReset 702.00 ns/op 1.0020 us/op 0.70
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.4269 ms/op 4.1389 ms/op 1.07
mainnet_e217614 - capella processSlashingsReset 3.7450 us/op 3.0660 us/op 1.22
mainnet_e217614 - capella processRandaoMixesReset 7.8510 us/op 6.3260 us/op 1.24
mainnet_e217614 - capella processHistoricalRootsUpdate 3.1210 us/op 920.00 ns/op 3.39
mainnet_e217614 - capella processParticipationFlagUpdates 2.5750 us/op 3.9550 us/op 0.65
mainnet_e217614 - capella afterProcessEpoch 311.12 ms/op 333.58 ms/op 0.93
phase0 processEpoch - mainnet_e58758 434.20 ms/op 339.73 ms/op 1.28
mainnet_e58758 - phase0 beforeProcessEpoch 128.34 ms/op 129.73 ms/op 0.99
mainnet_e58758 - phase0 processJustificationAndFinalization 16.339 us/op 19.192 us/op 0.85
mainnet_e58758 - phase0 processRewardsAndPenalties 60.379 ms/op 62.250 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 11.184 us/op 14.775 us/op 0.76
mainnet_e58758 - phase0 processSlashings 597.00 ns/op 1.0360 us/op 0.58
mainnet_e58758 - phase0 processEth1DataReset 498.00 ns/op 913.00 ns/op 0.55
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2382 ms/op 1.6961 ms/op 0.73
mainnet_e58758 - phase0 processSlashingsReset 2.5380 us/op 7.4710 us/op 0.34
mainnet_e58758 - phase0 processRandaoMixesReset 7.5280 us/op 8.1550 us/op 0.92
mainnet_e58758 - phase0 processHistoricalRootsUpdate 650.00 ns/op 1.0630 us/op 0.61
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.2720 us/op 5.3010 us/op 0.81
mainnet_e58758 - phase0 afterProcessEpoch 100.63 ms/op 127.05 ms/op 0.79
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4327 ms/op 1.2688 ms/op 1.92
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9406 ms/op 2.2951 ms/op 0.85
altair processInactivityUpdates - 250000 normalcase 25.533 ms/op 33.402 ms/op 0.76
altair processInactivityUpdates - 250000 worstcase 24.566 ms/op 26.332 ms/op 0.93
phase0 processRegistryUpdates - 250000 normalcase 10.598 us/op 17.367 us/op 0.61
phase0 processRegistryUpdates - 250000 badcase_full_deposits 386.44 us/op 462.80 us/op 0.83
phase0 processRegistryUpdates - 250000 worstcase 0.5 138.66 ms/op 164.76 ms/op 0.84
altair processRewardsAndPenalties - 250000 normalcase 65.941 ms/op 72.083 ms/op 0.91
altair processRewardsAndPenalties - 250000 worstcase 66.645 ms/op 76.870 ms/op 0.87
phase0 getAttestationDeltas - 250000 normalcase 8.1418 ms/op 8.9741 ms/op 0.91
phase0 getAttestationDeltas - 250000 worstcase 8.1183 ms/op 10.109 ms/op 0.80
phase0 processSlashings - 250000 worstcase 2.4881 ms/op 2.4687 ms/op 1.01
altair processSyncCommitteeUpdates - 250000 154.36 ms/op 161.83 ms/op 0.95
BeaconState.hashTreeRoot - No change 326.00 ns/op 273.00 ns/op 1.19
BeaconState.hashTreeRoot - 1 full validator 123.70 us/op 52.283 us/op 2.37
BeaconState.hashTreeRoot - 32 full validator 1.8759 ms/op 562.47 us/op 3.34
BeaconState.hashTreeRoot - 512 full validator 15.723 ms/op 5.9252 ms/op 2.65
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 165.14 us/op 66.196 us/op 2.49
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9026 ms/op 908.85 us/op 2.09
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.022 ms/op 13.964 ms/op 2.01
BeaconState.hashTreeRoot - 1 balances 127.05 us/op 51.310 us/op 2.48
BeaconState.hashTreeRoot - 32 balances 1.1809 ms/op 489.88 us/op 2.41
BeaconState.hashTreeRoot - 512 balances 14.263 ms/op 4.7255 ms/op 3.02
BeaconState.hashTreeRoot - 250000 balances 197.42 ms/op 77.497 ms/op 2.55
aggregationBits - 2048 els - zipIndexesInBitList 16.152 us/op 21.199 us/op 0.76
regular array get 100000 times 44.421 us/op 35.899 us/op 1.24
wrappedArray get 100000 times 41.702 us/op 35.828 us/op 1.16
arrayWithProxy get 100000 times 14.591 ms/op 16.892 ms/op 0.86
ssz.Root.equals 234.00 ns/op 250.00 ns/op 0.94
byteArrayEquals 225.00 ns/op 259.00 ns/op 0.87
shuffle list - 16384 els 6.9841 ms/op 7.6988 ms/op 0.91
shuffle list - 250000 els 102.68 ms/op 108.24 ms/op 0.95
processSlot - 1 slots 16.212 us/op 9.0960 us/op 1.78
processSlot - 32 slots 3.0222 ms/op 1.3801 ms/op 2.19
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 53.710 ms/op 60.158 ms/op 0.89
getCommitteeAssignments - req 1 vs - 250000 vc 2.5153 ms/op 2.9014 ms/op 0.87
getCommitteeAssignments - req 100 vs - 250000 vc 3.7196 ms/op 4.0022 ms/op 0.93
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0293 ms/op 4.4276 ms/op 0.91
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2000 ns/op 5.6800 ns/op 0.74
state getBlockRootAtSlot - 250000 vs - 7PWei 518.94 ns/op 947.41 ns/op 0.55
computeProposers - vc 250000 8.6791 ms/op 11.598 ms/op 0.75
computeEpochShuffling - vc 250000 104.03 ms/op 121.04 ms/op 0.86
getNextSyncCommittee - vc 250000 144.74 ms/op 171.60 ms/op 0.84
computeSigningRoot for AttestationData 20.343 us/op 15.997 us/op 1.27
hash AttestationData serialized data then Buffer.toString(base64) 2.2902 us/op 2.5587 us/op 0.90
toHexString serialized data 1.0393 us/op 1.4579 us/op 0.71
Buffer.toString(base64) 199.62 ns/op 254.29 ns/op 0.79

Please sign in to comment.