A fast, secure, and portable light client for Ethereum
Go to file
Noah Citron 4444148f71
feat: handle full tx blocks (#75)
* fix: implement full tx blocks

* better error handling

* fix tests
2022-10-27 13:46:32 -04:00
.github/workflows fix: release ci (#72) 2022-10-25 19:27:33 -04:00
cli refactor: rename to helios #70) 2022-10-25 18:23:43 -04:00
client feat: handle full tx blocks (#75) 2022-10-27 13:46:32 -04:00
common fix: better bootstrap error message (#71) 2022-10-25 19:10:49 -04:00
config refactor: rename to helios #70) 2022-10-25 18:23:43 -04:00
consensus fix: better bootstrap error message (#71) 2022-10-25 19:10:49 -04:00
execution feat: handle full tx blocks (#75) 2022-10-27 13:46:32 -04:00
heliosup refactor: rename to helios #70) 2022-10-25 18:23:43 -04:00
.gitignore setup api bindings for reaching out to light servers 2022-08-11 14:09:58 -04:00
Cargo.lock refactor: rename to helios #70) 2022-10-25 18:23:43 -04:00
Cargo.toml refactor: switch execution rpc to ethers (#13) 2022-09-06 13:57:47 -04:00
LICENSE documentation: add license (#74) 2022-10-26 16:20:57 -04:00
README.md documentation: write readme (#73) 2022-10-26 16:12:35 -04:00

README.md

Helios

build License: MIT

Helios is a fully trustless, efficient, and portable Ethereum light client written in Rust.

Helios converts an untrusted centralized RPC endoint into a safe unmanipulable local RPC for its users. It syncs in seconds, requires no storage, and is lightweight enough to run on mobile devices.

The entire size of Helios's binary is 13Mb and should be easy to compile into WebAssembly. This makes it a perfect target to embed directly inside wallets and dapps.

Installing

First install heliosup, Helios's installer:

curl https://github.com/a16z/helios/blob/master/heliosup/install | bash

To install Helios, run heliosup.

Usage

To run Helios, run the below command, replacing $ETH_RPC_URL with an RPC provider URL such as Alchemy or Infura:

helios --consensus-rpc https://www.lightclientdata.org --execution-rpc $ETH_RPC_URL

Helios will now run a local RPC server at http://127.0.0.1:8545.

Additional Options

--checkpoint or -w can be used to set a custom weak subjectivity checkpoint. This must be equal the first beacon blockhash of an epoch. Weak subjectivity checkpoints are the root of trust in the system. If this is set to a malicious value, an attacker can cause the client to sync to the wrong chain. Helios sets a default value initially, then caches the most recent finalized block it has seen for later use.

--network or -n sets the network to sync to. Current valid option are mainnet and goerli, however users can add custom networks in their configurationf files.

--rpc-port or -p sets the port that the local RPC should run on. The default value is 8545.

Configuration Files

All configuration options can be set on a per-network level in ~/.helios/helios.toml. Here is an example config file:

[mainnet]
consensus_rpc = "https://www.lightclientdata.org"
execution_rpc = "https://eth-mainnet.g.alchemy.com/v2/XXXXX"
checkpoint = "0x85e6151a246e8fdba36db27a0c7678a575346272fe978c9281e13a8b26cdfa68"

[goerli]
consensus_rpc = "http://testing.prater.beacon-api.nimbus.team"
execution_rpc = "https://eth-goerli.g.alchemy.com/v2/XXXXX"
checkpoint = "0xb5c375696913865d7c0e166d87bc7c772b6210dc9edf149f4c7ddc6da0dd4495"

Contributing

All contributions to Helios are welcome. Before opening a PR, please submit an issue detailing the bug or feature. When opening a PR, please ensure that your contribution builds on the nightly rust toolchain, has been linted with cargo fmt, and contains tests when applicable.