Skip to content

EIP-4844: Generate valid blobsBundle in execution engine mock#4867

Merged
g11tech merged 1 commit intounstablefrom
dapplion/eip-4844-mock-blobs
Dec 7, 2022
Merged

EIP-4844: Generate valid blobsBundle in execution engine mock#4867
g11tech merged 1 commit intounstablefrom
dapplion/eip-4844-mock-blobs

Conversation

@dapplion
Copy link
Contributor

@dapplion dapplion commented Dec 6, 2022

Motivation

Description

@dapplion dapplion requested a review from a team as a code owner December 6, 2022 10:01
@dapplion dapplion changed the title Generate valid blobsBundle in execution engine mock EIP-4844: Generate valid blobsBundle in execution engine mock Dec 6, 2022
@dapplion dapplion added the spec-deneb 🐡 Issues targeting the Deneb spec version label Dec 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 85f63ab Previous: 4d76345 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8156 ms/op 2.3792 ms/op 0.76
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 70.013 us/op 84.362 us/op 0.83
BLS verify - blst-native 1.8580 ms/op 2.6432 ms/op 0.70
BLS verifyMultipleSignatures 3 - blst-native 3.8080 ms/op 5.5504 ms/op 0.69
BLS verifyMultipleSignatures 8 - blst-native 8.1938 ms/op 11.718 ms/op 0.70
BLS verifyMultipleSignatures 32 - blst-native 29.710 ms/op 43.204 ms/op 0.69
BLS aggregatePubkeys 32 - blst-native 39.181 us/op 59.023 us/op 0.66
BLS aggregatePubkeys 128 - blst-native 153.50 us/op 227.03 us/op 0.68
getAttestationsForBlock 85.619 ms/op 114.66 ms/op 0.75
isKnown best case - 1 super set check 423.00 ns/op 621.00 ns/op 0.68
isKnown normal case - 2 super set checks 410.00 ns/op 605.00 ns/op 0.68
isKnown worse case - 16 super set checks 408.00 ns/op 596.00 ns/op 0.68
CheckpointStateCache - add get delete 8.5640 us/op 11.133 us/op 0.77
validate gossip signedAggregateAndProof - struct 4.2746 ms/op 6.2909 ms/op 0.68
validate gossip attestation - struct 2.0410 ms/op 2.9593 ms/op 0.69
pickEth1Vote - no votes 2.0463 ms/op 2.4654 ms/op 0.83
pickEth1Vote - max votes 19.266 ms/op 22.105 ms/op 0.87
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.668 ms/op 13.983 ms/op 0.76
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.852 ms/op 25.026 ms/op 0.75
pickEth1Vote - Eth1Data fastSerialize value x2048 1.6202 ms/op 1.8420 ms/op 0.88
pickEth1Vote - Eth1Data fastSerialize tree x2048 12.486 ms/op 14.876 ms/op 0.84
bytes32 toHexString 1000.0 ns/op 1.2430 us/op 0.80
bytes32 Buffer.toString(hex) 677.00 ns/op 844.00 ns/op 0.80
bytes32 Buffer.toString(hex) from Uint8Array 873.00 ns/op 1.1330 us/op 0.77
bytes32 Buffer.toString(hex) + 0x 709.00 ns/op 818.00 ns/op 0.87
Object access 1 prop 0.33200 ns/op 0.41400 ns/op 0.80
Map access 1 prop 0.29000 ns/op 0.32900 ns/op 0.88
Object get x1000 17.431 ns/op 16.214 ns/op 1.08
Map get x1000 0.98900 ns/op 0.97900 ns/op 1.01
Object set x1000 113.76 ns/op 118.34 ns/op 0.96
Map set x1000 66.009 ns/op 81.257 ns/op 0.81
Return object 10000 times 0.37240 ns/op 0.42320 ns/op 0.88
Throw Error 10000 times 6.1753 us/op 7.2104 us/op 0.86
fastMsgIdFn sha256 / 200 bytes 4.2530 us/op 5.4270 us/op 0.78
fastMsgIdFn h32 xxhash / 200 bytes 528.00 ns/op 633.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 200 bytes 751.00 ns/op 823.00 ns/op 0.91
fastMsgIdFn sha256 / 1000 bytes 13.274 us/op 17.199 us/op 0.77
fastMsgIdFn h32 xxhash / 1000 bytes 665.00 ns/op 803.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 1000 bytes 816.00 ns/op 946.00 ns/op 0.86
fastMsgIdFn sha256 / 10000 bytes 114.65 us/op 153.71 us/op 0.75
fastMsgIdFn h32 xxhash / 10000 bytes 2.4230 us/op 2.7990 us/op 0.87
fastMsgIdFn h64 xxhash / 10000 bytes 1.7300 us/op 2.0460 us/op 0.85
enrSubnets - fastDeserialize 64 bits 2.5010 us/op 3.0250 us/op 0.83
enrSubnets - ssz BitVector 64 bits 703.00 ns/op 848.00 ns/op 0.83
enrSubnets - fastDeserialize 4 bits 361.00 ns/op 444.00 ns/op 0.81
enrSubnets - ssz BitVector 4 bits 704.00 ns/op 848.00 ns/op 0.83
prioritizePeers score -10:0 att 32-0.1 sync 2-0 89.808 us/op 111.37 us/op 0.81
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 131.75 us/op 151.87 us/op 0.87
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 209.34 us/op 272.99 us/op 0.77
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 387.06 us/op 595.10 us/op 0.65
prioritizePeers score 0:0 att 64-1 sync 4-1 455.10 us/op 626.95 us/op 0.73
RateTracker 1000000 limit, 1 obj count per request 187.40 ns/op 218.07 ns/op 0.86
RateTracker 1000000 limit, 2 obj count per request 146.77 ns/op 160.69 ns/op 0.91
RateTracker 1000000 limit, 4 obj count per request 124.99 ns/op 134.16 ns/op 0.93
RateTracker 1000000 limit, 8 obj count per request 114.15 ns/op 123.58 ns/op 0.92
RateTracker with prune 4.2430 us/op 5.5670 us/op 0.76
array of 16000 items push then shift 2.8385 us/op 5.4461 us/op 0.52
LinkedList of 16000 items push then shift 16.745 ns/op 19.848 ns/op 0.84
array of 16000 items push then pop 237.42 ns/op 261.68 ns/op 0.91
LinkedList of 16000 items push then pop 16.192 ns/op 18.720 ns/op 0.86
array of 24000 items push then shift 3.9662 us/op 8.0434 us/op 0.49
LinkedList of 24000 items push then shift 19.687 ns/op 20.504 ns/op 0.96
array of 24000 items push then pop 207.86 ns/op 249.13 ns/op 0.83
LinkedList of 24000 items push then pop 17.677 ns/op 18.617 ns/op 0.95
intersect bitArray bitLen 8 11.730 ns/op 13.373 ns/op 0.88
intersect array and set length 8 158.26 ns/op 200.54 ns/op 0.79
intersect bitArray bitLen 128 61.929 ns/op 74.002 ns/op 0.84
intersect array and set length 128 2.1491 us/op 2.4346 us/op 0.88
Buffer.concat 32 items 1.9230 ns/op 2.2640 ns/op 0.85
pass gossip attestations to forkchoice per slot 4.0142 ms/op 4.6802 ms/op 0.86
computeDeltas 5.7635 ms/op 5.8231 ms/op 0.99
computeProposerBoostScoreFromBalances 907.31 us/op 908.83 us/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 3.4518 ms/op 4.9726 ms/op 0.69
altair processAttestation - 250000 vs - 7PWei worstcase 5.6208 ms/op 8.4150 ms/op 0.67
altair processAttestation - setStatus - 1/6 committees join 213.85 us/op 265.69 us/op 0.80
altair processAttestation - setStatus - 1/3 committees join 409.18 us/op 487.46 us/op 0.84
altair processAttestation - setStatus - 1/2 committees join 578.25 us/op 646.08 us/op 0.90
altair processAttestation - setStatus - 2/3 committees join 746.17 us/op 889.22 us/op 0.84
altair processAttestation - setStatus - 4/5 committees join 1.0203 ms/op 1.2460 ms/op 0.82
altair processAttestation - setStatus - 100% committees join 1.2148 ms/op 1.4822 ms/op 0.82
altair processBlock - 250000 vs - 7PWei normalcase 26.587 ms/op 26.796 ms/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase hashState 41.104 ms/op 44.984 ms/op 0.91
altair processBlock - 250000 vs - 7PWei worstcase 80.241 ms/op 103.74 ms/op 0.77
altair processBlock - 250000 vs - 7PWei worstcase hashState 95.873 ms/op 142.36 ms/op 0.67
phase0 processBlock - 250000 vs - 7PWei normalcase 3.4813 ms/op 4.0501 ms/op 0.86
phase0 processBlock - 250000 vs - 7PWei worstcase 45.340 ms/op 62.503 ms/op 0.73
altair processEth1Data - 250000 vs - 7PWei normalcase 715.33 us/op 1.0490 ms/op 0.68
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 12.428 us/op 20.908 us/op 0.59
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 41.862 us/op 46.674 us/op 0.90
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 18.471 us/op 30.727 us/op 0.60
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 13.241 us/op 21.863 us/op 0.61
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 167.33 us/op 155.87 us/op 1.07
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 1.2044 ms/op 1.2865 ms/op 0.94
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 141069 13.864 ms/op 16.028 ms/op 0.86
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 250000 24.516 ms/op 29.205 ms/op 0.84
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 250000 86.738 ms/op 102.52 ms/op 0.85
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 250000 46.749 ms/op 57.200 ms/op 0.82
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 250000 130.92 ms/op 156.18 ms/op 0.84
Tree 40 250000 create 744.50 ms/op 1.0041 s/op 0.74
Tree 40 250000 get(125000) 294.35 ns/op 324.62 ns/op 0.91
Tree 40 250000 set(125000) 2.1562 us/op 3.5051 us/op 0.62
Tree 40 250000 toArray() 31.973 ms/op 37.115 ms/op 0.86
Tree 40 250000 iterate all - toArray() + loop 31.632 ms/op 36.767 ms/op 0.86
Tree 40 250000 iterate all - get(i) 108.74 ms/op 136.64 ms/op 0.80
MutableVector 250000 create 14.235 ms/op 20.444 ms/op 0.70
MutableVector 250000 get(125000) 14.936 ns/op 14.039 ns/op 1.06
MutableVector 250000 set(125000) 585.31 ns/op 898.25 ns/op 0.65
MutableVector 250000 toArray() 7.4930 ms/op 7.6131 ms/op 0.98
MutableVector 250000 iterate all - toArray() + loop 6.8347 ms/op 7.8704 ms/op 0.87
MutableVector 250000 iterate all - get(i) 3.2822 ms/op 4.3055 ms/op 0.76
Array 250000 create 6.0293 ms/op 7.3595 ms/op 0.82
Array 250000 clone - spread 2.6809 ms/op 4.6943 ms/op 0.57
Array 250000 get(125000) 1.1280 ns/op 1.9800 ns/op 0.57
Array 250000 set(125000) 1.1270 ns/op 2.1800 ns/op 0.52
Array 250000 iterate all - loop 168.93 us/op 151.24 us/op 1.12
effectiveBalanceIncrements clone Uint8Array 300000 64.836 us/op 526.31 us/op 0.12
effectiveBalanceIncrements clone MutableVector 300000 770.00 ns/op 955.00 ns/op 0.81
effectiveBalanceIncrements rw all Uint8Array 300000 252.46 us/op 316.85 us/op 0.80
effectiveBalanceIncrements rw all MutableVector 300000 160.09 ms/op 218.81 ms/op 0.73
phase0 afterProcessEpoch - 250000 vs - 7PWei 185.89 ms/op 210.61 ms/op 0.88
phase0 beforeProcessEpoch - 250000 vs - 7PWei 70.730 ms/op 78.290 ms/op 0.90
altair processEpoch - mainnet_e81889 573.97 ms/op 664.21 ms/op 0.86
mainnet_e81889 - altair beforeProcessEpoch 137.31 ms/op 170.94 ms/op 0.80
mainnet_e81889 - altair processJustificationAndFinalization 32.825 us/op 68.132 us/op 0.48
mainnet_e81889 - altair processInactivityUpdates 10.607 ms/op 11.096 ms/op 0.96
mainnet_e81889 - altair processRewardsAndPenalties 90.064 ms/op 104.62 ms/op 0.86
mainnet_e81889 - altair processRegistryUpdates 4.7860 us/op 15.085 us/op 0.32
mainnet_e81889 - altair processSlashings 1.2720 us/op 3.9510 us/op 0.32
mainnet_e81889 - altair processEth1DataReset 1.5490 us/op 4.7110 us/op 0.33
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.3656 ms/op 2.9422 ms/op 0.80
mainnet_e81889 - altair processSlashingsReset 8.0790 us/op 27.046 us/op 0.30
mainnet_e81889 - altair processRandaoMixesReset 8.9590 us/op 24.445 us/op 0.37
mainnet_e81889 - altair processHistoricalRootsUpdate 1.3750 us/op 4.5000 us/op 0.31
mainnet_e81889 - altair processParticipationFlagUpdates 5.1580 us/op 16.398 us/op 0.31
mainnet_e81889 - altair processSyncCommitteeUpdates 946.00 ns/op 3.6650 us/op 0.26
mainnet_e81889 - altair afterProcessEpoch 195.01 ms/op 219.80 ms/op 0.89
phase0 processEpoch - mainnet_e58758 513.76 ms/op 628.24 ms/op 0.82
mainnet_e58758 - phase0 beforeProcessEpoch 218.07 ms/op 282.46 ms/op 0.77
mainnet_e58758 - phase0 processJustificationAndFinalization 34.211 us/op 72.214 us/op 0.47
mainnet_e58758 - phase0 processRewardsAndPenalties 126.16 ms/op 147.13 ms/op 0.86
mainnet_e58758 - phase0 processRegistryUpdates 18.011 us/op 32.271 us/op 0.56
mainnet_e58758 - phase0 processSlashings 1.0670 us/op 3.1300 us/op 0.34
mainnet_e58758 - phase0 processEth1DataReset 1.3640 us/op 3.3150 us/op 0.41
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.2079 ms/op 2.7406 ms/op 0.81
mainnet_e58758 - phase0 processSlashingsReset 7.8830 us/op 16.937 us/op 0.47
mainnet_e58758 - phase0 processRandaoMixesReset 7.2300 us/op 24.017 us/op 0.30
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.2320 us/op 3.9810 us/op 0.31
mainnet_e58758 - phase0 processParticipationRecordUpdates 8.2260 us/op 24.933 us/op 0.33
mainnet_e58758 - phase0 afterProcessEpoch 160.06 ms/op 181.05 ms/op 0.88
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.7658 ms/op 2.5538 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.6779 ms/op 2.7562 ms/op 1.33
altair processInactivityUpdates - 250000 normalcase 38.258 ms/op 53.045 ms/op 0.72
altair processInactivityUpdates - 250000 worstcase 36.946 ms/op 62.459 ms/op 0.59
phase0 processRegistryUpdates - 250000 normalcase 8.1020 us/op 30.110 us/op 0.27
phase0 processRegistryUpdates - 250000 badcase_full_deposits 410.61 us/op 537.69 us/op 0.76
phase0 processRegistryUpdates - 250000 worstcase 0.5 203.61 ms/op 249.90 ms/op 0.81
altair processRewardsAndPenalties - 250000 normalcase 119.04 ms/op 147.85 ms/op 0.81
altair processRewardsAndPenalties - 250000 worstcase 84.349 ms/op 138.30 ms/op 0.61
phase0 getAttestationDeltas - 250000 normalcase 13.217 ms/op 14.065 ms/op 0.94
phase0 getAttestationDeltas - 250000 worstcase 13.149 ms/op 13.234 ms/op 0.99
phase0 processSlashings - 250000 worstcase 5.9287 ms/op 7.2811 ms/op 0.81
altair processSyncCommitteeUpdates - 250000 285.32 ms/op 362.16 ms/op 0.79
BeaconState.hashTreeRoot - No change 501.00 ns/op 632.00 ns/op 0.79
BeaconState.hashTreeRoot - 1 full validator 61.527 us/op 82.295 us/op 0.75
BeaconState.hashTreeRoot - 32 full validator 1.0496 ms/op 876.96 us/op 1.20
BeaconState.hashTreeRoot - 512 full validator 5.8874 ms/op 9.3266 ms/op 0.63
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 75.255 us/op 104.97 us/op 0.72
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1340 ms/op 1.5889 ms/op 0.71
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 15.000 ms/op 19.328 ms/op 0.78
BeaconState.hashTreeRoot - 1 balances 59.969 us/op 80.853 us/op 0.74
BeaconState.hashTreeRoot - 32 balances 558.47 us/op 739.77 us/op 0.75
BeaconState.hashTreeRoot - 512 balances 5.6975 ms/op 7.3216 ms/op 0.78
BeaconState.hashTreeRoot - 250000 balances 91.839 ms/op 112.92 ms/op 0.81
aggregationBits - 2048 els - zipIndexesInBitList 33.247 us/op 33.949 us/op 0.98
regular array get 100000 times 67.421 us/op 58.882 us/op 1.15
wrappedArray get 100000 times 67.407 us/op 58.481 us/op 1.15
arrayWithProxy get 100000 times 28.344 ms/op 34.504 ms/op 0.82
ssz.Root.equals 477.00 ns/op 602.00 ns/op 0.79
byteArrayEquals 464.00 ns/op 555.00 ns/op 0.84
shuffle list - 16384 els 26.780 ms/op 12.545 ms/op 2.13
shuffle list - 250000 els 164.63 ms/op 180.67 ms/op 0.91
processSlot - 1 slots 11.307 us/op 18.863 us/op 0.60
processSlot - 32 slots 1.6462 ms/op 2.4332 ms/op 0.68
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 412.43 us/op 441.61 us/op 0.93
getCommitteeAssignments - req 1 vs - 250000 vc 5.2877 ms/op 5.6200 ms/op 0.94
getCommitteeAssignments - req 100 vs - 250000 vc 7.2692 ms/op 7.7571 ms/op 0.94
getCommitteeAssignments - req 1000 vs - 250000 vc 7.7555 ms/op 8.5974 ms/op 0.90
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 10.460 ns/op 10.480 ns/op 1.00
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0380 us/op 1.2392 us/op 0.84
computeProposers - vc 250000 16.970 ms/op 21.782 ms/op 0.78
computeEpochShuffling - vc 250000 167.99 ms/op 189.87 ms/op 0.88
getNextSyncCommittee - vc 250000 278.79 ms/op 355.38 ms/op 0.78

by benchmarkbot/action

Copy link
Contributor

@g11tech g11tech 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 d5b957b into unstable Dec 7, 2022
@g11tech g11tech deleted the dapplion/eip-4844-mock-blobs branch December 7, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spec-deneb 🐡 Issues targeting the Deneb spec version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants