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

Holesky rescue #7501

Draft
wants to merge 28 commits into
base: unstable
Choose a base branch
from
Draft

Holesky rescue #7501

wants to merge 28 commits into from

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Feb 26, 2025

See #7503

@nflaig nflaig added the status-do-not-merge Merging this issue will break the build. Do not merge! label Feb 26, 2025
Copy link
Contributor

github-actions bot commented Feb 26, 2025

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 7203403 Previous: 95e9b3e Ratio
altair processSyncCommitteeUpdates - 250000 10.516 ms/op 126.22 ms/op 0.08
computeProposers - vc 250000 581.93 us/op 7.6693 ms/op 0.08
getNextSyncCommittee - vc 250000 10.087 ms/op 116.08 ms/op 0.09
Full benchmark results
Benchmark suite Current: 7203403 Previous: 95e9b3e Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 930.42 us/op 829.11 us/op 1.12
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 35.798 us/op 35.980 us/op 0.99
BLS verify - blst 804.34 us/op 926.70 us/op 0.87
BLS verifyMultipleSignatures 3 - blst 1.1592 ms/op 1.3412 ms/op 0.86
BLS verifyMultipleSignatures 8 - blst 1.6258 ms/op 2.1511 ms/op 0.76
BLS verifyMultipleSignatures 32 - blst 4.8003 ms/op 4.5904 ms/op 1.05
BLS verifyMultipleSignatures 64 - blst 8.8836 ms/op 8.8695 ms/op 1.00
BLS verifyMultipleSignatures 128 - blst 17.024 ms/op 16.399 ms/op 1.04
BLS deserializing 10000 signatures 680.41 ms/op 637.35 ms/op 1.07
BLS deserializing 100000 signatures 6.5877 s/op 6.5026 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst 835.52 us/op 963.79 us/op 0.87
BLS verifyMultipleSignatures - same message - 8 - blst 1.0069 ms/op 1.1147 ms/op 0.90
BLS verifyMultipleSignatures - same message - 32 - blst 1.6410 ms/op 1.7471 ms/op 0.94
BLS verifyMultipleSignatures - same message - 64 - blst 2.4907 ms/op 2.6023 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst 4.1855 ms/op 4.2961 ms/op 0.97
BLS aggregatePubkeys 32 - blst 19.029 us/op 19.098 us/op 1.00
BLS aggregatePubkeys 128 - blst 68.440 us/op 66.650 us/op 1.03
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 49.994 ms/op 50.485 ms/op 0.99
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 42.200 ms/op 43.941 ms/op 0.96
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 33.971 ms/op 38.209 ms/op 0.89
getSlashingsAndExits - default max 71.962 us/op 55.300 us/op 1.30
getSlashingsAndExits - 2k 274.46 us/op 392.96 us/op 0.70
proposeBlockBody type=full, size=empty 4.6354 ms/op 5.6919 ms/op 0.81
isKnown best case - 1 super set check 196.00 ns/op 416.00 ns/op 0.47
isKnown normal case - 2 super set checks 197.00 ns/op 403.00 ns/op 0.49
isKnown worse case - 16 super set checks 197.00 ns/op 467.00 ns/op 0.42
InMemoryCheckpointStateCache - add get delete 2.2360 us/op 2.8090 us/op 0.80
validate api signedAggregateAndProof - struct 1.3343 ms/op 1.9868 ms/op 0.67
validate gossip signedAggregateAndProof - struct 1.3398 ms/op 1.8314 ms/op 0.73
batch validate gossip attestation - vc 640000 - chunk 32 116.02 us/op 120.23 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 64 102.17 us/op 102.81 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 128 93.506 us/op 102.22 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 256 96.996 us/op 101.56 us/op 0.96
pickEth1Vote - no votes 933.71 us/op 768.44 us/op 1.22
pickEth1Vote - max votes 5.6357 ms/op 6.6541 ms/op 0.85
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.504 ms/op 17.086 ms/op 0.97
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.248 ms/op 16.019 ms/op 1.14
pickEth1Vote - Eth1Data fastSerialize value x2048 417.30 us/op 360.00 us/op 1.16
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.1163 ms/op 2.1017 ms/op 1.96
bytes32 toHexString 346.00 ns/op 521.00 ns/op 0.66
bytes32 Buffer.toString(hex) 232.00 ns/op 424.00 ns/op 0.55
bytes32 Buffer.toString(hex) from Uint8Array 317.00 ns/op 511.00 ns/op 0.62
bytes32 Buffer.toString(hex) + 0x 232.00 ns/op 533.00 ns/op 0.44
Object access 1 prop 0.11700 ns/op 0.31600 ns/op 0.37
Map access 1 prop 0.12300 ns/op 0.32100 ns/op 0.38
Object get x1000 5.7390 ns/op 6.2190 ns/op 0.92
Map get x1000 6.3970 ns/op 6.7990 ns/op 0.94
Object set x1000 28.143 ns/op 27.000 ns/op 1.04
Map set x1000 18.896 ns/op 18.431 ns/op 1.03
Return object 10000 times 0.28260 ns/op 0.30180 ns/op 0.94
Throw Error 10000 times 4.1948 us/op 3.7355 us/op 1.12
toHex 134.12 ns/op 108.68 ns/op 1.23
Buffer.from 126.56 ns/op 95.239 ns/op 1.33
shared Buffer 77.564 ns/op 63.484 ns/op 1.22
fastMsgIdFn sha256 / 200 bytes 2.1480 us/op 2.3840 us/op 0.90
fastMsgIdFn h32 xxhash / 200 bytes 204.00 ns/op 441.00 ns/op 0.46
fastMsgIdFn h64 xxhash / 200 bytes 270.00 ns/op 494.00 ns/op 0.55
fastMsgIdFn sha256 / 1000 bytes 7.0440 us/op 5.8230 us/op 1.21
fastMsgIdFn h32 xxhash / 1000 bytes 328.00 ns/op 516.00 ns/op 0.64
fastMsgIdFn h64 xxhash / 1000 bytes 342.00 ns/op 530.00 ns/op 0.65
fastMsgIdFn sha256 / 10000 bytes 63.363 us/op 49.665 us/op 1.28
fastMsgIdFn h32 xxhash / 10000 bytes 1.8040 us/op 1.9590 us/op 0.92
fastMsgIdFn h64 xxhash / 10000 bytes 1.1980 us/op 1.3850 us/op 0.86
send data - 1000 256B messages 11.804 ms/op 14.468 ms/op 0.82
send data - 1000 512B messages 16.167 ms/op 19.876 ms/op 0.81
send data - 1000 1024B messages 23.273 ms/op 27.666 ms/op 0.84
send data - 1000 1200B messages 20.184 ms/op 22.753 ms/op 0.89
send data - 1000 2048B messages 23.072 ms/op 22.168 ms/op 1.04
send data - 1000 4096B messages 26.405 ms/op 27.262 ms/op 0.97
send data - 1000 16384B messages 64.057 ms/op 71.471 ms/op 0.90
send data - 1000 65536B messages 203.11 ms/op 319.95 ms/op 0.63
enrSubnets - fastDeserialize 64 bits 855.00 ns/op 1.2310 us/op 0.69
enrSubnets - ssz BitVector 64 bits 315.00 ns/op 514.00 ns/op 0.61
enrSubnets - fastDeserialize 4 bits 125.00 ns/op 340.00 ns/op 0.37
enrSubnets - ssz BitVector 4 bits 308.00 ns/op 511.00 ns/op 0.60
array of 16000 items push then shift 1.5824 us/op 1.3480 us/op 1.17
LinkedList of 16000 items push then shift 6.8780 ns/op 6.4530 ns/op 1.07
array of 16000 items push then pop 73.617 ns/op 84.678 ns/op 0.87
LinkedList of 16000 items push then pop 6.7990 ns/op 6.9110 ns/op 0.98
array of 24000 items push then shift 2.3433 us/op 1.9367 us/op 1.21
LinkedList of 24000 items push then shift 6.8820 ns/op 6.4930 ns/op 1.06
array of 24000 items push then pop 98.924 ns/op 93.347 ns/op 1.06
LinkedList of 24000 items push then pop 6.6740 ns/op 6.3170 ns/op 1.06
intersect bitArray bitLen 8 6.1940 ns/op 5.9620 ns/op 1.04
intersect array and set length 8 36.647 ns/op 33.548 ns/op 1.09
intersect bitArray bitLen 128 28.935 ns/op 36.343 ns/op 0.80
intersect array and set length 128 605.16 ns/op 556.73 ns/op 1.09
bitArray.getTrueBitIndexes() bitLen 128 993.00 ns/op 1.2560 us/op 0.79
bitArray.getTrueBitIndexes() bitLen 248 1.7640 us/op 1.9850 us/op 0.89
bitArray.getTrueBitIndexes() bitLen 512 3.5490 us/op 4.2740 us/op 0.83
Buffer.concat 32 items 594.00 ns/op 767.00 ns/op 0.77
Uint8Array.set 32 items 1.8430 us/op 1.1230 us/op 1.64
Buffer.copy 2.1460 us/op 2.1000 us/op 1.02
Uint8Array.set - with subarray 2.7870 us/op 2.0320 us/op 1.37
Uint8Array.set - without subarray 1.3760 us/op 1.1350 us/op 1.21
getUint32 - dataview 186.00 ns/op 387.00 ns/op 0.48
getUint32 - manual 116.00 ns/op 315.00 ns/op 0.37
Set add up to 64 items then delete first 1.9979 us/op 1.9452 us/op 1.03
OrderedSet add up to 64 items then delete first 3.2216 us/op 2.9994 us/op 1.07
Set add up to 64 items then delete last 2.2558 us/op 2.3396 us/op 0.96
OrderedSet add up to 64 items then delete last 3.4963 us/op 3.2412 us/op 1.08
Set add up to 64 items then delete middle 2.4204 us/op 2.0894 us/op 1.16
OrderedSet add up to 64 items then delete middle 5.2674 us/op 4.6342 us/op 1.14
Set add up to 128 items then delete first 4.8747 us/op 4.1728 us/op 1.17
OrderedSet add up to 128 items then delete first 7.6582 us/op 6.5266 us/op 1.17
Set add up to 128 items then delete last 4.8540 us/op 4.0679 us/op 1.19
OrderedSet add up to 128 items then delete last 7.3370 us/op 6.1436 us/op 1.19
Set add up to 128 items then delete middle 4.6760 us/op 4.0394 us/op 1.16
OrderedSet add up to 128 items then delete middle 13.340 us/op 14.092 us/op 0.95
Set add up to 256 items then delete first 10.155 us/op 8.1449 us/op 1.25
OrderedSet add up to 256 items then delete first 16.490 us/op 15.865 us/op 1.04
Set add up to 256 items then delete last 13.508 us/op 10.415 us/op 1.30
OrderedSet add up to 256 items then delete last 14.436 us/op 12.384 us/op 1.17
Set add up to 256 items then delete middle 9.3415 us/op 8.0379 us/op 1.16
OrderedSet add up to 256 items then delete middle 40.876 us/op 35.646 us/op 1.15
transfer serialized Status (84 B) 2.1390 us/op 2.9260 us/op 0.73
copy serialized Status (84 B) 1.1280 us/op 1.3320 us/op 0.85
transfer serialized SignedVoluntaryExit (112 B) 2.1510 us/op 2.2550 us/op 0.95
copy serialized SignedVoluntaryExit (112 B) 1.1840 us/op 1.7880 us/op 0.66
transfer serialized ProposerSlashing (416 B) 2.2010 us/op 2.8460 us/op 0.77
copy serialized ProposerSlashing (416 B) 1.2030 us/op 1.6580 us/op 0.73
transfer serialized Attestation (485 B) 2.6390 us/op 2.9210 us/op 0.90
copy serialized Attestation (485 B) 1.2220 us/op 1.8680 us/op 0.65
transfer serialized AttesterSlashing (33232 B) 2.4220 us/op 3.7400 us/op 0.65
copy serialized AttesterSlashing (33232 B) 3.3190 us/op 5.5490 us/op 0.60
transfer serialized Small SignedBeaconBlock (128000 B) 3.1000 us/op 3.9510 us/op 0.78
copy serialized Small SignedBeaconBlock (128000 B) 8.6640 us/op 14.874 us/op 0.58
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6450 us/op 4.0770 us/op 0.89
copy serialized Avg SignedBeaconBlock (200000 B) 12.963 us/op 22.732 us/op 0.57
transfer serialized BlobsSidecar (524380 B) 3.5690 us/op 6.0500 us/op 0.59
copy serialized BlobsSidecar (524380 B) 171.98 us/op 108.91 us/op 1.58
transfer serialized Big SignedBeaconBlock (1000000 B) 3.6340 us/op 5.7800 us/op 0.63
copy serialized Big SignedBeaconBlock (1000000 B) 111.29 us/op 135.76 us/op 0.82
pass gossip attestations to forkchoice per slot 2.6831 ms/op 3.3284 ms/op 0.81
forkChoice updateHead vc 100000 bc 64 eq 0 443.58 us/op 473.00 us/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 0 3.0634 ms/op 4.2810 ms/op 0.72
forkChoice updateHead vc 1000000 bc 64 eq 0 4.6508 ms/op 6.4892 ms/op 0.72
forkChoice updateHead vc 600000 bc 320 eq 0 2.7585 ms/op 3.4476 ms/op 0.80
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7708 ms/op 3.4567 ms/op 0.80
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5186 ms/op 2.4964 ms/op 1.41
forkChoice updateHead vc 600000 bc 64 eq 1000 10.330 ms/op 11.159 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 10000 10.280 ms/op 11.123 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 300000 14.049 ms/op 32.921 ms/op 0.43
computeDeltas 500000 validators 300 proto nodes 3.8110 ms/op 3.5932 ms/op 1.06
computeDeltas 500000 validators 1200 proto nodes 3.8211 ms/op 3.4220 ms/op 1.12
computeDeltas 500000 validators 7200 proto nodes 3.8314 ms/op 3.4330 ms/op 1.12
computeDeltas 750000 validators 300 proto nodes 5.6354 ms/op 5.5116 ms/op 1.02
computeDeltas 750000 validators 1200 proto nodes 5.6302 ms/op 5.4462 ms/op 1.03
computeDeltas 750000 validators 7200 proto nodes 5.6909 ms/op 5.3361 ms/op 1.07
computeDeltas 1400000 validators 300 proto nodes 10.490 ms/op 9.8381 ms/op 1.07
computeDeltas 1400000 validators 1200 proto nodes 10.519 ms/op 8.8543 ms/op 1.19
computeDeltas 1400000 validators 7200 proto nodes 10.642 ms/op 8.9611 ms/op 1.19
computeDeltas 2100000 validators 300 proto nodes 15.918 ms/op 14.120 ms/op 1.13
computeDeltas 2100000 validators 1200 proto nodes 16.099 ms/op 13.357 ms/op 1.21
computeDeltas 2100000 validators 7200 proto nodes 15.830 ms/op 13.429 ms/op 1.18
altair processAttestation - 250000 vs - 7PWei normalcase 1.9161 ms/op 1.7313 ms/op 1.11
altair processAttestation - 250000 vs - 7PWei worstcase 2.7929 ms/op 2.6257 ms/op 1.06
altair processAttestation - setStatus - 1/6 committees join 115.96 us/op 102.64 us/op 1.13
altair processAttestation - setStatus - 1/3 committees join 227.33 us/op 197.42 us/op 1.15
altair processAttestation - setStatus - 1/2 committees join 316.66 us/op 283.07 us/op 1.12
altair processAttestation - setStatus - 2/3 committees join 408.15 us/op 371.38 us/op 1.10
altair processAttestation - setStatus - 4/5 committees join 562.51 us/op 515.72 us/op 1.09
altair processAttestation - setStatus - 100% committees join 670.53 us/op 972.30 us/op 0.69
altair processBlock - 250000 vs - 7PWei normalcase 6.4777 ms/op 4.5844 ms/op 1.41
altair processBlock - 250000 vs - 7PWei normalcase hashState 36.855 ms/op 38.734 ms/op 0.95
altair processBlock - 250000 vs - 7PWei worstcase 34.822 ms/op 38.710 ms/op 0.90
altair processBlock - 250000 vs - 7PWei worstcase hashState 74.650 ms/op 96.391 ms/op 0.77
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6850 ms/op 1.8461 ms/op 0.91
phase0 processBlock - 250000 vs - 7PWei worstcase 20.478 ms/op 24.269 ms/op 0.84
altair processEth1Data - 250000 vs - 7PWei normalcase 358.60 us/op 300.46 us/op 1.19
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.3870 us/op 7.9290 us/op 0.55
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 24.792 us/op 29.752 us/op 0.83
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.8990 us/op 4.5910 us/op 1.72
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.5930 us/op 4.3220 us/op 1.06
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 102.90 us/op 99.831 us/op 1.03
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 934.53 us/op 903.66 us/op 1.03
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.3787 ms/op 1.7873 ms/op 0.77
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.3781 ms/op 1.1704 ms/op 1.18
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.9897 ms/op 2.7836 ms/op 1.07
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4323 ms/op 1.2056 ms/op 1.19
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.2252 ms/op 2.8456 ms/op 1.13
Tree 40 250000 create 412.50 ms/op 385.59 ms/op 1.07
Tree 40 250000 get(125000) 138.06 ns/op 116.99 ns/op 1.18
Tree 40 250000 set(125000) 1.4036 us/op 1.2561 us/op 1.12
Tree 40 250000 toArray() 16.751 ms/op 10.287 ms/op 1.63
Tree 40 250000 iterate all - toArray() + loop 16.067 ms/op 10.380 ms/op 1.55
Tree 40 250000 iterate all - get(i) 49.793 ms/op 44.175 ms/op 1.13
Array 250000 create 2.3213 ms/op 2.4402 ms/op 0.95
Array 250000 clone - spread 781.70 us/op 696.66 us/op 1.12
Array 250000 get(125000) 0.40800 ns/op 0.58700 ns/op 0.70
Array 250000 set(125000) 0.43300 ns/op 0.60300 ns/op 0.72
Array 250000 iterate all - loop 94.719 us/op 78.849 us/op 1.20
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.787 ms/op 42.171 ms/op 0.97
Array.fill - length 1000000 3.5160 ms/op 4.3264 ms/op 0.81
Array push - length 1000000 12.423 ms/op 17.362 ms/op 0.72
Array.get 0.26800 ns/op 0.26348 ns/op 1.02
Uint8Array.get 0.43119 ns/op 0.34962 ns/op 1.23
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.014 ms/op 13.493 ms/op 1.11
altair processEpoch - mainnet_e81889 267.36 ms/op 295.54 ms/op 0.90
mainnet_e81889 - altair beforeProcessEpoch 19.074 ms/op 24.378 ms/op 0.78
mainnet_e81889 - altair processJustificationAndFinalization 5.3390 us/op 6.0570 us/op 0.88
mainnet_e81889 - altair processInactivityUpdates 3.9918 ms/op 4.8935 ms/op 0.82
mainnet_e81889 - altair processRewardsAndPenalties 38.351 ms/op 48.142 ms/op 0.80
mainnet_e81889 - altair processRegistryUpdates 707.00 ns/op 1.1250 us/op 0.63
mainnet_e81889 - altair processSlashings 180.00 ns/op 451.00 ns/op 0.40
mainnet_e81889 - altair processEth1DataReset 174.00 ns/op 402.00 ns/op 0.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2386 ms/op 1.1616 ms/op 1.07
mainnet_e81889 - altair processSlashingsReset 844.00 ns/op 1.0480 us/op 0.81
mainnet_e81889 - altair processRandaoMixesReset 1.1030 us/op 1.4680 us/op 0.75
mainnet_e81889 - altair processHistoricalRootsUpdate 178.00 ns/op 419.00 ns/op 0.42
mainnet_e81889 - altair processParticipationFlagUpdates 509.00 ns/op 835.00 ns/op 0.61
mainnet_e81889 - altair processSyncCommitteeUpdates 140.00 ns/op 380.00 ns/op 0.37
mainnet_e81889 - altair afterProcessEpoch 43.047 ms/op 44.500 ms/op 0.97
capella processEpoch - mainnet_e217614 908.28 ms/op 813.05 ms/op 1.12
mainnet_e217614 - capella beforeProcessEpoch 67.464 ms/op 69.250 ms/op 0.97
mainnet_e217614 - capella processJustificationAndFinalization 5.2240 us/op 5.7830 us/op 0.90
mainnet_e217614 - capella processInactivityUpdates 15.689 ms/op 16.404 ms/op 0.96
mainnet_e217614 - capella processRewardsAndPenalties 182.06 ms/op 168.14 ms/op 1.08
mainnet_e217614 - capella processRegistryUpdates 6.4290 us/op 6.7890 us/op 0.95
mainnet_e217614 - capella processSlashings 179.00 ns/op 399.00 ns/op 0.45
mainnet_e217614 - capella processEth1DataReset 177.00 ns/op 396.00 ns/op 0.45
mainnet_e217614 - capella processEffectiveBalanceUpdates 9.6627 ms/op 4.9823 ms/op 1.94
mainnet_e217614 - capella processSlashingsReset 862.00 ns/op 1.2310 us/op 0.70
mainnet_e217614 - capella processRandaoMixesReset 1.1400 us/op 1.2430 us/op 0.92
mainnet_e217614 - capella processHistoricalRootsUpdate 181.00 ns/op 410.00 ns/op 0.44
mainnet_e217614 - capella processParticipationFlagUpdates 514.00 ns/op 707.00 ns/op 0.73
mainnet_e217614 - capella afterProcessEpoch 110.01 ms/op 106.58 ms/op 1.03
phase0 processEpoch - mainnet_e58758 290.25 ms/op 266.71 ms/op 1.09
mainnet_e58758 - phase0 beforeProcessEpoch 67.073 ms/op 77.135 ms/op 0.87
mainnet_e58758 - phase0 processJustificationAndFinalization 5.4460 us/op 5.7880 us/op 0.94
mainnet_e58758 - phase0 processRewardsAndPenalties 34.886 ms/op 36.138 ms/op 0.97
mainnet_e58758 - phase0 processRegistryUpdates 3.1090 us/op 2.8610 us/op 1.09
mainnet_e58758 - phase0 processSlashings 177.00 ns/op 483.00 ns/op 0.37
mainnet_e58758 - phase0 processEth1DataReset 174.00 ns/op 426.00 ns/op 0.41
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0197 ms/op 921.97 us/op 1.11
mainnet_e58758 - phase0 processSlashingsReset 883.00 ns/op 1.3290 us/op 0.66
mainnet_e58758 - phase0 processRandaoMixesReset 1.1570 us/op 1.6130 us/op 0.72
mainnet_e58758 - phase0 processHistoricalRootsUpdate 181.00 ns/op 501.00 ns/op 0.36
mainnet_e58758 - phase0 processParticipationRecordUpdates 844.00 ns/op 1.4830 us/op 0.57
mainnet_e58758 - phase0 afterProcessEpoch 35.348 ms/op 37.933 ms/op 0.93
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3031 ms/op 1.3948 ms/op 0.93
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9549 ms/op 1.4444 ms/op 1.35
altair processInactivityUpdates - 250000 normalcase 16.455 ms/op 17.537 ms/op 0.94
altair processInactivityUpdates - 250000 worstcase 17.364 ms/op 17.715 ms/op 0.98
phase0 processRegistryUpdates - 250000 normalcase 6.4470 us/op 6.0890 us/op 1.06
phase0 processRegistryUpdates - 250000 badcase_full_deposits 210.96 us/op 303.89 us/op 0.69
phase0 processRegistryUpdates - 250000 worstcase 0.5 94.354 ms/op 111.83 ms/op 0.84
altair processRewardsAndPenalties - 250000 normalcase 41.174 ms/op 42.795 ms/op 0.96
altair processRewardsAndPenalties - 250000 worstcase 38.849 ms/op 49.763 ms/op 0.78
phase0 getAttestationDeltas - 250000 normalcase 6.7776 ms/op 5.1189 ms/op 1.32
phase0 getAttestationDeltas - 250000 worstcase 5.8798 ms/op 5.1952 ms/op 1.13
phase0 processSlashings - 250000 worstcase 76.847 us/op 104.66 us/op 0.73
altair processSyncCommitteeUpdates - 250000 10.516 ms/op 126.22 ms/op 0.08
BeaconState.hashTreeRoot - No change 213.00 ns/op 515.00 ns/op 0.41
BeaconState.hashTreeRoot - 1 full validator 89.212 us/op 86.155 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 1.0919 ms/op 948.03 us/op 1.15
BeaconState.hashTreeRoot - 512 full validator 11.061 ms/op 12.739 ms/op 0.87
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 96.574 us/op 135.19 us/op 0.71
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4816 ms/op 1.6399 ms/op 0.90
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.936 ms/op 36.243 ms/op 0.49
BeaconState.hashTreeRoot - 1 balances 77.415 us/op 74.599 us/op 1.04
BeaconState.hashTreeRoot - 32 balances 976.05 us/op 1.0434 ms/op 0.94
BeaconState.hashTreeRoot - 512 balances 8.7779 ms/op 9.6954 ms/op 0.91
BeaconState.hashTreeRoot - 250000 balances 183.88 ms/op 216.54 ms/op 0.85
aggregationBits - 2048 els - zipIndexesInBitList 20.856 us/op 22.811 us/op 0.91
byteArrayEquals 32 52.205 ns/op 50.169 ns/op 1.04
Buffer.compare 32 16.713 ns/op 15.885 ns/op 1.05
byteArrayEquals 1024 1.5466 us/op 1.2940 us/op 1.20
Buffer.compare 1024 24.001 ns/op 24.054 ns/op 1.00
byteArrayEquals 16384 24.645 us/op 20.278 us/op 1.22
Buffer.compare 16384 175.10 ns/op 212.72 ns/op 0.82
byteArrayEquals 123687377 188.15 ms/op 156.13 ms/op 1.21
Buffer.compare 123687377 6.1385 ms/op 5.5388 ms/op 1.11
byteArrayEquals 32 - diff last byte 51.194 ns/op 48.724 ns/op 1.05
Buffer.compare 32 - diff last byte 16.785 ns/op 16.196 ns/op 1.04
byteArrayEquals 1024 - diff last byte 1.5473 us/op 1.3066 us/op 1.18
Buffer.compare 1024 - diff last byte 24.501 ns/op 24.646 ns/op 0.99
byteArrayEquals 16384 - diff last byte 24.622 us/op 20.994 us/op 1.17
Buffer.compare 16384 - diff last byte 188.38 ns/op 213.09 ns/op 0.88
byteArrayEquals 123687377 - diff last byte 186.14 ms/op 159.13 ms/op 1.17
Buffer.compare 123687377 - diff last byte 6.1572 ms/op 5.2756 ms/op 1.17
byteArrayEquals 32 - random bytes 4.9120 ns/op 4.9860 ns/op 0.99
Buffer.compare 32 - random bytes 16.465 ns/op 16.511 ns/op 1.00
byteArrayEquals 1024 - random bytes 4.9440 ns/op 5.0700 ns/op 0.98
Buffer.compare 1024 - random bytes 16.730 ns/op 16.283 ns/op 1.03
byteArrayEquals 16384 - random bytes 5.2950 ns/op 5.1740 ns/op 1.02
Buffer.compare 16384 - random bytes 16.466 ns/op 16.454 ns/op 1.00
byteArrayEquals 123687377 - random bytes 6.3200 ns/op 7.9000 ns/op 0.80
Buffer.compare 123687377 - random bytes 18.070 ns/op 18.320 ns/op 0.99
regular array get 100000 times 32.736 us/op 30.535 us/op 1.07
wrappedArray get 100000 times 40.287 us/op 31.354 us/op 1.28
arrayWithProxy get 100000 times 12.753 ms/op 10.578 ms/op 1.21
ssz.Root.equals 46.215 ns/op 44.749 ns/op 1.03
byteArrayEquals 45.378 ns/op 47.957 ns/op 0.95
Buffer.compare 10.336 ns/op 9.3600 ns/op 1.10
processSlot - 1 slots 10.335 us/op 9.1060 us/op 1.13
processSlot - 32 slots 2.2823 ms/op 3.4272 ms/op 0.67
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 52.583 ms/op 59.719 ms/op 0.88
getCommitteeAssignments - req 1 vs - 250000 vc 2.1303 ms/op 1.8605 ms/op 1.15
getCommitteeAssignments - req 100 vs - 250000 vc 3.9415 ms/op 3.6680 ms/op 1.07
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3247 ms/op 3.9007 ms/op 1.11
findModifiedValidators - 10000 modified validators 741.08 ms/op 799.29 ms/op 0.93
findModifiedValidators - 1000 modified validators 704.82 ms/op 717.05 ms/op 0.98
findModifiedValidators - 100 modified validators 241.59 ms/op 249.38 ms/op 0.97
findModifiedValidators - 10 modified validators 132.50 ms/op 155.79 ms/op 0.85
findModifiedValidators - 1 modified validators 168.74 ms/op 205.01 ms/op 0.82
findModifiedValidators - no difference 186.42 ms/op 174.87 ms/op 1.07
compare ViewDUs 6.0225 s/op 6.7516 s/op 0.89
compare each validator Uint8Array 1.5821 s/op 993.76 ms/op 1.59
compare ViewDU to Uint8Array 941.34 ms/op 742.85 ms/op 1.27
migrate state 1000000 validators, 24 modified, 0 new 848.45 ms/op 839.71 ms/op 1.01
migrate state 1000000 validators, 1700 modified, 1000 new 1.1061 s/op 1.1236 s/op 0.98
migrate state 1000000 validators, 3400 modified, 2000 new 1.1609 s/op 1.3252 s/op 0.88
migrate state 1500000 validators, 24 modified, 0 new 769.21 ms/op 927.88 ms/op 0.83
migrate state 1500000 validators, 1700 modified, 1000 new 972.84 ms/op 1.2265 s/op 0.79
migrate state 1500000 validators, 3400 modified, 2000 new 1.2489 s/op 1.4115 s/op 0.88
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6600 ns/op 5.9200 ns/op 0.79
state getBlockRootAtSlot - 250000 vs - 7PWei 585.53 ns/op 511.74 ns/op 1.14
naive computeProposerIndex 100000 validators 46.567 ms/op 55.488 ms/op 0.84
naiveGetNextSyncCommitteeIndices 1000 validators 7.1457 s/op 7.1205 s/op 1.00
naiveGetNextSyncCommitteeIndices 10000 validators 7.0930 s/op 7.0781 s/op 1.00
naiveGetNextSyncCommitteeIndices 100000 validators 7.2363 s/op 7.7732 s/op 0.93
naive computeShuffledIndex 100000 validators 23.773 s/op 25.335 s/op 0.94
cached computeShuffledIndex 100000 validators 526.03 ms/op 494.14 ms/op 1.06
naive computeShuffledIndex 2000000 validators 470.61 s/op 434.45 s/op 1.08
cached computeShuffledIndex 2000000 validators 28.673 s/op 28.250 s/op 1.01
computeProposers - vc 250000 581.93 us/op 7.6693 ms/op 0.08
computeEpochShuffling - vc 250000 40.629 ms/op 34.920 ms/op 1.16
getNextSyncCommittee - vc 250000 10.087 ms/op 116.08 ms/op 0.09
computeSigningRoot for AttestationData 27.610 us/op 16.439 us/op 1.68
hash AttestationData serialized data then Buffer.toString(base64) 1.5128 us/op 1.1611 us/op 1.30
toHexString serialized data 1.0547 us/op 928.35 ns/op 1.14
Buffer.toString(base64) 162.30 ns/op 108.66 ns/op 1.49
nodejs block root to RootHex using toHex 134.96 ns/op 103.09 ns/op 1.31
nodejs block root to RootHex using toRootHex 82.691 ns/op 66.553 ns/op 1.24
browser block root to RootHex using the deprecated toHexString 242.38 ns/op 183.86 ns/op 1.32
browser block root to RootHex using toHex 173.88 ns/op 151.90 ns/op 1.14
browser block root to RootHex using toRootHex 158.84 ns/op 145.94 ns/op 1.09

