Giter Site home page Giter Site logo

ggxchain / pallet-eth2-light-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webb-tools/pallet-eth2-light-client

0.0 0.0 1.0 8.93 MB

A Substrate pallet implementing an ETH2 Beacon Chain light client

License: GNU General Public License v3.0

Shell 0.60% Rust 99.11% Nix 0.29%

pallet-eth2-light-client's Introduction

Eth2 Light Client Relayer

License Apache 2.0TwitterTelegramDiscord

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:

# 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:

rustup default stable
rustup update

Great! Now your Rust environment is ready!


Tangle Setup

1. Clone Tangle

git clone https://github.com/webb-tools/tangle.git
cd tangle
cargo build --release -p tangle-standalone

2. Run Tangle Network

./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

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 in your computer. Open a terminal window and run:

git-lfs --version

If it doesn't recognize this command, you must install it. There are several installation methods that you can choose according to your OS. To install it with Homebrew:

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:

git lfs install

2. Configure light client

# Edit configuration as required
eth2substrate-block-relay-rs/config.toml

3. Set Infura API Key

export ETH1_INFURA_API_KEY="your_infura_key"

4. Build Light client

cargo build --release -p node-template

5. Run light client

./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 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.

pallet-eth2-light-client's People

Contributors

drewstone avatar salman01zp avatar 1xstj avatar akileshtangella avatar baidang201 avatar akorchyn avatar shekohex avatar tbraun96 avatar

Forkers

liquid369

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.