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

Open
wants to merge 5 commits into
base: unstable
Choose a base branch
from

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.20%. Comparing base (0e4ea98) to head (547239b).
Report is 5 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7187      +/-   ##
============================================
- Coverage     49.21%   49.20%   -0.02%     
============================================
  Files           598      598              
  Lines         39794    39812      +18     
  Branches       2093     2100       +7     
============================================
+ Hits          19584    19588       +4     
- Misses        20170    20183      +13     
- Partials         40       41       +1     

Copy link
Contributor

github-actions bot commented Oct 22, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: f983c4a Previous: 748966b Ratio
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 4.9070 us/op 16.073 us/op 0.31
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 2.9870 us/op 10.691 us/op 0.28
Buffer.compare 123687377 5.5880 ms/op 20.442 ms/op 0.27
Full benchmark results
Benchmark suite Current: f983c4a Previous: 748966b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.7514 ms/op 2.1807 ms/op 0.80
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.096 us/op 66.746 us/op 0.59
BLS verify - blst 892.52 us/op 1.0183 ms/op 0.88
BLS verifyMultipleSignatures 3 - blst 1.2925 ms/op 1.3517 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst 2.0925 ms/op 1.9743 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst 4.4630 ms/op 5.8657 ms/op 0.76
BLS verifyMultipleSignatures 64 - blst 8.2878 ms/op 11.179 ms/op 0.74
BLS verifyMultipleSignatures 128 - blst 15.975 ms/op 18.512 ms/op 0.86
BLS deserializing 10000 signatures 627.63 ms/op 714.67 ms/op 0.88
BLS deserializing 100000 signatures 6.2836 s/op 7.0807 s/op 0.89
BLS verifyMultipleSignatures - same message - 3 - blst 985.68 us/op 1.1133 ms/op 0.89
BLS verifyMultipleSignatures - same message - 8 - blst 1.0814 ms/op 1.1348 ms/op 0.95
BLS verifyMultipleSignatures - same message - 32 - blst 1.7152 ms/op 2.0165 ms/op 0.85
BLS verifyMultipleSignatures - same message - 64 - blst 2.5670 ms/op 2.9738 ms/op 0.86
BLS verifyMultipleSignatures - same message - 128 - blst 4.2143 ms/op 4.9267 ms/op 0.86
BLS aggregatePubkeys 32 - blst 18.384 us/op 21.309 us/op 0.86
BLS aggregatePubkeys 128 - blst 63.492 us/op 71.333 us/op 0.89
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 58.531 ms/op 80.652 ms/op 0.73
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 47.638 ms/op 89.872 ms/op 0.53
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 35.533 ms/op 51.751 ms/op 0.69
getSlashingsAndExits - default max 63.094 us/op 137.18 us/op 0.46
getSlashingsAndExits - 2k 230.63 us/op 438.56 us/op 0.53
proposeBlockBody type=full, size=empty 4.6859 ms/op 9.7087 ms/op 0.48
isKnown best case - 1 super set check 459.00 ns/op 756.00 ns/op 0.61
isKnown normal case - 2 super set checks 447.00 ns/op 693.00 ns/op 0.65
isKnown worse case - 16 super set checks 446.00 ns/op 670.00 ns/op 0.67
InMemoryCheckpointStateCache - add get delete 2.6510 us/op 3.8390 us/op 0.69
updateUnfinalizedPubkeys - updating 10 pubkeys 753.34 us/op 2.0777 ms/op 0.36
updateUnfinalizedPubkeys - updating 100 pubkeys 3.3005 ms/op 5.8934 ms/op 0.56
updateUnfinalizedPubkeys - updating 1000 pubkeys 37.773 ms/op 66.025 ms/op 0.57
validate api signedAggregateAndProof - struct 1.5757 ms/op 1.8313 ms/op 0.86
validate gossip signedAggregateAndProof - struct 1.4395 ms/op 2.0381 ms/op 0.71
batch validate gossip attestation - vc 640000 - chunk 32 122.15 us/op 159.86 us/op 0.76
batch validate gossip attestation - vc 640000 - chunk 64 106.79 us/op 148.72 us/op 0.72
batch validate gossip attestation - vc 640000 - chunk 128 97.294 us/op 144.79 us/op 0.67
batch validate gossip attestation - vc 640000 - chunk 256 92.911 us/op 119.41 us/op 0.78
pickEth1Vote - no votes 786.78 us/op 1.1738 ms/op 0.67
pickEth1Vote - max votes 5.8003 ms/op 7.2901 ms/op 0.80
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.176 ms/op 13.906 ms/op 1.16
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.737 ms/op 21.547 ms/op 0.92
pickEth1Vote - Eth1Data fastSerialize value x2048 330.10 us/op 551.19 us/op 0.60
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.7383 ms/op 4.5870 ms/op 0.81
bytes32 toHexString 544.00 ns/op 626.00 ns/op 0.87
bytes32 Buffer.toString(hex) 413.00 ns/op 271.00 ns/op 1.52
bytes32 Buffer.toString(hex) from Uint8Array 526.00 ns/op 492.00 ns/op 1.07
bytes32 Buffer.toString(hex) + 0x 420.00 ns/op 273.00 ns/op 1.54
Object access 1 prop 0.30300 ns/op 0.20200 ns/op 1.50
Map access 1 prop 0.30500 ns/op 0.14800 ns/op 2.06
Object get x1000 4.8980 ns/op 6.2110 ns/op 0.79
Map get x1000 5.7580 ns/op 6.7660 ns/op 0.85
Object set x1000 22.264 ns/op 50.880 ns/op 0.44
Map set x1000 18.467 ns/op 39.200 ns/op 0.47
Return object 10000 times 0.28600 ns/op 0.32190 ns/op 0.89
Throw Error 10000 times 2.6025 us/op 3.5923 us/op 0.72
toHex 118.53 ns/op 193.15 ns/op 0.61
Buffer.from 102.35 ns/op 178.98 ns/op 0.57
shared Buffer 68.843 ns/op 105.48 ns/op 0.65
fastMsgIdFn sha256 / 200 bytes 1.9540 us/op 2.3280 us/op 0.84
fastMsgIdFn h32 xxhash / 200 bytes 404.00 ns/op 309.00 ns/op 1.31
fastMsgIdFn h64 xxhash / 200 bytes 441.00 ns/op 301.00 ns/op 1.47
fastMsgIdFn sha256 / 1000 bytes 5.7700 us/op 8.1220 us/op 0.71
fastMsgIdFn h32 xxhash / 1000 bytes 523.00 ns/op 449.00 ns/op 1.16
fastMsgIdFn h64 xxhash / 1000 bytes 511.00 ns/op 375.00 ns/op 1.36
fastMsgIdFn sha256 / 10000 bytes 49.236 us/op 67.234 us/op 0.73
fastMsgIdFn h32 xxhash / 10000 bytes 1.8900 us/op 2.0170 us/op 0.94
fastMsgIdFn h64 xxhash / 10000 bytes 1.3130 us/op 1.2880 us/op 1.02
send data - 1000 256B messages 9.7461 ms/op 15.344 ms/op 0.64
send data - 1000 512B messages 13.724 ms/op 20.582 ms/op 0.67
send data - 1000 1024B messages 20.398 ms/op 32.342 ms/op 0.63
send data - 1000 1200B messages 23.961 ms/op 33.462 ms/op 0.72
send data - 1000 2048B messages 28.881 ms/op 36.554 ms/op 0.79
send data - 1000 4096B messages 27.287 ms/op 38.245 ms/op 0.71
send data - 1000 16384B messages 61.753 ms/op 86.273 ms/op 0.72
send data - 1000 65536B messages 248.36 ms/op 264.66 ms/op 0.94
enrSubnets - fastDeserialize 64 bits 1.0420 us/op 1.3530 us/op 0.77
enrSubnets - ssz BitVector 64 bits 500.00 ns/op 450.00 ns/op 1.11
enrSubnets - fastDeserialize 4 bits 320.00 ns/op 204.00 ns/op 1.57
enrSubnets - ssz BitVector 4 bits 505.00 ns/op 459.00 ns/op 1.10
prioritizePeers score -10:0 att 32-0.1 sync 2-0 122.74 us/op 206.53 us/op 0.59
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 152.79 us/op 200.93 us/op 0.76
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 335.97 us/op 387.57 us/op 0.87
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 573.10 us/op 541.87 us/op 1.06
prioritizePeers score 0:0 att 64-1 sync 4-1 649.42 us/op 1.0134 ms/op 0.64
array of 16000 items push then shift 1.2253 us/op 1.9130 us/op 0.64
LinkedList of 16000 items push then shift 7.3470 ns/op 8.1230 ns/op 0.90
array of 16000 items push then pop 84.006 ns/op 143.62 ns/op 0.58
LinkedList of 16000 items push then pop 6.2770 ns/op 7.6180 ns/op 0.82
array of 24000 items push then shift 1.7752 us/op 2.5118 us/op 0.71
LinkedList of 24000 items push then shift 6.7600 ns/op 8.6250 ns/op 0.78
array of 24000 items push then pop 110.65 ns/op 177.63 ns/op 0.62
LinkedList of 24000 items push then pop 6.1090 ns/op 8.2970 ns/op 0.74
intersect bitArray bitLen 8 5.3600 ns/op 6.9650 ns/op 0.77
intersect array and set length 8 36.172 ns/op 61.859 ns/op 0.58
intersect bitArray bitLen 128 25.536 ns/op 31.004 ns/op 0.82
intersect array and set length 128 545.36 ns/op 837.44 ns/op 0.65
bitArray.getTrueBitIndexes() bitLen 128 2.0030 us/op 2.3160 us/op 0.86
bitArray.getTrueBitIndexes() bitLen 248 3.7930 us/op 4.4540 us/op 0.85
bitArray.getTrueBitIndexes() bitLen 512 7.2510 us/op 8.4700 us/op 0.86
Buffer.concat 32 items 999.00 ns/op 986.00 ns/op 1.01
Uint8Array.set 32 items 1.5680 us/op 1.6600 us/op 0.94
Buffer.copy 1.7140 us/op 1.9870 us/op 0.86
Uint8Array.set - with subarray 2.1970 us/op 3.2040 us/op 0.69
Uint8Array.set - without subarray 1.7010 us/op 1.7080 us/op 1.00
getUint32 - dataview 401.00 ns/op 304.00 ns/op 1.32
getUint32 - manual 335.00 ns/op 219.00 ns/op 1.53
Set add up to 64 items then delete first 1.7914 us/op 2.5193 us/op 0.71
OrderedSet add up to 64 items then delete first 2.7954 us/op 4.1617 us/op 0.67
Set add up to 64 items then delete last 1.9185 us/op 3.1986 us/op 0.60
OrderedSet add up to 64 items then delete last 3.0182 us/op 4.3760 us/op 0.69
Set add up to 64 items then delete middle 1.9377 us/op 2.6464 us/op 0.73
OrderedSet add up to 64 items then delete middle 4.3651 us/op 6.0279 us/op 0.72
Set add up to 128 items then delete first 3.7357 us/op 5.3519 us/op 0.70
OrderedSet add up to 128 items then delete first 5.6550 us/op 10.577 us/op 0.53
Set add up to 128 items then delete last 3.8065 us/op 5.5222 us/op 0.69
OrderedSet add up to 128 items then delete last 5.9876 us/op 8.3033 us/op 0.72
Set add up to 128 items then delete middle 3.7106 us/op 6.4714 us/op 0.57
OrderedSet add up to 128 items then delete middle 11.110 us/op 18.652 us/op 0.60
Set add up to 256 items then delete first 7.3348 us/op 13.138 us/op 0.56
OrderedSet add up to 256 items then delete first 11.335 us/op 21.447 us/op 0.53
Set add up to 256 items then delete last 7.3738 us/op 11.174 us/op 0.66
OrderedSet add up to 256 items then delete last 11.784 us/op 16.175 us/op 0.73
Set add up to 256 items then delete middle 7.3126 us/op 10.177 us/op 0.72
OrderedSet add up to 256 items then delete middle 33.299 us/op 47.018 us/op 0.71
transfer serialized Status (84 B) 1.4240 us/op 1.5220 us/op 0.94
copy serialized Status (84 B) 1.2280 us/op 1.3250 us/op 0.93
transfer serialized SignedVoluntaryExit (112 B) 1.6170 us/op 1.5040 us/op 1.08
copy serialized SignedVoluntaryExit (112 B) 1.2960 us/op 1.2540 us/op 1.03
transfer serialized ProposerSlashing (416 B) 1.9730 us/op 2.3620 us/op 0.84
copy serialized ProposerSlashing (416 B) 1.9940 us/op 2.0220 us/op 0.99
transfer serialized Attestation (485 B) 2.3240 us/op 1.7890 us/op 1.30
copy serialized Attestation (485 B) 1.9620 us/op 1.7560 us/op 1.12
transfer serialized AttesterSlashing (33232 B) 2.3030 us/op 1.8630 us/op 1.24
copy serialized AttesterSlashing (33232 B) 4.8880 us/op 5.9160 us/op 0.83
transfer serialized Small SignedBeaconBlock (128000 B) 2.6310 us/op 2.7500 us/op 0.96
copy serialized Small SignedBeaconBlock (128000 B) 9.8980 us/op 21.094 us/op 0.47
transfer serialized Avg SignedBeaconBlock (200000 B) 3.3230 us/op 3.3590 us/op 0.99
copy serialized Avg SignedBeaconBlock (200000 B) 12.908 us/op 33.204 us/op 0.39
transfer serialized BlobsSidecar (524380 B) 3.1770 us/op 3.7570 us/op 0.85
copy serialized BlobsSidecar (524380 B) 67.278 us/op 129.31 us/op 0.52
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2530 us/op 3.9660 us/op 0.82
copy serialized Big SignedBeaconBlock (1000000 B) 124.53 us/op 297.07 us/op 0.42
pass gossip attestations to forkchoice per slot 2.4180 ms/op 3.1079 ms/op 0.78
forkChoice updateHead vc 100000 bc 64 eq 0 364.04 us/op 465.96 us/op 0.78
forkChoice updateHead vc 600000 bc 64 eq 0 2.1783 ms/op 3.0337 ms/op 0.72
forkChoice updateHead vc 1000000 bc 64 eq 0 3.6716 ms/op 5.0290 ms/op 0.73
forkChoice updateHead vc 600000 bc 320 eq 0 2.1318 ms/op 2.9222 ms/op 0.73
forkChoice updateHead vc 600000 bc 1200 eq 0 2.1345 ms/op 2.9764 ms/op 0.72
forkChoice updateHead vc 600000 bc 7200 eq 0 2.3903 ms/op 4.5130 ms/op 0.53
forkChoice updateHead vc 600000 bc 64 eq 1000 8.9421 ms/op 10.741 ms/op 0.83
forkChoice updateHead vc 600000 bc 64 eq 10000 9.2810 ms/op 10.910 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 300000 11.330 ms/op 14.765 ms/op 0.77
computeDeltas 500000 validators 300 proto nodes 3.1476 ms/op 4.4766 ms/op 0.70
computeDeltas 500000 validators 1200 proto nodes 3.1068 ms/op 4.3498 ms/op 0.71
computeDeltas 500000 validators 7200 proto nodes 3.1292 ms/op 4.2661 ms/op 0.73
computeDeltas 750000 validators 300 proto nodes 4.7035 ms/op 6.4602 ms/op 0.73
computeDeltas 750000 validators 1200 proto nodes 4.6823 ms/op 6.6890 ms/op 0.70
computeDeltas 750000 validators 7200 proto nodes 4.7041 ms/op 6.5004 ms/op 0.72
computeDeltas 1400000 validators 300 proto nodes 8.8320 ms/op 11.826 ms/op 0.75
computeDeltas 1400000 validators 1200 proto nodes 8.7529 ms/op 13.720 ms/op 0.64
computeDeltas 1400000 validators 7200 proto nodes 8.9920 ms/op 12.279 ms/op 0.73
computeDeltas 2100000 validators 300 proto nodes 13.708 ms/op 20.941 ms/op 0.65
computeDeltas 2100000 validators 1200 proto nodes 13.017 ms/op 24.485 ms/op 0.53
computeDeltas 2100000 validators 7200 proto nodes 13.360 ms/op 26.195 ms/op 0.51
altair processAttestation - 250000 vs - 7PWei normalcase 1.4602 ms/op 4.0004 ms/op 0.37
altair processAttestation - 250000 vs - 7PWei worstcase 2.1026 ms/op 5.3793 ms/op 0.39
altair processAttestation - setStatus - 1/6 committees join 61.229 us/op 175.69 us/op 0.35
altair processAttestation - setStatus - 1/3 committees join 139.15 us/op 405.87 us/op 0.34
altair processAttestation - setStatus - 1/2 committees join 198.67 us/op 362.80 us/op 0.55
altair processAttestation - setStatus - 2/3 committees join 266.02 us/op 385.46 us/op 0.69
altair processAttestation - setStatus - 4/5 committees join 387.83 us/op 551.97 us/op 0.70
altair processAttestation - setStatus - 100% committees join 445.44 us/op 642.47 us/op 0.69
altair processBlock - 250000 vs - 7PWei normalcase 3.3764 ms/op 6.1016 ms/op 0.55
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.760 ms/op 31.131 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase 38.393 ms/op 42.616 ms/op 0.90
altair processBlock - 250000 vs - 7PWei worstcase hashState 72.610 ms/op 83.015 ms/op 0.87
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6605 ms/op 3.1487 ms/op 0.53
phase0 processBlock - 250000 vs - 7PWei worstcase 23.598 ms/op 29.216 ms/op 0.81
altair processEth1Data - 250000 vs - 7PWei normalcase 263.19 us/op 449.73 us/op 0.59
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.4140 us/op 9.5290 us/op 0.46
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 26.970 us/op 49.119 us/op 0.55
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 4.9070 us/op 16.073 us/op 0.31
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 2.9870 us/op 10.691 us/op 0.28
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 129.81 us/op 192.39 us/op 0.67
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4428 ms/op 1.3502 ms/op 1.07
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1344 ms/op 1.6194 ms/op 0.70
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.0941 ms/op 2.0316 ms/op 0.54
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.9001 ms/op 6.4913 ms/op 0.45
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1886 ms/op 2.4245 ms/op 0.49
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9406 ms/op 4.0445 ms/op 0.73
Tree 40 250000 create 183.27 ms/op 279.96 ms/op 0.65
Tree 40 250000 get(125000) 109.53 ns/op 166.81 ns/op 0.66
Tree 40 250000 set(125000) 520.11 ns/op 769.36 ns/op 0.68
Tree 40 250000 toArray() 12.352 ms/op 21.708 ms/op 0.57
Tree 40 250000 iterate all - toArray() + loop 12.439 ms/op 20.965 ms/op 0.59
Tree 40 250000 iterate all - get(i) 41.322 ms/op 58.447 ms/op 0.71
Array 250000 create 2.4207 ms/op 3.5322 ms/op 0.69
Array 250000 clone - spread 1.2203 ms/op 1.4852 ms/op 0.82
Array 250000 get(125000) 0.57200 ns/op 0.42500 ns/op 1.35
Array 250000 set(125000) 0.58700 ns/op 0.46700 ns/op 1.26
Array 250000 iterate all - loop 75.573 us/op 111.28 us/op 0.68
phase0 afterProcessEpoch - 250000 vs - 7PWei 41.012 ms/op 51.601 ms/op 0.79
Array.fill - length 1000000 2.4597 ms/op 3.8294 ms/op 0.64
Array push - length 1000000 13.844 ms/op 18.530 ms/op 0.75
Array.get 0.24673 ns/op 0.29476 ns/op 0.84
Uint8Array.get 0.33346 ns/op 0.45900 ns/op 0.73
phase0 beforeProcessEpoch - 250000 vs - 7PWei 14.525 ms/op 17.901 ms/op 0.81
altair processEpoch - mainnet_e81889 262.40 ms/op 296.53 ms/op 0.88
mainnet_e81889 - altair beforeProcessEpoch 19.188 ms/op 19.771 ms/op 0.97
mainnet_e81889 - altair processJustificationAndFinalization 9.6230 us/op 12.941 us/op 0.74
mainnet_e81889 - altair processInactivityUpdates 4.3259 ms/op 7.8546 ms/op 0.55
mainnet_e81889 - altair processRewardsAndPenalties 50.875 ms/op 55.586 ms/op 0.92
mainnet_e81889 - altair processRegistryUpdates 1.8200 us/op 2.2010 us/op 0.83
mainnet_e81889 - altair processSlashings 765.00 ns/op 624.00 ns/op 1.23
mainnet_e81889 - altair processEth1DataReset 690.00 ns/op 483.00 ns/op 1.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 990.12 us/op 3.7741 ms/op 0.26
mainnet_e81889 - altair processSlashingsReset 2.1530 us/op 9.3870 us/op 0.23
mainnet_e81889 - altair processRandaoMixesReset 2.7340 us/op 8.2490 us/op 0.33
mainnet_e81889 - altair processHistoricalRootsUpdate 709.00 ns/op 795.00 ns/op 0.89
mainnet_e81889 - altair processParticipationFlagUpdates 1.4430 us/op 5.7640 us/op 0.25
mainnet_e81889 - altair processSyncCommitteeUpdates 463.00 ns/op 675.00 ns/op 0.69
mainnet_e81889 - altair afterProcessEpoch 41.957 ms/op 53.198 ms/op 0.79
capella processEpoch - mainnet_e217614 1.0114 s/op 1.2557 s/op 0.81
mainnet_e217614 - capella beforeProcessEpoch 62.980 ms/op 98.810 ms/op 0.64
mainnet_e217614 - capella processJustificationAndFinalization 12.320 us/op 28.779 us/op 0.43
mainnet_e217614 - capella processInactivityUpdates 15.877 ms/op 21.804 ms/op 0.73
mainnet_e217614 - capella processRewardsAndPenalties 258.87 ms/op 283.50 ms/op 0.91
mainnet_e217614 - capella processRegistryUpdates 11.902 us/op 25.027 us/op 0.48
mainnet_e217614 - capella processSlashings 780.00 ns/op 912.00 ns/op 0.86
mainnet_e217614 - capella processEth1DataReset 741.00 ns/op 708.00 ns/op 1.05
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.3726 ms/op 18.641 ms/op 0.29
mainnet_e217614 - capella processSlashingsReset 2.3770 us/op 5.5000 us/op 0.43
mainnet_e217614 - capella processRandaoMixesReset 3.2930 us/op 13.717 us/op 0.24
mainnet_e217614 - capella processHistoricalRootsUpdate 526.00 ns/op 856.00 ns/op 0.61
mainnet_e217614 - capella processParticipationFlagUpdates 1.8520 us/op 3.1450 us/op 0.59
mainnet_e217614 - capella afterProcessEpoch 104.63 ms/op 131.77 ms/op 0.79
phase0 processEpoch - mainnet_e58758 322.80 ms/op 416.76 ms/op 0.77
mainnet_e58758 - phase0 beforeProcessEpoch 78.409 ms/op 92.313 ms/op 0.85
mainnet_e58758 - phase0 processJustificationAndFinalization 11.458 us/op 20.058 us/op 0.57
mainnet_e58758 - phase0 processRewardsAndPenalties 32.595 ms/op 42.567 ms/op 0.77
mainnet_e58758 - phase0 processRegistryUpdates 3.4290 us/op 14.222 us/op 0.24
mainnet_e58758 - phase0 processSlashings 448.00 ns/op 519.00 ns/op 0.86
mainnet_e58758 - phase0 processEth1DataReset 632.00 ns/op 566.00 ns/op 1.12
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3389 ms/op 1.3714 ms/op 0.98
mainnet_e58758 - phase0 processSlashingsReset 2.6740 us/op 8.1350 us/op 0.33
mainnet_e58758 - phase0 processRandaoMixesReset 2.7940 us/op 9.3030 us/op 0.30
mainnet_e58758 - phase0 processHistoricalRootsUpdate 696.00 ns/op 729.00 ns/op 0.95
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.5110 us/op 6.7750 us/op 0.37
mainnet_e58758 - phase0 afterProcessEpoch 34.495 ms/op 48.092 ms/op 0.72
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0355 ms/op 1.8926 ms/op 0.55
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4415 ms/op 3.5816 ms/op 0.40
altair processInactivityUpdates - 250000 normalcase 16.809 ms/op 23.902 ms/op 0.70
altair processInactivityUpdates - 250000 worstcase 16.397 ms/op 23.605 ms/op 0.69
phase0 processRegistryUpdates - 250000 normalcase 5.7390 us/op 15.018 us/op 0.38
phase0 processRegistryUpdates - 250000 badcase_full_deposits 289.90 us/op 481.15 us/op 0.60
phase0 processRegistryUpdates - 250000 worstcase 0.5 116.22 ms/op 164.33 ms/op 0.71
altair processRewardsAndPenalties - 250000 normalcase 44.630 ms/op 52.718 ms/op 0.85
altair processRewardsAndPenalties - 250000 worstcase 45.356 ms/op 51.569 ms/op 0.88
phase0 getAttestationDeltas - 250000 normalcase 5.8346 ms/op 10.768 ms/op 0.54
phase0 getAttestationDeltas - 250000 worstcase 6.3482 ms/op 8.9439 ms/op 0.71
phase0 processSlashings - 250000 worstcase 74.773 us/op 109.62 us/op 0.68
altair processSyncCommitteeUpdates - 250000 101.53 ms/op 142.98 ms/op 0.71
BeaconState.hashTreeRoot - No change 470.00 ns/op 408.00 ns/op 1.15
BeaconState.hashTreeRoot - 1 full validator 88.421 us/op 130.59 us/op 0.68
BeaconState.hashTreeRoot - 32 full validator 849.44 us/op 1.7923 ms/op 0.47
BeaconState.hashTreeRoot - 512 full validator 8.3901 ms/op 12.350 ms/op 0.68
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 130.22 us/op 148.40 us/op 0.88
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6532 ms/op 1.9437 ms/op 0.85
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.494 ms/op 27.015 ms/op 0.68
BeaconState.hashTreeRoot - 1 balances 71.298 us/op 112.52 us/op 0.63
BeaconState.hashTreeRoot - 32 balances 758.90 us/op 1.0684 ms/op 0.71
BeaconState.hashTreeRoot - 512 balances 6.7584 ms/op 9.5965 ms/op 0.70
BeaconState.hashTreeRoot - 250000 balances 160.60 ms/op 243.04 ms/op 0.66
aggregationBits - 2048 els - zipIndexesInBitList 21.095 us/op 42.647 us/op 0.49
byteArrayEquals 32 46.677 ns/op 64.846 ns/op 0.72
Buffer.compare 32 15.147 ns/op 17.632 ns/op 0.86
byteArrayEquals 1024 1.2222 us/op 1.6136 us/op 0.76
Buffer.compare 1024 21.683 ns/op 25.558 ns/op 0.85
byteArrayEquals 16384 19.454 us/op 25.749 us/op 0.76
Buffer.compare 16384 163.73 ns/op 203.80 ns/op 0.80
byteArrayEquals 123687377 148.80 ms/op 227.23 ms/op 0.65
Buffer.compare 123687377 5.5880 ms/op 20.442 ms/op 0.27
byteArrayEquals 32 - diff last byte 46.632 ns/op 68.532 ns/op 0.68
Buffer.compare 32 - diff last byte 15.199 ns/op 23.577 ns/op 0.64
byteArrayEquals 1024 - diff last byte 1.2326 us/op 1.9801 us/op 0.62
Buffer.compare 1024 - diff last byte 22.288 ns/op 42.123 ns/op 0.53
byteArrayEquals 16384 - diff last byte 19.433 us/op 31.222 us/op 0.62
Buffer.compare 16384 - diff last byte 192.31 ns/op 303.27 ns/op 0.63
byteArrayEquals 123687377 - diff last byte 150.37 ms/op 215.47 ms/op 0.70
Buffer.compare 123687377 - diff last byte 5.5371 ms/op 11.842 ms/op 0.47
byteArrayEquals 32 - random bytes 4.8350 ns/op 5.4510 ns/op 0.89
Buffer.compare 32 - random bytes 15.781 ns/op 20.710 ns/op 0.76
byteArrayEquals 1024 - random bytes 4.8690 ns/op 6.3760 ns/op 0.76
Buffer.compare 1024 - random bytes 15.125 ns/op 22.346 ns/op 0.68
byteArrayEquals 16384 - random bytes 4.8610 ns/op 6.9260 ns/op 0.70
Buffer.compare 16384 - random bytes 15.715 ns/op 20.004 ns/op 0.79
byteArrayEquals 123687377 - random bytes 7.6800 ns/op 7.4600 ns/op 1.03
Buffer.compare 123687377 - random bytes 18.260 ns/op 20.800 ns/op 0.88
regular array get 100000 times 30.348 us/op 33.558 us/op 0.90
wrappedArray get 100000 times 30.253 us/op 33.980 us/op 0.89
arrayWithProxy get 100000 times 9.5685 ms/op 16.248 ms/op 0.59
ssz.Root.equals 43.537 ns/op 50.215 ns/op 0.87
byteArrayEquals 40.959 ns/op 58.733 ns/op 0.70
Buffer.compare 8.6870 ns/op 13.558 ns/op 0.64
processSlot - 1 slots 11.075 us/op 28.369 us/op 0.39
processSlot - 32 slots 2.4279 ms/op 3.6083 ms/op 0.67
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 41.165 ms/op 52.087 ms/op 0.79
getCommitteeAssignments - req 1 vs - 250000 vc 1.7472 ms/op 2.6802 ms/op 0.65
getCommitteeAssignments - req 100 vs - 250000 vc 3.4380 ms/op 4.7180 ms/op 0.73
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6693 ms/op 5.0592 ms/op 0.73
findModifiedValidators - 10000 modified validators 239.78 ms/op 505.09 ms/op 0.47
findModifiedValidators - 1000 modified validators 149.12 ms/op 265.30 ms/op 0.56
findModifiedValidators - 100 modified validators 140.41 ms/op 317.05 ms/op 0.44
findModifiedValidators - 10 modified validators 138.69 ms/op 258.31 ms/op 0.54
findModifiedValidators - 1 modified validators 132.10 ms/op 248.96 ms/op 0.53
findModifiedValidators - no difference 134.68 ms/op 283.87 ms/op 0.47
compare ViewDUs 3.0712 s/op 4.4528 s/op 0.69
compare each validator Uint8Array 1.2222 s/op 1.7023 s/op 0.72
compare ViewDU to Uint8Array 667.96 ms/op 1.2657 s/op 0.53
migrate state 1000000 validators, 24 modified, 0 new 649.60 ms/op 902.03 ms/op 0.72
migrate state 1000000 validators, 1700 modified, 1000 new 842.37 ms/op 1.1175 s/op 0.75
migrate state 1000000 validators, 3400 modified, 2000 new 1.1995 s/op 1.2592 s/op 0.95
migrate state 1500000 validators, 24 modified, 0 new 719.54 ms/op 784.94 ms/op 0.92
migrate state 1500000 validators, 1700 modified, 1000 new 923.42 ms/op 1.0624 s/op 0.87
migrate state 1500000 validators, 3400 modified, 2000 new 1.1214 s/op 1.3327 s/op 0.84
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.2300 ns/op 4.9200 ns/op 1.27
state getBlockRootAtSlot - 250000 vs - 7PWei 809.44 ns/op 605.41 ns/op 1.34
computeProposers - vc 250000 5.9767 ms/op 7.3412 ms/op 0.81
computeEpochShuffling - vc 250000 35.369 ms/op 43.533 ms/op 0.81
getNextSyncCommittee - vc 250000 100.06 ms/op 153.66 ms/op 0.65
computeSigningRoot for AttestationData 24.242 us/op 30.158 us/op 0.80
hash AttestationData serialized data then Buffer.toString(base64) 1.1619 us/op 1.6982 us/op 0.68
toHexString serialized data 760.26 ns/op 1.0046 us/op 0.76
Buffer.toString(base64) 130.92 ns/op 208.91 ns/op 0.63
nodejs block root to RootHex using toHex 104.29 ns/op 179.82 ns/op 0.58
nodejs block root to RootHex using toRootHex 71.988 ns/op 106.47 ns/op 0.68
browser block root to RootHex using the deprecated toHexString 203.47 ns/op 244.80 ns/op 0.83
browser block root to RootHex using toHex 156.12 ns/op 220.12 ns/op 0.71
browser block root to RootHex using toRootHex 140.67 ns/op 175.54 ns/op 0.80

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
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.

1 participant