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

feat: move to blob_sidecars_by_range/root methods #5564

Merged
merged 2 commits into from
May 30, 2023
Merged

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented May 29, 2023

Continuing

this PR moves the req/resp methods to the decoupled blobs spec

@g11tech g11tech requested a review from a team as a code owner May 29, 2023 08:10
@github-actions
Copy link
Contributor

github-actions bot commented May 29, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 06cb6cd Previous: 722ccb6 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0058 ms/op 728.86 us/op 1.38
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.291 us/op 44.628 us/op 1.10
BLS verify - blst-native 1.2477 ms/op 1.2393 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 2.5798 ms/op 2.4856 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst-native 5.5784 ms/op 5.2215 ms/op 1.07
BLS verifyMultipleSignatures 32 - blst-native 19.996 ms/op 18.989 ms/op 1.05
BLS aggregatePubkeys 32 - blst-native 26.260 us/op 25.306 us/op 1.04
BLS aggregatePubkeys 128 - blst-native 102.63 us/op 97.992 us/op 1.05
getAttestationsForBlock 60.263 ms/op 52.652 ms/op 1.14
isKnown best case - 1 super set check 274.00 ns/op 246.00 ns/op 1.11
isKnown normal case - 2 super set checks 275.00 ns/op 243.00 ns/op 1.13
isKnown worse case - 16 super set checks 269.00 ns/op 236.00 ns/op 1.14
CheckpointStateCache - add get delete 5.2720 us/op 4.8330 us/op 1.09
validate gossip signedAggregateAndProof - struct 2.8391 ms/op 2.7694 ms/op 1.03
validate gossip attestation - struct 1.3550 ms/op 1.2943 ms/op 1.05
pickEth1Vote - no votes 1.3584 ms/op 1.2253 ms/op 1.11
pickEth1Vote - max votes 10.714 ms/op 10.521 ms/op 1.02
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.7483 ms/op 8.7481 ms/op 1.11
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.253 ms/op 14.249 ms/op 1.14
pickEth1Vote - Eth1Data fastSerialize value x2048 736.72 us/op 624.69 us/op 1.18
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.4289 ms/op 7.2239 ms/op 0.89
bytes32 toHexString 565.00 ns/op 500.00 ns/op 1.13
bytes32 Buffer.toString(hex) 438.00 ns/op 346.00 ns/op 1.27
bytes32 Buffer.toString(hex) from Uint8Array 626.00 ns/op 545.00 ns/op 1.15
bytes32 Buffer.toString(hex) + 0x 428.00 ns/op 344.00 ns/op 1.24
Object access 1 prop 0.20000 ns/op 0.16200 ns/op 1.23
Map access 1 prop 0.17700 ns/op 0.16100 ns/op 1.10
Object get x1000 7.1170 ns/op 6.4650 ns/op 1.10
Map get x1000 0.63300 ns/op 0.62500 ns/op 1.01
Object set x1000 57.042 ns/op 51.659 ns/op 1.10
Map set x1000 47.460 ns/op 43.017 ns/op 1.10
Return object 10000 times 0.25480 ns/op 0.23390 ns/op 1.09
Throw Error 10000 times 4.4568 us/op 4.1446 us/op 1.08
fastMsgIdFn sha256 / 200 bytes 3.7320 us/op 3.3970 us/op 1.10
fastMsgIdFn h32 xxhash / 200 bytes 321.00 ns/op 277.00 ns/op 1.16
fastMsgIdFn h64 xxhash / 200 bytes 449.00 ns/op 398.00 ns/op 1.13
fastMsgIdFn sha256 / 1000 bytes 12.150 us/op 11.471 us/op 1.06
fastMsgIdFn h32 xxhash / 1000 bytes 454.00 ns/op 406.00 ns/op 1.12
fastMsgIdFn h64 xxhash / 1000 bytes 563.00 ns/op 458.00 ns/op 1.23
fastMsgIdFn sha256 / 10000 bytes 109.55 us/op 102.70 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 2.0230 us/op 1.9060 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.4600 us/op 1.3530 us/op 1.08
enrSubnets - fastDeserialize 64 bits 1.4230 us/op 1.2600 us/op 1.13
enrSubnets - ssz BitVector 64 bits 551.00 ns/op 489.00 ns/op 1.13
enrSubnets - fastDeserialize 4 bits 195.00 ns/op 172.00 ns/op 1.13
enrSubnets - ssz BitVector 4 bits 598.00 ns/op 493.00 ns/op 1.21
prioritizePeers score -10:0 att 32-0.1 sync 2-0 128.48 us/op 103.95 us/op 1.24
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 167.15 us/op 129.53 us/op 1.29
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 202.03 us/op 165.79 us/op 1.22
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 380.76 us/op 298.82 us/op 1.27
prioritizePeers score 0:0 att 64-1 sync 4-1 451.91 us/op 360.98 us/op 1.25
array of 16000 items push then shift 1.7397 us/op 1.6580 us/op 1.05
LinkedList of 16000 items push then shift 9.3440 ns/op 8.8210 ns/op 1.06
array of 16000 items push then pop 107.55 ns/op 82.299 ns/op 1.31
LinkedList of 16000 items push then pop 9.4640 ns/op 8.6370 ns/op 1.10
array of 24000 items push then shift 2.4968 us/op 2.3924 us/op 1.04
LinkedList of 24000 items push then shift 9.6460 ns/op 8.6950 ns/op 1.11
array of 24000 items push then pop 97.282 ns/op 83.976 ns/op 1.16
LinkedList of 24000 items push then pop 9.3900 ns/op 8.4630 ns/op 1.11
intersect bitArray bitLen 8 14.897 ns/op 13.113 ns/op 1.14
intersect array and set length 8 90.712 ns/op 73.888 ns/op 1.23
intersect bitArray bitLen 128 48.211 ns/op 43.466 ns/op 1.11
intersect array and set length 128 1.2820 us/op 1.0228 us/op 1.25
Buffer.concat 32 items 2.9800 us/op 2.5800 us/op 1.16
Uint8Array.set 32 items 2.6530 us/op 2.4500 us/op 1.08
transfer serialized Status (84 B) 2.3520 us/op 1.9770 us/op 1.19
copy serialized Status (84 B) 1.9730 us/op 1.6750 us/op 1.18
transfer serialized SignedVoluntaryExit (112 B) 2.5200 us/op 2.0540 us/op 1.23
copy serialized SignedVoluntaryExit (112 B) 2.1130 us/op 1.7110 us/op 1.23
transfer serialized ProposerSlashing (416 B) 2.8190 us/op 2.2000 us/op 1.28
copy serialized ProposerSlashing (416 B) 2.8760 us/op 2.2950 us/op 1.25
transfer serialized Attestation (485 B) 3.5730 us/op 2.5990 us/op 1.37
copy serialized Attestation (485 B) 3.4700 us/op 2.2450 us/op 1.55
transfer serialized AttesterSlashing (33232 B) 3.4370 us/op 2.6760 us/op 1.28
copy serialized AttesterSlashing (33232 B) 7.6560 us/op 5.7680 us/op 1.33
transfer serialized Small SignedBeaconBlock (128000 B) 3.0980 us/op 3.0380 us/op 1.02
copy serialized Small SignedBeaconBlock (128000 B) 16.560 us/op 15.382 us/op 1.08
transfer serialized Avg SignedBeaconBlock (200000 B) 3.4980 us/op 3.2850 us/op 1.06
copy serialized Avg SignedBeaconBlock (200000 B) 41.949 us/op 22.363 us/op 1.88
transfer serialized BlobsSidecar (524380 B) 4.0020 us/op 3.1010 us/op 1.29
copy serialized BlobsSidecar (524380 B) 175.60 us/op 68.216 us/op 2.57
transfer serialized Big SignedBeaconBlock (1000000 B) 3.6670 us/op 3.1320 us/op 1.17
copy serialized Big SignedBeaconBlock (1000000 B) 293.17 us/op 297.08 us/op 0.99
pass gossip attestations to forkchoice per slot 2.4341 ms/op 2.2307 ms/op 1.09
computeDeltas 3.1991 ms/op 3.6547 ms/op 0.88
computeProposerBoostScoreFromBalances 1.9325 ms/op 1.7405 ms/op 1.11
altair processAttestation - 250000 vs - 7PWei normalcase 2.7412 ms/op 2.0971 ms/op 1.31
altair processAttestation - 250000 vs - 7PWei worstcase 4.1990 ms/op 3.2743 ms/op 1.28
altair processAttestation - setStatus - 1/6 committees join 162.04 us/op 143.99 us/op 1.13
altair processAttestation - setStatus - 1/3 committees join 293.97 us/op 274.56 us/op 1.07
altair processAttestation - setStatus - 1/2 committees join 387.29 us/op 372.71 us/op 1.04
altair processAttestation - setStatus - 2/3 committees join 518.24 us/op 477.13 us/op 1.09
altair processAttestation - setStatus - 4/5 committees join 759.16 us/op 662.58 us/op 1.15
altair processAttestation - setStatus - 100% committees join 860.49 us/op 773.64 us/op 1.11
altair processBlock - 250000 vs - 7PWei normalcase 21.883 ms/op 16.286 ms/op 1.34
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.121 ms/op 25.223 ms/op 1.15
altair processBlock - 250000 vs - 7PWei worstcase 61.180 ms/op 49.227 ms/op 1.24
altair processBlock - 250000 vs - 7PWei worstcase hashState 73.223 ms/op 67.754 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei normalcase 2.5639 ms/op 2.3432 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei worstcase 35.427 ms/op 31.834 ms/op 1.11
altair processEth1Data - 250000 vs - 7PWei normalcase 719.97 us/op 525.12 us/op 1.37
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.1360 us/op 8.1860 us/op 1.12
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 25.775 us/op 23.616 us/op 1.09
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 12.537 us/op 11.117 us/op 1.13
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.0970 us/op 7.1780 us/op 1.27
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 109.12 us/op 115.45 us/op 0.95
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 744.85 us/op 666.30 us/op 1.12
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 934.82 us/op 912.03 us/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 916.03 us/op 883.89 us/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.0185 ms/op 2.2979 ms/op 1.31
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9599 ms/op 1.7202 ms/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.4672 ms/op 4.4563 ms/op 1.23
Tree 40 250000 create 697.61 ms/op 309.69 ms/op 2.25
Tree 40 250000 get(125000) 217.73 ns/op 195.49 ns/op 1.11
Tree 40 250000 set(125000) 2.3028 us/op 949.53 ns/op 2.43
Tree 40 250000 toArray() 27.153 ms/op 19.376 ms/op 1.40
Tree 40 250000 iterate all - toArray() + loop 26.265 ms/op 19.049 ms/op 1.38
Tree 40 250000 iterate all - get(i) 85.817 ms/op 71.047 ms/op 1.21
MutableVector 250000 create 14.652 ms/op 11.487 ms/op 1.28
MutableVector 250000 get(125000) 7.5310 ns/op 6.6030 ns/op 1.14
MutableVector 250000 set(125000) 427.84 ns/op 261.81 ns/op 1.63
MutableVector 250000 toArray() 4.4710 ms/op 2.8325 ms/op 1.58
MutableVector 250000 iterate all - toArray() + loop 4.4401 ms/op 3.0134 ms/op 1.47
MutableVector 250000 iterate all - get(i) 1.7011 ms/op 1.5208 ms/op 1.12
Array 250000 create 4.3190 ms/op 2.7270 ms/op 1.58
Array 250000 clone - spread 1.4298 ms/op 1.2463 ms/op 1.15
Array 250000 get(125000) 0.82800 ns/op 0.61300 ns/op 1.35
Array 250000 set(125000) 0.98500 ns/op 0.67900 ns/op 1.45
Array 250000 iterate all - loop 100.10 us/op 83.382 us/op 1.20
effectiveBalanceIncrements clone Uint8Array 300000 64.533 us/op 30.448 us/op 2.12
effectiveBalanceIncrements clone MutableVector 300000 444.00 ns/op 384.00 ns/op 1.16
effectiveBalanceIncrements rw all Uint8Array 300000 186.85 us/op 169.56 us/op 1.10
effectiveBalanceIncrements rw all MutableVector 300000 142.30 ms/op 85.856 ms/op 1.66
phase0 afterProcessEpoch - 250000 vs - 7PWei 133.64 ms/op 113.04 ms/op 1.18
phase0 beforeProcessEpoch - 250000 vs - 7PWei 50.331 ms/op 41.678 ms/op 1.21
altair processEpoch - mainnet_e81889 395.21 ms/op 327.58 ms/op 1.21
mainnet_e81889 - altair beforeProcessEpoch 89.737 ms/op 51.725 ms/op 1.73
mainnet_e81889 - altair processJustificationAndFinalization 31.188 us/op 18.343 us/op 1.70
mainnet_e81889 - altair processInactivityUpdates 7.3491 ms/op 5.5663 ms/op 1.32
mainnet_e81889 - altair processRewardsAndPenalties 78.103 ms/op 65.967 ms/op 1.18
mainnet_e81889 - altair processRegistryUpdates 3.2420 us/op 3.5820 us/op 0.91
mainnet_e81889 - altair processSlashings 742.00 ns/op 572.00 ns/op 1.30
mainnet_e81889 - altair processEth1DataReset 740.00 ns/op 528.00 ns/op 1.40
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.9836 ms/op 1.2160 ms/op 2.45
mainnet_e81889 - altair processSlashingsReset 6.0950 us/op 5.0430 us/op 1.21
mainnet_e81889 - altair processRandaoMixesReset 6.9900 us/op 4.7260 us/op 1.48
mainnet_e81889 - altair processHistoricalRootsUpdate 775.00 ns/op 574.00 ns/op 1.35
mainnet_e81889 - altair processParticipationFlagUpdates 7.4410 us/op 2.3030 us/op 3.23
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0090 us/op 504.00 ns/op 2.00
mainnet_e81889 - altair afterProcessEpoch 140.29 ms/op 117.97 ms/op 1.19
phase0 processEpoch - mainnet_e58758 436.15 ms/op 317.63 ms/op 1.37
mainnet_e58758 - phase0 beforeProcessEpoch 186.71 ms/op 124.62 ms/op 1.50
mainnet_e58758 - phase0 processJustificationAndFinalization 24.336 us/op 16.125 us/op 1.51
mainnet_e58758 - phase0 processRewardsAndPenalties 69.823 ms/op 54.714 ms/op 1.28
mainnet_e58758 - phase0 processRegistryUpdates 14.970 us/op 7.5570 us/op 1.98
mainnet_e58758 - phase0 processSlashings 870.00 ns/op 506.00 ns/op 1.72
mainnet_e58758 - phase0 processEth1DataReset 1.1120 us/op 550.00 ns/op 2.02
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1994 ms/op 993.96 us/op 1.21
mainnet_e58758 - phase0 processSlashingsReset 3.5180 us/op 2.8370 us/op 1.24
mainnet_e58758 - phase0 processRandaoMixesReset 7.0270 us/op 4.5690 us/op 1.54
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.3070 us/op 603.00 ns/op 2.17
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.3300 us/op 3.7570 us/op 1.42
mainnet_e58758 - phase0 afterProcessEpoch 108.11 ms/op 97.232 ms/op 1.11
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4012 ms/op 1.2597 ms/op 1.11
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.0024 ms/op 1.4353 ms/op 1.40
altair processInactivityUpdates - 250000 normalcase 28.859 ms/op 20.523 ms/op 1.41
altair processInactivityUpdates - 250000 worstcase 30.192 ms/op 22.327 ms/op 1.35
phase0 processRegistryUpdates - 250000 normalcase 7.8820 us/op 7.2200 us/op 1.09
phase0 processRegistryUpdates - 250000 badcase_full_deposits 312.69 us/op 241.23 us/op 1.30
phase0 processRegistryUpdates - 250000 worstcase 0.5 138.99 ms/op 114.28 ms/op 1.22
altair processRewardsAndPenalties - 250000 normalcase 67.149 ms/op 54.361 ms/op 1.24
altair processRewardsAndPenalties - 250000 worstcase 69.467 ms/op 60.451 ms/op 1.15
phase0 getAttestationDeltas - 250000 normalcase 8.1468 ms/op 6.4935 ms/op 1.25
phase0 getAttestationDeltas - 250000 worstcase 8.8328 ms/op 6.3958 ms/op 1.38
phase0 processSlashings - 250000 worstcase 3.7931 ms/op 3.5975 ms/op 1.05
altair processSyncCommitteeUpdates - 250000 198.14 ms/op 168.30 ms/op 1.18
BeaconState.hashTreeRoot - No change 292.00 ns/op 265.00 ns/op 1.10
BeaconState.hashTreeRoot - 1 full validator 57.231 us/op 50.956 us/op 1.12
BeaconState.hashTreeRoot - 32 full validator 599.13 us/op 502.57 us/op 1.19
BeaconState.hashTreeRoot - 512 full validator 6.0472 ms/op 4.9597 ms/op 1.22
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 70.015 us/op 60.772 us/op 1.15
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 960.21 us/op 873.71 us/op 1.10
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 12.773 ms/op 11.262 ms/op 1.13
BeaconState.hashTreeRoot - 1 balances 52.448 us/op 46.080 us/op 1.14
BeaconState.hashTreeRoot - 32 balances 549.73 us/op 474.18 us/op 1.16
BeaconState.hashTreeRoot - 512 balances 4.9784 ms/op 4.1359 ms/op 1.20
BeaconState.hashTreeRoot - 250000 balances 85.040 ms/op 72.599 ms/op 1.17
aggregationBits - 2048 els - zipIndexesInBitList 19.478 us/op 15.570 us/op 1.25
regular array get 100000 times 37.107 us/op 32.326 us/op 1.15
wrappedArray get 100000 times 37.687 us/op 32.232 us/op 1.17
arrayWithProxy get 100000 times 17.974 ms/op 15.601 ms/op 1.15
ssz.Root.equals 636.00 ns/op 537.00 ns/op 1.18
byteArrayEquals 675.00 ns/op 529.00 ns/op 1.28
shuffle list - 16384 els 8.0005 ms/op 6.7324 ms/op 1.19
shuffle list - 250000 els 115.38 ms/op 98.356 ms/op 1.17
processSlot - 1 slots 11.341 us/op 8.7520 us/op 1.30
processSlot - 32 slots 1.6039 ms/op 1.3359 ms/op 1.20
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.098 ms/op 33.308 ms/op 1.20
getCommitteeAssignments - req 1 vs - 250000 vc 3.3458 ms/op 2.8824 ms/op 1.16
getCommitteeAssignments - req 100 vs - 250000 vc 5.1569 ms/op 4.0952 ms/op 1.26
getCommitteeAssignments - req 1000 vs - 250000 vc 5.5193 ms/op 4.5345 ms/op 1.22
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.9300 ns/op 4.5700 ns/op 1.30
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0150 us/op 907.60 ns/op 1.12
computeProposers - vc 250000 13.774 ms/op 10.290 ms/op 1.34
computeEpochShuffling - vc 250000 123.70 ms/op 103.70 ms/op 1.19
getNextSyncCommittee - vc 250000 229.90 ms/op 182.63 ms/op 1.26
computeSigningRoot for AttestationData 17.305 us/op 13.310 us/op 1.30
hash AttestationData serialized data then Buffer.toString(base64) 2.9442 us/op 2.3731 us/op 1.24
toHexString serialized data 1.8296 us/op 1.0702 us/op 1.71
Buffer.toString(base64) 421.43 ns/op 319.05 ns/op 1.32

by benchmarkbot/action

@wemeetagain wemeetagain changed the title feat: move req/resp to blob_sidecars_by_range/root methods feat: move req/resp blob_sidecars_by_range/root methods May 30, 2023
@wemeetagain wemeetagain changed the title feat: move req/resp blob_sidecars_by_range/root methods feat: move to blob_sidecars_by_range/root methods May 30, 2023
@wemeetagain wemeetagain merged commit 5672d84 into unstable May 30, 2023
@wemeetagain wemeetagain deleted the ftb/reqresp branch May 30, 2023 17:53
@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.

2 participants