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: fix build:watch scripts #5531

Merged
merged 3 commits into from
May 24, 2023
Merged

chore: fix build:watch scripts #5531

merged 3 commits into from
May 24, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented May 24, 2023

Motivation

Currently build:watch scripts (added in #1142) are broken as they reference outdated commands removed in #2933.

PR to drop lerna (#4258) suggests to remove those scripts but I find them quite handy for faster feedback cycles and generally observing build errors. Running yarn build:ifchanged works but is not ideal in my opinion.

Description

  • removes build:types:watch as build:types no longer exists
  • rename build:lib:watch to build:watch and update reference to correct build command
  • add missing build:watch script to packages

Running this from root directory causes MaxListenersExceededWarning warnings but might not be worth further investigate how to prevent this as it does not impact functionality

Max listeners warning is fixed by using lerna exec instead of lerna run (see stackoverflow).

@nflaig nflaig requested a review from a team as a code owner May 24, 2023 10:36
@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 9816eb3 Previous: 5a91e39 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 601.86 us/op 635.25 us/op 0.95
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 52.424 us/op 50.875 us/op 1.03
BLS verify - blst-native 1.2668 ms/op 1.3002 ms/op 0.97
BLS verifyMultipleSignatures 3 - blst-native 2.5768 ms/op 2.6853 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst-native 5.4746 ms/op 5.9925 ms/op 0.91
BLS verifyMultipleSignatures 32 - blst-native 19.854 ms/op 21.457 ms/op 0.93
BLS aggregatePubkeys 32 - blst-native 26.615 us/op 28.300 us/op 0.94
BLS aggregatePubkeys 128 - blst-native 104.67 us/op 110.94 us/op 0.94
getAttestationsForBlock 65.695 ms/op 61.894 ms/op 1.06
isKnown best case - 1 super set check 280.00 ns/op 272.00 ns/op 1.03
isKnown normal case - 2 super set checks 265.00 ns/op 262.00 ns/op 1.01
isKnown worse case - 16 super set checks 256.00 ns/op 275.00 ns/op 0.93
CheckpointStateCache - add get delete 5.3970 us/op 5.7200 us/op 0.94
validate gossip signedAggregateAndProof - struct 2.8407 ms/op 2.9509 ms/op 0.96
validate gossip attestation - struct 1.3939 ms/op 1.4184 ms/op 0.98
pickEth1Vote - no votes 1.2703 ms/op 1.5244 ms/op 0.83
pickEth1Vote - max votes 9.2316 ms/op 11.508 ms/op 0.80
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.8009 ms/op 9.8749 ms/op 0.89
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 14.755 ms/op 16.041 ms/op 0.92
pickEth1Vote - Eth1Data fastSerialize value x2048 734.05 us/op 750.78 us/op 0.98
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.1057 ms/op 7.1551 ms/op 0.85
bytes32 toHexString 626.00 ns/op 509.00 ns/op 1.23
bytes32 Buffer.toString(hex) 414.00 ns/op 350.00 ns/op 1.18
bytes32 Buffer.toString(hex) from Uint8Array 615.00 ns/op 551.00 ns/op 1.12
bytes32 Buffer.toString(hex) + 0x 398.00 ns/op 385.00 ns/op 1.03
Object access 1 prop 0.19300 ns/op 0.17500 ns/op 1.10
Map access 1 prop 0.17400 ns/op 0.16700 ns/op 1.04
Object get x1000 7.4900 ns/op 6.6390 ns/op 1.13
Map get x1000 0.64100 ns/op 0.62200 ns/op 1.03
Object set x1000 65.716 ns/op 54.042 ns/op 1.22
Map set x1000 56.401 ns/op 45.972 ns/op 1.23
Return object 10000 times 0.25870 ns/op 0.24510 ns/op 1.06
Throw Error 10000 times 4.4654 us/op 4.3139 us/op 1.04
fastMsgIdFn sha256 / 200 bytes 3.6690 us/op 3.5730 us/op 1.03
fastMsgIdFn h32 xxhash / 200 bytes 318.00 ns/op 297.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 200 bytes 487.00 ns/op 411.00 ns/op 1.18
fastMsgIdFn sha256 / 1000 bytes 12.120 us/op 11.822 us/op 1.03
fastMsgIdFn h32 xxhash / 1000 bytes 462.00 ns/op 434.00 ns/op 1.06
fastMsgIdFn h64 xxhash / 1000 bytes 562.00 ns/op 478.00 ns/op 1.18
fastMsgIdFn sha256 / 10000 bytes 110.14 us/op 104.30 us/op 1.06
fastMsgIdFn h32 xxhash / 10000 bytes 2.1080 us/op 1.9830 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.4620 us/op 1.4720 us/op 0.99
enrSubnets - fastDeserialize 64 bits 1.7310 us/op 1.3870 us/op 1.25
enrSubnets - ssz BitVector 64 bits 582.00 ns/op 539.00 ns/op 1.08
enrSubnets - fastDeserialize 4 bits 196.00 ns/op 181.00 ns/op 1.08
enrSubnets - ssz BitVector 4 bits 547.00 ns/op 530.00 ns/op 1.03
prioritizePeers score -10:0 att 32-0.1 sync 2-0 133.34 us/op 107.17 us/op 1.24
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 176.51 us/op 144.65 us/op 1.22
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 188.28 us/op 181.00 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 360.52 us/op 318.35 us/op 1.13
prioritizePeers score 0:0 att 64-1 sync 4-1 413.77 us/op 380.42 us/op 1.09
array of 16000 items push then shift 1.7015 us/op 1.7179 us/op 0.99
LinkedList of 16000 items push then shift 9.8480 ns/op 9.5240 ns/op 1.03
array of 16000 items push then pop 108.36 ns/op 88.867 ns/op 1.22
LinkedList of 16000 items push then pop 9.1240 ns/op 8.5740 ns/op 1.06
array of 24000 items push then shift 2.4956 us/op 2.4118 us/op 1.03
LinkedList of 24000 items push then shift 9.4770 ns/op 9.1480 ns/op 1.04
array of 24000 items push then pop 84.830 ns/op 76.055 ns/op 1.12
LinkedList of 24000 items push then pop 8.9730 ns/op 8.5830 ns/op 1.05
intersect bitArray bitLen 8 13.567 ns/op 13.712 ns/op 0.99
intersect array and set length 8 84.580 ns/op 80.066 ns/op 1.06
intersect bitArray bitLen 128 45.972 ns/op 46.082 ns/op 1.00
intersect array and set length 128 1.3395 us/op 1.0935 us/op 1.22
Buffer.concat 32 items 2.9100 us/op 3.0020 us/op 0.97
Uint8Array.set 32 items 2.4030 us/op 2.4830 us/op 0.97
pass gossip attestations to forkchoice per slot 2.4555 ms/op 2.3738 ms/op 1.03
computeDeltas 3.1148 ms/op 3.5069 ms/op 0.89
computeProposerBoostScoreFromBalances 1.8458 ms/op 1.7896 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 3.3243 ms/op 2.0978 ms/op 1.58
altair processAttestation - 250000 vs - 7PWei worstcase 4.5167 ms/op 3.5109 ms/op 1.29
altair processAttestation - setStatus - 1/6 committees join 147.70 us/op 146.64 us/op 1.01
altair processAttestation - setStatus - 1/3 committees join 289.48 us/op 285.98 us/op 1.01
altair processAttestation - setStatus - 1/2 committees join 393.04 us/op 398.78 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 483.96 us/op 489.64 us/op 0.99
altair processAttestation - setStatus - 4/5 committees join 716.07 us/op 676.56 us/op 1.06
altair processAttestation - setStatus - 100% committees join 788.63 us/op 798.50 us/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase 17.329 ms/op 17.146 ms/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase hashState 27.127 ms/op 25.569 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase 50.391 ms/op 53.651 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 70.604 ms/op 72.495 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3209 ms/op 2.3827 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei worstcase 30.620 ms/op 30.228 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 607.00 us/op 521.86 us/op 1.16
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 10.405 us/op 8.2230 us/op 1.27
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 26.983 us/op 22.734 us/op 1.19
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 13.486 us/op 8.5730 us/op 1.57
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 8.8730 us/op 7.5800 us/op 1.17
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 114.50 us/op 98.901 us/op 1.16
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 670.45 us/op 658.17 us/op 1.02
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 927.19 us/op 912.36 us/op 1.02
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 932.66 us/op 937.80 us/op 0.99
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.4683 ms/op 2.5723 ms/op 0.96
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.5535 ms/op 1.8014 ms/op 0.86
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 3.9332 ms/op 4.0966 ms/op 0.96
Tree 40 250000 create 326.52 ms/op 332.96 ms/op 0.98
Tree 40 250000 get(125000) 192.46 ns/op 203.17 ns/op 0.95
Tree 40 250000 set(125000) 985.11 ns/op 1.0511 us/op 0.94
Tree 40 250000 toArray() 20.438 ms/op 22.611 ms/op 0.90
Tree 40 250000 iterate all - toArray() + loop 19.619 ms/op 23.969 ms/op 0.82
Tree 40 250000 iterate all - get(i) 69.918 ms/op 81.877 ms/op 0.85
MutableVector 250000 create 11.247 ms/op 12.625 ms/op 0.89
MutableVector 250000 get(125000) 6.4570 ns/op 6.9830 ns/op 0.92
MutableVector 250000 set(125000) 275.21 ns/op 363.67 ns/op 0.76
MutableVector 250000 toArray() 2.8405 ms/op 3.8059 ms/op 0.75
MutableVector 250000 iterate all - toArray() + loop 2.8698 ms/op 3.4116 ms/op 0.84
MutableVector 250000 iterate all - get(i) 1.5415 ms/op 1.6547 ms/op 0.93
Array 250000 create 2.5445 ms/op 3.1459 ms/op 0.81
Array 250000 clone - spread 1.1909 ms/op 1.2314 ms/op 0.97
Array 250000 get(125000) 0.59500 ns/op 0.60500 ns/op 0.98
Array 250000 set(125000) 0.67000 ns/op 0.70700 ns/op 0.95
Array 250000 iterate all - loop 83.463 us/op 88.428 us/op 0.94
effectiveBalanceIncrements clone Uint8Array 300000 28.916 us/op 37.303 us/op 0.78
effectiveBalanceIncrements clone MutableVector 300000 385.00 ns/op 368.00 ns/op 1.05
effectiveBalanceIncrements rw all Uint8Array 300000 169.74 us/op 189.98 us/op 0.89
effectiveBalanceIncrements rw all MutableVector 300000 88.850 ms/op 92.735 ms/op 0.96
phase0 afterProcessEpoch - 250000 vs - 7PWei 114.56 ms/op 130.49 ms/op 0.88
phase0 beforeProcessEpoch - 250000 vs - 7PWei 32.004 ms/op 47.815 ms/op 0.67
altair processEpoch - mainnet_e81889 328.79 ms/op 355.35 ms/op 0.93
mainnet_e81889 - altair beforeProcessEpoch 67.497 ms/op 72.703 ms/op 0.93
mainnet_e81889 - altair processJustificationAndFinalization 19.082 us/op 22.522 us/op 0.85
mainnet_e81889 - altair processInactivityUpdates 6.0541 ms/op 6.4110 ms/op 0.94
mainnet_e81889 - altair processRewardsAndPenalties 69.327 ms/op 56.646 ms/op 1.22
mainnet_e81889 - altair processRegistryUpdates 3.3000 us/op 2.9110 us/op 1.13
mainnet_e81889 - altair processSlashings 594.00 ns/op 508.00 ns/op 1.17
mainnet_e81889 - altair processEth1DataReset 557.00 ns/op 775.00 ns/op 0.72
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2732 ms/op 1.3259 ms/op 0.96
mainnet_e81889 - altair processSlashingsReset 4.6640 us/op 5.2450 us/op 0.89
mainnet_e81889 - altair processRandaoMixesReset 10.465 us/op 7.4490 us/op 1.40
mainnet_e81889 - altair processHistoricalRootsUpdate 993.00 ns/op 1.1720 us/op 0.85
mainnet_e81889 - altair processParticipationFlagUpdates 4.2090 us/op 4.0000 us/op 1.05
mainnet_e81889 - altair processSyncCommitteeUpdates 1.4210 us/op 1.5320 us/op 0.93
mainnet_e81889 - altair afterProcessEpoch 147.04 ms/op 143.67 ms/op 1.02
phase0 processEpoch - mainnet_e58758 396.46 ms/op 501.13 ms/op 0.79
mainnet_e58758 - phase0 beforeProcessEpoch 156.44 ms/op 198.85 ms/op 0.79
mainnet_e58758 - phase0 processJustificationAndFinalization 17.762 us/op 29.180 us/op 0.61
mainnet_e58758 - phase0 processRewardsAndPenalties 65.340 ms/op 79.914 ms/op 0.82
mainnet_e58758 - phase0 processRegistryUpdates 8.9010 us/op 17.874 us/op 0.50
mainnet_e58758 - phase0 processSlashings 548.00 ns/op 1.6020 us/op 0.34
mainnet_e58758 - phase0 processEth1DataReset 706.00 ns/op 1.6270 us/op 0.43
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0641 ms/op 1.4159 ms/op 0.75
mainnet_e58758 - phase0 processSlashingsReset 4.9370 us/op 12.364 us/op 0.40
mainnet_e58758 - phase0 processRandaoMixesReset 6.4750 us/op 13.605 us/op 0.48
mainnet_e58758 - phase0 processHistoricalRootsUpdate 639.00 ns/op 2.0650 us/op 0.31
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.2280 us/op 9.4680 us/op 0.45
mainnet_e58758 - phase0 afterProcessEpoch 101.25 ms/op 125.00 ms/op 0.81
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3187 ms/op 1.6068 ms/op 0.82
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7191 ms/op 1.8986 ms/op 0.91
altair processInactivityUpdates - 250000 normalcase 27.347 ms/op 31.809 ms/op 0.86
altair processInactivityUpdates - 250000 worstcase 28.991 ms/op 24.545 ms/op 1.18
phase0 processRegistryUpdates - 250000 normalcase 8.1450 us/op 8.1010 us/op 1.01
phase0 processRegistryUpdates - 250000 badcase_full_deposits 277.34 us/op 311.01 us/op 0.89
phase0 processRegistryUpdates - 250000 worstcase 0.5 133.94 ms/op 137.40 ms/op 0.97
altair processRewardsAndPenalties - 250000 normalcase 67.484 ms/op 74.113 ms/op 0.91
altair processRewardsAndPenalties - 250000 worstcase 70.377 ms/op 75.349 ms/op 0.93
phase0 getAttestationDeltas - 250000 normalcase 7.2602 ms/op 10.788 ms/op 0.67
phase0 getAttestationDeltas - 250000 worstcase 6.9411 ms/op 10.787 ms/op 0.64
phase0 processSlashings - 250000 worstcase 3.7238 ms/op 4.8886 ms/op 0.76
altair processSyncCommitteeUpdates - 250000 182.83 ms/op 226.76 ms/op 0.81
BeaconState.hashTreeRoot - No change 302.00 ns/op 338.00 ns/op 0.89
BeaconState.hashTreeRoot - 1 full validator 53.455 us/op 58.919 us/op 0.91
BeaconState.hashTreeRoot - 32 full validator 598.32 us/op 689.43 us/op 0.87
BeaconState.hashTreeRoot - 512 full validator 5.6990 ms/op 6.8242 ms/op 0.84
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 67.904 us/op 77.194 us/op 0.88
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 908.73 us/op 1.0648 ms/op 0.85
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 12.111 ms/op 13.896 ms/op 0.87
BeaconState.hashTreeRoot - 1 balances 52.154 us/op 55.827 us/op 0.93
BeaconState.hashTreeRoot - 32 balances 473.17 us/op 480.26 us/op 0.99
BeaconState.hashTreeRoot - 512 balances 4.4620 ms/op 5.0239 ms/op 0.89
BeaconState.hashTreeRoot - 250000 balances 79.284 ms/op 86.590 ms/op 0.92
aggregationBits - 2048 els - zipIndexesInBitList 16.903 us/op 25.253 us/op 0.67
regular array get 100000 times 34.628 us/op 45.123 us/op 0.77
wrappedArray get 100000 times 34.432 us/op 38.039 us/op 0.91
arrayWithProxy get 100000 times 17.071 ms/op 19.589 ms/op 0.87
ssz.Root.equals 599.00 ns/op 678.00 ns/op 0.88
byteArrayEquals 595.00 ns/op 663.00 ns/op 0.90
shuffle list - 16384 els 7.1999 ms/op 7.5599 ms/op 0.95
shuffle list - 250000 els 106.56 ms/op 116.00 ms/op 0.92
processSlot - 1 slots 10.762 us/op 9.8310 us/op 1.09
processSlot - 32 slots 1.4793 ms/op 1.5472 ms/op 0.96
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.973 ms/op 44.524 ms/op 0.85
getCommitteeAssignments - req 1 vs - 250000 vc 3.0333 ms/op 3.0746 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 4.3497 ms/op 5.4820 ms/op 0.79
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6153 ms/op 5.3130 ms/op 0.87
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8100 ns/op 5.6900 ns/op 0.85
state getBlockRootAtSlot - 250000 vs - 7PWei 937.94 ns/op 1.0291 us/op 0.91
computeProposers - vc 250000 10.888 ms/op 14.607 ms/op 0.75
computeEpochShuffling - vc 250000 107.15 ms/op 119.73 ms/op 0.89
getNextSyncCommittee - vc 250000 185.51 ms/op 229.64 ms/op 0.81
computeSigningRoot for AttestationData 14.537 us/op 16.361 us/op 0.89
hash AttestationData serialized data then Buffer.toString(base64) 2.5599 us/op 3.1634 us/op 0.81
toHexString serialized data 1.1581 us/op 2.3190 us/op 0.50
Buffer.toString(base64) 352.02 ns/op 455.39 ns/op 0.77

by benchmarkbot/action

dapplion
dapplion previously approved these changes May 24, 2023
Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nflaig nflaig mentioned this pull request May 24, 2023
@nflaig nflaig merged commit 1a8476b into unstable May 24, 2023
@nflaig nflaig deleted the nflaig/fix-build-watch branch May 24, 2023 15:29
@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.

3 participants