Coder Social home page Coder Social logo

xcm-simulator's Introduction

XCM Simulator

Test kit to simulate cross-chain message passing and XCM execution.

Different level of simulation are provided: xcm-simulator and xcm-emulator.

xcm-simulator

UPDATE: xcm-simulator has been merged into Polkadot repo, and not actively maintained here anymore.

xcm-simulator uses mock relay chain and parachain runtime. It allows minimum runtime modules for XCM testing and playground, and thus has less compiling overhead depending on the specific config. Typical use case is unit tests of XCM related pallets.

xcm-emulator

xcm-emulator uses production relay chain and parachain runtime. Users could plug in Kusama, Statemine, and Karura runtime etc. With up-to-date chain specs, it's able to verify if specific XCM messages work in live networks.

Limitations

xcm-emulator emulates the delivery and execution of XCM messages, with the assumption that the message can always be delivered to and executed in destination. There are some reasons which could prevent messages being delivered or executed, such as:

  • Number of messages in one block limitation a parachain can send is reached.
  • There is no HRMP channel for messages.
  • Relay chain run out of weights reserved for UMP messages execution.
  • Parachain run out of weights reserved for XCMP/DMP messages execution.
  • ...more possible reasons.

Use cases

Typical use cases:

  • Integration tests. Karura is using xcm-emulator for cross-chain transfer, homa-lite protocol integration tests.
  • XCM message playground. Use it to verify if the message about to sent would work in live Kusama networks. Note the limitations in the above section.

xcm-simulator's People

Contributors

johnwhitton avatar nunoalexandre avatar shaunxw avatar xlc avatar zqhxuyuan avatar

Stargazers

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