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: devnet-4 support #7154

Merged
merged 11 commits into from
Oct 19, 2024
Merged

feat: devnet-4 support #7154

merged 11 commits into from
Oct 19, 2024

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Oct 11, 2024

Includes all necessary consensus spec changes versioned v1.5.0-alpha.7 and v1.5.0-alpha.8. Also implements Electra builder specs.

ensi321 and others added 4 commits October 8, 2024 15:08
* initial commit

* process deposits on epoch processing

* lint

* Fix spec test

* Remove commented out code

* Update packages/state-transition/src/epoch/processPendingDeposits.ts

Co-authored-by: twoeths <tuyen@chainsafe.io>

* Address comments

* lint

---------

Co-authored-by: twoeths <tuyen@chainsafe.io>
* Pass execution requests in bytes

* lint
* initial commit

* Update packages/beacon-node/src/chain/produceBlock/produceBlockBody.ts

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 17.50000% with 198 lines in your changes missing coverage. Please review.

Project coverage is 49.18%. Comparing base (de0d6ab) to head (223e051).
Report is 12 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7154      +/-   ##
============================================
- Coverage     49.21%   49.18%   -0.04%     
============================================
  Files           598      598              
  Lines         39726    39770      +44     
  Branches       2092     2097       +5     
============================================
+ Hits          19550    19559       +9     
- Misses        20136    20170      +34     
- Partials         40       41       +1     

ensi321 and others added 3 commits October 11, 2024 13:41
* New compound switching logic

* clean up

* fix: remove newCompoundingValidators in EpochTransitionCache

* Bump spec version

* Address comment

* address comment

* Lint

---------

Co-authored-by: Tuyen Nguyen <vutuyen2636@gmail.com>
* chore: clean up single-used function

* Remove Uint8Array

* Present state-transition constants in Uint8Array
@nflaig
Copy link
Member

nflaig commented Oct 12, 2024

we should probably forward merge this into unstable instead of squashing it

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.

did a cursory, looks good to me

Copy link
Contributor