by benchmarkbot/action

nflaig and others added 2 commits February 26, 2025 12:16
**Motivation**

- @nflaig 's node was down due to OOM, could be because of processing a
bunch of AttesterSlashing
- in the past we used to have memory issue with it, see
#6112

**Description**

-  model AttesterSlashing without BigInt

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
@twoeths
Copy link
Contributor

twoeths commented Feb 27, 2025

@nflaig @matthewkeil just merged #7505

wemeetagain pushed a commit that referenced this pull request Mar 3, 2025
**Motivation**

- got this error on one of nodes running holesky-rescue #7501 branch
```
Error get or reload state epoch=115971, rootHex=0x2d58d27886354a292f7247215a84b1ed0a1a714465eca800df8dd2255275eb16 - Cannot get block root more than 8192 in the past
Error: Cannot get block root more than 8192 in the past
    at getBlockRootAtSlot (file:///usr/app/packages/state-transition/src/util/blockRoot.ts:24:11)
    at PersistentCheckpointStateCache.findSeedStateToReload (file:///usr/app/packages/beacon-node/src/chain/stateCache/persistentCheckpointsCache.ts:550:23)
    at PersistentCheckpointStateCache.getOrReload (file:///usr/app/packages/beacon-node/src/chain/stateCache/persistentCheckpointsCache.ts:182:28)
    at PersistentCheckpointStateCache.getOrReloadLatest (file:///usr/app/packages/beacon-node/src/chain/stateCache/persistentCheckpointsCache.ts:361:31)
    at StateRegenerator.getState (file:///usr/app/packages/beacon-node/src/chain/regen/regen.ts:186:11)
    at JobItemQueue.QueuedStateRegenerator.jobQueueProcessor [as itemProcessor] (file:///usr/app/packages/beacon-node/src/chain/regen/queued.ts:302:18)
    at JobItemQueue.runJob (file:///usr/app/packages/beacon-node/src/util/queue/itemQueue.ts:102:22)
```



