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

Add getPeerLogMetadata to ReqResp #5069

Merged
merged 1 commit into from
Jan 27, 2023
Merged

Conversation

dapplion
Copy link
Contributor

Motivation

ReqResp logs allways print client=undefined, because it's missing a getter for the client kind

Description

  • Add getPeerLogMetadata to ReqResp

@dapplion dapplion requested a review from a team as a code owner January 27, 2023 13:36
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 8c040b0 Previous: b13831f Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0824 ms/op 1.0850 ms/op 1.00
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 61.234 us/op 62.000 us/op 0.99
BLS verify - blst-native 2.1759 ms/op 2.1751 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 4.4860 ms/op 4.4867 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 9.6987 ms/op 9.7435 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 35.288 ms/op 35.243 ms/op 1.00
BLS aggregatePubkeys 32 - blst-native 46.432 us/op 46.579 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 182.60 us/op 182.29 us/op 1.00
getAttestationsForBlock 79.041 ms/op 81.370 ms/op 0.97
isKnown best case - 1 super set check 459.00 ns/op 494.00 ns/op 0.93
isKnown normal case - 2 super set checks 448.00 ns/op 498.00 ns/op 0.90
isKnown worse case - 16 super set checks 451.00 ns/op 497.00 ns/op 0.91
CheckpointStateCache - add get delete 8.4600 us/op 8.3780 us/op 1.01
validate gossip signedAggregateAndProof - struct 5.0229 ms/op 5.0160 ms/op 1.00
validate gossip attestation - struct 2.3624 ms/op 2.3655 ms/op 1.00
pickEth1Vote - no votes 2.2331 ms/op 2.1873 ms/op 1.02
pickEth1Vote - max votes 16.437 ms/op 18.183 ms/op 0.90
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.001 ms/op 13.414 ms/op 0.97
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 21.186 ms/op 22.066 ms/op 0.96
pickEth1Vote - Eth1Data fastSerialize value x2048 1.2430 ms/op 1.1444 ms/op 1.09
pickEth1Vote - Eth1Data fastSerialize tree x2048 10.119 ms/op 10.879 ms/op 0.93
bytes32 toHexString 987.00 ns/op 988.00 ns/op 1.00
bytes32 Buffer.toString(hex) 656.00 ns/op 675.00 ns/op 0.97
bytes32 Buffer.toString(hex) from Uint8Array 1.0420 us/op 1.0100 us/op 1.03
bytes32 Buffer.toString(hex) + 0x 680.00 ns/op 671.00 ns/op 1.01
Object access 1 prop 0.33800 ns/op 0.29100 ns/op 1.16
Map access 1 prop 0.32300 ns/op 0.33300 ns/op 0.97
Object get x1000 10.676 ns/op 10.909 ns/op 0.98
Map get x1000 0.98400 ns/op 0.98300 ns/op 1.00
Object set x1000 72.888 ns/op 78.977 ns/op 0.92
Map set x1000 45.227 ns/op 47.704 ns/op 0.95
Return object 10000 times 0.43580 ns/op 0.42970 ns/op 1.01
Throw Error 10000 times 6.6369 us/op 6.5575 us/op 1.01
fastMsgIdFn sha256 / 200 bytes 4.8980 us/op 4.9540 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 519.00 ns/op 547.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 200 bytes 741.00 ns/op 739.00 ns/op 1.00
fastMsgIdFn sha256 / 1000 bytes 15.726 us/op 15.738 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 701.00 ns/op 721.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 797.00 ns/op 822.00 ns/op 0.97
fastMsgIdFn sha256 / 10000 bytes 136.17 us/op 136.28 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 2.5880 us/op 2.6100 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 1.7850 us/op 1.8050 us/op 0.99
enrSubnets - fastDeserialize 64 bits 2.4760 us/op 2.6100 us/op 0.95
enrSubnets - ssz BitVector 64 bits 925.00 ns/op 977.00 ns/op 0.95
enrSubnets - fastDeserialize 4 bits 353.00 ns/op 310.00 ns/op 1.14
enrSubnets - ssz BitVector 4 bits 938.00 ns/op 971.00 ns/op 0.97
prioritizePeers score -10:0 att 32-0.1 sync 2-0 155.31 us/op 132.85 us/op 1.17
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 175.17 us/op 179.07 us/op 0.98
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 253.67 us/op 258.67 us/op 0.98
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 445.99 us/op 451.37 us/op 0.99
prioritizePeers score 0:0 att 64-1 sync 4-1 500.29 us/op 500.87 us/op 1.00
array of 16000 items push then shift 51.654 us/op 51.639 us/op 1.00
LinkedList of 16000 items push then shift 12.660 ns/op 12.777 ns/op 0.99
array of 16000 items push then pop 195.03 ns/op 195.89 ns/op 1.00
LinkedList of 16000 items push then pop 12.134 ns/op 12.248 ns/op 0.99
array of 24000 items push then shift 77.405 us/op 77.511 us/op 1.00
LinkedList of 24000 items push then shift 13.283 ns/op 13.829 ns/op 0.96
array of 24000 items push then pop 193.91 ns/op 199.08 ns/op 0.97
LinkedList of 24000 items push then pop 12.187 ns/op 12.204 ns/op 1.00
intersect bitArray bitLen 8 21.812 ns/op 21.681 ns/op 1.01
intersect array and set length 8 135.24 ns/op 138.51 ns/op 0.98
intersect bitArray bitLen 128 70.246 ns/op 70.870 ns/op 0.99
intersect array and set length 128 1.7674 us/op 1.7457 us/op 1.01
Buffer.concat 32 items 5.1730 us/op 5.2240 us/op 0.99
Uint8Array.set 32 items 3.7660 us/op 3.7020 us/op 1.02
pass gossip attestations to forkchoice per slot 3.6668 ms/op 3.7103 ms/op 0.99
computeDeltas 4.1863 ms/op 4.2709 ms/op 0.98
computeProposerBoostScoreFromBalances 2.4973 ms/op 2.5327 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei normalcase 3.5598 ms/op 4.0133 ms/op 0.89
altair processAttestation - 250000 vs - 7PWei worstcase 5.6681 ms/op 6.7274 ms/op 0.84
altair processAttestation - setStatus - 1/6 committees join 176.82 us/op 179.93 us/op 0.98
altair processAttestation - setStatus - 1/3 committees join 352.42 us/op 360.39 us/op 0.98
altair processAttestation - setStatus - 1/2 committees join 516.77 us/op 522.34 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 670.49 us/op 683.53 us/op 0.98
altair processAttestation - setStatus - 4/5 committees join 939.62 us/op 961.06 us/op 0.98
altair processAttestation - setStatus - 100% committees join 1.1148 ms/op 1.1377 ms/op 0.98
altair processBlock - 250000 vs - 7PWei normalcase 23.674 ms/op 24.882 ms/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase hashState 36.407 ms/op 33.954 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase 80.829 ms/op 81.520 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase hashState 104.58 ms/op 107.98 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei normalcase 3.4568 ms/op 3.3588 ms/op 1.03
phase0 processBlock - 250000 vs - 7PWei worstcase 51.811 ms/op 51.642 ms/op 1.00
altair processEth1Data - 250000 vs - 7PWei normalcase 644.98 us/op 717.38 us/op 0.90
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 8.0020 us/op 9.4200 us/op 0.85
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 23.017 us/op 24.489 us/op 0.94
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 11.023 us/op 11.487 us/op 0.96
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 8.0040 us/op 8.7820 us/op 0.91
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 89.216 us/op 96.787 us/op 0.92
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 878.98 us/op 925.19 us/op 0.95
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 1.1729 ms/op 1.2222 ms/op 0.96
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 1.1046 ms/op 1.1952 ms/op 0.92
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 4.1133 ms/op 4.5471 ms/op 0.90
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 2.3515 ms/op 2.5065 ms/op 0.94
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 7.7455 ms/op 7.2894 ms/op 1.06
Tree 40 250000 create 641.72 ms/op 735.99 ms/op 0.87
Tree 40 250000 get(125000) 294.04 ns/op 255.73 ns/op 1.15
Tree 40 250000 set(125000) 1.9855 us/op 2.4735 us/op 0.80
Tree 40 250000 toArray() 26.931 ms/op 27.019 ms/op 1.00
Tree 40 250000 iterate all - toArray() + loop 27.326 ms/op 27.149 ms/op 1.01
Tree 40 250000 iterate all - get(i) 102.97 ms/op 104.29 ms/op 0.99
MutableVector 250000 create 13.011 ms/op 13.347 ms/op 0.97
MutableVector 250000 get(125000) 10.735 ns/op 10.575 ns/op 1.02
MutableVector 250000 set(125000) 527.41 ns/op 662.20 ns/op 0.80
MutableVector 250000 toArray() 5.9700 ms/op 6.0935 ms/op 0.98
MutableVector 250000 iterate all - toArray() + loop 6.0715 ms/op 6.6349 ms/op 0.92
MutableVector 250000 iterate all - get(i) 2.7904 ms/op 2.8168 ms/op 0.99
Array 250000 create 5.9764 ms/op 5.3526 ms/op 1.12
Array 250000 clone - spread 2.4989 ms/op 1.9655 ms/op 1.27
Array 250000 get(125000) 1.2310 ns/op 0.99600 ns/op 1.24
Array 250000 set(125000) 1.2590 ns/op 0.98500 ns/op 1.28
Array 250000 iterate all - loop 152.06 us/op 150.95 us/op 1.01
effectiveBalanceIncrements clone Uint8Array 300000 50.659 us/op 47.739 us/op 1.06
effectiveBalanceIncrements clone MutableVector 300000 819.00 ns/op 560.00 ns/op 1.46
effectiveBalanceIncrements rw all Uint8Array 300000 243.91 us/op 244.03 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 165.11 ms/op 154.45 ms/op 1.07
phase0 afterProcessEpoch - 250000 vs - 7PWei 204.93 ms/op 188.71 ms/op 1.09
phase0 beforeProcessEpoch - 250000 vs - 7PWei 56.943 ms/op 57.539 ms/op 0.99
altair processEpoch - mainnet_e81889 536.82 ms/op 485.52 ms/op 1.11
mainnet_e81889 - altair beforeProcessEpoch 116.44 ms/op 109.97 ms/op 1.06
mainnet_e81889 - altair processJustificationAndFinalization 17.091 us/op 23.503 us/op 0.73
mainnet_e81889 - altair processInactivityUpdates 8.9558 ms/op 8.7489 ms/op 1.02
mainnet_e81889 - altair processRewardsAndPenalties 114.92 ms/op 77.603 ms/op 1.48
mainnet_e81889 - altair processRegistryUpdates 2.3470 us/op 3.3420 us/op 0.70
mainnet_e81889 - altair processSlashings 471.00 ns/op 928.00 ns/op 0.51
mainnet_e81889 - altair processEth1DataReset 534.00 ns/op 923.00 ns/op 0.58
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.2013 ms/op 1.9893 ms/op 1.11
mainnet_e81889 - altair processSlashingsReset 4.7060 us/op 4.6070 us/op 1.02
mainnet_e81889 - altair processRandaoMixesReset 4.1350 us/op 6.0120 us/op 0.69
mainnet_e81889 - altair processHistoricalRootsUpdate 637.00 ns/op 990.00 ns/op 0.64
mainnet_e81889 - altair processParticipationFlagUpdates 2.1520 us/op 2.5140 us/op 0.86
mainnet_e81889 - altair processSyncCommitteeUpdates 499.00 ns/op 576.00 ns/op 0.87
mainnet_e81889 - altair afterProcessEpoch 196.19 ms/op 198.47 ms/op 0.99
phase0 processEpoch - mainnet_e58758 535.18 ms/op 484.05 ms/op 1.11
mainnet_e58758 - phase0 beforeProcessEpoch 204.76 ms/op 183.75 ms/op 1.11
mainnet_e58758 - phase0 processJustificationAndFinalization 18.109 us/op 35.724 us/op 0.51
mainnet_e58758 - phase0 processRewardsAndPenalties 96.768 ms/op 66.310 ms/op 1.46
mainnet_e58758 - phase0 processRegistryUpdates 8.1340 us/op 9.8080 us/op 0.83
mainnet_e58758 - phase0 processSlashings 508.00 ns/op 769.00 ns/op 0.66
mainnet_e58758 - phase0 processEth1DataReset 550.00 ns/op 889.00 ns/op 0.62
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0533 ms/op 1.8518 ms/op 1.11
mainnet_e58758 - phase0 processSlashingsReset 3.4390 us/op 4.4800 us/op 0.77
mainnet_e58758 - phase0 processRandaoMixesReset 4.3580 us/op 7.1860 us/op 0.61
mainnet_e58758 - phase0 processHistoricalRootsUpdate 605.00 ns/op 947.00 ns/op 0.64
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.6860 us/op 5.1170 us/op 0.72
mainnet_e58758 - phase0 afterProcessEpoch 161.53 ms/op 164.60 ms/op 0.98
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9709 ms/op 1.9903 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.2272 ms/op 2.2376 ms/op 1.00
altair processInactivityUpdates - 250000 normalcase 32.613 ms/op 34.188 ms/op 0.95
altair processInactivityUpdates - 250000 worstcase 39.152 ms/op 39.666 ms/op 0.99
phase0 processRegistryUpdates - 250000 normalcase 6.5630 us/op 8.3960 us/op 0.78
phase0 processRegistryUpdates - 250000 badcase_full_deposits 375.12 us/op 374.55 us/op 1.00
phase0 processRegistryUpdates - 250000 worstcase 0.5 179.96 ms/op 196.68 ms/op 0.92
altair processRewardsAndPenalties - 250000 normalcase 102.21 ms/op 103.31 ms/op 0.99
altair processRewardsAndPenalties - 250000 worstcase 73.126 ms/op 74.342 ms/op 0.98
phase0 getAttestationDeltas - 250000 normalcase 12.729 ms/op 12.899 ms/op 0.99
phase0 getAttestationDeltas - 250000 worstcase 13.122 ms/op 13.185 ms/op 1.00
phase0 processSlashings - 250000 worstcase 5.8400 ms/op 5.8197 ms/op 1.00
altair processSyncCommitteeUpdates - 250000 288.16 ms/op 294.94 ms/op 0.98
BeaconState.hashTreeRoot - No change 501.00 ns/op 451.00 ns/op 1.11
BeaconState.hashTreeRoot - 1 full validator 66.107 us/op 70.114 us/op 0.94
BeaconState.hashTreeRoot - 32 full validator 653.96 us/op 651.36 us/op 1.00
BeaconState.hashTreeRoot - 512 full validator 7.1168 ms/op 9.1659 ms/op 0.78
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 86.435 us/op 88.040 us/op 0.98
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3567 ms/op 1.2247 ms/op 1.11
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.153 ms/op 17.549 ms/op 0.98
BeaconState.hashTreeRoot - 1 balances 69.454 us/op 63.209 us/op 1.10
BeaconState.hashTreeRoot - 32 balances 633.80 us/op 629.63 us/op 1.01
BeaconState.hashTreeRoot - 512 balances 6.3860 ms/op 6.2521 ms/op 1.02
BeaconState.hashTreeRoot - 250000 balances 100.82 ms/op 98.214 ms/op 1.03
aggregationBits - 2048 els - zipIndexesInBitList 29.774 us/op 29.780 us/op 1.00
regular array get 100000 times 60.552 us/op 60.572 us/op 1.00
wrappedArray get 100000 times 60.572 us/op 60.537 us/op 1.00
arrayWithProxy get 100000 times 26.639 ms/op 26.446 ms/op 1.01
ssz.Root.equals 1.0080 us/op 949.00 ns/op 1.06
byteArrayEquals 1.0140 us/op 951.00 ns/op 1.07
shuffle list - 16384 els 11.486 ms/op 11.439 ms/op 1.00
shuffle list - 250000 els 168.00 ms/op 169.13 ms/op 0.99
processSlot - 1 slots 14.044 us/op 13.899 us/op 1.01
processSlot - 32 slots 2.0080 ms/op 2.0292 ms/op 0.99
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 329.66 us/op 324.70 us/op 1.02
getCommitteeAssignments - req 1 vs - 250000 vc 5.7835 ms/op 5.4523 ms/op 1.06
getCommitteeAssignments - req 100 vs - 250000 vc 7.9610 ms/op 7.9746 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 8.5099 ms/op 8.5212 ms/op 1.00
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 8.3000 ns/op 7.9800 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 1.1691 us/op 1.1850 us/op 0.99
computeProposers - vc 250000 17.315 ms/op 18.001 ms/op 0.96
computeEpochShuffling - vc 250000 170.62 ms/op 171.00 ms/op 1.00
getNextSyncCommittee - vc 250000 287.73 ms/op 297.51 ms/op 0.97

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 222958e into unstable Jan 27, 2023
@wemeetagain wemeetagain deleted the dapplion/reqresp-peer-kind branch January 27, 2023 14:03
@wemeetagain
Copy link
Member

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

2 participants