Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for browser bundle for lightclient #6673

Merged
merged 27 commits into from
Apr 26, 2024

Conversation

nazarhussain
Copy link
Contributor

Motivation

Make the lightclient more accessible.

Description

  • Directly link the lightclient to browser environment.
  • Have one compiled distribution for all the dependencies.

Steps to test or reproduce

  • Run all tests

@nazarhussain nazarhussain self-assigned this Apr 16, 2024
Copy link
Contributor

github-actions bot commented Apr 16, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 8a1967a Previous: e1bc926 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.1601 ms/op 1.1203 ms/op 1.04
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 83.517 us/op 119.50 us/op 0.70
BLS verify - blst-native 1.2835 ms/op 1.3233 ms/op 0.97
BLS verifyMultipleSignatures 3 - blst-native 2.4673 ms/op 2.5253 ms/op 0.98
BLS verifyMultipleSignatures 8 - blst-native 5.3908 ms/op 5.3955 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 19.432 ms/op 19.586 ms/op 0.99
BLS verifyMultipleSignatures 64 - blst-native 38.854 ms/op 38.329 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst-native 73.934 ms/op 76.210 ms/op 0.97
BLS deserializing 10000 signatures 858.11 ms/op 895.54 ms/op 0.96
BLS deserializing 100000 signatures 8.7198 s/op 8.9673 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3053 ms/op 1.3323 ms/op 0.98
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4707 ms/op 1.5062 ms/op 0.98
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2862 ms/op 2.3657 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3074 ms/op 3.5534 ms/op 0.93
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.4904 ms/op 5.7959 ms/op 0.95
BLS aggregatePubkeys 32 - blst-native 28.139 us/op 30.095 us/op 0.94
BLS aggregatePubkeys 128 - blst-native 108.31 us/op 113.00 us/op 0.96
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 57.074 ms/op 61.098 ms/op 0.93
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 63.482 ms/op 75.638 ms/op 0.84
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 34.961 ms/op 37.285 ms/op 0.94
getSlashingsAndExits - default max 204.04 us/op 194.55 us/op 1.05
getSlashingsAndExits - 2k 509.41 us/op 597.71 us/op 0.85
proposeBlockBody type=full, size=empty 6.0000 ms/op 6.3240 ms/op 0.95
isKnown best case - 1 super set check 566.00 ns/op 548.00 ns/op 1.03
isKnown normal case - 2 super set checks 525.00 ns/op 601.00 ns/op 0.87
isKnown worse case - 16 super set checks 467.00 ns/op 582.00 ns/op 0.80
InMemoryCheckpointStateCache - add get delete 7.3250 us/op 7.9930 us/op 0.92
validate api signedAggregateAndProof - struct 2.4079 ms/op 2.4577 ms/op 0.98
validate gossip signedAggregateAndProof - struct 2.4709 ms/op 2.4946 ms/op 0.99
validate gossip attestation - vc 640000 1.3996 ms/op 1.4302 ms/op 0.98
batch validate gossip attestation - vc 640000 - chunk 32 171.02 us/op 177.76 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 64 151.57 us/op 158.08 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 128 156.14 us/op 157.64 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 256 158.21 us/op 154.37 us/op 1.02
pickEth1Vote - no votes 1.5013 ms/op 1.4003 ms/op 1.07
pickEth1Vote - max votes 11.824 ms/op 12.469 ms/op 0.95
pickEth1Vote - Eth1Data hashTreeRoot value x2048 24.454 ms/op 22.857 ms/op 1.07
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 32.733 ms/op 32.452 ms/op 1.01
pickEth1Vote - Eth1Data fastSerialize value x2048 763.58 us/op 815.40 us/op 0.94
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.6356 ms/op 5.8754 ms/op 1.47
bytes32 toHexString 934.00 ns/op 895.00 ns/op 1.04
bytes32 Buffer.toString(hex) 306.00 ns/op 323.00 ns/op 0.95
bytes32 Buffer.toString(hex) from Uint8Array 625.00 ns/op 589.00 ns/op 1.06
bytes32 Buffer.toString(hex) + 0x 347.00 ns/op 343.00 ns/op 1.01
Object access 1 prop 0.24000 ns/op 0.22600 ns/op 1.06
Map access 1 prop 0.15700 ns/op 0.17200 ns/op 0.91
Object get x1000 8.7660 ns/op 8.5980 ns/op 1.02
Map get x1000 0.94500 ns/op 0.93100 ns/op 1.02
Object set x1000 82.741 ns/op 73.009 ns/op 1.13
Map set x1000 59.034 ns/op 56.855 ns/op 1.04
Return object 10000 times 0.30220 ns/op 0.25730 ns/op 1.17
Throw Error 10000 times 4.2503 us/op 4.0551 us/op 1.05
fastMsgIdFn sha256 / 200 bytes 3.5600 us/op 3.5930 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 384.00 ns/op 361.00 ns/op 1.06
fastMsgIdFn h64 xxhash / 200 bytes 428.00 ns/op 442.00 ns/op 0.97
fastMsgIdFn sha256 / 1000 bytes 12.215 us/op 12.038 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 536.00 ns/op 503.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 1000 bytes 530.00 ns/op 513.00 ns/op 1.03
fastMsgIdFn sha256 / 10000 bytes 108.80 us/op 106.31 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 2.1160 us/op 2.0500 us/op 1.03
fastMsgIdFn h64 xxhash / 10000 bytes 1.4770 us/op 1.4510 us/op 1.02
send data - 1000 256B messages 19.945 ms/op 26.444 ms/op 0.75
send data - 1000 512B messages 32.404 ms/op 27.568 ms/op 1.18
send data - 1000 1024B messages 50.813 ms/op 47.254 ms/op 1.08
send data - 1000 1200B messages 52.113 ms/op 46.171 ms/op 1.13
send data - 1000 2048B messages 59.219 ms/op 53.782 ms/op 1.10
send data - 1000 4096B messages 56.185 ms/op 46.971 ms/op 1.20
send data - 1000 16384B messages 156.96 ms/op 121.17 ms/op 1.30
send data - 1000 65536B messages 593.14 ms/op 485.87 ms/op 1.22
enrSubnets - fastDeserialize 64 bits 1.8380 us/op 1.2720 us/op 1.44
enrSubnets - ssz BitVector 64 bits 574.00 ns/op 443.00 ns/op 1.30
enrSubnets - fastDeserialize 4 bits 263.00 ns/op 176.00 ns/op 1.49
enrSubnets - ssz BitVector 4 bits 574.00 ns/op 451.00 ns/op 1.27
prioritizePeers score -10:0 att 32-0.1 sync 2-0 240.23 us/op 235.82 us/op 1.02
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 336.52 us/op 299.39 us/op 1.12
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 424.26 us/op 398.78 us/op 1.06
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 676.81 us/op 624.14 us/op 1.08
prioritizePeers score 0:0 att 64-1 sync 4-1 789.77 us/op 730.21 us/op 1.08
array of 16000 items push then shift 1.7230 us/op 1.6789 us/op 1.03
LinkedList of 16000 items push then shift 10.698 ns/op 9.5980 ns/op 1.11
array of 16000 items push then pop 118.94 ns/op 110.00 ns/op 1.08
LinkedList of 16000 items push then pop 9.8300 ns/op 9.0450 ns/op 1.09
array of 24000 items push then shift 2.7320 us/op 2.5623 us/op 1.07
LinkedList of 24000 items push then shift 10.938 ns/op 9.6570 ns/op 1.13
array of 24000 items push then pop 174.02 ns/op 154.00 ns/op 1.13
LinkedList of 24000 items push then pop 9.7580 ns/op 8.7710 ns/op 1.11
intersect bitArray bitLen 8 6.3480 ns/op 5.8720 ns/op 1.08
intersect array and set length 8 109.17 ns/op 63.452 ns/op 1.72
intersect bitArray bitLen 128 46.239 ns/op 35.642 ns/op 1.30
intersect array and set length 128 1.2987 us/op 878.53 ns/op 1.48
bitArray.getTrueBitIndexes() bitLen 128 2.3020 us/op 1.5660 us/op 1.47
bitArray.getTrueBitIndexes() bitLen 248 3.6060 us/op 2.7460 us/op 1.31
bitArray.getTrueBitIndexes() bitLen 512 7.3340 us/op 6.0810 us/op 1.21
Buffer.concat 32 items 1.2520 us/op 1.0560 us/op 1.19
Uint8Array.set 32 items 2.2510 us/op 1.9290 us/op 1.17
Set add up to 64 items then delete first 5.2651 us/op 4.9368 us/op 1.07
OrderedSet add up to 64 items then delete first 7.0000 us/op 6.7410 us/op 1.04
Set add up to 64 items then delete last 5.6442 us/op 5.2878 us/op 1.07
OrderedSet add up to 64 items then delete last 7.6956 us/op 6.0619 us/op 1.27
Set add up to 64 items then delete middle 5.6925 us/op 4.9312 us/op 1.15
OrderedSet add up to 64 items then delete middle 8.8746 us/op 7.5483 us/op 1.18
Set add up to 128 items then delete first 11.496 us/op 10.489 us/op 1.10
OrderedSet add up to 128 items then delete first 16.062 us/op 14.393 us/op 1.12
Set add up to 128 items then delete last 11.362 us/op 10.833 us/op 1.05
OrderedSet add up to 128 items then delete last 15.272 us/op 12.191 us/op 1.25
Set add up to 128 items then delete middle 11.174 us/op 9.3318 us/op 1.20
OrderedSet add up to 128 items then delete middle 21.895 us/op 18.877 us/op 1.16
Set add up to 256 items then delete first 23.026 us/op 19.332 us/op 1.19
OrderedSet add up to 256 items then delete first 33.787 us/op 25.585 us/op 1.32
Set add up to 256 items then delete last 22.045 us/op 21.456 us/op 1.03
OrderedSet add up to 256 items then delete last 29.135 us/op 24.659 us/op 1.18
Set add up to 256 items then delete middle 22.305 us/op 19.801 us/op 1.13
OrderedSet add up to 256 items then delete middle 52.419 us/op 49.481 us/op 1.06
transfer serialized Status (84 B) 2.1410 us/op 1.8620 us/op 1.15
copy serialized Status (84 B) 1.5080 us/op 1.4580 us/op 1.03
transfer serialized SignedVoluntaryExit (112 B) 2.1220 us/op 1.9770 us/op 1.07
copy serialized SignedVoluntaryExit (112 B) 1.5420 us/op 1.4170 us/op 1.09
transfer serialized ProposerSlashing (416 B) 2.4500 us/op 2.1420 us/op 1.14
copy serialized ProposerSlashing (416 B) 2.1180 us/op 2.0090 us/op 1.05
transfer serialized Attestation (485 B) 2.5990 us/op 2.4450 us/op 1.06
copy serialized Attestation (485 B) 2.3230 us/op 2.0360 us/op 1.14
transfer serialized AttesterSlashing (33232 B) 2.6300 us/op 2.2340 us/op 1.18
copy serialized AttesterSlashing (33232 B) 8.9880 us/op 7.8520 us/op 1.14
transfer serialized Small SignedBeaconBlock (128000 B) 3.4430 us/op 2.6490 us/op 1.30
copy serialized Small SignedBeaconBlock (128000 B) 28.838 us/op 21.836 us/op 1.32
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5000 us/op 3.5300 us/op 0.99
copy serialized Avg SignedBeaconBlock (200000 B) 40.263 us/op 31.074 us/op 1.30
transfer serialized BlobsSidecar (524380 B) 3.6280 us/op 3.7080 us/op 0.98
copy serialized BlobsSidecar (524380 B) 128.73 us/op 120.87 us/op 1.07
transfer serialized Big SignedBeaconBlock (1000000 B) 3.3120 us/op 4.2850 us/op 0.77
copy serialized Big SignedBeaconBlock (1000000 B) 273.48 us/op 181.91 us/op 1.50
pass gossip attestations to forkchoice per slot 5.0269 ms/op 4.7392 ms/op 1.06
forkChoice updateHead vc 100000 bc 64 eq 0 710.55 us/op 756.99 us/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 0 5.4612 ms/op 6.9367 ms/op 0.79
forkChoice updateHead vc 1000000 bc 64 eq 0 10.225 ms/op 7.8579 ms/op 1.30
forkChoice updateHead vc 600000 bc 320 eq 0 4.6668 ms/op 4.4736 ms/op 1.04
forkChoice updateHead vc 600000 bc 1200 eq 0 4.7021 ms/op 4.5946 ms/op 1.02
forkChoice updateHead vc 600000 bc 7200 eq 0 6.1674 ms/op 5.8008 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 1000 12.780 ms/op 11.646 ms/op 1.10
forkChoice updateHead vc 600000 bc 64 eq 10000 12.609 ms/op 13.484 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 300000 19.377 ms/op 22.424 ms/op 0.86
computeDeltas 500000 validators 300 proto nodes 6.9885 ms/op 7.6478 ms/op 0.91
computeDeltas 500000 validators 1200 proto nodes 7.2151 ms/op 7.0795 ms/op 1.02
computeDeltas 500000 validators 7200 proto nodes 6.5308 ms/op 6.8581 ms/op 0.95
computeDeltas 750000 validators 300 proto nodes 10.235 ms/op 10.019 ms/op 1.02
computeDeltas 750000 validators 1200 proto nodes 10.214 ms/op 9.9164 ms/op 1.03
computeDeltas 750000 validators 7200 proto nodes 10.187 ms/op 9.9342 ms/op 1.03
computeDeltas 1400000 validators 300 proto nodes 19.315 ms/op 18.558 ms/op 1.04
computeDeltas 1400000 validators 1200 proto nodes 20.494 ms/op 19.851 ms/op 1.03
computeDeltas 1400000 validators 7200 proto nodes 19.451 ms/op 20.013 ms/op 0.97
computeDeltas 2100000 validators 300 proto nodes 28.473 ms/op 28.851 ms/op 0.99
computeDeltas 2100000 validators 1200 proto nodes 28.291 ms/op 29.614 ms/op 0.96
computeDeltas 2100000 validators 7200 proto nodes 27.508 ms/op 28.543 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei normalcase 2.5313 ms/op 2.7828 ms/op 0.91
altair processAttestation - 250000 vs - 7PWei worstcase 3.4481 ms/op 4.5102 ms/op 0.76
altair processAttestation - setStatus - 1/6 committees join 189.47 us/op 208.66 us/op 0.91
altair processAttestation - setStatus - 1/3 committees join 354.65 us/op 399.80 us/op 0.89
altair processAttestation - setStatus - 1/2 committees join 505.84 us/op 502.51 us/op 1.01
altair processAttestation - setStatus - 2/3 committees join 638.07 us/op 649.02 us/op 0.98
altair processAttestation - setStatus - 4/5 committees join 879.32 us/op 866.44 us/op 1.01
altair processAttestation - setStatus - 100% committees join 1.0733 ms/op 1.0783 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase 9.4767 ms/op 8.9681 ms/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase hashState 39.232 ms/op 36.494 ms/op 1.08
altair processBlock - 250000 vs - 7PWei worstcase 47.526 ms/op 47.454 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase hashState 106.38 ms/op 94.505 ms/op 1.13
phase0 processBlock - 250000 vs - 7PWei normalcase 2.9727 ms/op 2.7337 ms/op 1.09
phase0 processBlock - 250000 vs - 7PWei worstcase 32.728 ms/op 32.340 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 642.35 us/op 573.83 us/op 1.12
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 23.019 us/op 17.466 us/op 1.32
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 82.087 us/op 83.299 us/op 0.99
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 23.390 us/op 24.354 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 12.802 us/op 18.497 us/op 0.69
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 211.38 us/op 272.20 us/op 0.78
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2274 ms/op 1.8580 ms/op 0.66
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9560 ms/op 2.2505 ms/op 0.87
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9482 ms/op 2.5309 ms/op 0.77
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.1172 ms/op 3.8619 ms/op 1.07
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.9491 ms/op 3.0729 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.5534 ms/op 6.4759 ms/op 1.01
Tree 40 250000 create 409.17 ms/op 693.74 ms/op 0.59
Tree 40 250000 get(125000) 215.99 ns/op 223.97 ns/op 0.96
Tree 40 250000 set(125000) 1.7438 us/op 1.2973 us/op 1.34
Tree 40 250000 toArray() 26.951 ms/op 23.771 ms/op 1.13
Tree 40 250000 iterate all - toArray() + loop 27.264 ms/op 24.888 ms/op 1.10
Tree 40 250000 iterate all - get(i) 82.563 ms/op 82.777 ms/op 1.00
MutableVector 250000 create 14.288 ms/op 19.502 ms/op 0.73
MutableVector 250000 get(125000) 6.7760 ns/op 7.0760 ns/op 0.96
MutableVector 250000 set(125000) 306.63 ns/op 336.60 ns/op 0.91
MutableVector 250000 toArray() 3.2803 ms/op 3.8228 ms/op 0.86
MutableVector 250000 iterate all - toArray() + loop 3.3186 ms/op 4.1505 ms/op 0.80
MutableVector 250000 iterate all - get(i) 1.5308 ms/op 1.7203 ms/op 0.89
Array 250000 create 2.8584 ms/op 3.8479 ms/op 0.74
Array 250000 clone - spread 1.3868 ms/op 1.5510 ms/op 0.89
Array 250000 get(125000) 1.1360 ns/op 1.3250 ns/op 0.86
Array 250000 set(125000) 4.2920 ns/op 4.8440 ns/op 0.89
Array 250000 iterate all - loop 165.59 us/op 170.22 us/op 0.97
effectiveBalanceIncrements clone Uint8Array 300000 34.985 us/op 42.643 us/op 0.82
effectiveBalanceIncrements clone MutableVector 300000 411.00 ns/op 463.00 ns/op 0.89
effectiveBalanceIncrements rw all Uint8Array 300000 195.31 us/op 209.49 us/op 0.93
effectiveBalanceIncrements rw all MutableVector 300000 85.805 ms/op 102.29 ms/op 0.84
phase0 afterProcessEpoch - 250000 vs - 7PWei 111.59 ms/op 121.75 ms/op 0.92
phase0 beforeProcessEpoch - 250000 vs - 7PWei 35.325 ms/op 62.490 ms/op 0.57
altair processEpoch - mainnet_e81889 482.26 ms/op 525.15 ms/op 0.92
mainnet_e81889 - altair beforeProcessEpoch 82.649 ms/op 88.546 ms/op 0.93
mainnet_e81889 - altair processJustificationAndFinalization 16.706 us/op 17.258 us/op 0.97
mainnet_e81889 - altair processInactivityUpdates 5.7322 ms/op 5.9194 ms/op 0.97
mainnet_e81889 - altair processRewardsAndPenalties 74.469 ms/op 86.144 ms/op 0.86
mainnet_e81889 - altair processRegistryUpdates 2.1210 us/op 2.4490 us/op 0.87
mainnet_e81889 - altair processSlashings 477.00 ns/op 583.00 ns/op 0.82
mainnet_e81889 - altair processEth1DataReset 522.00 ns/op 472.00 ns/op 1.11
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3610 ms/op 1.5867 ms/op 0.86
mainnet_e81889 - altair processSlashingsReset 3.7380 us/op 4.0850 us/op 0.92
mainnet_e81889 - altair processRandaoMixesReset 4.1100 us/op 7.2810 us/op 0.56
mainnet_e81889 - altair processHistoricalRootsUpdate 704.00 ns/op 749.00 ns/op 0.94
mainnet_e81889 - altair processParticipationFlagUpdates 1.6670 us/op 1.6460 us/op 1.01
mainnet_e81889 - altair processSyncCommitteeUpdates 732.00 ns/op 777.00 ns/op 0.94
mainnet_e81889 - altair afterProcessEpoch 125.49 ms/op 121.79 ms/op 1.03
capella processEpoch - mainnet_e217614 2.2529 s/op 2.4277 s/op 0.93
mainnet_e217614 - capella beforeProcessEpoch 478.60 ms/op 498.83 ms/op 0.96
mainnet_e217614 - capella processJustificationAndFinalization 16.351 us/op 17.702 us/op 0.92
mainnet_e217614 - capella processInactivityUpdates 17.184 ms/op 22.341 ms/op 0.77
mainnet_e217614 - capella processRewardsAndPenalties 507.83 ms/op 559.97 ms/op 0.91
mainnet_e217614 - capella processRegistryUpdates 16.882 us/op 21.769 us/op 0.78
mainnet_e217614 - capella processSlashings 559.00 ns/op 553.00 ns/op 1.01
mainnet_e217614 - capella processEth1DataReset 438.00 ns/op 516.00 ns/op 0.85
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.185 ms/op 7.9661 ms/op 1.40
mainnet_e217614 - capella processSlashingsReset 2.8250 us/op 3.4460 us/op 0.82
mainnet_e217614 - capella processRandaoMixesReset 7.0650 us/op 4.2390 us/op 1.67
mainnet_e217614 - capella processHistoricalRootsUpdate 692.00 ns/op 670.00 ns/op 1.03
mainnet_e217614 - capella processParticipationFlagUpdates 1.4730 us/op 1.4250 us/op 1.03
mainnet_e217614 - capella afterProcessEpoch 351.16 ms/op 316.89 ms/op 1.11
phase0 processEpoch - mainnet_e58758 472.44 ms/op 521.49 ms/op 0.91
mainnet_e58758 - phase0 beforeProcessEpoch 150.91 ms/op 134.71 ms/op 1.12
mainnet_e58758 - phase0 processJustificationAndFinalization 14.356 us/op 16.007 us/op 0.90
mainnet_e58758 - phase0 processRewardsAndPenalties 47.127 ms/op 69.606 ms/op 0.68
mainnet_e58758 - phase0 processRegistryUpdates 9.3030 us/op 14.387 us/op 0.65
mainnet_e58758 - phase0 processSlashings 578.00 ns/op 767.00 ns/op 0.75
mainnet_e58758 - phase0 processEth1DataReset 410.00 ns/op 556.00 ns/op 0.74
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0953 ms/op 1.3065 ms/op 0.84
mainnet_e58758 - phase0 processSlashingsReset 2.6510 us/op 3.9930 us/op 0.66
mainnet_e58758 - phase0 processRandaoMixesReset 4.3260 us/op 7.6160 us/op 0.57
mainnet_e58758 - phase0 processHistoricalRootsUpdate 545.00 ns/op 954.00 ns/op 0.57
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.5540 us/op 4.8770 us/op 0.73
mainnet_e58758 - phase0 afterProcessEpoch 105.24 ms/op 102.16 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3162 ms/op 1.9390 ms/op 0.68
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4372 ms/op 1.5096 ms/op 0.95
altair processInactivityUpdates - 250000 normalcase 31.578 ms/op 34.890 ms/op 0.91
altair processInactivityUpdates - 250000 worstcase 29.498 ms/op 29.297 ms/op 1.01
phase0 processRegistryUpdates - 250000 normalcase 9.1870 us/op 13.274 us/op 0.69
phase0 processRegistryUpdates - 250000 badcase_full_deposits 387.21 us/op 496.81 us/op 0.78
phase0 processRegistryUpdates - 250000 worstcase 0.5 131.71 ms/op 154.90 ms/op 0.85
altair processRewardsAndPenalties - 250000 normalcase 52.323 ms/op 93.881 ms/op 0.56
altair processRewardsAndPenalties - 250000 worstcase 74.948 ms/op 69.186 ms/op 1.08
phase0 getAttestationDeltas - 250000 normalcase 9.7973 ms/op 9.9947 ms/op 0.98
phase0 getAttestationDeltas - 250000 worstcase 9.1327 ms/op 9.8642 ms/op 0.93
phase0 processSlashings - 250000 worstcase 81.581 us/op 94.494 us/op 0.86
altair processSyncCommitteeUpdates - 250000 151.95 ms/op 171.20 ms/op 0.89
BeaconState.hashTreeRoot - No change 366.00 ns/op 735.00 ns/op 0.50
BeaconState.hashTreeRoot - 1 full validator 134.27 us/op 178.67 us/op 0.75
BeaconState.hashTreeRoot - 32 full validator 1.6968 ms/op 1.5230 ms/op 1.11
BeaconState.hashTreeRoot - 512 full validator 17.634 ms/op 16.386 ms/op 1.08
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 185.56 us/op 180.11 us/op 1.03
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5349 ms/op 2.5968 ms/op 0.98
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 31.518 ms/op 35.223 ms/op 0.89
BeaconState.hashTreeRoot - 1 balances 145.23 us/op 165.92 us/op 0.88
BeaconState.hashTreeRoot - 32 balances 1.4493 ms/op 1.5656 ms/op 0.93
BeaconState.hashTreeRoot - 512 balances 13.312 ms/op 14.922 ms/op 0.89
BeaconState.hashTreeRoot - 250000 balances 214.35 ms/op 226.61 ms/op 0.95
aggregationBits - 2048 els - zipIndexesInBitList 27.566 us/op 32.563 us/op 0.85
byteArrayEquals 32 74.088 ns/op 84.114 ns/op 0.88
Buffer.compare 32 54.643 ns/op 59.203 ns/op 0.92
byteArrayEquals 1024 2.0022 us/op 2.1418 us/op 0.93
Buffer.compare 1024 70.160 ns/op 71.892 ns/op 0.98
byteArrayEquals 16384 32.444 us/op 34.669 us/op 0.94
Buffer.compare 16384 258.16 ns/op 263.80 ns/op 0.98
byteArrayEquals 123687377 247.95 ms/op 271.47 ms/op 0.91
Buffer.compare 123687377 7.7054 ms/op 10.845 ms/op 0.71
byteArrayEquals 32 - diff last byte 72.477 ns/op 76.029 ns/op 0.95
Buffer.compare 32 - diff last byte 57.062 ns/op 59.018 ns/op 0.97
byteArrayEquals 1024 - diff last byte 2.0669 us/op 2.3970 us/op 0.86
Buffer.compare 1024 - diff last byte 73.755 ns/op 74.676 ns/op 0.99
byteArrayEquals 16384 - diff last byte 33.105 us/op 34.415 us/op 0.96
Buffer.compare 16384 - diff last byte 253.58 ns/op 290.66 ns/op 0.87
byteArrayEquals 123687377 - diff last byte 245.36 ms/op 283.27 ms/op 0.87
Buffer.compare 123687377 - diff last byte 7.1714 ms/op 9.0192 ms/op 0.80
byteArrayEquals 32 - random bytes 5.3150 ns/op 6.5690 ns/op 0.81
Buffer.compare 32 - random bytes 60.096 ns/op 64.829 ns/op 0.93
byteArrayEquals 1024 - random bytes 5.2020 ns/op 6.6690 ns/op 0.78
Buffer.compare 1024 - random bytes 60.169 ns/op 64.668 ns/op 0.93
byteArrayEquals 16384 - random bytes 5.2180 ns/op 6.7320 ns/op 0.78
Buffer.compare 16384 - random bytes 59.959 ns/op 65.066 ns/op 0.92
byteArrayEquals 123687377 - random bytes 8.5900 ns/op 10.910 ns/op 0.79
Buffer.compare 123687377 - random bytes 63.280 ns/op 74.600 ns/op 0.85
regular array get 100000 times 44.097 us/op 47.009 us/op 0.94
wrappedArray get 100000 times 44.291 us/op 46.996 us/op 0.94
arrayWithProxy get 100000 times 14.750 ms/op 14.800 ms/op 1.00
ssz.Root.equals 54.662 ns/op 55.693 ns/op 0.98
byteArrayEquals 53.566 ns/op 56.502 ns/op 0.95
Buffer.compare 11.714 ns/op 13.024 ns/op 0.90
shuffle list - 16384 els 8.6185 ms/op 9.6550 ms/op 0.89
shuffle list - 250000 els 126.48 ms/op 131.52 ms/op 0.96
processSlot - 1 slots 15.247 us/op 19.910 us/op 0.77
processSlot - 32 slots 3.1963 ms/op 3.5677 ms/op 0.90
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 59.740 ms/op 69.698 ms/op 0.86
getCommitteeAssignments - req 1 vs - 250000 vc 2.6625 ms/op 2.9163 ms/op 0.91
getCommitteeAssignments - req 100 vs - 250000 vc 3.8437 ms/op 4.1051 ms/op 0.94
getCommitteeAssignments - req 1000 vs - 250000 vc 4.1879 ms/op 4.5100 ms/op 0.93
findModifiedValidators - 10000 modified validators 357.20 ms/op 415.09 ms/op 0.86
findModifiedValidators - 1000 modified validators 203.75 ms/op 239.76 ms/op 0.85
findModifiedValidators - 100 modified validators 168.15 ms/op 302.08 ms/op 0.56
findModifiedValidators - 10 modified validators 184.02 ms/op 277.77 ms/op 0.66
findModifiedValidators - 1 modified validators 183.59 ms/op 263.35 ms/op 0.70
findModifiedValidators - no difference 196.52 ms/op 332.13 ms/op 0.59
compare ViewDUs 4.3483 s/op 5.8522 s/op 0.74
compare each validator Uint8Array 1.8476 s/op 1.6977 s/op 1.09
compare ViewDU to Uint8Array 1.0956 s/op 1.5546 s/op 0.70
migrate state 1000000 validators, 24 modified, 0 new 762.52 ms/op 995.02 ms/op 0.77
migrate state 1000000 validators, 1700 modified, 1000 new 1.1708 s/op 1.3296 s/op 0.88
migrate state 1000000 validators, 3400 modified, 2000 new 1.4525 s/op 1.6944 s/op 0.86
migrate state 1500000 validators, 24 modified, 0 new 762.65 ms/op 954.89 ms/op 0.80
migrate state 1500000 validators, 1700 modified, 1000 new 1.1878 s/op 1.4351 s/op 0.83
migrate state 1500000 validators, 3400 modified, 2000 new 1.5798 s/op 1.7685 s/op 0.89
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3600 ns/op 5.0300 ns/op 0.87
state getBlockRootAtSlot - 250000 vs - 7PWei 803.01 ns/op 784.93 ns/op 1.02
computeProposers - vc 250000 11.039 ms/op 10.264 ms/op 1.08
computeEpochShuffling - vc 250000 127.98 ms/op 133.83 ms/op 0.96
getNextSyncCommittee - vc 250000 155.97 ms/op 174.24 ms/op 0.90
computeSigningRoot for AttestationData 27.541 us/op 29.321 us/op 0.94
hash AttestationData serialized data then Buffer.toString(base64) 2.3404 us/op 2.5152 us/op 0.93
toHexString serialized data 1.0857 us/op 1.3027 us/op 0.83
Buffer.toString(base64) 220.37 ns/op 248.10 ns/op 0.89

by benchmarkbot/action


NOTE: Due to `top-level-await` used in one of dependent library, the package will not be available right after the load. You have to use a hack to clear up that await from the event loop.

```html
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to find a way to remove the need for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's in the bls library. @matthewkeil is working on a newer version. Hope that will solve this problem.

Copy link
Member

Choose a reason for hiding this comment

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

it will not. there will always be a top level await in esm because the bindings path is programmatic so its not imported it looked up and then await import(bindingLocation)

Copy link
Member

Choose a reason for hiding this comment

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

i suppose it would be possible in bls to use hard imports and then null-loader from weback to not include the other version for web. But for blst if we make it esm it will always have the top-level await for the import

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's possible avoid top-level-import, but then would have to leave upto user of the library to init where appropriate.

Copy link
Member

Choose a reason for hiding this comment

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

it will not. there will always be a top level await in esm because the bindings path is programmatic so its not imported it looked up and then await import(bindingLocation)

I think there is a difference between using top-level await and a ESM module without it. Eg. Node 22 will ship a new feature to require ES modules with the exception of the ones that use top-level await (see nodejs/node#51977).

In any case, we might wanna avoid top-level await in packages that are used by others.

Copy link
Member

Choose a reason for hiding this comment

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

I made the top-level await go away in blst fyi. so might be able to also do something similar in bls...

https://github.com/ChainSafe/blst-ts/blob/37b13881307ee4eb8fb8a4a84f6cafccfde5293c/lib/index.mjs#L7-10

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

Attention: Patch coverage is 58.62069% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 61.87%. Comparing base (1a7ea75) to head (6d5cec7).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6673      +/-   ##
============================================
+ Coverage     61.86%   61.87%   +0.01%     
============================================
  Files           557      562       +5     
  Lines         59219    59301      +82     
  Branches       1915     1916       +1     
============================================
+ Hits          36635    36695      +60     
- Misses        22541    22563      +22     
  Partials         43       43              

@nazarhussain nazarhussain marked this pull request as ready for review April 17, 2024 17:46
@nazarhussain nazarhussain requested a review from a team as a code owner April 17, 2024 17:46
@nazarhussain nazarhussain changed the title feat: add support for browser build for lightclient feat: add support for browser bundle for lightclient Apr 17, 2024
packages/light-client/src/index.browser.ts Outdated Show resolved Hide resolved
packages/light-client/vite.config.ts Outdated Show resolved Hide resolved
},
resolve: {
alias: {
"@chainsafe/bls/types": "@chainsafe/bls/types",
Copy link
Member

Choose a reason for hiding this comment

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

is this line needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we need it otherwise @chainsafe/bls/types map to @chainsafe/bls/herumi/types which is not available.

scripts/vite/plugins/blsBrowserPlugin.ts Outdated Show resolved Hide resolved
"@chainsafe/bls": "@chainsafe/bls/herumi",
// This is just used to generate `privateKey` which is not used in the browser.
"@chainsafe/bls-keygen": path.join(polyfillsDir, "bls-keygen.js"),
"@chainsafe/blst": emptyModulePath,
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't be there in the first place? Something to look after in a separate issue.

"@chainsafe/blst": emptyModulePath,
"@chainsafe/bls-hd-key": emptyModulePath,
crypto: emptyModulePath,
"node:crypto": emptyModulePath,
Copy link
Member

Choose a reason for hiding this comment

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

What does emptyModulePath do? Disable the whole thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It just replace an empty export export default {} in the bundle JS.

vite.base.config.ts Show resolved Hide resolved
Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

a lot of this is duplicated with what i did yesterday to get the tests to pass. would love to spend a few minutes deeper diving so this is where that work happens. instead of #6616

jeluard
jeluard previously approved these changes Apr 18, 2024
Copy link
Member

@jeluard jeluard left a comment

Choose a reason for hiding this comment

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

crypto striping sounds reasonable in the context of this bundle, although it makes sense to consider a more robust option longer term.

See #6684

@nazarhussain
Copy link
Contributor Author

crypto striping sounds reasonable in the context of this bundle, although it makes sense to consider a more robust option longer term.

Underlaying bls library uses it for private key generation. So we can't avoid it listing as dependency. But for light-client package we know we have nothing to do with private keys so we can exclude from bundle.

One other solution would be to have our own implementation for randomBytes in the BLS package then we can avoid using the crypto package completely.

@nazarhussain
Copy link
Contributor Author

a lot of this is duplicated with what i did yesterday to get the tests to pass

Yes that's what I was mentioning in our discussion yesterday that I am working on web bundle, that's doing exactly what we need to pass browser tests.

Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

Just have the questions about the named exports

@nazarhussain
Copy link
Contributor Author

Just have the questions about the named exports

Please check this thread #6673 (comment) Hope that will cover the point you are looking for.

wemeetagain
wemeetagain previously approved these changes Apr 19, 2024
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
matthewkeil
matthewkeil previously approved these changes Apr 26, 2024
Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

Looks really good!!! Approving but want to highlight to @wemeetagain and @philknows that we are broadcasting our actual beacon node URL in this PR.... not sure if that is a good idea or not. I would respectfully ask that they answer that before merging

@@ -48,7 +48,7 @@ lodestar lightclient \

## Light-Client Programmatic Example

For this example we will assume there is a running beacon node at `https://beacon-node.your-domain.com`
For this example we will assume there is a running beacon node at `https://lodestar-mainnet.chainsafe.io`
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure we want to broadcast this URL? @philknows @wemeetagain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These URLs are already been shown and used in the light client demo, so if one want's to use they would have already gotten it from the demo page.

