Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect variable access #6862

Merged
merged 1 commit into from
Jun 9, 2024
Merged

Conversation

jeluard
Copy link
Contributor

@jeluard jeluard commented Jun 7, 2024

Motivation

Make sure all variable access are correct. Took this opportunity to explicitly implement the DataTransform interface.

@jeluard jeluard requested a review from a team as a code owner June 7, 2024 13:08
if (data.length > this.maxSizePerMessage) {
throw Error(`ssz_snappy encoded data length ${length} > ${this.maxSizePerMessage}`);
throw Error(`ssz_snappy encoded data length ${data.length} > ${this.maxSizePerMessage}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

window.length was used instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

how was the code was compiled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is because we include dom lib in our tsconfig.build.json.

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 62.20%. Comparing base (82a9384) to head (0ac6d36).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6862      +/-   ##
============================================
- Coverage     62.20%   62.20%   -0.01%     
============================================
  Files           571      571              
  Lines         60021    60022       +1     
  Branches       1976     1973       -3     
============================================
  Hits          37334    37334              
- Misses        22644    22645       +1     
  Partials         43       43              

Copy link
Contributor

github-actions bot commented Jun 7, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 82da8f0 Previous: 82a9384 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 951.58 us/op 534.00 us/op 1.78
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 96.916 us/op 68.565 us/op 1.41
BLS verify - blst-native 1.2750 ms/op 1.2832 ms/op 0.99
BLS verifyMultipleSignatures 3 - blst-native 2.7010 ms/op 2.7040 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 5.9618 ms/op 6.0074 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst-native 22.351 ms/op 22.150 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst-native 46.116 ms/op 45.127 ms/op 1.02
BLS verifyMultipleSignatures 128 - blst-native 86.233 ms/op 89.547 ms/op 0.96
BLS deserializing 10000 signatures 931.56 ms/op 916.69 ms/op 1.02
BLS deserializing 100000 signatures 9.3674 s/op 8.9982 s/op 1.04
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2803 ms/op 1.2915 ms/op 0.99
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.6375 ms/op 1.5838 ms/op 1.03
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2739 ms/op 2.4013 ms/op 0.95
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.4074 ms/op 3.3408 ms/op 1.32
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.7027 ms/op 5.5426 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 25.892 us/op 26.063 us/op 0.99
BLS aggregatePubkeys 128 - blst-native 96.515 us/op 101.97 us/op 0.95
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 93.303 ms/op 62.317 ms/op 1.50
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 70.926 ms/op 55.557 ms/op 1.28
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 40.335 ms/op 36.440 ms/op 1.11
getSlashingsAndExits - default max 224.71 us/op 95.664 us/op 2.35
getSlashingsAndExits - 2k 466.96 us/op 298.54 us/op 1.56
proposeBlockBody type=full, size=empty 7.1741 ms/op 5.3466 ms/op 1.34
isKnown best case - 1 super set check 651.00 ns/op 315.00 ns/op 2.07
isKnown normal case - 2 super set checks 712.00 ns/op 313.00 ns/op 2.27
isKnown worse case - 16 super set checks 736.00 ns/op 379.00 ns/op 1.94
InMemoryCheckpointStateCache - add get delete 6.8540 us/op 5.3020 us/op 1.29
validate api signedAggregateAndProof - struct 2.9451 ms/op 2.6469 ms/op 1.11
validate gossip signedAggregateAndProof - struct 2.7507 ms/op 2.6130 ms/op 1.05
validate gossip attestation - vc 640000 1.4869 ms/op 1.3112 ms/op 1.13
batch validate gossip attestation - vc 640000 - chunk 32 189.30 us/op 156.54 us/op 1.21
batch validate gossip attestation - vc 640000 - chunk 64 166.92 us/op 136.04 us/op 1.23
batch validate gossip attestation - vc 640000 - chunk 128 160.89 us/op 124.18 us/op 1.30
batch validate gossip attestation - vc 640000 - chunk 256 155.39 us/op 120.85 us/op 1.29
pickEth1Vote - no votes 1.6744 ms/op 1.0209 ms/op 1.64
pickEth1Vote - max votes 13.155 ms/op 10.816 ms/op 1.22
pickEth1Vote - Eth1Data hashTreeRoot value x2048 20.908 ms/op 15.354 ms/op 1.36
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 29.817 ms/op 20.695 ms/op 1.44
pickEth1Vote - Eth1Data fastSerialize value x2048 708.27 us/op 500.79 us/op 1.41
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.9572 ms/op 6.1128 ms/op 0.97
bytes32 toHexString 815.00 ns/op 452.00 ns/op 1.80
bytes32 Buffer.toString(hex) 290.00 ns/op 246.00 ns/op 1.18
bytes32 Buffer.toString(hex) from Uint8Array 535.00 ns/op 338.00 ns/op 1.58
bytes32 Buffer.toString(hex) + 0x 317.00 ns/op 253.00 ns/op 1.25
Object access 1 prop 0.22600 ns/op 0.13800 ns/op 1.64
Map access 1 prop 0.16300 ns/op 0.13200 ns/op 1.23
Object get x1000 7.3310 ns/op 5.8850 ns/op 1.25
Map get x1000 8.6380 ns/op 6.5950 ns/op 1.31
Object set x1000 66.704 ns/op 32.955 ns/op 2.02
Map set x1000 43.339 ns/op 21.953 ns/op 1.97
Return object 10000 times 0.39190 ns/op 0.28620 ns/op 1.37
Throw Error 10000 times 4.1391 us/op 3.3667 us/op 1.23
fastMsgIdFn sha256 / 200 bytes 2.5960 us/op 2.1930 us/op 1.18
fastMsgIdFn h32 xxhash / 200 bytes 325.00 ns/op 228.00 ns/op 1.43
fastMsgIdFn h64 xxhash / 200 bytes 308.00 ns/op 269.00 ns/op 1.14
fastMsgIdFn sha256 / 1000 bytes 8.9520 us/op 7.2130 us/op 1.24
fastMsgIdFn h32 xxhash / 1000 bytes 509.00 ns/op 367.00 ns/op 1.39
fastMsgIdFn h64 xxhash / 1000 bytes 432.00 ns/op 339.00 ns/op 1.27
fastMsgIdFn sha256 / 10000 bytes 67.639 us/op 63.257 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 2.2580 us/op 1.8890 us/op 1.20
fastMsgIdFn h64 xxhash / 10000 bytes 1.4840 us/op 1.2360 us/op 1.20
send data - 1000 256B messages 20.657 ms/op 13.583 ms/op 1.52
send data - 1000 512B messages 23.446 ms/op 17.696 ms/op 1.32
send data - 1000 1024B messages 34.574 ms/op 27.669 ms/op 1.25
send data - 1000 1200B messages 37.270 ms/op 27.193 ms/op 1.37
send data - 1000 2048B messages 42.367 ms/op 31.651 ms/op 1.34
send data - 1000 4096B messages 39.396 ms/op 32.789 ms/op 1.20
send data - 1000 16384B messages 86.605 ms/op 73.959 ms/op 1.17
send data - 1000 65536B messages 259.01 ms/op 208.98 ms/op 1.24
enrSubnets - fastDeserialize 64 bits 1.5650 us/op 1.0060 us/op 1.56
enrSubnets - ssz BitVector 64 bits 515.00 ns/op 344.00 ns/op 1.50
enrSubnets - fastDeserialize 4 bits 202.00 ns/op 142.00 ns/op 1.42
enrSubnets - ssz BitVector 4 bits 475.00 ns/op 347.00 ns/op 1.37
prioritizePeers score -10:0 att 32-0.1 sync 2-0 247.31 us/op 147.06 us/op 1.68
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 258.48 us/op 192.14 us/op 1.35
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 370.36 us/op 332.47 us/op 1.11
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 526.81 us/op 524.98 us/op 1.00
prioritizePeers score 0:0 att 64-1 sync 4-1 744.69 us/op 857.48 us/op 0.87
array of 16000 items push then shift 1.7651 us/op 1.6721 us/op 1.06
LinkedList of 16000 items push then shift 7.9810 ns/op 7.1960 ns/op 1.11
array of 16000 items push then pop 126.19 ns/op 122.38 ns/op 1.03
LinkedList of 16000 items push then pop 7.4820 ns/op 7.0740 ns/op 1.06
array of 24000 items push then shift 2.5496 us/op 2.4427 us/op 1.04
LinkedList of 24000 items push then shift 7.5790 ns/op 7.7210 ns/op 0.98
array of 24000 items push then pop 173.85 ns/op 166.84 ns/op 1.04
LinkedList of 24000 items push then pop 7.4880 ns/op 7.4100 ns/op 1.01
intersect bitArray bitLen 8 6.8390 ns/op 6.5290 ns/op 1.05
intersect array and set length 8 51.709 ns/op 47.558 ns/op 1.09
intersect bitArray bitLen 128 31.470 ns/op 29.842 ns/op 1.05
intersect array and set length 128 742.00 ns/op 684.82 ns/op 1.08
bitArray.getTrueBitIndexes() bitLen 128 2.2060 us/op 2.2450 us/op 0.98
bitArray.getTrueBitIndexes() bitLen 248 3.4500 us/op 4.4650 us/op 0.77
bitArray.getTrueBitIndexes() bitLen 512 8.9500 us/op 8.6140 us/op 1.04
Buffer.concat 32 items 997.00 ns/op 957.00 ns/op 1.04
Uint8Array.set 32 items 1.8280 us/op 1.8390 us/op 0.99
Buffer.copy 2.1020 us/op 1.9570 us/op 1.07
Uint8Array.set - with subarray 3.5690 us/op 3.2910 us/op 1.08
Uint8Array.set - without subarray 1.6700 us/op 2.1040 us/op 0.79
Set add up to 64 items then delete first 2.4147 us/op 2.2545 us/op 1.07
OrderedSet add up to 64 items then delete first 3.7249 us/op 3.5074 us/op 1.06
Set add up to 64 items then delete last 2.7431 us/op 2.6832 us/op 1.02
OrderedSet add up to 64 items then delete last 4.4376 us/op 3.7847 us/op 1.17
Set add up to 64 items then delete middle 3.0934 us/op 2.5267 us/op 1.22
OrderedSet add up to 64 items then delete middle 6.3349 us/op 5.3446 us/op 1.19
Set add up to 128 items then delete first 6.6564 us/op 5.2126 us/op 1.28
OrderedSet add up to 128 items then delete first 10.325 us/op 8.0151 us/op 1.29
Set add up to 128 items then delete last 5.7801 us/op 5.2021 us/op 1.11
OrderedSet add up to 128 items then delete last 8.9125 us/op 7.6805 us/op 1.16
Set add up to 128 items then delete middle 5.9857 us/op 4.9919 us/op 1.20
OrderedSet add up to 128 items then delete middle 15.842 us/op 14.311 us/op 1.11
Set add up to 256 items then delete first 12.578 us/op 10.718 us/op 1.17
OrderedSet add up to 256 items then delete first 21.335 us/op 15.587 us/op 1.37
Set add up to 256 items then delete last 12.242 us/op 9.5885 us/op 1.28
OrderedSet add up to 256 items then delete last 17.833 us/op 15.675 us/op 1.14
Set add up to 256 items then delete middle 11.075 us/op 10.132 us/op 1.09
OrderedSet add up to 256 items then delete middle 43.947 us/op 41.934 us/op 1.05
transfer serialized Status (84 B) 1.3640 us/op 1.3010 us/op 1.05
copy serialized Status (84 B) 1.1570 us/op 1.1150 us/op 1.04
transfer serialized SignedVoluntaryExit (112 B) 1.4470 us/op 1.3540 us/op 1.07
copy serialized SignedVoluntaryExit (112 B) 1.1490 us/op 1.1570 us/op 0.99
transfer serialized ProposerSlashing (416 B) 1.5810 us/op 1.5230 us/op 1.04
copy serialized ProposerSlashing (416 B) 1.6210 us/op 1.4670 us/op 1.10
transfer serialized Attestation (485 B) 1.6930 us/op 2.6150 us/op 0.65
copy serialized Attestation (485 B) 1.6300 us/op 1.6260 us/op 1.00
transfer serialized AttesterSlashing (33232 B) 2.4830 us/op 1.6270 us/op 1.53
copy serialized AttesterSlashing (33232 B) 5.8700 us/op 4.8740 us/op 1.20
transfer serialized Small SignedBeaconBlock (128000 B) 3.1080 us/op 2.4730 us/op 1.26
copy serialized Small SignedBeaconBlock (128000 B) 15.082 us/op 17.417 us/op 0.87
transfer serialized Avg SignedBeaconBlock (200000 B) 3.8700 us/op 2.9650 us/op 1.31
copy serialized Avg SignedBeaconBlock (200000 B) 22.843 us/op 25.211 us/op 0.91
transfer serialized BlobsSidecar (524380 B) 3.4540 us/op 3.8200 us/op 0.90
copy serialized BlobsSidecar (524380 B) 79.264 us/op 80.282 us/op 0.99
transfer serialized Big SignedBeaconBlock (1000000 B) 3.3150 us/op 3.8810 us/op 0.85
copy serialized Big SignedBeaconBlock (1000000 B) 178.25 us/op 153.56 us/op 1.16
pass gossip attestations to forkchoice per slot 3.1316 ms/op 3.1354 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 512.70 us/op 500.91 us/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 0 3.1708 ms/op 3.0464 ms/op 1.04
forkChoice updateHead vc 1000000 bc 64 eq 0 5.5657 ms/op 5.3483 ms/op 1.04
forkChoice updateHead vc 600000 bc 320 eq 0 3.1536 ms/op 3.0837 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 3.3256 ms/op 3.1002 ms/op 1.07
forkChoice updateHead vc 600000 bc 7200 eq 0 4.3990 ms/op 4.0308 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 1000 10.637 ms/op 10.663 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 10.707 ms/op 10.831 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 300000 15.952 ms/op 14.500 ms/op 1.10
computeDeltas 500000 validators 300 proto nodes 4.0547 ms/op 3.6549 ms/op 1.11
computeDeltas 500000 validators 1200 proto nodes 4.1797 ms/op 3.7242 ms/op 1.12
computeDeltas 500000 validators 7200 proto nodes 4.3902 ms/op 3.8297 ms/op 1.15
computeDeltas 750000 validators 300 proto nodes 6.7142 ms/op 5.4674 ms/op 1.23
computeDeltas 750000 validators 1200 proto nodes 6.0584 ms/op 5.2334 ms/op 1.16
computeDeltas 750000 validators 7200 proto nodes 6.1063 ms/op 5.0755 ms/op 1.20
computeDeltas 1400000 validators 300 proto nodes 12.108 ms/op 9.9390 ms/op 1.22
computeDeltas 1400000 validators 1200 proto nodes 10.884 ms/op 9.9164 ms/op 1.10
computeDeltas 1400000 validators 7200 proto nodes 10.829 ms/op 10.066 ms/op 1.08
computeDeltas 2100000 validators 300 proto nodes 16.266 ms/op 14.676 ms/op 1.11
computeDeltas 2100000 validators 1200 proto nodes 15.994 ms/op 15.141 ms/op 1.06
computeDeltas 2100000 validators 7200 proto nodes 15.947 ms/op 14.687 ms/op 1.09
altair processAttestation - 250000 vs - 7PWei normalcase 1.9791 ms/op 1.5699 ms/op 1.26
altair processAttestation - 250000 vs - 7PWei worstcase 3.1053 ms/op 2.4561 ms/op 1.26
altair processAttestation - setStatus - 1/6 committees join 98.061 us/op 88.778 us/op 1.10
altair processAttestation - setStatus - 1/3 committees join 190.62 us/op 177.49 us/op 1.07
altair processAttestation - setStatus - 1/2 committees join 255.35 us/op 248.50 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 332.58 us/op 325.78 us/op 1.02
altair processAttestation - setStatus - 4/5 committees join 489.49 us/op 470.55 us/op 1.04
altair processAttestation - setStatus - 100% committees join 600.70 us/op 560.34 us/op 1.07
altair processBlock - 250000 vs - 7PWei normalcase 4.1153 ms/op 3.5063 ms/op 1.17
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.595 ms/op 32.983 ms/op 0.78
altair processBlock - 250000 vs - 7PWei worstcase 46.032 ms/op 49.244 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 84.607 ms/op 89.305 ms/op 0.95
phase0 processBlock - 250000 vs - 7PWei normalcase 2.1301 ms/op 2.3992 ms/op 0.89
phase0 processBlock - 250000 vs - 7PWei worstcase 28.220 ms/op 28.683 ms/op 0.98
altair processEth1Data - 250000 vs - 7PWei normalcase 341.86 us/op 301.22 us/op 1.13
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.1360 us/op 7.2710 us/op 0.84
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 24.632 us/op 28.135 us/op 0.88
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.064 us/op 10.793 us/op 0.93
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.1310 us/op 8.4280 us/op 0.85
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 111.63 us/op 119.44 us/op 0.93
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 827.03 us/op 1.1440 ms/op 0.72
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1054 ms/op 1.5190 ms/op 0.73
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.0748 ms/op 1.5798 ms/op 0.68
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3886 ms/op 2.0851 ms/op 1.15
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2343 ms/op 1.5883 ms/op 1.41
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6882 ms/op 3.4237 ms/op 1.08
Tree 40 250000 create 275.03 ms/op 211.87 ms/op 1.30
Tree 40 250000 get(125000) 157.07 ns/op 139.64 ns/op 1.12
Tree 40 250000 set(125000) 723.85 ns/op 660.84 ns/op 1.10
Tree 40 250000 toArray() 21.169 ms/op 15.230 ms/op 1.39
Tree 40 250000 iterate all - toArray() + loop 21.806 ms/op 15.178 ms/op 1.44
Tree 40 250000 iterate all - get(i) 59.319 ms/op 49.515 ms/op 1.20
MutableVector 250000 create 13.250 ms/op 12.098 ms/op 1.10
MutableVector 250000 get(125000) 10.225 ns/op 6.7940 ns/op 1.51
MutableVector 250000 set(125000) 230.87 ns/op 200.55 ns/op 1.15
MutableVector 250000 toArray() 4.6267 ms/op 3.4400 ms/op 1.34
MutableVector 250000 iterate all - toArray() + loop 4.9402 ms/op 3.5082 ms/op 1.41
MutableVector 250000 iterate all - get(i) 1.6586 ms/op 1.6730 ms/op 0.99
Array 250000 create 3.9863 ms/op 3.0168 ms/op 1.32
Array 250000 clone - spread 1.6304 ms/op 1.5397 ms/op 1.06
Array 250000 get(125000) 0.43900 ns/op 0.40900 ns/op 1.07
Array 250000 set(125000) 0.47800 ns/op 0.42500 ns/op 1.12
Array 250000 iterate all - loop 86.207 us/op 82.221 us/op 1.05
effectiveBalanceIncrements clone Uint8Array 300000 46.449 us/op 29.936 us/op 1.55
effectiveBalanceIncrements clone MutableVector 300000 138.00 ns/op 123.00 ns/op 1.12
effectiveBalanceIncrements rw all Uint8Array 300000 209.54 us/op 199.01 us/op 1.05
effectiveBalanceIncrements rw all MutableVector 300000 74.289 ms/op 66.504 ms/op 1.12
phase0 afterProcessEpoch - 250000 vs - 7PWei 85.937 ms/op 87.396 ms/op 0.98
phase0 beforeProcessEpoch - 250000 vs - 7PWei 39.563 ms/op 41.770 ms/op 0.95
altair processEpoch - mainnet_e81889 414.92 ms/op 424.61 ms/op 0.98
mainnet_e81889 - altair beforeProcessEpoch 72.809 ms/op 65.320 ms/op 1.11
mainnet_e81889 - altair processJustificationAndFinalization 13.202 us/op 18.535 us/op 0.71
mainnet_e81889 - altair processInactivityUpdates 6.3995 ms/op 5.7736 ms/op 1.11
mainnet_e81889 - altair processRewardsAndPenalties 45.449 ms/op 60.371 ms/op 0.75
mainnet_e81889 - altair processRegistryUpdates 2.9070 us/op 2.8870 us/op 1.01
mainnet_e81889 - altair processSlashings 664.00 ns/op 535.00 ns/op 1.24
mainnet_e81889 - altair processEth1DataReset 436.00 ns/op 538.00 ns/op 0.81
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9608 ms/op 2.9341 ms/op 0.67
mainnet_e81889 - altair processSlashingsReset 4.8500 us/op 5.9290 us/op 0.82
mainnet_e81889 - altair processRandaoMixesReset 8.8910 us/op 6.8260 us/op 1.30
mainnet_e81889 - altair processHistoricalRootsUpdate 680.00 ns/op 534.00 ns/op 1.27
mainnet_e81889 - altair processParticipationFlagUpdates 2.6040 us/op 2.6520 us/op 0.98
mainnet_e81889 - altair processSyncCommitteeUpdates 669.00 ns/op 271.00 ns/op 2.47
mainnet_e81889 - altair afterProcessEpoch 85.328 ms/op 91.528 ms/op 0.93
capella processEpoch - mainnet_e217614 1.3073 s/op 1.3292 s/op 0.98
mainnet_e217614 - capella beforeProcessEpoch 259.31 ms/op 247.57 ms/op 1.05
mainnet_e217614 - capella processJustificationAndFinalization 15.226 us/op 15.648 us/op 0.97
mainnet_e217614 - capella processInactivityUpdates 17.877 ms/op 16.545 ms/op 1.08
mainnet_e217614 - capella processRewardsAndPenalties 250.44 ms/op 254.80 ms/op 0.98
mainnet_e217614 - capella processRegistryUpdates 18.999 us/op 15.725 us/op 1.21
mainnet_e217614 - capella processSlashings 490.00 ns/op 478.00 ns/op 1.03
mainnet_e217614 - capella processEth1DataReset 547.00 ns/op 571.00 ns/op 0.96
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.9474 ms/op 5.1635 ms/op 0.96
mainnet_e217614 - capella processSlashingsReset 10.593 us/op 2.9720 us/op 3.56
mainnet_e217614 - capella processRandaoMixesReset 7.4430 us/op 10.061 us/op 0.74
mainnet_e217614 - capella processHistoricalRootsUpdate 1.0240 us/op 795.00 ns/op 1.29
mainnet_e217614 - capella processParticipationFlagUpdates 3.9210 us/op 2.5110 us/op 1.56
mainnet_e217614 - capella afterProcessEpoch 281.14 ms/op 277.69 ms/op 1.01
phase0 processEpoch - mainnet_e58758 401.47 ms/op 366.03 ms/op 1.10
mainnet_e58758 - phase0 beforeProcessEpoch 105.42 ms/op 124.54 ms/op 0.85
mainnet_e58758 - phase0 processJustificationAndFinalization 22.093 us/op 15.547 us/op 1.42
mainnet_e58758 - phase0 processRewardsAndPenalties 39.104 ms/op 35.712 ms/op 1.09
mainnet_e58758 - phase0 processRegistryUpdates 12.992 us/op 9.7460 us/op 1.33
mainnet_e58758 - phase0 processSlashings 458.00 ns/op 371.00 ns/op 1.23
mainnet_e58758 - phase0 processEth1DataReset 660.00 ns/op 368.00 ns/op 1.79
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.5763 ms/op 1.1414 ms/op 1.38
mainnet_e58758 - phase0 processSlashingsReset 3.6740 us/op 5.8160 us/op 0.63
mainnet_e58758 - phase0 processRandaoMixesReset 6.0670 us/op 3.5650 us/op 1.70
mainnet_e58758 - phase0 processHistoricalRootsUpdate 572.00 ns/op 632.00 ns/op 0.91
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.8270 us/op 2.4930 us/op 1.54
mainnet_e58758 - phase0 afterProcessEpoch 79.023 ms/op 79.933 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.5263 ms/op 1.3142 ms/op 1.16
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.3424 ms/op 1.8229 ms/op 1.28
altair processInactivityUpdates - 250000 normalcase 22.547 ms/op 20.639 ms/op 1.09
altair processInactivityUpdates - 250000 worstcase 21.628 ms/op 20.693 ms/op 1.05
phase0 processRegistryUpdates - 250000 normalcase 8.3800 us/op 8.3960 us/op 1.00
phase0 processRegistryUpdates - 250000 badcase_full_deposits 340.81 us/op 325.32 us/op 1.05
phase0 processRegistryUpdates - 250000 worstcase 0.5 127.39 ms/op 135.91 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 45.099 ms/op 40.994 ms/op 1.10
altair processRewardsAndPenalties - 250000 worstcase 47.077 ms/op 45.374 ms/op 1.04
phase0 getAttestationDeltas - 250000 normalcase 10.810 ms/op 7.8887 ms/op 1.37
phase0 getAttestationDeltas - 250000 worstcase 10.354 ms/op 10.812 ms/op 0.96
phase0 processSlashings - 250000 worstcase 130.27 us/op 137.07 us/op 0.95
altair processSyncCommitteeUpdates - 250000 151.17 ms/op 139.44 ms/op 1.08
BeaconState.hashTreeRoot - No change 430.00 ns/op 389.00 ns/op 1.11
BeaconState.hashTreeRoot - 1 full validator 149.21 us/op 134.87 us/op 1.11
BeaconState.hashTreeRoot - 32 full validator 1.1777 ms/op 1.3435 ms/op 0.88
BeaconState.hashTreeRoot - 512 full validator 16.194 ms/op 13.375 ms/op 1.21
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 152.08 us/op 162.21 us/op 0.94
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1171 ms/op 1.8458 ms/op 1.15
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 26.114 ms/op 22.026 ms/op 1.19
BeaconState.hashTreeRoot - 1 balances 108.24 us/op 106.71 us/op 1.01
BeaconState.hashTreeRoot - 32 balances 1.0144 ms/op 1.2368 ms/op 0.82
BeaconState.hashTreeRoot - 512 balances 8.0840 ms/op 11.865 ms/op 0.68
BeaconState.hashTreeRoot - 250000 balances 169.52 ms/op 179.95 ms/op 0.94
aggregationBits - 2048 els - zipIndexesInBitList 25.034 us/op 25.313 us/op 0.99
byteArrayEquals 32 53.988 ns/op 56.889 ns/op 0.95
Buffer.compare 32 46.376 ns/op 46.475 ns/op 1.00
byteArrayEquals 1024 1.6045 us/op 1.6282 us/op 0.99
Buffer.compare 1024 54.581 ns/op 54.326 ns/op 1.00
byteArrayEquals 16384 25.659 us/op 26.207 us/op 0.98
Buffer.compare 16384 222.55 ns/op 241.92 ns/op 0.92
byteArrayEquals 123687377 193.61 ms/op 196.62 ms/op 0.98
Buffer.compare 123687377 6.8677 ms/op 8.2945 ms/op 0.83
byteArrayEquals 32 - diff last byte 52.926 ns/op 54.459 ns/op 0.97
Buffer.compare 32 - diff last byte 46.502 ns/op 47.826 ns/op 0.97
byteArrayEquals 1024 - diff last byte 1.5983 us/op 1.6584 us/op 0.96
Buffer.compare 1024 - diff last byte 53.632 ns/op 55.652 ns/op 0.96
byteArrayEquals 16384 - diff last byte 25.531 us/op 25.421 us/op 1.00
Buffer.compare 16384 - diff last byte 224.27 ns/op 242.84 ns/op 0.92
byteArrayEquals 123687377 - diff last byte 193.22 ms/op 196.49 ms/op 0.98
Buffer.compare 123687377 - diff last byte 6.9309 ms/op 7.9900 ms/op 0.87
byteArrayEquals 32 - random bytes 5.2190 ns/op 5.3680 ns/op 0.97
Buffer.compare 32 - random bytes 48.793 ns/op 49.655 ns/op 0.98
byteArrayEquals 1024 - random bytes 5.2230 ns/op 5.8390 ns/op 0.89
Buffer.compare 1024 - random bytes 47.134 ns/op 47.328 ns/op 1.00
byteArrayEquals 16384 - random bytes 5.2200 ns/op 5.2300 ns/op 1.00
Buffer.compare 16384 - random bytes 46.846 ns/op 46.301 ns/op 1.01
byteArrayEquals 123687377 - random bytes 6.5000 ns/op 6.7700 ns/op 0.96
Buffer.compare 123687377 - random bytes 48.480 ns/op 49.720 ns/op 0.98
regular array get 100000 times 44.203 us/op 35.713 us/op 1.24
wrappedArray get 100000 times 33.703 us/op 33.431 us/op 1.01
arrayWithProxy get 100000 times 13.049 ms/op 12.986 ms/op 1.00
ssz.Root.equals 47.079 ns/op 46.983 ns/op 1.00
byteArrayEquals 46.465 ns/op 46.621 ns/op 1.00
Buffer.compare 10.616 ns/op 10.728 ns/op 0.99
shuffle list - 16384 els 6.3107 ms/op 6.5922 ms/op 0.96
shuffle list - 250000 els 90.131 ms/op 96.155 ms/op 0.94
processSlot - 1 slots 11.692 us/op 16.344 us/op 0.72
processSlot - 32 slots 2.4268 ms/op 3.4346 ms/op 0.71
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.911 ms/op 38.499 ms/op 0.98
getCommitteeAssignments - req 1 vs - 250000 vc 2.2184 ms/op 2.2865 ms/op 0.97
getCommitteeAssignments - req 100 vs - 250000 vc 4.2821 ms/op 4.2829 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5395 ms/op 4.6198 ms/op 0.98
findModifiedValidators - 10000 modified validators 286.28 ms/op 260.29 ms/op 1.10
findModifiedValidators - 1000 modified validators 186.16 ms/op 184.28 ms/op 1.01
findModifiedValidators - 100 modified validators 176.93 ms/op 167.71 ms/op 1.05
findModifiedValidators - 10 modified validators 162.26 ms/op 159.95 ms/op 1.01
findModifiedValidators - 1 modified validators 166.06 ms/op 165.39 ms/op 1.00
findModifiedValidators - no difference 156.53 ms/op 144.36 ms/op 1.08
compare ViewDUs 3.0658 s/op 3.0739 s/op 1.00
compare each validator Uint8Array 1.4730 s/op 1.6541 s/op 0.89
compare ViewDU to Uint8Array 1.1521 s/op 1.3001 s/op 0.89
migrate state 1000000 validators, 24 modified, 0 new 634.71 ms/op 730.67 ms/op 0.87
migrate state 1000000 validators, 1700 modified, 1000 new 857.40 ms/op 1.1011 s/op 0.78
migrate state 1000000 validators, 3400 modified, 2000 new 1.0899 s/op 1.3220 s/op 0.82
migrate state 1500000 validators, 24 modified, 0 new 603.35 ms/op 731.39 ms/op 0.82
migrate state 1500000 validators, 1700 modified, 1000 new 888.67 ms/op 870.94 ms/op 1.02
migrate state 1500000 validators, 3400 modified, 2000 new 1.1352 s/op 1.0645 s/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0600 ns/op 5.0800 ns/op 1.00
state getBlockRootAtSlot - 250000 vs - 7PWei 619.11 ns/op 760.66 ns/op 0.81
computeProposers - vc 250000 9.0659 ms/op 8.5379 ms/op 1.06
computeEpochShuffling - vc 250000 101.33 ms/op 103.15 ms/op 0.98
getNextSyncCommittee - vc 250000 157.86 ms/op 142.42 ms/op 1.11
computeSigningRoot for AttestationData 26.784 us/op 28.345 us/op 0.94
hash AttestationData serialized data then Buffer.toString(base64) 1.6367 us/op 1.6012 us/op 1.02
toHexString serialized data 1.0927 us/op 994.63 ns/op 1.10
Buffer.toString(base64) 218.33 ns/op 209.36 ns/op 1.04

by benchmarkbot/action

@jeluard jeluard merged commit 14855ea into unstable Jun 9, 2024
20 checks passed
@jeluard jeluard deleted the jeluard/fix-incorrect-access branch June 9, 2024 07:31
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.20.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants