Skip to content

EIP-4844: Add eip-4844 ReqResp messages#4863

Merged
g11tech merged 1 commit intounstablefrom
dapplion/eip-4844-reqresp-messages
Dec 6, 2022
Merged

EIP-4844: Add eip-4844 ReqResp messages#4863
g11tech merged 1 commit intounstablefrom
dapplion/eip-4844-reqresp-messages

Conversation

@dapplion
Copy link
Contributor

@dapplion dapplion commented Dec 6, 2022

Motivation

Description

  • Simply declares new eip-4844 ReqResp messages to be used in future PR

@dapplion dapplion requested a review from a team as a code owner December 6, 2022 09:31
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 8a3fcc3 Previous: 4d76345 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.6979 ms/op 2.3792 ms/op 1.13
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 88.937 us/op 84.362 us/op 1.05
BLS verify - blst-native 2.7495 ms/op 2.6432 ms/op 1.04
BLS verifyMultipleSignatures 3 - blst-native 5.6349 ms/op 5.5504 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst-native 12.209 ms/op 11.718 ms/op 1.04
BLS verifyMultipleSignatures 32 - blst-native 43.937 ms/op 43.204 ms/op 1.02
BLS aggregatePubkeys 32 - blst-native 60.362 us/op 59.023 us/op 1.02
BLS aggregatePubkeys 128 - blst-native 239.69 us/op 227.03 us/op 1.06
getAttestationsForBlock 116.40 ms/op 114.66 ms/op 1.02
isKnown best case - 1 super set check 526.00 ns/op 621.00 ns/op 0.85
isKnown normal case - 2 super set checks 516.00 ns/op 605.00 ns/op 0.85
isKnown worse case - 16 super set checks 501.00 ns/op 596.00 ns/op 0.84
CheckpointStateCache - add get delete 11.054 us/op 11.133 us/op 0.99
validate gossip signedAggregateAndProof - struct 6.3499 ms/op 6.2909 ms/op 1.01
validate gossip attestation - struct 3.0601 ms/op 2.9593 ms/op 1.03
pickEth1Vote - no votes 2.6947 ms/op 2.4654 ms/op 1.09
pickEth1Vote - max votes 24.922 ms/op 22.105 ms/op 1.13
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.631 ms/op 13.983 ms/op 1.05
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 25.888 ms/op 25.026 ms/op 1.03
pickEth1Vote - Eth1Data fastSerialize value x2048 1.9681 ms/op 1.8420 ms/op 1.07
pickEth1Vote - Eth1Data fastSerialize tree x2048 16.240 ms/op 14.876 ms/op 1.09
bytes32 toHexString 1.3150 us/op 1.2430 us/op 1.06
bytes32 Buffer.toString(hex) 876.00 ns/op 844.00 ns/op 1.04
bytes32 Buffer.toString(hex) from Uint8Array 1.3520 us/op 1.1330 us/op 1.19
bytes32 Buffer.toString(hex) + 0x 870.00 ns/op 818.00 ns/op 1.06
Object access 1 prop 0.47100 ns/op 0.41400 ns/op 1.14
Map access 1 prop 0.35800 ns/op 0.32900 ns/op 1.09
Object get x1000 17.685 ns/op 16.214 ns/op 1.09
Map get x1000 0.98100 ns/op 0.97900 ns/op 1.00
Object set x1000 129.22 ns/op 118.34 ns/op 1.09
Map set x1000 86.667 ns/op 81.257 ns/op 1.07
Return object 10000 times 0.44060 ns/op 0.42320 ns/op 1.04
Throw Error 10000 times 7.4397 us/op 7.2104 us/op 1.03
fastMsgIdFn sha256 / 200 bytes 5.9060 us/op 5.4270 us/op 1.09
fastMsgIdFn h32 xxhash / 200 bytes 650.00 ns/op 633.00 ns/op 1.03
fastMsgIdFn h64 xxhash / 200 bytes 888.00 ns/op 823.00 ns/op 1.08
fastMsgIdFn sha256 / 1000 bytes 18.468 us/op 17.199 us/op 1.07
fastMsgIdFn h32 xxhash / 1000 bytes 832.00 ns/op 803.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 1000 bytes 958.00 ns/op 946.00 ns/op 1.01
fastMsgIdFn sha256 / 10000 bytes 160.04 us/op 153.71 us/op 1.04
fastMsgIdFn h32 xxhash / 10000 bytes 2.8550 us/op 2.7990 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 2.2320 us/op 2.0460 us/op 1.09
enrSubnets - fastDeserialize 64 bits 3.4500 us/op 3.0250 us/op 1.14
enrSubnets - ssz BitVector 64 bits 909.00 ns/op 848.00 ns/op 1.07
enrSubnets - fastDeserialize 4 bits 477.00 ns/op 444.00 ns/op 1.07
enrSubnets - ssz BitVector 4 bits 889.00 ns/op 848.00 ns/op 1.05
prioritizePeers score -10:0 att 32-0.1 sync 2-0 121.12 us/op 111.37 us/op 1.09
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 159.58 us/op 151.87 us/op 1.05
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 283.26 us/op 272.99 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 643.28 us/op 595.10 us/op 1.08
prioritizePeers score 0:0 att 64-1 sync 4-1 660.48 us/op 626.95 us/op 1.05
RateTracker 1000000 limit, 1 obj count per request 230.43 ns/op 218.07 ns/op 1.06
RateTracker 1000000 limit, 2 obj count per request 170.88 ns/op 160.69 ns/op 1.06
RateTracker 1000000 limit, 4 obj count per request 145.23 ns/op 134.16 ns/op 1.08
RateTracker 1000000 limit, 8 obj count per request 125.55 ns/op 123.58 ns/op 1.02
RateTracker with prune 5.9140 us/op 5.5670 us/op 1.06
array of 16000 items push then shift 5.5387 us/op 5.4461 us/op 1.02
LinkedList of 16000 items push then shift 20.347 ns/op 19.848 ns/op 1.03
array of 16000 items push then pop 269.36 ns/op 261.68 ns/op 1.03
LinkedList of 16000 items push then pop 18.773 ns/op 18.720 ns/op 1.00
array of 24000 items push then shift 8.1354 us/op 8.0434 us/op 1.01
LinkedList of 24000 items push then shift 19.645 ns/op 20.504 ns/op 0.96
array of 24000 items push then pop 245.03 ns/op 249.13 ns/op 0.98
LinkedList of 24000 items push then pop 17.976 ns/op 18.617 ns/op 0.97
intersect bitArray bitLen 8 13.134 ns/op 13.373 ns/op 0.98
intersect array and set length 8 217.17 ns/op 200.54 ns/op 1.08
intersect bitArray bitLen 128 75.184 ns/op 74.002 ns/op 1.02
intersect array and set length 128 2.7722 us/op 2.4346 us/op 1.14
Buffer.concat 32 items 2.4370 ns/op 2.2640 ns/op 1.08
pass gossip attestations to forkchoice per slot 4.7604 ms/op 4.6802 ms/op 1.02
computeDeltas 5.8565 ms/op 5.8231 ms/op 1.01
computeProposerBoostScoreFromBalances 908.22 us/op 908.83 us/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 5.2814 ms/op 4.9726 ms/op 1.06
altair processAttestation - 250000 vs - 7PWei worstcase 8.1985 ms/op 8.4150 ms/op 0.97
altair processAttestation - setStatus - 1/6 committees join 264.48 us/op 265.69 us/op 1.00
altair processAttestation - setStatus - 1/3 committees join 524.01 us/op 487.46 us/op 1.07
altair processAttestation - setStatus - 1/2 committees join 685.14 us/op 646.08 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 919.86 us/op 889.22 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 1.2987 ms/op 1.2460 ms/op 1.04
altair processAttestation - setStatus - 100% committees join 1.4770 ms/op 1.4822 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase 35.954 ms/op 26.796 ms/op 1.34
altair processBlock - 250000 vs - 7PWei normalcase hashState 43.042 ms/op 44.984 ms/op 0.96
altair processBlock - 250000 vs - 7PWei worstcase 111.63 ms/op 103.74 ms/op 1.08
altair processBlock - 250000 vs - 7PWei worstcase hashState 140.91 ms/op 142.36 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 4.4683 ms/op 4.0501 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei worstcase 63.120 ms/op 62.503 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 1.1008 ms/op 1.0490 ms/op 1.05
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 20.236 us/op 20.908 us/op 0.97
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 46.631 us/op 46.674 us/op 1.00
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 25.237 us/op 30.727 us/op 0.82
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 20.985 us/op 21.863 us/op 0.96
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 151.08 us/op 155.87 us/op 0.97
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 1.2920 ms/op 1.2865 ms/op 1.00
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 141069 16.930 ms/op 16.028 ms/op 1.06
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 250000 28.932 ms/op 29.205 ms/op 0.99
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 250000 93.882 ms/op 102.52 ms/op 0.92
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 250000 56.647 ms/op 57.200 ms/op 0.99
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 250000 154.29 ms/op 156.18 ms/op 0.99
Tree 40 250000 create 1.0929 s/op 1.0041 s/op 1.09
Tree 40 250000 get(125000) 335.46 ns/op 324.62 ns/op 1.03
Tree 40 250000 set(125000) 3.3671 us/op 3.5051 us/op 0.96
Tree 40 250000 toArray() 36.448 ms/op 37.115 ms/op 0.98
Tree 40 250000 iterate all - toArray() + loop 37.250 ms/op 36.767 ms/op 1.01
Tree 40 250000 iterate all - get(i) 175.55 ms/op 136.64 ms/op 1.28
MutableVector 250000 create 20.960 ms/op 20.444 ms/op 1.03
MutableVector 250000 get(125000) 14.914 ns/op 14.039 ns/op 1.06
MutableVector 250000 set(125000) 886.31 ns/op 898.25 ns/op 0.99
MutableVector 250000 toArray() 8.0439 ms/op 7.6131 ms/op 1.06
MutableVector 250000 iterate all - toArray() + loop 7.9750 ms/op 7.8704 ms/op 1.01
MutableVector 250000 iterate all - get(i) 3.6401 ms/op 4.3055 ms/op 0.85
Array 250000 create 7.5561 ms/op 7.3595 ms/op 1.03
Array 250000 clone - spread 5.0545 ms/op 4.6943 ms/op 1.08
Array 250000 get(125000) 2.0840 ns/op 1.9800 ns/op 1.05
Array 250000 set(125000) 2.1440 ns/op 2.1800 ns/op 0.98
Array 250000 iterate all - loop 150.66 us/op 151.24 us/op 1.00
effectiveBalanceIncrements clone Uint8Array 300000 228.27 us/op 526.31 us/op 0.43
effectiveBalanceIncrements clone MutableVector 300000 870.00 ns/op 955.00 ns/op 0.91
effectiveBalanceIncrements rw all Uint8Array 300000 305.37 us/op 316.85 us/op 0.96
effectiveBalanceIncrements rw all MutableVector 300000 232.00 ms/op 218.81 ms/op 1.06
phase0 afterProcessEpoch - 250000 vs - 7PWei 224.30 ms/op 210.61 ms/op 1.06
phase0 beforeProcessEpoch - 250000 vs - 7PWei 79.165 ms/op 78.290 ms/op 1.01
altair processEpoch - mainnet_e81889 669.57 ms/op 664.21 ms/op 1.01
mainnet_e81889 - altair beforeProcessEpoch 156.31 ms/op 170.94 ms/op 0.91
mainnet_e81889 - altair processJustificationAndFinalization 74.763 us/op 68.132 us/op 1.10
mainnet_e81889 - altair processInactivityUpdates 11.335 ms/op 11.096 ms/op 1.02
mainnet_e81889 - altair processRewardsAndPenalties 106.43 ms/op 104.62 ms/op 1.02
mainnet_e81889 - altair processRegistryUpdates 13.910 us/op 15.085 us/op 0.92
mainnet_e81889 - altair processSlashings 3.9240 us/op 3.9510 us/op 0.99
mainnet_e81889 - altair processEth1DataReset 4.4850 us/op 4.7110 us/op 0.95
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.5325 ms/op 2.9422 ms/op 0.86
mainnet_e81889 - altair processSlashingsReset 26.266 us/op 27.046 us/op 0.97
mainnet_e81889 - altair processRandaoMixesReset 27.558 us/op 24.445 us/op 1.13
mainnet_e81889 - altair processHistoricalRootsUpdate 4.2360 us/op 4.5000 us/op 0.94
mainnet_e81889 - altair processParticipationFlagUpdates 17.093 us/op 16.398 us/op 1.04
mainnet_e81889 - altair processSyncCommitteeUpdates 3.5990 us/op 3.6650 us/op 0.98
mainnet_e81889 - altair afterProcessEpoch 218.99 ms/op 219.80 ms/op 1.00
phase0 processEpoch - mainnet_e58758 646.02 ms/op 628.24 ms/op 1.03
mainnet_e58758 - phase0 beforeProcessEpoch 294.92 ms/op 282.46 ms/op 1.04
mainnet_e58758 - phase0 processJustificationAndFinalization 67.373 us/op 72.214 us/op 0.93
mainnet_e58758 - phase0 processRewardsAndPenalties 97.411 ms/op 147.13 ms/op 0.66
mainnet_e58758 - phase0 processRegistryUpdates 37.439 us/op 32.271 us/op 1.16
mainnet_e58758 - phase0 processSlashings 3.2650 us/op 3.1300 us/op 1.04
mainnet_e58758 - phase0 processEth1DataReset 3.5810 us/op 3.3150 us/op 1.08
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.3959 ms/op 2.7406 ms/op 0.87
mainnet_e58758 - phase0 processSlashingsReset 16.023 us/op 16.937 us/op 0.95
mainnet_e58758 - phase0 processRandaoMixesReset 28.174 us/op 24.017 us/op 1.17
mainnet_e58758 - phase0 processHistoricalRootsUpdate 4.2540 us/op 3.9810 us/op 1.07
mainnet_e58758 - phase0 processParticipationRecordUpdates 26.202 us/op 24.933 us/op 1.05
mainnet_e58758 - phase0 afterProcessEpoch 182.48 ms/op 181.05 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.5987 ms/op 2.5538 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.9095 ms/op 2.7562 ms/op 1.06
altair processInactivityUpdates - 250000 normalcase 65.840 ms/op 53.045 ms/op 1.24
altair processInactivityUpdates - 250000 worstcase 54.581 ms/op 62.459 ms/op 0.87
phase0 processRegistryUpdates - 250000 normalcase 30.611 us/op 30.110 us/op 1.02
phase0 processRegistryUpdates - 250000 badcase_full_deposits 525.76 us/op 537.69 us/op 0.98
phase0 processRegistryUpdates - 250000 worstcase 0.5 277.90 ms/op 249.90 ms/op 1.11
altair processRewardsAndPenalties - 250000 normalcase 131.91 ms/op 147.85 ms/op 0.89
altair processRewardsAndPenalties - 250000 worstcase 99.159 ms/op 138.30 ms/op 0.72
phase0 getAttestationDeltas - 250000 normalcase 15.978 ms/op 14.065 ms/op 1.14
phase0 getAttestationDeltas - 250000 worstcase 16.441 ms/op 13.234 ms/op 1.24
phase0 processSlashings - 250000 worstcase 7.5524 ms/op 7.2811 ms/op 1.04
altair processSyncCommitteeUpdates - 250000 365.41 ms/op 362.16 ms/op 1.01
BeaconState.hashTreeRoot - No change 649.00 ns/op 632.00 ns/op 1.03
BeaconState.hashTreeRoot - 1 full validator 90.780 us/op 82.295 us/op 1.10
BeaconState.hashTreeRoot - 32 full validator 901.01 us/op 876.96 us/op 1.03
BeaconState.hashTreeRoot - 512 full validator 9.1205 ms/op 9.3266 ms/op 0.98
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 138.85 us/op 104.97 us/op 1.32
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6130 ms/op 1.5889 ms/op 1.02
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 21.262 ms/op 19.328 ms/op 1.10
BeaconState.hashTreeRoot - 1 balances 83.884 us/op 80.853 us/op 1.04
BeaconState.hashTreeRoot - 32 balances 786.40 us/op 739.77 us/op 1.06
BeaconState.hashTreeRoot - 512 balances 7.5794 ms/op 7.3216 ms/op 1.04
BeaconState.hashTreeRoot - 250000 balances 117.70 ms/op 112.92 ms/op 1.04
aggregationBits - 2048 els - zipIndexesInBitList 43.651 us/op 33.949 us/op 1.29
regular array get 100000 times 59.350 us/op 58.882 us/op 1.01
wrappedArray get 100000 times 59.602 us/op 58.481 us/op 1.02
arrayWithProxy get 100000 times 36.201 ms/op 34.504 ms/op 1.05
ssz.Root.equals 642.00 ns/op 602.00 ns/op 1.07
byteArrayEquals 655.00 ns/op 555.00 ns/op 1.18
shuffle list - 16384 els 12.855 ms/op 12.545 ms/op 1.02
shuffle list - 250000 els 183.68 ms/op 180.67 ms/op 1.02
processSlot - 1 slots 18.947 us/op 18.863 us/op 1.00
processSlot - 32 slots 2.4388 ms/op 2.4332 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 456.28 us/op 441.61 us/op 1.03
getCommitteeAssignments - req 1 vs - 250000 vc 5.6910 ms/op 5.6200 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 8.0409 ms/op 7.7571 ms/op 1.04
getCommitteeAssignments - req 1000 vs - 250000 vc 8.4893 ms/op 8.5974 ms/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 10.570 ns/op 10.480 ns/op 1.01
state getBlockRootAtSlot - 250000 vs - 7PWei 1.3280 us/op 1.2392 us/op 1.07
computeProposers - vc 250000 21.614 ms/op 21.782 ms/op 0.99
computeEpochShuffling - vc 250000 188.27 ms/op 189.87 ms/op 0.99
getNextSyncCommittee - vc 250000 358.58 ms/op 355.38 ms/op 1.01

by benchmarkbot/action

@dapplion dapplion added the spec-deneb 🐡 Issues targeting the Deneb spec version label Dec 6, 2022
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 3c862a5 into unstable Dec 6, 2022
@g11tech g11tech deleted the dapplion/eip-4844-reqresp-messages branch December 6, 2022 11:00
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