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

docs: fix incorrect light-client example #6297

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

jeluard
Copy link
Member

@jeluard jeluard commented Jan 15, 2024

Motivation

Make sure that the light-client example embedded in the README.md file compiles.

@jeluard jeluard requested a review from a team as a code owner January 15, 2024 10:08
Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Merging #6297 (676c6b6) into unstable (098d35a) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6297   +/-   ##
=========================================
  Coverage     80.38%   80.38%           
=========================================
  Files           202      202           
  Lines         19620    19620           
  Branches       1176     1176           
=========================================
  Hits          15771    15771           
  Misses         3821     3821           
  Partials         28       28           

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: e7296b6 Previous: 098d35a Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 529.28 us/op 888.87 us/op 0.60
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 55.914 us/op 81.806 us/op 0.68
BLS verify - blst-native 1.1247 ms/op 1.2765 ms/op 0.88
BLS verifyMultipleSignatures 3 - blst-native 2.4140 ms/op 2.6851 ms/op 0.90
BLS verifyMultipleSignatures 8 - blst-native 5.4968 ms/op 5.8816 ms/op 0.93
BLS verifyMultipleSignatures 32 - blst-native 19.570 ms/op 21.530 ms/op 0.91
BLS verifyMultipleSignatures 64 - blst-native 38.993 ms/op 42.411 ms/op 0.92
BLS verifyMultipleSignatures 128 - blst-native 76.609 ms/op 84.174 ms/op 0.91
BLS deserializing 10000 signatures 788.06 ms/op 897.12 ms/op 0.88
BLS deserializing 100000 signatures 8.1886 s/op 9.0524 s/op 0.90
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.0526 ms/op 1.2609 ms/op 0.83
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.1746 ms/op 1.5241 ms/op 0.77
BLS verifyMultipleSignatures - same message - 32 - blst-native 1.8626 ms/op 2.1958 ms/op 0.85
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.7307 ms/op 4.2555 ms/op 0.88
BLS verifyMultipleSignatures - same message - 128 - blst-native 4.9787 ms/op 7.3021 ms/op 0.68
BLS aggregatePubkeys 32 - blst-native 22.499 us/op 26.835 us/op 0.84
BLS aggregatePubkeys 128 - blst-native 88.341 us/op 96.919 us/op 0.91
getAttestationsForBlock 37.814 ms/op 43.893 ms/op 0.86
getSlashingsAndExits - default max 113.54 us/op 167.21 us/op 0.68
getSlashingsAndExits - 2k 360.52 us/op 362.90 us/op 0.99
proposeBlockBody type=full, size=empty 3.7531 ms/op 4.9525 ms/op 0.76
isKnown best case - 1 super set check 337.00 ns/op 322.00 ns/op 1.05
isKnown normal case - 2 super set checks 330.00 ns/op 292.00 ns/op 1.13
isKnown worse case - 16 super set checks 329.00 ns/op 280.00 ns/op 1.18
CheckpointStateCache - add get delete 3.6830 us/op 5.5280 us/op 0.67
validate api signedAggregateAndProof - struct 2.4175 ms/op 2.7344 ms/op 0.88
validate gossip signedAggregateAndProof - struct 2.4178 ms/op 2.7392 ms/op 0.88
validate gossip attestation - vc 640000 1.1549 ms/op 1.3155 ms/op 0.88
batch validate gossip attestation - vc 640000 - chunk 32 136.88 us/op 156.51 us/op 0.87
batch validate gossip attestation - vc 640000 - chunk 64 115.35 us/op 136.96 us/op 0.84
batch validate gossip attestation - vc 640000 - chunk 128 111.92 us/op 126.47 us/op 0.88
batch validate gossip attestation - vc 640000 - chunk 256 109.66 us/op 129.92 us/op 0.84
pickEth1Vote - no votes 919.55 us/op 1.1328 ms/op 0.81
pickEth1Vote - max votes 8.8857 ms/op 10.212 ms/op 0.87
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.057 ms/op 21.411 ms/op 0.89
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.104 ms/op 27.950 ms/op 0.86
pickEth1Vote - Eth1Data fastSerialize value x2048 450.46 us/op 574.72 us/op 0.78
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.3273 ms/op 6.7798 ms/op 0.93
bytes32 toHexString 442.00 ns/op 492.00 ns/op 0.90
bytes32 Buffer.toString(hex) 317.00 ns/op 281.00 ns/op 1.13
bytes32 Buffer.toString(hex) from Uint8Array 414.00 ns/op 417.00 ns/op 0.99
bytes32 Buffer.toString(hex) + 0x 304.00 ns/op 279.00 ns/op 1.09
Object access 1 prop 0.20200 ns/op 0.15500 ns/op 1.30
Map access 1 prop 0.18700 ns/op 0.13100 ns/op 1.43
Object get x1000 5.9410 ns/op 7.6080 ns/op 0.78
Map get x1000 0.74300 ns/op 0.71600 ns/op 1.04
Object set x1000 29.281 ns/op 48.308 ns/op 0.61
Map set x1000 18.618 ns/op 36.982 ns/op 0.50
Return object 10000 times 0.23480 ns/op 0.22620 ns/op 1.04
Throw Error 10000 times 2.7355 us/op 3.6822 us/op 0.74
fastMsgIdFn sha256 / 200 bytes 1.9720 us/op 3.1060 us/op 0.63
fastMsgIdFn h32 xxhash / 200 bytes 297.00 ns/op 265.00 ns/op 1.12
fastMsgIdFn h64 xxhash / 200 bytes 355.00 ns/op 323.00 ns/op 1.10
fastMsgIdFn sha256 / 1000 bytes 6.3250 us/op 10.945 us/op 0.58
fastMsgIdFn h32 xxhash / 1000 bytes 442.00 ns/op 395.00 ns/op 1.12
fastMsgIdFn h64 xxhash / 1000 bytes 413.00 ns/op 392.00 ns/op 1.05
fastMsgIdFn sha256 / 10000 bytes 53.206 us/op 99.916 us/op 0.53
fastMsgIdFn h32 xxhash / 10000 bytes 1.8720 us/op 1.8590 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.2970 us/op 1.2660 us/op 1.02
send data - 1000 256B messages 14.030 ms/op 18.371 ms/op 0.76
send data - 1000 512B messages 17.552 ms/op 27.519 ms/op 0.64
send data - 1000 1024B messages 24.683 ms/op 39.244 ms/op 0.63
send data - 1000 1200B messages 31.335 ms/op 35.531 ms/op 0.88
send data - 1000 2048B messages 37.446 ms/op 42.203 ms/op 0.89
send data - 1000 4096B messages 35.029 ms/op 38.492 ms/op 0.91
send data - 1000 16384B messages 100.99 ms/op 115.46 ms/op 0.87
send data - 1000 65536B messages 368.99 ms/op 491.72 ms/op 0.75
enrSubnets - fastDeserialize 64 bits 1.0150 us/op 1.2300 us/op 0.83
enrSubnets - ssz BitVector 64 bits 481.00 ns/op 412.00 ns/op 1.17
enrSubnets - fastDeserialize 4 bits 202.00 ns/op 164.00 ns/op 1.23
enrSubnets - ssz BitVector 4 bits 407.00 ns/op 411.00 ns/op 0.99
prioritizePeers score -10:0 att 32-0.1 sync 2-0 65.530 us/op 99.463 us/op 0.66
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 77.407 us/op 124.24 us/op 0.62
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 99.327 us/op 159.19 us/op 0.62
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 172.23 us/op 282.49 us/op 0.61
prioritizePeers score 0:0 att 64-1 sync 4-1 196.71 us/op 332.88 us/op 0.59
array of 16000 items push then shift 1.2231 us/op 1.5714 us/op 0.78
LinkedList of 16000 items push then shift 6.5030 ns/op 8.8190 ns/op 0.74
array of 16000 items push then pop 66.097 ns/op 70.913 ns/op 0.93
LinkedList of 16000 items push then pop 5.5010 ns/op 8.6040 ns/op 0.64
array of 24000 items push then shift 1.7400 us/op 2.3384 us/op 0.74
LinkedList of 24000 items push then shift 6.0620 ns/op 8.7580 ns/op 0.69
array of 24000 items push then pop 101.37 ns/op 97.806 ns/op 1.04
LinkedList of 24000 items push then pop 5.1660 ns/op 8.5670 ns/op 0.60
intersect bitArray bitLen 8 4.4470 ns/op 6.2680 ns/op 0.71
intersect array and set length 8 43.574 ns/op 60.829 ns/op 0.72
intersect bitArray bitLen 128 25.027 ns/op 33.197 ns/op 0.75
intersect array and set length 128 612.95 ns/op 838.91 ns/op 0.73
bitArray.getTrueBitIndexes() bitLen 128 1.1110 us/op 1.3520 us/op 0.82
bitArray.getTrueBitIndexes() bitLen 248 1.9150 us/op 2.4010 us/op 0.80
bitArray.getTrueBitIndexes() bitLen 512 3.7300 us/op 4.5520 us/op 0.82
Buffer.concat 32 items 856.00 ns/op 963.00 ns/op 0.89
Uint8Array.set 32 items 1.7820 us/op 2.0480 us/op 0.87
Set add up to 64 items then delete first 1.7641 us/op 4.1959 us/op 0.42
OrderedSet add up to 64 items then delete first 2.6960 us/op 5.3522 us/op 0.50
Set add up to 64 items then delete last 1.9896 us/op 4.5169 us/op 0.44
OrderedSet add up to 64 items then delete last 2.9551 us/op 5.7226 us/op 0.52
Set add up to 64 items then delete middle 1.9881 us/op 4.4896 us/op 0.44
OrderedSet add up to 64 items then delete middle 4.1549 us/op 6.8868 us/op 0.60
Set add up to 128 items then delete first 3.9968 us/op 9.1514 us/op 0.44
OrderedSet add up to 128 items then delete first 6.1302 us/op 12.073 us/op 0.51
Set add up to 128 items then delete last 3.7794 us/op 9.0686 us/op 0.42
OrderedSet add up to 128 items then delete last 5.6902 us/op 11.341 us/op 0.50
Set add up to 128 items then delete middle 3.7731 us/op 8.9844 us/op 0.42
OrderedSet add up to 128 items then delete middle 10.717 us/op 16.622 us/op 0.64
Set add up to 256 items then delete first 7.7139 us/op 18.215 us/op 0.42
OrderedSet add up to 256 items then delete first 12.224 us/op 24.649 us/op 0.50
Set add up to 256 items then delete last 7.6958 us/op 17.833 us/op 0.43
OrderedSet add up to 256 items then delete last 11.324 us/op 22.833 us/op 0.50
Set add up to 256 items then delete middle 7.6656 us/op 17.903 us/op 0.43
OrderedSet add up to 256 items then delete middle 30.785 us/op 44.007 us/op 0.70
transfer serialized Status (84 B) 1.4940 us/op 1.7650 us/op 0.85
copy serialized Status (84 B) 1.2800 us/op 1.4630 us/op 0.87
transfer serialized SignedVoluntaryExit (112 B) 1.5990 us/op 1.9200 us/op 0.83
copy serialized SignedVoluntaryExit (112 B) 1.3390 us/op 1.5010 us/op 0.89
transfer serialized ProposerSlashing (416 B) 2.0520 us/op 2.3260 us/op 0.88
copy serialized ProposerSlashing (416 B) 2.1360 us/op 2.1790 us/op 0.98
transfer serialized Attestation (485 B) 2.1540 us/op 2.4240 us/op 0.89
copy serialized Attestation (485 B) 2.1570 us/op 2.1480 us/op 1.00
transfer serialized AttesterSlashing (33232 B) 2.3320 us/op 2.7670 us/op 0.84
copy serialized AttesterSlashing (33232 B) 4.2900 us/op 5.6870 us/op 0.75
transfer serialized Small SignedBeaconBlock (128000 B) 2.6410 us/op 3.1460 us/op 0.84
copy serialized Small SignedBeaconBlock (128000 B) 8.9040 us/op 13.742 us/op 0.65
transfer serialized Avg SignedBeaconBlock (200000 B) 2.5690 us/op 3.1660 us/op 0.81
copy serialized Avg SignedBeaconBlock (200000 B) 12.614 us/op 61.172 us/op 0.21
transfer serialized BlobsSidecar (524380 B) 2.8670 us/op 3.4140 us/op 0.84
copy serialized BlobsSidecar (524380 B) 74.760 us/op 143.30 us/op 0.52
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9000 us/op 3.3340 us/op 0.87
copy serialized Big SignedBeaconBlock (1000000 B) 133.11 us/op 289.61 us/op 0.46
pass gossip attestations to forkchoice per slot 2.7540 ms/op 4.0072 ms/op 0.69
forkChoice updateHead vc 100000 bc 64 eq 0 416.29 us/op 672.26 us/op 0.62
forkChoice updateHead vc 600000 bc 64 eq 0 3.8301 ms/op 4.1098 ms/op 0.93
forkChoice updateHead vc 1000000 bc 64 eq 0 4.3010 ms/op 6.9299 ms/op 0.62
forkChoice updateHead vc 600000 bc 320 eq 0 2.4546 ms/op 4.0727 ms/op 0.60
forkChoice updateHead vc 600000 bc 1200 eq 0 2.6922 ms/op 4.3032 ms/op 0.63
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2039 ms/op 5.1962 ms/op 0.62
forkChoice updateHead vc 600000 bc 64 eq 1000 8.9446 ms/op 11.016 ms/op 0.81
forkChoice updateHead vc 600000 bc 64 eq 10000 9.2053 ms/op 11.799 ms/op 0.78
forkChoice updateHead vc 600000 bc 64 eq 300000 11.730 ms/op 15.713 ms/op 0.75
computeDeltas 500000 validators 300 proto nodes 3.0419 ms/op 6.4179 ms/op 0.47
computeDeltas 500000 validators 1200 proto nodes 3.0449 ms/op 6.3016 ms/op 0.48
computeDeltas 500000 validators 7200 proto nodes 2.9678 ms/op 6.1984 ms/op 0.48
computeDeltas 750000 validators 300 proto nodes 4.7310 ms/op 9.5143 ms/op 0.50
computeDeltas 750000 validators 1200 proto nodes 4.5655 ms/op 9.4484 ms/op 0.48
computeDeltas 750000 validators 7200 proto nodes 4.5175 ms/op 9.6244 ms/op 0.47
computeDeltas 1400000 validators 300 proto nodes 8.7033 ms/op 17.789 ms/op 0.49
computeDeltas 1400000 validators 1200 proto nodes 8.5050 ms/op 18.136 ms/op 0.47
computeDeltas 1400000 validators 7200 proto nodes 8.9118 ms/op 17.790 ms/op 0.50
computeDeltas 2100000 validators 300 proto nodes 14.334 ms/op 27.878 ms/op 0.51
computeDeltas 2100000 validators 1200 proto nodes 13.485 ms/op 27.713 ms/op 0.49
computeDeltas 2100000 validators 7200 proto nodes 13.167 ms/op 27.761 ms/op 0.47
computeProposerBoostScoreFromBalances 500000 validators 3.2741 ms/op 3.6677 ms/op 0.89
computeProposerBoostScoreFromBalances 750000 validators 3.1795 ms/op 3.6746 ms/op 0.87
computeProposerBoostScoreFromBalances 1400000 validators 3.1639 ms/op 3.6649 ms/op 0.86
computeProposerBoostScoreFromBalances 2100000 validators 3.3031 ms/op 3.6749 ms/op 0.90
altair processAttestation - 250000 vs - 7PWei normalcase 1.5571 ms/op 2.0848 ms/op 0.75
altair processAttestation - 250000 vs - 7PWei worstcase 2.4125 ms/op 3.1230 ms/op 0.77
altair processAttestation - setStatus - 1/6 committees join 102.66 us/op 140.95 us/op 0.73
altair processAttestation - setStatus - 1/3 committees join 202.38 us/op 269.85 us/op 0.75
altair processAttestation - setStatus - 1/2 committees join 293.98 us/op 371.26 us/op 0.79
altair processAttestation - setStatus - 2/3 committees join 378.01 us/op 469.22 us/op 0.81
altair processAttestation - setStatus - 4/5 committees join 475.89 us/op 664.21 us/op 0.72
altair processAttestation - setStatus - 100% committees join 584.72 us/op 761.53 us/op 0.77
altair processBlock - 250000 vs - 7PWei normalcase 8.2277 ms/op 9.6696 ms/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.128 ms/op 37.358 ms/op 0.81
altair processBlock - 250000 vs - 7PWei worstcase 31.734 ms/op 37.292 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase hashState 78.335 ms/op 94.421 ms/op 0.83
phase0 processBlock - 250000 vs - 7PWei normalcase 2.7663 ms/op 2.4498 ms/op 1.13
phase0 processBlock - 250000 vs - 7PWei worstcase 27.193 ms/op 30.047 ms/op 0.91
altair processEth1Data - 250000 vs - 7PWei normalcase 298.14 us/op 575.48 us/op 0.52
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.3090 us/op 10.503 us/op 0.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 49.758 us/op 49.470 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.598 us/op 18.102 us/op 0.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 12.134 us/op 7.0010 us/op 1.73
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 178.67 us/op 122.08 us/op 1.46
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1363 ms/op 1.4374 ms/op 0.79
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5474 ms/op 1.5396 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1045 ms/op 1.4982 ms/op 0.74
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.5004 ms/op 3.5953 ms/op 0.70
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.3962 ms/op 2.2686 ms/op 0.62
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7991 ms/op 5.0290 ms/op 0.76
Tree 40 250000 create 249.85 ms/op 353.78 ms/op 0.71
Tree 40 250000 get(125000) 102.58 ns/op 192.00 ns/op 0.53
Tree 40 250000 set(125000) 815.47 ns/op 977.41 ns/op 0.83
Tree 40 250000 toArray() 17.409 ms/op 18.254 ms/op 0.95
Tree 40 250000 iterate all - toArray() + loop 17.435 ms/op 18.390 ms/op 0.95
Tree 40 250000 iterate all - get(i) 42.066 ms/op 64.565 ms/op 0.65
MutableVector 250000 create 11.285 ms/op 12.470 ms/op 0.90
MutableVector 250000 get(125000) 5.4680 ns/op 6.5210 ns/op 0.84
MutableVector 250000 set(125000) 208.10 ns/op 254.73 ns/op 0.82
MutableVector 250000 toArray() 2.7362 ms/op 3.1632 ms/op 0.87
MutableVector 250000 iterate all - toArray() + loop 2.7754 ms/op 3.2663 ms/op 0.85
MutableVector 250000 iterate all - get(i) 1.3122 ms/op 1.5162 ms/op 0.87
Array 250000 create 2.4468 ms/op 2.8420 ms/op 0.86
Array 250000 clone - spread 1.0993 ms/op 1.2547 ms/op 0.88
Array 250000 get(125000) 0.98800 ns/op 1.0420 ns/op 0.95
Array 250000 set(125000) 1.1840 ns/op 4.0770 ns/op 0.29
Array 250000 iterate all - loop 147.89 us/op 163.83 us/op 0.90
effectiveBalanceIncrements clone Uint8Array 300000 24.769 us/op 28.476 us/op 0.87
effectiveBalanceIncrements clone MutableVector 300000 406.00 ns/op 361.00 ns/op 1.12
effectiveBalanceIncrements rw all Uint8Array 300000 178.54 us/op 199.33 us/op 0.90
effectiveBalanceIncrements rw all MutableVector 300000 65.093 ms/op 80.980 ms/op 0.80
phase0 afterProcessEpoch - 250000 vs - 7PWei 76.697 ms/op 113.06 ms/op 0.68
phase0 beforeProcessEpoch - 250000 vs - 7PWei 43.657 ms/op 52.523 ms/op 0.83
altair processEpoch - mainnet_e81889 435.47 ms/op 500.78 ms/op 0.87
mainnet_e81889 - altair beforeProcessEpoch 67.824 ms/op 78.569 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 16.491 us/op 14.959 us/op 1.10
mainnet_e81889 - altair processInactivityUpdates 3.9161 ms/op 5.7191 ms/op 0.68
mainnet_e81889 - altair processRewardsAndPenalties 47.846 ms/op 60.703 ms/op 0.79
mainnet_e81889 - altair processRegistryUpdates 4.0030 us/op 2.4840 us/op 1.61
mainnet_e81889 - altair processSlashings 502.00 ns/op 446.00 ns/op 1.13
mainnet_e81889 - altair processEth1DataReset 975.00 ns/op 484.00 ns/op 2.01
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5172 ms/op 1.4180 ms/op 1.07
mainnet_e81889 - altair processSlashingsReset 3.8360 us/op 4.0430 us/op 0.95
mainnet_e81889 - altair processRandaoMixesReset 4.1720 us/op 4.2190 us/op 0.99
mainnet_e81889 - altair processHistoricalRootsUpdate 718.00 ns/op 708.00 ns/op 1.01
mainnet_e81889 - altair processParticipationFlagUpdates 1.4240 us/op 1.8430 us/op 0.77
mainnet_e81889 - altair processSyncCommitteeUpdates 717.00 ns/op 683.00 ns/op 1.05
mainnet_e81889 - altair afterProcessEpoch 75.141 ms/op 116.77 ms/op 0.64
capella processEpoch - mainnet_e217614 2.0694 s/op 2.0613 s/op 1.00
mainnet_e217614 - capella beforeProcessEpoch 460.03 ms/op 482.87 ms/op 0.95
mainnet_e217614 - capella processJustificationAndFinalization 13.308 us/op 19.876 us/op 0.67
mainnet_e217614 - capella processInactivityUpdates 21.715 ms/op 21.052 ms/op 1.03
mainnet_e217614 - capella processRewardsAndPenalties 451.09 ms/op 402.56 ms/op 1.12
mainnet_e217614 - capella processRegistryUpdates 21.421 us/op 16.894 us/op 1.27
mainnet_e217614 - capella processSlashings 585.00 ns/op 540.00 ns/op 1.08
mainnet_e217614 - capella processEth1DataReset 1.1470 us/op 401.00 ns/op 2.86
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.6271 ms/op 4.9395 ms/op 0.73
mainnet_e217614 - capella processSlashingsReset 4.3800 us/op 3.2420 us/op 1.35
mainnet_e217614 - capella processRandaoMixesReset 7.2020 us/op 4.6230 us/op 1.56
mainnet_e217614 - capella processHistoricalRootsUpdate 1.1060 us/op 510.00 ns/op 2.17
mainnet_e217614 - capella processParticipationFlagUpdates 3.4050 us/op 1.6520 us/op 2.06
mainnet_e217614 - capella afterProcessEpoch 251.34 ms/op 315.64 ms/op 0.80
phase0 processEpoch - mainnet_e58758 373.26 ms/op 436.42 ms/op 0.86
mainnet_e58758 - phase0 beforeProcessEpoch 116.43 ms/op 113.07 ms/op 1.03
mainnet_e58758 - phase0 processJustificationAndFinalization 13.253 us/op 14.567 us/op 0.91
mainnet_e58758 - phase0 processRewardsAndPenalties 51.923 ms/op 54.928 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 15.688 us/op 8.9170 us/op 1.76
mainnet_e58758 - phase0 processSlashings 599.00 ns/op 415.00 ns/op 1.44
mainnet_e58758 - phase0 processEth1DataReset 716.00 ns/op 385.00 ns/op 1.86
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.4170 ms/op 1.1442 ms/op 1.24
mainnet_e58758 - phase0 processSlashingsReset 3.4640 us/op 2.7360 us/op 1.27
mainnet_e58758 - phase0 processRandaoMixesReset 6.4770 us/op 4.1590 us/op 1.56
mainnet_e58758 - phase0 processHistoricalRootsUpdate 861.00 ns/op 391.00 ns/op 2.20
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.0540 us/op 4.9290 us/op 0.82
mainnet_e58758 - phase0 afterProcessEpoch 70.560 ms/op 94.664 ms/op 0.75
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0392 ms/op 1.3292 ms/op 0.78
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1526 ms/op 1.9439 ms/op 0.59
altair processInactivityUpdates - 250000 normalcase 24.801 ms/op 30.144 ms/op 0.82
altair processInactivityUpdates - 250000 worstcase 25.247 ms/op 30.633 ms/op 0.82
phase0 processRegistryUpdates - 250000 normalcase 9.8460 us/op 9.5720 us/op 1.03
phase0 processRegistryUpdates - 250000 badcase_full_deposits 401.33 us/op 311.40 us/op 1.29
phase0 processRegistryUpdates - 250000 worstcase 0.5 109.28 ms/op 157.72 ms/op 0.69
altair processRewardsAndPenalties - 250000 normalcase 58.075 ms/op 63.425 ms/op 0.92
altair processRewardsAndPenalties - 250000 worstcase 56.777 ms/op 56.387 ms/op 1.01
phase0 getAttestationDeltas - 250000 normalcase 5.3409 ms/op 9.1089 ms/op 0.59
phase0 getAttestationDeltas - 250000 worstcase 5.8148 ms/op 8.9035 ms/op 0.65
phase0 processSlashings - 250000 worstcase 80.831 us/op 85.653 us/op 0.94
altair processSyncCommitteeUpdates - 250000 105.05 ms/op 149.30 ms/op 0.70
BeaconState.hashTreeRoot - No change 298.00 ns/op 255.00 ns/op 1.17
BeaconState.hashTreeRoot - 1 full validator 115.92 us/op 147.97 us/op 0.78
BeaconState.hashTreeRoot - 32 full validator 1.5792 ms/op 1.5379 ms/op 1.03
BeaconState.hashTreeRoot - 512 full validator 10.835 ms/op 16.716 ms/op 0.65
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 180.84 us/op 208.62 us/op 0.87
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0719 ms/op 2.2623 ms/op 0.92
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 29.432 ms/op 29.707 ms/op 0.99
BeaconState.hashTreeRoot - 1 balances 109.36 us/op 156.13 us/op 0.70
BeaconState.hashTreeRoot - 32 balances 836.52 us/op 1.3426 ms/op 0.62
BeaconState.hashTreeRoot - 512 balances 8.7783 ms/op 11.820 ms/op 0.74
BeaconState.hashTreeRoot - 250000 balances 157.62 ms/op 225.34 ms/op 0.70
aggregationBits - 2048 els - zipIndexesInBitList 15.322 us/op 16.067 us/op 0.95
byteArrayEquals 32 62.547 ns/op 70.736 ns/op 0.88
Buffer.compare 32 36.318 ns/op 53.038 ns/op 0.68
byteArrayEquals 1024 1.7028 us/op 1.9314 us/op 0.88
Buffer.compare 1024 42.228 ns/op 68.500 ns/op 0.62
byteArrayEquals 16384 26.745 us/op 30.764 us/op 0.87
Buffer.compare 16384 205.57 ns/op 259.49 ns/op 0.79
byteArrayEquals 123687377 208.71 ms/op 232.04 ms/op 0.90
Buffer.compare 123687377 6.9305 ms/op 6.2015 ms/op 1.12
byteArrayEquals 32 - diff last byte 60.957 ns/op 71.372 ns/op 0.85
Buffer.compare 32 - diff last byte 44.820 ns/op 55.467 ns/op 0.81
byteArrayEquals 1024 - diff last byte 1.6903 us/op 2.0202 us/op 0.84
Buffer.compare 1024 - diff last byte 42.417 ns/op 71.718 ns/op 0.59
byteArrayEquals 16384 - diff last byte 26.808 us/op 32.211 us/op 0.83
Buffer.compare 16384 - diff last byte 236.01 ns/op 273.41 ns/op 0.86
byteArrayEquals 123687377 - diff last byte 202.93 ms/op 239.13 ms/op 0.85
Buffer.compare 123687377 - diff last byte 6.1276 ms/op 6.0965 ms/op 1.01
byteArrayEquals 32 - random bytes 5.0150 ns/op 5.1520 ns/op 0.97
Buffer.compare 32 - random bytes 41.826 ns/op 59.021 ns/op 0.71
byteArrayEquals 1024 - random bytes 5.4340 ns/op 5.0610 ns/op 1.07
Buffer.compare 1024 - random bytes 40.150 ns/op 58.590 ns/op 0.69
byteArrayEquals 16384 - random bytes 4.9570 ns/op 5.3160 ns/op 0.93
Buffer.compare 16384 - random bytes 36.724 ns/op 58.236 ns/op 0.63
byteArrayEquals 123687377 - random bytes 8.0600 ns/op 8.3200 ns/op 0.97
Buffer.compare 123687377 - random bytes 43.960 ns/op 61.650 ns/op 0.71
regular array get 100000 times 41.518 us/op 43.111 us/op 0.96
wrappedArray get 100000 times 41.299 us/op 43.048 us/op 0.96
arrayWithProxy get 100000 times 10.752 ms/op 14.020 ms/op 0.77
ssz.Root.equals 54.616 ns/op 52.358 ns/op 1.04
byteArrayEquals 54.150 ns/op 51.512 ns/op 1.05
Buffer.compare 9.4690 ns/op 10.542 ns/op 0.90
shuffle list - 16384 els 4.8137 ms/op 6.9002 ms/op 0.70
shuffle list - 250000 els 69.987 ms/op 99.823 ms/op 0.70
processSlot - 1 slots 16.190 us/op 16.517 us/op 0.98
processSlot - 32 slots 3.2053 ms/op 3.5401 ms/op 0.91
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 57.460 ms/op 60.992 ms/op 0.94
getCommitteeAssignments - req 1 vs - 250000 vc 2.2772 ms/op 2.4611 ms/op 0.93
getCommitteeAssignments - req 100 vs - 250000 vc 3.4106 ms/op 3.6420 ms/op 0.94
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7488 ms/op 3.9976 ms/op 0.94
findModifiedValidators - 10000 modified validators 433.62 ms/op 559.22 ms/op 0.78
findModifiedValidators - 1000 modified validators 348.12 ms/op 425.51 ms/op 0.82
findModifiedValidators - 100 modified validators 270.51 ms/op 397.22 ms/op 0.68
findModifiedValidators - 10 modified validators 293.30 ms/op 372.77 ms/op 0.79
findModifiedValidators - 1 modified validators 280.17 ms/op 394.92 ms/op 0.71
findModifiedValidators - no difference 317.65 ms/op 403.22 ms/op 0.79
compare ViewDUs 4.0106 s/op 4.3589 s/op 0.92
compare each validator Uint8Array 1.4161 s/op 1.9616 s/op 0.72
compare ViewDU to Uint8Array 959.85 ms/op 1.1229 s/op 0.85
migrate state 1000000 validators, 24 modified, 0 new 710.43 ms/op 807.40 ms/op 0.88
migrate state 1000000 validators, 1700 modified, 1000 new 1.0726 s/op 1.1144 s/op 0.96
migrate state 1000000 validators, 3400 modified, 2000 new 1.3564 s/op 1.3544 s/op 1.00
migrate state 1500000 validators, 24 modified, 0 new 774.44 ms/op 818.38 ms/op 0.95
migrate state 1500000 validators, 1700 modified, 1000 new 887.52 ms/op 1.1023 s/op 0.81
migrate state 1500000 validators, 3400 modified, 2000 new 1.1165 s/op 1.3207 s/op 0.85
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6400 ns/op 4.0900 ns/op 1.13
state getBlockRootAtSlot - 250000 vs - 7PWei 836.32 ns/op 706.77 ns/op 1.18
computeProposers - vc 250000 6.3739 ms/op 9.2365 ms/op 0.69
computeEpochShuffling - vc 250000 69.872 ms/op 101.63 ms/op 0.69
getNextSyncCommittee - vc 250000 101.96 ms/op 154.61 ms/op 0.66
computeSigningRoot for AttestationData 25.805 us/op 27.064 us/op 0.95
hash AttestationData serialized data then Buffer.toString(base64) 1.1866 us/op 2.2756 us/op 0.52
toHexString serialized data 736.53 ns/op 1.0751 us/op 0.69
Buffer.toString(base64) 143.55 ns/op 217.78 ns/op 0.66