**Description**

- when the state to reload is ~256 epochs in the past the
`getBlockRootAtSlot` will fail
- in that case, let's just catch the error and use the default
`seedBlockState` handled below

---------

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
wemeetagain and others added 4 commits March 3, 2025 18:49
**Motivation**

- we already have local checkpoint states in either db or file, this PR
use one of them to save syncing time the next time the node is restarted
- see
#7504 (comment)

**Description**

2 new init unfinalized state options:

- new `--lastPersistedCheckpointState`, true by default to load from the
last safe persisted checkpoint state. And the last safe persisted
checkpoint state is considered unfinalized
- use `--checkpointState` option: this is old option and support
finalized state only, this PR supports booting from unfinalized state
similar to `--lastPersistedCheckpointState` ==> to quickly sync a new
node, we can use this option. Then remove it and the next time node will
use `--lastPersistedCheckpointState` option by default
- we can configure one of our nodes with
`chain.nHistoricalStatesFileDataStore = true`
- then feed other nodes with a persisted "safe checkpoint state" from
there in `~/checkpoint_states` folder

- a persisted checkpoint state is consider to be safe to boot if
  - it should be the checkpoint state that's unique in its epoch
- its last processed block slot should be at epoch boundary or last slot
of previous epoch
   - state slot should be at epoch boundary
   - state slot should be equal to epoch * SLOTS_PER_EPOCH

