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

Add getBlobsSidecar beacon api method #5018

Merged
merged 1 commit into from
Jan 17, 2023
Merged

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jan 17, 2023

Add getBlobsSidecar beacon api method

ref:

@g11tech g11tech requested a review from a team as a code owner January 17, 2023 08:26
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 13a73fd Previous: 080b73b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0842 ms/op 1.3318 ms/op 0.81
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 61.198 us/op 79.922 us/op 0.77
BLS verify - blst-native 1.6415 ms/op 2.2322 ms/op 0.74
BLS verifyMultipleSignatures 3 - blst-native 3.3595 ms/op 4.5804 ms/op 0.73
BLS verifyMultipleSignatures 8 - blst-native 7.2209 ms/op 9.8437 ms/op 0.73
BLS verifyMultipleSignatures 32 - blst-native 26.166 ms/op 35.745 ms/op 0.73
BLS aggregatePubkeys 32 - blst-native 34.896 us/op 47.493 us/op 0.73
BLS aggregatePubkeys 128 - blst-native 135.79 us/op 185.59 us/op 0.73
getAttestationsForBlock 84.458 ms/op 112.45 ms/op 0.75
isKnown best case - 1 super set check 415.00 ns/op 529.00 ns/op 0.78
isKnown normal case - 2 super set checks 409.00 ns/op 523.00 ns/op 0.78
isKnown worse case - 16 super set checks 408.00 ns/op 516.00 ns/op 0.79
CheckpointStateCache - add get delete 8.1600 us/op 10.148 us/op 0.80
validate gossip signedAggregateAndProof - struct 4.2618 ms/op 5.1321 ms/op 0.83
validate gossip attestation - struct 2.0237 ms/op 2.4242 ms/op 0.83
pickEth1Vote - no votes 2.2315 ms/op 2.7368 ms/op 0.82
pickEth1Vote - max votes 15.923 ms/op 22.987 ms/op 0.69
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.754 ms/op 15.091 ms/op 0.78
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.507 ms/op 26.823 ms/op 0.76
pickEth1Vote - Eth1Data fastSerialize value x2048 1.2620 ms/op 1.5186 ms/op 0.83
pickEth1Vote - Eth1Data fastSerialize tree x2048 9.9665 ms/op 13.064 ms/op 0.76
bytes32 toHexString 1.0180 us/op 1.3580 us/op 0.75
bytes32 Buffer.toString(hex) 588.00 ns/op 660.00 ns/op 0.89
bytes32 Buffer.toString(hex) from Uint8Array 895.00 ns/op 1.1180 us/op 0.80
bytes32 Buffer.toString(hex) + 0x 620.00 ns/op 721.00 ns/op 0.86
Object access 1 prop 0.28200 ns/op 0.35600 ns/op 0.79
Map access 1 prop 0.27100 ns/op 0.31300 ns/op 0.87
Object get x1000 16.099 ns/op 20.476 ns/op 0.79
Map get x1000 0.99000 ns/op 1.1820 ns/op 0.84
Object set x1000 110.47 ns/op 131.12 ns/op 0.84
Map set x1000 72.739 ns/op 85.964 ns/op 0.85
Return object 10000 times 0.37340 ns/op 0.44710 ns/op 0.84
Throw Error 10000 times 6.9454 us/op 8.3643 us/op 0.83
fastMsgIdFn sha256 / 200 bytes 4.3490 us/op 5.2630 us/op 0.83
fastMsgIdFn h32 xxhash / 200 bytes 477.00 ns/op 563.00 ns/op 0.85
fastMsgIdFn h64 xxhash / 200 bytes 630.00 ns/op 771.00 ns/op 0.82
fastMsgIdFn sha256 / 1000 bytes 13.705 us/op 16.290 us/op 0.84
fastMsgIdFn h32 xxhash / 1000 bytes 612.00 ns/op 734.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 1000 bytes 717.00 ns/op 785.00 ns/op 0.91
fastMsgIdFn sha256 / 10000 bytes 118.52 us/op 140.38 us/op 0.84
fastMsgIdFn h32 xxhash / 10000 bytes 2.3130 us/op 2.8770 us/op 0.80
fastMsgIdFn h64 xxhash / 10000 bytes 1.6600 us/op 2.0860 us/op 0.80
enrSubnets - fastDeserialize 64 bits 2.2550 us/op 3.0700 us/op 0.73
enrSubnets - ssz BitVector 64 bits 808.00 ns/op 1.0250 us/op 0.79
enrSubnets - fastDeserialize 4 bits 280.00 ns/op 372.00 ns/op 0.75
enrSubnets - ssz BitVector 4 bits 797.00 ns/op 1.0250 us/op 0.78
prioritizePeers score -10:0 att 32-0.1 sync 2-0 159.28 us/op 179.62 us/op 0.89
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 201.59 us/op 270.23 us/op 0.75
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 306.04 us/op 379.77 us/op 0.81
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 540.25 us/op 640.58 us/op 0.84
prioritizePeers score 0:0 att 64-1 sync 4-1 616.86 us/op 739.83 us/op 0.83
array of 16000 items push then shift 2.8249 us/op 3.2618 us/op 0.87
LinkedList of 16000 items push then shift 16.987 ns/op 20.806 ns/op 0.82
array of 16000 items push then pop 208.62 ns/op 244.79 ns/op 0.85
LinkedList of 16000 items push then pop 16.421 ns/op 19.904 ns/op 0.83
array of 24000 items push then shift 3.9547 us/op 4.8181 us/op 0.82
LinkedList of 24000 items push then shift 19.256 ns/op 23.697 ns/op 0.81
array of 24000 items push then pop 211.16 ns/op 253.51 ns/op 0.83
LinkedList of 24000 items push then pop 17.568 ns/op 20.893 ns/op 0.84
intersect bitArray bitLen 8 29.360 ns/op 36.101 ns/op 0.81
intersect array and set length 8 153.82 ns/op 206.67 ns/op 0.74
intersect bitArray bitLen 128 119.56 ns/op 134.59 ns/op 0.89
intersect array and set length 128 2.2943 us/op 2.9012 us/op 0.79
Buffer.concat 32 items 5.1160 us/op 6.4000 us/op 0.80
Uint8Array.set 32 items 4.0760 us/op 5.0390 us/op 0.81
pass gossip attestations to forkchoice per slot 6.4299 ms/op 7.8532 ms/op 0.82
computeDeltas 6.2671 ms/op 7.7799 ms/op 0.81
computeProposerBoostScoreFromBalances 2.8395 ms/op 3.1163 ms/op 0.91
altair processAttestation - 250000 vs - 7PWei normalcase 3.5461 ms/op 5.1690 ms/op 0.69
altair processAttestation - 250000 vs - 7PWei worstcase 5.6859 ms/op 8.9193 ms/op 0.64
altair processAttestation - setStatus - 1/6 committees join 207.64 us/op 267.70 us/op 0.78
altair processAttestation - setStatus - 1/3 committees join 397.00 us/op 489.06 us/op 0.81
altair processAttestation - setStatus - 1/2 committees join 553.05 us/op 679.05 us/op 0.81
altair processAttestation - setStatus - 2/3 committees join 716.08 us/op 920.49 us/op 0.78
altair processAttestation - setStatus - 4/5 committees join 991.74 us/op 1.1900 ms/op 0.83
altair processAttestation - setStatus - 100% committees join 1.1686 ms/op 1.4165 ms/op 0.83
altair processBlock - 250000 vs - 7PWei normalcase 25.859 ms/op 30.115 ms/op 0.86
altair processBlock - 250000 vs - 7PWei normalcase hashState 41.093 ms/op 40.962 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase 75.569 ms/op 105.19 ms/op 0.72
altair processBlock - 250000 vs - 7PWei worstcase hashState 106.00 ms/op 115.16 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei normalcase 3.3520 ms/op 4.1867 ms/op 0.80
phase0 processBlock - 250000 vs - 7PWei worstcase 45.168 ms/op 55.720 ms/op 0.81
altair processEth1Data - 250000 vs - 7PWei normalcase 736.88 us/op 866.68 us/op 0.85
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 9.2920 us/op 14.235 us/op 0.65
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 28.423 us/op 37.573 us/op 0.76
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 17.555 us/op 17.628 us/op 1.00
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 9.9840 us/op 15.476 us/op 0.65
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 173.15 us/op 136.57 us/op 1.27
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 1.1289 ms/op 1.3094 ms/op 0.86
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 1.4217 ms/op 1.6747 ms/op 0.85
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 1.4238 ms/op 1.7400 ms/op 0.82
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 4.3697 ms/op 5.5847 ms/op 0.78
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 3.0391 ms/op 3.7998 ms/op 0.80
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 6.9000 ms/op 10.065 ms/op 0.69
Tree 40 250000 create 638.63 ms/op 975.78 ms/op 0.65
Tree 40 250000 get(125000) 256.48 ns/op 343.98 ns/op 0.75
Tree 40 250000 set(125000) 2.0392 us/op 2.5256 us/op 0.81
Tree 40 250000 toArray() 28.994 ms/op 37.060 ms/op 0.78
Tree 40 250000 iterate all - toArray() + loop 31.474 ms/op 36.744 ms/op 0.86
Tree 40 250000 iterate all - get(i) 90.723 ms/op 124.75 ms/op 0.73
MutableVector 250000 create 12.471 ms/op 18.391 ms/op 0.68
MutableVector 250000 get(125000) 11.526 ns/op 16.011 ns/op 0.72
MutableVector 250000 set(125000) 497.74 ns/op 776.69 ns/op 0.64
MutableVector 250000 toArray() 5.8714 ms/op 7.9277 ms/op 0.74
MutableVector 250000 iterate all - toArray() + loop 5.9708 ms/op 8.3016 ms/op 0.72
MutableVector 250000 iterate all - get(i) 3.3226 ms/op 4.5632 ms/op 0.73
Array 250000 create 5.8078 ms/op 7.9540 ms/op 0.73
Array 250000 clone - spread 2.2805 ms/op 4.9210 ms/op 0.46
Array 250000 get(125000) 0.96300 ns/op 2.1230 ns/op 0.45
Array 250000 set(125000) 0.98900 ns/op 2.1180 ns/op 0.47
Array 250000 iterate all - loop 168.89 us/op 201.45 us/op 0.84
effectiveBalanceIncrements clone Uint8Array 300000 62.522 us/op 99.287 us/op 0.63
effectiveBalanceIncrements clone MutableVector 300000 679.00 ns/op 1.1010 us/op 0.62
effectiveBalanceIncrements rw all Uint8Array 300000 252.80 us/op 305.65 us/op 0.83
effectiveBalanceIncrements rw all MutableVector 300000 169.43 ms/op 266.24 ms/op 0.64
phase0 afterProcessEpoch - 250000 vs - 7PWei 187.12 ms/op 246.34 ms/op 0.76
phase0 beforeProcessEpoch - 250000 vs - 7PWei 97.606 ms/op 76.406 ms/op 1.28
altair processEpoch - mainnet_e81889 568.12 ms/op 602.82 ms/op 0.94
mainnet_e81889 - altair beforeProcessEpoch 143.37 ms/op 154.01 ms/op 0.93
mainnet_e81889 - altair processJustificationAndFinalization 21.402 us/op 28.570 us/op 0.75
mainnet_e81889 - altair processInactivityUpdates 10.702 ms/op 13.242 ms/op 0.81
mainnet_e81889 - altair processRewardsAndPenalties 89.902 ms/op 108.81 ms/op 0.83
mainnet_e81889 - altair processRegistryUpdates 2.8820 us/op 8.5080 us/op 0.34
mainnet_e81889 - altair processSlashings 695.00 ns/op 1.5470 us/op 0.45
mainnet_e81889 - altair processEth1DataReset 676.00 ns/op 1.7200 us/op 0.39
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.3319 ms/op 2.9423 ms/op 0.79
mainnet_e81889 - altair processSlashingsReset 5.4910 us/op 12.340 us/op 0.44
mainnet_e81889 - altair processRandaoMixesReset 6.0610 us/op 11.114 us/op 0.55
mainnet_e81889 - altair processHistoricalRootsUpdate 825.00 ns/op 2.0090 us/op 0.41
mainnet_e81889 - altair processParticipationFlagUpdates 4.5410 us/op 7.2150 us/op 0.63
mainnet_e81889 - altair processSyncCommitteeUpdates 739.00 ns/op 1.6970 us/op 0.44
mainnet_e81889 - altair afterProcessEpoch 195.06 ms/op 234.70 ms/op 0.83
phase0 processEpoch - mainnet_e58758 514.09 ms/op 619.46 ms/op 0.83
mainnet_e58758 - phase0 beforeProcessEpoch 214.89 ms/op 269.72 ms/op 0.80
mainnet_e58758 - phase0 processJustificationAndFinalization 27.018 us/op 35.120 us/op 0.77
mainnet_e58758 - phase0 processRewardsAndPenalties 78.467 ms/op 152.62 ms/op 0.51
mainnet_e58758 - phase0 processRegistryUpdates 10.607 us/op 17.697 us/op 0.60
mainnet_e58758 - phase0 processSlashings 729.00 ns/op 1.6250 us/op 0.45
mainnet_e58758 - phase0 processEth1DataReset 1.1900 us/op 1.7510 us/op 0.68
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9867 ms/op 2.5599 ms/op 0.78
mainnet_e58758 - phase0 processSlashingsReset 6.4900 us/op 8.9010 us/op 0.73
mainnet_e58758 - phase0 processRandaoMixesReset 8.1800 us/op 12.062 us/op 0.68
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.0440 us/op 1.8900 us/op 0.55
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.2420 us/op 11.147 us/op 0.47
mainnet_e58758 - phase0 afterProcessEpoch 161.82 ms/op 203.77 ms/op 0.79
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.8592 ms/op 3.4648 ms/op 0.83
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.4499 ms/op 4.0060 ms/op 0.86
altair processInactivityUpdates - 250000 normalcase 36.089 ms/op 46.601 ms/op 0.77
altair processInactivityUpdates - 250000 worstcase 36.867 ms/op 53.245 ms/op 0.69
phase0 processRegistryUpdates - 250000 normalcase 13.743 us/op 17.566 us/op 0.78
phase0 processRegistryUpdates - 250000 badcase_full_deposits 541.50 us/op 598.37 us/op 0.90
phase0 processRegistryUpdates - 250000 worstcase 0.5 219.17 ms/op 248.64 ms/op 0.88
altair processRewardsAndPenalties - 250000 normalcase 108.77 ms/op 84.858 ms/op 1.28
altair processRewardsAndPenalties - 250000 worstcase 80.898 ms/op 129.29 ms/op 0.63
phase0 getAttestationDeltas - 250000 normalcase 12.291 ms/op 16.163 ms/op 0.76
phase0 getAttestationDeltas - 250000 worstcase 12.512 ms/op 16.280 ms/op 0.77
phase0 processSlashings - 250000 worstcase 5.7111 ms/op 6.7987 ms/op 0.84
altair processSyncCommitteeUpdates - 250000 269.51 ms/op 327.16 ms/op 0.82
BeaconState.hashTreeRoot - No change 382.00 ns/op 512.00 ns/op 0.75
BeaconState.hashTreeRoot - 1 full validator 63.414 us/op 74.646 us/op 0.85
BeaconState.hashTreeRoot - 32 full validator 637.34 us/op 919.13 us/op 0.69
BeaconState.hashTreeRoot - 512 full validator 7.2827 ms/op 7.7113 ms/op 0.94
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 77.415 us/op 94.986 us/op 0.82
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1367 ms/op 1.4347 ms/op 0.79
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 15.255 ms/op 20.050 ms/op 0.76
BeaconState.hashTreeRoot - 1 balances 60.928 us/op 72.000 us/op 0.85
BeaconState.hashTreeRoot - 32 balances 581.83 us/op 711.11 us/op 0.82
BeaconState.hashTreeRoot - 512 balances 5.5955 ms/op 7.0238 ms/op 0.80
BeaconState.hashTreeRoot - 250000 balances 89.410 ms/op 110.35 ms/op 0.81
aggregationBits - 2048 els - zipIndexesInBitList 30.468 us/op 40.414 us/op 0.75
regular array get 100000 times 67.308 us/op 83.104 us/op 0.81
wrappedArray get 100000 times 67.334 us/op 84.202 us/op 0.80
arrayWithProxy get 100000 times 29.743 ms/op 34.578 ms/op 0.86
ssz.Root.equals 1.0770 us/op 1.3780 us/op 0.78
byteArrayEquals 1.0830 us/op 1.3520 us/op 0.80
shuffle list - 16384 els 11.327 ms/op 14.355 ms/op 0.79
shuffle list - 250000 els 166.50 ms/op 205.18 ms/op 0.81
processSlot - 1 slots 12.066 us/op 15.134 us/op 0.80
processSlot - 32 slots 1.7094 ms/op 2.1224 ms/op 0.81
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 333.92 us/op 414.58 us/op 0.81
getCommitteeAssignments - req 1 vs - 250000 vc 5.6071 ms/op 6.7669 ms/op 0.83
getCommitteeAssignments - req 100 vs - 250000 vc 7.5904 ms/op 9.2459 ms/op 0.82
getCommitteeAssignments - req 1000 vs - 250000 vc 8.0776 ms/op 9.9335 ms/op 0.81
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 9.5900 ns/op 12.180 ns/op 0.79
state getBlockRootAtSlot - 250000 vs - 7PWei 1.1214 us/op 1.5505 us/op 0.72
computeProposers - vc 250000 16.066 ms/op 19.382 ms/op 0.83
computeEpochShuffling - vc 250000 171.77 ms/op 208.53 ms/op 0.82
getNextSyncCommittee - vc 250000 266.85 ms/op 321.83 ms/op 0.83

by benchmarkbot/action

@g11tech g11tech enabled auto-merge (squash) January 17, 2023 10:22
@g11tech g11tech merged commit 3b9d0eb into unstable Jan 17, 2023
@g11tech g11tech deleted the g11tech/getblobsapi branch January 17, 2023 21:27
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