You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
Overview
The main checklist for tracking what needs to get done to get this working.
Components
Tasks
no_std/wasm
compilation in a substrate node runtime.EthClientPalletTrait
forEthClientPallet
(used to interface with pallet from relayer)Eth2SubstrateRelay
into aLightClientRelayer
service using our relayer software.pallet-eth2-light-client
and subxtMock 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 asEth2Client
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 thepallet
as adev-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.
The text was updated successfully, but these errors were encountered: