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

fix: light client generating LightClientUpdate with wrong length of branches #7187

Merged
merged 8 commits into from
Nov 8, 2024

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Oct 22, 2024

Lodestar is generating new Electra LightClientUpdate but with merkle branches (nextSyncCommitteeBranch and finalityBranch) that have depth of altair.

#7063 missed updating several places of LC code including

  • getting correct sync committee roots and witnesses from electra BeaconState
  • not using the correct finalized root depth when validating LightClientFinalityUpdate
  • update SyncCommitteeWitnessRepository to support SyncCommitteeWitness with 5 witnesses

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 45.83333% with 13 lines in your changes missing coverage. Please review.

Project coverage is 49.08%. Comparing base (2e8b8bb) to head (8513f2e).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7187      +/-   ##
============================================
- Coverage     49.09%   49.08%   -0.01%     
============================================
  Files           600      600              
  Lines         40223    40241      +18     
  Branches       2098     2101       +3     
============================================
+ Hits          19746    19751       +5     
- Misses        20439    20452      +13     
  Partials         38       38              

Copy link
Contributor

github-actions bot commented Oct 22, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: f195019 Previous: 2e5265b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.7963 ms/op 1.9106 ms/op 0.94
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 37.902 us/op 45.485 us/op 0.83
BLS verify - blst 890.12 us/op 705.97 us/op 1.26
BLS verifyMultipleSignatures 3 - blst 1.3218 ms/op 1.1527 ms/op 1.15
BLS verifyMultipleSignatures 8 - blst 2.0428 ms/op 1.6375 ms/op 1.25
BLS verifyMultipleSignatures 32 - blst 4.4613 ms/op 4.7806 ms/op 0.93
BLS verifyMultipleSignatures 64 - blst 8.3327 ms/op 8.9230 ms/op 0.93
BLS verifyMultipleSignatures 128 - blst 15.882 ms/op 17.000 ms/op 0.93
BLS deserializing 10000 signatures 625.40 ms/op 674.17 ms/op 0.93
BLS deserializing 100000 signatures 6.1999 s/op 6.7303 s/op 0.92
BLS verifyMultipleSignatures - same message - 3 - blst 907.19 us/op 872.35 us/op 1.04
BLS verifyMultipleSignatures - same message - 8 - blst 1.0793 ms/op 1.0108 ms/op 1.07
BLS verifyMultipleSignatures - same message - 32 - blst 1.6839 ms/op 1.6781 ms/op 1.00
BLS verifyMultipleSignatures - same message - 64 - blst 2.5432 ms/op 2.5408 ms/op 1.00
BLS verifyMultipleSignatures - same message - 128 - blst 4.1503 ms/op 4.2463 ms/op 0.98
BLS aggregatePubkeys 32 - blst 17.716 us/op 19.073 us/op 0.93
BLS aggregatePubkeys 128 - blst 62.844 us/op 68.246 us/op 0.92
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 60.175 ms/op 63.527 ms/op 0.95
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 42.923 ms/op 47.301 ms/op 0.91
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 37.556 ms/op 36.716 ms/op 1.02
getSlashingsAndExits - default max 67.299 us/op 86.584 us/op 0.78
getSlashingsAndExits - 2k 236.75 us/op 256.36 us/op 0.92
proposeBlockBody type=full, size=empty 4.5837 ms/op 5.7276 ms/op 0.80
isKnown best case - 1 super set check 467.00 ns/op 273.00 ns/op 1.71
isKnown normal case - 2 super set checks 446.00 ns/op 267.00 ns/op 1.67
isKnown worse case - 16 super set checks 446.00 ns/op 271.00 ns/op 1.65
InMemoryCheckpointStateCache - add get delete 2.6240 us/op 2.9680 us/op 0.88
updateUnfinalizedPubkeys - updating 10 pubkeys 699.09 us/op 787.66 us/op 0.89
updateUnfinalizedPubkeys - updating 100 pubkeys 2.7065 ms/op 3.3386 ms/op 0.81
updateUnfinalizedPubkeys - updating 1000 pubkeys 37.871 ms/op 50.318 ms/op 0.75
validate api signedAggregateAndProof - struct 1.5122 ms/op 1.3548 ms/op 1.12
validate gossip signedAggregateAndProof - struct 1.5292 ms/op 1.3324 ms/op 1.15
batch validate gossip attestation - vc 640000 - chunk 32 118.59 us/op 120.77 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 64 104.22 us/op 111.30 us/op 0.94
batch validate gossip attestation - vc 640000 - chunk 128 95.866 us/op 107.82 us/op 0.89
batch validate gossip attestation - vc 640000 - chunk 256 94.794 us/op 101.30 us/op 0.94
pickEth1Vote - no votes 833.54 us/op 1.0309 ms/op 0.81
pickEth1Vote - max votes 5.3478 ms/op 6.0681 ms/op 0.88
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.051 ms/op 15.522 ms/op 0.97
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.004 ms/op 18.882 ms/op 1.01
pickEth1Vote - Eth1Data fastSerialize value x2048 337.94 us/op 460.93 us/op 0.73
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.3179 ms/op 4.1122 ms/op 0.81
bytes32 toHexString 574.00 ns/op 423.00 ns/op 1.36
bytes32 Buffer.toString(hex) 447.00 ns/op 248.00 ns/op 1.80
bytes32 Buffer.toString(hex) from Uint8Array 615.00 ns/op 377.00 ns/op 1.63
bytes32 Buffer.toString(hex) + 0x 463.00 ns/op 252.00 ns/op 1.84
Object access 1 prop 0.34000 ns/op 0.13900 ns/op 2.45
Map access 1 prop 0.32100 ns/op 0.13200 ns/op 2.43
Object get x1000 5.0010 ns/op 5.9270 ns/op 0.84
Map get x1000 5.5290 ns/op 6.2940 ns/op 0.88
Object set x1000 23.882 ns/op 31.695 ns/op 0.75
Map set x1000 18.909 ns/op 21.607 ns/op 0.88
Return object 10000 times 0.29620 ns/op 0.28240 ns/op 1.05
Throw Error 10000 times 2.7296 us/op 3.2823 us/op 0.83
toHex 108.42 ns/op 154.22 ns/op 0.70
Buffer.from 99.708 ns/op 136.88 ns/op 0.73
shared Buffer 75.751 ns/op 89.600 ns/op 0.85
fastMsgIdFn sha256 / 200 bytes 1.9720 us/op 2.1540 us/op 0.92
fastMsgIdFn h32 xxhash / 200 bytes 427.00 ns/op 220.00 ns/op 1.94
fastMsgIdFn h64 xxhash / 200 bytes 446.00 ns/op 255.00 ns/op 1.75
fastMsgIdFn sha256 / 1000 bytes 5.7680 us/op 7.0130 us/op 0.82
fastMsgIdFn h32 xxhash / 1000 bytes 520.00 ns/op 340.00 ns/op 1.53
fastMsgIdFn h64 xxhash / 1000 bytes 505.00 ns/op 334.00 ns/op 1.51
fastMsgIdFn sha256 / 10000 bytes 47.374 us/op 62.078 us/op 0.76
fastMsgIdFn h32 xxhash / 10000 bytes 1.8830 us/op 1.7240 us/op 1.09
fastMsgIdFn h64 xxhash / 10000 bytes 1.3150 us/op 1.1390 us/op 1.15
send data - 1000 256B messages 9.3868 ms/op 11.658 ms/op 0.81
send data - 1000 512B messages 12.597 ms/op 14.782 ms/op 0.85
send data - 1000 1024B messages 20.085 ms/op 24.380 ms/op 0.82
send data - 1000 1200B messages 23.118 ms/op 26.105 ms/op 0.89
send data - 1000 2048B messages 28.403 ms/op 30.605 ms/op 0.93
send data - 1000 4096B messages 28.207 ms/op 29.947 ms/op 0.94
send data - 1000 16384B messages 61.086 ms/op 70.462 ms/op 0.87
send data - 1000 65536B messages 237.63 ms/op 218.24 ms/op 1.09
enrSubnets - fastDeserialize 64 bits 1.1130 us/op 1.0890 us/op 1.02
enrSubnets - ssz BitVector 64 bits 506.00 ns/op 334.00 ns/op 1.51
enrSubnets - fastDeserialize 4 bits 326.00 ns/op 139.00 ns/op 2.35
enrSubnets - ssz BitVector 4 bits 510.00 ns/op 339.00 ns/op 1.50
prioritizePeers score -10:0 att 32-0.1 sync 2-0 125.19 us/op 147.69 us/op 0.85
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 158.84 us/op 148.65 us/op 1.07
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 267.92 us/op 242.20 us/op 1.11
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 404.59 us/op 400.56 us/op 1.01
prioritizePeers score 0:0 att 64-1 sync 4-1 561.46 us/op 609.90 us/op 0.92
array of 16000 items push then shift 1.2121 us/op 1.6177 us/op 0.75
LinkedList of 16000 items push then shift 7.1850 ns/op 6.9440 ns/op 1.03
array of 16000 items push then pop 82.840 ns/op 114.02 ns/op 0.73
LinkedList of 16000 items push then pop 6.2380 ns/op 6.8190 ns/op 0.91
array of 24000 items push then shift 1.7684 us/op 2.3857 us/op 0.74
LinkedList of 24000 items push then shift 6.3590 ns/op 6.9090 ns/op 0.92
array of 24000 items push then pop 107.08 ns/op 143.72 ns/op 0.75
LinkedList of 24000 items push then pop 6.3130 ns/op 6.7660 ns/op 0.93
intersect bitArray bitLen 8 5.3900 ns/op 6.2670 ns/op 0.86
intersect array and set length 8 39.601 ns/op 44.892 ns/op 0.88
intersect bitArray bitLen 128 26.370 ns/op 29.197 ns/op 0.90
intersect array and set length 128 577.97 ns/op 663.73 ns/op 0.87
bitArray.getTrueBitIndexes() bitLen 128 2.3190 us/op 2.0020 us/op 1.16
bitArray.getTrueBitIndexes() bitLen 248 2.9990 us/op 2.7880 us/op 1.08
bitArray.getTrueBitIndexes() bitLen 512 6.5640 us/op 5.8460 us/op 1.12
Buffer.concat 32 items 1.0250 us/op 879.00 ns/op 1.17
Uint8Array.set 32 items 1.6260 us/op 1.4300 us/op 1.14
Buffer.copy 1.7690 us/op 1.5040 us/op 1.18
Uint8Array.set - with subarray 2.3300 us/op 2.2250 us/op 1.05
Uint8Array.set - without subarray 1.6390 us/op 1.1940 us/op 1.37
getUint32 - dataview 392.00 ns/op 221.00 ns/op 1.77
getUint32 - manual 334.00 ns/op 141.00 ns/op 2.37
Set add up to 64 items then delete first 1.7678 us/op 2.0969 us/op 0.84
OrderedSet add up to 64 items then delete first 2.7321 us/op 3.1563 us/op 0.87
Set add up to 64 items then delete last 2.0160 us/op 2.4003 us/op 0.84
OrderedSet add up to 64 items then delete last 3.1328 us/op 3.7027 us/op 0.85
Set add up to 64 items then delete middle 2.0303 us/op 2.4462 us/op 0.83
OrderedSet add up to 64 items then delete middle 4.5139 us/op 5.0942 us/op 0.89
Set add up to 128 items then delete first 3.9176 us/op 4.8092 us/op 0.81
OrderedSet add up to 128 items then delete first 5.8582 us/op 6.9556 us/op 0.84
Set add up to 128 items then delete last 3.9021 us/op 4.8433 us/op 0.81
OrderedSet add up to 128 items then delete last 6.0906 us/op 7.3495 us/op 0.83
Set add up to 128 items then delete middle 3.8707 us/op 4.7519 us/op 0.81
OrderedSet add up to 128 items then delete middle 13.330 us/op 13.105 us/op 1.02
Set add up to 256 items then delete first 7.6473 us/op 9.6078 us/op 0.80
OrderedSet add up to 256 items then delete first 11.643 us/op 14.497 us/op 0.80
Set add up to 256 items then delete last 7.6575 us/op 9.5841 us/op 0.80
OrderedSet add up to 256 items then delete last 12.226 us/op 14.908 us/op 0.82
Set add up to 256 items then delete middle 7.5874 us/op 9.6047 us/op 0.79
OrderedSet add up to 256 items then delete middle 34.096 us/op 39.315 us/op 0.87
transfer serialized Status (84 B) 1.4430 us/op 1.3030 us/op 1.11
copy serialized Status (84 B) 1.2350 us/op 1.0450 us/op 1.18
transfer serialized SignedVoluntaryExit (112 B) 1.5800 us/op 1.3680 us/op 1.15
copy serialized SignedVoluntaryExit (112 B) 1.4200 us/op 1.0890 us/op 1.30
transfer serialized ProposerSlashing (416 B) 2.2480 us/op 1.5180 us/op 1.48
copy serialized ProposerSlashing (416 B) 1.9090 us/op 1.9620 us/op 0.97
transfer serialized Attestation (485 B) 2.2020 us/op 1.9460 us/op 1.13
copy serialized Attestation (485 B) 2.2190 us/op 2.0230 us/op 1.10
transfer serialized AttesterSlashing (33232 B) 2.3620 us/op 2.5760 us/op 0.92
copy serialized AttesterSlashing (33232 B) 4.7140 us/op 6.4090 us/op 0.74
transfer serialized Small SignedBeaconBlock (128000 B) 2.8480 us/op 2.5150 us/op 1.13
copy serialized Small SignedBeaconBlock (128000 B) 9.9740 us/op 17.015 us/op 0.59
transfer serialized Avg SignedBeaconBlock (200000 B) 3.3520 us/op 2.9040 us/op 1.15
copy serialized Avg SignedBeaconBlock (200000 B) 13.242 us/op 22.199 us/op 0.60
transfer serialized BlobsSidecar (524380 B) 3.0390 us/op 2.4650 us/op 1.23
copy serialized BlobsSidecar (524380 B) 69.175 us/op 203.84 us/op 0.34
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9000 us/op 2.8850 us/op 1.01
copy serialized Big SignedBeaconBlock (1000000 B) 125.49 us/op 148.46 us/op 0.85
pass gossip attestations to forkchoice per slot 2.3749 ms/op 2.7928 ms/op 0.85
forkChoice updateHead vc 100000 bc 64 eq 0 372.56 us/op 448.16 us/op 0.83
forkChoice updateHead vc 600000 bc 64 eq 0 2.4338 ms/op 2.6426 ms/op 0.92
forkChoice updateHead vc 1000000 bc 64 eq 0 3.9017 ms/op 4.7497 ms/op 0.82
forkChoice updateHead vc 600000 bc 320 eq 0 2.3057 ms/op 2.6412 ms/op 0.87
forkChoice updateHead vc 600000 bc 1200 eq 0 2.2781 ms/op 2.8108 ms/op 0.81
forkChoice updateHead vc 600000 bc 7200 eq 0 2.5262 ms/op 3.2127 ms/op 0.79
forkChoice updateHead vc 600000 bc 64 eq 1000 9.2143 ms/op 10.395 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 10000 9.1853 ms/op 10.067 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 300000 11.280 ms/op 13.382 ms/op 0.84
computeDeltas 500000 validators 300 proto nodes 3.1449 ms/op 3.8727 ms/op 0.81
computeDeltas 500000 validators 1200 proto nodes 3.2120 ms/op 3.9015 ms/op 0.82
computeDeltas 500000 validators 7200 proto nodes 3.3182 ms/op 3.8872 ms/op 0.85
computeDeltas 750000 validators 300 proto nodes 4.9121 ms/op 5.7349 ms/op 0.86
computeDeltas 750000 validators 1200 proto nodes 4.9633 ms/op 5.8157 ms/op 0.85
computeDeltas 750000 validators 7200 proto nodes 5.1111 ms/op 5.7781 ms/op 0.88
computeDeltas 1400000 validators 300 proto nodes 10.449 ms/op 10.917 ms/op 0.96
computeDeltas 1400000 validators 1200 proto nodes 9.0328 ms/op 10.892 ms/op 0.83
computeDeltas 1400000 validators 7200 proto nodes 9.1664 ms/op 10.921 ms/op 0.84
computeDeltas 2100000 validators 300 proto nodes 13.405 ms/op 16.200 ms/op 0.83
computeDeltas 2100000 validators 1200 proto nodes 13.922 ms/op 16.350 ms/op 0.85
computeDeltas 2100000 validators 7200 proto nodes 13.578 ms/op 16.332 ms/op 0.83
altair processAttestation - 250000 vs - 7PWei normalcase 1.3625 ms/op 1.8563 ms/op 0.73
altair processAttestation - 250000 vs - 7PWei worstcase 2.1076 ms/op 2.7594 ms/op 0.76
altair processAttestation - setStatus - 1/6 committees join 66.359 us/op 119.37 us/op 0.56
altair processAttestation - setStatus - 1/3 committees join 122.88 us/op 228.21 us/op 0.54
altair processAttestation - setStatus - 1/2 committees join 196.26 us/op 320.78 us/op 0.61
altair processAttestation - setStatus - 2/3 committees join 252.16 us/op 410.32 us/op 0.61
altair processAttestation - setStatus - 4/5 committees join 383.09 us/op 569.19 us/op 0.67
altair processAttestation - setStatus - 100% committees join 459.81 us/op 669.31 us/op 0.69
altair processBlock - 250000 vs - 7PWei normalcase 3.9503 ms/op 4.7251 ms/op 0.84
altair processBlock - 250000 vs - 7PWei normalcase hashState 21.227 ms/op 27.491 ms/op 0.77
altair processBlock - 250000 vs - 7PWei worstcase 32.236 ms/op 30.747 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase hashState 54.422 ms/op 68.855 ms/op 0.79
phase0 processBlock - 250000 vs - 7PWei normalcase 1.3603 ms/op 1.6138 ms/op 0.84
phase0 processBlock - 250000 vs - 7PWei worstcase 25.905 ms/op 19.414 ms/op 1.33
altair processEth1Data - 250000 vs - 7PWei normalcase 251.50 us/op 302.53 us/op 0.83
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.5950 us/op 4.8990 us/op 0.94
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 30.644 us/op 27.224 us/op 1.13
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.7540 us/op 8.5550 us/op 0.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.8200 us/op 5.0680 us/op 0.95
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 116.67 us/op 113.18 us/op 1.03
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 871.49 us/op 1.0894 ms/op 0.80
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1246 ms/op 1.4814 ms/op 0.76
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1412 ms/op 1.4673 ms/op 0.78
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.9797 ms/op 3.6411 ms/op 0.82
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1138 ms/op 1.5472 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9124 ms/op 3.6768 ms/op 0.79
Tree 40 250000 create 195.98 ms/op 219.15 ms/op 0.89
Tree 40 250000 get(125000) 115.88 ns/op 141.68 ns/op 0.82
Tree 40 250000 set(125000) 539.91 ns/op 642.25 ns/op 0.84
Tree 40 250000 toArray() 17.132 ms/op 14.920 ms/op 1.15
Tree 40 250000 iterate all - toArray() + loop 16.303 ms/op 14.649 ms/op 1.11
Tree 40 250000 iterate all - get(i) 45.383 ms/op 50.201 ms/op 0.90
Array 250000 create 2.4938 ms/op 2.7622 ms/op 0.90
Array 250000 clone - spread 1.2349 ms/op 1.4527 ms/op 0.85
Array 250000 get(125000) 0.58900 ns/op 0.41200 ns/op 1.43
Array 250000 set(125000) 0.58800 ns/op 0.43100 ns/op 1.36
Array 250000 iterate all - loop 76.342 us/op 81.256 us/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 41.148 ms/op 47.876 ms/op 0.86
Array.fill - length 1000000 2.5184 ms/op 3.5911 ms/op 0.70
Array push - length 1000000 14.871 ms/op 12.393 ms/op 1.20
Array.get 0.26793 ns/op 0.26163 ns/op 1.02
Uint8Array.get 0.34214 ns/op 0.41989 ns/op 0.81
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.814 ms/op 16.383 ms/op 0.84
altair processEpoch - mainnet_e81889 229.30 ms/op 280.43 ms/op 0.82
mainnet_e81889 - altair beforeProcessEpoch 18.278 ms/op 17.766 ms/op 1.03
mainnet_e81889 - altair processJustificationAndFinalization 11.464 us/op 12.112 us/op 0.95
mainnet_e81889 - altair processInactivityUpdates 4.7327 ms/op 5.0529 ms/op 0.94
mainnet_e81889 - altair processRewardsAndPenalties 49.359 ms/op 44.895 ms/op 1.10
mainnet_e81889 - altair processRegistryUpdates 1.6870 us/op 1.6090 us/op 1.05
mainnet_e81889 - altair processSlashings 818.00 ns/op 347.00 ns/op 2.36
mainnet_e81889 - altair processEth1DataReset 661.00 ns/op 306.00 ns/op 2.16
mainnet_e81889 - altair processEffectiveBalanceUpdates 989.03 us/op 1.9291 ms/op 0.51
mainnet_e81889 - altair processSlashingsReset 2.3510 us/op 2.7690 us/op 0.85
mainnet_e81889 - altair processRandaoMixesReset 2.6960 us/op 5.0280 us/op 0.54
mainnet_e81889 - altair processHistoricalRootsUpdate 708.00 ns/op 500.00 ns/op 1.42
mainnet_e81889 - altair processParticipationFlagUpdates 2.1460 us/op 2.0250 us/op 1.06
mainnet_e81889 - altair processSyncCommitteeUpdates 666.00 ns/op 430.00 ns/op 1.55
mainnet_e81889 - altair afterProcessEpoch 42.655 ms/op 49.775 ms/op 0.86
capella processEpoch - mainnet_e217614 1.0727 s/op 1.0315 s/op 1.04
mainnet_e217614 - capella beforeProcessEpoch 72.761 ms/op 72.849 ms/op 1.00
mainnet_e217614 - capella processJustificationAndFinalization 13.023 us/op 13.642 us/op 0.95
mainnet_e217614 - capella processInactivityUpdates 14.669 ms/op 16.665 ms/op 0.88
mainnet_e217614 - capella processRewardsAndPenalties 231.67 ms/op 222.56 ms/op 1.04
mainnet_e217614 - capella processRegistryUpdates 11.919 us/op 12.651 us/op 0.94
mainnet_e217614 - capella processSlashings 751.00 ns/op 366.00 ns/op 2.05
mainnet_e217614 - capella processEth1DataReset 815.00 ns/op 338.00 ns/op 2.41
mainnet_e217614 - capella processEffectiveBalanceUpdates 6.4186 ms/op 11.482 ms/op 0.56
mainnet_e217614 - capella processSlashingsReset 2.9960 us/op 3.3110 us/op 0.90
mainnet_e217614 - capella processRandaoMixesReset 3.6050 us/op 3.7910 us/op 0.95
mainnet_e217614 - capella processHistoricalRootsUpdate 755.00 ns/op 369.00 ns/op 2.05
mainnet_e217614 - capella processParticipationFlagUpdates 2.1140 us/op 2.0760 us/op 1.02
mainnet_e217614 - capella afterProcessEpoch 101.97 ms/op 121.22 ms/op 0.84
phase0 processEpoch - mainnet_e58758 265.10 ms/op 327.32 ms/op 0.81
mainnet_e58758 - phase0 beforeProcessEpoch 83.022 ms/op 66.395 ms/op 1.25
mainnet_e58758 - phase0 processJustificationAndFinalization 14.442 us/op 14.126 us/op 1.02
mainnet_e58758 - phase0 processRewardsAndPenalties 33.189 ms/op 29.650 ms/op 1.12
mainnet_e58758 - phase0 processRegistryUpdates 6.2870 us/op 6.7860 us/op 0.93
mainnet_e58758 - phase0 processSlashings 747.00 ns/op 399.00 ns/op 1.87
mainnet_e58758 - phase0 processEth1DataReset 776.00 ns/op 320.00 ns/op 2.42
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 883.40 us/op 1.7039 ms/op 0.52
mainnet_e58758 - phase0 processSlashingsReset 3.3820 us/op 2.9450 us/op 1.15
mainnet_e58758 - phase0 processRandaoMixesReset 8.5550 us/op 3.8560 us/op 2.22
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.0090 us/op 404.00 ns/op 2.50
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.4200 us/op 2.8540 us/op 1.55
mainnet_e58758 - phase0 afterProcessEpoch 37.055 ms/op 42.547 ms/op 0.87
phase0 processEffectiveBalanceUpdates - 250000 normalcase 999.77 us/op 1.8034 ms/op 0.55
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6995 ms/op 2.2071 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 19.117 ms/op 14.361 ms/op 1.33
altair processInactivityUpdates - 250000 worstcase 18.729 ms/op 14.474 ms/op 1.29
phase0 processRegistryUpdates - 250000 normalcase 7.6970 us/op 6.3980 us/op 1.20
phase0 processRegistryUpdates - 250000 badcase_full_deposits 315.91 us/op 238.07 us/op 1.33
phase0 processRegistryUpdates - 250000 worstcase 0.5 113.53 ms/op 121.30 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 39.439 ms/op 27.551 ms/op 1.43
altair processRewardsAndPenalties - 250000 worstcase 52.315 ms/op 37.436 ms/op 1.40
phase0 getAttestationDeltas - 250000 normalcase 6.6628 ms/op 7.4162 ms/op 0.90
phase0 getAttestationDeltas - 250000 worstcase 6.5117 ms/op 7.0716 ms/op 0.92
phase0 processSlashings - 250000 worstcase 100.60 us/op 78.678 us/op 1.28
altair processSyncCommitteeUpdates - 250000 110.17 ms/op 123.70 ms/op 0.89
BeaconState.hashTreeRoot - No change 580.00 ns/op 249.00 ns/op 2.33
BeaconState.hashTreeRoot - 1 full validator 81.294 us/op 111.51 us/op 0.73
BeaconState.hashTreeRoot - 32 full validator 824.48 us/op 1.1640 ms/op 0.71
BeaconState.hashTreeRoot - 512 full validator 8.1638 ms/op 9.7886 ms/op 0.83
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 110.02 us/op 152.31 us/op 0.72
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3890 ms/op 1.6681 ms/op 0.83
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 16.936 ms/op 22.163 ms/op 0.76
BeaconState.hashTreeRoot - 1 balances 72.162 us/op 110.13 us/op 0.66
BeaconState.hashTreeRoot - 32 balances 717.77 us/op 896.23 us/op 0.80
BeaconState.hashTreeRoot - 512 balances 6.2989 ms/op 7.7297 ms/op 0.81
BeaconState.hashTreeRoot - 250000 balances 147.68 ms/op 176.30 ms/op 0.84
aggregationBits - 2048 els - zipIndexesInBitList 22.075 us/op 23.091 us/op 0.96
byteArrayEquals 32 48.861 ns/op 57.192 ns/op 0.85
Buffer.compare 32 15.620 ns/op 17.055 ns/op 0.92
byteArrayEquals 1024 1.2796 us/op 1.5664 us/op 0.82
Buffer.compare 1024 23.386 ns/op 24.600 ns/op 0.95
byteArrayEquals 16384 20.284 us/op 24.935 us/op 0.81
Buffer.compare 16384 183.06 ns/op 186.09 ns/op 0.98
byteArrayEquals 123687377 149.34 ms/op 187.59 ms/op 0.80
Buffer.compare 123687377 4.8461 ms/op 6.4598 ms/op 0.75
byteArrayEquals 32 - diff last byte 47.044 ns/op 51.675 ns/op 0.91
Buffer.compare 32 - diff last byte 15.717 ns/op 16.848 ns/op 0.93
byteArrayEquals 1024 - diff last byte 1.2621 us/op 1.5551 us/op 0.81
Buffer.compare 1024 - diff last byte 23.114 ns/op 24.753 ns/op 0.93
byteArrayEquals 16384 - diff last byte 20.095 us/op 24.793 us/op 0.81
Buffer.compare 16384 - diff last byte 208.03 ns/op 192.31 ns/op 1.08
byteArrayEquals 123687377 - diff last byte 149.46 ms/op 191.89 ms/op 0.78
Buffer.compare 123687377 - diff last byte 6.6113 ms/op 6.4832 ms/op 1.02
byteArrayEquals 32 - random bytes 5.0200 ns/op 5.2490 ns/op 0.96
Buffer.compare 32 - random bytes 15.539 ns/op 17.655 ns/op 0.88
byteArrayEquals 1024 - random bytes 5.0440 ns/op 5.2360 ns/op 0.96
Buffer.compare 1024 - random bytes 15.180 ns/op 17.450 ns/op 0.87
byteArrayEquals 16384 - random bytes 4.8470 ns/op 5.1730 ns/op 0.94
Buffer.compare 16384 - random bytes 15.184 ns/op 17.337 ns/op 0.88
byteArrayEquals 123687377 - random bytes 7.9600 ns/op 6.4900 ns/op 1.23
Buffer.compare 123687377 - random bytes 18.080 ns/op 18.700 ns/op 0.97
regular array get 100000 times 30.822 us/op 43.104 us/op 0.72
wrappedArray get 100000 times 31.149 us/op 34.078 us/op 0.91
arrayWithProxy get 100000 times 10.349 ms/op 13.837 ms/op 0.75
ssz.Root.equals 43.539 ns/op 46.910 ns/op 0.93
byteArrayEquals 43.684 ns/op 46.231 ns/op 0.94
Buffer.compare 9.1050 ns/op 10.505 ns/op 0.87
processSlot - 1 slots 19.444 us/op 13.911 us/op 1.40
processSlot - 32 slots 3.4570 ms/op 2.6823 ms/op 1.29
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.959 ms/op 36.212 ms/op 1.05
getCommitteeAssignments - req 1 vs - 250000 vc 1.8078 ms/op 2.0609 ms/op 0.88
getCommitteeAssignments - req 100 vs - 250000 vc 3.5952 ms/op 3.9873 ms/op 0.90
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8282 ms/op 4.1699 ms/op 0.92
findModifiedValidators - 10000 modified validators 280.20 ms/op 226.75 ms/op 1.24
findModifiedValidators - 1000 modified validators 163.71 ms/op 164.65 ms/op 0.99
findModifiedValidators - 100 modified validators 140.10 ms/op 153.96 ms/op 0.91
findModifiedValidators - 10 modified validators 149.16 ms/op 152.26 ms/op 0.98
findModifiedValidators - 1 modified validators 132.29 ms/op 152.23 ms/op 0.87
findModifiedValidators - no difference 164.11 ms/op 168.35 ms/op 0.97
compare ViewDUs 3.1395 s/op 2.9207 s/op 1.07
compare each validator Uint8Array 1.5101 s/op 1.5692 s/op 0.96
compare ViewDU to Uint8Array 665.90 ms/op 1.0075 s/op 0.66
migrate state 1000000 validators, 24 modified, 0 new 681.45 ms/op 761.69 ms/op 0.89
migrate state 1000000 validators, 1700 modified, 1000 new 940.24 ms/op 961.73 ms/op 0.98
migrate state 1000000 validators, 3400 modified, 2000 new 1.0661 s/op 1.1539 s/op 0.92
migrate state 1500000 validators, 24 modified, 0 new 768.98 ms/op 717.28 ms/op 1.07
migrate state 1500000 validators, 1700 modified, 1000 new 927.41 ms/op 987.65 ms/op 0.94
migrate state 1500000 validators, 3400 modified, 2000 new 1.0806 s/op 1.1428 s/op 0.95
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.1700 ns/op 4.2800 ns/op 1.44
state getBlockRootAtSlot - 250000 vs - 7PWei 680.67 ns/op 716.59 ns/op 0.95
computeProposers - vc 250000 6.2746 ms/op 6.7528 ms/op 0.93
computeEpochShuffling - vc 250000 34.780 ms/op 40.061 ms/op 0.87
getNextSyncCommittee - vc 250000 107.73 ms/op 126.99 ms/op 0.85
computeSigningRoot for AttestationData 20.278 us/op 24.968 us/op 0.81
hash AttestationData serialized data then Buffer.toString(base64) 1.2224 us/op 1.5227 us/op 0.80
toHexString serialized data 800.78 ns/op 867.43 ns/op 0.92
Buffer.toString(base64) 159.60 ns/op 183.88 ns/op 0.87
nodejs block root to RootHex using toHex 119.40 ns/op 154.69 ns/op 0.77
nodejs block root to RootHex using toRootHex 80.094 ns/op 96.509 ns/op 0.83
browser block root to RootHex using the deprecated toHexString 212.69 ns/op 224.06 ns/op 0.95
browser block root to RootHex using toHex 165.94 ns/op 183.61 ns/op 0.90
browser block root to RootHex using toRootHex 149.04 ns/op 160.37 ns/op 0.93

