Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/commonprefix/kevlar
Light client-based RPC Proxy for PoS Ethereum
https://github.com/commonprefix/kevlar
blockchain ethereum lightclient optimistic proof-of-stake superlight sync-client sync-committee
Last synced: 3 months ago
JSON representation
Light client-based RPC Proxy for PoS Ethereum
- Host: GitHub
- URL: https://github.com/commonprefix/kevlar
- Owner: commonprefix
- Created: 2022-09-15T02:30:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-22T12:59:46.000Z (over 1 year ago)
- Last Synced: 2024-05-29T09:28:36.589Z (8 months ago)
- Topics: blockchain, ethereum, lightclient, optimistic, proof-of-stake, superlight, sync-client, sync-committee
- Language: TypeScript
- Homepage:
- Size: 1.17 MB
- Stars: 259
- Watchers: 12
- Forks: 24
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-web3-tools-and-dapps - Kevlar - A nearby RPC proxy for Ethereum wallets that use proof of stake or post-merge. (dApps directory / Wallet Security Tools)
README
# Kevlar
[![Join the chat at https://discord.gg/ePV3prSPGW](https://img.shields.io/badge/chat-on%20discord-blue.svg)](https://discord.gg/ePV3prSPGW)
![KevlarArchitecture](./kevlar-architecture.png)Kevlar is a CLI tool to run a light client-based RPC Proxy for PoS Ethereum. Kevlar can be used to make your Metamask or any RPC-based wallet completely trustless! Kevlar first syncs to the latest header of the beacon chain and then starts an RPC server. This local RPC server can be added to MetaMask or any other RPC-based wallet. Every RPC call made by the wallet is now verified using Merkle Inclusion proofs to the latest block header. Currently Kevlar supports two kinds of sync methods: the **Light Sync** based on the light client sync protocol specified by the Ethereum Specification and the **Optimistic Sync** (which is 100x faster than Light Sync) based on construction from the research paper [Proofs of Proof of Stake in Sublinear Complexity](https://arxiv.org/abs/2209.08673).
### Start the RPC Proxy
```bash
npm i -g @lightclients/kevlar
kevlar
```The RPC is now available at `http://localhost:8546`. Add this local network to MetaMask.
```bash
kevlar --help
Options:
--help Show help [boolean]
--version Show version number [boolean]
-n, --network chain id to start the proxy on (1, 11155111) [choices: 1, 11155111]
-c, --client type of the client [choices: "light", "optimistic"]
-o, --provers comma separated prover urls
-u, --rpc rpc url to proxy
-p, --port port to start the proxy [number]
-a, --beacon-api beacon chain api URL
```### Build Locally
Clone the repo and perform the following commands
```bash
yarn install
yarn build
```### Run Server
```bash
cp .env.example .env
yarn start
```### Deploy Server to Heroku
```bash
bash src/provers/light-optimistic/deploy-heroku.sh
```### Deploy to Docker
```bash
docker run -p 8546:8546 --name kevlar shresthagrawal/kevlar
curl -X POST --header "Content-type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:8546/
```