GithubHelp home page GithubHelp logo

upendra-jaiswal / trustless-generic-relayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wormhole-foundation/trustless-generic-relayer

0.0 0.0 0.0 5.36 MB

fr fr

License: Other

Shell 0.84% TypeScript 31.00% Makefile 0.44% Dockerfile 0.05% Solidity 67.67%

trustless-generic-relayer's Introduction

Generic Relayers

Objective

Develop a common standard for a cross-chain relaying system that any application can interface with on-chain to enable better composability.

Background

In the current design of Wormhole, user applications have 2 options to relay messages across chains - (1) users manually redeem messages and (2) applications build and maintain a specialized relayer network.

Both of these paradigms present shortcomings for users and integrators respectively. For users, there is an added friction in the UX in the form of an additional interaction and requirement of owning assets on both the source and destination chain to pay for gas. For integrators, specialized relayers represent another piece of infrastructure that represents additional liveness and potential legal responsibility.

A decentralized network of generic relayers can address the shortcomings of both of the two current relaying methods by handling the cross-chain message redemption and submission on behalf of users and be a separate decentralized service that integrators can leverage.

Fundamentally, the relayer service should require no additional trust assumptions from the integrating contract's perspective. This service should merely serve as a third delivery mechanism option without changing any composing protocol's messaging. See the best practices for protocol design.

Goals

  • Allow developers to send and receive cross-chain messages through on-chain entrypoints to Wormhole.
  • Develop relayers that are capable of redeeming and submitting full or subset of Batch VAAs.
  • Provide a composable, trustless relaying service in line with the Wormhole ecosystem.

Non-Goals

  • Design the economic incentives on how relayers should be incentivized in systems. We support a multitude of solutions to compete for the best solutions.
  • Provide modularity that allows developers to specify additional off-chain computation on VAAs prior to submission on-chain.

Overview

Generic relayers consist of three components:

  1. CoreRelayer contract lives on all chains that integrators interact with to request for a generic relayer to deliver a cross-chain message.
  2. GasOracle contract lives on all chains that provides an estimate to the gas costs associated with a particular cross-chain message. This is a critical function to ensure that users/applications are appropriately covering the costs that relayers face when submitting a transaction on the destination chain.
  3. Off-chain Relayer that listens for VAAs that it is assigned to, redeems the VAA from the Guardian Network, and submits the VAA on the destination chain.

Detailed Design

The interface to the Generic Relayer can be found here

Local Node Tests

In the ethereum directory, run make build then make test to perform both Forge and local validator tests.

To run the Forge tests only, run forge test.

To run the local node (anvil) tests, run make integration-test.

Tilt Integration Tests

To deploy everything to Tilt, run make tilt-deploy.

Bring up tilt from the scratch/batch_vaa_integration branch found here

Run make tilt-test to start the off-chain relayer, and run the integration tests

trustless-generic-relayer's People

Contributors

derpy-duck avatar joehowarth avatar scnale avatar chase-45 avatar gabzim avatar gator-boi avatar a5-pickle avatar dependabot[bot] avatar justinschuldt avatar agodnic avatar evan-gray avatar omahs avatar wonge97 avatar

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.