Skip to content

Commit

Permalink
chore: ssz 0.18.0 (#7181)
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths authored Oct 21, 2024
1 parent c9cf3ea commit e01142b
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
},
"dependencies": {
"@chainsafe/persistent-merkle-tree": "^0.8.0",
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@lodestar/config": "^1.22.0",
"@lodestar/params": "^1.22.0",
"@lodestar/types": "^1.22.0",
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 @@ -102,7 +102,7 @@
"@chainsafe/libp2p-noise": "^16.0.0",
"@chainsafe/persistent-merkle-tree": "^0.8.0",
"@chainsafe/prometheus-gc-stats": "^1.0.0",
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@chainsafe/threads": "^1.11.1",
"@chainsafe/pubkey-index-map": "2.0.0",
"@ethersproject/abi": "^5.7.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 @@ -57,7 +57,7 @@
"@chainsafe/discv5": "^10.0.1",
"@chainsafe/enr": "^4.0.1",
"@chainsafe/persistent-merkle-tree": "^0.8.0",
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@chainsafe/threads": "^1.11.1",
"@libp2p/crypto": "^5.0.4",
"@libp2p/interface": "^2.1.2",
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.17.1",
"@chainsafe/ssz": "^0.18.0",
"@lodestar/params": "^1.22.0",
"@lodestar/utils": "^1.22.0",
"@lodestar/types": "^1.22.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"check-readme": "typescript-docs-verifier"
},
"dependencies": {
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@lodestar/config": "^1.22.0",
"@lodestar/utils": "^1.22.0",
"classic-level": "^1.4.1",
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 @@ -36,7 +36,7 @@
"check-readme": "typescript-docs-verifier"
},
"dependencies": {
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@lodestar/config": "^1.22.0",
"@lodestar/params": "^1.22.0",
"@lodestar/state-transition": "^1.22.0",
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 @@ -76,7 +76,7 @@
"@chainsafe/bls": "7.1.3",
"@chainsafe/blst": "^0.2.0",
"@chainsafe/persistent-merkle-tree": "^0.8.0",
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@lodestar/api": "^1.22.0",
"@lodestar/config": "^1.22.0",
"@lodestar/params": "^1.22.0",
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 @@ -62,7 +62,7 @@
"@chainsafe/blst": "^2.0.3",
"@chainsafe/persistent-merkle-tree": "^0.8.0",
"@chainsafe/persistent-ts": "^0.19.1",
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@chainsafe/swap-or-not-shuffle": "^0.0.2",
"@lodestar/config": "^1.22.0",
"@lodestar/params": "^1.22.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"types": "lib/index.d.ts",
"dependencies": {
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@lodestar/params": "^1.22.0",
"ethereum-cryptography": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
],
"dependencies": {
"@chainsafe/blst": "^2.0.3",
"@chainsafe/ssz": "^0.17.1",
"@chainsafe/ssz": "^0.18.0",
"@lodestar/api": "^1.22.0",
"@lodestar/config": "^1.22.0",
"@lodestar/db": "^1.22.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,10 @@
"@chainsafe/as-sha256" "^0.4.1"
"@chainsafe/persistent-merkle-tree" "^0.6.1"

"@chainsafe/ssz@^0.17.1":
version "0.17.1"
resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.17.1.tgz#7986afbcad5e6971006d596fdb7dfa34bc195131"
integrity sha512-1ay46QqYcVTBvUnDXTPTi5WTiENu7tIxpZGMDpUWps1/nYBmh/We/UoCF/jO+o/fkcDD3p8xQPlHbcCfy+jyjA==
"@chainsafe/ssz@^0.18.0":
version "0.18.0"
resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.18.0.tgz#773d40df9dff3b6a2a4c6685d9797abceb9d36f7"
integrity sha512-1ikTjk3JK6+fsGWiT5IvQU0AP6gF3fDzGmPfkKthbcbgTUR8fjB83Ywp9ko/ZoiDGfrSFkATgT4hvRzclu0IAA==
dependencies:
"@chainsafe/as-sha256" "0.5.0"
"@chainsafe/persistent-merkle-tree" "0.8.0"
Expand Down

1 comment on commit e01142b

@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: e01142b Previous: c9cf3ea Ratio
isKnown normal case - 2 super set checks 670.00 ns/op 222.00 ns/op 3.02
Full benchmark results
Benchmark suite Current: e01142b Previous: c9cf3ea Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 3.5151 ms/op 1.8101 ms/op 1.94
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 99.228 us/op 38.978 us/op 2.55
BLS verify - blst 1.1449 ms/op 864.58 us/op 1.32
BLS verifyMultipleSignatures 3 - blst 1.8521 ms/op 1.2872 ms/op 1.44
BLS verifyMultipleSignatures 8 - blst 2.5458 ms/op 2.0856 ms/op 1.22
BLS verifyMultipleSignatures 32 - blst 7.8335 ms/op 4.6938 ms/op 1.67
BLS verifyMultipleSignatures 64 - blst 14.176 ms/op 8.2847 ms/op 1.71
BLS verifyMultipleSignatures 128 - blst 23.971 ms/op 15.775 ms/op 1.52
BLS deserializing 10000 signatures 818.32 ms/op 621.71 ms/op 1.32
BLS deserializing 100000 signatures 8.1552 s/op 6.1383 s/op 1.33
BLS verifyMultipleSignatures - same message - 3 - blst 1.3092 ms/op 936.93 us/op 1.40
BLS verifyMultipleSignatures - same message - 8 - blst 1.4441 ms/op 1.0296 ms/op 1.40
BLS verifyMultipleSignatures - same message - 32 - blst 2.1115 ms/op 1.7180 ms/op 1.23
BLS verifyMultipleSignatures - same message - 64 - blst 3.1539 ms/op 2.5992 ms/op 1.21
BLS verifyMultipleSignatures - same message - 128 - blst 5.1609 ms/op 4.2431 ms/op 1.22
BLS aggregatePubkeys 32 - blst 23.312 us/op 18.398 us/op 1.27
BLS aggregatePubkeys 128 - blst 79.951 us/op 61.661 us/op 1.30
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 115.67 ms/op 66.916 ms/op 1.73
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 100.47 ms/op 43.861 ms/op 2.29
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 55.957 ms/op 39.823 ms/op 1.41
getSlashingsAndExits - default max 130.56 us/op 72.368 us/op 1.80
getSlashingsAndExits - 2k 438.04 us/op 239.71 us/op 1.83
proposeBlockBody type=full, size=empty 7.3912 ms/op 5.0341 ms/op 1.47
isKnown best case - 1 super set check 629.00 ns/op 224.00 ns/op 2.81
isKnown normal case - 2 super set checks 670.00 ns/op 222.00 ns/op 3.02
isKnown worse case - 16 super set checks 663.00 ns/op 221.00 ns/op 3.00
InMemoryCheckpointStateCache - add get delete 3.7550 us/op 2.3580 us/op 1.59
updateUnfinalizedPubkeys - updating 10 pubkeys 2.0382 ms/op 637.51 us/op 3.20
updateUnfinalizedPubkeys - updating 100 pubkeys 5.3417 ms/op 2.4678 ms/op 2.16
updateUnfinalizedPubkeys - updating 1000 pubkeys 63.135 ms/op 37.294 ms/op 1.69
validate api signedAggregateAndProof - struct 1.8473 ms/op 1.8981 ms/op 0.97
validate gossip signedAggregateAndProof - struct 1.7509 ms/op 1.8663 ms/op 0.94
batch validate gossip attestation - vc 640000 - chunk 32 170.62 us/op 119.38 us/op 1.43
batch validate gossip attestation - vc 640000 - chunk 64 149.11 us/op 102.97 us/op 1.45
batch validate gossip attestation - vc 640000 - chunk 128 138.54 us/op 98.480 us/op 1.41
batch validate gossip attestation - vc 640000 - chunk 256 137.78 us/op 96.485 us/op 1.43
pickEth1Vote - no votes 1.5011 ms/op 820.43 us/op 1.83
pickEth1Vote - max votes 12.186 ms/op 5.4964 ms/op 2.22
pickEth1Vote - Eth1Data hashTreeRoot value x2048 20.474 ms/op 12.481 ms/op 1.64
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 33.780 ms/op 17.692 ms/op 1.91
pickEth1Vote - Eth1Data fastSerialize value x2048 666.13 us/op 377.00 us/op 1.77
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.3266 ms/op 2.9559 ms/op 1.80
bytes32 toHexString 874.00 ns/op 333.00 ns/op 2.62
bytes32 Buffer.toString(hex) 330.00 ns/op 197.00 ns/op 1.68
bytes32 Buffer.toString(hex) from Uint8Array 571.00 ns/op 292.00 ns/op 1.96
bytes32 Buffer.toString(hex) + 0x 311.00 ns/op 196.00 ns/op 1.59
Object access 1 prop 0.22200 ns/op 0.11000 ns/op 2.02
Map access 1 prop 0.17500 ns/op 0.10600 ns/op 1.65
Object get x1000 7.8250 ns/op 5.0320 ns/op 1.56
Map get x1000 8.0540 ns/op 5.7180 ns/op 1.41
Object set x1000 62.785 ns/op 24.196 ns/op 2.59
Map set x1000 41.893 ns/op 17.968 ns/op 2.33
Return object 10000 times 0.33880 ns/op 0.27690 ns/op 1.22
Throw Error 10000 times 4.1859 us/op 2.7019 us/op 1.55
toHex 206.15 ns/op 113.59 ns/op 1.81
Buffer.from 193.31 ns/op 102.32 ns/op 1.89
shared Buffer 117.05 ns/op 69.192 ns/op 1.69
fastMsgIdFn sha256 / 200 bytes 2.7970 us/op 1.7370 us/op 1.61
fastMsgIdFn h32 xxhash / 200 bytes 352.00 ns/op 183.00 ns/op 1.92
fastMsgIdFn h64 xxhash / 200 bytes 359.00 ns/op 207.00 ns/op 1.73
fastMsgIdFn sha256 / 1000 bytes 9.3650 us/op 5.5650 us/op 1.68
fastMsgIdFn h32 xxhash / 1000 bytes 511.00 ns/op 312.00 ns/op 1.64
fastMsgIdFn h64 xxhash / 1000 bytes 405.00 ns/op 275.00 ns/op 1.47
fastMsgIdFn sha256 / 10000 bytes 83.829 us/op 48.705 us/op 1.72
fastMsgIdFn h32 xxhash / 10000 bytes 2.2740 us/op 1.6350 us/op 1.39
fastMsgIdFn h64 xxhash / 10000 bytes 1.3850 us/op 1.0800 us/op 1.28
send data - 1000 256B messages 17.298 ms/op 9.0931 ms/op 1.90
send data - 1000 512B messages 23.224 ms/op 13.493 ms/op 1.72
send data - 1000 1024B messages 38.603 ms/op 23.093 ms/op 1.67
send data - 1000 1200B messages 36.389 ms/op 21.432 ms/op 1.70
send data - 1000 2048B messages 39.577 ms/op 26.800 ms/op 1.48
send data - 1000 4096B messages 27.933 ms/op 25.595 ms/op 1.09
send data - 1000 16384B messages 86.645 ms/op 61.478 ms/op 1.41
send data - 1000 65536B messages 259.53 ms/op 176.02 ms/op 1.47
enrSubnets - fastDeserialize 64 bits 1.7990 us/op 832.00 ns/op 2.16
enrSubnets - ssz BitVector 64 bits 489.00 ns/op 282.00 ns/op 1.73
enrSubnets - fastDeserialize 4 bits 219.00 ns/op 116.00 ns/op 1.89
enrSubnets - ssz BitVector 4 bits 474.00 ns/op 284.00 ns/op 1.67
prioritizePeers score -10:0 att 32-0.1 sync 2-0 217.29 us/op 129.95 us/op 1.67
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 239.10 us/op 170.79 us/op 1.40
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 330.82 us/op 244.09 us/op 1.36
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 502.04 us/op 480.33 us/op 1.05
prioritizePeers score 0:0 att 64-1 sync 4-1 991.62 us/op 783.56 us/op 1.27
array of 16000 items push then shift 1.8741 us/op 1.2402 us/op 1.51
LinkedList of 16000 items push then shift 8.5580 ns/op 7.0890 ns/op 1.21
array of 16000 items push then pop 162.41 ns/op 105.05 ns/op 1.55
LinkedList of 16000 items push then pop 8.7290 ns/op 5.9040 ns/op 1.48
array of 24000 items push then shift 2.6340 us/op 1.7614 us/op 1.50
LinkedList of 24000 items push then shift 9.1910 ns/op 6.4040 ns/op 1.44
array of 24000 items push then pop 204.83 ns/op 113.48 ns/op 1.81
LinkedList of 24000 items push then pop 7.9020 ns/op 5.5920 ns/op 1.41
intersect bitArray bitLen 8 7.0720 ns/op 4.8850 ns/op 1.45
intersect array and set length 8 76.158 ns/op 38.474 ns/op 1.98
intersect bitArray bitLen 128 32.696 ns/op 25.133 ns/op 1.30
intersect array and set length 128 960.72 ns/op 558.82 ns/op 1.72
bitArray.getTrueBitIndexes() bitLen 128 2.6030 us/op 2.2000 us/op 1.18
bitArray.getTrueBitIndexes() bitLen 248 4.8230 us/op 3.0030 us/op 1.61
bitArray.getTrueBitIndexes() bitLen 512 8.9220 us/op 7.1860 us/op 1.24
Buffer.concat 32 items 1.0710 us/op 861.00 ns/op 1.24
Uint8Array.set 32 items 2.0950 us/op 1.5880 us/op 1.32
Buffer.copy 2.2770 us/op 1.7440 us/op 1.31
Uint8Array.set - with subarray 3.6240 us/op 2.2770 us/op 1.59
Uint8Array.set - without subarray 1.8410 us/op 1.5160 us/op 1.21
getUint32 - dataview 319.00 ns/op 179.00 ns/op 1.78
getUint32 - manual 273.00 ns/op 132.00 ns/op 2.07
Set add up to 64 items then delete first 3.5034 us/op 1.8531 us/op 1.89
OrderedSet add up to 64 items then delete first 5.4760 us/op 3.0371 us/op 1.80
Set add up to 64 items then delete last 3.7441 us/op 2.1368 us/op 1.75
OrderedSet add up to 64 items then delete last 5.5993 us/op 3.2039 us/op 1.75
Set add up to 64 items then delete middle 3.6596 us/op 2.1457 us/op 1.71
OrderedSet add up to 64 items then delete middle 7.5028 us/op 4.6145 us/op 1.63
Set add up to 128 items then delete first 7.3026 us/op 4.2140 us/op 1.73
OrderedSet add up to 128 items then delete first 10.323 us/op 7.2734 us/op 1.42
Set add up to 128 items then delete last 6.4543 us/op 4.8452 us/op 1.33
OrderedSet add up to 128 items then delete last 9.7373 us/op 7.8620 us/op 1.24
Set add up to 128 items then delete middle 6.8232 us/op 6.0119 us/op 1.13
OrderedSet add up to 128 items then delete middle 17.562 us/op 14.144 us/op 1.24
Set add up to 256 items then delete first 14.580 us/op 8.9166 us/op 1.64
OrderedSet add up to 256 items then delete first 22.868 us/op 14.018 us/op 1.63
Set add up to 256 items then delete last 12.958 us/op 7.9805 us/op 1.62
OrderedSet add up to 256 items then delete last 19.941 us/op 12.200 us/op 1.63
Set add up to 256 items then delete middle 13.723 us/op 7.9706 us/op 1.72
OrderedSet add up to 256 items then delete middle 48.778 us/op 34.999 us/op 1.39
transfer serialized Status (84 B) 2.0200 us/op 1.2750 us/op 1.58
copy serialized Status (84 B) 1.4060 us/op 1.0410 us/op 1.35
transfer serialized SignedVoluntaryExit (112 B) 1.7080 us/op 1.4420 us/op 1.18
copy serialized SignedVoluntaryExit (112 B) 1.4220 us/op 1.1570 us/op 1.23
transfer serialized ProposerSlashing (416 B) 2.2420 us/op 1.9450 us/op 1.15
copy serialized ProposerSlashing (416 B) 2.2480 us/op 2.1020 us/op 1.07
transfer serialized Attestation (485 B) 2.5030 us/op 2.3170 us/op 1.08
copy serialized Attestation (485 B) 2.2340 us/op 2.0870 us/op 1.07
transfer serialized AttesterSlashing (33232 B) 2.1570 us/op 2.2500 us/op 0.96
copy serialized AttesterSlashing (33232 B) 8.9340 us/op 4.6920 us/op 1.90
transfer serialized Small SignedBeaconBlock (128000 B) 3.3790 us/op 2.4990 us/op 1.35
copy serialized Small SignedBeaconBlock (128000 B) 32.713 us/op 9.4780 us/op 3.45
transfer serialized Avg SignedBeaconBlock (200000 B) 4.3630 us/op 1.9470 us/op 2.24
copy serialized Avg SignedBeaconBlock (200000 B) 100.27 us/op 14.040 us/op 7.14
transfer serialized BlobsSidecar (524380 B) 3.4460 us/op 2.6410 us/op 1.30
copy serialized BlobsSidecar (524380 B) 106.35 us/op 129.65 us/op 0.82
transfer serialized Big SignedBeaconBlock (1000000 B) 3.7710 us/op 2.8640 us/op 1.32
copy serialized Big SignedBeaconBlock (1000000 B) 182.55 us/op 148.33 us/op 1.23
pass gossip attestations to forkchoice per slot 3.0232 ms/op 2.4030 ms/op 1.26
forkChoice updateHead vc 100000 bc 64 eq 0 472.45 us/op 397.44 us/op 1.19
forkChoice updateHead vc 600000 bc 64 eq 0 4.5711 ms/op 2.3904 ms/op 1.91
forkChoice updateHead vc 1000000 bc 64 eq 0 5.8856 ms/op 3.7208 ms/op 1.58
forkChoice updateHead vc 600000 bc 320 eq 0 3.5524 ms/op 2.3726 ms/op 1.50
forkChoice updateHead vc 600000 bc 1200 eq 0 3.3997 ms/op 2.4057 ms/op 1.41
forkChoice updateHead vc 600000 bc 7200 eq 0 4.6521 ms/op 2.6194 ms/op 1.78
forkChoice updateHead vc 600000 bc 64 eq 1000 12.228 ms/op 8.9759 ms/op 1.36
forkChoice updateHead vc 600000 bc 64 eq 10000 10.985 ms/op 9.3119 ms/op 1.18
forkChoice updateHead vc 600000 bc 64 eq 300000 22.125 ms/op 11.351 ms/op 1.95
computeDeltas 500000 validators 300 proto nodes 4.8436 ms/op 3.2761 ms/op 1.48
computeDeltas 500000 validators 1200 proto nodes 5.0454 ms/op 3.3483 ms/op 1.51
computeDeltas 500000 validators 7200 proto nodes 5.4175 ms/op 3.4711 ms/op 1.56
computeDeltas 750000 validators 300 proto nodes 8.0569 ms/op 5.7726 ms/op 1.40
computeDeltas 750000 validators 1200 proto nodes 7.8725 ms/op 5.4051 ms/op 1.46
computeDeltas 750000 validators 7200 proto nodes 7.4800 ms/op 4.9297 ms/op 1.52
computeDeltas 1400000 validators 300 proto nodes 12.439 ms/op 9.4701 ms/op 1.31
computeDeltas 1400000 validators 1200 proto nodes 13.330 ms/op 9.2497 ms/op 1.44
computeDeltas 1400000 validators 7200 proto nodes 13.847 ms/op 9.5090 ms/op 1.46
computeDeltas 2100000 validators 300 proto nodes 21.260 ms/op 13.690 ms/op 1.55
computeDeltas 2100000 validators 1200 proto nodes 22.895 ms/op 13.749 ms/op 1.67
computeDeltas 2100000 validators 7200 proto nodes 22.136 ms/op 13.569 ms/op 1.63
altair processAttestation - 250000 vs - 7PWei normalcase 2.7922 ms/op 1.3809 ms/op 2.02
altair processAttestation - 250000 vs - 7PWei worstcase 3.7530 ms/op 2.0983 ms/op 1.79
altair processAttestation - setStatus - 1/6 committees join 103.41 us/op 70.439 us/op 1.47
altair processAttestation - setStatus - 1/3 committees join 224.83 us/op 142.42 us/op 1.58
altair processAttestation - setStatus - 1/2 committees join 291.42 us/op 206.31 us/op 1.41
altair processAttestation - setStatus - 2/3 committees join 395.71 us/op 271.23 us/op 1.46
altair processAttestation - setStatus - 4/5 committees join 541.42 us/op 397.62 us/op 1.36
altair processAttestation - setStatus - 100% committees join 644.07 us/op 473.15 us/op 1.36
altair processBlock - 250000 vs - 7PWei normalcase 5.2484 ms/op 5.1197 ms/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.697 ms/op 22.474 ms/op 1.45
altair processBlock - 250000 vs - 7PWei worstcase 47.285 ms/op 37.155 ms/op 1.27
altair processBlock - 250000 vs - 7PWei worstcase hashState 89.130 ms/op 67.719 ms/op 1.32
phase0 processBlock - 250000 vs - 7PWei normalcase 2.8016 ms/op 1.3066 ms/op 2.14
phase0 processBlock - 250000 vs - 7PWei worstcase 29.653 ms/op 21.834 ms/op 1.36
altair processEth1Data - 250000 vs - 7PWei normalcase 577.08 us/op 246.10 us/op 2.34
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.5820 us/op 3.9260 us/op 2.44
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 42.094 us/op 26.398 us/op 1.59
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 13.880 us/op 11.177 us/op 1.24
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.8600 us/op 4.2690 us/op 1.84
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 211.55 us/op 116.86 us/op 1.81
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.5269 ms/op 1.3334 ms/op 1.15
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7581 ms/op 1.1527 ms/op 1.53
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8883 ms/op 1.1114 ms/op 1.70
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.0631 ms/op 2.9745 ms/op 1.70
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0453 ms/op 1.1731 ms/op 1.74
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.4133 ms/op 2.8304 ms/op 1.56
Tree 40 250000 create 297.69 ms/op 187.12 ms/op 1.59
Tree 40 250000 get(125000) 170.83 ns/op 114.20 ns/op 1.50
Tree 40 250000 set(125000) 959.24 ns/op 491.19 ns/op 1.95
Tree 40 250000 toArray() 22.846 ms/op 10.141 ms/op 2.25
Tree 40 250000 iterate all - toArray() + loop 22.688 ms/op 9.9653 ms/op 2.28
Tree 40 250000 iterate all - get(i) 63.611 ms/op 40.670 ms/op 1.56
Array 250000 create 4.2124 ms/op 2.3278 ms/op 1.81
Array 250000 clone - spread 1.6914 ms/op 1.1254 ms/op 1.50
Array 250000 get(125000) 0.47000 ns/op 0.37900 ns/op 1.24
Array 250000 set(125000) 0.50100 ns/op 0.38600 ns/op 1.30
Array 250000 iterate all - loop 91.953 us/op 76.250 us/op 1.21
phase0 afterProcessEpoch - 250000 vs - 7PWei 56.119 ms/op 41.548 ms/op 1.35
Array.fill - length 1000000 5.2445 ms/op 2.3453 ms/op 2.24
Array push - length 1000000 18.895 ms/op 11.839 ms/op 1.60
Array.get 0.29365 ns/op 0.25793 ns/op 1.14
Uint8Array.get 0.46626 ns/op 0.33941 ns/op 1.37
phase0 beforeProcessEpoch - 250000 vs - 7PWei 20.421 ms/op 12.316 ms/op 1.66
altair processEpoch - mainnet_e81889 324.88 ms/op 288.67 ms/op 1.13
mainnet_e81889 - altair beforeProcessEpoch 22.189 ms/op 19.138 ms/op 1.16
mainnet_e81889 - altair processJustificationAndFinalization 19.709 us/op 9.7800 us/op 2.02
mainnet_e81889 - altair processInactivityUpdates 7.8930 ms/op 4.2377 ms/op 1.86
mainnet_e81889 - altair processRewardsAndPenalties 56.771 ms/op 50.010 ms/op 1.14
mainnet_e81889 - altair processRegistryUpdates 4.6480 us/op 1.4650 us/op 3.17
mainnet_e81889 - altair processSlashings 809.00 ns/op 307.00 ns/op 2.64
mainnet_e81889 - altair processEth1DataReset 599.00 ns/op 239.00 ns/op 2.51
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.6378 ms/op 1.0240 ms/op 2.58
mainnet_e81889 - altair processSlashingsReset 6.1300 us/op 3.7290 us/op 1.64
mainnet_e81889 - altair processRandaoMixesReset 12.647 us/op 3.9560 us/op 3.20
mainnet_e81889 - altair processHistoricalRootsUpdate 1.3750 us/op 511.00 ns/op 2.69
mainnet_e81889 - altair processParticipationFlagUpdates 4.9260 us/op 1.3550 us/op 3.64
mainnet_e81889 - altair processSyncCommitteeUpdates 790.00 ns/op 287.00 ns/op 2.75
mainnet_e81889 - altair afterProcessEpoch 58.943 ms/op 40.824 ms/op 1.44
capella processEpoch - mainnet_e217614 1.2317 s/op 887.82 ms/op 1.39
mainnet_e217614 - capella beforeProcessEpoch 94.550 ms/op 66.680 ms/op 1.42
mainnet_e217614 - capella processJustificationAndFinalization 24.149 us/op 10.348 us/op 2.33
mainnet_e217614 - capella processInactivityUpdates 21.189 ms/op 12.009 ms/op 1.76
mainnet_e217614 - capella processRewardsAndPenalties 279.89 ms/op 204.06 ms/op 1.37
mainnet_e217614 - capella processRegistryUpdates 16.501 us/op 10.975 us/op 1.50
mainnet_e217614 - capella processSlashings 798.00 ns/op 324.00 ns/op 2.46
mainnet_e217614 - capella processEth1DataReset 502.00 ns/op 334.00 ns/op 1.50
mainnet_e217614 - capella processEffectiveBalanceUpdates 18.864 ms/op 7.5175 ms/op 2.51
mainnet_e217614 - capella processSlashingsReset 3.1950 us/op 2.5420 us/op 1.26
mainnet_e217614 - capella processRandaoMixesReset 11.414 us/op 3.5880 us/op 3.18
mainnet_e217614 - capella processHistoricalRootsUpdate 715.00 ns/op 368.00 ns/op 1.94
mainnet_e217614 - capella processParticipationFlagUpdates 2.3130 us/op 1.4250 us/op 1.62
mainnet_e217614 - capella afterProcessEpoch 130.06 ms/op 102.12 ms/op 1.27
phase0 processEpoch - mainnet_e58758 390.43 ms/op 212.74 ms/op 1.84
mainnet_e58758 - phase0 beforeProcessEpoch 92.126 ms/op 70.828 ms/op 1.30
mainnet_e58758 - phase0 processJustificationAndFinalization 20.948 us/op 13.125 us/op 1.60
mainnet_e58758 - phase0 processRewardsAndPenalties 39.513 ms/op 28.194 ms/op 1.40
mainnet_e58758 - phase0 processRegistryUpdates 13.928 us/op 8.0560 us/op 1.73
mainnet_e58758 - phase0 processSlashings 378.00 ns/op 323.00 ns/op 1.17
mainnet_e58758 - phase0 processEth1DataReset 405.00 ns/op 404.00 ns/op 1.00
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0418 ms/op 794.73 us/op 2.57
mainnet_e58758 - phase0 processSlashingsReset 3.8680 us/op 6.9280 us/op 0.56
mainnet_e58758 - phase0 processRandaoMixesReset 4.6110 us/op 3.8730 us/op 1.19
mainnet_e58758 - phase0 processHistoricalRootsUpdate 382.00 ns/op 348.00 ns/op 1.10
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.0180 us/op 2.5450 us/op 2.36
mainnet_e58758 - phase0 afterProcessEpoch 44.920 ms/op 36.792 ms/op 1.22
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.7183 ms/op 1.0204 ms/op 1.68
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.3473 ms/op 1.7568 ms/op 1.34
altair processInactivityUpdates - 250000 normalcase 20.888 ms/op 17.080 ms/op 1.22
altair processInactivityUpdates - 250000 worstcase 21.417 ms/op 15.637 ms/op 1.37
phase0 processRegistryUpdates - 250000 normalcase 11.857 us/op 10.389 us/op 1.14
phase0 processRegistryUpdates - 250000 badcase_full_deposits 369.45 us/op 310.86 us/op 1.19
phase0 processRegistryUpdates - 250000 worstcase 0.5 136.75 ms/op 107.83 ms/op 1.27
altair processRewardsAndPenalties - 250000 normalcase 43.830 ms/op 35.560 ms/op 1.23
altair processRewardsAndPenalties - 250000 worstcase 50.237 ms/op 32.801 ms/op 1.53
phase0 getAttestationDeltas - 250000 normalcase 9.9159 ms/op 6.2601 ms/op 1.58
phase0 getAttestationDeltas - 250000 worstcase 8.2054 ms/op 5.8850 ms/op 1.39
phase0 processSlashings - 250000 worstcase 116.01 us/op 93.352 us/op 1.24
altair processSyncCommitteeUpdates - 250000 128.13 ms/op 102.98 ms/op 1.24
BeaconState.hashTreeRoot - No change 293.00 ns/op 187.00 ns/op 1.57
BeaconState.hashTreeRoot - 1 full validator 118.46 us/op 110.86 us/op 1.07
BeaconState.hashTreeRoot - 32 full validator 1.2948 ms/op 1.5394 ms/op 0.84
BeaconState.hashTreeRoot - 512 full validator 14.998 ms/op 9.5018 ms/op 1.58
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 201.83 us/op 139.63 us/op 1.45
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2028 ms/op 2.1666 ms/op 1.02
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 29.493 ms/op 24.088 ms/op 1.22
BeaconState.hashTreeRoot - 1 balances 120.41 us/op 104.61 us/op 1.15
BeaconState.hashTreeRoot - 32 balances 1.3867 ms/op 910.53 us/op 1.52
BeaconState.hashTreeRoot - 512 balances 8.8431 ms/op 7.1911 ms/op 1.23
BeaconState.hashTreeRoot - 250000 balances 182.13 ms/op 143.78 ms/op 1.27
aggregationBits - 2048 els - zipIndexesInBitList 30.849 us/op 19.012 us/op 1.62
byteArrayEquals 32 61.043 ns/op 50.876 ns/op 1.20
Buffer.compare 32 17.840 ns/op 19.351 ns/op 0.92
byteArrayEquals 1024 1.7251 us/op 1.2741 us/op 1.35
Buffer.compare 1024 25.573 ns/op 23.480 ns/op 1.09
byteArrayEquals 16384 28.181 us/op 20.201 us/op 1.40
Buffer.compare 16384 222.87 ns/op 208.89 ns/op 1.07
byteArrayEquals 123687377 203.37 ms/op 150.80 ms/op 1.35
Buffer.compare 123687377 8.3887 ms/op 5.7934 ms/op 1.45
byteArrayEquals 32 - diff last byte 55.349 ns/op 46.090 ns/op 1.20
Buffer.compare 32 - diff last byte 17.962 ns/op 15.084 ns/op 1.19
byteArrayEquals 1024 - diff last byte 1.7007 us/op 1.2733 us/op 1.34
Buffer.compare 1024 - diff last byte 26.162 ns/op 23.253 ns/op 1.13
byteArrayEquals 16384 - diff last byte 26.585 us/op 20.238 us/op 1.31
Buffer.compare 16384 - diff last byte 203.02 ns/op 200.57 ns/op 1.01
byteArrayEquals 123687377 - diff last byte 214.19 ms/op 154.09 ms/op 1.39
Buffer.compare 123687377 - diff last byte 11.012 ms/op 4.7199 ms/op 2.33
byteArrayEquals 32 - random bytes 5.9300 ns/op 4.7510 ns/op 1.25
Buffer.compare 32 - random bytes 20.102 ns/op 15.939 ns/op 1.26
byteArrayEquals 1024 - random bytes 6.1660 ns/op 4.6880 ns/op 1.32
Buffer.compare 1024 - random bytes 20.308 ns/op 15.498 ns/op 1.31
byteArrayEquals 16384 - random bytes 5.5770 ns/op 4.7780 ns/op 1.17
Buffer.compare 16384 - random bytes 19.073 ns/op 15.552 ns/op 1.23
byteArrayEquals 123687377 - random bytes 7.3000 ns/op 5.7500 ns/op 1.27
Buffer.compare 123687377 - random bytes 22.530 ns/op 16.660 ns/op 1.35
regular array get 100000 times 38.611 us/op 30.899 us/op 1.25
wrappedArray get 100000 times 38.248 us/op 30.939 us/op 1.24
arrayWithProxy get 100000 times 14.564 ms/op 9.8126 ms/op 1.48
ssz.Root.equals 51.331 ns/op 39.532 ns/op 1.30
byteArrayEquals 50.856 ns/op 42.493 ns/op 1.20
Buffer.compare 12.121 ns/op 9.0390 ns/op 1.34
processSlot - 1 slots 19.629 us/op 10.560 us/op 1.86
processSlot - 32 slots 2.9795 ms/op 1.9537 ms/op 1.53
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 41.242 ms/op 35.270 ms/op 1.17
getCommitteeAssignments - req 1 vs - 250000 vc 2.2920 ms/op 1.7948 ms/op 1.28
getCommitteeAssignments - req 100 vs - 250000 vc 4.2428 ms/op 3.4178 ms/op 1.24
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5451 ms/op 3.7475 ms/op 1.21
findModifiedValidators - 10000 modified validators 301.46 ms/op 216.02 ms/op 1.40
findModifiedValidators - 1000 modified validators 248.45 ms/op 139.32 ms/op 1.78
findModifiedValidators - 100 modified validators 193.68 ms/op 139.76 ms/op 1.39
findModifiedValidators - 10 modified validators 205.98 ms/op 123.70 ms/op 1.67
findModifiedValidators - 1 modified validators 206.75 ms/op 133.79 ms/op 1.55
findModifiedValidators - no difference 180.57 ms/op 131.46 ms/op 1.37
compare ViewDUs 3.5838 s/op 2.8434 s/op 1.26
compare each validator Uint8Array 1.6901 s/op 1.8181 s/op 0.93
compare ViewDU to Uint8Array 1.2178 s/op 694.41 ms/op 1.75
migrate state 1000000 validators, 24 modified, 0 new 751.09 ms/op 624.79 ms/op 1.20
migrate state 1000000 validators, 1700 modified, 1000 new 1.0411 s/op 828.04 ms/op 1.26
migrate state 1000000 validators, 3400 modified, 2000 new 1.3392 s/op 1.0101 s/op 1.33
migrate state 1500000 validators, 24 modified, 0 new 793.95 ms/op 669.04 ms/op 1.19
migrate state 1500000 validators, 1700 modified, 1000 new 1.0128 s/op 840.35 ms/op 1.21
migrate state 1500000 validators, 3400 modified, 2000 new 1.2684 s/op 1.0442 s/op 1.21
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4300 ns/op 3.8400 ns/op 1.15
state getBlockRootAtSlot - 250000 vs - 7PWei 708.21 ns/op 568.02 ns/op 1.25
computeProposers - vc 250000 6.6466 ms/op 6.6785 ms/op 1.00
computeEpochShuffling - vc 250000 40.928 ms/op 36.710 ms/op 1.11
getNextSyncCommittee - vc 250000 123.15 ms/op 116.53 ms/op 1.06
computeSigningRoot for AttestationData 24.157 us/op 22.033 us/op 1.10
hash AttestationData serialized data then Buffer.toString(base64) 1.5815 us/op 1.1507 us/op 1.37
toHexString serialized data 871.92 ns/op 750.40 ns/op 1.16
Buffer.toString(base64) 175.87 ns/op 130.78 ns/op 1.34
nodejs block root to RootHex using toHex 167.50 ns/op 111.73 ns/op 1.50
nodejs block root to RootHex using toRootHex 96.258 ns/op 67.169 ns/op 1.43
browser block root to RootHex using the deprecated toHexString 225.35 ns/op 194.51 ns/op 1.16
browser block root to RootHex using toHex 182.82 ns/op 152.94 ns/op 1.20
browser block root to RootHex using toRootHex 173.29 ns/op 139.20 ns/op 1.24

Please sign in to comment.