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: implement EIP-7742 #7232

Draft
wants to merge 5 commits into
base: devnet-5
Choose a base branch
from
Draft

feat: implement EIP-7742 #7232

wants to merge 5 commits into from

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Nov 19, 2024

Closes #7176

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.40%. Comparing base (6039f58) to head (0ec7ec4).
Report is 32 commits behind head on devnet-5.

Additional details and impacted files
@@             Coverage Diff              @@
##           devnet-5    #7232      +/-   ##
============================================
- Coverage     49.08%   48.40%   -0.68%     
============================================
  Files           600      602       +2     
  Lines         40241    40355     +114     
  Branches       2110     2062      -48     
============================================
- Hits          19753    19535     -218     
- Misses        20450    20782     +332     
  Partials         38       38              

Copy link
Contributor

github-actions bot commented Nov 19, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: c95a74c Previous: 69ae688 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.1113 ms/op 1.9071 ms/op 0.58
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 61.076 us/op 62.462 us/op 0.98
BLS verify - blst 993.31 us/op 890.91 us/op 1.11
BLS verifyMultipleSignatures 3 - blst 1.2885 ms/op 1.3299 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst 1.9468 ms/op 1.8333 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst 5.9393 ms/op 4.8815 ms/op 1.22
BLS verifyMultipleSignatures 64 - blst 10.735 ms/op 8.9842 ms/op 1.19
BLS verifyMultipleSignatures 128 - blst 17.434 ms/op 17.287 ms/op 1.01
BLS deserializing 10000 signatures 707.66 ms/op 701.55 ms/op 1.01
BLS deserializing 100000 signatures 6.9647 s/op 7.1665 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst 980.33 us/op 1.4066 ms/op 0.70
BLS verifyMultipleSignatures - same message - 8 - blst 1.0705 ms/op 1.4194 ms/op 0.75
BLS verifyMultipleSignatures - same message - 32 - blst 1.6518 ms/op 2.5279 ms/op 0.65
BLS verifyMultipleSignatures - same message - 64 - blst 2.5222 ms/op 3.0271 ms/op 0.83
BLS verifyMultipleSignatures - same message - 128 - blst 4.2962 ms/op 6.3219 ms/op 0.68
BLS aggregatePubkeys 32 - blst 19.329 us/op 22.454 us/op 0.86
BLS aggregatePubkeys 128 - blst 69.429 us/op 79.152 us/op 0.88
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 63.552 ms/op 160.01 ms/op 0.40
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 56.036 ms/op 68.263 ms/op 0.82
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 56.065 ms/op 39.770 ms/op 1.41
getSlashingsAndExits - default max 147.79 us/op 101.27 us/op 1.46
getSlashingsAndExits - 2k 468.88 us/op 493.05 us/op 0.95
proposeBlockBody type=full, size=empty 6.4296 ms/op 6.1270 ms/op 1.05
isKnown best case - 1 super set check 286.00 ns/op 287.00 ns/op 1.00
isKnown normal case - 2 super set checks 266.00 ns/op 292.00 ns/op 0.91
isKnown worse case - 16 super set checks 261.00 ns/op 280.00 ns/op 0.93
InMemoryCheckpointStateCache - add get delete 2.6270 us/op 2.7680 us/op 0.95
validate api signedAggregateAndProof - struct 2.8535 ms/op 1.4136 ms/op 2.02
validate gossip signedAggregateAndProof - struct 2.6215 ms/op 1.4510 ms/op 1.81
batch validate gossip attestation - vc 640000 - chunk 32 133.55 us/op 129.58 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 64 120.18 us/op 115.96 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 128 110.88 us/op 109.21 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 256 108.95 us/op 105.70 us/op 1.03
pickEth1Vote - no votes 1.1032 ms/op 1.0635 ms/op 1.04
pickEth1Vote - max votes 6.5509 ms/op 5.4543 ms/op 1.20
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.620 ms/op 12.678 ms/op 1.00
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.828 ms/op 21.306 ms/op 0.88
pickEth1Vote - Eth1Data fastSerialize value x2048 519.10 us/op 456.77 us/op 1.14
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.8533 ms/op 3.8763 ms/op 0.74
bytes32 toHexString 497.00 ns/op 440.00 ns/op 1.13
bytes32 Buffer.toString(hex) 239.00 ns/op 234.00 ns/op 1.02
bytes32 Buffer.toString(hex) from Uint8Array 398.00 ns/op 362.00 ns/op 1.10
bytes32 Buffer.toString(hex) + 0x 251.00 ns/op 237.00 ns/op 1.06
Object access 1 prop 0.17700 ns/op 0.14400 ns/op 1.23
Map access 1 prop 0.14300 ns/op 0.13800 ns/op 1.04
Object get x1000 5.9300 ns/op 6.0410 ns/op 0.98
Map get x1000 6.5520 ns/op 6.4610 ns/op 1.01
Object set x1000 40.421 ns/op 33.909 ns/op 1.19
Map set x1000 25.822 ns/op 24.214 ns/op 1.07
Return object 10000 times 0.29960 ns/op 0.29460 ns/op 1.02
Throw Error 10000 times 3.3634 us/op 3.3191 us/op 1.01
toHex 152.28 ns/op 150.50 ns/op 1.01
Buffer.from 144.44 ns/op 123.69 ns/op 1.17
shared Buffer 90.471 ns/op 80.902 ns/op 1.12
fastMsgIdFn sha256 / 200 bytes 2.2650 us/op 2.2870 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 255.00 ns/op 267.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 200 bytes 286.00 ns/op 273.00 ns/op 1.05
fastMsgIdFn sha256 / 1000 bytes 7.5050 us/op 7.3280 us/op 1.02
fastMsgIdFn h32 xxhash / 1000 bytes 408.00 ns/op 365.00 ns/op 1.12
fastMsgIdFn h64 xxhash / 1000 bytes 361.00 ns/op 347.00 ns/op 1.04
fastMsgIdFn sha256 / 10000 bytes 65.185 us/op 65.564 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.9490 us/op 1.8480 us/op 1.05
fastMsgIdFn h64 xxhash / 10000 bytes 1.2500 us/op 1.1990 us/op 1.04
send data - 1000 256B messages 13.952 ms/op 12.079 ms/op 1.16
send data - 1000 512B messages 19.991 ms/op 16.551 ms/op 1.21
send data - 1000 1024B messages 27.744 ms/op 26.401 ms/op 1.05
send data - 1000 1200B messages 29.473 ms/op 26.176 ms/op 1.13
send data - 1000 2048B messages 32.921 ms/op 31.988 ms/op 1.03
send data - 1000 4096B messages 31.381 ms/op 29.498 ms/op 1.06
send data - 1000 16384B messages 70.840 ms/op 71.434 ms/op 0.99
send data - 1000 65536B messages 214.10 ms/op 194.84 ms/op 1.10
enrSubnets - fastDeserialize 64 bits 1.0760 us/op 1.0600 us/op 1.02
enrSubnets - ssz BitVector 64 bits 365.00 ns/op 350.00 ns/op 1.04
enrSubnets - fastDeserialize 4 bits 146.00 ns/op 149.00 ns/op 0.98
enrSubnets - ssz BitVector 4 bits 358.00 ns/op 366.00 ns/op 0.98
prioritizePeers score -10:0 att 32-0.1 sync 2-0 141.09 us/op 134.88 us/op 1.05
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 156.68 us/op 150.36 us/op 1.04
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 245.34 us/op 218.65 us/op 1.12
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 418.13 us/op 392.74 us/op 1.06
prioritizePeers score 0:0 att 64-1 sync 4-1 566.86 us/op 492.40 us/op 1.15
array of 16000 items push then shift 1.6769 us/op 1.5920 us/op 1.05
LinkedList of 16000 items push then shift 7.5460 ns/op 6.9590 ns/op 1.08
array of 16000 items push then pop 120.89 ns/op 97.811 ns/op 1.24
LinkedList of 16000 items push then pop 7.5930 ns/op 6.8650 ns/op 1.11
array of 24000 items push then shift 2.4940 us/op 2.3557 us/op 1.06
LinkedList of 24000 items push then shift 8.0930 ns/op 7.1260 ns/op 1.14
array of 24000 items push then pop 175.95 ns/op 154.25 ns/op 1.14
LinkedList of 24000 items push then pop 7.8570 ns/op 7.1240 ns/op 1.10
intersect bitArray bitLen 8 6.7230 ns/op 6.6320 ns/op 1.01
intersect array and set length 8 46.363 ns/op 47.895 ns/op 0.97
intersect bitArray bitLen 128 30.700 ns/op 30.345 ns/op 1.01
intersect array and set length 128 716.32 ns/op 678.25 ns/op 1.06
bitArray.getTrueBitIndexes() bitLen 128 1.5070 us/op 1.4130 us/op 1.07
bitArray.getTrueBitIndexes() bitLen 248 2.3810 us/op 2.4100 us/op 0.99
bitArray.getTrueBitIndexes() bitLen 512 4.8420 us/op 4.5730 us/op 1.06
Buffer.concat 32 items 872.00 ns/op 741.00 ns/op 1.18
Uint8Array.set 32 items 1.4500 us/op 1.2510 us/op 1.16
Buffer.copy 2.4910 us/op 2.5260 us/op 0.99
Uint8Array.set - with subarray 2.4840 us/op 2.2860 us/op 1.09
Uint8Array.set - without subarray 1.6620 us/op 1.4070 us/op 1.18
getUint32 - dataview 230.00 ns/op 230.00 ns/op 1.00
getUint32 - manual 159.00 ns/op 150.00 ns/op 1.06
Set add up to 64 items then delete first 2.2099 us/op 2.2052 us/op 1.00
OrderedSet add up to 64 items then delete first 3.3190 us/op 3.2119 us/op 1.03
Set add up to 64 items then delete last 2.5472 us/op 2.4705 us/op 1.03
OrderedSet add up to 64 items then delete last 3.7546 us/op 3.5708 us/op 1.05
Set add up to 64 items then delete middle 2.5537 us/op 2.4806 us/op 1.03
OrderedSet add up to 64 items then delete middle 5.2848 us/op 5.1431 us/op 1.03
Set add up to 128 items then delete first 5.2999 us/op 5.0993 us/op 1.04
OrderedSet add up to 128 items then delete first 8.3952 us/op 7.7785 us/op 1.08
Set add up to 128 items then delete last 5.0958 us/op 4.9027 us/op 1.04
OrderedSet add up to 128 items then delete last 7.2973 us/op 7.2840 us/op 1.00
Set add up to 128 items then delete middle 4.8658 us/op 4.8268 us/op 1.01
OrderedSet add up to 128 items then delete middle 13.729 us/op 13.985 us/op 0.98
Set add up to 256 items then delete first 10.609 us/op 10.494 us/op 1.01
OrderedSet add up to 256 items then delete first 16.047 us/op 16.023 us/op 1.00
Set add up to 256 items then delete last 10.051 us/op 9.8895 us/op 1.02
OrderedSet add up to 256 items then delete last 14.703 us/op 14.782 us/op 0.99
Set add up to 256 items then delete middle 9.9504 us/op 9.7858 us/op 1.02
OrderedSet add up to 256 items then delete middle 44.442 us/op 41.205 us/op 1.08
transfer serialized Status (84 B) 2.4860 us/op 1.3770 us/op 1.81
copy serialized Status (84 B) 1.2640 us/op 1.1780 us/op 1.07
transfer serialized SignedVoluntaryExit (112 B) 2.6150 us/op 1.4630 us/op 1.79
copy serialized SignedVoluntaryExit (112 B) 1.2800 us/op 1.1640 us/op 1.10
transfer serialized ProposerSlashing (416 B) 2.6360 us/op 1.9840 us/op 1.33
copy serialized ProposerSlashing (416 B) 1.6160 us/op 2.2600 us/op 0.72
transfer serialized Attestation (485 B) 2.6020 us/op 2.0890 us/op 1.25
copy serialized Attestation (485 B) 1.7410 us/op 2.4330 us/op 0.72
transfer serialized AttesterSlashing (33232 B) 3.0980 us/op 2.1780 us/op 1.42
copy serialized AttesterSlashing (33232 B) 5.1070 us/op 6.1930 us/op 0.82
transfer serialized Small SignedBeaconBlock (128000 B) 3.7300 us/op 2.5730 us/op 1.45
copy serialized Small SignedBeaconBlock (128000 B) 14.102 us/op 13.227 us/op 1.07
transfer serialized Avg SignedBeaconBlock (200000 B) 4.1950 us/op 3.3110 us/op 1.27
copy serialized Avg SignedBeaconBlock (200000 B) 21.352 us/op 19.139 us/op 1.12
transfer serialized BlobsSidecar (524380 B) 3.7460 us/op 3.0580 us/op 1.22
copy serialized BlobsSidecar (524380 B) 92.410 us/op 180.68 us/op 0.51
transfer serialized Big SignedBeaconBlock (1000000 B) 4.4380 us/op 3.5720 us/op 1.24
copy serialized Big SignedBeaconBlock (1000000 B) 363.01 us/op 177.78 us/op 2.04
pass gossip attestations to forkchoice per slot 2.7303 ms/op 2.6900 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 475.38 us/op 451.73 us/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 0 3.8176 ms/op 2.8267 ms/op 1.35
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7220 ms/op 4.8703 ms/op 0.97
forkChoice updateHead vc 600000 bc 320 eq 0 2.8262 ms/op 2.8196 ms/op 1.00
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9864 ms/op 2.8899 ms/op 1.03
forkChoice updateHead vc 600000 bc 7200 eq 0 4.2682 ms/op 3.7272 ms/op 1.15
forkChoice updateHead vc 600000 bc 64 eq 1000 9.6980 ms/op 10.340 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 10000 9.7044 ms/op 10.298 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 300000 12.274 ms/op 13.711 ms/op 0.90
computeDeltas 500000 validators 300 proto nodes 4.1179 ms/op 3.9421 ms/op 1.04
computeDeltas 500000 validators 1200 proto nodes 4.1613 ms/op 4.0320 ms/op 1.03
computeDeltas 500000 validators 7200 proto nodes 4.1923 ms/op 4.0266 ms/op 1.04
computeDeltas 750000 validators 300 proto nodes 6.1711 ms/op 5.9887 ms/op 1.03
computeDeltas 750000 validators 1200 proto nodes 6.2172 ms/op 6.0832 ms/op 1.02
computeDeltas 750000 validators 7200 proto nodes 6.2390 ms/op 6.0425 ms/op 1.03
computeDeltas 1400000 validators 300 proto nodes 10.974 ms/op 11.420 ms/op 0.96
computeDeltas 1400000 validators 1200 proto nodes 11.341 ms/op 11.843 ms/op 0.96
computeDeltas 1400000 validators 7200 proto nodes 11.511 ms/op 12.292 ms/op 0.94
computeDeltas 2100000 validators 300 proto nodes 16.950 ms/op 17.471 ms/op 0.97
computeDeltas 2100000 validators 1200 proto nodes 17.241 ms/op 17.295 ms/op 1.00
computeDeltas 2100000 validators 7200 proto nodes 17.040 ms/op 17.471 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei normalcase 1.7685 ms/op 2.9377 ms/op 0.60
altair processAttestation - 250000 vs - 7PWei worstcase 2.6695 ms/op 3.4832 ms/op 0.77
altair processAttestation - setStatus - 1/6 committees join 118.55 us/op 140.66 us/op 0.84
altair processAttestation - setStatus - 1/3 committees join 228.69 us/op 260.44 us/op 0.88
altair processAttestation - setStatus - 1/2 committees join 318.65 us/op 355.19 us/op 0.90
altair processAttestation - setStatus - 2/3 committees join 410.71 us/op 443.36 us/op 0.93
altair processAttestation - setStatus - 4/5 committees join 567.15 us/op 619.93 us/op 0.91
altair processAttestation - setStatus - 100% committees join 667.93 us/op 745.12 us/op 0.90
altair processBlock - 250000 vs - 7PWei normalcase 4.4987 ms/op 4.2795 ms/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.474 ms/op 28.008 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase 45.933 ms/op 37.695 ms/op 1.22
altair processBlock - 250000 vs - 7PWei worstcase hashState 95.009 ms/op 74.099 ms/op 1.28
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2854 ms/op 2.2685 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei worstcase 26.331 ms/op 24.559 ms/op 1.07
altair processEth1Data - 250000 vs - 7PWei normalcase 291.68 us/op 392.34 us/op 0.74
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.2810 us/op 11.040 us/op 0.48
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 71.789 us/op 61.710 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.317 us/op 18.606 us/op 0.98
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.7590 us/op 10.197 us/op 0.86
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 152.53 us/op 155.48 us/op 0.98
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.2169 ms/op 1.1020 ms/op 2.01
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.8857 ms/op 1.4484 ms/op 1.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.7093 ms/op 1.7648 ms/op 1.54
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.5787 ms/op 4.2146 ms/op 0.85
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0870 ms/op 1.4869 ms/op 1.40
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.5544 ms/op 3.8993 ms/op 0.91
Tree 40 250000 create 192.60 ms/op 225.01 ms/op 0.86
Tree 40 250000 get(125000) 140.21 ns/op 155.13 ns/op 0.90
Tree 40 250000 set(125000) 597.27 ns/op 733.34 ns/op 0.81
Tree 40 250000 toArray() 15.366 ms/op 20.952 ms/op 0.73
Tree 40 250000 iterate all - toArray() + loop 15.410 ms/op 19.269 ms/op 0.80
Tree 40 250000 iterate all - get(i) 47.429 ms/op 55.700 ms/op 0.85
Array 250000 create 2.7017 ms/op 3.1899 ms/op 0.85
Array 250000 clone - spread 1.3445 ms/op 1.5456 ms/op 0.87
Array 250000 get(125000) 0.39700 ns/op 0.42300 ns/op 0.94
Array 250000 set(125000) 0.41500 ns/op 0.45100 ns/op 0.92
Array 250000 iterate all - loop 103.40 us/op 109.94 us/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 51.044 ms/op 52.172 ms/op 0.98
Array.fill - length 1000000 3.5619 ms/op 3.7579 ms/op 0.95
Array push - length 1000000 16.900 ms/op 19.884 ms/op 0.85
Array.get 0.26114 ns/op 0.29337 ns/op 0.89
Uint8Array.get 0.41874 ns/op 0.45333 ns/op 0.92
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.755 ms/op 20.575 ms/op 0.77
altair processEpoch - mainnet_e81889 308.50 ms/op 270.70 ms/op 1.14
mainnet_e81889 - altair beforeProcessEpoch 17.655 ms/op 20.448 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 22.700 us/op 15.202 us/op 1.49
mainnet_e81889 - altair processInactivityUpdates 4.8459 ms/op 5.6414 ms/op 0.86
mainnet_e81889 - altair processRewardsAndPenalties 53.293 ms/op 36.238 ms/op 1.47
mainnet_e81889 - altair processRegistryUpdates 3.7900 us/op 2.8210 us/op 1.34
mainnet_e81889 - altair processSlashings 625.00 ns/op 443.00 ns/op 1.41
mainnet_e81889 - altair processEth1DataReset 828.00 ns/op 486.00 ns/op 1.70
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.5660 ms/op 1.4557 ms/op 1.76
mainnet_e81889 - altair processSlashingsReset 5.9940 us/op 4.2230 us/op 1.42
mainnet_e81889 - altair processRandaoMixesReset 7.4470 us/op 4.9760 us/op 1.50
mainnet_e81889 - altair processHistoricalRootsUpdate 1.2820 us/op 722.00 ns/op 1.78
mainnet_e81889 - altair processParticipationFlagUpdates 2.2520 us/op 2.3210 us/op 0.97
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0640 us/op 618.00 ns/op 1.72
mainnet_e81889 - altair afterProcessEpoch 50.739 ms/op 50.871 ms/op 1.00
capella processEpoch - mainnet_e217614 1.0841 s/op 1.0852 s/op 1.00
mainnet_e217614 - capella beforeProcessEpoch 71.663 ms/op 71.759 ms/op 1.00
mainnet_e217614 - capella processJustificationAndFinalization 18.833 us/op 13.328 us/op 1.41
mainnet_e217614 - capella processInactivityUpdates 16.301 ms/op 17.511 ms/op 0.93
mainnet_e217614 - capella processRewardsAndPenalties 244.36 ms/op 225.58 ms/op 1.08
mainnet_e217614 - capella processRegistryUpdates 23.584 us/op 22.124 us/op 1.07
mainnet_e217614 - capella processSlashings 915.00 ns/op 641.00 ns/op 1.43
mainnet_e217614 - capella processEth1DataReset 642.00 ns/op 536.00 ns/op 1.20
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.806 ms/op 4.5038 ms/op 2.62
mainnet_e217614 - capella processSlashingsReset 3.0990 us/op 2.7410 us/op 1.13
mainnet_e217614 - capella processRandaoMixesReset 6.2730 us/op 4.6190 us/op 1.36
mainnet_e217614 - capella processHistoricalRootsUpdate 940.00 ns/op 487.00 ns/op 1.93
mainnet_e217614 - capella processParticipationFlagUpdates 3.1630 us/op 1.9530 us/op 1.62
mainnet_e217614 - capella afterProcessEpoch 128.04 ms/op 126.29 ms/op 1.01
phase0 processEpoch - mainnet_e58758 366.76 ms/op 288.32 ms/op 1.27
mainnet_e58758 - phase0 beforeProcessEpoch 84.239 ms/op 81.799 ms/op 1.03
mainnet_e58758 - phase0 processJustificationAndFinalization 21.353 us/op 15.909 us/op 1.34
mainnet_e58758 - phase0 processRewardsAndPenalties 26.233 ms/op 22.013 ms/op 1.19
mainnet_e58758 - phase0 processRegistryUpdates 12.466 us/op 10.575 us/op 1.18
mainnet_e58758 - phase0 processSlashings 590.00 ns/op 630.00 ns/op 0.94
mainnet_e58758 - phase0 processEth1DataReset 444.00 ns/op 450.00 ns/op 0.99
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0220 ms/op 1.1854 ms/op 1.71
mainnet_e58758 - phase0 processSlashingsReset 2.5760 us/op 4.6130 us/op 0.56
mainnet_e58758 - phase0 processRandaoMixesReset 5.3900 us/op 4.9810 us/op 1.08
mainnet_e58758 - phase0 processHistoricalRootsUpdate 513.00 ns/op 768.00 ns/op 0.67
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.8260 us/op 4.8340 us/op 0.79
mainnet_e58758 - phase0 afterProcessEpoch 44.947 ms/op 44.741 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4231 ms/op 1.3907 ms/op 1.74
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5392 ms/op 3.5091 ms/op 0.72
altair processInactivityUpdates - 250000 normalcase 18.376 ms/op 17.886 ms/op 1.03
altair processInactivityUpdates - 250000 worstcase 22.315 ms/op 17.117 ms/op 1.30
phase0 processRegistryUpdates - 250000 normalcase 15.208 us/op 9.4310 us/op 1.61
phase0 processRegistryUpdates - 250000 badcase_full_deposits 512.98 us/op 341.81 us/op 1.50
phase0 processRegistryUpdates - 250000 worstcase 0.5 125.29 ms/op 125.17 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 52.683 ms/op 40.931 ms/op 1.29
altair processRewardsAndPenalties - 250000 worstcase 46.210 ms/op 41.058 ms/op 1.13
phase0 getAttestationDeltas - 250000 normalcase 7.8357 ms/op 12.271 ms/op 0.64
phase0 getAttestationDeltas - 250000 worstcase 7.5103 ms/op 8.2031 ms/op 0.92
phase0 processSlashings - 250000 worstcase 122.70 us/op 125.77 us/op 0.98
altair processSyncCommitteeUpdates - 250000 119.59 ms/op 129.92 ms/op 0.92
BeaconState.hashTreeRoot - No change 252.00 ns/op 251.00 ns/op 1.00
BeaconState.hashTreeRoot - 1 full validator 89.838 us/op 120.62 us/op 0.74
BeaconState.hashTreeRoot - 32 full validator 898.16 us/op 1.4272 ms/op 0.63
BeaconState.hashTreeRoot - 512 full validator 8.8299 ms/op 12.130 ms/op 0.73
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 109.64 us/op 142.55 us/op 0.77
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7825 ms/op 1.8472 ms/op 0.96
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 21.814 ms/op 23.150 ms/op 0.94
BeaconState.hashTreeRoot - 1 balances 95.873 us/op 104.84 us/op 0.91
BeaconState.hashTreeRoot - 32 balances 812.38 us/op 934.44 us/op 0.87
BeaconState.hashTreeRoot - 512 balances 7.0084 ms/op 8.1589 ms/op 0.86
BeaconState.hashTreeRoot - 250000 balances 169.68 ms/op 214.79 ms/op 0.79
aggregationBits - 2048 els - zipIndexesInBitList 23.376 us/op 33.642 us/op 0.69
byteArrayEquals 32 53.846 ns/op 54.292 ns/op 0.99
Buffer.compare 32 17.418 ns/op 17.906 ns/op 0.97
byteArrayEquals 1024 1.5942 us/op 1.6024 us/op 0.99
Buffer.compare 1024 24.763 ns/op 25.904 ns/op 0.96
byteArrayEquals 16384 25.349 us/op 25.499 us/op 0.99
Buffer.compare 16384 205.59 ns/op 188.91 ns/op 1.09
byteArrayEquals 123687377 191.05 ms/op 192.10 ms/op 0.99
Buffer.compare 123687377 6.6926 ms/op 6.5533 ms/op 1.02
byteArrayEquals 32 - diff last byte 52.241 ns/op 52.538 ns/op 0.99
Buffer.compare 32 - diff last byte 16.968 ns/op 17.000 ns/op 1.00
byteArrayEquals 1024 - diff last byte 1.5739 us/op 1.5742 us/op 1.00
Buffer.compare 1024 - diff last byte 25.768 ns/op 26.130 ns/op 0.99
byteArrayEquals 16384 - diff last byte 25.148 us/op 25.039 us/op 1.00
Buffer.compare 16384 - diff last byte 202.49 ns/op 199.69 ns/op 1.01
byteArrayEquals 123687377 - diff last byte 190.93 ms/op 189.57 ms/op 1.01
Buffer.compare 123687377 - diff last byte 6.4873 ms/op 7.1495 ms/op 0.91
byteArrayEquals 32 - random bytes 5.2850 ns/op 5.0940 ns/op 1.04
Buffer.compare 32 - random bytes 17.434 ns/op 16.905 ns/op 1.03
byteArrayEquals 1024 - random bytes 5.2720 ns/op 5.1010 ns/op 1.03
Buffer.compare 1024 - random bytes 17.533 ns/op 17.301 ns/op 1.01
byteArrayEquals 16384 - random bytes 5.2880 ns/op 5.1780 ns/op 1.02
Buffer.compare 16384 - random bytes 17.443 ns/op 17.276 ns/op 1.01
byteArrayEquals 123687377 - random bytes 6.4700 ns/op 6.4500 ns/op 1.00
Buffer.compare 123687377 - random bytes 17.850 ns/op 18.520 ns/op 0.96
regular array get 100000 times 40.969 us/op 33.374 us/op 1.23
wrappedArray get 100000 times 32.978 us/op 33.462 us/op 0.99
arrayWithProxy get 100000 times 12.290 ms/op 12.511 ms/op 0.98
ssz.Root.equals 46.127 ns/op 46.220 ns/op 1.00
byteArrayEquals 45.275 ns/op 45.412 ns/op 1.00
Buffer.compare 10.320 ns/op 10.887 ns/op 0.95
processSlot - 1 slots 13.988 us/op 13.525 us/op 1.03
processSlot - 32 slots 3.3752 ms/op 3.3273 ms/op 1.01
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 41.570 ms/op 36.265 ms/op 1.15
getCommitteeAssignments - req 1 vs - 250000 vc 2.0912 ms/op 2.1273 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 4.0752 ms/op 4.1327 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4410 ms/op 4.4807 ms/op 0.99
findModifiedValidators - 10000 modified validators 244.14 ms/op 237.05 ms/op 1.03
findModifiedValidators - 1000 modified validators 183.52 ms/op 180.00 ms/op 1.02
findModifiedValidators - 100 modified validators 183.86 ms/op 159.35 ms/op 1.15
findModifiedValidators - 10 modified validators 176.77 ms/op 161.62 ms/op 1.09
findModifiedValidators - 1 modified validators 177.84 ms/op 154.15 ms/op 1.15
findModifiedValidators - no difference 165.59 ms/op 174.61 ms/op 0.95
compare ViewDUs 3.1786 s/op 3.0040 s/op 1.06
compare each validator Uint8Array 1.5450 s/op 1.0661 s/op 1.45
compare ViewDU to Uint8Array 963.92 ms/op 910.99 ms/op 1.06
migrate state 1000000 validators, 24 modified, 0 new 736.55 ms/op 617.38 ms/op 1.19
migrate state 1000000 validators, 1700 modified, 1000 new 1.0368 s/op 918.86 ms/op 1.13
migrate state 1000000 validators, 3400 modified, 2000 new 1.2870 s/op 1.0565 s/op 1.22
migrate state 1500000 validators, 24 modified, 0 new 842.64 ms/op 710.37 ms/op 1.19
migrate state 1500000 validators, 1700 modified, 1000 new 1.0636 s/op 922.00 ms/op 1.15
migrate state 1500000 validators, 3400 modified, 2000 new 1.2867 s/op 1.1248 s/op 1.14
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8400 ns/op 4.1900 ns/op 1.16
state getBlockRootAtSlot - 250000 vs - 7PWei 685.60 ns/op 781.04 ns/op 0.88
computeProposers - vc 250000 8.4298 ms/op 7.0837 ms/op 1.19
computeEpochShuffling - vc 250000 41.179 ms/op 41.045 ms/op 1.00
getNextSyncCommittee - vc 250000 128.60 ms/op 120.41 ms/op 1.07
computeSigningRoot for AttestationData 23.392 us/op 21.481 us/op 1.09
hash AttestationData serialized data then Buffer.toString(base64) 1.5294 us/op 1.5587 us/op 0.98
toHexString serialized data 872.12 ns/op 868.45 ns/op 1.00
Buffer.toString(base64) 163.54 ns/op 174.12 ns/op 0.94
nodejs block root to RootHex using toHex 134.98 ns/op 138.87 ns/op 0.97
nodejs block root to RootHex using toRootHex 85.616 ns/op 81.902 ns/op 1.05
browser block root to RootHex using the deprecated toHexString 224.76 ns/op 222.05 ns/op 1.01
browser block root to RootHex using toHex 179.65 ns/op 177.20 ns/op 1.01
browser block root to RootHex using toRootHex 160.08 ns/op 157.33 ns/op 1.02

