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 local testnet dev scripts #5719

Merged
merged 1 commit into from
Jun 29, 2023
Merged

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jun 29, 2023

Motivation

Current dev script do not work but those are quite useful to quickly spin up a local testnet

Description

Adjust dev scripts to work with latest version of CLI.

@nflaig nflaig requested a review from a team as a code owner June 29, 2023 13:04
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 8b92bc0 Previous: 9a0a031 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 931.56 us/op 589.46 us/op 1.58
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 54.937 us/op 55.583 us/op 0.99
BLS verify - blst-native 1.2715 ms/op 1.2650 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 2.6090 ms/op 2.5665 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst-native 5.4904 ms/op 5.5703 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst-native 20.251 ms/op 19.962 ms/op 1.01
BLS aggregatePubkeys 32 - blst-native 26.841 us/op 27.292 us/op 0.98
BLS aggregatePubkeys 128 - blst-native 104.11 us/op 106.30 us/op 0.98
getAttestationsForBlock 63.920 ms/op 65.915 ms/op 0.97
isKnown best case - 1 super set check 266.00 ns/op 268.00 ns/op 0.99
isKnown normal case - 2 super set checks 263.00 ns/op 260.00 ns/op 1.01
isKnown worse case - 16 super set checks 266.00 ns/op 257.00 ns/op 1.04
CheckpointStateCache - add get delete 6.2190 us/op 6.2660 us/op 0.99
validate gossip signedAggregateAndProof - struct 2.8311 ms/op 2.9061 ms/op 0.97
validate gossip attestation - struct 1.3656 ms/op 1.3796 ms/op 0.99
pickEth1Vote - no votes 1.4647 ms/op 1.4196 ms/op 1.03
pickEth1Vote - max votes 14.013 ms/op 13.562 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.108 ms/op 10.267 ms/op 0.98
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.849 ms/op 19.497 ms/op 0.97
pickEth1Vote - Eth1Data fastSerialize value x2048 832.76 us/op 813.71 us/op 1.02
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.0103 ms/op 9.9098 ms/op 0.61
bytes32 toHexString 740.00 ns/op 774.00 ns/op 0.96
bytes32 Buffer.toString(hex) 463.00 ns/op 445.00 ns/op 1.04
bytes32 Buffer.toString(hex) from Uint8Array 630.00 ns/op 648.00 ns/op 0.97
bytes32 Buffer.toString(hex) + 0x 437.00 ns/op 433.00 ns/op 1.01
Object access 1 prop 0.20300 ns/op 0.20900 ns/op 0.97
Map access 1 prop 0.17600 ns/op 0.16700 ns/op 1.05
Object get x1000 6.9420 ns/op 7.4240 ns/op 0.94
Map get x1000 0.66000 ns/op 0.64400 ns/op 1.02
Object set x1000 67.874 ns/op 78.176 ns/op 0.87
Map set x1000 52.042 ns/op 62.055 ns/op 0.84
Return object 10000 times 0.24800 ns/op 0.27020 ns/op 0.92
Throw Error 10000 times 4.1720 us/op 4.4827 us/op 0.93
fastMsgIdFn sha256 / 200 bytes 3.4440 us/op 3.8220 us/op 0.90
fastMsgIdFn h32 xxhash / 200 bytes 286.00 ns/op 331.00 ns/op 0.86
fastMsgIdFn h64 xxhash / 200 bytes 395.00 ns/op 477.00 ns/op 0.83
fastMsgIdFn sha256 / 1000 bytes 11.657 us/op 12.170 us/op 0.96
fastMsgIdFn h32 xxhash / 1000 bytes 433.00 ns/op 443.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 1000 bytes 493.00 ns/op 532.00 ns/op 0.93
fastMsgIdFn sha256 / 10000 bytes 105.42 us/op 109.01 us/op 0.97
fastMsgIdFn h32 xxhash / 10000 bytes 1.9890 us/op 2.0620 us/op 0.96
fastMsgIdFn h64 xxhash / 10000 bytes 1.4340 us/op 1.5170 us/op 0.95
enrSubnets - fastDeserialize 64 bits 1.3010 us/op 1.6950 us/op 0.77
enrSubnets - ssz BitVector 64 bits 494.00 ns/op 642.00 ns/op 0.77
enrSubnets - fastDeserialize 4 bits 178.00 ns/op 209.00 ns/op 0.85
enrSubnets - ssz BitVector 4 bits 504.00 ns/op 625.00 ns/op 0.81
prioritizePeers score -10:0 att 32-0.1 sync 2-0 109.46 us/op 118.54 us/op 0.92
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 136.79 us/op 158.65 us/op 0.86
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 171.55 us/op 199.77 us/op 0.86
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 300.98 us/op 382.18 us/op 0.79
prioritizePeers score 0:0 att 64-1 sync 4-1 366.89 us/op 469.82 us/op 0.78
array of 16000 items push then shift 1.6528 us/op 1.7973 us/op 0.92
LinkedList of 16000 items push then shift 8.9330 ns/op 10.176 ns/op 0.88
array of 16000 items push then pop 93.152 ns/op 120.13 ns/op 0.78
LinkedList of 16000 items push then pop 8.9650 ns/op 9.6400 ns/op 0.93
array of 24000 items push then shift 2.3990 us/op 2.4593 us/op 0.98
LinkedList of 24000 items push then shift 8.9560 ns/op 10.294 ns/op 0.87
array of 24000 items push then pop 88.648 ns/op 101.86 ns/op 0.87
LinkedList of 24000 items push then pop 8.7120 ns/op 10.118 ns/op 0.86
intersect bitArray bitLen 8 13.316 ns/op 14.558 ns/op 0.91
intersect array and set length 8 79.862 ns/op 115.71 ns/op 0.69
intersect bitArray bitLen 128 43.520 ns/op 47.813 ns/op 0.91
intersect array and set length 128 1.1004 us/op 1.3366 us/op 0.82
Buffer.concat 32 items 3.0490 us/op 3.2810 us/op 0.93
Uint8Array.set 32 items 2.6040 us/op 2.4730 us/op 1.05
transfer serialized Status (84 B) 2.2360 us/op 2.2740 us/op 0.98
copy serialized Status (84 B) 1.8050 us/op 1.9310 us/op 0.93
transfer serialized SignedVoluntaryExit (112 B) 2.1620 us/op 2.4010 us/op 0.90
copy serialized SignedVoluntaryExit (112 B) 1.7700 us/op 2.1900 us/op 0.81
transfer serialized ProposerSlashing (416 B) 2.5100 us/op 3.3610 us/op 0.75
copy serialized ProposerSlashing (416 B) 2.3830 us/op 3.0960 us/op 0.77
transfer serialized Attestation (485 B) 2.6000 us/op 2.9890 us/op 0.87
copy serialized Attestation (485 B) 2.3020 us/op 3.5980 us/op 0.64
transfer serialized AttesterSlashing (33232 B) 2.7560 us/op 3.9710 us/op 0.69
copy serialized AttesterSlashing (33232 B) 6.0160 us/op 10.263 us/op 0.59
transfer serialized Small SignedBeaconBlock (128000 B) 3.0310 us/op 4.3440 us/op 0.70
copy serialized Small SignedBeaconBlock (128000 B) 15.283 us/op 25.757 us/op 0.59
transfer serialized Avg SignedBeaconBlock (200000 B) 3.0670 us/op 4.5230 us/op 0.68
copy serialized Avg SignedBeaconBlock (200000 B) 22.637 us/op 84.506 us/op 0.27
transfer serialized BlobsSidecar (524380 B) 3.2020 us/op 4.4170 us/op 0.72
copy serialized BlobsSidecar (524380 B) 114.03 us/op 188.58 us/op 0.60
transfer serialized Big SignedBeaconBlock (1000000 B) 3.4410 us/op 4.4420 us/op 0.77
copy serialized Big SignedBeaconBlock (1000000 B) 349.95 us/op 329.06 us/op 1.06
pass gossip attestations to forkchoice per slot 2.7095 ms/op 2.8427 ms/op 0.95
forkChoice updateHead vc 100000 bc 64 eq 0 2.0964 ms/op 2.1647 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 0 11.826 ms/op 12.487 ms/op 0.95
forkChoice updateHead vc 1000000 bc 64 eq 0 22.357 ms/op 26.349 ms/op 0.85
forkChoice updateHead vc 600000 bc 320 eq 0 17.161 ms/op 18.527 ms/op 0.93
forkChoice updateHead vc 600000 bc 1200 eq 0 80.927 ms/op 91.625 ms/op 0.88
forkChoice updateHead vc 600000 bc 64 eq 1000 20.581 ms/op 22.002 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 10000 22.751 ms/op 23.898 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 300000 31.029 ms/op 47.363 ms/op 0.66
computeDeltas 3.0893 ms/op 3.2373 ms/op 0.95
computeProposerBoostScoreFromBalances 1.8125 ms/op 1.8167 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 2.5243 ms/op 2.1943 ms/op 1.15
altair processAttestation - 250000 vs - 7PWei worstcase 3.9445 ms/op 3.3302 ms/op 1.18
altair processAttestation - setStatus - 1/6 committees join 144.91 us/op 141.42 us/op 1.02
altair processAttestation - setStatus - 1/3 committees join 284.82 us/op 280.53 us/op 1.02
altair processAttestation - setStatus - 1/2 committees join 376.14 us/op 378.03 us/op 1.00
altair processAttestation - setStatus - 2/3 committees join 488.31 us/op 484.81 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 689.62 us/op 651.64 us/op 1.06
altair processAttestation - setStatus - 100% committees join 796.04 us/op 760.08 us/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase 19.006 ms/op 18.391 ms/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.071 ms/op 26.645 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase 52.350 ms/op 49.406 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase hashState 70.610 ms/op 65.389 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3922 ms/op 2.1951 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei worstcase 30.929 ms/op 30.264 ms/op 1.02
altair processEth1Data - 250000 vs - 7PWei normalcase 465.80 us/op 464.69 us/op 1.00
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.2950 us/op 7.0230 us/op 1.18
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 30.060 us/op 19.246 us/op 1.56
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.641 us/op 8.4460 us/op 1.38
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.2700 us/op 6.3350 us/op 1.31
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 113.08 us/op 74.287 us/op 1.52
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 660.32 us/op 603.21 us/op 1.09
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 920.67 us/op 878.83 us/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 874.30 us/op 866.33 us/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.4555 ms/op 2.2482 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4824 ms/op 1.7563 ms/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9748 ms/op 3.7236 ms/op 1.07
Tree 40 250000 create 319.21 ms/op 310.87 ms/op 1.03
Tree 40 250000 get(125000) 194.28 ns/op 175.20 ns/op 1.11
Tree 40 250000 set(125000) 1.0088 us/op 925.02 ns/op 1.09
Tree 40 250000 toArray() 24.595 ms/op 16.999 ms/op 1.45
Tree 40 250000 iterate all - toArray() + loop 23.180 ms/op 16.759 ms/op 1.38
Tree 40 250000 iterate all - get(i) 76.594 ms/op 65.421 ms/op 1.17
MutableVector 250000 create 10.899 ms/op 9.4677 ms/op 1.15
MutableVector 250000 get(125000) 6.3030 ns/op 6.3160 ns/op 1.00
MutableVector 250000 set(125000) 259.70 ns/op 239.43 ns/op 1.08
MutableVector 250000 toArray() 3.1479 ms/op 2.6365 ms/op 1.19
MutableVector 250000 iterate all - toArray() + loop 3.3213 ms/op 2.6367 ms/op 1.26
MutableVector 250000 iterate all - get(i) 1.5488 ms/op 1.4765 ms/op 1.05
Array 250000 create 2.9934 ms/op 2.3991 ms/op 1.25
Array 250000 clone - spread 1.1308 ms/op 1.0825 ms/op 1.04
Array 250000 get(125000) 0.56600 ns/op 0.53700 ns/op 1.05
Array 250000 set(125000) 0.62600 ns/op 0.59900 ns/op 1.05
Array 250000 iterate all - loop 82.311 us/op 104.74 us/op 0.79
effectiveBalanceIncrements clone Uint8Array 300000 25.769 us/op 26.351 us/op 0.98
effectiveBalanceIncrements clone MutableVector 300000 337.00 ns/op 327.00 ns/op 1.03
effectiveBalanceIncrements rw all Uint8Array 300000 167.71 us/op 163.45 us/op 1.03
effectiveBalanceIncrements rw all MutableVector 300000 80.195 ms/op 77.418 ms/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 110.48 ms/op 109.23 ms/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 42.540 ms/op 42.608 ms/op 1.00
altair processEpoch - mainnet_e81889 319.75 ms/op 325.59 ms/op 0.98
mainnet_e81889 - altair beforeProcessEpoch 70.163 ms/op 61.790 ms/op 1.14
mainnet_e81889 - altair processJustificationAndFinalization 18.111 us/op 15.963 us/op 1.13
mainnet_e81889 - altair processInactivityUpdates 5.6634 ms/op 5.2061 ms/op 1.09
mainnet_e81889 - altair processRewardsAndPenalties 53.019 ms/op 53.090 ms/op 1.00
mainnet_e81889 - altair processRegistryUpdates 2.8070 us/op 2.5360 us/op 1.11
mainnet_e81889 - altair processSlashings 477.00 ns/op 629.00 ns/op 0.76
mainnet_e81889 - altair processEth1DataReset 511.00 ns/op 585.00 ns/op 0.87
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2334 ms/op 1.2625 ms/op 0.98
mainnet_e81889 - altair processSlashingsReset 4.8330 us/op 9.8060 us/op 0.49
mainnet_e81889 - altair processRandaoMixesReset 4.9220 us/op 6.4180 us/op 0.77
mainnet_e81889 - altair processHistoricalRootsUpdate 773.00 ns/op 1.0950 us/op 0.71
mainnet_e81889 - altair processParticipationFlagUpdates 2.4330 us/op 3.0850 us/op 0.79
mainnet_e81889 - altair processSyncCommitteeUpdates 473.00 ns/op 647.00 ns/op 0.73
mainnet_e81889 - altair afterProcessEpoch 117.62 ms/op 129.24 ms/op 0.91
phase0 processEpoch - mainnet_e58758 322.62 ms/op 361.87 ms/op 0.89
mainnet_e58758 - phase0 beforeProcessEpoch 121.20 ms/op 136.20 ms/op 0.89
mainnet_e58758 - phase0 processJustificationAndFinalization 16.539 us/op 16.219 us/op 1.02
mainnet_e58758 - phase0 processRewardsAndPenalties 54.904 ms/op 61.797 ms/op 0.89
mainnet_e58758 - phase0 processRegistryUpdates 7.8760 us/op 9.0170 us/op 0.87
mainnet_e58758 - phase0 processSlashings 509.00 ns/op 576.00 ns/op 0.88
mainnet_e58758 - phase0 processEth1DataReset 496.00 ns/op 588.00 ns/op 0.84
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 963.46 us/op 948.10 us/op 1.02
mainnet_e58758 - phase0 processSlashingsReset 3.2820 us/op 3.8580 us/op 0.85
mainnet_e58758 - phase0 processRandaoMixesReset 4.3220 us/op 4.8180 us/op 0.90
mainnet_e58758 - phase0 processHistoricalRootsUpdate 765.00 ns/op 566.00 ns/op 1.35
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.0530 us/op 4.3340 us/op 0.94
mainnet_e58758 - phase0 afterProcessEpoch 97.147 ms/op 94.981 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2257 ms/op 1.2088 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4331 ms/op 1.4613 ms/op 0.98
altair processInactivityUpdates - 250000 normalcase 21.490 ms/op 24.480 ms/op 0.88
altair processInactivityUpdates - 250000 worstcase 23.667 ms/op 27.075 ms/op 0.87
phase0 processRegistryUpdates - 250000 normalcase 6.1700 us/op 7.4560 us/op 0.83
phase0 processRegistryUpdates - 250000 badcase_full_deposits 249.02 us/op 233.77 us/op 1.07
phase0 processRegistryUpdates - 250000 worstcase 0.5 123.69 ms/op 103.98 ms/op 1.19
altair processRewardsAndPenalties - 250000 normalcase 45.566 ms/op 64.436 ms/op 0.71
altair processRewardsAndPenalties - 250000 worstcase 45.981 ms/op 68.072 ms/op 0.68
phase0 getAttestationDeltas - 250000 normalcase 6.7958 ms/op 6.5348 ms/op 1.04
phase0 getAttestationDeltas - 250000 worstcase 6.7933 ms/op 6.4123 ms/op 1.06
phase0 processSlashings - 250000 worstcase 3.5941 ms/op 3.4936 ms/op 1.03
altair processSyncCommitteeUpdates - 250000 175.08 ms/op 170.72 ms/op 1.03
BeaconState.hashTreeRoot - No change 249.00 ns/op 313.00 ns/op 0.80
BeaconState.hashTreeRoot - 1 full validator 51.736 us/op 50.633 us/op 1.02
BeaconState.hashTreeRoot - 32 full validator 506.65 us/op 483.47 us/op 1.05
BeaconState.hashTreeRoot - 512 full validator 5.5054 ms/op 6.1084 ms/op 0.90
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 59.456 us/op 61.876 us/op 0.96
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 856.06 us/op 848.44 us/op 1.01
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.151 ms/op 11.088 ms/op 1.01
BeaconState.hashTreeRoot - 1 balances 46.134 us/op 49.350 us/op 0.93
BeaconState.hashTreeRoot - 32 balances 446.45 us/op 454.41 us/op 0.98
BeaconState.hashTreeRoot - 512 balances 4.4169 ms/op 4.2464 ms/op 1.04
BeaconState.hashTreeRoot - 250000 balances 72.445 ms/op 72.885 ms/op 0.99
aggregationBits - 2048 els - zipIndexesInBitList 16.544 us/op 14.827 us/op 1.12
regular array get 100000 times 32.469 us/op 31.832 us/op 1.02
wrappedArray get 100000 times 32.396 us/op 33.420 us/op 0.97
arrayWithProxy get 100000 times 15.261 ms/op 14.973 ms/op 1.02
ssz.Root.equals 568.00 ns/op 556.00 ns/op 1.02
byteArrayEquals 518.00 ns/op 513.00 ns/op 1.01
shuffle list - 16384 els 6.5634 ms/op 6.6160 ms/op 0.99
shuffle list - 250000 els 98.526 ms/op 96.929 ms/op 1.02
processSlot - 1 slots 8.5230 us/op 8.5540 us/op 1.00
processSlot - 32 slots 1.3208 ms/op 1.3267 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 34.177 ms/op 37.318 ms/op 0.92
getCommitteeAssignments - req 1 vs - 250000 vc 2.9016 ms/op 2.8813 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 4.1008 ms/op 4.0938 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4533 ms/op 4.4140 ms/op 1.01
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4200 ns/op 4.5000 ns/op 0.98
state getBlockRootAtSlot - 250000 vs - 7PWei 929.41 ns/op 907.45 ns/op 1.02
computeProposers - vc 250000 10.230 ms/op 10.387 ms/op 0.98
computeEpochShuffling - vc 250000 100.29 ms/op 100.70 ms/op 1.00
getNextSyncCommittee - vc 250000 170.36 ms/op 169.42 ms/op 1.01
computeSigningRoot for AttestationData 13.345 us/op 12.992 us/op 1.03
hash AttestationData serialized data then Buffer.toString(base64) 2.3378 us/op 2.4310 us/op 0.96
toHexString serialized data 1.0669 us/op 1.0361 us/op 1.03
Buffer.toString(base64) 308.55 ns/op 320.35 ns/op 0.96

by benchmarkbot/action

@wemeetagain wemeetagain merged commit a4c93c1 into unstable Jun 29, 2023
@wemeetagain wemeetagain deleted the nflaig/fix-dev-scripts branch June 29, 2023 14:20
@wemeetagain
Copy link
Member

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