https://github.com/tangle-network/pallet-eth2-light-client
A Substrate pallet implementing an ETH2 Beacon Chain light client
https://github.com/tangle-network/pallet-eth2-light-client
blockchain eth2 ethereum light-client polkadot substrate substrate-pallet
Last synced: 6 months ago
JSON representation
A Substrate pallet implementing an ETH2 Beacon Chain light client
- Host: GitHub
- URL: https://github.com/tangle-network/pallet-eth2-light-client
- Owner: tangle-network
- License: gpl-3.0
- Created: 2022-09-18T18:10:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-06T15:36:32.000Z (about 1 year ago)
- Last Synced: 2024-10-10T05:29:23.775Z (8 months ago)
- Topics: blockchain, eth2, ethereum, light-client, polkadot, substrate, substrate-pallet
- Language: Rust
- Homepage:
- Size: 8.2 MB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Eth2 Light Client Relayer
[](https://opensource.org/licenses/Apache-2.0)[](https://twitter.com/webbprotocol)[](https://t.me/webbprotocol)[](https://discord.gg/cv8EfJu3Tn)
### Getting Started
An eth2 -> tangle network relayer for syncing EVM data on Tangle.### Prerequisites
This repo uses Rust so it is required to have a Rust developer environment set up. First install and configure rustup:
```bash
# Install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Configure
source ~/.cargo/env
```Configure the Rust toolchain to default to the latest stable version:
```bash
rustup default stable
rustup update
```Great! Now your Rust environment is ready!
---
### Tangle Setup
#### 1. Clone Tangle
```bash
git clone https://github.com/webb-tools/tangle.git
cd tangle
cargo build --release -p tangle-standalone
```
#### 2. Run Tangle Network
```bash
./scripts/run-standalone-local.sh --clean
```
Note that this will start a clean network state, if you want to continue running on an old state (using old database)
just omit the `--clean` flag.#### 3. Insert Key
```bash
echo "gown surprise mirror hotel cash alarm raccoon you frog rose midnight enter//webb//0" &> /tmp/empty/secret_key
```
---### Light Client Setup
#### 1. Install Git LFS
Before getting started, make sure you have [Git LFS installed](../../topics/git/lfs/index.md) in your computer. Open a terminal window and run:
```shell
git-lfs --version
```If it doesn't recognize this command, you must install it. There are
several [installation methods](https://git-lfs.com/) that you can
choose according to your OS. To install it with Homebrew:```shell
brew install git-lfs
```Once installed, **open your local repository in a terminal window** and
install Git LFS in your repository. If you're sure that LFS is already installed,
you can skip this step. If you're unsure, re-installing it does no harm:```shell
git lfs install
```#### 2. Configure light client
```bash
# Edit configuration as required
eth2substrate-block-relay-rs/config.toml
```
#### 3. Set Infura API Key
```bash
export ETH1_INFURA_API_KEY="your_infura_key"
```#### 4. Build Light client
```bash
cargo build --release -p node-template
```#### 5. Run light client
```bash
./target/release/node-template --tmp --chain local --alice \
--rpc-cors all --rpc-external --rpc-methods=unsafe \
--port 30433 \
--light-client-init-pallet-config-path=./crates/eth2-pallet-init/config.toml \
--light-client-relay-config-path=./eth2substrate-block-relay-rs/config.toml
--rpc-port 9444
```---
## Contributing
Interested in contributing to the Webb Eth2 light client relayer? Thank you so much for your interest! We are always appreciative for contributions from the open-source community!
If you have a contribution in mind, please check out our [Contribution Guide](./.github/CONTRIBUTING.md) for information on how to do so. We are excited for your first contribution!
## License
Licensed under GNU General Public License v3.0.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the GNU General Public License v3.0 license, shall be licensed as above, without any additional terms or conditions.