Skip to content

Commit

Permalink
fix: gossipsub to yield more to the macro queue (#5664)
Browse files Browse the repository at this point in the history
* fix: add setTimeout to onGossipsubMessage and onValidationResult

* chore: more comments
  • Loading branch information
twoeths authored Jun 19, 2023
1 parent fd0f476 commit 5699333
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions packages/beacon-node/src/network/gossip/gossipsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,30 @@ export class Eth2Gossipsub extends GossipSub {
// Get seenTimestamp before adding the message to the queue or add async delays
const seenTimestampSec = Date.now() / 1000;

// Emit message to network processor
this.events.emit(NetworkEvent.pendingGossipsubMessage, {
topic,
msg,
msgId,
// Hot path, use cached .toString() version
propagationSource: propagationSource.toString(),
seenTimestampSec,
startProcessUnixSec: null,
});
// Use setTimeout to yield to the macro queue
// Without this we'll have huge event loop lag
// See https://github.com/ChainSafe/lodestar/issues/5604
setTimeout(() => {
this.events.emit(NetworkEvent.pendingGossipsubMessage, {
topic,
msg,
msgId,
// Hot path, use cached .toString() version
propagationSource: propagationSource.toString(),
seenTimestampSec,
startProcessUnixSec: null,
});
}, 0);
}

private onValidationResult(data: NetworkEventData[NetworkEvent.gossipMessageValidationResult]): void {
// TODO: reportMessageValidationResult should take PeerIdStr since it only uses string version
this.reportMessageValidationResult(data.msgId, peerIdFromString(data.propagationSource), data.acceptance);
// Use setTimeout to yield to the macro queue
// Without this we'll have huge event loop lag
// See https://github.com/ChainSafe/lodestar/issues/5604
setTimeout(() => {
// TODO: reportMessageValidationResult should take PeerIdStr since it only uses string version
this.reportMessageValidationResult(data.msgId, peerIdFromString(data.propagationSource), data.acceptance);
}, 0);
}
}

Expand Down

1 comment on commit 5699333