by benchmarkbot/action

@philknows
Copy link
Member

Included for alpha.10

@@ -284,4 +288,20 @@ Will double processing times. Use only for debugging purposes.",
default: defaultOptions.chain.maxCPStateEpochsInMemory,
group: "chain",
},

"chain.targetBlobsPerBlock": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these values will be part of spec config

Copy link
Contributor Author

@ensi321 ensi321 Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting 4/8 or 6/9 is part of the scope of EIP-7691. Will open a separate PR for it.

EIP-7742 only sets target = max / 2 and no new config value

@nflaig nflaig changed the base branch from unstable to devnet-5 December 5, 2024 08:24
@ensi321 ensi321 marked this pull request as ready for review December 9, 2024 18:24
@ensi321 ensi321 requested a review from a team as a code owner December 9, 2024 18:24
(payloadAttributes as electra.SSEPayloadAttributes["payloadAttributes"]).targetBlobsPerBlock = Math.floor(
MAX_BLOBS_PER_BLOCK / 2
);
(payloadAttributes as electra.SSEPayloadAttributes["payloadAttributes"]).maxBlobsPerBlock = MAX_BLOBS_PER_BLOCK;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cast to electra.SSEPayloadAttributes once

@@ -201,7 +201,8 @@ export class ExecutionEngineHttp implements IExecutionEngine {
executionPayload: ExecutionPayload,
versionedHashes?: VersionedHashes,
parentBlockRoot?: Root,
executionRequests?: ExecutionRequests
executionRequests?: ExecutionRequests,
maxBlobsPerBlock?: number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verifyBlocksExecutionPayload passed in targetBlobsPerBlock which is correct as in the api but here it's maxBlobsPerBlock

@twoeths
Copy link
Contributor

twoeths commented Dec 10, 2024

need to wait for eip-7742 execution api to be merged

@ensi321
Copy link
Contributor Author

ensi321 commented Dec 10, 2024

Converting to draft as there is a blocker for the EIP.

@ensi321 ensi321 marked this pull request as draft December 10, 2024 22:30
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.

Electra: Implement EIP7742: uncouple blob limits per block across CL and EL
4 participants