Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

[CHECKLIST] ETH2 light client on substrate using Rainbow Bridge #13

Closed
8 of 10 tasks
drewstone opened this issue Nov 13, 2022 · 0 comments
Closed
8 of 10 tasks

[CHECKLIST] ETH2 light client on substrate using Rainbow Bridge #13

drewstone opened this issue Nov 13, 2022 · 0 comments
Assignees

Comments

@drewstone
Copy link
Contributor

drewstone commented Nov 13, 2022

Overview

The main checklist for tracking what needs to get done to get this working.

Components

  1. Pallet
  2. Types libraries (pulled from lighthouse / rainbow-bridge
  3. Relayer service (pulled from rainbow-bridge, using webb-relayer)
  4. Substrate client lib to interact with pallet (subxt)

Tasks

  • Pallet scaffold
  • Pallet preliminary tests
  • Pallet no_std/wasm compilation in a substrate node runtime.
  • Implement EthClientPalletTrait for EthClientPallet (used to interface with pallet from relayer)
  • Integrate Eth2SubstrateRelay into a LightClientRelayer service using our relayer software.
  • [TASK] Test relayer libraries w/ pallet directly using a mocked runtime #22
  • Integration test relayer w/ local chain with pallet-eth2-light-client and subxt
  • Stable subxt, pallet, relayer dependencies
  • Pallet built and tested (continue updating against any changes to rainbow-bridge)
  • Light client relayer crates building and tested (continue updating against any changes to eth2near-relay)

Mock testing

Testing pallet in Substrate usually starts with unit tests against a mocked runtime. You can find the mocked runtime for the light client inside the pallet directly, https://github.com/webb-tools/pallet-eth2-light-client/blob/drew/relay/pallet/src/mock.rs. Specifically, the mocked runtime has a user-defined struct such as Eth2Client that can be manipulated to interact with the pallet's API directly.

For mocked testing, we would likely import the eth2substrate-block-relay-rs library into the pallet as a dev-dependency and then run the relayer in the pallet testing environment.

Integration testing

Testing the pallet as an integration test will require integrating it into a full Substrate node. This testing setup will require running a live node adjacent to the relayer/tests of the relayer. Integration testing should only be done using subxt which is the library for making remote calls to a Substrate chain.

@dutterbutter dutterbutter assigned tbraun96 and unassigned 1xstj Dec 19, 2022
@github-project-automation github-project-automation bot moved this to Not Started 🕧 in Webb Universe Mar 6, 2023
@dutterbutter dutterbutter moved this from Not Started 🕧 to Building 🏗️ in Webb Universe Mar 6, 2023
@github-project-automation github-project-automation bot moved this from Building 🏗️ to Completed ✅ in Webb Universe Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants