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

Track block process steps #4911

Merged
merged 1 commit into from
Dec 16, 2022
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Dec 15, 2022

Motivation

Some code was missed when eip4844 PRs merged

Description

  • Add back seenTimestampSec to track block process steps

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

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 3c954e9 Previous: 9bccced Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.4473 ms/op 1.0908 ms/op 1.33
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 124.12 us/op 62.577 us/op 1.98
BLS verify - blst-native 2.2844 ms/op 1.6504 ms/op 1.38
BLS verifyMultipleSignatures 3 - blst-native 4.7992 ms/op 3.3595 ms/op 1.43
BLS verifyMultipleSignatures 8 - blst-native 10.248 ms/op 7.2610 ms/op 1.41
BLS verifyMultipleSignatures 32 - blst-native 35.957 ms/op 26.226 ms/op 1.37
BLS aggregatePubkeys 32 - blst-native 51.339 us/op 34.558 us/op 1.49
BLS aggregatePubkeys 128 - blst-native 207.50 us/op 135.97 us/op 1.53
getAttestationsForBlock 115.07 ms/op 83.832 ms/op 1.37
isKnown best case - 1 super set check 495.00 ns/op 417.00 ns/op 1.19
isKnown normal case - 2 super set checks 494.00 ns/op 417.00 ns/op 1.18
isKnown worse case - 16 super set checks 506.00 ns/op 410.00 ns/op 1.23
CheckpointStateCache - add get delete 10.839 us/op 8.3900 us/op 1.29
validate gossip signedAggregateAndProof - struct 5.3309 ms/op 4.2807 ms/op 1.25
validate gossip attestation - struct 2.5726 ms/op 2.0217 ms/op 1.27
pickEth1Vote - no votes 2.5528 ms/op 2.1100 ms/op 1.21
pickEth1Vote - max votes 19.767 ms/op 16.847 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.017 ms/op 11.784 ms/op 1.27
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.431 ms/op 21.183 ms/op 1.34
pickEth1Vote - Eth1Data fastSerialize value x2048 1.6641 ms/op 1.1842 ms/op 1.41
pickEth1Vote - Eth1Data fastSerialize tree x2048 13.533 ms/op 9.4970 ms/op 1.43
bytes32 toHexString 1.3370 us/op 1.0580 us/op 1.26
bytes32 Buffer.toString(hex) 829.00 ns/op 648.00 ns/op 1.28
bytes32 Buffer.toString(hex) from Uint8Array 1.3010 us/op 955.00 ns/op 1.36
bytes32 Buffer.toString(hex) + 0x 859.00 ns/op 636.00 ns/op 1.35
Object access 1 prop 0.39100 ns/op 0.32400 ns/op 1.21
Map access 1 prop 0.35100 ns/op 0.25500 ns/op 1.38
Object get x1000 18.569 ns/op 17.335 ns/op 1.07
Map get x1000 1.0610 ns/op 0.99200 ns/op 1.07
Object set x1000 127.59 ns/op 115.20 ns/op 1.11
Map set x1000 81.753 ns/op 70.176 ns/op 1.16
Return object 10000 times 0.45210 ns/op 0.37740 ns/op 1.20
Throw Error 10000 times 8.4297 us/op 6.7786 us/op 1.24
fastMsgIdFn sha256 / 200 bytes 5.7110 us/op 4.3450 us/op 1.31
fastMsgIdFn h32 xxhash / 200 bytes 588.00 ns/op 458.00 ns/op 1.28
fastMsgIdFn h64 xxhash / 200 bytes 824.00 ns/op 630.00 ns/op 1.31
fastMsgIdFn sha256 / 1000 bytes 17.601 us/op 13.669 us/op 1.29
fastMsgIdFn h32 xxhash / 1000 bytes 793.00 ns/op 607.00 ns/op 1.31
fastMsgIdFn h64 xxhash / 1000 bytes 956.00 ns/op 716.00 ns/op 1.34
fastMsgIdFn sha256 / 10000 bytes 153.04 us/op 116.95 us/op 1.31
fastMsgIdFn h32 xxhash / 10000 bytes 2.9240 us/op 2.3050 us/op 1.27
fastMsgIdFn h64 xxhash / 10000 bytes 2.1760 us/op 1.6850 us/op 1.29
enrSubnets - fastDeserialize 64 bits 3.3140 us/op 2.2990 us/op 1.44
enrSubnets - ssz BitVector 64 bits 1.0840 us/op 783.00 ns/op 1.38
enrSubnets - fastDeserialize 4 bits 391.00 ns/op 290.00 ns/op 1.35
enrSubnets - ssz BitVector 4 bits 1.1010 us/op 831.00 ns/op 1.32
prioritizePeers score -10:0 att 32-0.1 sync 2-0 127.20 us/op 96.805 us/op 1.31
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 174.30 us/op 137.44 us/op 1.27
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 312.60 us/op 270.14 us/op 1.16
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 466.87 us/op 410.01 us/op 1.14
prioritizePeers score 0:0 att 64-1 sync 4-1 614.05 us/op 518.19 us/op 1.19
array of 16000 items push then shift 6.0367 us/op 2.7902 us/op 2.16
LinkedList of 16000 items push then shift 23.068 ns/op 17.029 ns/op 1.35
array of 16000 items push then pop 269.81 ns/op 216.51 ns/op 1.25
LinkedList of 16000 items push then pop 19.917 ns/op 17.331 ns/op 1.15
array of 24000 items push then shift 8.2492 us/op 3.9614 us/op 2.08
LinkedList of 24000 items push then shift 21.951 ns/op 21.140 ns/op 1.04
array of 24000 items push then pop 282.54 ns/op 217.73 ns/op 1.30
LinkedList of 24000 items push then pop 22.749 ns/op 19.493 ns/op 1.17
intersect bitArray bitLen 8 32.086 ns/op 29.427 ns/op 1.09
intersect array and set length 8 219.49 ns/op 153.27 ns/op 1.43
intersect bitArray bitLen 128 104.81 ns/op 108.87 ns/op 0.96
intersect array and set length 128 2.5712 us/op 2.2201 us/op 1.16
Buffer.concat 32 items 6.5120 us/op 5.1800 us/op 1.26
Uint8Array.set 32 items 5.6210 us/op 4.1720 us/op 1.35
pass gossip attestations to forkchoice per slot 5.1560 ms/op 6.2289 ms/op 0.83
computeDeltas 6.0893 ms/op 5.7480 ms/op 1.06
computeProposerBoostScoreFromBalances 2.9740 ms/op 2.8415 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei normalcase 5.0800 ms/op 3.8873 ms/op 1.31
altair processAttestation - 250000 vs - 7PWei worstcase 7.7079 ms/op 7.1117 ms/op 1.08
altair processAttestation - setStatus - 1/6 committees join 276.72 us/op 211.83 us/op 1.31
altair processAttestation - setStatus - 1/3 committees join 529.40 us/op 403.71 us/op 1.31
altair processAttestation - setStatus - 1/2 committees join 703.34 us/op 569.67 us/op 1.23
altair processAttestation - setStatus - 2/3 committees join 1.0210 ms/op 731.50 us/op 1.40
altair processAttestation - setStatus - 4/5 committees join 1.3768 ms/op 1.0080 ms/op 1.37
altair processAttestation - setStatus - 100% committees join 1.6269 ms/op 1.2054 ms/op 1.35
altair processBlock - 250000 vs - 7PWei normalcase 36.807 ms/op 27.171 ms/op 1.35
altair processBlock - 250000 vs - 7PWei normalcase hashState 44.838 ms/op 37.480 ms/op 1.20
altair processBlock - 250000 vs - 7PWei worstcase 110.03 ms/op 74.365 ms/op 1.48
altair processBlock - 250000 vs - 7PWei worstcase hashState 123.24 ms/op 96.884 ms/op 1.27
phase0 processBlock - 250000 vs - 7PWei normalcase 4.4930 ms/op 3.4587 ms/op 1.30
phase0 processBlock - 250000 vs - 7PWei worstcase 55.809 ms/op 47.494 ms/op 1.18
altair processEth1Data - 250000 vs - 7PWei normalcase 1.0398 ms/op 779.52 us/op 1.33
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 22.646 us/op 10.833 us/op 2.09
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 47.206 us/op 49.842 us/op 0.95
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 29.262 us/op 21.272 us/op 1.38
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 23.366 us/op 10.991 us/op 2.13
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 174.09 us/op 137.37 us/op 1.27
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 1.5590 ms/op 1.1077 ms/op 1.41
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 141069 20.957 ms/op 11.836 ms/op 1.77
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 250000 34.770 ms/op 21.243 ms/op 1.64
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 250000 101.16 ms/op 77.092 ms/op 1.31
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 250000 61.199 ms/op 44.770 ms/op 1.37
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 250000 163.44 ms/op 122.68 ms/op 1.33
Tree 40 250000 create 996.56 ms/op 721.40 ms/op 1.38
Tree 40 250000 get(125000) 344.12 ns/op 285.93 ns/op 1.20
Tree 40 250000 set(125000) 3.2995 us/op 2.1266 us/op 1.55
Tree 40 250000 toArray() 40.002 ms/op 32.680 ms/op 1.22
Tree 40 250000 iterate all - toArray() + loop 38.686 ms/op 32.556 ms/op 1.19
Tree 40 250000 iterate all - get(i) 145.09 ms/op 108.44 ms/op 1.34
MutableVector 250000 create 16.172 ms/op 14.995 ms/op 1.08
MutableVector 250000 get(125000) 14.079 ns/op 13.098 ns/op 1.07
MutableVector 250000 set(125000) 707.75 ns/op 597.34 ns/op 1.18
MutableVector 250000 toArray() 7.1689 ms/op 6.6235 ms/op 1.08
MutableVector 250000 iterate all - toArray() + loop 7.5975 ms/op 6.7401 ms/op 1.13
MutableVector 250000 iterate all - get(i) 3.4954 ms/op 3.8317 ms/op 0.91
Array 250000 create 6.7597 ms/op 6.3429 ms/op 1.07
Array 250000 clone - spread 2.6408 ms/op 2.5552 ms/op 1.03
Array 250000 get(125000) 1.1320 ns/op 1.0280 ns/op 1.10
Array 250000 set(125000) 1.1160 ns/op 1.0200 ns/op 1.09
Array 250000 iterate all - loop 146.99 us/op 147.78 us/op 0.99
effectiveBalanceIncrements clone Uint8Array 300000 91.368 us/op 71.298 us/op 1.28
effectiveBalanceIncrements clone MutableVector 300000 752.00 ns/op 748.00 ns/op 1.01
effectiveBalanceIncrements rw all Uint8Array 300000 322.85 us/op 222.42 us/op 1.45
effectiveBalanceIncrements rw all MutableVector 300000 230.92 ms/op 187.69 ms/op 1.23
phase0 afterProcessEpoch - 250000 vs - 7PWei 207.66 ms/op 190.28 ms/op 1.09
phase0 beforeProcessEpoch - 250000 vs - 7PWei 117.27 ms/op 76.882 ms/op 1.53
altair processEpoch - mainnet_e81889 690.30 ms/op 572.58 ms/op 1.21
mainnet_e81889 - altair beforeProcessEpoch 183.36 ms/op 95.444 ms/op 1.92
mainnet_e81889 - altair processJustificationAndFinalization 74.237 us/op 20.629 us/op 3.60
mainnet_e81889 - altair processInactivityUpdates 11.439 ms/op 11.624 ms/op 0.98
mainnet_e81889 - altair processRewardsAndPenalties 108.61 ms/op 92.885 ms/op 1.17
mainnet_e81889 - altair processRegistryUpdates 12.855 us/op 3.0380 us/op 4.23
mainnet_e81889 - altair processSlashings 2.8320 us/op 588.00 ns/op 4.82
mainnet_e81889 - altair processEth1DataReset 3.1800 us/op 794.00 ns/op 4.01
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.0342 ms/op 2.0675 ms/op 1.47
mainnet_e81889 - altair processSlashingsReset 24.688 us/op 8.9660 us/op 2.75
mainnet_e81889 - altair processRandaoMixesReset 25.528 us/op 6.5230 us/op 3.91
mainnet_e81889 - altair processHistoricalRootsUpdate 4.3710 us/op 876.00 ns/op 4.99
mainnet_e81889 - altair processParticipationFlagUpdates 14.198 us/op 2.5890 us/op 5.48
mainnet_e81889 - altair processSyncCommitteeUpdates 2.8590 us/op 719.00 ns/op 3.98
mainnet_e81889 - altair afterProcessEpoch 207.25 ms/op 178.85 ms/op 1.16
phase0 processEpoch - mainnet_e58758 646.56 ms/op 531.06 ms/op 1.22
mainnet_e58758 - phase0 beforeProcessEpoch 327.42 ms/op 232.68 ms/op 1.41
mainnet_e58758 - phase0 processJustificationAndFinalization 65.544 us/op 32.480 us/op 2.02
mainnet_e58758 - phase0 processRewardsAndPenalties 92.158 ms/op 81.099 ms/op 1.14
mainnet_e58758 - phase0 processRegistryUpdates 31.979 us/op 11.948 us/op 2.68
mainnet_e58758 - phase0 processSlashings 2.8570 us/op 647.00 ns/op 4.42
mainnet_e58758 - phase0 processEth1DataReset 2.8760 us/op 673.00 ns/op 4.27
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.5124 ms/op 2.0609 ms/op 1.22
mainnet_e58758 - phase0 processSlashingsReset 15.572 us/op 6.6060 us/op 2.36
mainnet_e58758 - phase0 processRandaoMixesReset 26.589 us/op 8.6610 us/op 3.07
mainnet_e58758 - phase0 processHistoricalRootsUpdate 4.0020 us/op 866.00 ns/op 4.62
mainnet_e58758 - phase0 processParticipationRecordUpdates 24.786 us/op 4.9230 us/op 5.03
mainnet_e58758 - phase0 afterProcessEpoch 169.25 ms/op 161.49 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.3208 ms/op 2.7997 ms/op 0.83
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5803 ms/op 2.9804 ms/op 0.87
altair processInactivityUpdates - 250000 normalcase 56.971 ms/op 37.211 ms/op 1.53
altair processInactivityUpdates - 250000 worstcase 50.309 ms/op 37.572 ms/op 1.34
phase0 processRegistryUpdates - 250000 normalcase 29.742 us/op 8.6480 us/op 3.44
phase0 processRegistryUpdates - 250000 badcase_full_deposits 599.99 us/op 417.26 us/op 1.44
phase0 processRegistryUpdates - 250000 worstcase 0.5 281.19 ms/op 210.58 ms/op 1.34
altair processRewardsAndPenalties - 250000 normalcase 111.62 ms/op 116.82 ms/op 0.96
altair processRewardsAndPenalties - 250000 worstcase 101.15 ms/op 98.747 ms/op 1.02
phase0 getAttestationDeltas - 250000 normalcase 14.603 ms/op 11.973 ms/op 1.22
phase0 getAttestationDeltas - 250000 worstcase 15.207 ms/op 12.863 ms/op 1.18
phase0 processSlashings - 250000 worstcase 7.0890 ms/op 6.2091 ms/op 1.14
altair processSyncCommitteeUpdates - 250000 357.02 ms/op 269.42 ms/op 1.33
BeaconState.hashTreeRoot - No change 606.00 ns/op 443.00 ns/op 1.37
BeaconState.hashTreeRoot - 1 full validator 81.685 us/op 61.636 us/op 1.33
BeaconState.hashTreeRoot - 32 full validator 822.99 us/op 715.67 us/op 1.15
BeaconState.hashTreeRoot - 512 full validator 8.3158 ms/op 6.5821 ms/op 1.26
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 127.27 us/op 79.587 us/op 1.60
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6104 ms/op 1.1774 ms/op 1.37
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.687 ms/op 15.408 ms/op 1.28
BeaconState.hashTreeRoot - 1 balances 76.055 us/op 53.617 us/op 1.42
BeaconState.hashTreeRoot - 32 balances 755.34 us/op 581.59 us/op 1.30
BeaconState.hashTreeRoot - 512 balances 7.1027 ms/op 5.8383 ms/op 1.22
BeaconState.hashTreeRoot - 250000 balances 109.39 ms/op 94.358 ms/op 1.16
aggregationBits - 2048 els - zipIndexesInBitList 30.359 us/op 29.830 us/op 1.02
regular array get 100000 times 58.927 us/op 67.504 us/op 0.87
wrappedArray get 100000 times 57.508 us/op 67.338 us/op 0.85
arrayWithProxy get 100000 times 33.059 ms/op 28.325 ms/op 1.17
ssz.Root.equals 1.1540 us/op 1.0660 us/op 1.08
byteArrayEquals 1.1710 us/op 1.0560 us/op 1.11
shuffle list - 16384 els 11.979 ms/op 11.287 ms/op 1.06
shuffle list - 250000 els 172.39 ms/op 166.09 ms/op 1.04
processSlot - 1 slots 17.239 us/op 11.477 us/op 1.50
processSlot - 32 slots 2.4351 ms/op 1.5734 ms/op 1.55
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 410.39 us/op 309.46 us/op 1.33
getCommitteeAssignments - req 1 vs - 250000 vc 5.8399 ms/op 4.9517 ms/op 1.18
getCommitteeAssignments - req 100 vs - 250000 vc 8.3794 ms/op 6.6726 ms/op 1.26
getCommitteeAssignments - req 1000 vs - 250000 vc 9.3479 ms/op 7.0955 ms/op 1.32
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 10.090 ns/op 8.6500 ns/op 1.17
state getBlockRootAtSlot - 250000 vs - 7PWei 1.4634 us/op 1.2379 us/op 1.18
computeProposers - vc 250000 19.787 ms/op 16.207 ms/op 1.22
computeEpochShuffling - vc 250000 176.58 ms/op 158.92 ms/op 1.11
getNextSyncCommittee - vc 250000 333.22 ms/op 241.92 ms/op 1.38

by benchmarkbot/action

@wemeetagain wemeetagain merged commit a72e13e into unstable Dec 16, 2022
@wemeetagain wemeetagain deleted the tuyen/timing_block_process_2 branch December 16, 2022 00:16
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