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: eip-6110 deprecate eth1 data poll #7414

Merged
merged 6 commits into from
Feb 6, 2025
Merged

feat: eip-6110 deprecate eth1 data poll #7414

merged 6 commits into from
Feb 6, 2025

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Jan 31, 2025

Eth1 data poll is not needed anymore in Pectra after all eth1 deposits are processed.

Introduce mechanism to stop the polling.

Note in the case of Lodestar starting up in Electra, Eth1 data poll may run for 1 epoch but no data will actually get polled and then PrepareNextSlotScheduler.stopEth1Polling() will stop it.

Part of #6341

@ensi321 ensi321 requested a review from a team as a code owner January 31, 2025 08:15
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.25%. Comparing base (f9d080c) to head (7b78e82).
Report is 13 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7414      +/-   ##
============================================
+ Coverage     48.50%   50.25%   +1.74%     
============================================
  Files           602      602              
  Lines         40355    40375      +20     
  Branches       2069     2205     +136     
============================================
+ Hits          19576    20292     +716     
+ Misses        20741    20043     -698     
- Partials         38       40       +2     

Copy link
Contributor

github-actions bot commented Jan 31, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: cf36383 Previous: 9c66fac Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 974.15 us/op 1.0434 ms/op 0.93
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 35.139 us/op 37.333 us/op 0.94
BLS verify - blst 849.59 us/op 1.0443 ms/op 0.81
BLS verifyMultipleSignatures 3 - blst 1.5693 ms/op 1.5794 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst 1.8750 ms/op 2.0636 ms/op 0.91
BLS verifyMultipleSignatures 32 - blst 5.5047 ms/op 5.9270 ms/op 0.93
BLS verifyMultipleSignatures 64 - blst 10.610 ms/op 9.5651 ms/op 1.11
BLS verifyMultipleSignatures 128 - blst 17.331 ms/op 18.375 ms/op 0.94
BLS deserializing 10000 signatures 697.11 ms/op 734.73 ms/op 0.95
BLS deserializing 100000 signatures 7.0315 s/op 7.7937 s/op 0.90
BLS verifyMultipleSignatures - same message - 3 - blst 958.76 us/op 1.0702 ms/op 0.90
BLS verifyMultipleSignatures - same message - 8 - blst 1.0750 ms/op 1.1479 ms/op 0.94
BLS verifyMultipleSignatures - same message - 32 - blst 1.7527 ms/op 1.8468 ms/op 0.95
BLS verifyMultipleSignatures - same message - 64 - blst 2.6843 ms/op 2.9482 ms/op 0.91
BLS verifyMultipleSignatures - same message - 128 - blst 4.4651 ms/op 4.9538 ms/op 0.90
BLS aggregatePubkeys 32 - blst 19.865 us/op 22.199 us/op 0.89
BLS aggregatePubkeys 128 - blst 70.601 us/op 80.197 us/op 0.88
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 56.373 ms/op 69.429 ms/op 0.81
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 63.748 ms/op 59.481 ms/op 1.07
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 46.153 ms/op 48.807 ms/op 0.95
getSlashingsAndExits - default max 82.962 us/op 87.443 us/op 0.95
getSlashingsAndExits - 2k 462.41 us/op 382.71 us/op 1.21
proposeBlockBody type=full, size=empty 7.1732 ms/op 5.4598 ms/op 1.31
isKnown best case - 1 super set check 207.00 ns/op 226.00 ns/op 0.92
isKnown normal case - 2 super set checks 208.00 ns/op 209.00 ns/op 1.00
isKnown worse case - 16 super set checks 205.00 ns/op 221.00 ns/op 0.93
InMemoryCheckpointStateCache - add get delete 2.7760 us/op 3.0440 us/op 0.91
validate api signedAggregateAndProof - struct 1.7303 ms/op 1.6648 ms/op 1.04
validate gossip signedAggregateAndProof - struct 1.7242 ms/op 1.6608 ms/op 1.04
batch validate gossip attestation - vc 640000 - chunk 32 145.40 us/op 139.59 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 64 118.84 us/op 122.70 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 128 113.07 us/op 117.35 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 121.96 us/op 123.29 us/op 0.99
pickEth1Vote - no votes 1.0160 ms/op 1.0389 ms/op 0.98
pickEth1Vote - max votes 8.0089 ms/op 5.9621 ms/op 1.34
pickEth1Vote - Eth1Data hashTreeRoot value x2048 18.537 ms/op 12.445 ms/op 1.49
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 32.037 ms/op 18.161 ms/op 1.76
pickEth1Vote - Eth1Data fastSerialize value x2048 591.17 us/op 481.64 us/op 1.23
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.0262 ms/op 4.1798 ms/op 1.20
bytes32 toHexString 376.00 ns/op 370.00 ns/op 1.02
bytes32 Buffer.toString(hex) 282.00 ns/op 278.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 352.00 ns/op 373.00 ns/op 0.94
bytes32 Buffer.toString(hex) + 0x 247.00 ns/op 246.00 ns/op 1.00
Object access 1 prop 0.13200 ns/op 0.11800 ns/op 1.12
Map access 1 prop 0.17200 ns/op 0.11700 ns/op 1.47
Object get x1000 6.8900 ns/op 6.1990 ns/op 1.11
Map get x1000 6.5000 ns/op 6.5040 ns/op 1.00
Object set x1000 32.663 ns/op 31.891 ns/op 1.02
Map set x1000 22.174 ns/op 23.331 ns/op 0.95
Return object 10000 times 0.30270 ns/op 0.31240 ns/op 0.97
Throw Error 10000 times 4.6984 us/op 4.5240 us/op 1.04
toHex 137.21 ns/op 132.05 ns/op 1.04
Buffer.from 141.16 ns/op 132.05 ns/op 1.07
shared Buffer 89.961 ns/op 84.089 ns/op 1.07
fastMsgIdFn sha256 / 200 bytes 2.3160 us/op 2.2120 us/op 1.05
fastMsgIdFn h32 xxhash / 200 bytes 242.00 ns/op 203.00 ns/op 1.19
fastMsgIdFn h64 xxhash / 200 bytes 307.00 ns/op 256.00 ns/op 1.20
fastMsgIdFn sha256 / 1000 bytes 7.6900 us/op 7.4530 us/op 1.03
fastMsgIdFn h32 xxhash / 1000 bytes 400.00 ns/op 330.00 ns/op 1.21
fastMsgIdFn h64 xxhash / 1000 bytes 367.00 ns/op 380.00 ns/op 0.97
fastMsgIdFn sha256 / 10000 bytes 69.759 us/op 65.282 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 1.9490 us/op 1.8390 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.3870 us/op 1.2240 us/op 1.13
send data - 1000 256B messages 21.581 ms/op 15.492 ms/op 1.39
send data - 1000 512B messages 20.417 ms/op 19.462 ms/op 1.05
send data - 1000 1024B messages 29.890 ms/op 24.558 ms/op 1.22
send data - 1000 1200B messages 26.093 ms/op 27.901 ms/op 0.94
send data - 1000 2048B messages 30.743 ms/op 24.740 ms/op 1.24
send data - 1000 4096B messages 38.003 ms/op 25.280 ms/op 1.50
send data - 1000 16384B messages 86.213 ms/op 64.446 ms/op 1.34
send data - 1000 65536B messages 298.30 ms/op 218.79 ms/op 1.36
enrSubnets - fastDeserialize 64 bits 966.00 ns/op 916.00 ns/op 1.05
enrSubnets - ssz BitVector 64 bits 347.00 ns/op 327.00 ns/op 1.06
enrSubnets - fastDeserialize 4 bits 142.00 ns/op 130.00 ns/op 1.09
enrSubnets - ssz BitVector 4 bits 349.00 ns/op 326.00 ns/op 1.07
prioritizePeers score -10:0 att 32-0.1 sync 2-0 144.68 us/op 123.99 us/op 1.17
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 154.88 us/op 154.85 us/op 1.00
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 217.53 us/op 222.72 us/op 0.98
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 427.97 us/op 400.76 us/op 1.07
prioritizePeers score 0:0 att 64-1 sync 4-1 495.64 us/op 464.98 us/op 1.07
array of 16000 items push then shift 1.7281 us/op 1.5821 us/op 1.09
LinkedList of 16000 items push then shift 11.123 ns/op 6.9240 ns/op 1.61
array of 16000 items push then pop 88.166 ns/op 75.092 ns/op 1.17
LinkedList of 16000 items push then pop 8.7130 ns/op 6.8280 ns/op 1.28
array of 24000 items push then shift 2.5836 us/op 2.3508 us/op 1.10
LinkedList of 24000 items push then shift 9.1240 ns/op 6.9660 ns/op 1.31
array of 24000 items push then pop 129.84 ns/op 104.72 ns/op 1.24
LinkedList of 24000 items push then pop 10.156 ns/op 7.0030 ns/op 1.45
intersect bitArray bitLen 8 6.9820 ns/op 6.5350 ns/op 1.07
intersect array and set length 8 49.050 ns/op 38.775 ns/op 1.26
intersect bitArray bitLen 128 52.220 ns/op 29.965 ns/op 1.74
intersect array and set length 128 795.62 ns/op 620.62 ns/op 1.28
bitArray.getTrueBitIndexes() bitLen 128 1.3160 us/op 1.0180 us/op 1.29
bitArray.getTrueBitIndexes() bitLen 248 2.2290 us/op 1.7870 us/op 1.25
bitArray.getTrueBitIndexes() bitLen 512 4.7030 us/op 3.6460 us/op 1.29
Buffer.concat 32 items 758.00 ns/op 735.00 ns/op 1.03
Uint8Array.set 32 items 1.9730 us/op 1.2050 us/op 1.64
Buffer.copy 2.9720 us/op 2.1460 us/op 1.38
Uint8Array.set - with subarray 3.5700 us/op 1.9530 us/op 1.83
Uint8Array.set - without subarray 2.1760 us/op 1.2910 us/op 1.69
getUint32 - dataview 227.00 ns/op 204.00 ns/op 1.11
getUint32 - manual 126.00 ns/op 123.00 ns/op 1.02
Set add up to 64 items then delete first 3.2373 us/op 2.3096 us/op 1.40
OrderedSet add up to 64 items then delete first 4.5397 us/op 3.2777 us/op 1.39
Set add up to 64 items then delete last 3.1421 us/op 2.7930 us/op 1.13
OrderedSet add up to 64 items then delete last 5.2783 us/op 5.1936 us/op 1.02
Set add up to 64 items then delete middle 3.4826 us/op 3.4053 us/op 1.02
OrderedSet add up to 64 items then delete middle 6.9291 us/op 6.7239 us/op 1.03
Set add up to 128 items then delete first 6.8980 us/op 6.8384 us/op 1.01
OrderedSet add up to 128 items then delete first 10.257 us/op 11.472 us/op 0.89
Set add up to 128 items then delete last 7.0261 us/op 6.7451 us/op 1.04
OrderedSet add up to 128 items then delete last 10.833 us/op 10.478 us/op 1.03
Set add up to 128 items then delete middle 6.8132 us/op 6.3677 us/op 1.07
OrderedSet add up to 128 items then delete middle 18.778 us/op 17.994 us/op 1.04
Set add up to 256 items then delete first 14.219 us/op 14.806 us/op 0.96
OrderedSet add up to 256 items then delete first 21.412 us/op 25.001 us/op 0.86
Set add up to 256 items then delete last 13.696 us/op 13.907 us/op 0.98
OrderedSet add up to 256 items then delete last 22.340 us/op 21.671 us/op 1.03
Set add up to 256 items then delete middle 13.881 us/op 14.049 us/op 0.99
OrderedSet add up to 256 items then delete middle 53.073 us/op 51.667 us/op 1.03
transfer serialized Status (84 B) 4.3560 us/op 3.1690 us/op 1.37
copy serialized Status (84 B) 2.1410 us/op 2.1490 us/op 1.00
transfer serialized SignedVoluntaryExit (112 B) 3.0390 us/op 3.5170 us/op 0.86
copy serialized SignedVoluntaryExit (112 B) 1.8660 us/op 2.3740 us/op 0.79
transfer serialized ProposerSlashing (416 B) 4.4500 us/op 3.7000 us/op 1.20
copy serialized ProposerSlashing (416 B) 2.4520 us/op 3.0320 us/op 0.81
transfer serialized Attestation (485 B) 3.4220 us/op 3.9840 us/op 0.86
copy serialized Attestation (485 B) 2.3300 us/op 3.2960 us/op 0.71
transfer serialized AttesterSlashing (33232 B) 3.3960 us/op 3.3230 us/op 1.02
copy serialized AttesterSlashing (33232 B) 6.1270 us/op 6.3130 us/op 0.97
transfer serialized Small SignedBeaconBlock (128000 B) 4.3460 us/op 4.0240 us/op 1.08
copy serialized Small SignedBeaconBlock (128000 B) 16.241 us/op 16.502 us/op 0.98
transfer serialized Avg SignedBeaconBlock (200000 B) 4.4780 us/op 4.7530 us/op 0.94
copy serialized Avg SignedBeaconBlock (200000 B) 25.271 us/op 25.252 us/op 1.00
transfer serialized BlobsSidecar (524380 B) 5.7000 us/op 5.4620 us/op 1.04
copy serialized BlobsSidecar (524380 B) 124.89 us/op 99.931 us/op 1.25
transfer serialized Big SignedBeaconBlock (1000000 B) 6.2830 us/op 5.5850 us/op 1.12
copy serialized Big SignedBeaconBlock (1000000 B) 157.68 us/op 142.74 us/op 1.10
pass gossip attestations to forkchoice per slot 2.9664 ms/op 3.2266 ms/op 0.92
forkChoice updateHead vc 100000 bc 64 eq 0 512.10 us/op 538.04 us/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 0 4.2034 ms/op 4.0431 ms/op 1.04
forkChoice updateHead vc 1000000 bc 64 eq 0 6.7630 ms/op 8.3073 ms/op 0.81
forkChoice updateHead vc 600000 bc 320 eq 0 3.4057 ms/op 3.3133 ms/op 1.03
forkChoice updateHead vc 600000 bc 1200 eq 0 3.2566 ms/op 3.5630 ms/op 0.91
forkChoice updateHead vc 600000 bc 7200 eq 0 3.8173 ms/op 4.1564 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 1000 11.267 ms/op 11.874 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 10000 11.318 ms/op 11.806 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 300000 22.101 ms/op 26.751 ms/op 0.83
computeDeltas 500000 validators 300 proto nodes 4.1866 ms/op 4.5420 ms/op 0.92
computeDeltas 500000 validators 1200 proto nodes 4.2145 ms/op 4.8641 ms/op 0.87
computeDeltas 500000 validators 7200 proto nodes 4.3692 ms/op 4.6855 ms/op 0.93
computeDeltas 750000 validators 300 proto nodes 6.1416 ms/op 6.9909 ms/op 0.88
computeDeltas 750000 validators 1200 proto nodes 6.7160 ms/op 7.1274 ms/op 0.94
computeDeltas 750000 validators 7200 proto nodes 6.3027 ms/op 7.9465 ms/op 0.79
computeDeltas 1400000 validators 300 proto nodes 11.612 ms/op 14.125 ms/op 0.82
computeDeltas 1400000 validators 1200 proto nodes 11.457 ms/op 13.885 ms/op 0.83
computeDeltas 1400000 validators 7200 proto nodes 11.471 ms/op 13.800 ms/op 0.83
computeDeltas 2100000 validators 300 proto nodes 17.198 ms/op 21.535 ms/op 0.80
computeDeltas 2100000 validators 1200 proto nodes 16.792 ms/op 21.035 ms/op 0.80
computeDeltas 2100000 validators 7200 proto nodes 17.192 ms/op 20.652 ms/op 0.83
altair processAttestation - 250000 vs - 7PWei normalcase 2.6481 ms/op 3.9248 ms/op 0.67
altair processAttestation - 250000 vs - 7PWei worstcase 3.0825 ms/op 4.5765 ms/op 0.67
altair processAttestation - setStatus - 1/6 committees join 132.23 us/op 153.54 us/op 0.86
altair processAttestation - setStatus - 1/3 committees join 252.08 us/op 358.16 us/op 0.70
altair processAttestation - setStatus - 1/2 committees join 339.95 us/op 441.23 us/op 0.77
altair processAttestation - setStatus - 2/3 committees join 447.11 us/op 559.47 us/op 0.80
altair processAttestation - setStatus - 4/5 committees join 631.00 us/op 751.02 us/op 0.84
altair processAttestation - setStatus - 100% committees join 756.34 us/op 906.25 us/op 0.83
altair processBlock - 250000 vs - 7PWei normalcase 5.5092 ms/op 13.110 ms/op 0.42
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.320 ms/op 41.690 ms/op 0.78
altair processBlock - 250000 vs - 7PWei worstcase 44.262 ms/op 48.082 ms/op 0.92
altair processBlock - 250000 vs - 7PWei worstcase hashState 93.716 ms/op 103.57 ms/op 0.90
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3493 ms/op 2.5054 ms/op 0.94
phase0 processBlock - 250000 vs - 7PWei worstcase 26.303 ms/op 34.332 ms/op 0.77
altair processEth1Data - 250000 vs - 7PWei normalcase 362.97 us/op 445.94 us/op 0.81
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.9940 us/op 10.862 us/op 0.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 43.686 us/op 37.165 us/op 1.18
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.2220 us/op 8.9230 us/op 0.92
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.1060 us/op 7.4640 us/op 0.82
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 141.00 us/op 133.45 us/op 1.06
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2470 ms/op 1.2176 ms/op 1.02
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7097 ms/op 1.6782 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6322 ms/op 1.7070 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9696 ms/op 3.6386 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.7528 ms/op 1.6527 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.1614 ms/op 3.9512 ms/op 1.05
Tree 40 250000 create 541.48 ms/op 667.23 ms/op 0.81
Tree 40 250000 get(125000) 146.44 ns/op 151.89 ns/op 0.96
Tree 40 250000 set(125000) 1.6705 us/op 2.1806 us/op 0.77
Tree 40 250000 toArray() 19.886 ms/op 23.363 ms/op 0.85
Tree 40 250000 iterate all - toArray() + loop 20.203 ms/op 22.281 ms/op 0.91
Tree 40 250000 iterate all - get(i) 57.527 ms/op 61.500 ms/op 0.94
Array 250000 create 3.4732 ms/op 2.7283 ms/op 1.27
Array 250000 clone - spread 1.4631 ms/op 1.7743 ms/op 0.82
Array 250000 get(125000) 0.42600 ns/op 0.44200 ns/op 0.96
Array 250000 set(125000) 0.45100 ns/op 0.46400 ns/op 0.97
Array 250000 iterate all - loop 106.27 us/op 90.977 us/op 1.17
phase0 afterProcessEpoch - 250000 vs - 7PWei 52.167 ms/op 53.415 ms/op 0.98
Array.fill - length 1000000 3.6696 ms/op 3.9781 ms/op 0.92
Array push - length 1000000 15.008 ms/op 23.420 ms/op 0.64
Array.get 0.28122 ns/op 0.30499 ns/op 0.92
Uint8Array.get 0.45058 ns/op 0.50245 ns/op 0.90
phase0 beforeProcessEpoch - 250000 vs - 7PWei 22.671 ms/op 19.290 ms/op 1.18
altair processEpoch - mainnet_e81889 340.11 ms/op 339.38 ms/op 1.00
mainnet_e81889 - altair beforeProcessEpoch 21.274 ms/op 21.263 ms/op 1.00
mainnet_e81889 - altair processJustificationAndFinalization 6.1920 us/op 7.6020 us/op 0.81
mainnet_e81889 - altair processInactivityUpdates 4.5142 ms/op 5.5452 ms/op 0.81
mainnet_e81889 - altair processRewardsAndPenalties 53.028 ms/op 45.916 ms/op 1.15
mainnet_e81889 - altair processRegistryUpdates 746.00 ns/op 765.00 ns/op 0.98
mainnet_e81889 - altair processSlashings 213.00 ns/op 204.00 ns/op 1.04
mainnet_e81889 - altair processEth1DataReset 182.00 ns/op 193.00 ns/op 0.94
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2735 ms/op 1.4059 ms/op 0.91
mainnet_e81889 - altair processSlashingsReset 1.1000 us/op 1.0950 us/op 1.00
mainnet_e81889 - altair processRandaoMixesReset 1.2490 us/op 1.3910 us/op 0.90
mainnet_e81889 - altair processHistoricalRootsUpdate 183.00 ns/op 216.00 ns/op 0.85
mainnet_e81889 - altair processParticipationFlagUpdates 546.00 ns/op 617.00 ns/op 0.88
mainnet_e81889 - altair processSyncCommitteeUpdates 149.00 ns/op 152.00 ns/op 0.98
mainnet_e81889 - altair afterProcessEpoch 53.889 ms/op 56.294 ms/op 0.96
capella processEpoch - mainnet_e217614 1.1756 s/op 1.2143 s/op 0.97
mainnet_e217614 - capella beforeProcessEpoch 78.278 ms/op 75.393 ms/op 1.04
mainnet_e217614 - capella processJustificationAndFinalization 6.4920 us/op 5.6880 us/op 1.14
mainnet_e217614 - capella processInactivityUpdates 19.340 ms/op 20.896 ms/op 0.93
mainnet_e217614 - capella processRewardsAndPenalties 211.71 ms/op 215.33 ms/op 0.98
mainnet_e217614 - capella processRegistryUpdates 8.2560 us/op 7.4780 us/op 1.10
mainnet_e217614 - capella processSlashings 191.00 ns/op 218.00 ns/op 0.88
mainnet_e217614 - capella processEth1DataReset 193.00 ns/op 229.00 ns/op 0.84
mainnet_e217614 - capella processEffectiveBalanceUpdates 16.027 ms/op 15.322 ms/op 1.05
mainnet_e217614 - capella processSlashingsReset 1.0200 us/op 1.0810 us/op 0.94
mainnet_e217614 - capella processRandaoMixesReset 1.4180 us/op 1.5310 us/op 0.93
mainnet_e217614 - capella processHistoricalRootsUpdate 189.00 ns/op 227.00 ns/op 0.83
mainnet_e217614 - capella processParticipationFlagUpdates 586.00 ns/op 623.00 ns/op 0.94
mainnet_e217614 - capella afterProcessEpoch 127.88 ms/op 136.64 ms/op 0.94
phase0 processEpoch - mainnet_e58758 343.01 ms/op 382.29 ms/op 0.90
mainnet_e58758 - phase0 beforeProcessEpoch 82.814 ms/op 100.66 ms/op 0.82
mainnet_e58758 - phase0 processJustificationAndFinalization 6.7920 us/op 6.3790 us/op 1.06
mainnet_e58758 - phase0 processRewardsAndPenalties 37.087 ms/op 43.186 ms/op 0.86
mainnet_e58758 - phase0 processRegistryUpdates 3.1830 us/op 4.7260 us/op 0.67
mainnet_e58758 - phase0 processSlashings 194.00 ns/op 237.00 ns/op 0.82
mainnet_e58758 - phase0 processEth1DataReset 178.00 ns/op 199.00 ns/op 0.89
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0821 ms/op 1.0944 ms/op 0.99
mainnet_e58758 - phase0 processSlashingsReset 1.2980 us/op 1.1710 us/op 1.11
mainnet_e58758 - phase0 processRandaoMixesReset 1.4100 us/op 1.6600 us/op 0.85
mainnet_e58758 - phase0 processHistoricalRootsUpdate 208.00 ns/op 213.00 ns/op 0.98
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.3620 us/op 1.0290 us/op 1.32
mainnet_e58758 - phase0 afterProcessEpoch 47.240 ms/op 46.878 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4085 ms/op 1.8465 ms/op 0.76
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1569 ms/op 3.6404 ms/op 0.59
altair processInactivityUpdates - 250000 normalcase 21.174 ms/op 21.586 ms/op 0.98
altair processInactivityUpdates - 250000 worstcase 20.480 ms/op 22.230 ms/op 0.92
phase0 processRegistryUpdates - 250000 normalcase 8.5480 us/op 8.2880 us/op 1.03
phase0 processRegistryUpdates - 250000 badcase_full_deposits 345.95 us/op 320.02 us/op 1.08
phase0 processRegistryUpdates - 250000 worstcase 0.5 117.23 ms/op 145.29 ms/op 0.81
altair processRewardsAndPenalties - 250000 normalcase 57.487 ms/op 41.945 ms/op 1.37
altair processRewardsAndPenalties - 250000 worstcase 54.735 ms/op 41.886 ms/op 1.31
phase0 getAttestationDeltas - 250000 normalcase 7.6705 ms/op 10.417 ms/op 0.74
phase0 getAttestationDeltas - 250000 worstcase 6.2443 ms/op 7.1468 ms/op 0.87
phase0 processSlashings - 250000 worstcase 97.493 us/op 99.946 us/op 0.98
altair processSyncCommitteeUpdates - 250000 126.84 ms/op 175.70 ms/op 0.72
BeaconState.hashTreeRoot - No change 228.00 ns/op 372.00 ns/op 0.61
BeaconState.hashTreeRoot - 1 full validator 80.097 us/op 120.95 us/op 0.66
BeaconState.hashTreeRoot - 32 full validator 917.21 us/op 2.2832 ms/op 0.40
BeaconState.hashTreeRoot - 512 full validator 10.056 ms/op 15.485 ms/op 0.65
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 92.462 us/op 129.49 us/op 0.71
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8063 ms/op 4.0527 ms/op 0.45
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 26.710 ms/op 39.055 ms/op 0.68
BeaconState.hashTreeRoot - 1 balances 88.425 us/op 120.45 us/op 0.73
BeaconState.hashTreeRoot - 32 balances 742.89 us/op 1.3268 ms/op 0.56
BeaconState.hashTreeRoot - 512 balances 7.8813 ms/op 12.784 ms/op 0.62
BeaconState.hashTreeRoot - 250000 balances 172.01 ms/op 267.95 ms/op 0.64
aggregationBits - 2048 els - zipIndexesInBitList 23.986 us/op 32.346 us/op 0.74
byteArrayEquals 32 56.050 ns/op 62.315 ns/op 0.90
Buffer.compare 32 18.170 ns/op 20.834 ns/op 0.87
byteArrayEquals 1024 1.6674 us/op 2.0681 us/op 0.81
Buffer.compare 1024 25.967 ns/op 30.609 ns/op 0.85
byteArrayEquals 16384 26.427 us/op 30.977 us/op 0.85
Buffer.compare 16384 198.14 ns/op 240.41 ns/op 0.82
byteArrayEquals 123687377 200.45 ms/op 260.56 ms/op 0.77
Buffer.compare 123687377 9.3318 ms/op 9.5263 ms/op 0.98
byteArrayEquals 32 - diff last byte 54.281 ns/op 58.602 ns/op 0.93
Buffer.compare 32 - diff last byte 17.490 ns/op 19.034 ns/op 0.92
byteArrayEquals 1024 - diff last byte 1.6408 us/op 1.8126 us/op 0.91
Buffer.compare 1024 - diff last byte 28.073 ns/op 28.663 ns/op 0.98
byteArrayEquals 16384 - diff last byte 26.557 us/op 28.658 us/op 0.93
Buffer.compare 16384 - diff last byte 210.66 ns/op 239.97 ns/op 0.88
byteArrayEquals 123687377 - diff last byte 209.66 ms/op 222.97 ms/op 0.94
Buffer.compare 123687377 - diff last byte 10.819 ms/op 8.4858 ms/op 1.27
byteArrayEquals 32 - random bytes 5.3070 ns/op 5.5540 ns/op 0.96
Buffer.compare 32 - random bytes 17.891 ns/op 19.299 ns/op 0.93
byteArrayEquals 1024 - random bytes 5.3110 ns/op 5.6060 ns/op 0.95
Buffer.compare 1024 - random bytes 17.708 ns/op 19.154 ns/op 0.92
byteArrayEquals 16384 - random bytes 5.2820 ns/op 5.6690 ns/op 0.93
Buffer.compare 16384 - random bytes 17.769 ns/op 19.693 ns/op 0.90
byteArrayEquals 123687377 - random bytes 6.6500 ns/op 7.3700 ns/op 0.90
Buffer.compare 123687377 - random bytes 19.300 ns/op 19.600 ns/op 0.98
regular array get 100000 times 34.721 us/op 43.054 us/op 0.81
wrappedArray get 100000 times 43.025 us/op 40.403 us/op 1.06
arrayWithProxy get 100000 times 13.406 ms/op 14.959 ms/op 0.90
ssz.Root.equals 48.201 ns/op 50.334 ns/op 0.96
byteArrayEquals 47.285 ns/op 49.336 ns/op 0.96
Buffer.compare 10.830 ns/op 11.555 ns/op 0.94
processSlot - 1 slots 11.656 us/op 12.006 us/op 0.97
processSlot - 32 slots 3.6436 ms/op 2.3248 ms/op 1.57
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 59.906 ms/op 55.309 ms/op 1.08
getCommitteeAssignments - req 1 vs - 250000 vc 2.3303 ms/op 2.4559 ms/op 0.95
getCommitteeAssignments - req 100 vs - 250000 vc 4.3627 ms/op 4.3482 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.7315 ms/op 5.0043 ms/op 0.95
findModifiedValidators - 10000 modified validators 994.59 ms/op 818.30 ms/op 1.22
findModifiedValidators - 1000 modified validators 802.63 ms/op 764.57 ms/op 1.05
findModifiedValidators - 100 modified validators 328.42 ms/op 257.08 ms/op 1.28
findModifiedValidators - 10 modified validators 154.49 ms/op 234.76 ms/op 0.66
findModifiedValidators - 1 modified validators 210.98 ms/op 243.30 ms/op 0.87
findModifiedValidators - no difference 210.77 ms/op 207.22 ms/op 1.02
compare ViewDUs 7.6132 s/op 7.5599 s/op 1.01
compare each validator Uint8Array 1.5737 s/op 2.2580 s/op 0.70
compare ViewDU to Uint8Array 1.1377 s/op 2.0600 s/op 0.55
migrate state 1000000 validators, 24 modified, 0 new 981.43 ms/op 1.4078 s/op 0.70
migrate state 1000000 validators, 1700 modified, 1000 new 1.2201 s/op 1.6639 s/op 0.73
migrate state 1000000 validators, 3400 modified, 2000 new 1.3481 s/op 1.5143 s/op 0.89
migrate state 1500000 validators, 24 modified, 0 new 928.30 ms/op 970.85 ms/op 0.96
migrate state 1500000 validators, 1700 modified, 1000 new 1.0766 s/op 1.1859 s/op 0.91
migrate state 1500000 validators, 3400 modified, 2000 new 1.3220 s/op 1.3427 s/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2900 ns/op 4.6100 ns/op 0.93
state getBlockRootAtSlot - 250000 vs - 7PWei 483.90 ns/op 572.74 ns/op 0.84
computeProposers - vc 250000 7.3138 ms/op 8.1377 ms/op 0.90
computeEpochShuffling - vc 250000 42.186 ms/op 44.949 ms/op 0.94
getNextSyncCommittee - vc 250000 118.77 ms/op 148.26 ms/op 0.80
computeSigningRoot for AttestationData 17.290 us/op 22.216 us/op 0.78
hash AttestationData serialized data then Buffer.toString(base64) 1.5555 us/op 1.5944 us/op 0.98
toHexString serialized data 857.30 ns/op 1.0830 us/op 0.79
Buffer.toString(base64) 168.61 ns/op 189.65 ns/op 0.89
nodejs block root to RootHex using toHex 153.18 ns/op 165.63 ns/op 0.92
nodejs block root to RootHex using toRootHex 92.362 ns/op 95.698 ns/op 0.97
browser block root to RootHex using the deprecated toHexString 210.06 ns/op 238.97 ns/op 0.88
browser block root to RootHex using toHex 170.30 ns/op 188.47 ns/op 0.90
browser block root to RootHex using toRootHex 158.26 ns/op 181.36 ns/op 0.87

