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

refactor: ssz api support #6080

Closed
wants to merge 87 commits into from
Closed

refactor: ssz api support #6080

wants to merge 87 commits into from

Conversation

wemeetagain
Copy link
Member

Motivation

Description

  • Will populate the description when this PR is more ready

Copy link
Contributor

github-actions bot commented Nov 1, 2023

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 42f5045 Previous: 618895c Ratio
altair processAttestation - 250000 vs - 7PWei normalcase 2.4185 ms/op 12.783 ms/op 0.19
altair processAttestation - 250000 vs - 7PWei worstcase 3.2742 ms/op 12.375 ms/op 0.26
Full benchmark results
Benchmark suite Current: 42f5045 Previous: 618895c Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 678.38 us/op 492.96 us/op 1.38
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 83.589 us/op 51.187 us/op 1.63
BLS verify - blst-native 1.2556 ms/op 1.1275 ms/op 1.11
BLS verifyMultipleSignatures 3 - blst-native 2.6268 ms/op 2.4156 ms/op 1.09
BLS verifyMultipleSignatures 8 - blst-native 5.7728 ms/op 5.3997 ms/op 1.07
BLS verifyMultipleSignatures 32 - blst-native 21.298 ms/op 19.694 ms/op 1.08
BLS verifyMultipleSignatures 64 - blst-native 41.604 ms/op 38.996 ms/op 1.07
BLS verifyMultipleSignatures 128 - blst-native 83.202 ms/op 77.032 ms/op 1.08
BLS deserializing 10000 signatures 878.65 ms/op 823.42 ms/op 1.07
BLS deserializing 100000 signatures 9.0273 s/op 8.2348 s/op 1.10
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2642 ms/op 1.1410 ms/op 1.11
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4778 ms/op 1.2891 ms/op 1.15
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4149 ms/op 2.0193 ms/op 1.20
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.0301 ms/op 3.0115 ms/op 1.34
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.6008 ms/op 4.9875 ms/op 1.12
BLS aggregatePubkeys 32 - blst-native 25.707 us/op 23.089 us/op 1.11
BLS aggregatePubkeys 128 - blst-native 99.857 us/op 89.289 us/op 1.12
getAttestationsForBlock 40.436 ms/op 22.521 ms/op 1.80
isKnown best case - 1 super set check 344.00 ns/op 346.00 ns/op 0.99
isKnown normal case - 2 super set checks 355.00 ns/op 324.00 ns/op 1.10
isKnown worse case - 16 super set checks 298.00 ns/op 333.00 ns/op 0.89
CheckpointStateCache - add get delete 5.2090 us/op 3.7620 us/op 1.38
validate api signedAggregateAndProof - struct 2.7208 ms/op 2.4675 ms/op 1.10
validate gossip signedAggregateAndProof - struct 2.7250 ms/op 2.5021 ms/op 1.09
validate gossip attestation - vc 640000 1.3313 ms/op 1.1822 ms/op 1.13
batch validate gossip attestation - vc 640000 - chunk 32 159.11 us/op 138.52 us/op 1.15
batch validate gossip attestation - vc 640000 - chunk 64 142.71 us/op 123.92 us/op 1.15
batch validate gossip attestation - vc 640000 - chunk 128 132.81 us/op 118.23 us/op 1.12
batch validate gossip attestation - vc 640000 - chunk 256 125.06 us/op 114.97 us/op 1.09
pickEth1Vote - no votes 1.3760 ms/op 911.02 us/op 1.51
pickEth1Vote - max votes 8.2271 ms/op 7.0477 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.892 ms/op 14.173 ms/op 1.05
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 25.729 ms/op 29.806 ms/op 0.86
pickEth1Vote - Eth1Data fastSerialize value x2048 588.64 us/op 478.38 us/op 1.23
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.6144 ms/op 3.6198 ms/op 1.83
bytes32 toHexString 481.00 ns/op 503.00 ns/op 0.96
bytes32 Buffer.toString(hex) 291.00 ns/op 304.00 ns/op 0.96
bytes32 Buffer.toString(hex) from Uint8Array 431.00 ns/op 438.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 287.00 ns/op 320.00 ns/op 0.90
Object access 1 prop 0.15800 ns/op 0.22000 ns/op 0.72
Map access 1 prop 0.14500 ns/op 0.20100 ns/op 0.72
Object get x1000 7.4760 ns/op 5.5820 ns/op 1.34
Map get x1000 0.61700 ns/op 0.53600 ns/op 1.15
Object set x1000 49.154 ns/op 25.956 ns/op 1.89
Map set x1000 37.734 ns/op 17.877 ns/op 2.11
Return object 10000 times 0.23750 ns/op 0.24230 ns/op 0.98
Throw Error 10000 times 3.7965 us/op 2.8726 us/op 1.32
fastMsgIdFn sha256 / 200 bytes 3.2540 us/op 2.0260 us/op 1.61
fastMsgIdFn h32 xxhash / 200 bytes 278.00 ns/op 376.00 ns/op 0.74
fastMsgIdFn h64 xxhash / 200 bytes 335.00 ns/op 375.00 ns/op 0.89
fastMsgIdFn sha256 / 1000 bytes 10.954 us/op 6.0810 us/op 1.80
fastMsgIdFn h32 xxhash / 1000 bytes 401.00 ns/op 483.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 1000 bytes 416.00 ns/op 420.00 ns/op 0.99
fastMsgIdFn sha256 / 10000 bytes 99.742 us/op 54.295 us/op 1.84
fastMsgIdFn h32 xxhash / 10000 bytes 1.8670 us/op 1.9340 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 1.2410 us/op 1.2900 us/op 0.96
send data - 1000 256B messages 18.292 ms/op 16.177 ms/op 1.13
send data - 1000 512B messages 25.352 ms/op 18.252 ms/op 1.39
send data - 1000 1024B messages 39.040 ms/op 25.569 ms/op 1.53
send data - 1000 1200B messages 34.237 ms/op 27.020 ms/op 1.27
send data - 1000 2048B messages 39.456 ms/op 34.220 ms/op 1.15
send data - 1000 4096B messages 37.836 ms/op 28.406 ms/op 1.33
send data - 1000 16384B messages 108.47 ms/op 80.392 ms/op 1.35
send data - 1000 65536B messages 429.82 ms/op 402.37 ms/op 1.07
enrSubnets - fastDeserialize 64 bits 1.2100 us/op 1.3400 us/op 0.90
enrSubnets - ssz BitVector 64 bits 406.00 ns/op 574.00 ns/op 0.71
enrSubnets - fastDeserialize 4 bits 182.00 ns/op 283.00 ns/op 0.64
enrSubnets - ssz BitVector 4 bits 402.00 ns/op 528.00 ns/op 0.76
prioritizePeers score -10:0 att 32-0.1 sync 2-0 99.350 us/op 82.645 us/op 1.20
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 124.05 us/op 83.218 us/op 1.49
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 159.20 us/op 113.28 us/op 1.41
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 279.82 us/op 210.50 us/op 1.33
prioritizePeers score 0:0 att 64-1 sync 4-1 331.34 us/op 237.26 us/op 1.40
array of 16000 items push then shift 1.5919 us/op 1.3276 us/op 1.20
LinkedList of 16000 items push then shift 8.7270 ns/op 6.0610 ns/op 1.44
array of 16000 items push then pop 79.253 ns/op 70.253 ns/op 1.13
LinkedList of 16000 items push then pop 8.4730 ns/op 5.7870 ns/op 1.46
array of 24000 items push then shift 2.3368 us/op 1.9554 us/op 1.20
LinkedList of 24000 items push then shift 8.7120 ns/op 6.0310 ns/op 1.44
array of 24000 items push then pop 100.06 ns/op 131.04 ns/op 0.76
LinkedList of 24000 items push then pop 8.4930 ns/op 6.2370 ns/op 1.36
intersect bitArray bitLen 8 7.0600 ns/op 5.5450 ns/op 1.27
intersect array and set length 8 55.735 ns/op 46.869 ns/op 1.19
intersect bitArray bitLen 128 30.954 ns/op 26.989 ns/op 1.15
intersect array and set length 128 745.05 ns/op 639.77 ns/op 1.16
bitArray.getTrueBitIndexes() bitLen 128 1.3720 us/op 1.6490 us/op 0.83
bitArray.getTrueBitIndexes() bitLen 248 2.3940 us/op 2.4250 us/op 0.99
bitArray.getTrueBitIndexes() bitLen 512 4.7450 us/op 4.0410 us/op 1.17
Buffer.concat 32 items 918.00 ns/op 862.00 ns/op 1.06
Uint8Array.set 32 items 1.7800 us/op 1.4450 us/op 1.23
Set add up to 64 items then delete first 4.2073 us/op 1.7988 us/op 2.34
OrderedSet add up to 64 items then delete first 5.3677 us/op 2.7293 us/op 1.97
Set add up to 64 items then delete last 4.4987 us/op 2.0609 us/op 2.18
OrderedSet add up to 64 items then delete last 6.0848 us/op 3.3249 us/op 1.83
Set add up to 64 items then delete middle 4.4618 us/op 2.0589 us/op 2.17
OrderedSet add up to 64 items then delete middle 7.1637 us/op 4.3776 us/op 1.64
Set add up to 128 items then delete first 8.9798 us/op 3.9122 us/op 2.30
OrderedSet add up to 128 items then delete first 11.672 us/op 5.8840 us/op 1.98
Set add up to 128 items then delete last 8.9705 us/op 3.8404 us/op 2.34
OrderedSet add up to 128 items then delete last 12.077 us/op 6.0285 us/op 2.00
Set add up to 128 items then delete middle 8.9704 us/op 3.9063 us/op 2.30
OrderedSet add up to 128 items then delete middle 17.121 us/op 11.203 us/op 1.53
Set add up to 256 items then delete first 18.325 us/op 7.7684 us/op 2.36
OrderedSet add up to 256 items then delete first 23.598 us/op 12.069 us/op 1.96
Set add up to 256 items then delete last 18.458 us/op 7.9872 us/op 2.31
OrderedSet add up to 256 items then delete last 24.770 us/op 12.345 us/op 2.01
Set add up to 256 items then delete middle 18.553 us/op 8.5795 us/op 2.16
OrderedSet add up to 256 items then delete middle 45.348 us/op 36.941 us/op 1.23
transfer serialized Status (84 B) 1.8100 us/op 1.6000 us/op 1.13
copy serialized Status (84 B) 1.6020 us/op 1.4860 us/op 1.08
transfer serialized SignedVoluntaryExit (112 B) 2.0360 us/op 1.5650 us/op 1.30
copy serialized SignedVoluntaryExit (112 B) 1.6920 us/op 1.4490 us/op 1.17
transfer serialized ProposerSlashing (416 B) 3.1340 us/op 1.7050 us/op 1.84
copy serialized ProposerSlashing (416 B) 2.0280 us/op 1.8910 us/op 1.07
transfer serialized Attestation (485 B) 1.9610 us/op 1.7550 us/op 1.12
copy serialized Attestation (485 B) 1.8150 us/op 1.7640 us/op 1.03
transfer serialized AttesterSlashing (33232 B) 2.0610 us/op 2.5380 us/op 0.81
copy serialized AttesterSlashing (33232 B) 5.2110 us/op 9.5780 us/op 0.54
transfer serialized Small SignedBeaconBlock (128000 B) 2.5100 us/op 2.6500 us/op 0.95
copy serialized Small SignedBeaconBlock (128000 B) 15.926 us/op 26.984 us/op 0.59
transfer serialized Avg SignedBeaconBlock (200000 B) 2.8510 us/op 2.3470 us/op 1.21
copy serialized Avg SignedBeaconBlock (200000 B) 48.704 us/op 43.820 us/op 1.11
transfer serialized BlobsSidecar (524380 B) 4.9420 us/op 2.6410 us/op 1.87
copy serialized BlobsSidecar (524380 B) 181.40 us/op 116.32 us/op 1.56
transfer serialized Big SignedBeaconBlock (1000000 B) 7.0140 us/op 3.3100 us/op 2.12
copy serialized Big SignedBeaconBlock (1000000 B) 306.84 us/op 215.06 us/op 1.43
pass gossip attestations to forkchoice per slot 5.1794 ms/op 2.8380 ms/op 1.82
forkChoice updateHead vc 100000 bc 64 eq 0 1.1053 ms/op 482.34 us/op 2.29
forkChoice updateHead vc 600000 bc 64 eq 0 8.1585 ms/op 3.0077 ms/op 2.71
forkChoice updateHead vc 1000000 bc 64 eq 0 8.3239 ms/op 4.5432 ms/op 1.83
forkChoice updateHead vc 600000 bc 320 eq 0 4.2537 ms/op 2.6454 ms/op 1.61
forkChoice updateHead vc 600000 bc 1200 eq 0 4.3732 ms/op 2.7716 ms/op 1.58
forkChoice updateHead vc 600000 bc 7200 eq 0 5.2522 ms/op 3.4828 ms/op 1.51
forkChoice updateHead vc 600000 bc 64 eq 1000 11.250 ms/op 10.373 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 10000 15.628 ms/op 9.8645 ms/op 1.58
forkChoice updateHead vc 600000 bc 64 eq 300000 16.710 ms/op 12.161 ms/op 1.37
computeDeltas 500000 validators 300 proto nodes 7.4053 ms/op 3.1184 ms/op 2.37
computeDeltas 500000 validators 1200 proto nodes 6.6031 ms/op 3.6818 ms/op 1.79
computeDeltas 500000 validators 7200 proto nodes 6.3627 ms/op 3.1981 ms/op 1.99
computeDeltas 750000 validators 300 proto nodes 9.3664 ms/op 4.9197 ms/op 1.90
computeDeltas 750000 validators 1200 proto nodes 9.5534 ms/op 4.8755 ms/op 1.96
computeDeltas 750000 validators 7200 proto nodes 9.3481 ms/op 5.0171 ms/op 1.86
computeDeltas 1400000 validators 300 proto nodes 18.368 ms/op 10.282 ms/op 1.79
computeDeltas 1400000 validators 1200 proto nodes 17.603 ms/op 10.768 ms/op 1.63
computeDeltas 1400000 validators 7200 proto nodes 17.923 ms/op 9.7215 ms/op 1.84
computeDeltas 2100000 validators 300 proto nodes 28.761 ms/op 14.249 ms/op 2.02
computeDeltas 2100000 validators 1200 proto nodes 27.280 ms/op 15.160 ms/op 1.80
computeDeltas 2100000 validators 7200 proto nodes 27.077 ms/op 14.818 ms/op 1.83
computeProposerBoostScoreFromBalances 500000 validators 3.2463 ms/op 2.8930 ms/op 1.12
computeProposerBoostScoreFromBalances 750000 validators 3.2612 ms/op 2.8920 ms/op 1.13
computeProposerBoostScoreFromBalances 1400000 validators 3.3241 ms/op 2.9361 ms/op 1.13
computeProposerBoostScoreFromBalances 2100000 validators 3.2112 ms/op 2.9915 ms/op 1.07
altair processAttestation - 250000 vs - 7PWei normalcase 2.4185 ms/op 12.783 ms/op 0.19
altair processAttestation - 250000 vs - 7PWei worstcase 3.2742 ms/op 12.375 ms/op 0.26
altair processAttestation - setStatus - 1/6 committees join 181.76 us/op 183.88 us/op 0.99
altair processAttestation - setStatus - 1/3 committees join 357.27 us/op 257.85 us/op 1.39
altair processAttestation - setStatus - 1/2 committees join 468.41 us/op 311.88 us/op 1.50
altair processAttestation - setStatus - 2/3 committees join 596.25 us/op 331.71 us/op 1.80
altair processAttestation - setStatus - 4/5 committees join 815.47 us/op 554.74 us/op 1.47
altair processAttestation - setStatus - 100% committees join 962.84 us/op 588.18 us/op 1.64
altair processBlock - 250000 vs - 7PWei normalcase 10.966 ms/op 10.266 ms/op 1.07
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.115 ms/op 41.150 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase 40.868 ms/op 42.412 ms/op 0.96
altair processBlock - 250000 vs - 7PWei worstcase hashState 93.368 ms/op 108.59 ms/op 0.86
phase0 processBlock - 250000 vs - 7PWei normalcase 3.3344 ms/op 2.2212 ms/op 1.50
phase0 processBlock - 250000 vs - 7PWei worstcase 31.571 ms/op 26.671 ms/op 1.18
altair processEth1Data - 250000 vs - 7PWei normalcase 477.41 us/op 460.20 us/op 1.04
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 14.515 us/op 14.303 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 68.320 us/op 51.789 us/op 1.32
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 21.174 us/op 17.643 us/op 1.20
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 12.400 us/op 15.948 us/op 0.78
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 182.09 us/op 173.35 us/op 1.05
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2530 ms/op 1.0752 ms/op 1.17
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8185 ms/op 1.6037 ms/op 1.13
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8660 ms/op 1.5285 ms/op 1.22
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.4085 ms/op 4.2723 ms/op 1.03
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5601 ms/op 2.2487 ms/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.0299 ms/op 5.2732 ms/op 1.14
Tree 40 250000 create 397.80 ms/op 255.63 ms/op 1.56
Tree 40 250000 get(125000) 204.27 ns/op 134.44 ns/op 1.52
Tree 40 250000 set(125000) 1.1878 us/op 827.17 ns/op 1.44
Tree 40 250000 toArray() 29.460 ms/op 29.768 ms/op 0.99
Tree 40 250000 iterate all - toArray() + loop 32.007 ms/op 23.184 ms/op 1.38
Tree 40 250000 iterate all - get(i) 77.804 ms/op 60.034 ms/op 1.30
MutableVector 250000 create 17.611 ms/op 12.053 ms/op 1.46
MutableVector 250000 get(125000) 6.7010 ns/op 6.2240 ns/op 1.08
MutableVector 250000 set(125000) 471.23 ns/op 223.38 ns/op 2.11
MutableVector 250000 toArray() 4.5991 ms/op 2.7597 ms/op 1.67
MutableVector 250000 iterate all - toArray() + loop 4.5078 ms/op 4.7855 ms/op 0.94
MutableVector 250000 iterate all - get(i) 1.5440 ms/op 1.4304 ms/op 1.08
Array 250000 create 3.9400 ms/op 4.5071 ms/op 0.87
Array 250000 clone - spread 1.3626 ms/op 1.1982 ms/op 1.14
Array 250000 get(125000) 0.69100 ns/op 0.62000 ns/op 1.11
Array 250000 set(125000) 0.82400 ns/op 0.70800 ns/op 1.16
Array 250000 iterate all - loop 94.043 us/op 87.632 us/op 1.07
effectiveBalanceIncrements clone Uint8Array 300000 48.553 us/op 15.118 us/op 3.21
effectiveBalanceIncrements clone MutableVector 300000 452.00 ns/op 323.00 ns/op 1.40
effectiveBalanceIncrements rw all Uint8Array 300000 204.45 us/op 173.16 us/op 1.18
effectiveBalanceIncrements rw all MutableVector 300000 140.83 ms/op 78.842 ms/op 1.79
phase0 afterProcessEpoch - 250000 vs - 7PWei 138.75 ms/op 84.293 ms/op 1.65
phase0 beforeProcessEpoch - 250000 vs - 7PWei 53.495 ms/op 57.570 ms/op 0.93
altair processEpoch - mainnet_e81889 486.18 ms/op 485.79 ms/op 1.00
mainnet_e81889 - altair beforeProcessEpoch 89.208 ms/op 78.445 ms/op 1.14
mainnet_e81889 - altair processJustificationAndFinalization 16.118 us/op 17.079 us/op 0.94
mainnet_e81889 - altair processInactivityUpdates 6.2288 ms/op 7.7604 ms/op 0.80
mainnet_e81889 - altair processRewardsAndPenalties 83.121 ms/op 70.059 ms/op 1.19
mainnet_e81889 - altair processRegistryUpdates 3.0950 us/op 3.6380 us/op 0.85
mainnet_e81889 - altair processSlashings 446.00 ns/op 721.00 ns/op 0.62
mainnet_e81889 - altair processEth1DataReset 715.00 ns/op 425.00 ns/op 1.68
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2474 ms/op 917.58 us/op 1.36
mainnet_e81889 - altair processSlashingsReset 4.2670 us/op 3.8820 us/op 1.10
mainnet_e81889 - altair processRandaoMixesReset 5.8730 us/op 3.2060 us/op 1.83
mainnet_e81889 - altair processHistoricalRootsUpdate 557.00 ns/op 3.1760 us/op 0.18
mainnet_e81889 - altair processParticipationFlagUpdates 2.4420 us/op 1.6170 us/op 1.51
mainnet_e81889 - altair processSyncCommitteeUpdates 670.00 ns/op 742.00 ns/op 0.90
mainnet_e81889 - altair afterProcessEpoch 124.68 ms/op 84.995 ms/op 1.47
capella processEpoch - mainnet_e217614 2.1428 s/op 2.1211 s/op 1.01
mainnet_e217614 - capella beforeProcessEpoch 484.66 ms/op 453.19 ms/op 1.07
mainnet_e217614 - capella processJustificationAndFinalization 17.196 us/op 9.7790 us/op 1.76
mainnet_e217614 - capella processInactivityUpdates 18.637 ms/op 16.188 ms/op 1.15
mainnet_e217614 - capella processRewardsAndPenalties 620.60 ms/op 493.92 ms/op 1.26
mainnet_e217614 - capella processRegistryUpdates 26.567 us/op 19.639 us/op 1.35
mainnet_e217614 - capella processSlashings 480.00 ns/op 450.00 ns/op 1.07
mainnet_e217614 - capella processEth1DataReset 548.00 ns/op 448.00 ns/op 1.22
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.1432 ms/op 3.1101 ms/op 1.33
mainnet_e217614 - capella processSlashingsReset 3.2280 us/op 2.6880 us/op 1.20
mainnet_e217614 - capella processRandaoMixesReset 5.6650 us/op 3.6100 us/op 1.57
mainnet_e217614 - capella processHistoricalRootsUpdate 888.00 ns/op 693.00 ns/op 1.28
mainnet_e217614 - capella processParticipationFlagUpdates 3.2290 us/op 1.4090 us/op 2.29
mainnet_e217614 - capella afterProcessEpoch 338.02 ms/op 212.77 ms/op 1.59
phase0 processEpoch - mainnet_e58758 545.99 ms/op 358.76 ms/op 1.52
mainnet_e58758 - phase0 beforeProcessEpoch 180.01 ms/op 119.34 ms/op 1.51
mainnet_e58758 - phase0 processJustificationAndFinalization 19.160 us/op 10.832 us/op 1.77
mainnet_e58758 - phase0 processRewardsAndPenalties 70.677 ms/op 46.233 ms/op 1.53
mainnet_e58758 - phase0 processRegistryUpdates 11.155 us/op 10.054 us/op 1.11
mainnet_e58758 - phase0 processSlashings 817.00 ns/op 425.00 ns/op 1.92
mainnet_e58758 - phase0 processEth1DataReset 521.00 ns/op 701.00 ns/op 0.74
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0752 ms/op 852.30 us/op 1.26
mainnet_e58758 - phase0 processSlashingsReset 2.8670 us/op 2.4420 us/op 1.17
mainnet_e58758 - phase0 processRandaoMixesReset 4.5000 us/op 3.2960 us/op 1.37
mainnet_e58758 - phase0 processHistoricalRootsUpdate 476.00 ns/op 545.00 ns/op 0.87
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.7480 us/op 2.7710 us/op 1.71
mainnet_e58758 - phase0 afterProcessEpoch 101.42 ms/op 68.760 ms/op 1.47
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2616 ms/op 916.09 us/op 1.38
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4432 ms/op 1.1756 ms/op 1.23
altair processInactivityUpdates - 250000 normalcase 26.688 ms/op 25.158 ms/op 1.06
altair processInactivityUpdates - 250000 worstcase 26.881 ms/op 25.755 ms/op 1.04
phase0 processRegistryUpdates - 250000 normalcase 10.428 us/op 7.2610 us/op 1.44
phase0 processRegistryUpdates - 250000 badcase_full_deposits 392.61 us/op 366.88 us/op 1.07
phase0 processRegistryUpdates - 250000 worstcase 0.5 150.10 ms/op 135.87 ms/op 1.10
altair processRewardsAndPenalties - 250000 normalcase 75.336 ms/op 64.376 ms/op 1.17
altair processRewardsAndPenalties - 250000 worstcase 79.937 ms/op 63.129 ms/op 1.27
phase0 getAttestationDeltas - 250000 normalcase 8.5042 ms/op 8.3145 ms/op 1.02
phase0 getAttestationDeltas - 250000 worstcase 9.5487 ms/op 6.5628 ms/op 1.45
phase0 processSlashings - 250000 worstcase 2.4041 ms/op 1.8947 ms/op 1.27
altair processSyncCommitteeUpdates - 250000 163.87 ms/op 127.93 ms/op 1.28
BeaconState.hashTreeRoot - No change 266.00 ns/op 412.00 ns/op 0.65
BeaconState.hashTreeRoot - 1 full validator 155.52 us/op 133.50 us/op 1.16
BeaconState.hashTreeRoot - 32 full validator 1.9313 ms/op 1.3245 ms/op 1.46
BeaconState.hashTreeRoot - 512 full validator 19.006 ms/op 14.045 ms/op 1.35
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 212.46 us/op 133.66 us/op 1.59
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1995 ms/op 1.7377 ms/op 1.27
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.235 ms/op 30.651 ms/op 0.79
BeaconState.hashTreeRoot - 1 balances 121.16 us/op 143.04 us/op 0.85
BeaconState.hashTreeRoot - 32 balances 1.0598 ms/op 1.4212 ms/op 0.75
BeaconState.hashTreeRoot - 512 balances 10.901 ms/op 13.109 ms/op 0.83
BeaconState.hashTreeRoot - 250000 balances 215.45 ms/op 178.21 ms/op 1.21
aggregationBits - 2048 els - zipIndexesInBitList 19.491 us/op 11.055 us/op 1.76
byteArrayEquals 32 50.995 ns/op 48.711 ns/op 1.05
Buffer.compare 32 56.141 ns/op 40.559 ns/op 1.38
byteArrayEquals 1024 1.5189 us/op 1.2788 us/op 1.19
Buffer.compare 1024 70.068 ns/op 46.867 ns/op 1.50
byteArrayEquals 16384 22.993 us/op 22.207 us/op 1.04
Buffer.compare 16384 233.30 ns/op 236.94 ns/op 0.98
byteArrayEquals 123687377 176.88 ms/op 171.94 ms/op 1.03
Buffer.compare 123687377 7.2722 ms/op 6.9089 ms/op 1.05
byteArrayEquals 32 - diff last byte 49.946 ns/op 50.924 ns/op 0.98
Buffer.compare 32 - diff last byte 56.138 ns/op 40.630 ns/op 1.38
byteArrayEquals 1024 - diff last byte 1.4772 us/op 1.2843 us/op 1.15
Buffer.compare 1024 - diff last byte 74.819 ns/op 47.859 ns/op 1.56
byteArrayEquals 16384 - diff last byte 23.860 us/op 20.828 us/op 1.15
Buffer.compare 16384 - diff last byte 258.42 ns/op 220.40 ns/op 1.17
byteArrayEquals 123687377 - diff last byte 181.50 ms/op 169.33 ms/op 1.07
Buffer.compare 123687377 - diff last byte 9.8311 ms/op 6.8393 ms/op 1.44
byteArrayEquals 32 - random bytes 7.0880 ns/op 6.1680 ns/op 1.15
Buffer.compare 32 - random bytes 64.316 ns/op 43.077 ns/op 1.49
byteArrayEquals 1024 - random bytes 7.0600 ns/op 6.3120 ns/op 1.12
Buffer.compare 1024 - random bytes 64.092 ns/op 44.249 ns/op 1.45
byteArrayEquals 16384 - random bytes 7.2540 ns/op 5.3340 ns/op 1.36
Buffer.compare 16384 - random bytes 63.191 ns/op 42.837 ns/op 1.48
byteArrayEquals 123687377 - random bytes 9.9600 ns/op 8.7700 ns/op 1.14
Buffer.compare 123687377 - random bytes 75.510 ns/op 51.620 ns/op 1.46
regular array get 100000 times 39.557 us/op 35.163 us/op 1.12
wrappedArray get 100000 times 35.142 us/op 34.619 us/op 1.02
arrayWithProxy get 100000 times 14.024 ms/op 11.983 ms/op 1.17
ssz.Root.equals 51.565 ns/op 58.662 ns/op 0.88
byteArrayEquals 50.961 ns/op 51.544 ns/op 0.99
Buffer.compare 12.223 ns/op 11.540 ns/op 1.06
shuffle list - 16384 els 7.4408 ms/op 6.4268 ms/op 1.16
shuffle list - 250000 els 104.09 ms/op 81.649 ms/op 1.27
processSlot - 1 slots 20.344 us/op 19.786 us/op 1.03
processSlot - 32 slots 4.1407 ms/op 4.4019 ms/op 0.94
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 62.170 ms/op 55.741 ms/op 1.12
getCommitteeAssignments - req 1 vs - 250000 vc 2.5830 ms/op 2.3509 ms/op 1.10
getCommitteeAssignments - req 100 vs - 250000 vc 3.8619 ms/op 3.5083 ms/op 1.10
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6027 ms/op 3.9272 ms/op 1.17
findModifiedValidators - 10000 modified validators 615.69 ms/op 540.02 ms/op 1.14
findModifiedValidators - 1000 modified validators 451.06 ms/op 423.95 ms/op 1.06
findModifiedValidators - 100 modified validators 458.07 ms/op 394.36 ms/op 1.16
findModifiedValidators - 10 modified validators 461.01 ms/op 359.61 ms/op 1.28
findModifiedValidators - 1 modified validators 427.03 ms/op 356.77 ms/op 1.20
findModifiedValidators - no difference 451.82 ms/op 390.77 ms/op 1.16
compare ViewDUs 4.9039 s/op 4.9290 s/op 0.99
compare each validator Uint8Array 1.8759 s/op 1.6847 s/op 1.11
compare ViewDU to Uint8Array 1.2682 s/op 927.24 ms/op 1.37
migrate state 1000000 validators, 24 modified, 0 new 782.01 ms/op 693.89 ms/op 1.13
migrate state 1000000 validators, 1700 modified, 1000 new 1.0687 s/op 967.31 ms/op 1.10
migrate state 1000000 validators, 3400 modified, 2000 new 1.3193 s/op 1.1512 s/op 1.15
migrate state 1500000 validators, 24 modified, 0 new 797.32 ms/op 589.89 ms/op 1.35
migrate state 1500000 validators, 1700 modified, 1000 new 1.0563 s/op 963.19 ms/op 1.10
migrate state 1500000 validators, 3400 modified, 2000 new 1.2936 s/op 1.1352 s/op 1.14
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3200 ns/op 4.9500 ns/op 0.87
state getBlockRootAtSlot - 250000 vs - 7PWei 712.56 ns/op 450.26 ns/op 1.58
computeProposers - vc 250000 8.4304 ms/op 5.9652 ms/op 1.41
computeEpochShuffling - vc 250000 100.42 ms/op 69.558 ms/op 1.44
getNextSyncCommittee - vc 250000 149.74 ms/op 106.02 ms/op 1.41
computeSigningRoot for AttestationData 24.005 us/op 22.746 us/op 1.06
hash AttestationData serialized data then Buffer.toString(base64) 2.1606 us/op 1.2459 us/op 1.73
toHexString serialized data 993.93 ns/op 811.17 ns/op 1.23
Buffer.toString(base64) 202.86 ns/op 153.34 ns/op 1.32

by benchmarkbot/action

@wemeetagain
Copy link
Member Author

closing this PR until it's ready for more feedback

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.

2 participants