image

If anyone have different opinion we can revert it in other PR.


const config = getChainForkConfigFromNetwork("mainnet");
const logger = getConsoleLogger({logDebug: Boolean(process.env.DEBUG)});
const api = getApiFromUrl({urls: ["https://lodestar-mainnet.chainsafe.io"]}, {config});
Copy link
Member

Choose a reason for hiding this comment

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

Same question about using our real URL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to have an example which people can run by just copying the code. We have similar pattern in the prover already but pointing to sepolia url.

Copy link
Member

Choose a reason for hiding this comment

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

I think that is a fine idea.... just not our mainnet nodes

Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

LGTM!! 🎸

@nazarhussain nazarhussain merged commit 02e28cf into unstable Apr 26, 2024
18 of 20 checks passed
@nazarhussain nazarhussain deleted the nh/lightclient-browser-build branch April 26, 2024 11:18
wemeetagain added a commit that referenced this pull request Jun 7, 2024
* chore: n-historical state - track state persist count per epoch (#6699)

* feat: add lodestar binaries to release (#6666)

* feat: added binaries creation support

* feat: added sanity checks

* chore: define reusable workflow

* chore: fix sanity check,; disable arm64

* chore: added workflow_dispatch

* fix: needs cleanup

* chore: update old space size

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: address comments

* chore: address comments

* chore: fixed typo

* chore: typo

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: address comments

* chore: wording

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: use frozen lock file

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* feat: switch bls to napi rebuild (#6616)

* chore: update package.json deps and run yarn

* feat: remove unused blst config from vitest.browser.*.config.ts

* test: move G2@INF test to base blst repo.  No longer exported.

* fix: add Uint8Array.from for Buffer return value in unit test so type matches for toEqual

* refactor: update imports of CoordType to use bls instead of blst

* feat: add blsAddVerificationRandomness cli option

* feat: add randomBytesNonZero to utils

* feat: implement verification randomness for same message

* feat: implement napi blst and switch to libuv worker pool

* chore: lint

* fix: update comments for availableParallelism

* feat: set UV_THREADPOOL_SIZE for perf tests

* feat: set UV_THREADPOOL_SIZE=$(nproc) in lodestar entrance script

* feat: remove case for serialized PublicKey in deserializeSet

* feat: add back workBusy count logic to canAcceptWork

* feat: automatically set threadpool size in beaconHandler

* refactor: rename flag to disableSameMessageVerificationRandomness

* fix: remove UV_THREADPOOL_SIZE from ./lodestar

* docs: add TODO about updating metrics

* fix: make benchmark multi threading cross-compatible

* chore: add bls@8.0.0

* feat: default to added randomness

* feat: add warning for no same message randomness

* fix: passing to updated bls functions

* feat: add blst peerDep

* fix: default to same message randomness

* chore: update yarn.lock

* chore: remove unused function to clear lint

* feat: break out setThreadPoolSize

* docs: update packages/cli/src/cmds/beacon/setThreadPoolSize.ts

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: update location for blst dep

* chore: run lint again

* fix: remove peerDep from light-client

* test: fix browser based tests

* fix: bad relative imports

* docs: add note to readme about switchable bls

* docs: typo

* chore: lint readme

* fix: light-client unit tests

* fix: light-client e2e test

* feat: remove disableSameMessageVerificationRandomness

* refactor: remove unused type

* docs: update wordlist

* fix: e2e tests

* Lint package.json

* Revert "fix: e2e tests"

This reverts commit f71acd7.

* Revert "fix: light-client e2e test"

This reverts commit 23c11f0.

* Revert "fix: light-client unit tests"

This reverts commit fa7893e.

* Revert "test: fix browser based tests"

This reverts commit 98d04ab.

* docs: update readme to remove switchable bls argument

* fix: replace optimizeDeps in vitest.browser.config

* chore: updated to bls 8.1.0

* feat: move setting threadpool size and warnings to applyPreset.ts

* fix: remove setThreadpoolSize from beacon handler

* feat: move libuv size logging into handler to use logger

* refactor: rename applyPreset to preInitialization

* refactor: logging about pool size

* Update packages/cli/src/options/globalOptions.ts

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* refactor: rename prover applyPreset

* docs: change comment in cli/index

* fix: update logging for

* fix: throw error for invalid uvThreadpoolSize

* Update packages/cli/src/preInitialization.ts

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* Fix lint issues

* Remove unused import

* refactor: move bls pool logging back to multithread.ts

* fix: log of threadcount

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: update references to consensus spec to v1.4.0 (#6704)

* chore: update references to consensus spec to v1.4.0

* Remove unintended formatting changes

* chore: update consensus spec version in README (#6705)

* docs: correct plausible url (#6709)

fix: correct plausible url

* docs: incorrect scripts location (#6710)

fix: incorrect scripts location

* docs: no more broken images (#6708)

* fix: no more broken images

* fix: incorrect paths

* feat: check aggregationBits length of `SignedAggregateAndProof` in gossip validation (#6700)

* Add unit test

* Update packages/beacon-node/src/chain/validation/aggregateAndProof.ts

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* feat: add and track blob source for metrics (#6628)

* feat: add and track blob source for metrics

* adding blobsSource for blobsPromise

* address feedback

* apply feedback

* updates

* only allow non blobspromise blocks to be imported

* feat: add support for browser bundle for lightclient (#6673)

* Reorganize the code so it is accessible from one package

* Add support for browser build for lightclient

* Update the build config

* Improve the bls vite plugin

* Restructure the vite and vitest scripts

* Simplify vite config

* Remove unused polyfill

* Fix the doc lint error

* Add support for bundle test

* Update the package json files

* Add dist build to default build task

* Fix spelling in the docs

* Fix the lint error

* Fix type error

* Disable eslint errors

* Increase the timeout for bundle test

* Fix eslint bundle

* Fix lint warning

* Remove the unused config

* Add the default export to bundle

* Enable compression on th build

* Update packages/light-client/README.md

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* Increase timeout for one test

* Optimize package build task

* Update the readme

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* docs: fix plausible domain (#6712)

* ci: add paths-ignore to workflows (#6713)

* chore: added paths-ignore

* chore: address comments

* feat: add arm64 binary support (#6707)

* feat: add arm64 binary support

* chore: workaround yarn

* chore: add comment

* chore: workaround runner limitations

* ci: publish binaries for release candidates (#6714)

* feat: add types support to esm bundle for lightclient (#6685)

* Add vite dts plugin

* Restructure types export

* Update vite build config

* Remove unused file

* Update the build process

* Fix doc formatting

* Build the dist for type tests

* chore: update vitest (#6718)

Update vitest

* chore: do not build all binaries atomically (#6719)

* feat: update libp2p deps (#6711)

* feat: update libp2p deps

* chore: fix linter/type errors

* chore(deps): bump ejs from 3.1.9 to 3.1.10 (#6721)

Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

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

* chore: revert "ci: add paths-ignore to workflows (#6713)" (#6730)

Revert "ci: add paths-ignore to workflows (#6713)"

This reverts commit e460bb1.

* docs: restore docs pages lost during docusaurus migration (#6725)

* ci: fix incorrect build caching (#6731)

fix: incorrect build caching

* fix: build error log during esm bundle build (#6737)

Fix build error

* chore: update fastify to v4.27.0 (#6740)

* deps: upgrade vitest minor version (#6745)

Upgrade vitest

* chore: warn when heap limit is too low (#6722)

* chore: warn when heap limit is too low

* chore: units

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: address comments

* chore: added faq element

* chore: address comments

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: address comments

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: address comments

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* feat: disable flood publish (#6755)

* feat: disable flood publish

* feat: add network.disableFloodPublish cli flag

* chore: address PR comments

* test: allow compact diff for test failures (#6783)

* Allow the compact diff for tests

* Update the doc

* Update docs/pages/contribution/testing/index.md

Co-authored-by: Julien <jeluard@users.noreply.github.com>

* Fix linting on docs

* Fix linting

---------

Co-authored-by: Julien <jeluard@users.noreply.github.com>

* chore: upgrade classic-level (#6793)

* chore: upgrade classic-level

* chore: address comments

* feat(prover): support non-mutated verification provider in prover (#6727)

* Restructure the assertions

* Add an inspector to run the logic to detect providers

* Update web3 provdier logic to use inspetor

* Fix the types for proxy

* Make the default type for mutation

* Rename elrpc to elrpcprovider

* Apply suggestions from code review

Co-authored-by: Julien <jeluard@users.noreply.github.com>

* Fix build error

* Update the readme doc

* Apply suggestions from code review

Co-authored-by: Julien <jeluard@users.noreply.github.com>

* Fix the docs linting

* Add missing words

---------

Co-authored-by: Julien <jeluard@users.noreply.github.com>

* docs: added debugging section (#6743)

* docs: added debugging section

* chore: spell checks

* chore: added extra docs

* chore: address comments

* chore: added extra configuration

* chore: updated docs

* chore: added extra configuration

* chore: fix lint

* chore: fix typos

* chore: .gitignore

* chore: address comments

* chore: address comments

* chore: review debugging section PR (#6807)

* chore: update the naming conventions used in sim tests (#6805)

* Rename simulation test to crucible

* Rename SimulationEnvironment to Simulation

* Use consistent function names

* Update readme

* Rename interfaces for consistent pattern

* Fix lint error

* feat: recognize grandine from agentVersion (#6808)

* Add grandine

* add grandine to wordlist

* chore: refactor event loop interactions (#6806)

* chore: refactor sleep(0) usage

* chore: refactor setTimeout

* chore: address comments

* chore: cleanup

* Apply suggestions from code review

---------

Co-authored-by: Cayman <caymannava@gmail.com>

* chore: fix broken docker (#6813)

* chore: log newPayload engine api (#6810)

* chore: add `get_proposer_head` check in fork choice spec test (#6814)

* Check get_proposer_head

* Fix enum typo

* lint

* chore: consolidate classic-level usage (#6795)

* chore: do not rely on leveldown

* chore: replace level with classic-level

* chore: added docker support for osx (#6696)

* chore: added docker support for osx

* chore: address comments

* chore: address comments

* Update docker-compose.yml

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: address comments

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: fix vitest performance with spec tests artifacts in place (#6817)

Fix vitest performance with spec tests in place

* chore: clean up yarn lockfile (#6816)

* feat: disable flood publish by default (#6815)

* feat: use @chainsafe/blst directly (#6706)

* feat: use @chainsafe/blst directly

* chore: update to blst@1.0.1

* refactor: remove randomBytesNonZero and user blst exported version

* chore: update blst references

* test: catch invalid deserialization in spec tests and return false

* feat: create signatureFromBytes and signatureFromBytesNoCheck in utils package

* feat: implement signatureFromBytes from utils package

* feat: implement signatureFromBytes everywhere

* fix: light-client empty module for blst

---------

Co-authored-by: matthewkeil <me@matthewkeil.com>

* fix: avoid Buffer.from copies (#6723)

* fix: avoid Buffer.from copies

* chore: simplify shuffling

* fix: use subarray instead of slice in shuffling

* chore: remove unnecessary devDependencies

* chore: rely on fastify 4.x behavior

* chore: avoid copy in verifyMerkleBranch

* use toBase64

* relax assertions in shuffle function

* Update packages/state-transition/src/util/shuffle.ts

Co-authored-by: twoeths <tuyen@chainsafe.io>

---------

Co-authored-by: twoeths <tuyen@chainsafe.io>

* chore: update nodejs to latest 22 (#6729)

* Upgrade node js version to 22

* Update node types

* Revert action config

* Add package from git hash

* Fix the build error

* Update the docs for node-22

* Update docker version for Nodejs to 22

* Update package.json

* Update package.json

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* Update readme docs

* Add word in dictionary

* Add word in dictionary

---------

Co-authored-by: Cayman <caymannava@gmail.com>
Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* deps: update systeminformation to 5.22.9 (#6823)

* chore: add distutils to build phase of Dockerfile (#6845)

* test: increase timeout of keystore tests (#6846)

* test: increase timeout of keystore cache tests

* Increase hook timeout

* Consistent number formatting

* chore: only log warning if media type is not supported (415) (#6847)

* fix: revert napi bls (#6853)

* Revert "feat: use @chainsafe/blst directly (#6706)"

This reverts commit 66fe753.

* Revert "feat: switch bls to napi rebuild (#6616)"

This reverts commit 97d9aa8.

* chore: bump package versions to 1.19.0

* chore: bump @chainsafe/blst to v0.2.11 (#6856)

* fix: arm64 binaries creation issue (#6858)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tuyennhv <tuyen@chainsafe.io>
Co-authored-by: Julien <jeluard@users.noreply.github.com>
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
Co-authored-by: Matthew Keil <me@matthewkeil.com>
Co-authored-by: NC <adrninistrator1@protonmail.com>
Co-authored-by: g11tech <develop@g11tech.io>
Co-authored-by: Nazar Hussain <nazarhussain@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.19.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.

None yet

5 participants