github-actions bot commented Oct 17, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 26e95b9 Previous: de0d6ab Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 3.9247 ms/op 1.7183 ms/op 2.28
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 48.465 us/op 37.146 us/op 1.30
BLS verify - blst 875.13 us/op 905.57 us/op 0.97
BLS verifyMultipleSignatures 3 - blst 1.3327 ms/op 1.3407 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst 2.0888 ms/op 2.5955 ms/op 0.80
BLS verifyMultipleSignatures 32 - blst 4.3530 ms/op 4.5610 ms/op 0.95
BLS verifyMultipleSignatures 64 - blst 8.3135 ms/op 8.4932 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst 16.229 ms/op 16.014 ms/op 1.01
BLS deserializing 10000 signatures 614.92 ms/op 626.15 ms/op 0.98
BLS deserializing 100000 signatures 6.1627 s/op 6.3426 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst 901.63 us/op 947.47 us/op 0.95
BLS verifyMultipleSignatures - same message - 8 - blst 966.97 us/op 1.0534 ms/op 0.92
BLS verifyMultipleSignatures - same message - 32 - blst 1.6216 ms/op 1.6538 ms/op 0.98
BLS verifyMultipleSignatures - same message - 64 - blst 2.3808 ms/op 2.4378 ms/op 0.98
BLS verifyMultipleSignatures - same message - 128 - blst 3.9393 ms/op 4.2739 ms/op 0.92
BLS aggregatePubkeys 32 - blst 17.361 us/op 17.835 us/op 0.97
BLS aggregatePubkeys 128 - blst 61.648 us/op 63.594 us/op 0.97
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 67.781 ms/op 70.717 ms/op 0.96
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 51.704 ms/op 41.418 ms/op 1.25
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 38.007 ms/op 41.765 ms/op 0.91
getSlashingsAndExits - default max 67.272 us/op 63.632 us/op 1.06
getSlashingsAndExits - 2k 255.82 us/op 247.29 us/op 1.03
proposeBlockBody type=full, size=empty 4.9658 ms/op 4.9248 ms/op 1.01
isKnown best case - 1 super set check 466.00 ns/op 465.00 ns/op 1.00
isKnown normal case - 2 super set checks 470.00 ns/op 457.00 ns/op 1.03
isKnown worse case - 16 super set checks 463.00 ns/op 461.00 ns/op 1.00
InMemoryCheckpointStateCache - add get delete 3.4010 us/op 2.8650 us/op 1.19
updateUnfinalizedPubkeys - updating 10 pubkeys 859.61 us/op 804.08 us/op 1.07
updateUnfinalizedPubkeys - updating 100 pubkeys 2.7220 ms/op 3.1182 ms/op 0.87
updateUnfinalizedPubkeys - updating 1000 pubkeys 38.002 ms/op 41.093 ms/op 0.92
validate api signedAggregateAndProof - struct 1.5799 ms/op 1.4519 ms/op 1.09
validate gossip signedAggregateAndProof - struct 1.9563 ms/op 2.0245 ms/op 0.97
batch validate gossip attestation - vc 640000 - chunk 32 127.13 us/op 126.33 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 102.63 us/op 109.96 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 128 97.557 us/op 105.89 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 256 91.713 us/op 99.791 us/op 0.92
pickEth1Vote - no votes 871.67 us/op 840.40 us/op 1.04
pickEth1Vote - max votes 5.6260 ms/op 8.3039 ms/op 0.68
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.523 ms/op 20.749 ms/op 0.70
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.852 ms/op 31.035 ms/op 0.58
pickEth1Vote - Eth1Data fastSerialize value x2048 370.93 us/op 390.97 us/op 0.95
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.9119 ms/op 5.2330 ms/op 0.56
bytes32 toHexString 575.00 ns/op 807.00 ns/op 0.71
bytes32 Buffer.toString(hex) 414.00 ns/op 489.00 ns/op 0.85
bytes32 Buffer.toString(hex) from Uint8Array 508.00 ns/op 595.00 ns/op 0.85
bytes32 Buffer.toString(hex) + 0x 417.00 ns/op 488.00 ns/op 0.85
Object access 1 prop 0.31400 ns/op 0.34000 ns/op 0.92
Map access 1 prop 0.30900 ns/op 0.32400 ns/op 0.95
Object get x1000 5.4160 ns/op 5.0250 ns/op 1.08
Map get x1000 5.8130 ns/op 5.7550 ns/op 1.01
Object set x1000 23.873 ns/op 27.231 ns/op 0.88
Map set x1000 18.890 ns/op 19.840 ns/op 0.95
Return object 10000 times 0.29020 ns/op 0.29480 ns/op 0.98
Throw Error 10000 times 2.6621 us/op 2.6575 us/op 1.00
toHex 110.64 ns/op 119.78 ns/op 0.92
Buffer.from 102.69 ns/op 98.237 ns/op 1.05
shared Buffer 68.604 ns/op 66.791 ns/op 1.03
fastMsgIdFn sha256 / 200 bytes 1.9490 us/op 2.0190 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 397.00 ns/op 426.00 ns/op 0.93
fastMsgIdFn h64 xxhash / 200 bytes 427.00 ns/op 454.00 ns/op 0.94
fastMsgIdFn sha256 / 1000 bytes 5.7830 us/op 5.8230 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 506.00 ns/op 553.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 1000 bytes 491.00 ns/op 507.00 ns/op 0.97
fastMsgIdFn sha256 / 10000 bytes 48.948 us/op 46.684 us/op 1.05
fastMsgIdFn h32 xxhash / 10000 bytes 1.8460 us/op 1.9090 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 1.2920 us/op 1.3160 us/op 0.98
send data - 1000 256B messages 10.342 ms/op 11.863 ms/op 0.87
send data - 1000 512B messages 12.817 ms/op 14.082 ms/op 0.91
send data - 1000 1024B messages 23.741 ms/op 21.913 ms/op 1.08
send data - 1000 1200B messages 23.589 ms/op 22.746 ms/op 1.04
send data - 1000 2048B messages 30.164 ms/op 30.022 ms/op 1.00
send data - 1000 4096B messages 26.210 ms/op 27.678 ms/op 0.95
send data - 1000 16384B messages 65.641 ms/op 63.945 ms/op 1.03
send data - 1000 65536B messages 249.56 ms/op 236.04 ms/op 1.06
enrSubnets - fastDeserialize 64 bits 1.0540 us/op 1.0830 us/op 0.97
enrSubnets - ssz BitVector 64 bits 496.00 ns/op 519.00 ns/op 0.96
enrSubnets - fastDeserialize 4 bits 310.00 ns/op 322.00 ns/op 0.96
enrSubnets - ssz BitVector 4 bits 499.00 ns/op 535.00 ns/op 0.93
prioritizePeers score -10:0 att 32-0.1 sync 2-0 105.47 us/op 120.75 us/op 0.87
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 132.71 us/op 141.69 us/op 0.94
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 187.77 us/op 219.78 us/op 0.85
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 333.11 us/op 425.15 us/op 0.78
prioritizePeers score 0:0 att 64-1 sync 4-1 404.97 us/op 527.13 us/op 0.77
array of 16000 items push then shift 1.2719 us/op 1.2816 us/op 0.99
LinkedList of 16000 items push then shift 6.2650 ns/op 7.4570 ns/op 0.84
array of 16000 items push then pop 74.544 ns/op 125.64 ns/op 0.59
LinkedList of 16000 items push then pop 6.1400 ns/op 6.2970 ns/op 0.98
array of 24000 items push then shift 1.8652 us/op 1.8973 us/op 0.98
LinkedList of 24000 items push then shift 6.7390 ns/op 6.9310 ns/op 0.97
array of 24000 items push then pop 101.07 ns/op 158.41 ns/op 0.64
LinkedList of 24000 items push then pop 5.8840 ns/op 6.2220 ns/op 0.95
intersect bitArray bitLen 8 5.3200 ns/op 5.2700 ns/op 1.01
intersect array and set length 8 34.900 ns/op 40.509 ns/op 0.86
intersect bitArray bitLen 128 24.995 ns/op 26.214 ns/op 0.95
intersect array and set length 128 530.12 ns/op 647.64 ns/op 0.82
bitArray.getTrueBitIndexes() bitLen 128 1.3160 us/op 2.2460 us/op 0.59
bitArray.getTrueBitIndexes() bitLen 248 2.0600 us/op 3.4510 us/op 0.60
bitArray.getTrueBitIndexes() bitLen 512 3.6990 us/op 8.6390 us/op 0.43
Buffer.concat 32 items 999.00 ns/op 1.0860 us/op 0.92
Uint8Array.set 32 items 1.4840 us/op 1.7170 us/op 0.86
Buffer.copy 1.6820 us/op 1.7040 us/op 0.99
Uint8Array.set - with subarray 1.9510 us/op 2.1400 us/op 0.91
Uint8Array.set - without subarray 1.7420 us/op 1.4640 us/op 1.19
getUint32 - dataview 386.00 ns/op 406.00 ns/op 0.95
getUint32 - manual 327.00 ns/op 343.00 ns/op 0.95
Set add up to 64 items then delete first 1.7546 us/op 1.7844 us/op 0.98
OrderedSet add up to 64 items then delete first 2.5973 us/op 2.7672 us/op 0.94
Set add up to 64 items then delete last 2.0543 us/op 2.0333 us/op 1.01
OrderedSet add up to 64 items then delete last 3.1500 us/op 3.0735 us/op 1.02
Set add up to 64 items then delete middle 2.0713 us/op 2.0367 us/op 1.02
OrderedSet add up to 64 items then delete middle 4.5250 us/op 4.5966 us/op 0.98
Set add up to 128 items then delete first 3.9490 us/op 4.0016 us/op 0.99
OrderedSet add up to 128 items then delete first 5.9047 us/op 6.3192 us/op 0.93
Set add up to 128 items then delete last 3.9274 us/op 3.8364 us/op 1.02
OrderedSet add up to 128 items then delete last 6.1257 us/op 5.8751 us/op 1.04
Set add up to 128 items then delete middle 3.9071 us/op 3.8081 us/op 1.03
OrderedSet add up to 128 items then delete middle 11.799 us/op 11.979 us/op 0.99
Set add up to 256 items then delete first 7.6629 us/op 7.8387 us/op 0.98
OrderedSet add up to 256 items then delete first 11.589 us/op 12.585 us/op 0.92
Set add up to 256 items then delete last 7.6676 us/op 7.5312 us/op 1.02
OrderedSet add up to 256 items then delete last 12.015 us/op 11.797 us/op 1.02
Set add up to 256 items then delete middle 7.6002 us/op 7.4386 us/op 1.02
OrderedSet add up to 256 items then delete middle 34.363 us/op 35.240 us/op 0.98
transfer serialized Status (84 B) 1.5150 us/op 1.4970 us/op 1.01
copy serialized Status (84 B) 1.2920 us/op 1.3040 us/op 0.99
transfer serialized SignedVoluntaryExit (112 B) 1.7310 us/op 1.7480 us/op 0.99
copy serialized SignedVoluntaryExit (112 B) 1.4570 us/op 1.4170 us/op 1.03
transfer serialized ProposerSlashing (416 B) 2.5350 us/op 2.0370 us/op 1.24
copy serialized ProposerSlashing (416 B) 2.5210 us/op 2.0880 us/op 1.21
transfer serialized Attestation (485 B) 2.5370 us/op 2.1500 us/op 1.18
copy serialized Attestation (485 B) 2.4340 us/op 2.1380 us/op 1.14
transfer serialized AttesterSlashing (33232 B) 2.6460 us/op 2.7250 us/op 0.97
copy serialized AttesterSlashing (33232 B) 5.2480 us/op 6.0530 us/op 0.87
transfer serialized Small SignedBeaconBlock (128000 B) 2.4790 us/op 3.9780 us/op 0.62
copy serialized Small SignedBeaconBlock (128000 B) 10.330 us/op 16.287 us/op 0.63
transfer serialized Avg SignedBeaconBlock (200000 B) 2.4990 us/op 3.9630 us/op 0.63
copy serialized Avg SignedBeaconBlock (200000 B) 12.083 us/op 23.972 us/op 0.50
transfer serialized BlobsSidecar (524380 B) 2.6640 us/op 3.3600 us/op 0.79
copy serialized BlobsSidecar (524380 B) 64.299 us/op 113.65 us/op 0.57
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9980 us/op 2.9700 us/op 1.01
copy serialized Big SignedBeaconBlock (1000000 B) 128.99 us/op 188.02 us/op 0.69
pass gossip attestations to forkchoice per slot 2.3352 ms/op 2.5462 ms/op 0.92
forkChoice updateHead vc 100000 bc 64 eq 0 431.07 us/op 366.17 us/op 1.18
forkChoice updateHead vc 600000 bc 64 eq 0 2.5052 ms/op 2.7097 ms/op 0.92
forkChoice updateHead vc 1000000 bc 64 eq 0 3.8957 ms/op 3.6948 ms/op 1.05
forkChoice updateHead vc 600000 bc 320 eq 0 2.3321 ms/op 2.1906 ms/op 1.06
forkChoice updateHead vc 600000 bc 1200 eq 0 2.3769 ms/op 2.2462 ms/op 1.06
forkChoice updateHead vc 600000 bc 7200 eq 0 2.6370 ms/op 3.1150 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 1000 9.1991 ms/op 9.5812 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 10000 9.2061 ms/op 9.5213 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 300000 11.150 ms/op 11.784 ms/op 0.95
computeDeltas 500000 validators 300 proto nodes 3.3338 ms/op 3.2398 ms/op 1.03
computeDeltas 500000 validators 1200 proto nodes 3.2282 ms/op 3.2681 ms/op 0.99
computeDeltas 500000 validators 7200 proto nodes 3.2788 ms/op 3.2607 ms/op 1.01
computeDeltas 750000 validators 300 proto nodes 4.9120 ms/op 4.8665 ms/op 1.01
computeDeltas 750000 validators 1200 proto nodes 5.0482 ms/op 4.8411 ms/op 1.04
computeDeltas 750000 validators 7200 proto nodes 5.0518 ms/op 4.7775 ms/op 1.06
computeDeltas 1400000 validators 300 proto nodes 10.481 ms/op 8.8315 ms/op 1.19
computeDeltas 1400000 validators 1200 proto nodes 9.4353 ms/op 9.1316 ms/op 1.03
computeDeltas 1400000 validators 7200 proto nodes 10.104 ms/op 8.7758 ms/op 1.15
computeDeltas 2100000 validators 300 proto nodes 14.555 ms/op 13.563 ms/op 1.07
computeDeltas 2100000 validators 1200 proto nodes 14.389 ms/op 13.531 ms/op 1.06
computeDeltas 2100000 validators 7200 proto nodes 15.121 ms/op 13.478 ms/op 1.12
altair processAttestation - 250000 vs - 7PWei normalcase 1.6541 ms/op 1.3997 ms/op 1.18
altair processAttestation - 250000 vs - 7PWei worstcase 2.5326 ms/op 2.1942 ms/op 1.15
altair processAttestation - setStatus - 1/6 committees join 84.258 us/op 66.958 us/op 1.26
altair processAttestation - setStatus - 1/3 committees join 164.82 us/op 141.72 us/op 1.16
altair processAttestation - setStatus - 1/2 committees join 236.38 us/op 194.96 us/op 1.21
altair processAttestation - setStatus - 2/3 committees join 339.34 us/op 252.07 us/op 1.35
altair processAttestation - setStatus - 4/5 committees join 448.49 us/op 383.85 us/op 1.17
altair processAttestation - setStatus - 100% committees join 517.95 us/op 460.59 us/op 1.12
altair processBlock - 250000 vs - 7PWei normalcase 4.5975 ms/op 5.4814 ms/op 0.84
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.725 ms/op 23.561 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase 38.221 ms/op 38.362 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase hashState 77.470 ms/op 85.734 ms/op 0.90
phase0 processBlock - 250000 vs - 7PWei normalcase 1.7559 ms/op 2.0426 ms/op 0.86
phase0 processBlock - 250000 vs - 7PWei worstcase 24.543 ms/op 21.687 ms/op 1.13
altair processEth1Data - 250000 vs - 7PWei normalcase 263.20 us/op 235.92 us/op 1.12
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.1530 us/op 3.5870 us/op 1.72
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 32.416 us/op 17.366 us/op 1.87
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.337 us/op 10.844 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.0670 us/op 5.0780 us/op 1.39
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 107.90 us/op 118.75 us/op 0.91
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 907.92 us/op 1.3286 ms/op 0.68
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.2282 ms/op 1.2265 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4712 ms/op 1.0515 ms/op 1.40
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.0899 ms/op 2.9483 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.3868 ms/op 1.2049 ms/op 1.15
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.1528 ms/op 2.7890 ms/op 1.49
Tree 40 250000 create 287.78 ms/op 179.09 ms/op 1.61
Tree 40 250000 get(125000) 125.35 ns/op 101.75 ns/op 1.23
Tree 40 250000 set(125000) 577.51 ns/op 517.05 ns/op 1.12
Tree 40 250000 toArray() 19.865 ms/op 12.218 ms/op 1.63
Tree 40 250000 iterate all - toArray() + loop 20.202 ms/op 12.347 ms/op 1.64
Tree 40 250000 iterate all - get(i) 49.982 ms/op 39.782 ms/op 1.26
Array 250000 create 3.1128 ms/op 2.4037 ms/op 1.30
Array 250000 clone - spread 1.2039 ms/op 1.3163 ms/op 0.91
Array 250000 get(125000) 0.62900 ns/op 0.56300 ns/op 1.12
Array 250000 set(125000) 0.61600 ns/op 0.56400 ns/op 1.09
Array 250000 iterate all - loop 77.785 us/op 72.363 us/op 1.07
phase0 afterProcessEpoch - 250000 vs - 7PWei 45.565 ms/op 39.430 ms/op 1.16
Array.fill - length 1000000 2.9107 ms/op 2.4982 ms/op 1.17
Array push - length 1000000 16.916 ms/op 14.061 ms/op 1.20
Array.get 0.25738 ns/op 0.25331 ns/op 1.02
Uint8Array.get 0.34234 ns/op 0.32592 ns/op 1.05
phase0 beforeProcessEpoch - 250000 vs - 7PWei 14.483 ms/op 15.385 ms/op 0.94
altair processEpoch - mainnet_e81889 305.47 ms/op 278.69 ms/op 1.10
mainnet_e81889 - altair beforeProcessEpoch 21.859 ms/op 16.290 ms/op 1.34
mainnet_e81889 - altair processJustificationAndFinalization 17.842 us/op 10.909 us/op 1.64
mainnet_e81889 - altair processInactivityUpdates 4.7484 ms/op 4.1307 ms/op 1.15
mainnet_e81889 - altair processRewardsAndPenalties 44.974 ms/op 55.977 ms/op 0.80
mainnet_e81889 - altair processRegistryUpdates 2.8540 us/op 1.3450 us/op 2.12
mainnet_e81889 - altair processSlashings 743.00 ns/op 823.00 ns/op 0.90
mainnet_e81889 - altair processEth1DataReset 711.00 ns/op 748.00 ns/op 0.95
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0641 ms/op 1.6386 ms/op 0.65
mainnet_e81889 - altair processSlashingsReset 2.9270 us/op 2.1560 us/op 1.36
mainnet_e81889 - altair processRandaoMixesReset 3.3230 us/op 2.7200 us/op 1.22
mainnet_e81889 - altair processHistoricalRootsUpdate 766.00 ns/op 692.00 ns/op 1.11
mainnet_e81889 - altair processParticipationFlagUpdates 3.8990 us/op 1.8100 us/op 2.15
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0910 us/op 703.00 ns/op 1.55
mainnet_e81889 - altair afterProcessEpoch 44.716 ms/op 41.143 ms/op 1.09
capella processEpoch - mainnet_e217614 1.1519 s/op 965.12 ms/op 1.19
mainnet_e217614 - capella beforeProcessEpoch 75.217 ms/op 68.213 ms/op 1.10
mainnet_e217614 - capella processJustificationAndFinalization 15.831 us/op 11.636 us/op 1.36
mainnet_e217614 - capella processInactivityUpdates 17.275 ms/op 12.576 ms/op 1.37
mainnet_e217614 - capella processRewardsAndPenalties 248.36 ms/op 220.74 ms/op 1.13
mainnet_e217614 - capella processRegistryUpdates 13.910 us/op 13.795 us/op 1.01
mainnet_e217614 - capella processSlashings 1.2430 us/op 740.00 ns/op 1.68
mainnet_e217614 - capella processEth1DataReset 930.00 ns/op 714.00 ns/op 1.30
mainnet_e217614 - capella processEffectiveBalanceUpdates 23.357 ms/op 13.243 ms/op 1.76
mainnet_e217614 - capella processSlashingsReset 4.1210 us/op 2.4310 us/op 1.70
mainnet_e217614 - capella processRandaoMixesReset 9.3670 us/op 10.228 us/op 0.92
mainnet_e217614 - capella processHistoricalRootsUpdate 1.0420 us/op 1.0120 us/op 1.03
mainnet_e217614 - capella processParticipationFlagUpdates 2.2550 us/op 2.2060 us/op 1.02
mainnet_e217614 - capella afterProcessEpoch 104.61 ms/op 106.38 ms/op 0.98
phase0 processEpoch - mainnet_e58758 421.27 ms/op 345.60 ms/op 1.22
mainnet_e58758 - phase0 beforeProcessEpoch 83.078 ms/op 87.280 ms/op 0.95
mainnet_e58758 - phase0 processJustificationAndFinalization 15.148 us/op 13.319 us/op 1.14
mainnet_e58758 - phase0 processRewardsAndPenalties 37.843 ms/op 26.270 ms/op 1.44
mainnet_e58758 - phase0 processRegistryUpdates 10.630 us/op 5.5300 us/op 1.92
mainnet_e58758 - phase0 processSlashings 1.0830 us/op 770.00 ns/op 1.41
mainnet_e58758 - phase0 processEth1DataReset 1.0460 us/op 719.00 ns/op 1.45
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 826.04 us/op 1.3597 ms/op 0.61
mainnet_e58758 - phase0 processSlashingsReset 4.3850 us/op 2.3320 us/op 1.88
mainnet_e58758 - phase0 processRandaoMixesReset 7.0640 us/op 3.2170 us/op 2.20
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.0080 us/op 776.00 ns/op 1.30
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.6610 us/op 3.1250 us/op 2.13
mainnet_e58758 - phase0 afterProcessEpoch 41.281 ms/op 34.321 ms/op 1.20
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0121 ms/op 1.6808 ms/op 0.60
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7358 ms/op 1.6333 ms/op 1.06
altair processInactivityUpdates - 250000 normalcase 20.555 ms/op 17.134 ms/op 1.20
altair processInactivityUpdates - 250000 worstcase 17.934 ms/op 16.320 ms/op 1.10
phase0 processRegistryUpdates - 250000 normalcase 10.031 us/op 5.6000 us/op 1.79
phase0 processRegistryUpdates - 250000 badcase_full_deposits 394.41 us/op 312.49 us/op 1.26
phase0 processRegistryUpdates - 250000 worstcase 0.5 201.63 ms/op 110.94 ms/op 1.82
altair processRewardsAndPenalties - 250000 normalcase 53.668 ms/op 41.598 ms/op 1.29
altair processRewardsAndPenalties - 250000 worstcase 40.983 ms/op 33.371 ms/op 1.23
phase0 getAttestationDeltas - 250000 normalcase 7.6786 ms/op 6.4047 ms/op 1.20
phase0 getAttestationDeltas - 250000 worstcase 8.1732 ms/op 5.8999 ms/op 1.39
phase0 processSlashings - 250000 worstcase 99.840 us/op 81.890 us/op 1.22
altair processSyncCommitteeUpdates - 250000 121.91 ms/op 94.417 ms/op 1.29
BeaconState.hashTreeRoot - No change 477.00 ns/op 433.00 ns/op 1.10
BeaconState.hashTreeRoot - 1 full validator 138.08 us/op 111.85 us/op 1.23
BeaconState.hashTreeRoot - 32 full validator 1.0771 ms/op 1.1559 ms/op 0.93
BeaconState.hashTreeRoot - 512 full validator 10.092 ms/op 9.0742 ms/op 1.11
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 184.94 us/op 119.37 us/op 1.55
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5958 ms/op 1.8957 ms/op 1.37
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 42.471 ms/op 22.872 ms/op 1.86
BeaconState.hashTreeRoot - 1 balances 173.73 us/op 107.81 us/op 1.61
BeaconState.hashTreeRoot - 32 balances 1.7333 ms/op 1.0188 ms/op 1.70
BeaconState.hashTreeRoot - 512 balances 11.254 ms/op 6.6326 ms/op 1.70
BeaconState.hashTreeRoot - 250000 balances 237.33 ms/op 149.20 ms/op 1.59
aggregationBits - 2048 els - zipIndexesInBitList 39.102 us/op 44.387 us/op 0.88
byteArrayEquals 32 48.592 ns/op 48.995 ns/op 0.99
Buffer.compare 32 15.413 ns/op 15.863 ns/op 0.97
byteArrayEquals 1024 1.2639 us/op 1.2943 us/op 0.98
Buffer.compare 1024 30.264 ns/op 24.342 ns/op 1.24
byteArrayEquals 16384 19.561 us/op 20.492 us/op 0.95
Buffer.compare 16384 168.67 ns/op 211.94 ns/op 0.80
byteArrayEquals 123687377 155.11 ms/op 151.11 ms/op 1.03
Buffer.compare 123687377 5.1352 ms/op 5.4824 ms/op 0.94
byteArrayEquals 32 - diff last byte 47.283 ns/op 44.901 ns/op 1.05
Buffer.compare 32 - diff last byte 15.981 ns/op 15.056 ns/op 1.06
byteArrayEquals 1024 - diff last byte 1.2720 us/op 1.2103 us/op 1.05
Buffer.compare 1024 - diff last byte 33.067 ns/op 24.005 ns/op 1.38
byteArrayEquals 16384 - diff last byte 20.239 us/op 19.086 us/op 1.06
Buffer.compare 16384 - diff last byte 204.78 ns/op 193.78 ns/op 1.06
byteArrayEquals 123687377 - diff last byte 150.20 ms/op 149.48 ms/op 1.00
Buffer.compare 123687377 - diff last byte 4.1023 ms/op 3.7173 ms/op 1.10
byteArrayEquals 32 - random bytes 4.9190 ns/op 4.8390 ns/op 1.02
Buffer.compare 32 - random bytes 16.612 ns/op 16.581 ns/op 1.00
byteArrayEquals 1024 - random bytes 4.8640 ns/op 4.8860 ns/op 1.00
Buffer.compare 1024 - random bytes 16.552 ns/op 15.835 ns/op 1.05
byteArrayEquals 16384 - random bytes 5.1530 ns/op 4.8280 ns/op 1.07
Buffer.compare 16384 - random bytes 16.543 ns/op 16.472 ns/op 1.00
byteArrayEquals 123687377 - random bytes 7.7300 ns/op 7.7300 ns/op 1.00
Buffer.compare 123687377 - random bytes 19.370 ns/op 19.230 ns/op 1.01
regular array get 100000 times 30.975 us/op 30.671 us/op 1.01
wrappedArray get 100000 times 30.863 us/op 30.631 us/op 1.01
arrayWithProxy get 100000 times 11.495 ms/op 9.0841 ms/op 1.27
ssz.Root.equals 43.372 ns/op 40.830 ns/op 1.06
byteArrayEquals 42.348 ns/op 39.044 ns/op 1.08
Buffer.compare 9.8320 ns/op 8.2280 ns/op 1.19
processSlot - 1 slots 10.650 us/op 15.216 us/op 0.70
processSlot - 32 slots 2.2195 ms/op 2.7862 ms/op 0.80
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 42.941 ms/op 41.041 ms/op 1.05
getCommitteeAssignments - req 1 vs - 250000 vc 1.7315 ms/op 1.7195 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 3.5269 ms/op 3.4603 ms/op 1.02
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7272 ms/op 3.6948 ms/op 1.01
findModifiedValidators - 10000 modified validators 227.08 ms/op 223.07 ms/op 1.02
findModifiedValidators - 1000 modified validators 139.39 ms/op 139.22 ms/op 1.00
findModifiedValidators - 100 modified validators 146.05 ms/op 139.41 ms/op 1.05
findModifiedValidators - 10 modified validators 121.89 ms/op 142.44 ms/op 0.86
findModifiedValidators - 1 modified validators 124.12 ms/op 120.70 ms/op 1.03
findModifiedValidators - no difference 150.72 ms/op 142.71 ms/op 1.06
compare ViewDUs 3.4031 s/op 2.9467 s/op 1.15
compare each validator Uint8Array 1.5238 s/op 1.6494 s/op 0.92
compare ViewDU to Uint8Array 746.10 ms/op 730.18 ms/op 1.02
migrate state 1000000 validators, 24 modified, 0 new 642.41 ms/op 713.73 ms/op 0.90
migrate state 1000000 validators, 1700 modified, 1000 new 1.0268 s/op 963.65 ms/op 1.07
migrate state 1000000 validators, 3400 modified, 2000 new 1.4050 s/op 1.1693 s/op 1.20
migrate state 1500000 validators, 24 modified, 0 new 696.71 ms/op 709.21 ms/op 0.98
migrate state 1500000 validators, 1700 modified, 1000 new 868.46 ms/op 893.32 ms/op 0.97
migrate state 1500000 validators, 3400 modified, 2000 new 1.0246 s/op 1.0812 s/op 0.95
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.4700 ns/op 6.1700 ns/op 1.05
state getBlockRootAtSlot - 250000 vs - 7PWei 843.53 ns/op 611.33 ns/op 1.38
computeProposers - vc 250000 6.2175 ms/op 5.2258 ms/op 1.19
computeEpochShuffling - vc 250000 34.597 ms/op 33.809 ms/op 1.02
getNextSyncCommittee - vc 250000 99.353 ms/op 99.630 ms/op 1.00
computeSigningRoot for AttestationData 21.109 us/op 19.417 us/op 1.09
hash AttestationData serialized data then Buffer.toString(base64) 1.1209 us/op 1.1259 us/op 1.00
toHexString serialized data 735.40 ns/op 730.51 ns/op 1.01
Buffer.toString(base64) 140.39 ns/op 123.94 ns/op 1.13
nodejs block root to RootHex using toHex 131.84 ns/op 111.37 ns/op 1.18
nodejs block root to RootHex using toRootHex 76.508 ns/op 67.610 ns/op 1.13
browser block root to RootHex using the deprecated toHexString 221.09 ns/op 189.42 ns/op 1.17
browser block root to RootHex using toHex 167.12 ns/op 154.91 ns/op 1.08
browser block root to RootHex using toRootHex 143.84 ns/op 140.99 ns/op 1.02

