Skip to content

Ugrade builder flow for capella and eip4844 forks#4964

Merged
g11tech merged 8 commits intounstablefrom
g11tech/builder-api-till-eip4844
Jan 9, 2023
Merged

Ugrade builder flow for capella and eip4844 forks#4964
g11tech merged 8 commits intounstablefrom
g11tech/builder-api-till-eip4844

Conversation

@g11tech
Copy link
Contributor

@g11tech g11tech commented Jan 3, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d076abb Previous: 45d7c01 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.4285 ms/op 1.0729 ms/op 1.33
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 84.878 us/op 63.941 us/op 1.33
BLS verify - blst-native 2.3573 ms/op 2.1744 ms/op 1.08
BLS verifyMultipleSignatures 3 - blst-native 4.6912 ms/op 4.4845 ms/op 1.05
BLS verifyMultipleSignatures 8 - blst-native 10.136 ms/op 9.6964 ms/op 1.05
BLS verifyMultipleSignatures 32 - blst-native 36.133 ms/op 35.221 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 48.415 us/op 46.821 us/op 1.03
BLS aggregatePubkeys 128 - blst-native 198.69 us/op 183.85 us/op 1.08
getAttestationsForBlock 111.09 ms/op 77.669 ms/op 1.43
isKnown best case - 1 super set check 530.00 ns/op 438.00 ns/op 1.21
isKnown normal case - 2 super set checks 511.00 ns/op 430.00 ns/op 1.19
isKnown worse case - 16 super set checks 516.00 ns/op 431.00 ns/op 1.20
CheckpointStateCache - add get delete 10.371 us/op 8.5620 us/op 1.21
validate gossip signedAggregateAndProof - struct 5.3278 ms/op 5.0283 ms/op 1.06
validate gossip attestation - struct 2.5064 ms/op 2.3583 ms/op 1.06
pickEth1Vote - no votes 2.7516 ms/op 2.1827 ms/op 1.26
pickEth1Vote - max votes 20.959 ms/op 16.221 ms/op 1.29
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.046 ms/op 13.124 ms/op 1.15
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 25.821 ms/op 20.599 ms/op 1.25
pickEth1Vote - Eth1Data fastSerialize value x2048 1.5351 ms/op 1.1058 ms/op 1.39
pickEth1Vote - Eth1Data fastSerialize tree x2048 11.893 ms/op 9.8578 ms/op 1.21
bytes32 toHexString 1.3060 us/op 877.00 ns/op 1.49
bytes32 Buffer.toString(hex) 695.00 ns/op 574.00 ns/op 1.21
bytes32 Buffer.toString(hex) from Uint8Array 1.1200 us/op 903.00 ns/op 1.24
bytes32 Buffer.toString(hex) + 0x 742.00 ns/op 564.00 ns/op 1.32
Object access 1 prop 0.35100 ns/op 0.27000 ns/op 1.30
Map access 1 prop 0.32200 ns/op 0.25900 ns/op 1.24
Object get x1000 20.882 ns/op 11.008 ns/op 1.90
Map get x1000 1.2380 ns/op 0.93400 ns/op 1.33
Object set x1000 137.51 ns/op 70.079 ns/op 1.96
Map set x1000 87.139 ns/op 43.034 ns/op 2.02
Return object 10000 times 0.47010 ns/op 0.43500 ns/op 1.08
Throw Error 10000 times 8.3128 us/op 6.6015 us/op 1.26
fastMsgIdFn sha256 / 200 bytes 5.4640 us/op 4.8290 us/op 1.13
fastMsgIdFn h32 xxhash / 200 bytes 560.00 ns/op 463.00 ns/op 1.21
fastMsgIdFn h64 xxhash / 200 bytes 801.00 ns/op 676.00 ns/op 1.18
fastMsgIdFn sha256 / 1000 bytes 17.579 us/op 15.687 us/op 1.12
fastMsgIdFn h32 xxhash / 1000 bytes 742.00 ns/op 639.00 ns/op 1.16
fastMsgIdFn h64 xxhash / 1000 bytes 905.00 ns/op 784.00 ns/op 1.15
fastMsgIdFn sha256 / 10000 bytes 151.46 us/op 136.25 us/op 1.11
fastMsgIdFn h32 xxhash / 10000 bytes 2.8260 us/op 2.5320 us/op 1.12
fastMsgIdFn h64 xxhash / 10000 bytes 2.0680 us/op 1.7990 us/op 1.15
enrSubnets - fastDeserialize 64 bits 3.1390 us/op 2.2190 us/op 1.41
enrSubnets - ssz BitVector 64 bits 1.0770 us/op 837.00 ns/op 1.29
enrSubnets - fastDeserialize 4 bits 368.00 ns/op 286.00 ns/op 1.29
enrSubnets - ssz BitVector 4 bits 1.0120 us/op 876.00 ns/op 1.16
prioritizePeers score -10:0 att 32-0.1 sync 2-0 212.49 us/op 146.39 us/op 1.45
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 258.04 us/op 182.94 us/op 1.41
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 400.70 us/op 254.63 us/op 1.57
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 698.57 us/op 434.55 us/op 1.61
prioritizePeers score 0:0 att 64-1 sync 4-1 808.23 us/op 500.50 us/op 1.61
array of 16000 items push then shift 3.3576 us/op 51.619 us/op 0.07
LinkedList of 16000 items push then shift 20.103 ns/op 12.250 ns/op 1.64
array of 16000 items push then pop 270.13 ns/op 189.62 ns/op 1.42
LinkedList of 16000 items push then pop 20.941 ns/op 11.966 ns/op 1.75
array of 24000 items push then shift 4.9673 us/op 77.369 us/op 0.06
LinkedList of 24000 items push then shift 24.867 ns/op 12.265 ns/op 2.03
array of 24000 items push then pop 257.78 ns/op 195.06 ns/op 1.32
LinkedList of 24000 items push then pop 21.513 ns/op 12.150 ns/op 1.77
intersect bitArray bitLen 8 35.998 ns/op 21.695 ns/op 1.66
intersect array and set length 8 195.18 ns/op 119.00 ns/op 1.64
intersect bitArray bitLen 128 150.49 ns/op 70.793 ns/op 2.13
intersect array and set length 128 2.7926 us/op 1.7173 us/op 1.63
Buffer.concat 32 items 6.4760 us/op 4.4950 us/op 1.44
Uint8Array.set 32 items 4.7110 us/op 3.8180 us/op 1.23
pass gossip attestations to forkchoice per slot 5.4333 ms/op 3.7445 ms/op 1.45
computeDeltas 7.4500 ms/op 4.2369 ms/op 1.76
computeProposerBoostScoreFromBalances 3.1873 ms/op 2.5589 ms/op 1.25
altair processAttestation - 250000 vs - 7PWei normalcase 4.8654 ms/op 3.5560 ms/op 1.37
altair processAttestation - 250000 vs - 7PWei worstcase 7.8540 ms/op 6.0833 ms/op 1.29
altair processAttestation - setStatus - 1/6 committees join 252.06 us/op 179.50 us/op 1.40
altair processAttestation - setStatus - 1/3 committees join 468.52 us/op 355.25 us/op 1.32
altair processAttestation - setStatus - 1/2 committees join 712.95 us/op 521.59 us/op 1.37
altair processAttestation - setStatus - 2/3 committees join 887.71 us/op 674.87 us/op 1.32
altair processAttestation - setStatus - 4/5 committees join 1.2604 ms/op 942.23 us/op 1.34
altair processAttestation - setStatus - 100% committees join 1.4762 ms/op 1.1287 ms/op 1.31
altair processBlock - 250000 vs - 7PWei normalcase 32.017 ms/op 23.575 ms/op 1.36
altair processBlock - 250000 vs - 7PWei normalcase hashState 45.343 ms/op 32.156 ms/op 1.41
altair processBlock - 250000 vs - 7PWei worstcase 93.455 ms/op 80.668 ms/op 1.16
altair processBlock - 250000 vs - 7PWei worstcase hashState 118.40 ms/op 108.88 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei normalcase 4.3090 ms/op 3.0976 ms/op 1.39
phase0 processBlock - 250000 vs - 7PWei worstcase 57.490 ms/op 50.158 ms/op 1.15
altair processEth1Data - 250000 vs - 7PWei normalcase 993.99 us/op 617.56 us/op 1.61
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 16.765 us/op 7.8560 us/op 2.13
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 43.899 us/op 22.398 us/op 1.96
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 20.590 us/op 10.488 us/op 1.96
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 18.011 us/op 7.7710 us/op 2.32
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 152.84 us/op 87.536 us/op 1.75
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 1.3177 ms/op 861.82 us/op 1.53
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 1.7603 ms/op 1.1693 ms/op 1.51
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 1.7824 ms/op 1.1089 ms/op 1.61
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 5.4641 ms/op 4.0136 ms/op 1.36
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 3.3361 ms/op 2.3100 ms/op 1.44
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 8.4450 ms/op 6.7460 ms/op 1.25
Tree 40 250000 create 845.58 ms/op 570.89 ms/op 1.48
Tree 40 250000 get(125000) 356.31 ns/op 238.70 ns/op 1.49
Tree 40 250000 set(125000) 2.4936 us/op 1.9455 us/op 1.28
Tree 40 250000 toArray() 38.222 ms/op 25.877 ms/op 1.48
Tree 40 250000 iterate all - toArray() + loop 38.203 ms/op 25.904 ms/op 1.47
Tree 40 250000 iterate all - get(i) 133.15 ms/op 107.70 ms/op 1.24
MutableVector 250000 create 17.785 ms/op 13.037 ms/op 1.36
MutableVector 250000 get(125000) 16.469 ns/op 11.944 ns/op 1.38
MutableVector 250000 set(125000) 745.76 ns/op 431.37 ns/op 1.73
MutableVector 250000 toArray() 7.6634 ms/op 5.4333 ms/op 1.41
MutableVector 250000 iterate all - toArray() + loop 7.6287 ms/op 5.5809 ms/op 1.37
MutableVector 250000 iterate all - get(i) 4.2393 ms/op 2.6564 ms/op 1.60
Array 250000 create 7.4433 ms/op 5.3652 ms/op 1.39
Array 250000 clone - spread 3.1835 ms/op 1.8882 ms/op 1.69
Array 250000 get(125000) 1.3880 ns/op 0.92700 ns/op 1.50
Array 250000 set(125000) 1.3390 ns/op 0.91500 ns/op 1.46
Array 250000 iterate all - loop 214.04 us/op 150.90 us/op 1.42
effectiveBalanceIncrements clone Uint8Array 300000 90.928 us/op 32.789 us/op 2.77
effectiveBalanceIncrements clone MutableVector 300000 904.00 ns/op 518.00 ns/op 1.75
effectiveBalanceIncrements rw all Uint8Array 300000 304.22 us/op 243.82 us/op 1.25
effectiveBalanceIncrements rw all MutableVector 300000 227.17 ms/op 135.78 ms/op 1.67
phase0 afterProcessEpoch - 250000 vs - 7PWei 234.00 ms/op 186.34 ms/op 1.26
phase0 beforeProcessEpoch - 250000 vs - 7PWei 127.77 ms/op 58.042 ms/op 2.20
altair processEpoch - mainnet_e81889 693.24 ms/op 548.86 ms/op 1.26
mainnet_e81889 - altair beforeProcessEpoch 151.39 ms/op 109.03 ms/op 1.39
mainnet_e81889 - altair processJustificationAndFinalization 42.947 us/op 21.134 us/op 2.03
mainnet_e81889 - altair processInactivityUpdates 13.253 ms/op 8.6800 ms/op 1.53
mainnet_e81889 - altair processRewardsAndPenalties 111.34 ms/op 75.829 ms/op 1.47
mainnet_e81889 - altair processRegistryUpdates 7.0450 us/op 3.1750 us/op 2.22
mainnet_e81889 - altair processSlashings 1.3960 us/op 714.00 ns/op 1.96
mainnet_e81889 - altair processEth1DataReset 1.5590 us/op 860.00 ns/op 1.81
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.7825 ms/op 2.0752 ms/op 1.34
mainnet_e81889 - altair processSlashingsReset 10.160 us/op 4.1080 us/op 2.47
mainnet_e81889 - altair processRandaoMixesReset 12.702 us/op 5.4680 us/op 2.32
mainnet_e81889 - altair processHistoricalRootsUpdate 1.7060 us/op 829.00 ns/op 2.06
mainnet_e81889 - altair processParticipationFlagUpdates 7.6900 us/op 4.0590 us/op 1.89
mainnet_e81889 - altair processSyncCommitteeUpdates 1.3660 us/op 663.00 ns/op 2.06
mainnet_e81889 - altair afterProcessEpoch 246.98 ms/op 216.27 ms/op 1.14
phase0 processEpoch - mainnet_e58758 633.59 ms/op 606.46 ms/op 1.04
mainnet_e58758 - phase0 beforeProcessEpoch 304.62 ms/op 218.85 ms/op 1.39
mainnet_e58758 - phase0 processJustificationAndFinalization 35.800 us/op 20.294 us/op 1.76
mainnet_e58758 - phase0 processRewardsAndPenalties 92.234 ms/op 135.98 ms/op 0.68
mainnet_e58758 - phase0 processRegistryUpdates 19.211 us/op 9.0170 us/op 2.13
mainnet_e58758 - phase0 processSlashings 1.7070 us/op 737.00 ns/op 2.32
mainnet_e58758 - phase0 processEth1DataReset 1.8470 us/op 779.00 ns/op 2.37
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.4200 ms/op 1.9169 ms/op 1.26
mainnet_e58758 - phase0 processSlashingsReset 11.390 us/op 4.8270 us/op 2.36
mainnet_e58758 - phase0 processRandaoMixesReset 14.146 us/op 5.4400 us/op 2.60
mainnet_e58758 - phase0 processHistoricalRootsUpdate 2.1490 us/op 647.00 ns/op 3.32
mainnet_e58758 - phase0 processParticipationRecordUpdates 13.980 us/op 5.6890 us/op 2.46
mainnet_e58758 - phase0 afterProcessEpoch 202.86 ms/op 161.12 ms/op 1.26
phase0 processEffectiveBalanceUpdates - 250000 normalcase 3.6640 ms/op 1.9679 ms/op 1.86
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 4.3256 ms/op 2.3023 ms/op 1.88
altair processInactivityUpdates - 250000 normalcase 43.140 ms/op 46.889 ms/op 0.92
altair processInactivityUpdates - 250000 worstcase 43.628 ms/op 50.311 ms/op 0.87
phase0 processRegistryUpdates - 250000 normalcase 18.713 us/op 6.9270 us/op 2.70
phase0 processRegistryUpdates - 250000 badcase_full_deposits 592.25 us/op 380.55 us/op 1.56
phase0 processRegistryUpdates - 250000 worstcase 0.5 263.76 ms/op 229.04 ms/op 1.15
altair processRewardsAndPenalties - 250000 normalcase 137.01 ms/op 129.09 ms/op 1.06
altair processRewardsAndPenalties - 250000 worstcase 101.80 ms/op 131.31 ms/op 0.78
phase0 getAttestationDeltas - 250000 normalcase 15.191 ms/op 11.204 ms/op 1.36
phase0 getAttestationDeltas - 250000 worstcase 15.249 ms/op 11.183 ms/op 1.36
phase0 processSlashings - 250000 worstcase 7.1417 ms/op 6.2798 ms/op 1.14
altair processSyncCommitteeUpdates - 250000 337.75 ms/op 287.60 ms/op 1.17
BeaconState.hashTreeRoot - No change 526.00 ns/op 461.00 ns/op 1.14
BeaconState.hashTreeRoot - 1 full validator 76.541 us/op 70.322 us/op 1.09
BeaconState.hashTreeRoot - 32 full validator 763.44 us/op 784.25 us/op 0.97
BeaconState.hashTreeRoot - 512 full validator 7.5193 ms/op 7.0218 ms/op 1.07
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 94.610 us/op 97.531 us/op 0.97
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4836 ms/op 1.4087 ms/op 1.05
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.455 ms/op 16.386 ms/op 1.19
BeaconState.hashTreeRoot - 1 balances 73.184 us/op 75.952 us/op 0.96
BeaconState.hashTreeRoot - 32 balances 677.72 us/op 724.78 us/op 0.94
BeaconState.hashTreeRoot - 512 balances 7.2270 ms/op 6.8035 ms/op 1.06
BeaconState.hashTreeRoot - 250000 balances 103.51 ms/op 107.93 ms/op 0.96
aggregationBits - 2048 els - zipIndexesInBitList 33.399 us/op 21.266 us/op 1.57
regular array get 100000 times 84.216 us/op 60.489 us/op 1.39
wrappedArray get 100000 times 83.703 us/op 60.517 us/op 1.38
arrayWithProxy get 100000 times 33.023 ms/op 28.442 ms/op 1.16
ssz.Root.equals 1.2900 us/op 889.00 ns/op 1.45
byteArrayEquals 1.3140 us/op 898.00 ns/op 1.46
shuffle list - 16384 els 14.176 ms/op 11.392 ms/op 1.24
shuffle list - 250000 els 207.91 ms/op 167.47 ms/op 1.24
processSlot - 1 slots 14.756 us/op 12.530 us/op 1.18
processSlot - 32 slots 2.1901 ms/op 1.8893 ms/op 1.16
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 403.72 us/op 343.43 us/op 1.18
getCommitteeAssignments - req 1 vs - 250000 vc 7.2343 ms/op 5.4440 ms/op 1.33
getCommitteeAssignments - req 100 vs - 250000 vc 9.5497 ms/op 7.9584 ms/op 1.20
getCommitteeAssignments - req 1000 vs - 250000 vc 10.071 ms/op 8.5049 ms/op 1.18
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 11.960 ns/op 7.7100 ns/op 1.55
state getBlockRootAtSlot - 250000 vs - 7PWei 1.4746 us/op 1.0515 us/op 1.40
computeProposers - vc 250000 20.308 ms/op 17.224 ms/op 1.18
computeEpochShuffling - vc 250000 214.66 ms/op 170.10 ms/op 1.26
getNextSyncCommittee - vc 250000 330.88 ms/op 287.45 ms/op 1.15

by benchmarkbot/action

@g11tech g11tech force-pushed the g11tech/builder-api-till-eip4844 branch 2 times, most recently from e9ffc03 to 39b8734 Compare January 8, 2023 15:15
@g11tech g11tech force-pushed the g11tech/builder-api-till-eip4844 branch from 465a22d to 6936c3f Compare January 9, 2023 09:07
@g11tech g11tech marked this pull request as ready for review January 9, 2023 09:31
@g11tech g11tech requested a review from a team as a code owner January 9, 2023 09:31
@g11tech g11tech enabled auto-merge (squash) January 9, 2023 10:51
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!

@g11tech g11tech merged commit 06fcf21 into unstable Jan 9, 2023
@g11tech g11tech deleted the g11tech/builder-api-till-eip4844 branch January 9, 2023 11:34
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