by benchmarkbot/action

@ensi321 ensi321 mentioned this pull request Oct 23, 2024
12 tasks
@ensi321 ensi321 changed the title fix: light client not generating correct witness fix: light client generating LightClientUpdate with wrong length of branches Oct 23, 2024
@ensi321 ensi321 marked this pull request as ready for review October 24, 2024 00:01
@ensi321 ensi321 requested a review from a team as a code owner October 24, 2024 00:01
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

@nflaig nflaig merged commit 10d15dc into unstable Nov 8, 2024
20 checks passed
@nflaig nflaig deleted the nc/lc-fix branch November 8, 2024 08:04
nflaig added a commit that referenced this pull request Nov 8, 2024
… branches (#7187)

* initial commit

* Rewrite SyncCommitteeWitnessRepository

* Fix finality branch

* Update unit test

* fix e2e

* Review PR

---------

Co-authored-by: Nico Flaig <[email protected]>
nflaig added a commit that referenced this pull request Nov 8, 2024
… branches (#7187)

* initial commit

* Rewrite SyncCommitteeWitnessRepository

* Fix finality branch

* Update unit test

* fix e2e

* Review PR

---------

Co-authored-by: Nico Flaig <[email protected]>
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.23.0 🎉

wemeetagain added a commit that referenced this pull request Dec 20, 2024
* feat: add keymanager endpoint to retrieve proposer config (#7210)

* feat: add keymanager endpoint to retrieve proposer config

* Do not return empty builder config

* Check all builder proposer config values

* Fix settings builder config if undefined

* Fix builder config parsing

* Use ssz type to handle json serialization

Default parsing can't handle BigInt

* Revert "Use ssz type to handle json serialization"

This reverts commit 01fcea7.

* Fix boost factor json serialization

* Remove unused import

* Update test data

* Update proposer config test

* feat: add mekong network option (#7212)

* chore: fix import order with biome syntax (#7211)

Fix import order

* fix: consistently validate pubkey and throw 404 if not found (#7214)

* Throw error if pubkey is unknown when getting graffiti

* Consistently validate pubkey and throw 404 if not found

* fix: only return local keys from /eth/v1/keystores (#7215)

* fix: only return local keys from /eth/v1/keystores

* Fix fetching remote keys in node assertion

* feat: add and use getBlobsV1 to expedite gossip import (#7134)

* hookup the getblobs api to get bob and proof data from el

remove unused

fix import

metrics overhault, test, debugging testing, some feeback

fix

add nethermind bug dicussion link

fix

resolve conflicts

* deblobs timeout

* fix metric

* chore: revert async aggregate with randomness (#7218)

Revert "feat: asyncAggregateWithRandomness (#7204)"

This reverts commit e31d535.

* fix: update config for relaunched mekong network (#7220)

* fix: light client generating `LightClientUpdate` with wrong length of branches (#7187)

* initial commit

* Rewrite SyncCommitteeWitnessRepository

* Fix finality branch

* Update unit test

* fix e2e

* Review PR

---------

Co-authored-by: Nico Flaig <[email protected]>

* fix: archive finalized state when shutting down beacon node (#7221)

* Fix typo

* feat: remove unfinalized pubkey cache (#7230)

* Remove unfinalized pubkey cache

* lint

* Fix unit test

* chore: skip web3_provider unit tests (#7252)

* fix: prune checkpoint states at syncing time (#7241)

* fix: prune checkpoint states at syncing time

* fix: lint

* fix: check-types in test

* fix: sync cached isCompoundingValidatorArr at epoch transition (#7247)

* fix: handle outOfRangeData when range sync Deneb (#7249)

* fix: handle outOfRangeData for beaconBlocksMaybeBlobsByRange()

* fix: lint

* fix: archiveBlocks - handle deneb outOfRangeData block

* fix: sync cached balance when adding new validator to registry (#7255)

* fix: sync cached balance when adding new validator to registry

* chore: add more comments

* fix: remove persisted checkpoint states from the previous run at startup

* fix: do not throw error when trying to prune missing directory (#7257)

* docs: update documentation Oct 2024 (#7178)

* docs update oct 2024 init

* Reconfig quickstart nav and minor fixes

* fix lint

* spelling fixes

* minor fixes and add to wordlist

* prettier fix

* add to wordlist

* sort wordlist

* modify dominance to include lighthouse

* fix typescript casing and add recommendation

* add selection and boost_factor with keymanager notice

* update wordlist

* remove builder enabled and add keymanager api

* spelling

---------

Co-authored-by: Nico Flaig <[email protected]>

* chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /docs (#7268)

Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add error log to notifier if execution client auth failed (#7239)

* feat: add error log to notifier if execution client auth failed

* Update packages/beacon-node/src/node/notifier.ts

---------

Co-authored-by: NC <[email protected]>

* docs: display rcConfig flag on CLI reference page (#7270)

* docs: display rcConfig flag on CLI reference page

* Update word list

* chore: remove prettier as default formatter for all file types (#7275)

* chore: unhide flags relevant for devnets / testing (#7271)

* feat: debug too many shuffling promises (#7251)

* feat: add asyncShufflingCalculation to StateTransitionOpts

* feat: add asyncShufflingCalculation to all regen / processSlots consumers

* fix: default to false for async shuffling and remove unnecessary props

* fix: remove unnecessary flags from stateTransition

* feat: implement conditional build of shuffling for prepareNextSlot

* fix: spec test bug where shufflingCache is present from BeaconChain constructor

* feat: sync build next shuffling if not queued async

* fix: use getSync to pull next shuffling correctly

* docs: add comment to prepareNextSlot

* refactor: rename StateCloneOpts to StateRegenerationOpts

* feat: pass asyncShufflingCalculation through to afterProcessEpoch and refactor conditional to run purely sync

* docs: add issue number to comment

* chore: lint

* chore: unpin nodejs version from 22.4 (#6982)

* Revert "chore: pin nodejs version to 22.4 (#6964)"

This reverts commit f20484b.

* Don't revert formatting changes

---------

Co-authored-by: Nico Flaig <[email protected]>
Co-authored-by: Cayman <[email protected]>

* chore: update bootnodes file url for holesky and sepolia (#7276)

* feat: add `debug_getHistoricalSummaries` endpoint (#7245)

* feat: add new getHistoricalSummaries endpoint to debug namespace

* Add JSON response

* Restructure to use stateId and add proof to response

* add test scaffolding

* Address feedback

* Move getHistoricalSummaries to lodestar namespace

* add lodestar namespace unit test

* update route name to lodestar namespace

* cast state object as Capella state

* Lint

* json properties need to be lower case

* Make it v1 since it's now part of lodestar namespace

* Group with other /lodestar endpoints

* Simplify beacon node impl

* Rename return type

* Update test description

* Fix variable name

---------

Co-authored-by: Nico Flaig <[email protected]>

* chore: log sync committee signature errors as `error` (#7283)

* fix: update engine_getClientVersionV1 commit encoding (#7282)

* fix: check pubkey or validator index known to a state (#7284)

* fix: check pubkey or validator index known to a state

* chore: add more comments

* feat: lodestar script setup (#7254)

* feat: lodestar_setup

* feat: script_updates + docs

* feat: script_addition_in_docs + command_update

* Remove duplicate script from docs folder

* Minor script updates

* Update script to prepare docs and ignore copied file

* Update installation page

* Wording

---------

Co-authored-by: Nico Flaig <[email protected]>

* feat: add terminal-sized Electra giraffe banner (#7286)

* Create giraffeBanners.ts

* Wire in banner

* Fix file name

* lint

* Address @nflaig's comment

---------

Co-authored-by: NC <[email protected]>

* chore: pin nodejs version to 22.4 (#7291)

Revert "chore: unpin nodejs version from 22.4 (#6982)"

This reverts commit 69ae688.

* feat: expose `DOMAIN_APPLICATION_MASK` in config/spec api (#7296)

* feat: expose DOMAIN_APPLICATION_MASK in config/spec api

* Lint

* feat: make `MAX_REQUEST_BLOB_SIDECARS` and `MAX_BLOBS_PER_BLOCK` configurable (#7294)

* Init commit

* Fix check-types

* Add comment on how MAX_REQUEST_BLOB_SIDECARS is calculated

* Ensure proper config object is passed

* Address comment

---------

Co-authored-by: Nico Flaig <[email protected]>

* feat: use `BLOB_SIDECAR_SUBNET_COUNT` to configure blob subnets (#7297)

feat: use BLOB_SIDECAR_SUBNET_COUNT to configure blob subnets

* chore: log sync aggregate participants when producing beacon block body (#7300)

* chore: log sync aggregate participants when producing beacon block body

* Use isForkLightClient instead of ForkSeq

* Fix produce block unit tests

* chore: print graffiti when producing beacon block body (#7303)

* fix: warn if engine / builder failed to produce block within cutoff time (#7305)

* feat: add kzg commitment length check when validating gossip blocks (#7302)

* feat: add blob sidecar index check (#7313)

Validate blobSidecar index

* fix: fix blob sidecar index check (#7315)

Fix index check

* chore: fix format of printed graffiti from hex to utf-8 (#7306)

* chore: fix format of printed graffiti from hex to utf-8

* Use Buffer.from no copy with offset

* docs: batch commit typos and update contributor readme (#7312)

* batch commit typos and update contributor readme

* update donation text

Co-authored-by: Nico Flaig <[email protected]>

* correct spelling

Co-authored-by: Nico Flaig <[email protected]>

---------

Co-authored-by: Nico Flaig <[email protected]>

* chore: remove trailing null bytes from printed graffiti (#7320)

* chore: remove trailing null bytes from printed graffiti

* Use replaceAll instead of regex

* chore: unpin nodejs version from 22.4 (#7324)

Revert "chore: pin nodejs version to 22.4 (#7291)"

This reverts commit 99794d3.

* chore: bump package versions to 1.24.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Nico Flaig <[email protected]>
Co-authored-by: Nazar Hussain <[email protected]>
Co-authored-by: g11tech <[email protected]>
Co-authored-by: Matthew Keil <[email protected]>
Co-authored-by: NC <[email protected]>
Co-authored-by: twoeths <[email protected]>
Co-authored-by: Phil Ngo <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: acolytec3 <[email protected]>
Co-authored-by: Varun Guleria <[email protected]>
Co-authored-by: ClockworkYuzu <[email protected]>
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.24.0 🎉

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.

3 participants