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

Revert 'Use state dialed to attestation target epoch' #4901

Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Dec 12, 2022

@twoeths twoeths requested a review from a team as a code owner December 12, 2022 12:35
@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: ad0dcea Previous: 40620a8 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8410 ms/op 1.7218 ms/op 1.07
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 62.012 us/op 59.857 us/op 1.04
BLS verify - blst-native 2.1697 ms/op 2.1742 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 4.4840 ms/op 4.4917 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 9.6915 ms/op 9.7071 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 35.198 ms/op 35.260 ms/op 1.00
BLS aggregatePubkeys 32 - blst-native 46.446 us/op 46.527 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 181.80 us/op 182.47 us/op 1.00
getAttestationsForBlock 80.792 ms/op 78.924 ms/op 1.02
isKnown best case - 1 super set check 483.00 ns/op 467.00 ns/op 1.03
isKnown normal case - 2 super set checks 472.00 ns/op 455.00 ns/op 1.04
isKnown worse case - 16 super set checks 471.00 ns/op 455.00 ns/op 1.04
CheckpointStateCache - add get delete 8.8750 us/op 8.5240 us/op 1.04
validate gossip signedAggregateAndProof - struct 5.0369 ms/op 5.0322 ms/op 1.00
validate gossip attestation - struct 2.3695 ms/op 2.3710 ms/op 1.00
pickEth1Vote - no votes 2.1793 ms/op 2.4196 ms/op 0.90
pickEth1Vote - max votes 18.785 ms/op 17.897 ms/op 1.05
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.898 ms/op 11.973 ms/op 1.08
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.848 ms/op 19.522 ms/op 1.07
pickEth1Vote - Eth1Data fastSerialize value x2048 1.4828 ms/op 1.3764 ms/op 1.08
pickEth1Vote - Eth1Data fastSerialize tree x2048 12.687 ms/op 11.742 ms/op 1.08
bytes32 toHexString 950.00 ns/op 923.00 ns/op 1.03
bytes32 Buffer.toString(hex) 801.00 ns/op 680.00 ns/op 1.18
bytes32 Buffer.toString(hex) from Uint8Array 1.0650 us/op 969.00 ns/op 1.10
bytes32 Buffer.toString(hex) + 0x 794.00 ns/op 729.00 ns/op 1.09
Object access 1 prop 0.39300 ns/op 0.36600 ns/op 1.07
Map access 1 prop 0.30300 ns/op 0.31000 ns/op 0.98
Object get x1000 10.892 ns/op 12.857 ns/op 0.85
Map get x1000 0.92300 ns/op 0.96000 ns/op 0.96
Object set x1000 76.229 ns/op 73.554 ns/op 1.04
Map set x1000 49.940 ns/op 49.067 ns/op 1.02
Return object 10000 times 0.43230 ns/op 0.43220 ns/op 1.00
Throw Error 10000 times 6.2192 us/op 6.1040 us/op 1.02
fastMsgIdFn sha256 / 200 bytes 4.8920 us/op 4.8500 us/op 1.01
fastMsgIdFn h32 xxhash / 200 bytes 548.00 ns/op 618.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 200 bytes 812.00 ns/op 767.00 ns/op 1.06
fastMsgIdFn sha256 / 1000 bytes 15.473 us/op 15.197 us/op 1.02
fastMsgIdFn h32 xxhash / 1000 bytes 715.00 ns/op 770.00 ns/op 0.93
fastMsgIdFn h64 xxhash / 1000 bytes 974.00 ns/op 857.00 ns/op 1.14
fastMsgIdFn sha256 / 10000 bytes 134.13 us/op 133.83 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 2.6910 us/op 2.6420 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 2.0500 us/op 1.8530 us/op 1.11
enrSubnets - fastDeserialize 64 bits 2.7990 us/op 2.7630 us/op 1.01
enrSubnets - ssz BitVector 64 bits 794.00 ns/op 830.00 ns/op 0.96
enrSubnets - fastDeserialize 4 bits 359.00 ns/op 361.00 ns/op 0.99
enrSubnets - ssz BitVector 4 bits 795.00 ns/op 812.00 ns/op 0.98
prioritizePeers score -10:0 att 32-0.1 sync 2-0 86.229 us/op 81.645 us/op 1.06
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 118.11 us/op 124.00 us/op 0.95
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 201.44 us/op 192.28 us/op 1.05
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 396.58 us/op 398.11 us/op 1.00
prioritizePeers score 0:0 att 64-1 sync 4-1 427.15 us/op 446.15 us/op 0.96
RateTracker 1000000 limit, 1 obj count per request 192.79 ns/op 194.88 ns/op 0.99
RateTracker 1000000 limit, 2 obj count per request 143.43 ns/op 138.39 ns/op 1.04
RateTracker 1000000 limit, 4 obj count per request 112.88 ns/op 112.64 ns/op 1.00
RateTracker 1000000 limit, 8 obj count per request 98.802 ns/op 99.080 ns/op 1.00
RateTracker with prune 4.1470 us/op 3.8760 us/op 1.07
array of 16000 items push then shift 51.609 us/op 51.780 us/op 1.00
LinkedList of 16000 items push then shift 12.571 ns/op 12.294 ns/op 1.02
array of 16000 items push then pop 202.42 ns/op 205.84 ns/op 0.98
LinkedList of 16000 items push then pop 12.082 ns/op 12.118 ns/op 1.00
array of 24000 items push then shift 77.382 us/op 77.400 us/op 1.00
LinkedList of 24000 items push then shift 13.341 ns/op 13.216 ns/op 1.01
array of 24000 items push then pop 194.02 ns/op 193.40 ns/op 1.00
LinkedList of 24000 items push then pop 12.462 ns/op 12.293 ns/op 1.01
intersect bitArray bitLen 8 10.697 ns/op 10.727 ns/op 1.00
intersect array and set length 8 138.24 ns/op 130.57 ns/op 1.06
intersect bitArray bitLen 128 58.117 ns/op 55.738 ns/op 1.04
intersect array and set length 128 1.7744 us/op 1.7688 us/op 1.00
Buffer.concat 32 items 1.7520 ns/op 1.7870 ns/op 0.98
pass gossip attestations to forkchoice per slot 5.1234 ms/op 5.4638 ms/op 0.94
computeDeltas 4.3766 ms/op 4.5699 ms/op 0.96
computeProposerBoostScoreFromBalances 811.32 us/op 803.95 us/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 3.4257 ms/op 3.7932 ms/op 0.90
altair processAttestation - 250000 vs - 7PWei worstcase 5.6329 ms/op 5.8145 ms/op 0.97
altair processAttestation - setStatus - 1/6 committees join 186.41 us/op 180.40 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 362.38 us/op 353.11 us/op 1.03
altair processAttestation - setStatus - 1/2 committees join 509.38 us/op 508.22 us/op 1.00
altair processAttestation - setStatus - 2/3 committees join 669.35 us/op 660.05 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 930.08 us/op 924.81 us/op 1.01
altair processAttestation - setStatus - 100% committees join 1.1190 ms/op 1.1219 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase 25.898 ms/op 27.491 ms/op 0.94
altair processBlock - 250000 vs - 7PWei normalcase hashState 37.218 ms/op 39.341 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase 76.401 ms/op 81.044 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 101.89 ms/op 101.39 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei normalcase 3.2644 ms/op 3.5545 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei worstcase 51.627 ms/op 51.523 ms/op 1.00
altair processEth1Data - 250000 vs - 7PWei normalcase 826.09 us/op 857.15 us/op 0.96
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 8.0480 us/op 6.4930 us/op 1.24
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 22.587 us/op 21.759 us/op 1.04
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 9.2730 us/op 9.4060 us/op 0.99
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 6.5840 us/op 6.5670 us/op 1.00
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 94.127 us/op 92.313 us/op 1.02
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 947.91 us/op 926.41 us/op 1.02
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 141069 12.823 ms/op 12.802 ms/op 1.00
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 250000 22.816 ms/op 22.290 ms/op 1.02
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 250000 71.768 ms/op 72.942 ms/op 0.98
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 250000 40.380 ms/op 38.404 ms/op 1.05
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 250000 120.65 ms/op 118.95 ms/op 1.01
Tree 40 250000 create 726.28 ms/op 718.70 ms/op 1.01
Tree 40 250000 get(125000) 243.95 ns/op 236.42 ns/op 1.03
Tree 40 250000 set(125000) 2.5814 us/op 2.3976 us/op 1.08
Tree 40 250000 toArray() 28.109 ms/op 28.052 ms/op 1.00
Tree 40 250000 iterate all - toArray() + loop 28.813 ms/op 28.490 ms/op 1.01
Tree 40 250000 iterate all - get(i) 113.81 ms/op 112.83 ms/op 1.01
MutableVector 250000 create 15.356 ms/op 14.077 ms/op 1.09
MutableVector 250000 get(125000) 10.975 ns/op 10.788 ns/op 1.02
MutableVector 250000 set(125000) 596.56 ns/op 607.30 ns/op 0.98
MutableVector 250000 toArray() 6.3113 ms/op 6.5676 ms/op 0.96
MutableVector 250000 iterate all - toArray() + loop 6.7435 ms/op 6.7089 ms/op 1.01
MutableVector 250000 iterate all - get(i) 2.6056 ms/op 2.6009 ms/op 1.00
Array 250000 create 6.4169 ms/op 6.5019 ms/op 0.99
Array 250000 clone - spread 3.5523 ms/op 3.5042 ms/op 1.01
Array 250000 get(125000) 1.6140 ns/op 1.6010 ns/op 1.01
Array 250000 set(125000) 1.6070 ns/op 1.5880 ns/op 1.01
Array 250000 iterate all - loop 150.93 us/op 153.09 us/op 0.99
effectiveBalanceIncrements clone Uint8Array 300000 138.88 us/op 184.77 us/op 0.75
effectiveBalanceIncrements clone MutableVector 300000 602.00 ns/op 635.00 ns/op 0.95
effectiveBalanceIncrements rw all Uint8Array 300000 247.47 us/op 247.74 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 142.57 ms/op 146.10 ms/op 0.98
phase0 afterProcessEpoch - 250000 vs - 7PWei 186.73 ms/op 189.49 ms/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 59.426 ms/op 59.110 ms/op 1.01
altair processEpoch - mainnet_e81889 563.81 ms/op 549.16 ms/op 1.03
mainnet_e81889 - altair beforeProcessEpoch 82.353 ms/op 125.77 ms/op 0.65
mainnet_e81889 - altair processJustificationAndFinalization 17.055 us/op 17.031 us/op 1.00
mainnet_e81889 - altair processInactivityUpdates 8.9958 ms/op 9.2464 ms/op 0.97
mainnet_e81889 - altair processRewardsAndPenalties 143.74 ms/op 82.507 ms/op 1.74
mainnet_e81889 - altair processRegistryUpdates 2.5120 us/op 2.3680 us/op 1.06
mainnet_e81889 - altair processSlashings 601.00 ns/op 655.00 ns/op 0.92
mainnet_e81889 - altair processEth1DataReset 583.00 ns/op 683.00 ns/op 0.85
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9602 ms/op 2.1767 ms/op 0.90
mainnet_e81889 - altair processSlashingsReset 4.2610 us/op 4.4820 us/op 0.95
mainnet_e81889 - altair processRandaoMixesReset 4.2900 us/op 4.0560 us/op 1.06
mainnet_e81889 - altair processHistoricalRootsUpdate 740.00 ns/op 633.00 ns/op 1.17
mainnet_e81889 - altair processParticipationFlagUpdates 2.2470 us/op 3.4330 us/op 0.65
mainnet_e81889 - altair processSyncCommitteeUpdates 1.9130 us/op 661.00 ns/op 2.89
mainnet_e81889 - altair afterProcessEpoch 217.86 ms/op 222.38 ms/op 0.98
phase0 processEpoch - mainnet_e58758 488.33 ms/op 620.44 ms/op 0.79
mainnet_e58758 - phase0 beforeProcessEpoch 177.68 ms/op 224.19 ms/op 0.79
mainnet_e58758 - phase0 processJustificationAndFinalization 17.618 us/op 16.205 us/op 1.09
mainnet_e58758 - phase0 processRewardsAndPenalties 101.10 ms/op 142.83 ms/op 0.71
mainnet_e58758 - phase0 processRegistryUpdates 8.1210 us/op 8.1740 us/op 0.99
mainnet_e58758 - phase0 processSlashings 673.00 ns/op 589.00 ns/op 1.14
mainnet_e58758 - phase0 processEth1DataReset 639.00 ns/op 561.00 ns/op 1.14
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.8086 ms/op 1.8539 ms/op 0.98
mainnet_e58758 - phase0 processSlashingsReset 4.1160 us/op 3.9650 us/op 1.04
mainnet_e58758 - phase0 processRandaoMixesReset 4.3740 us/op 4.0800 us/op 1.07
mainnet_e58758 - phase0 processHistoricalRootsUpdate 714.00 ns/op 669.00 ns/op 1.07
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.8170 us/op 3.5790 us/op 1.07
mainnet_e58758 - phase0 afterProcessEpoch 162.35 ms/op 165.20 ms/op 0.98
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.0957 ms/op 1.9964 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.2112 ms/op 2.1789 ms/op 1.01
altair processInactivityUpdates - 250000 normalcase 46.024 ms/op 54.030 ms/op 0.85
altair processInactivityUpdates - 250000 worstcase 33.192 ms/op 54.225 ms/op 0.61
phase0 processRegistryUpdates - 250000 normalcase 6.8700 us/op 6.9650 us/op 0.99
phase0 processRegistryUpdates - 250000 badcase_full_deposits 376.89 us/op 372.45 us/op 1.01
phase0 processRegistryUpdates - 250000 worstcase 0.5 184.50 ms/op 227.66 ms/op 0.81
altair processRewardsAndPenalties - 250000 normalcase 108.55 ms/op 136.49 ms/op 0.80
altair processRewardsAndPenalties - 250000 worstcase 74.724 ms/op 139.56 ms/op 0.54
phase0 getAttestationDeltas - 250000 normalcase 12.143 ms/op 11.824 ms/op 1.03
phase0 getAttestationDeltas - 250000 worstcase 12.178 ms/op 12.663 ms/op 0.96
phase0 processSlashings - 250000 worstcase 5.4786 ms/op 5.8738 ms/op 0.93
altair processSyncCommitteeUpdates - 250000 295.92 ms/op 294.10 ms/op 1.01
BeaconState.hashTreeRoot - No change 566.00 ns/op 534.00 ns/op 1.06
BeaconState.hashTreeRoot - 1 full validator 73.551 us/op 66.429 us/op 1.11
BeaconState.hashTreeRoot - 32 full validator 716.89 us/op 714.88 us/op 1.00
BeaconState.hashTreeRoot - 512 full validator 6.9852 ms/op 7.6397 ms/op 0.91
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 90.197 us/op 90.376 us/op 1.00
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3130 ms/op 1.3056 ms/op 1.01
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.471 ms/op 18.615 ms/op 0.94
BeaconState.hashTreeRoot - 1 balances 70.840 us/op 68.426 us/op 1.04
BeaconState.hashTreeRoot - 32 balances 637.92 us/op 736.02 us/op 0.87
BeaconState.hashTreeRoot - 512 balances 6.4856 ms/op 6.9415 ms/op 0.93
BeaconState.hashTreeRoot - 250000 balances 100.74 ms/op 98.725 ms/op 1.02
aggregationBits - 2048 els - zipIndexesInBitList 27.641 us/op 23.173 us/op 1.19
regular array get 100000 times 61.229 us/op 61.574 us/op 0.99
wrappedArray get 100000 times 61.147 us/op 61.441 us/op 1.00
arrayWithProxy get 100000 times 27.992 ms/op 27.980 ms/op 1.00
ssz.Root.equals 491.00 ns/op 464.00 ns/op 1.06
byteArrayEquals 486.00 ns/op 459.00 ns/op 1.06
shuffle list - 16384 els 11.524 ms/op 11.371 ms/op 1.01
shuffle list - 250000 els 166.61 ms/op 169.01 ms/op 0.99
processSlot - 1 slots 13.618 us/op 13.078 us/op 1.04
processSlot - 32 slots 2.0182 ms/op 1.9188 ms/op 1.05
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 420.46 us/op 344.08 us/op 1.22
getCommitteeAssignments - req 1 vs - 250000 vc 5.4513 ms/op 5.4297 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 8.0111 ms/op 8.0029 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 8.5797 ms/op 8.5645 ms/op 1.00
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 8.9900 ns/op 8.3600 ns/op 1.08
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0614 us/op 1.0213 us/op 1.04
computeProposers - vc 250000 17.911 ms/op 17.158 ms/op 1.04
computeEpochShuffling - vc 250000 170.84 ms/op 173.82 ms/op 0.98
getNextSyncCommittee - vc 250000 293.24 ms/op 290.82 ms/op 1.01

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 7c71a41 into unstable Dec 12, 2022
@wemeetagain wemeetagain deleted the tuyen/revert-dapplion/fix-validateGossipAttestation branch December 12, 2022 14:09
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.

Unstable heap memory issue
2 participants