by benchmarkbot/action

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

Maybe we should run yarn check-readme in CI along with tests to keep these readmes compile-able?

@wemeetagain wemeetagain merged commit edd83cb into unstable Jan 15, 2024
14 of 15 checks passed
@wemeetagain wemeetagain deleted the jeluard/fix-light-client-example branch January 15, 2024 15:19
@nflaig
Copy link
Member

nflaig commented Jan 15, 2024

Maybe we should run yarn check-readme in CI along with tests to keep these readmes compile-able?

We actually do

- name: README check
run: yarn check-readme

But it doesn't seem to care at all

~/projects/ethereum/lodestar/packages/light-client [unstable ≡ +0 ~1 -0 !]> yarn check-readme
yarn run v1.22.19
$ typescript-docs-verifier
ℹ Compiling documentation TypeScript code snippets from README.md
ℹ Found 1 TypeScript snippets
✔ All snippets compiled OK

@jeluard how did you verify and determine the changes to make it compile, just copy pasted it into a .ts file?

@jeluard
Copy link
Member Author

jeluard commented Jan 15, 2024

@nflaig Yes, copy pasted.

@nflaig nflaig mentioned this pull request Jan 15, 2024
ensi321 pushed a commit to ensi321/lodestar that referenced this pull request Jan 22, 2024
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.15.0 🎉

jeluard added a commit to jeluard/lodestar that referenced this pull request Jan 30, 2024
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.

None yet

3 participants