Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

A C# implementation of the Altair Minimal specification, also known as a consensus layer light client.

Notifications You must be signed in to change notification settings

uink45/Beacon-Chain-Light-Client-Prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lantern.

This is a C# implementation of the Altair Minimal Light Client Specification, also known as a light client for the consensus layer. If interested in learning more about light clients in Ethereum, I have written an introductory article, explaining how they work.

Functionality

Currently, the prototype can track the latest block header in the beacon chain. It achieves this by initializing from a trusted snapshot to know the current sync committee. The snapshot is verified by checking whether the current sync committee branch is valid. It then trustlessly verifies the upcoming block headers by checking if the sync committee signature is valid and enough validators had signed.

Requirements

Before Running

To initialize and sync with the beacon chain, the light client requires a local server to send REST-API requests. The server is a modified version of the Lodestar beacon chain client, available to download from the Light-Client-Server repository. Enter the following commands in the command prompt to initilialise the server:

yarn install
node --trace-deprecation --max-old-space-size=6144 packages/cli/bin/lodestar beacon --eth1.enabled false --network mainnet --weakSubjectivityServerUrl https://21qajKWbOdMuXWCCPEbxW1bVPrp:[email protected] --weakSubjectivitySyncLatest true --api.rest.api "lightclient" "beacon"

After it has subscribed to gossip core topics and reached Synced status, follow the commands below to initialize the light client.

Installation & Running

git clone https://github.com/uink45/Beacon-Chain-Light-Client-Prototype.git
cd Beacon-Chain-Light-Client-Prototype/Lantern
dotnet build
dotnet run

After running the commands above, head to https://localhost:5001/.

About

A C# implementation of the Altair Minimal specification, also known as a consensus layer light client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published