by benchmarkbot/action

@ensi321 ensi321 changed the title feat: EIP-6110 deprecate eth1 data poll feat: eip-6110 deprecate eth1 data poll Jan 31, 2025
@twoeths
Copy link
Contributor

twoeths commented Feb 3, 2025

@ensi321 can you confirm we don't need this PR #7388 if pectra is released soon? it also based on EIP-4444 schedule

packages/beacon-node/src/chain/prepareNextSlot.ts Outdated Show resolved Hide resolved
packages/beacon-node/src/eth1/index.ts Outdated Show resolved Hide resolved
const finalizedCheckpoint = this.chain.forkChoice.getFinalizedCheckpoint();
const fork = this.config.getForkInfoAtEpoch(finalizedCheckpoint.epoch).name;

if (isForkPostElectra(fork)) {
Copy link
Member

Choose a reason for hiding this comment

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

can't we just check the fork based on current slot? it's good to only stop polling if finalized state is electra but I think we shouldn't even call getStateByCheckpoint if it's not even electra fork

Copy link
Contributor Author

@ensi321 ensi321 Feb 4, 2025

Choose a reason for hiding this comment

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

can't we just check the fork based on current slot?

Just checking slot based on clock is not enough. There is a short transition period in Electra where we still need to poll and process eth1 deposits. We can only stop polling when all the eth1 deposits in the queue have been processed

it's good to only stop polling if finalized state is electra but I think we shouldn't even call getStateByCheckpoint if it's not even electra fork

getFinalizedCheckpoint() is a simple call as fcStore.justified.checkpoint is always cached. We can add an additional electra fork check based on clock slot in L253 but this would only avoid calling getFinalizedCheckpoint() in deneb. But we ultimately need to check if finalized state is in Electra, and then further check if finalized state's eth1DepositIndex has reached a certain height in order to stop polling.

Copy link
Member

Choose a reason for hiding this comment

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

There is a short transition period in Electra where we still need to poll and process eth1 deposits

I know but at the earliest we would run the deposit index check if it's post-electra based on clock slot, and then we can load the state and check the index

@ensi321
Copy link
Contributor Author

ensi321 commented Feb 4, 2025

@ensi321 can you confirm we don't need this PR #7388 if pectra is released soon? it also based on EIP-4444 schedule

EIP-4881 is not part of pectra's scope. 4444 schedule is independent from Pectra release.

@twoeths
Copy link
Contributor

twoeths commented Feb 4, 2025

@ensi321 can you confirm we don't need this PR #7388 if pectra is released soon? it also based on EIP-4444 schedule

EIP-4881 is not part of pectra's scope. 4444 schedule is independent from Pectra release.

it's not about EIP inclusion, it's about stop eth1 data polling. I mean if Pectra is released soon with reasonable depositRequestsStartIndex, we don't need to maintain deposit root tree because all deposits come from EL, hence we don't need to work on EIP-4881

@ensi321
Copy link
Contributor Author

ensi321 commented Feb 4, 2025

@ensi321 can you confirm we don't need this PR #7388 if pectra is released soon? it also based on EIP-4444 schedule

EIP-4881 is not part of pectra's scope. 4444 schedule is independent from Pectra release.

it's not about EIP inclusion, it's about stop eth1 data polling. I mean if Pectra is released soon with reasonable depositRequestsStartIndex, we don't need to maintain deposit root tree because all deposits come from EL, hence we don't need to work on EIP-4881

Ah I see what you mean.

Yes, if the latest finalized checkpoint has no more new eth1 deposits processed, then the deposit contract snapshot is "frozen". At that point there is no need to maintain the repositories in #7388.

I even think at some point we can just hard code a DepositTreeSnapshot for the purpose of serving /eth/v1/beacon/deposit_snapshot

@philknows philknows mentioned this pull request Feb 5, 2025
12 tasks
Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

LGTM

@wemeetagain wemeetagain merged commit f8acf8b into unstable Feb 6, 2025
20 checks passed
@wemeetagain wemeetagain deleted the nc/eth1-poll branch February 6, 2025 19:18
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