# ZK Light Client for Ethereum
Light Clients are scaled down versions of full nodes just verifying block headers. This enables anyone running a light client to sync with the network without the requirement of having all the data on the blockchain.
<!-- ## Goal:
A protocol which:
1. Verifies consensus of blocks from Ethereum on to the target chain.
2. Verifies state proofs from Ethereum on the target chain
-->
On a high level, a light clients needs to verify two things:
1. Validator Signatures
2. Validator Set Commitment

### Signature Aggregation Proof
```
def verifyHeaderSignatures():
public input header
public input publicKeysCommitment
private input aggregateSignature
private input participationBitmap
private input publicKeys
# PoseidonHash is a hash function cheap to compute inside zkSNARKs
assert publicKeysCommitment == PoseidonHash(publicKeys)
aggregatePublicKey = aggregate(participationBitmap, publicKeys)
assert BLSSignatureVerify(header, aggregateSignature, aggregatePublicKey)
return sum(participationBitmap) # num of validators who signed
```
### Sync Committee SSZ Proof
```
def mapSSZToPoseidonCommitment():
public input finalizedHeader # already validated in smart contract
private input publicKeys
private input aggregatePublicKey
sszRootPublicKeys = SSZ(publicKeys, aggregatePublicKey)
# SNARK-friendly commitment used in verifyHeaderSignatures
poseidonRoot = PoseidonHash([publicKeys, aggregatePublicKey])
assert finalizedHeader.nextSyncCommitteeRoot == sszRootPublicKeys
return sszRootPublicKeys, poseidonRoot
```
Succinct Labs has already implemented this using circom. But we can take advantage of advnces in ZK SNARK tech and use a much faster proving system like Halo2 or Plonky2 to implement Ethereum PoS inside a SNARK.
Ingredients:
1. Pairing library for BLS12-381 (verifying aggregated signatures)
2. SHA-256 implemention (Proving Sync Committee SSZ)
## References
1. https://blog.succinct.xyz/endgame/
2. https://blog.succinct.xyz/proof-of-consensus/
3. https://ethresear.ch/t/zkpos-with-halo2-pairing-for-verifying-aggregate-bls-signatures/14671