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

chore: remove state-transition dependency #6519

Merged
merged 1 commit into from Mar 8, 2024

Conversation

jeluard
Copy link
Member

@jeluard jeluard commented Mar 7, 2024

Motivation

Reduce inter-module dependency

Description

light-client only depends on state-transition for computeEpochAtSlot. Replace it with the equivalent computeEpochAtSlot from light-client.

Note that this code duplication should probably be addressed. An idea would be to have a separate module (deps free) containing those utilities.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Merging #6519 (b049cd4) into unstable (918924e) will decrease coverage by 0.02%.
Report is 3 commits behind head on unstable.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6519      +/-   ##
============================================
- Coverage     61.55%   61.53%   -0.02%     
============================================
  Files           556      556              
  Lines         58586    58647      +61     
  Branches       1847     1847              
============================================
+ Hits          36060    36087      +27     
- Misses        22486    22520      +34     
  Partials         40       40              

@jeluard jeluard marked this pull request as ready for review March 7, 2024 22:31
@jeluard jeluard requested a review from a team as a code owner March 7, 2024 22:31
Copy link
Contributor

github-actions bot commented Mar 7, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: c53f7ca Previous: 36f50cf Ratio
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.211 us/op 187.51 us/op 0.26
Object set x1000 24.599 ns/op 102.03 ns/op 0.24
Map set x1000 17.265 ns/op 69.869 ns/op 0.25
Set add up to 64 items then delete middle 1.9964 us/op 6.3539 us/op 0.31
Set add up to 128 items then delete first 3.9030 us/op 12.007 us/op 0.33
Set add up to 128 items then delete last 3.8218 us/op 11.947 us/op 0.32
Set add up to 128 items then delete middle 3.8028 us/op 12.077 us/op 0.31
Set add up to 256 items then delete last 7.5369 us/op 23.274 us/op 0.32
Full benchmark results
Benchmark suite Current: c53f7ca Previous: 36f50cf Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 745.40 us/op 1.2055 ms/op 0.62
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.211 us/op 187.51 us/op 0.26
BLS verify - blst-native 1.1243 ms/op 1.4975 ms/op 0.75
BLS verifyMultipleSignatures 3 - blst-native 2.3999 ms/op 3.1607 ms/op 0.76
BLS verifyMultipleSignatures 8 - blst-native 5.2581 ms/op 7.6507 ms/op 0.69
BLS verifyMultipleSignatures 32 - blst-native 19.464 ms/op 27.463 ms/op 0.71
BLS verifyMultipleSignatures 64 - blst-native 38.431 ms/op 52.714 ms/op 0.73
BLS verifyMultipleSignatures 128 - blst-native 75.922 ms/op 123.65 ms/op 0.61
BLS deserializing 10000 signatures 781.49 ms/op 1.0694 s/op 0.73
BLS deserializing 100000 signatures 8.2920 s/op 10.827 s/op 0.77
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1254 ms/op 1.5944 ms/op 0.71
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2710 ms/op 1.6900 ms/op 0.75
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.6432 ms/op 3.0110 ms/op 0.88
BLS verifyMultipleSignatures - same message - 64 - blst-native 2.9626 ms/op 4.7625 ms/op 0.62
BLS verifyMultipleSignatures - same message - 128 - blst-native 7.2919 ms/op 8.3970 ms/op 0.87
BLS aggregatePubkeys 32 - blst-native 23.983 us/op 33.323 us/op 0.72
BLS aggregatePubkeys 128 - blst-native 89.735 us/op 115.39 us/op 0.78
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 51.098 ms/op 91.598 ms/op 0.56
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 46.579 ms/op 93.721 ms/op 0.50
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 29.638 ms/op 63.793 ms/op 0.46
getSlashingsAndExits - default max 200.21 us/op 271.79 us/op 0.74
getSlashingsAndExits - 2k 422.73 us/op 836.23 us/op 0.51
proposeBlockBody type=full, size=empty 4.1905 ms/op 7.8956 ms/op 0.53
isKnown best case - 1 super set check 457.00 ns/op 697.00 ns/op 0.66
isKnown normal case - 2 super set checks 434.00 ns/op 830.00 ns/op 0.52
isKnown worse case - 16 super set checks 427.00 ns/op 787.00 ns/op 0.54
CheckpointStateCache - add get delete 5.5600 us/op 8.2420 us/op 0.67
validate api signedAggregateAndProof - struct 2.4269 ms/op 3.1968 ms/op 0.76
validate gossip signedAggregateAndProof - struct 2.3918 ms/op 3.1653 ms/op 0.76
validate gossip attestation - vc 640000 1.1638 ms/op 1.6718 ms/op 0.70
batch validate gossip attestation - vc 640000 - chunk 32 144.73 us/op 205.10 us/op 0.71
batch validate gossip attestation - vc 640000 - chunk 64 127.57 us/op 191.20 us/op 0.67
batch validate gossip attestation - vc 640000 - chunk 128 114.42 us/op 183.53 us/op 0.62
batch validate gossip attestation - vc 640000 - chunk 256 114.62 us/op 162.94 us/op 0.70
pickEth1Vote - no votes 974.96 us/op 1.5855 ms/op 0.61
pickEth1Vote - max votes 10.662 ms/op 16.089 ms/op 0.66
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.308 ms/op 24.896 ms/op 0.86
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 26.751 ms/op 47.375 ms/op 0.56
pickEth1Vote - Eth1Data fastSerialize value x2048 470.97 us/op 847.66 us/op 0.56
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.3949 ms/op 10.357 ms/op 0.52
bytes32 toHexString 609.00 ns/op 893.00 ns/op 0.68
bytes32 Buffer.toString(hex) 325.00 ns/op 407.00 ns/op 0.80
bytes32 Buffer.toString(hex) from Uint8Array 515.00 ns/op 783.00 ns/op 0.66
bytes32 Buffer.toString(hex) + 0x 332.00 ns/op 369.00 ns/op 0.90
Object access 1 prop 0.20500 ns/op 0.26400 ns/op 0.78
Map access 1 prop 0.18900 ns/op 0.19500 ns/op 0.97
Object get x1000 5.1710 ns/op 9.4370 ns/op 0.55
Map get x1000 0.74800 ns/op 1.2110 ns/op 0.62
Object set x1000 24.599 ns/op 102.03 ns/op 0.24
Map set x1000 17.265 ns/op 69.869 ns/op 0.25
Return object 10000 times 0.23340 ns/op 0.34110 ns/op 0.68
Throw Error 10000 times 2.7820 us/op 5.3322 us/op 0.52
fastMsgIdFn sha256 / 200 bytes 2.0170 us/op 3.8470 us/op 0.52
fastMsgIdFn h32 xxhash / 200 bytes 297.00 ns/op 402.00 ns/op 0.74
fastMsgIdFn h64 xxhash / 200 bytes 397.00 ns/op 526.00 ns/op 0.75
fastMsgIdFn sha256 / 1000 bytes 6.2870 us/op 14.636 us/op 0.43
fastMsgIdFn h32 xxhash / 1000 bytes 473.00 ns/op 605.00 ns/op 0.78
fastMsgIdFn h64 xxhash / 1000 bytes 470.00 ns/op 562.00 ns/op 0.84
fastMsgIdFn sha256 / 10000 bytes 51.925 us/op 116.96 us/op 0.44
fastMsgIdFn h32 xxhash / 10000 bytes 1.8710 us/op 2.2650 us/op 0.83
fastMsgIdFn h64 xxhash / 10000 bytes 1.2650 us/op 1.5700 us/op 0.81
send data - 1000 256B messages 11.056 ms/op 29.634 ms/op 0.37
send data - 1000 512B messages 13.812 ms/op 35.904 ms/op 0.38
send data - 1000 1024B messages 25.681 ms/op 51.684 ms/op 0.50
send data - 1000 1200B messages 21.859 ms/op 50.773 ms/op 0.43
send data - 1000 2048B messages 36.975 ms/op 59.158 ms/op 0.63
send data - 1000 4096B messages 34.003 ms/op 39.301 ms/op 0.87
send data - 1000 16384B messages 87.237 ms/op 153.20 ms/op 0.57
send data - 1000 65536B messages 383.56 ms/op 622.34 ms/op 0.62
enrSubnets - fastDeserialize 64 bits 936.00 ns/op 2.2050 us/op 0.42
enrSubnets - ssz BitVector 64 bits 428.00 ns/op 637.00 ns/op 0.67
enrSubnets - fastDeserialize 4 bits 209.00 ns/op 280.00 ns/op 0.75
enrSubnets - ssz BitVector 4 bits 426.00 ns/op 677.00 ns/op 0.63
prioritizePeers score -10:0 att 32-0.1 sync 2-0 66.018 us/op 158.09 us/op 0.42
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 80.335 us/op 171.94 us/op 0.47
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 109.64 us/op 250.35 us/op 0.44
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 186.60 us/op 401.96 us/op 0.46
prioritizePeers score 0:0 att 64-1 sync 4-1 207.46 us/op 495.38 us/op 0.42
array of 16000 items push then shift 1.2814 us/op 1.9856 us/op 0.65
LinkedList of 16000 items push then shift 6.0220 ns/op 13.846 ns/op 0.43
array of 16000 items push then pop 64.608 ns/op 127.37 ns/op 0.51
LinkedList of 16000 items push then pop 5.7610 ns/op 11.532 ns/op 0.50
array of 24000 items push then shift 1.9001 us/op 3.0344 us/op 0.63
LinkedList of 24000 items push then shift 5.9900 ns/op 11.712 ns/op 0.51
array of 24000 items push then pop 84.695 ns/op 187.22 ns/op 0.45
LinkedList of 24000 items push then pop 5.9550 ns/op 10.220 ns/op 0.58
intersect bitArray bitLen 8 4.8890 ns/op 6.5420 ns/op 0.75
intersect array and set length 8 49.864 ns/op 116.48 ns/op 0.43
intersect bitArray bitLen 128 29.853 ns/op 39.250 ns/op 0.76
intersect array and set length 128 697.49 ns/op 1.2421 us/op 0.56
bitArray.getTrueBitIndexes() bitLen 128 1.1780 us/op 1.8820 us/op 0.63
bitArray.getTrueBitIndexes() bitLen 248 1.9450 us/op 3.8810 us/op 0.50
bitArray.getTrueBitIndexes() bitLen 512 3.5780 us/op 7.7450 us/op 0.46
Buffer.concat 32 items 862.00 ns/op 1.2360 us/op 0.70
Uint8Array.set 32 items 2.0950 us/op 2.3450 us/op 0.89
Set add up to 64 items then delete first 1.9404 us/op 5.5488 us/op 0.35
OrderedSet add up to 64 items then delete first 2.6720 us/op 7.5964 us/op 0.35
Set add up to 64 items then delete last 2.0092 us/op 6.0210 us/op 0.33
OrderedSet add up to 64 items then delete last 2.9722 us/op 8.5442 us/op 0.35
Set add up to 64 items then delete middle 1.9964 us/op 6.3539 us/op 0.31
OrderedSet add up to 64 items then delete middle 4.2321 us/op 9.4440 us/op 0.45
Set add up to 128 items then delete first 3.9030 us/op 12.007 us/op 0.33
OrderedSet add up to 128 items then delete first 6.0828 us/op 16.416 us/op 0.37
Set add up to 128 items then delete last 3.8218 us/op 11.947 us/op 0.32
OrderedSet add up to 128 items then delete last 5.7426 us/op 15.832 us/op 0.36
Set add up to 128 items then delete middle 3.8028 us/op 12.077 us/op 0.31
OrderedSet add up to 128 items then delete middle 10.927 us/op 22.043 us/op 0.50
Set add up to 256 items then delete first 9.6909 us/op 24.227 us/op 0.40
OrderedSet add up to 256 items then delete first 14.861 us/op 34.236 us/op 0.43
Set add up to 256 items then delete last 7.5369 us/op 23.274 us/op 0.32
OrderedSet add up to 256 items then delete last 11.381 us/op 30.979 us/op 0.37
Set add up to 256 items then delete middle 8.2666 us/op 23.859 us/op 0.35
OrderedSet add up to 256 items then delete middle 34.322 us/op 55.925 us/op 0.61
transfer serialized Status (84 B) 1.5650 us/op 2.1560 us/op 0.73
copy serialized Status (84 B) 1.3270 us/op 1.6230 us/op 0.82
transfer serialized SignedVoluntaryExit (112 B) 1.7740 us/op 2.2050 us/op 0.80
copy serialized SignedVoluntaryExit (112 B) 1.3980 us/op 1.6200 us/op 0.86
transfer serialized ProposerSlashing (416 B) 2.5970 us/op 3.5760 us/op 0.73
copy serialized ProposerSlashing (416 B) 2.6850 us/op 3.2680 us/op 0.82
transfer serialized Attestation (485 B) 2.7740 us/op 3.8290 us/op 0.72
copy serialized Attestation (485 B) 2.7570 us/op 3.2970 us/op 0.84
transfer serialized AttesterSlashing (33232 B) 2.8070 us/op 3.3850 us/op 0.83
copy serialized AttesterSlashing (33232 B) 8.9330 us/op 10.035 us/op 0.89
transfer serialized Small SignedBeaconBlock (128000 B) 2.8140 us/op 4.0140 us/op 0.70
copy serialized Small SignedBeaconBlock (128000 B) 19.736 us/op 30.809 us/op 0.64
transfer serialized Avg SignedBeaconBlock (200000 B) 2.6710 us/op 3.7110 us/op 0.72
copy serialized Avg SignedBeaconBlock (200000 B) 30.528 us/op 40.346 us/op 0.76
transfer serialized BlobsSidecar (524380 B) 2.8150 us/op 3.1850 us/op 0.88
copy serialized BlobsSidecar (524380 B) 152.13 us/op 157.11 us/op 0.97
transfer serialized Big SignedBeaconBlock (1000000 B) 2.6350 us/op 4.4140 us/op 0.60
copy serialized Big SignedBeaconBlock (1000000 B) 138.26 us/op 257.27 us/op 0.54
pass gossip attestations to forkchoice per slot 2.9590 ms/op 4.6012 ms/op 0.64
forkChoice updateHead vc 100000 bc 64 eq 0 476.29 us/op 770.14 us/op 0.62
forkChoice updateHead vc 600000 bc 64 eq 0 2.8378 ms/op 4.6795 ms/op 0.61
forkChoice updateHead vc 1000000 bc 64 eq 0 4.8080 ms/op 8.2284 ms/op 0.58
forkChoice updateHead vc 600000 bc 320 eq 0 2.8222 ms/op 7.7697 ms/op 0.36
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7096 ms/op 5.7127 ms/op 0.47
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3727 ms/op 6.1612 ms/op 0.55
forkChoice updateHead vc 600000 bc 64 eq 1000 10.013 ms/op 13.115 ms/op 0.76
forkChoice updateHead vc 600000 bc 64 eq 10000 10.076 ms/op 13.353 ms/op 0.75
forkChoice updateHead vc 600000 bc 64 eq 300000 12.232 ms/op 29.527 ms/op 0.41
computeDeltas 500000 validators 300 proto nodes 3.2055 ms/op 7.5595 ms/op 0.42
computeDeltas 500000 validators 1200 proto nodes 3.0860 ms/op 7.6753 ms/op 0.40
computeDeltas 500000 validators 7200 proto nodes 2.9332 ms/op 7.3743 ms/op 0.40
computeDeltas 750000 validators 300 proto nodes 4.4410 ms/op 10.549 ms/op 0.42
computeDeltas 750000 validators 1200 proto nodes 4.6179 ms/op 10.539 ms/op 0.44
computeDeltas 750000 validators 7200 proto nodes 4.5344 ms/op 10.747 ms/op 0.42
computeDeltas 1400000 validators 300 proto nodes 9.0132 ms/op 20.850 ms/op 0.43
computeDeltas 1400000 validators 1200 proto nodes 8.8413 ms/op 20.294 ms/op 0.44
computeDeltas 1400000 validators 7200 proto nodes 9.4195 ms/op 20.192 ms/op 0.47
computeDeltas 2100000 validators 300 proto nodes 13.584 ms/op 31.504 ms/op 0.43
computeDeltas 2100000 validators 1200 proto nodes 13.600 ms/op 30.751 ms/op 0.44
computeDeltas 2100000 validators 7200 proto nodes 13.534 ms/op 31.615 ms/op 0.43
altair processAttestation - 250000 vs - 7PWei normalcase 1.4670 ms/op 3.3539 ms/op 0.44
altair processAttestation - 250000 vs - 7PWei worstcase 2.2796 ms/op 4.4628 ms/op 0.51
altair processAttestation - setStatus - 1/6 committees join 75.879 us/op 195.13 us/op 0.39
altair processAttestation - setStatus - 1/3 committees join 145.74 us/op 373.37 us/op 0.39
altair processAttestation - setStatus - 1/2 committees join 235.14 us/op 529.30 us/op 0.44
altair processAttestation - setStatus - 2/3 committees join 316.02 us/op 699.96 us/op 0.45
altair processAttestation - setStatus - 4/5 committees join 411.18 us/op 933.10 us/op 0.44
altair processAttestation - setStatus - 100% committees join 488.16 us/op 1.0531 ms/op 0.46
altair processBlock - 250000 vs - 7PWei normalcase 5.8229 ms/op 11.864 ms/op 0.49
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.515 ms/op 46.346 ms/op 0.57
altair processBlock - 250000 vs - 7PWei worstcase 30.201 ms/op 41.386 ms/op 0.73
altair processBlock - 250000 vs - 7PWei worstcase hashState 77.031 ms/op 142.23 ms/op 0.54
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0799 ms/op 5.0355 ms/op 0.41
phase0 processBlock - 250000 vs - 7PWei worstcase 24.298 ms/op 40.612 ms/op 0.60
altair processEth1Data - 250000 vs - 7PWei normalcase 294.52 us/op 793.03 us/op 0.37
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 10.091 us/op 15.037 us/op 0.67
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 25.909 us/op 72.170 us/op 0.36
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 24.278 us/op 36.760 us/op 0.66
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.150 us/op 29.421 us/op 0.34
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 179.66 us/op 279.56 us/op 0.64
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 876.17 us/op 1.6754 ms/op 0.52
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1925 ms/op 2.3828 ms/op 0.50
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 896.51 us/op 2.1774 ms/op 0.41
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.5328 ms/op 5.2731 ms/op 0.48
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4902 ms/op 3.0455 ms/op 0.49
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.4264 ms/op 8.3176 ms/op 0.41
Tree 40 250000 create 268.00 ms/op 715.78 ms/op 0.37
Tree 40 250000 get(125000) 117.87 ns/op 234.92 ns/op 0.50
Tree 40 250000 set(125000) 756.77 ns/op 1.4553 us/op 0.52
Tree 40 250000 toArray() 19.176 ms/op 28.223 ms/op 0.68
Tree 40 250000 iterate all - toArray() + loop 12.116 ms/op 27.549 ms/op 0.44
Tree 40 250000 iterate all - get(i) 40.593 ms/op 77.968 ms/op 0.52
MutableVector 250000 create 10.445 ms/op 12.157 ms/op 0.86
MutableVector 250000 get(125000) 5.6230 ns/op 7.1760 ns/op 0.78
MutableVector 250000 set(125000) 211.86 ns/op 365.38 ns/op 0.58
MutableVector 250000 toArray() 2.1827 ms/op 4.2548 ms/op 0.51
MutableVector 250000 iterate all - toArray() + loop 2.2779 ms/op 5.0365 ms/op 0.45
MutableVector 250000 iterate all - get(i) 1.3488 ms/op 1.6578 ms/op 0.81
Array 250000 create 2.0126 ms/op 4.0750 ms/op 0.49
Array 250000 clone - spread 1.1533 ms/op 1.5740 ms/op 0.73
Array 250000 get(125000) 1.0160 ns/op 1.5230 ns/op 0.67
Array 250000 set(125000) 1.2440 ns/op 5.2770 ns/op 0.24
Array 250000 iterate all - loop 154.00 us/op 180.86 us/op 0.85
effectiveBalanceIncrements clone Uint8Array 300000 15.392 us/op 53.779 us/op 0.29
effectiveBalanceIncrements clone MutableVector 300000 431.00 ns/op 379.00 ns/op 1.14
effectiveBalanceIncrements rw all Uint8Array 300000 185.21 us/op 221.12 us/op 0.84
effectiveBalanceIncrements rw all MutableVector 300000 66.227 ms/op 100.20 ms/op 0.66
phase0 afterProcessEpoch - 250000 vs - 7PWei 77.849 ms/op 124.22 ms/op 0.63
phase0 beforeProcessEpoch - 250000 vs - 7PWei 45.720 ms/op 62.467 ms/op 0.73
altair processEpoch - mainnet_e81889 384.98 ms/op 614.90 ms/op 0.63
mainnet_e81889 - altair beforeProcessEpoch 64.917 ms/op 104.99 ms/op 0.62
mainnet_e81889 - altair processJustificationAndFinalization 12.255 us/op 32.330 us/op 0.38
mainnet_e81889 - altair processInactivityUpdates 4.0615 ms/op 10.278 ms/op 0.40
mainnet_e81889 - altair processRewardsAndPenalties 59.083 ms/op 62.636 ms/op 0.94
mainnet_e81889 - altair processRegistryUpdates 2.0040 us/op 6.9830 us/op 0.29
mainnet_e81889 - altair processSlashings 561.00 ns/op 1.2150 us/op 0.46
mainnet_e81889 - altair processEth1DataReset 709.00 ns/op 1.5880 us/op 0.45
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.8190 ms/op 1.9582 ms/op 0.93
mainnet_e81889 - altair processSlashingsReset 3.4360 us/op 5.8480 us/op 0.59
mainnet_e81889 - altair processRandaoMixesReset 5.6160 us/op 8.7010 us/op 0.65
mainnet_e81889 - altair processHistoricalRootsUpdate 1.1220 us/op 1.6490 us/op 0.68
mainnet_e81889 - altair processParticipationFlagUpdates 2.8310 us/op 2.8640 us/op 0.99
mainnet_e81889 - altair processSyncCommitteeUpdates 725.00 ns/op 1.1550 us/op 0.63
mainnet_e81889 - altair afterProcessEpoch 80.028 ms/op 134.95 ms/op 0.59
capella processEpoch - mainnet_e217614 1.5992 s/op 2.2702 s/op 0.70
mainnet_e217614 - capella beforeProcessEpoch 408.42 ms/op 594.10 ms/op 0.69
mainnet_e217614 - capella processJustificationAndFinalization 12.372 us/op 22.794 us/op 0.54
mainnet_e217614 - capella processInactivityUpdates 15.400 ms/op 19.745 ms/op 0.78
mainnet_e217614 - capella processRewardsAndPenalties 331.33 ms/op 427.53 ms/op 0.77
mainnet_e217614 - capella processRegistryUpdates 9.0890 us/op 25.081 us/op 0.36
mainnet_e217614 - capella processSlashings 711.00 ns/op 687.00 ns/op 1.03
mainnet_e217614 - capella processEth1DataReset 570.00 ns/op 568.00 ns/op 1.00
mainnet_e217614 - capella processEffectiveBalanceUpdates 7.4376 ms/op 4.6843 ms/op 1.59
mainnet_e217614 - capella processSlashingsReset 2.7540 us/op 4.6000 us/op 0.60
mainnet_e217614 - capella processRandaoMixesReset 4.1810 us/op 6.5530 us/op 0.64
mainnet_e217614 - capella processHistoricalRootsUpdate 609.00 ns/op 944.00 ns/op 0.65
mainnet_e217614 - capella processParticipationFlagUpdates 1.3470 us/op 1.7880 us/op 0.75
mainnet_e217614 - capella afterProcessEpoch 201.64 ms/op 328.20 ms/op 0.61
phase0 processEpoch - mainnet_e58758 413.28 ms/op 520.40 ms/op 0.79
mainnet_e58758 - phase0 beforeProcessEpoch 119.76 ms/op 130.68 ms/op 0.92
mainnet_e58758 - phase0 processJustificationAndFinalization 14.145 us/op 20.507 us/op 0.69
mainnet_e58758 - phase0 processRewardsAndPenalties 54.869 ms/op 53.596 ms/op 1.02
mainnet_e58758 - phase0 processRegistryUpdates 9.0110 us/op 11.763 us/op 0.77
mainnet_e58758 - phase0 processSlashings 635.00 ns/op 625.00 ns/op 1.02
mainnet_e58758 - phase0 processEth1DataReset 543.00 ns/op 931.00 ns/op 0.58
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3907 ms/op 1.1967 ms/op 1.16
mainnet_e58758 - phase0 processSlashingsReset 2.5730 us/op 3.0150 us/op 0.85
mainnet_e58758 - phase0 processRandaoMixesReset 3.1410 us/op 4.2020 us/op 0.75
mainnet_e58758 - phase0 processHistoricalRootsUpdate 600.00 ns/op 485.00 ns/op 1.24
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.9940 us/op 11.194 us/op 0.27
mainnet_e58758 - phase0 afterProcessEpoch 64.360 ms/op 109.06 ms/op 0.59
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6757 ms/op 1.5053 ms/op 1.11
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.8519 ms/op 1.5340 ms/op 1.21
altair processInactivityUpdates - 250000 normalcase 23.567 ms/op 30.099 ms/op 0.78
altair processInactivityUpdates - 250000 worstcase 24.350 ms/op 30.966 ms/op 0.79
phase0 processRegistryUpdates - 250000 normalcase 3.5260 us/op 11.889 us/op 0.30
phase0 processRegistryUpdates - 250000 badcase_full_deposits 412.86 us/op 438.51 us/op 0.94
phase0 processRegistryUpdates - 250000 worstcase 0.5 112.84 ms/op 176.34 ms/op 0.64
altair processRewardsAndPenalties - 250000 normalcase 56.014 ms/op 64.807 ms/op 0.86
altair processRewardsAndPenalties - 250000 worstcase 56.437 ms/op 62.493 ms/op 0.90
phase0 getAttestationDeltas - 250000 normalcase 5.7449 ms/op 13.520 ms/op 0.42
phase0 getAttestationDeltas - 250000 worstcase 5.6917 ms/op 11.886 ms/op 0.48
phase0 processSlashings - 250000 worstcase 82.956 us/op 122.73 us/op 0.68
altair processSyncCommitteeUpdates - 250000 103.77 ms/op 176.75 ms/op 0.59
BeaconState.hashTreeRoot - No change 406.00 ns/op 700.00 ns/op 0.58
BeaconState.hashTreeRoot - 1 full validator 155.63 us/op 154.80 us/op 1.01
BeaconState.hashTreeRoot - 32 full validator 1.6764 ms/op 1.5361 ms/op 1.09
BeaconState.hashTreeRoot - 512 full validator 17.753 ms/op 18.090 ms/op 0.98
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 183.62 us/op 195.02 us/op 0.94
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5237 ms/op 3.1401 ms/op 0.80
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 33.211 ms/op 38.604 ms/op 0.86
BeaconState.hashTreeRoot - 1 balances 143.39 us/op 158.56 us/op 0.90
BeaconState.hashTreeRoot - 32 balances 1.3819 ms/op 1.5351 ms/op 0.90
BeaconState.hashTreeRoot - 512 balances 10.862 ms/op 12.979 ms/op 0.84
BeaconState.hashTreeRoot - 250000 balances 184.63 ms/op 258.26 ms/op 0.71
aggregationBits - 2048 els - zipIndexesInBitList 19.174 us/op 35.082 us/op 0.55
byteArrayEquals 32 64.036 ns/op 80.475 ns/op 0.80
Buffer.compare 32 38.103 ns/op 59.930 ns/op 0.64
byteArrayEquals 1024 1.7514 us/op 2.2576 us/op 0.78
Buffer.compare 1024 45.798 ns/op 75.550 ns/op 0.61
byteArrayEquals 16384 28.692 us/op 41.988 us/op 0.68
Buffer.compare 16384 207.29 ns/op 275.82 ns/op 0.75
byteArrayEquals 123687377 215.30 ms/op 286.11 ms/op 0.75
Buffer.compare 123687377 6.4809 ms/op 12.671 ms/op 0.51
byteArrayEquals 32 - diff last byte 61.381 ns/op 87.514 ns/op 0.70
Buffer.compare 32 - diff last byte 38.657 ns/op 69.871 ns/op 0.55
byteArrayEquals 1024 - diff last byte 1.7081 us/op 2.4588 us/op 0.69
Buffer.compare 1024 - diff last byte 45.211 ns/op 81.026 ns/op 0.56
byteArrayEquals 16384 - diff last byte 27.697 us/op 36.785 us/op 0.75
Buffer.compare 16384 - diff last byte 195.74 ns/op 302.56 ns/op 0.65
byteArrayEquals 123687377 - diff last byte 231.78 ms/op 266.93 ms/op 0.87
Buffer.compare 123687377 - diff last byte 6.7385 ms/op 9.4984 ms/op 0.71
byteArrayEquals 32 - random bytes 6.7950 ns/op 7.1020 ns/op 0.96
Buffer.compare 32 - random bytes 52.808 ns/op 73.814 ns/op 0.72
byteArrayEquals 1024 - random bytes 6.2690 ns/op 7.0450 ns/op 0.89
Buffer.compare 1024 - random bytes 44.626 ns/op 68.863 ns/op 0.65
byteArrayEquals 16384 - random bytes 5.5390 ns/op 6.6340 ns/op 0.83
Buffer.compare 16384 - random bytes 38.723 ns/op 65.219 ns/op 0.59
byteArrayEquals 123687377 - random bytes 8.1400 ns/op 9.0200 ns/op 0.90
Buffer.compare 123687377 - random bytes 43.730 ns/op 74.110 ns/op 0.59
regular array get 100000 times 43.131 us/op 46.387 us/op 0.93
wrappedArray get 100000 times 43.161 us/op 46.717 us/op 0.92
arrayWithProxy get 100000 times 9.9327 ms/op 14.910 ms/op 0.67
ssz.Root.equals 57.903 ns/op 56.315 ns/op 1.03
byteArrayEquals 56.391 ns/op 55.824 ns/op 1.01
Buffer.compare 9.7770 ns/op 12.305 ns/op 0.79
shuffle list - 16384 els 6.1096 ms/op 9.6497 ms/op 0.63
shuffle list - 250000 els 89.897 ms/op 137.91 ms/op 0.65
processSlot - 1 slots 15.236 us/op 21.620 us/op 0.70
processSlot - 32 slots 2.4580 ms/op 4.7914 ms/op 0.51
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 43.140 ms/op 74.587 ms/op 0.58
getCommitteeAssignments - req 1 vs - 250000 vc 2.4453 ms/op 3.0907 ms/op 0.79
getCommitteeAssignments - req 100 vs - 250000 vc 3.6245 ms/op 4.3112 ms/op 0.84
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0414 ms/op 4.6264 ms/op 0.87
findModifiedValidators - 10000 modified validators 422.06 ms/op 839.04 ms/op 0.50
findModifiedValidators - 1000 modified validators 317.47 ms/op 642.18 ms/op 0.49
findModifiedValidators - 100 modified validators 300.81 ms/op 668.57 ms/op 0.45
findModifiedValidators - 10 modified validators 295.61 ms/op 711.85 ms/op 0.42
findModifiedValidators - 1 modified validators 281.92 ms/op 539.38 ms/op 0.52
findModifiedValidators - no difference 317.59 ms/op 463.39 ms/op 0.69
compare ViewDUs 3.8666 s/op 5.1577 s/op 0.75
compare each validator Uint8Array 1.5644 s/op 1.7174 s/op 0.91
compare ViewDU to Uint8Array 979.24 ms/op 1.6427 s/op 0.60
migrate state 1000000 validators, 24 modified, 0 new 727.49 ms/op 1.0309 s/op 0.71
migrate state 1000000 validators, 1700 modified, 1000 new 972.99 ms/op 1.4141 s/op 0.69
migrate state 1000000 validators, 3400 modified, 2000 new 1.1588 s/op 1.6363 s/op 0.71
migrate state 1500000 validators, 24 modified, 0 new 835.40 ms/op 1.0207 s/op 0.82
migrate state 1500000 validators, 1700 modified, 1000 new 1.0489 s/op 1.3793 s/op 0.76
migrate state 1500000 validators, 3400 modified, 2000 new 1.2440 s/op 1.4620 s/op 0.85
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0400 ns/op 5.2400 ns/op 0.96
state getBlockRootAtSlot - 250000 vs - 7PWei 1.1106 us/op 711.17 ns/op 1.56
computeProposers - vc 250000 8.4973 ms/op 11.215 ms/op 0.76
computeEpochShuffling - vc 250000 90.106 ms/op 139.19 ms/op 0.65
getNextSyncCommittee - vc 250000 128.73 ms/op 182.55 ms/op 0.71
computeSigningRoot for AttestationData 32.192 us/op 30.067 us/op 1.07
hash AttestationData serialized data then Buffer.toString(base64) 1.3032 us/op 2.3765 us/op 0.55
toHexString serialized data 885.52 ns/op 1.1828 us/op 0.75
Buffer.toString(base64) 174.62 ns/op 237.85 ns/op 0.73

by benchmarkbot/action

@jeluard jeluard merged commit adc0534 into unstable Mar 8, 2024
20 checks passed
@jeluard jeluard deleted the jeluard/no-state-transition branch March 8, 2024 07:00
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.17.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.

None yet

3 participants