Skip to content

Commit

Permalink
refactor: restructure to tests and CI workflow to reduce CI time (#5951)
Browse files Browse the repository at this point in the history
* Enable debug logging for e2e tests

* Reduce the duration of lightclient test

* Run all e2e tests with minimal preset

* Fix the few e2e tests

* Fix test job names

* Fix the task script

* Add yarn cache to node actions

* Update few e2e tests after code review

* Fix the type export to use with transpilation

* Remove unused file

* Revert changes to an e2e test file

* Reduce the genesis delay

* Refactor workflow jobs

* Add .git-data to build cache

* Fix spec tests option

* Upgrade the github action version

* Add a package dev dependency

* Add artifact name

* Update the workflow to add env variables

* Update the workflow to add env variables

* Add tsnode option

* Parallelize the spec tests

* Add the ts-node configuration

* Update tsconfig for the e2e tests

* Update the tsconfig for the project

* Fix the types issue

* Remove unused file
  • Loading branch information
nazarhussain authored Sep 22, 2023
1 parent 9dae25f commit 4fd3d4d
Show file tree
Hide file tree
Showing 90 changed files with 614 additions and 518 deletions.
1 change: 1 addition & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
node-version: 20
registry-url: "https://registry.npmjs.org"
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand Down
64 changes: 0 additions & 64 deletions .github/workflows/test-browser.yml

This file was deleted.

78 changes: 0 additions & 78 deletions .github/workflows/test-e2e.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/test-sim-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:

- name: Upload debug log test files
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: debug-test-logs
path: packages/beacon-node/test-logs
Expand Down Expand Up @@ -143,7 +144,7 @@ jobs:

- name: Upload debug log test files
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: debug-test-logs
path: packages/beacon-node/test-logs
1 change: 1 addition & 0 deletions .github/workflows/test-sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/test-spec.yml

This file was deleted.

Loading

1 comment on commit 4fd3d4d

@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: 4fd3d4d Previous: 9dae25f Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 40.500 ms/op 13.184 ms/op 3.07
Full benchmark results
Benchmark suite Current: 4fd3d4d Previous: 9dae25f Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 746.26 us/op 534.96 us/op 1.40
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 75.384 us/op 51.773 us/op 1.46
BLS verify - blst-native 1.2887 ms/op 1.1391 ms/op 1.13
BLS verifyMultipleSignatures 3 - blst-native 2.6359 ms/op 2.4188 ms/op 1.09
BLS verifyMultipleSignatures 8 - blst-native 5.8824 ms/op 5.3656 ms/op 1.10
BLS verifyMultipleSignatures 32 - blst-native 21.921 ms/op 19.735 ms/op 1.11
BLS verifyMultipleSignatures 64 - blst-native 43.164 ms/op 39.296 ms/op 1.10
BLS verifyMultipleSignatures 128 - blst-native 85.164 ms/op 78.399 ms/op 1.09
BLS deserializing 10000 signatures 877.99 ms/op 812.86 ms/op 1.08
BLS deserializing 100000 signatures 8.6981 s/op 8.0060 s/op 1.09
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2866 ms/op 1.1195 ms/op 1.15
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4482 ms/op 1.2894 ms/op 1.12
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4090 ms/op 2.0611 ms/op 1.17
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.2081 ms/op 3.0422 ms/op 1.05
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.4654 ms/op 5.0162 ms/op 1.09
BLS aggregatePubkeys 32 - blst-native 25.190 us/op 21.830 us/op 1.15
BLS aggregatePubkeys 128 - blst-native 98.144 us/op 85.934 us/op 1.14
getAttestationsForBlock 36.965 ms/op 26.795 ms/op 1.38
isKnown best case - 1 super set check 250.00 ns/op 223.00 ns/op 1.12
isKnown normal case - 2 super set checks 259.00 ns/op 213.00 ns/op 1.22
isKnown worse case - 16 super set checks 253.00 ns/op 212.00 ns/op 1.19
CheckpointStateCache - add get delete 4.8940 us/op 3.5090 us/op 1.39
validate api signedAggregateAndProof - struct 2.7043 ms/op 2.4769 ms/op 1.09
validate gossip signedAggregateAndProof - struct 2.7122 ms/op 2.4685 ms/op 1.10
validate gossip attestation - vc 640000 1.3116 ms/op 1.1715 ms/op 1.12
batch validate gossip attestation - vc 640000 - chunk 32 154.44 us/op 138.08 us/op 1.12
batch validate gossip attestation - vc 640000 - chunk 64 135.68 us/op 125.52 us/op 1.08
batch validate gossip attestation - vc 640000 - chunk 128 130.69 us/op 120.14 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 126.93 us/op 133.34 us/op 0.95
pickEth1Vote - no votes 1.1840 ms/op 1.1863 ms/op 1.00
pickEth1Vote - max votes 11.225 ms/op 14.983 ms/op 0.75
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.517 ms/op 17.003 ms/op 1.27
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 27.000 ms/op 17.271 ms/op 1.56
pickEth1Vote - Eth1Data fastSerialize value x2048 568.34 us/op 425.09 us/op 1.34
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.2838 ms/op 8.8790 ms/op 0.60
bytes32 toHexString 465.00 ns/op 401.00 ns/op 1.16
bytes32 Buffer.toString(hex) 295.00 ns/op 210.00 ns/op 1.40
bytes32 Buffer.toString(hex) from Uint8Array 436.00 ns/op 321.00 ns/op 1.36
bytes32 Buffer.toString(hex) + 0x 294.00 ns/op 235.00 ns/op 1.25
Object access 1 prop 0.16000 ns/op 0.13800 ns/op 1.16
Map access 1 prop 0.13800 ns/op 0.10700 ns/op 1.29
Object get x1000 7.1680 ns/op 4.9170 ns/op 1.46
Map get x1000 0.62600 ns/op 0.48600 ns/op 1.29
Object set x1000 53.196 ns/op 28.080 ns/op 1.89
Map set x1000 45.233 ns/op 18.359 ns/op 2.46
Return object 10000 times 0.24260 ns/op 0.21760 ns/op 1.11
Throw Error 10000 times 3.8838 us/op 2.7695 us/op 1.40
fastMsgIdFn sha256 / 200 bytes 3.4210 us/op 1.9210 us/op 1.78
fastMsgIdFn h32 xxhash / 200 bytes 287.00 ns/op 221.00 ns/op 1.30
fastMsgIdFn h64 xxhash / 200 bytes 356.00 ns/op 243.00 ns/op 1.47
fastMsgIdFn sha256 / 1000 bytes 11.385 us/op 6.1270 us/op 1.86
fastMsgIdFn h32 xxhash / 1000 bytes 427.00 ns/op 370.00 ns/op 1.15
fastMsgIdFn h64 xxhash / 1000 bytes 439.00 ns/op 316.00 ns/op 1.39
fastMsgIdFn sha256 / 10000 bytes 104.87 us/op 54.339 us/op 1.93
fastMsgIdFn h32 xxhash / 10000 bytes 2.0550 us/op 1.7000 us/op 1.21
fastMsgIdFn h64 xxhash / 10000 bytes 1.4040 us/op 1.1200 us/op 1.25
send data - 1000 256B messages 19.850 ms/op 11.816 ms/op 1.68
send data - 1000 512B messages 25.982 ms/op 15.644 ms/op 1.66
send data - 1000 1024B messages 40.123 ms/op 24.787 ms/op 1.62
send data - 1000 1200B messages 26.866 ms/op 18.404 ms/op 1.46
send data - 1000 2048B messages 27.235 ms/op 23.405 ms/op 1.16
send data - 1000 4096B messages 36.915 ms/op 23.880 ms/op 1.55
send data - 1000 16384B messages 81.524 ms/op 54.052 ms/op 1.51
send data - 1000 65536B messages 297.79 ms/op 236.15 ms/op 1.26
enrSubnets - fastDeserialize 64 bits 1.3370 us/op 892.00 ns/op 1.50
enrSubnets - ssz BitVector 64 bits 470.00 ns/op 352.00 ns/op 1.34
enrSubnets - fastDeserialize 4 bits 193.00 ns/op 140.00 ns/op 1.38
enrSubnets - ssz BitVector 4 bits 437.00 ns/op 355.00 ns/op 1.23
prioritizePeers score -10:0 att 32-0.1 sync 2-0 108.94 us/op 70.382 us/op 1.55
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 135.74 us/op 90.738 us/op 1.50
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 179.74 us/op 122.93 us/op 1.46
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 317.49 us/op 217.89 us/op 1.46
prioritizePeers score 0:0 att 64-1 sync 4-1 366.55 us/op 233.96 us/op 1.57
array of 16000 items push then shift 1.6682 us/op 1.2766 us/op 1.31
LinkedList of 16000 items push then shift 9.3490 ns/op 9.4180 ns/op 0.99
array of 16000 items push then pop 93.636 ns/op 94.076 ns/op 1.00
LinkedList of 16000 items push then pop 9.1850 ns/op 6.2070 ns/op 1.48
array of 24000 items push then shift 2.4908 us/op 2.1061 us/op 1.18
LinkedList of 24000 items push then shift 9.2130 ns/op 6.9430 ns/op 1.33
array of 24000 items push then pop 130.77 ns/op 122.54 ns/op 1.07
LinkedList of 24000 items push then pop 8.8430 ns/op 6.4850 ns/op 1.36
intersect bitArray bitLen 8 6.9500 ns/op 6.6400 ns/op 1.05
intersect array and set length 8 56.892 ns/op 41.778 ns/op 1.36
intersect bitArray bitLen 128 32.759 ns/op 26.299 ns/op 1.25
intersect array and set length 128 855.19 ns/op 609.03 ns/op 1.40
bitArray.getTrueBitIndexes() bitLen 128 1.6990 us/op 1.2620 us/op 1.35
bitArray.getTrueBitIndexes() bitLen 248 2.8570 us/op 2.1990 us/op 1.30
bitArray.getTrueBitIndexes() bitLen 512 5.5350 us/op 3.8630 us/op 1.43
Buffer.concat 32 items 971.00 ns/op 761.00 ns/op 1.28
Uint8Array.set 32 items 1.8740 us/op 1.7670 us/op 1.06
Set add up to 64 items then delete first 4.4591 us/op 1.7279 us/op 2.58
OrderedSet add up to 64 items then delete first 6.0526 us/op 2.6265 us/op 2.30
Set add up to 64 items then delete last 4.9776 us/op 1.9922 us/op 2.50
OrderedSet add up to 64 items then delete last 6.3084 us/op 3.2016 us/op 1.97
Set add up to 64 items then delete middle 5.0971 us/op 2.2906 us/op 2.23
OrderedSet add up to 64 items then delete middle 7.6877 us/op 4.7460 us/op 1.62
Set add up to 128 items then delete first 9.9890 us/op 4.6894 us/op 2.13
OrderedSet add up to 128 items then delete first 13.637 us/op 7.8633 us/op 1.73
Set add up to 128 items then delete last 9.9696 us/op 4.4110 us/op 2.26
OrderedSet add up to 128 items then delete last 13.194 us/op 7.0295 us/op 1.88
Set add up to 128 items then delete middle 10.068 us/op 4.9871 us/op 2.02
OrderedSet add up to 128 items then delete middle 18.581 us/op 11.896 us/op 1.56
Set add up to 256 items then delete first 20.400 us/op 9.2175 us/op 2.21
OrderedSet add up to 256 items then delete first 28.533 us/op 13.094 us/op 2.18
Set add up to 256 items then delete last 20.239 us/op 7.6799 us/op 2.64
OrderedSet add up to 256 items then delete last 26.220 us/op 11.295 us/op 2.32
Set add up to 256 items then delete middle 20.512 us/op 7.3137 us/op 2.80
OrderedSet add up to 256 items then delete middle 49.340 us/op 31.463 us/op 1.57
transfer serialized Status (84 B) 1.8780 us/op 1.4330 us/op 1.31
copy serialized Status (84 B) 1.6130 us/op 1.2900 us/op 1.25
transfer serialized SignedVoluntaryExit (112 B) 2.0860 us/op 1.5950 us/op 1.31
copy serialized SignedVoluntaryExit (112 B) 1.5520 us/op 1.3980 us/op 1.11
transfer serialized ProposerSlashing (416 B) 2.1240 us/op 1.9310 us/op 1.10
copy serialized ProposerSlashing (416 B) 3.0240 us/op 1.8170 us/op 1.66
transfer serialized Attestation (485 B) 3.2680 us/op 1.8900 us/op 1.73
copy serialized Attestation (485 B) 2.9790 us/op 2.0260 us/op 1.47
transfer serialized AttesterSlashing (33232 B) 2.8340 us/op 2.2270 us/op 1.27
copy serialized AttesterSlashing (33232 B) 7.7040 us/op 3.9530 us/op 1.95
transfer serialized Small SignedBeaconBlock (128000 B) 3.1230 us/op 1.9170 us/op 1.63
copy serialized Small SignedBeaconBlock (128000 B) 19.723 us/op 7.7500 us/op 2.54
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5970 us/op 1.5800 us/op 2.28
copy serialized Avg SignedBeaconBlock (200000 B) 30.580 us/op 10.228 us/op 2.99
transfer serialized BlobsSidecar (524380 B) 3.2790 us/op 2.1090 us/op 1.55
copy serialized BlobsSidecar (524380 B) 105.23 us/op 75.880 us/op 1.39
transfer serialized Big SignedBeaconBlock (1000000 B) 3.8080 us/op 2.6020 us/op 1.46
copy serialized Big SignedBeaconBlock (1000000 B) 185.65 us/op 126.71 us/op 1.47
pass gossip attestations to forkchoice per slot 3.9818 ms/op 2.6534 ms/op 1.50
forkChoice updateHead vc 100000 bc 64 eq 0 710.18 us/op 610.78 us/op 1.16
forkChoice updateHead vc 600000 bc 64 eq 0 6.7256 ms/op 2.9835 ms/op 2.25
forkChoice updateHead vc 1000000 bc 64 eq 0 7.9922 ms/op 4.4434 ms/op 1.80
forkChoice updateHead vc 600000 bc 320 eq 0 4.8523 ms/op 2.7525 ms/op 1.76
forkChoice updateHead vc 600000 bc 1200 eq 0 5.1914 ms/op 2.8091 ms/op 1.85
forkChoice updateHead vc 600000 bc 7200 eq 0 6.2158 ms/op 3.5721 ms/op 1.74
forkChoice updateHead vc 600000 bc 64 eq 1000 11.711 ms/op 10.264 ms/op 1.14
forkChoice updateHead vc 600000 bc 64 eq 10000 12.807 ms/op 10.059 ms/op 1.27
forkChoice updateHead vc 600000 bc 64 eq 300000 40.500 ms/op 13.184 ms/op 3.07
computeDeltas 500000 validators 300 proto nodes 6.7661 ms/op 3.1264 ms/op 2.16
computeDeltas 500000 validators 1200 proto nodes 6.6640 ms/op 3.2184 ms/op 2.07
computeDeltas 500000 validators 7200 proto nodes 6.8053 ms/op 3.2524 ms/op 2.09
computeDeltas 750000 validators 300 proto nodes 9.7865 ms/op 4.8328 ms/op 2.03
computeDeltas 750000 validators 1200 proto nodes 9.9604 ms/op 4.8300 ms/op 2.06
computeDeltas 750000 validators 7200 proto nodes 10.236 ms/op 4.6671 ms/op 2.19
computeDeltas 1400000 validators 300 proto nodes 18.293 ms/op 8.9300 ms/op 2.05
computeDeltas 1400000 validators 1200 proto nodes 17.981 ms/op 8.8267 ms/op 2.04
computeDeltas 1400000 validators 7200 proto nodes 17.727 ms/op 8.8295 ms/op 2.01
computeDeltas 2100000 validators 300 proto nodes 26.943 ms/op 15.088 ms/op 1.79
computeDeltas 2100000 validators 1200 proto nodes 26.772 ms/op 14.543 ms/op 1.84
computeDeltas 2100000 validators 7200 proto nodes 26.149 ms/op 14.432 ms/op 1.81
computeProposerBoostScoreFromBalances 500000 validators 3.1873 ms/op 2.9537 ms/op 1.08
computeProposerBoostScoreFromBalances 750000 validators 3.3240 ms/op 2.8644 ms/op 1.16
computeProposerBoostScoreFromBalances 1400000 validators 3.3110 ms/op 2.8558 ms/op 1.16
computeProposerBoostScoreFromBalances 2100000 validators 3.2689 ms/op 2.8087 ms/op 1.16
altair processAttestation - 250000 vs - 7PWei normalcase 2.7887 ms/op 2.4225 ms/op 1.15
altair processAttestation - 250000 vs - 7PWei worstcase 3.8456 ms/op 2.2033 ms/op 1.75
altair processAttestation - setStatus - 1/6 committees join 172.73 us/op 105.11 us/op 1.64
altair processAttestation - setStatus - 1/3 committees join 337.10 us/op 200.50 us/op 1.68
altair processAttestation - setStatus - 1/2 committees join 456.09 us/op 301.65 us/op 1.51
altair processAttestation - setStatus - 2/3 committees join 566.64 us/op 381.03 us/op 1.49
altair processAttestation - setStatus - 4/5 committees join 789.46 us/op 498.07 us/op 1.59
altair processAttestation - setStatus - 100% committees join 909.90 us/op 593.97 us/op 1.53
altair processBlock - 250000 vs - 7PWei normalcase 8.1572 ms/op 5.1506 ms/op 1.58
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.337 ms/op 22.078 ms/op 1.33
altair processBlock - 250000 vs - 7PWei worstcase 42.749 ms/op 31.736 ms/op 1.35
altair processBlock - 250000 vs - 7PWei worstcase hashState 85.131 ms/op 74.262 ms/op 1.15
phase0 processBlock - 250000 vs - 7PWei normalcase 2.7601 ms/op 2.2119 ms/op 1.25
phase0 processBlock - 250000 vs - 7PWei worstcase 31.077 ms/op 27.314 ms/op 1.14
altair processEth1Data - 250000 vs - 7PWei normalcase 524.48 us/op 417.90 us/op 1.26
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 10.630 us/op 7.3090 us/op 1.45
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 79.759 us/op 49.157 us/op 1.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.313 us/op 13.435 us/op 1.36
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 12.875 us/op 6.8790 us/op 1.87
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 131.50 us/op 108.55 us/op 1.21
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0886 ms/op 839.04 us/op 1.30
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9245 ms/op 1.1253 ms/op 1.71
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8174 ms/op 1.0111 ms/op 1.80
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.3482 ms/op 2.8004 ms/op 1.20
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.8332 ms/op 1.4960 ms/op 1.89
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.9981 ms/op 4.3036 ms/op 1.16
Tree 40 250000 create 320.69 ms/op 232.40 ms/op 1.38
Tree 40 250000 get(125000) 190.07 ns/op 118.35 ns/op 1.61
Tree 40 250000 set(125000) 898.91 ns/op 666.98 ns/op 1.35
Tree 40 250000 toArray() 17.515 ms/op 21.109 ms/op 0.83
Tree 40 250000 iterate all - toArray() + loop 16.999 ms/op 24.004 ms/op 0.71
Tree 40 250000 iterate all - get(i) 63.236 ms/op 57.856 ms/op 1.09
MutableVector 250000 create 10.532 ms/op 9.1075 ms/op 1.16
MutableVector 250000 get(125000) 6.3190 ns/op 6.0170 ns/op 1.05
MutableVector 250000 set(125000) 257.03 ns/op 235.81 ns/op 1.09
MutableVector 250000 toArray() 3.1287 ms/op 2.5841 ms/op 1.21
MutableVector 250000 iterate all - toArray() + loop 2.8812 ms/op 2.3417 ms/op 1.23
MutableVector 250000 iterate all - get(i) 1.5012 ms/op 1.6387 ms/op 0.92
Array 250000 create 2.5267 ms/op 2.4975 ms/op 1.01
Array 250000 clone - spread 924.51 us/op 857.09 us/op 1.08
Array 250000 get(125000) 0.47700 ns/op 0.43500 ns/op 1.10
Array 250000 set(125000) 0.55400 ns/op 0.50200 ns/op 1.10
Array 250000 iterate all - loop 79.537 us/op 79.829 us/op 1.00
effectiveBalanceIncrements clone Uint8Array 300000 19.672 us/op 23.739 us/op 0.83
effectiveBalanceIncrements clone MutableVector 300000 252.00 ns/op 203.00 ns/op 1.24
effectiveBalanceIncrements rw all Uint8Array 300000 172.82 us/op 170.45 us/op 1.01
effectiveBalanceIncrements rw all MutableVector 300000 72.566 ms/op 59.620 ms/op 1.22
phase0 afterProcessEpoch - 250000 vs - 7PWei 108.06 ms/op 76.675 ms/op 1.41
phase0 beforeProcessEpoch - 250000 vs - 7PWei 38.507 ms/op 35.438 ms/op 1.09
altair processEpoch - mainnet_e81889 434.80 ms/op 363.98 ms/op 1.19
mainnet_e81889 - altair beforeProcessEpoch 58.991 ms/op 54.401 ms/op 1.08
mainnet_e81889 - altair processJustificationAndFinalization 13.586 us/op 6.9710 us/op 1.95
mainnet_e81889 - altair processInactivityUpdates 6.5360 ms/op 6.6337 ms/op 0.99
mainnet_e81889 - altair processRewardsAndPenalties 51.974 ms/op 56.060 ms/op 0.93
mainnet_e81889 - altair processRegistryUpdates 2.1860 us/op 2.0280 us/op 1.08
mainnet_e81889 - altair processSlashings 528.00 ns/op 359.00 ns/op 1.47
mainnet_e81889 - altair processEth1DataReset 422.00 ns/op 308.00 ns/op 1.37
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2345 ms/op 1.0212 ms/op 1.21
mainnet_e81889 - altair processSlashingsReset 3.7520 us/op 3.5480 us/op 1.06
mainnet_e81889 - altair processRandaoMixesReset 4.2140 us/op 6.8720 us/op 0.61
mainnet_e81889 - altair processHistoricalRootsUpdate 1.4000 us/op 672.00 ns/op 2.08
mainnet_e81889 - altair processParticipationFlagUpdates 1.8050 us/op 2.3100 us/op 0.78
mainnet_e81889 - altair processSyncCommitteeUpdates 898.00 ns/op 828.00 ns/op 1.08
mainnet_e81889 - altair afterProcessEpoch 121.24 ms/op 95.210 ms/op 1.27
capella processEpoch - mainnet_e217614 1.5656 s/op 1.6677 s/op 0.94
mainnet_e217614 - capella beforeProcessEpoch 252.93 ms/op 287.44 ms/op 0.88
mainnet_e217614 - capella processJustificationAndFinalization 17.338 us/op 10.358 us/op 1.67
mainnet_e217614 - capella processInactivityUpdates 20.893 ms/op 18.232 ms/op 1.15
mainnet_e217614 - capella processRewardsAndPenalties 268.19 ms/op 243.69 ms/op 1.10
mainnet_e217614 - capella processRegistryUpdates 32.959 us/op 8.4180 us/op 3.92
mainnet_e217614 - capella processSlashings 1.0920 us/op 303.00 ns/op 3.60
mainnet_e217614 - capella processEth1DataReset 947.00 ns/op 321.00 ns/op 2.95
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.3766 ms/op 3.2569 ms/op 1.34
mainnet_e217614 - capella processSlashingsReset 5.8880 us/op 3.9290 us/op 1.50
mainnet_e217614 - capella processRandaoMixesReset 7.5000 us/op 2.1750 us/op 3.45
mainnet_e217614 - capella processHistoricalRootsUpdate 1.1530 us/op 303.00 ns/op 3.81
mainnet_e217614 - capella processParticipationFlagUpdates 3.6190 us/op 697.00 ns/op 5.19
mainnet_e217614 - capella afterProcessEpoch 319.62 ms/op 216.27 ms/op 1.48
phase0 processEpoch - mainnet_e58758 443.96 ms/op 330.51 ms/op 1.34
mainnet_e58758 - phase0 beforeProcessEpoch 116.39 ms/op 100.16 ms/op 1.16
mainnet_e58758 - phase0 processJustificationAndFinalization 16.411 us/op 7.7160 us/op 2.13
mainnet_e58758 - phase0 processRewardsAndPenalties 51.998 ms/op 47.782 ms/op 1.09
mainnet_e58758 - phase0 processRegistryUpdates 10.355 us/op 5.7020 us/op 1.82
mainnet_e58758 - phase0 processSlashings 561.00 ns/op 321.00 ns/op 1.75
mainnet_e58758 - phase0 processEth1DataReset 440.00 ns/op 437.00 ns/op 1.01
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0315 ms/op 836.89 us/op 1.23
mainnet_e58758 - phase0 processSlashingsReset 2.7650 us/op 2.3310 us/op 1.19
mainnet_e58758 - phase0 processRandaoMixesReset 4.0630 us/op 4.9350 us/op 0.82
mainnet_e58758 - phase0 processHistoricalRootsUpdate 519.00 ns/op 521.00 ns/op 1.00
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.5030 us/op 4.0780 us/op 1.35
mainnet_e58758 - phase0 afterProcessEpoch 100.26 ms/op 86.327 ms/op 1.16
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2419 ms/op 1.3190 ms/op 0.94
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4433 ms/op 1.2567 ms/op 1.15
altair processInactivityUpdates - 250000 normalcase 22.482 ms/op 16.189 ms/op 1.39
altair processInactivityUpdates - 250000 worstcase 19.574 ms/op 15.210 ms/op 1.29
phase0 processRegistryUpdates - 250000 normalcase 8.7080 us/op 11.141 us/op 0.78
phase0 processRegistryUpdates - 250000 badcase_full_deposits 350.38 us/op 284.00 us/op 1.23
phase0 processRegistryUpdates - 250000 worstcase 0.5 140.38 ms/op 103.77 ms/op 1.35
altair processRewardsAndPenalties - 250000 normalcase 62.915 ms/op 53.722 ms/op 1.17
altair processRewardsAndPenalties - 250000 worstcase 60.530 ms/op 61.615 ms/op 0.98
phase0 getAttestationDeltas - 250000 normalcase 7.9735 ms/op 7.3499 ms/op 1.08
phase0 getAttestationDeltas - 250000 worstcase 7.7985 ms/op 7.2117 ms/op 1.08
phase0 processSlashings - 250000 worstcase 2.4917 ms/op 1.7090 ms/op 1.46
altair processSyncCommitteeUpdates - 250000 154.48 ms/op 118.74 ms/op 1.30
BeaconState.hashTreeRoot - No change 322.00 ns/op 238.00 ns/op 1.35
BeaconState.hashTreeRoot - 1 full validator 148.13 us/op 150.91 us/op 0.98
BeaconState.hashTreeRoot - 32 full validator 1.8046 ms/op 1.7209 ms/op 1.05
BeaconState.hashTreeRoot - 512 full validator 14.901 ms/op 19.687 ms/op 0.76
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 155.87 us/op 225.79 us/op 0.69
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8957 ms/op 2.3327 ms/op 0.81
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 30.315 ms/op 25.672 ms/op 1.18
BeaconState.hashTreeRoot - 1 balances 141.56 us/op 136.49 us/op 1.04
BeaconState.hashTreeRoot - 32 balances 1.0748 ms/op 811.28 us/op 1.32
BeaconState.hashTreeRoot - 512 balances 9.9096 ms/op 7.4329 ms/op 1.33
BeaconState.hashTreeRoot - 250000 balances 175.39 ms/op 171.07 ms/op 1.03
aggregationBits - 2048 els - zipIndexesInBitList 15.941 us/op 10.288 us/op 1.55
regular array get 100000 times 33.167 us/op 32.500 us/op 1.02
wrappedArray get 100000 times 33.302 us/op 31.621 us/op 1.05
arrayWithProxy get 100000 times 15.446 ms/op 11.401 ms/op 1.35
ssz.Root.equals 205.00 ns/op 151.00 ns/op 1.36
byteArrayEquals 202.00 ns/op 152.00 ns/op 1.33
shuffle list - 16384 els 6.8493 ms/op 4.8566 ms/op 1.41
shuffle list - 250000 els 101.50 ms/op 71.687 ms/op 1.42
processSlot - 1 slots 16.982 us/op 13.698 us/op 1.24
processSlot - 32 slots 4.2318 ms/op 4.3534 ms/op 0.97
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 53.823 ms/op 43.003 ms/op 1.25
getCommitteeAssignments - req 1 vs - 250000 vc 2.5193 ms/op 2.3126 ms/op 1.09
getCommitteeAssignments - req 100 vs - 250000 vc 3.6972 ms/op 3.4210 ms/op 1.08
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0291 ms/op 3.6462 ms/op 1.11
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.9600 ns/op 3.6800 ns/op 1.35
state getBlockRootAtSlot - 250000 vs - 7PWei 671.21 ns/op 359.01 ns/op 1.87
computeProposers - vc 250000 8.9542 ms/op 6.4438 ms/op 1.39
computeEpochShuffling - vc 250000 102.39 ms/op 68.306 ms/op 1.50
getNextSyncCommittee - vc 250000 149.23 ms/op 116.91 ms/op 1.28
computeSigningRoot for AttestationData 25.401 us/op 24.245 us/op 1.05
hash AttestationData serialized data then Buffer.toString(base64) 2.3056 us/op 1.2431 us/op 1.85
toHexString serialized data 1.0821 us/op 812.34 ns/op 1.33
Buffer.toString(base64) 227.11 ns/op 143.47 ns/op 1.58

Please sign in to comment.