@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: 5699333 Previous: fd0f476 Ratio
phase0 processEffectiveBalanceUpdates - 250000 normalcase 7.4601 ms/op 1.7001 ms/op 4.39
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 8.1291 ms/op 1.9173 ms/op 4.24
altair processInactivityUpdates - 250000 worstcase 107.28 ms/op 30.550 ms/op 3.51
phase0 processRegistryUpdates - 250000 badcase_full_deposits 1.5085 ms/op 340.39 us/op 4.43
phase0 processRegistryUpdates - 250000 worstcase 0.5 565.02 ms/op 151.46 ms/op 3.73
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 45.288 ms/op 14.518 ms/op 3.12
Full benchmark results
Benchmark suite Current: 5699333 Previous: fd0f476 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 942.71 us/op 587.55 us/op 1.60
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 77.494 us/op 58.192 us/op 1.33
BLS verify - blst-native 1.6384 ms/op 1.2759 ms/op 1.28
BLS verifyMultipleSignatures 3 - blst-native 3.9224 ms/op 2.5994 ms/op 1.51
BLS verifyMultipleSignatures 8 - blst-native 8.5784 ms/op 5.6513 ms/op 1.52
BLS verifyMultipleSignatures 32 - blst-native 31.892 ms/op 20.022 ms/op 1.59
BLS aggregatePubkeys 32 - blst-native 41.033 us/op 27.071 us/op 1.52
BLS aggregatePubkeys 128 - blst-native 171.66 us/op 105.10 us/op 1.63
getAttestationsForBlock 99.127 ms/op 70.780 ms/op 1.40
isKnown best case - 1 super set check 460.00 ns/op 281.00 ns/op 1.64
isKnown normal case - 2 super set checks 441.00 ns/op 273.00 ns/op 1.62
isKnown worse case - 16 super set checks 425.00 ns/op 274.00 ns/op 1.55
CheckpointStateCache - add get delete 9.1720 us/op 6.1620 us/op 1.49
validate gossip signedAggregateAndProof - struct 5.9177 ms/op 2.9042 ms/op 2.04
validate gossip attestation - struct 1.9175 ms/op 1.3876 ms/op 1.38
pickEth1Vote - no votes 2.4797 ms/op 1.4439 ms/op 1.72
pickEth1Vote - max votes 21.191 ms/op 12.385 ms/op 1.71
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.105 ms/op 9.9980 ms/op 1.91
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.879 ms/op 18.004 ms/op 1.60
pickEth1Vote - Eth1Data fastSerialize value x2048 1.5244 ms/op 822.23 us/op 1.85
pickEth1Vote - Eth1Data fastSerialize tree x2048 11.837 ms/op 7.9480 ms/op 1.49
bytes32 toHexString 1.0690 us/op 779.00 ns/op 1.37
bytes32 Buffer.toString(hex) 718.00 ns/op 439.00 ns/op 1.64
bytes32 Buffer.toString(hex) from Uint8Array 1.1000 us/op 652.00 ns/op 1.69
bytes32 Buffer.toString(hex) + 0x 770.00 ns/op 439.00 ns/op 1.75
Object access 1 prop 0.41000 ns/op 0.20500 ns/op 2.00
Map access 1 prop 0.34200 ns/op 0.17500 ns/op 1.95
Object get x1000 14.711 ns/op 7.2090 ns/op 2.04
Map get x1000 1.2870 ns/op 0.68700 ns/op 1.87
Object set x1000 116.05 ns/op 76.826 ns/op 1.51
Map set x1000 97.227 ns/op 59.926 ns/op 1.62
Return object 10000 times 0.46870 ns/op 0.25360 ns/op 1.85
Throw Error 10000 times 8.5183 us/op 4.4873 us/op 1.90
fastMsgIdFn sha256 / 200 bytes 7.3180 us/op 3.8140 us/op 1.92
fastMsgIdFn h32 xxhash / 200 bytes 605.00 ns/op 338.00 ns/op 1.79
fastMsgIdFn h64 xxhash / 200 bytes 956.00 ns/op 508.00 ns/op 1.88
fastMsgIdFn sha256 / 1000 bytes 29.853 us/op 12.271 us/op 2.43
fastMsgIdFn h32 xxhash / 1000 bytes 1.0970 us/op 476.00 ns/op 2.30
fastMsgIdFn h64 xxhash / 1000 bytes 982.00 ns/op 603.00 ns/op 1.63
fastMsgIdFn sha256 / 10000 bytes 232.97 us/op 110.32 us/op 2.11
fastMsgIdFn h32 xxhash / 10000 bytes 3.6930 us/op 2.0930 us/op 1.76
fastMsgIdFn h64 xxhash / 10000 bytes 2.8670 us/op 1.5450 us/op 1.86
enrSubnets - fastDeserialize 64 bits 2.9730 us/op 1.9600 us/op 1.52
enrSubnets - ssz BitVector 64 bits 1.0220 us/op 666.00 ns/op 1.53
enrSubnets - fastDeserialize 4 bits 374.00 ns/op 226.00 ns/op 1.65
enrSubnets - ssz BitVector 4 bits 1.0810 us/op 673.00 ns/op 1.61
prioritizePeers score -10:0 att 32-0.1 sync 2-0 233.12 us/op 123.90 us/op 1.88
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 306.80 us/op 166.51 us/op 1.84
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 316.08 us/op 205.55 us/op 1.54
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 634.19 us/op 396.67 us/op 1.60
prioritizePeers score 0:0 att 64-1 sync 4-1 789.32 us/op 479.06 us/op 1.65
array of 16000 items push then shift 2.7133 us/op 1.7741 us/op 1.53
LinkedList of 16000 items push then shift 15.846 ns/op 10.474 ns/op 1.51
array of 16000 items push then pop 141.27 ns/op 124.66 ns/op 1.13
LinkedList of 16000 items push then pop 14.926 ns/op 9.6260 ns/op 1.55
array of 24000 items push then shift 4.1661 us/op 2.5322 us/op 1.65
LinkedList of 24000 items push then shift 15.786 ns/op 10.719 ns/op 1.47
array of 24000 items push then pop 113.89 ns/op 92.367 ns/op 1.23
LinkedList of 24000 items push then pop 15.347 ns/op 9.4000 ns/op 1.63
intersect bitArray bitLen 8 20.469 ns/op 13.848 ns/op 1.48
intersect array and set length 8 120.30 ns/op 119.95 ns/op 1.00
intersect bitArray bitLen 128 61.361 ns/op 46.240 ns/op 1.33
intersect array and set length 128 1.9819 us/op 1.3854 us/op 1.43
Buffer.concat 32 items 6.6210 us/op 3.1590 us/op 2.10
Uint8Array.set 32 items 5.0370 us/op 2.9570 us/op 1.70
transfer serialized Status (84 B) 3.9820 us/op 2.2670 us/op 1.76
copy serialized Status (84 B) 3.4240 us/op 1.8610 us/op 1.84
transfer serialized SignedVoluntaryExit (112 B) 4.4950 us/op 2.3200 us/op 1.94
copy serialized SignedVoluntaryExit (112 B) 3.2020 us/op 1.8740 us/op 1.71
transfer serialized ProposerSlashing (416 B) 4.1940 us/op 2.6610 us/op 1.58
copy serialized ProposerSlashing (416 B) 4.0240 us/op 2.5370 us/op 1.59
transfer serialized Attestation (485 B) 4.6620 us/op 2.6830 us/op 1.74
copy serialized Attestation (485 B) 4.5690 us/op 2.5240 us/op 1.81
transfer serialized AttesterSlashing (33232 B) 5.1690 us/op 2.7720 us/op 1.86
copy serialized AttesterSlashing (33232 B) 11.173 us/op 8.3960 us/op 1.33
transfer serialized Small SignedBeaconBlock (128000 B) 4.9980 us/op 3.0850 us/op 1.62
copy serialized Small SignedBeaconBlock (128000 B) 21.089 us/op 26.240 us/op 0.80
transfer serialized Avg SignedBeaconBlock (200000 B) 5.1490 us/op 4.0530 us/op 1.27
copy serialized Avg SignedBeaconBlock (200000 B) 26.913 us/op 30.954 us/op 0.87
transfer serialized BlobsSidecar (524380 B) 4.9410 us/op 4.3480 us/op 1.14
copy serialized BlobsSidecar (524380 B) 209.67 us/op 218.78 us/op 0.96
transfer serialized Big SignedBeaconBlock (1000000 B) 5.5930 us/op 4.5390 us/op 1.23
copy serialized Big SignedBeaconBlock (1000000 B) 395.81 us/op 375.43 us/op 1.05
pass gossip attestations to forkchoice per slot 4.2153 ms/op 2.8473 ms/op 1.48
forkChoice updateHead vc 100000 bc 64 eq 0 3.4650 ms/op 2.1991 ms/op 1.58
forkChoice updateHead vc 600000 bc 64 eq 0 18.747 ms/op 13.013 ms/op 1.44
forkChoice updateHead vc 1000000 bc 64 eq 0 31.487 ms/op 25.680 ms/op 1.23
forkChoice updateHead vc 600000 bc 320 eq 0 27.826 ms/op 18.698 ms/op 1.49
forkChoice updateHead vc 600000 bc 1200 eq 0 120.24 ms/op 93.662 ms/op 1.28
forkChoice updateHead vc 600000 bc 64 eq 1000 30.569 ms/op 22.462 ms/op 1.36
forkChoice updateHead vc 600000 bc 64 eq 10000 33.429 ms/op 24.552 ms/op 1.36
forkChoice updateHead vc 600000 bc 64 eq 300000 46.206 ms/op 53.645 ms/op 0.86
computeDeltas 4.7471 ms/op 3.6009 ms/op 1.32
computeProposerBoostScoreFromBalances 2.3320 ms/op 1.8835 ms/op 1.24
altair processAttestation - 250000 vs - 7PWei normalcase 3.8260 ms/op 4.0960 ms/op 0.93
altair processAttestation - 250000 vs - 7PWei worstcase 5.5861 ms/op 6.1586 ms/op 0.91
altair processAttestation - setStatus - 1/6 committees join 281.52 us/op 177.41 us/op 1.59
altair processAttestation - setStatus - 1/3 committees join 426.75 us/op 323.26 us/op 1.32
altair processAttestation - setStatus - 1/2 committees join 519.83 us/op 411.80 us/op 1.26
altair processAttestation - setStatus - 2/3 committees join 668.61 us/op 506.42 us/op 1.32
altair processAttestation - setStatus - 4/5 committees join 1.1563 ms/op 744.18 us/op 1.55
altair processAttestation - setStatus - 100% committees join 1.3444 ms/op 820.72 us/op 1.64
altair processBlock - 250000 vs - 7PWei normalcase 29.324 ms/op 23.462 ms/op 1.25
altair processBlock - 250000 vs - 7PWei normalcase hashState 41.359 ms/op 35.453 ms/op 1.17
altair processBlock - 250000 vs - 7PWei worstcase 87.982 ms/op 62.304 ms/op 1.41
altair processBlock - 250000 vs - 7PWei worstcase hashState 121.50 ms/op 84.070 ms/op 1.45
phase0 processBlock - 250000 vs - 7PWei normalcase 3.3051 ms/op 2.6720 ms/op 1.24
phase0 processBlock - 250000 vs - 7PWei worstcase 53.706 ms/op 33.412 ms/op 1.61
altair processEth1Data - 250000 vs - 7PWei normalcase 974.71 us/op 730.04 us/op 1.34
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 13.326 us/op 10.473 us/op 1.27
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 45.488 us/op 32.991 us/op 1.38
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 22.302 us/op 13.784 us/op 1.62
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 18.922 us/op 10.453 us/op 1.81
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 144.61 us/op 129.70 us/op 1.11
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3898 ms/op 819.80 us/op 1.70
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9150 ms/op 1.1328 ms/op 1.69
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6325 ms/op 1.0302 ms/op 1.58
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.6163 ms/op 3.5159 ms/op 1.60
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.7002 ms/op 2.0767 ms/op 1.78
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 8.0286 ms/op 6.1388 ms/op 1.31
Tree 40 250000 create 710.24 ms/op 754.15 ms/op 0.94
Tree 40 250000 get(125000) 316.82 ns/op 206.52 ns/op 1.53
Tree 40 250000 set(125000) 1.9910 us/op 1.1711 us/op 1.70
Tree 40 250000 toArray() 31.204 ms/op 25.151 ms/op 1.24
Tree 40 250000 iterate all - toArray() + loop 50.326 ms/op 25.069 ms/op 2.01
Tree 40 250000 iterate all - get(i) 167.02 ms/op 81.442 ms/op 2.05
MutableVector 250000 create 21.750 ms/op 14.150 ms/op 1.54
MutableVector 250000 get(125000) 17.257 ns/op 8.3110 ns/op 2.08
MutableVector 250000 set(125000) 700.91 ns/op 389.31 ns/op 1.80
MutableVector 250000 toArray() 6.2682 ms/op 4.0247 ms/op 1.56
MutableVector 250000 iterate all - toArray() + loop 6.6371 ms/op 3.4463 ms/op 1.93
MutableVector 250000 iterate all - get(i) 3.3225 ms/op 1.5831 ms/op 2.10
Array 250000 create 5.9815 ms/op 3.0793 ms/op 1.94
Array 250000 clone - spread 2.7491 ms/op 1.2506 ms/op 2.20
Array 250000 get(125000) 1.4370 ns/op 0.64600 ns/op 2.22
Array 250000 set(125000) 1.5920 ns/op 0.67600 ns/op 2.36
Array 250000 iterate all - loop 204.25 us/op 90.241 us/op 2.26
effectiveBalanceIncrements clone Uint8Array 300000 65.986 us/op 55.321 us/op 1.19
effectiveBalanceIncrements clone MutableVector 300000 893.00 ns/op 409.00 ns/op 2.18
effectiveBalanceIncrements rw all Uint8Array 300000 405.20 us/op 177.54 us/op 2.28
effectiveBalanceIncrements rw all MutableVector 300000 180.91 ms/op 115.11 ms/op 1.57
phase0 afterProcessEpoch - 250000 vs - 7PWei 252.95 ms/op 133.39 ms/op 1.90
phase0 beforeProcessEpoch - 250000 vs - 7PWei 79.508 ms/op 56.575 ms/op 1.41
altair processEpoch - mainnet_e81889 1.0782 s/op 377.11 ms/op 2.86
mainnet_e81889 - altair beforeProcessEpoch 222.10 ms/op 101.80 ms/op 2.18
mainnet_e81889 - altair processJustificationAndFinalization 110.21 us/op 39.972 us/op 2.76
mainnet_e81889 - altair processInactivityUpdates 27.122 ms/op 8.5176 ms/op 3.18
mainnet_e81889 - altair processRewardsAndPenalties 167.59 ms/op 88.996 ms/op 1.88
mainnet_e81889 - altair processRegistryUpdates 16.084 us/op 7.7900 us/op 2.06
mainnet_e81889 - altair processSlashings 4.4680 us/op 1.8510 us/op 2.41
mainnet_e81889 - altair processEth1DataReset 3.7180 us/op 1.9320 us/op 1.92
mainnet_e81889 - altair processEffectiveBalanceUpdates 5.6495 ms/op 2.7490 ms/op 2.06
mainnet_e81889 - altair processSlashingsReset 28.122 us/op 15.386 us/op 1.83
mainnet_e81889 - altair processRandaoMixesReset 29.718 us/op 12.751 us/op 2.33
mainnet_e81889 - altair processHistoricalRootsUpdate 5.6620 us/op 2.2010 us/op 2.57
mainnet_e81889 - altair processParticipationFlagUpdates 18.849 us/op 8.4840 us/op 2.22
mainnet_e81889 - altair processSyncCommitteeUpdates 5.7410 us/op 2.2360 us/op 2.57
mainnet_e81889 - altair afterProcessEpoch 419.93 ms/op 182.06 ms/op 2.31
phase0 processEpoch - mainnet_e58758 1.1965 s/op 617.72 ms/op 1.94
mainnet_e58758 - phase0 beforeProcessEpoch 457.62 ms/op 267.36 ms/op 1.71
mainnet_e58758 - phase0 processJustificationAndFinalization 100.72 us/op 41.152 us/op 2.45
mainnet_e58758 - phase0 processRewardsAndPenalties 209.50 ms/op 100.52 ms/op 2.08
mainnet_e58758 - phase0 processRegistryUpdates 48.973 us/op 19.407 us/op 2.52
mainnet_e58758 - phase0 processSlashings 4.5260 us/op 1.6620 us/op 2.72
mainnet_e58758 - phase0 processEth1DataReset 4.6740 us/op 1.6350 us/op 2.86
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 6.9026 ms/op 1.2683 ms/op 5.44
mainnet_e58758 - phase0 processSlashingsReset 26.486 us/op 7.8640 us/op 3.37
mainnet_e58758 - phase0 processRandaoMixesReset 33.513 us/op 8.9760 us/op 3.73
mainnet_e58758 - phase0 processHistoricalRootsUpdate 6.4920 us/op 1.3620 us/op 4.77
mainnet_e58758 - phase0 processParticipationRecordUpdates 31.096 us/op 5.9620 us/op 5.22
mainnet_e58758 - phase0 afterProcessEpoch 349.73 ms/op 110.35 ms/op 3.17
phase0 processEffectiveBalanceUpdates - 250000 normalcase 7.4601 ms/op 1.7001 ms/op 4.39
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 8.1291 ms/op 1.9173 ms/op 4.24
altair processInactivityUpdates - 250000 normalcase 87.882 ms/op 32.180 ms/op 2.73
altair processInactivityUpdates - 250000 worstcase 107.28 ms/op 30.550 ms/op 3.51
phase0 processRegistryUpdates - 250000 normalcase 48.167 us/op 9.2270 us/op 5.22
phase0 processRegistryUpdates - 250000 badcase_full_deposits 1.5085 ms/op 340.39 us/op 4.43
phase0 processRegistryUpdates - 250000 worstcase 0.5 565.02 ms/op 151.46 ms/op 3.73
altair processRewardsAndPenalties - 250000 normalcase 209.85 ms/op 77.028 ms/op 2.72
altair processRewardsAndPenalties - 250000 worstcase 199.33 ms/op 92.596 ms/op 2.15
phase0 getAttestationDeltas - 250000 normalcase 24.573 ms/op 11.151 ms/op 2.20
phase0 getAttestationDeltas - 250000 worstcase 23.941 ms/op 10.956 ms/op 2.19
phase0 processSlashings - 250000 worstcase 11.739 ms/op 5.4997 ms/op 2.13
altair processSyncCommitteeUpdates - 250000 512.95 ms/op 210.86 ms/op 2.43
BeaconState.hashTreeRoot - No change 927.00 ns/op 451.00 ns/op 2.06
BeaconState.hashTreeRoot - 1 full validator 190.63 us/op 61.474 us/op 3.10
BeaconState.hashTreeRoot - 32 full validator 1.6205 ms/op 765.41 us/op 2.12
BeaconState.hashTreeRoot - 512 full validator 16.195 ms/op 7.0808 ms/op 2.29
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 208.28 us/op 71.436 us/op 2.92
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.7218 ms/op 1.0992 ms/op 2.48
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 45.288 ms/op 14.518 ms/op 3.12
BeaconState.hashTreeRoot - 1 balances 134.63 us/op 52.960 us/op 2.54
BeaconState.hashTreeRoot - 32 balances 980.63 us/op 550.37 us/op 1.78
BeaconState.hashTreeRoot - 512 balances 10.944 ms/op 5.5013 ms/op 1.99
BeaconState.hashTreeRoot - 250000 balances 200.22 ms/op 87.757 ms/op 2.28
aggregationBits - 2048 els - zipIndexesInBitList 34.244 us/op 31.143 us/op 1.10
regular array get 100000 times 81.490 us/op 45.732 us/op 1.78
wrappedArray get 100000 times 67.781 us/op 35.948 us/op 1.89
arrayWithProxy get 100000 times 42.419 ms/op 20.132 ms/op 2.11
ssz.Root.equals 1.4710 us/op 718.00 ns/op 2.05
byteArrayEquals 1.3550 us/op 640.00 ns/op 2.12
shuffle list - 16384 els 14.918 ms/op 7.4327 ms/op 2.01
shuffle list - 250000 els 252.37 ms/op 107.22 ms/op 2.35
processSlot - 1 slots 20.500 us/op 10.767 us/op 1.90
processSlot - 32 slots 3.4749 ms/op 1.5955 ms/op 2.18
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 82.085 ms/op 46.955 ms/op 1.75
getCommitteeAssignments - req 1 vs - 250000 vc 8.2820 ms/op 3.2387 ms/op 2.56
getCommitteeAssignments - req 100 vs - 250000 vc 9.3327 ms/op 5.0667 ms/op 1.84
getCommitteeAssignments - req 1000 vs - 250000 vc 10.261 ms/op 5.3177 ms/op 1.93
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 13.730 ns/op 6.2800 ns/op 2.19
state getBlockRootAtSlot - 250000 vs - 7PWei 2.2639 us/op 899.31 ns/op 2.52
computeProposers - vc 250000 31.840 ms/op 12.851 ms/op 2.48
computeEpochShuffling - vc 250000 293.75 ms/op 113.21 ms/op 2.59
getNextSyncCommittee - vc 250000 482.67 ms/op 191.09 ms/op 2.53
computeSigningRoot for AttestationData 38.038 us/op 15.397 us/op 2.47
hash AttestationData serialized data then Buffer.toString(base64) 7.4184 us/op 2.6862 us/op 2.76
toHexString serialized data 3.3512 us/op 1.3811 us/op 2.43
Buffer.toString(base64) 934.95 ns/op 390.04 ns/op 2.40

Please sign in to comment.