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!: drop unused coreTopicsAtFork #5452

Merged
merged 1 commit into from
May 2, 2023

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented May 2, 2023

Motivation

Found un-used duplicated code while on #5447

Description

Drop unused coreTopicsAtFork. The actually used function is on

export function getCoreTopicsAtFork(
fork: ForkName,
opts: {subscribeAllSubnets?: boolean}
): GossipTopicTypeMap[keyof GossipTopicTypeMap][] {

@dapplion dapplion requested a review from a team as a code owner May 2, 2023 03:15
@dapplion dapplion changed the title Drop unused coreTopicsAtFork chore!: drop unused coreTopicsAtFork May 2, 2023
@dapplion dapplion enabled auto-merge (squash) May 2, 2023 03:22
@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 405d894 Previous: 342eb17 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 764.88 us/op 774.49 us/op 0.99
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 46.255 us/op 45.164 us/op 1.02
BLS verify - blst-native 1.2224 ms/op 1.2118 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 2.4793 ms/op 2.4591 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst-native 5.3313 ms/op 5.2816 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 19.312 ms/op 19.178 ms/op 1.01
BLS aggregatePubkeys 32 - blst-native 25.943 us/op 25.499 us/op 1.02
BLS aggregatePubkeys 128 - blst-native 101.30 us/op 99.933 us/op 1.01
getAttestationsForBlock 61.488 ms/op 52.213 ms/op 1.18
isKnown best case - 1 super set check 269.00 ns/op 266.00 ns/op 1.01
isKnown normal case - 2 super set checks 262.00 ns/op 256.00 ns/op 1.02
isKnown worse case - 16 super set checks 261.00 ns/op 255.00 ns/op 1.02
CheckpointStateCache - add get delete 5.3150 us/op 4.8330 us/op 1.10
validate gossip signedAggregateAndProof - struct 2.8563 ms/op 2.7481 ms/op 1.04
validate gossip attestation - struct 1.3772 ms/op 1.3127 ms/op 1.05
pickEth1Vote - no votes 1.3571 ms/op 1.2229 ms/op 1.11
pickEth1Vote - max votes 10.187 ms/op 9.7636 ms/op 1.04
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.8986 ms/op 8.5919 ms/op 1.04
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 14.531 ms/op 14.625 ms/op 0.99
pickEth1Vote - Eth1Data fastSerialize value x2048 733.29 us/op 621.67 us/op 1.18
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.0511 ms/op 7.8334 ms/op 0.77
bytes32 toHexString 574.00 ns/op 473.00 ns/op 1.21
bytes32 Buffer.toString(hex) 376.00 ns/op 334.00 ns/op 1.13
bytes32 Buffer.toString(hex) from Uint8Array 604.00 ns/op 528.00 ns/op 1.14
bytes32 Buffer.toString(hex) + 0x 390.00 ns/op 339.00 ns/op 1.15
Object access 1 prop 0.17800 ns/op 0.16400 ns/op 1.09
Map access 1 prop 0.16800 ns/op 0.16600 ns/op 1.01
Object get x1000 7.0260 ns/op 6.5590 ns/op 1.07
Map get x1000 0.65700 ns/op 0.59600 ns/op 1.10
Object set x1000 55.446 ns/op 49.886 ns/op 1.11
Map set x1000 48.474 ns/op 41.565 ns/op 1.17
Return object 10000 times 0.24810 ns/op 0.22960 ns/op 1.08
Throw Error 10000 times 4.3431 us/op 4.1125 us/op 1.06
fastMsgIdFn sha256 / 200 bytes 3.6410 us/op 3.3220 us/op 1.10
fastMsgIdFn h32 xxhash / 200 bytes 302.00 ns/op 279.00 ns/op 1.08
fastMsgIdFn h64 xxhash / 200 bytes 422.00 ns/op 384.00 ns/op 1.10
fastMsgIdFn sha256 / 1000 bytes 12.036 us/op 11.294 us/op 1.07
fastMsgIdFn h32 xxhash / 1000 bytes 450.00 ns/op 398.00 ns/op 1.13
fastMsgIdFn h64 xxhash / 1000 bytes 546.00 ns/op 450.00 ns/op 1.21
fastMsgIdFn sha256 / 10000 bytes 107.58 us/op 100.54 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 2.0210 us/op 1.8630 us/op 1.08
fastMsgIdFn h64 xxhash / 10000 bytes 1.4590 us/op 1.3190 us/op 1.11
enrSubnets - fastDeserialize 64 bits 1.4590 us/op 1.3030 us/op 1.12
enrSubnets - ssz BitVector 64 bits 577.00 ns/op 494.00 ns/op 1.17
enrSubnets - fastDeserialize 4 bits 190.00 ns/op 182.00 ns/op 1.04
enrSubnets - ssz BitVector 4 bits 577.00 ns/op 493.00 ns/op 1.17
prioritizePeers score -10:0 att 32-0.1 sync 2-0 106.66 us/op 107.99 us/op 0.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 163.01 us/op 132.73 us/op 1.23
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 203.07 us/op 160.18 us/op 1.27
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 383.19 us/op 293.66 us/op 1.30
prioritizePeers score 0:0 att 64-1 sync 4-1 443.91 us/op 352.25 us/op 1.26
array of 16000 items push then shift 1.6919 us/op 1.6231 us/op 1.04
LinkedList of 16000 items push then shift 9.1820 ns/op 8.8630 ns/op 1.04
array of 16000 items push then pop 99.972 ns/op 76.180 ns/op 1.31
LinkedList of 16000 items push then pop 9.1280 ns/op 8.5300 ns/op 1.07
array of 24000 items push then shift 2.4130 us/op 2.3464 us/op 1.03
LinkedList of 24000 items push then shift 9.0990 ns/op 8.7710 ns/op 1.04
array of 24000 items push then pop 82.765 ns/op 76.576 ns/op 1.08
LinkedList of 24000 items push then pop 8.9170 ns/op 8.4790 ns/op 1.05
intersect bitArray bitLen 8 13.534 ns/op 13.357 ns/op 1.01
intersect array and set length 8 84.853 ns/op 77.615 ns/op 1.09
intersect bitArray bitLen 128 45.199 ns/op 43.977 ns/op 1.03
intersect array and set length 128 1.2287 us/op 1.0492 us/op 1.17
Buffer.concat 32 items 2.9300 us/op 2.8760 us/op 1.02
Uint8Array.set 32 items 2.1750 us/op 2.6700 us/op 0.81
pass gossip attestations to forkchoice per slot 2.9185 ms/op 2.6569 ms/op 1.10
computeDeltas 2.9749 ms/op 3.4910 ms/op 0.85
computeProposerBoostScoreFromBalances 1.7972 ms/op 1.7839 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.4311 ms/op 2.0570 ms/op 1.18
altair processAttestation - 250000 vs - 7PWei worstcase 3.4723 ms/op 3.2688 ms/op 1.06
altair processAttestation - setStatus - 1/6 committees join 142.51 us/op 139.85 us/op 1.02
altair processAttestation - setStatus - 1/3 committees join 293.20 us/op 267.91 us/op 1.09
altair processAttestation - setStatus - 1/2 committees join 391.20 us/op 364.82 us/op 1.07
altair processAttestation - setStatus - 2/3 committees join 474.10 us/op 458.17 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 673.29 us/op 631.12 us/op 1.07
altair processAttestation - setStatus - 100% committees join 789.94 us/op 730.55 us/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase 18.932 ms/op 17.486 ms/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.365 ms/op 27.499 ms/op 0.92
altair processBlock - 250000 vs - 7PWei worstcase 53.028 ms/op 45.173 ms/op 1.17
altair processBlock - 250000 vs - 7PWei worstcase hashState 66.349 ms/op 71.907 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2278 ms/op 1.9876 ms/op 1.12
phase0 processBlock - 250000 vs - 7PWei worstcase 28.768 ms/op 27.791 ms/op 1.04
altair processEth1Data - 250000 vs - 7PWei normalcase 488.57 us/op 468.15 us/op 1.04
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 8.1200 us/op 6.6330 us/op 1.22
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 21.020 us/op 19.366 us/op 1.09
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 9.1650 us/op 8.3400 us/op 1.10
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 5.9870 us/op 6.5540 us/op 0.91
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 74.603 us/op 74.439 us/op 1.00
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 652.86 us/op 623.58 us/op 1.05
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 920.22 us/op 844.03 us/op 1.09
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 899.65 us/op 872.80 us/op 1.03
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.3019 ms/op 2.8998 ms/op 0.79
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.4754 ms/op 1.5554 ms/op 0.95
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 3.6612 ms/op 3.5525 ms/op 1.03
Tree 40 250000 create 335.73 ms/op 288.96 ms/op 1.16
Tree 40 250000 get(125000) 191.96 ns/op 175.13 ns/op 1.10
Tree 40 250000 set(125000) 908.13 ns/op 890.95 ns/op 1.02
Tree 40 250000 toArray() 18.806 ms/op 16.969 ms/op 1.11
Tree 40 250000 iterate all - toArray() + loop 17.713 ms/op 17.092 ms/op 1.04
Tree 40 250000 iterate all - get(i) 66.230 ms/op 67.746 ms/op 0.98
MutableVector 250000 create 9.6612 ms/op 10.670 ms/op 0.91
MutableVector 250000 get(125000) 6.2440 ns/op 6.2320 ns/op 1.00
MutableVector 250000 set(125000) 252.50 ns/op 250.34 ns/op 1.01
MutableVector 250000 toArray() 2.6744 ms/op 2.7143 ms/op 0.99
MutableVector 250000 iterate all - toArray() + loop 2.7997 ms/op 2.8700 ms/op 0.98
MutableVector 250000 iterate all - get(i) 1.5155 ms/op 1.5116 ms/op 1.00
Array 250000 create 2.5045 ms/op 2.5368 ms/op 0.99
Array 250000 clone - spread 1.1986 ms/op 1.3141 ms/op 0.91
Array 250000 get(125000) 0.58100 ns/op 0.63800 ns/op 0.91
Array 250000 set(125000) 0.66400 ns/op 0.72200 ns/op 0.92
Array 250000 iterate all - loop 96.114 us/op 97.724 us/op 0.98
effectiveBalanceIncrements clone Uint8Array 300000 28.047 us/op 32.449 us/op 0.86
effectiveBalanceIncrements clone MutableVector 300000 386.00 ns/op 427.00 ns/op 0.90
effectiveBalanceIncrements rw all Uint8Array 300000 165.56 us/op 168.95 us/op 0.98
effectiveBalanceIncrements rw all MutableVector 300000 81.502 ms/op 87.130 ms/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 119.20 ms/op 112.90 ms/op 1.06
phase0 beforeProcessEpoch - 250000 vs - 7PWei 33.860 ms/op 33.190 ms/op 1.02
altair processEpoch - mainnet_e81889 317.97 ms/op 303.67 ms/op 1.05
mainnet_e81889 - altair beforeProcessEpoch 65.864 ms/op 67.461 ms/op 0.98
mainnet_e81889 - altair processJustificationAndFinalization 15.901 us/op 16.990 us/op 0.94
mainnet_e81889 - altair processInactivityUpdates 5.9309 ms/op 4.9499 ms/op 1.20
mainnet_e81889 - altair processRewardsAndPenalties 51.884 ms/op 51.466 ms/op 1.01
mainnet_e81889 - altair processRegistryUpdates 2.7300 us/op 2.4510 us/op 1.11
mainnet_e81889 - altair processSlashings 414.00 ns/op 525.00 ns/op 0.79
mainnet_e81889 - altair processEth1DataReset 500.00 ns/op 523.00 ns/op 0.96
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2387 ms/op 1.2673 ms/op 0.98
mainnet_e81889 - altair processSlashingsReset 4.5500 us/op 5.1430 us/op 0.88
mainnet_e81889 - altair processRandaoMixesReset 4.6120 us/op 4.2870 us/op 1.08
mainnet_e81889 - altair processHistoricalRootsUpdate 579.00 ns/op 576.00 ns/op 1.01
mainnet_e81889 - altair processParticipationFlagUpdates 2.4150 us/op 2.3880 us/op 1.01
mainnet_e81889 - altair processSyncCommitteeUpdates 477.00 ns/op 505.00 ns/op 0.94
mainnet_e81889 - altair afterProcessEpoch 117.44 ms/op 118.74 ms/op 0.99
phase0 processEpoch - mainnet_e58758 312.70 ms/op 323.47 ms/op 0.97
mainnet_e58758 - phase0 beforeProcessEpoch 123.09 ms/op 130.48 ms/op 0.94
mainnet_e58758 - phase0 processJustificationAndFinalization 15.421 us/op 17.506 us/op 0.88
mainnet_e58758 - phase0 processRewardsAndPenalties 56.399 ms/op 53.321 ms/op 1.06
mainnet_e58758 - phase0 processRegistryUpdates 7.5210 us/op 8.1060 us/op 0.93
mainnet_e58758 - phase0 processSlashings 458.00 ns/op 492.00 ns/op 0.93
mainnet_e58758 - phase0 processEth1DataReset 579.00 ns/op 524.00 ns/op 1.10
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 986.81 us/op 1.0610 ms/op 0.93
mainnet_e58758 - phase0 processSlashingsReset 3.2960 us/op 2.9120 us/op 1.13
mainnet_e58758 - phase0 processRandaoMixesReset 4.7220 us/op 4.2670 us/op 1.11
mainnet_e58758 - phase0 processHistoricalRootsUpdate 542.00 ns/op 563.00 ns/op 0.96
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.7390 us/op 4.0910 us/op 0.91
mainnet_e58758 - phase0 afterProcessEpoch 98.004 ms/op 100.48 ms/op 0.98
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2135 ms/op 1.3024 ms/op 0.93
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5086 ms/op 1.4412 ms/op 1.05
altair processInactivityUpdates - 250000 normalcase 19.444 ms/op 21.393 ms/op 0.91
altair processInactivityUpdates - 250000 worstcase 21.867 ms/op 20.680 ms/op 1.06
phase0 processRegistryUpdates - 250000 normalcase 6.0990 us/op 8.8090 us/op 0.69
phase0 processRegistryUpdates - 250000 badcase_full_deposits 259.85 us/op 276.40 us/op 0.94
phase0 processRegistryUpdates - 250000 worstcase 0.5 125.07 ms/op 115.15 ms/op 1.09
altair processRewardsAndPenalties - 250000 normalcase 50.056 ms/op 53.935 ms/op 0.93
altair processRewardsAndPenalties - 250000 worstcase 51.249 ms/op 50.708 ms/op 1.01
phase0 getAttestationDeltas - 250000 normalcase 6.3649 ms/op 8.7945 ms/op 0.72
phase0 getAttestationDeltas - 250000 worstcase 6.3954 ms/op 6.9157 ms/op 0.92
phase0 processSlashings - 250000 worstcase 3.5633 ms/op 3.7887 ms/op 0.94
altair processSyncCommitteeUpdates - 250000 179.27 ms/op 182.68 ms/op 0.98
BeaconState.hashTreeRoot - No change 262.00 ns/op 276.00 ns/op 0.95
BeaconState.hashTreeRoot - 1 full validator 51.533 us/op 51.719 us/op 1.00
BeaconState.hashTreeRoot - 32 full validator 494.85 us/op 579.33 us/op 0.85
BeaconState.hashTreeRoot - 512 full validator 5.3474 ms/op 5.3597 ms/op 1.00
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 60.947 us/op 64.654 us/op 0.94
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 878.33 us/op 906.26 us/op 0.97
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.578 ms/op 11.535 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 47.379 us/op 49.910 us/op 0.95
BeaconState.hashTreeRoot - 32 balances 441.60 us/op 482.96 us/op 0.91
BeaconState.hashTreeRoot - 512 balances 4.3531 ms/op 4.5964 ms/op 0.95
BeaconState.hashTreeRoot - 250000 balances 73.257 ms/op 75.403 ms/op 0.97
aggregationBits - 2048 els - zipIndexesInBitList 16.260 us/op 16.587 us/op 0.98
regular array get 100000 times 31.863 us/op 33.254 us/op 0.96
wrappedArray get 100000 times 31.406 us/op 33.317 us/op 0.94
arrayWithProxy get 100000 times 15.978 ms/op 15.993 ms/op 1.00
ssz.Root.equals 549.00 ns/op 576.00 ns/op 0.95
byteArrayEquals 541.00 ns/op 566.00 ns/op 0.96
shuffle list - 16384 els 6.8660 ms/op 7.1177 ms/op 0.96
shuffle list - 250000 els 100.83 ms/op 102.44 ms/op 0.98
processSlot - 1 slots 9.0820 us/op 9.5860 us/op 0.95
processSlot - 32 slots 1.3216 ms/op 1.3944 ms/op 0.95
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 32.927 ms/op 33.116 ms/op 0.99
getCommitteeAssignments - req 1 vs - 250000 vc 2.9094 ms/op 3.0009 ms/op 0.97
getCommitteeAssignments - req 100 vs - 250000 vc 4.1637 ms/op 4.2415 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4572 ms/op 4.5154 ms/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6500 ns/op 4.4800 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 963.93 ns/op 677.54 ns/op 1.42
computeProposers - vc 250000 10.799 ms/op 11.440 ms/op 0.94
computeEpochShuffling - vc 250000 101.30 ms/op 107.43 ms/op 0.94
getNextSyncCommittee - vc 250000 178.54 ms/op 190.98 ms/op 0.93
computeSigningRoot for AttestationData 13.526 us/op 13.946 us/op 0.97
hash AttestationData serialized data then Buffer.toString(base64) 2.4329 us/op 2.4835 us/op 0.98
toHexString serialized data 1.1400 us/op 1.2654 us/op 0.90
Buffer.toString(base64) 323.29 ns/op 339.74 ns/op 0.95

by benchmarkbot/action

@dapplion dapplion merged commit 22b6f6b into unstable May 2, 2023
@dapplion dapplion deleted the dapplion/remove-coreTopicsAtFork branch May 2, 2023 03:39
@wemeetagain
Copy link
Member

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