by benchmarkbot/action

@ensi321
Copy link
Contributor Author

ensi321 commented Oct 17, 2024

we should probably forward merge this into unstable instead of squashing it

It will be hard since the PR has a mix of direct commits and commits from other PRs. The easiest way is to squash the commits, and just reference the other PRs in the description of this PR.

@@ -25,12 +31,19 @@ describe("Ensure config is synced", () => {
});

function assertCorrectPreset(localPreset: BeaconPreset, remotePreset: BeaconPreset): void {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remote preset is missing MAX_BLOBS_PER_BLOCK since it has moved to config. But Lodestar has not made it configurable and it remains in local config.

Adding ignoredLocalPresetFields is a temporary workaround to make this test pass such that this PR is safe to be merged into unstable.

See #7172 for details

}
} else {
if (fork < ForkSeq.electra) {
const isNewValidator = cachedIndex === null || !Number.isSafeInteger(cachedIndex) || cachedIndex >= validators.length;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to add back condition cachedIndex >= validators.length to pass the benchmark check. @twoeths

Copy link
Member

Choose a reason for hiding this comment

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

Benchmark seems to pass, is this still an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Benchmark seems to pass, is this still an issue?

It is passing because I added back this condition

@ensi321 ensi321 marked this pull request as ready for review October 17, 2024 05:54
@ensi321 ensi321 requested a review from a team as a code owner October 17, 2024 05:54
@nflaig
Copy link
Member

nflaig commented Oct 17, 2024

It will be hard since the PR has a mix of direct commits and commits from other PRs.

We can squash those extra commits in this PR before merging

@wemeetagain
Copy link
Member

We can squash those extra commits in this PR before merging

yes pls

@ensi321 ensi321 merged commit b082410 into unstable Oct 19, 2024
20 checks passed
@ensi321 ensi321 deleted the nc/devnet-4 branch October 19, 2024 05:52
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.

4 participants