other options to boot from `stateArchived` or `checkpointSyncUrl` are
considered finalized states including `wssCheckpoint`. It's not possible
to use `wssCheckpoint` option with unfinalized state for now.

**TODO**
- this is for `holesky-rescue`, consider supporting this for `unstable`
branch too
- update document in that case

---------

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
twoeths and others added 4 commits March 10, 2025 10:10
**Motivation**

- implement an api to get a node synced asap

**Description**

- new api: `eth/v1/lodestar/persisted_checkpoint_state` to return a
state based on an optional `rootHex:epoch` param
- if not specified, return the latest safe checkpoint state
- a node need to specify `--checkpointState` from the previous PR #7509

**Test**
- [x] `curl -H "Accept: application/octet-stream"
http://localhost:9596/eth/v1/lodestar/persisted_checkpoint_state -o
latest_checkpoint_state.ssz`
- [x] `curl -H "Accept: application/octet-stream"
http://localhost:9596/eth/v1/lodestar/persisted_checkpoint_state?checkpoint_id=0x4f4d4c1b81141fe77a4a1c6a376dbe64ed9baa8f123664195e4f710c9fc4238d:118936
-o state_epoch_118936.ssz`

---------

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
…ied (#7542)

We have added a new api in
#7541 to serve latest
checkpoint states. However the problem is that `--checkpointState` right
now assumes that we receive a ssz-serialized state bytes, so we also
need to ensure that the REST API only returns SSZ responses by applying
the correct Accept header.


This PR includes the following changes
- Ensure we only receive SSZ responses if REST API is queried
- Consider `--forceCheckpointSync` flag and if set always prioritze
remote checkpoint from `--checkpointState` over latest safe checkpoint
in db
- Minor tweaks to logs to make it easier to understand what the node is
doing
- Misc formatting changes
Fix a bug in gossip validation of electra attestations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status-do-not-merge Merging this issue will break the build. Do not merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants