Giter Club home page Giter Club logo

trappist's Introduction

Trappist

Check Set-Up & Build XCM Simulator

Trappist is a web3 developer playground for experimenting with cross-chain applications and services built on the technologies spearheaded by the Polkadot Network, namely:

  • Substrate, a Blockchain framework that enables developers to quickly and easily build future proof blockchains optimized for any use case.
  • Cumulus, a set of tools for writing Substrate-based Polkadot parachains.
  • XCM, a common language for secure messaging across Polkadot parachains, and with external networks via bridges.
  • Rococo, Polkadot’s Parachain Testnet.
  • Statemint, Polkadot's common good parachain which provides functionality for deploying and transferring assets — both Fungible and Non-Fungible Tokens (NFTs).
  • Contracts Pallet, enable WebAssembly smart-contracts executions.
  • ink!, an eDSL to write smart contracts in Rust for blockchains built on the Substrate framework.

Altogether those technologies enable an array of exciting cross-chain applications & services:

XCM use cases

This repository contains the source code of Trappist, a feature-rich parachain for exploring and learning about cross-chain applications and services, along with a script to run a complete local multi-chain environment that includes:

  • Rococo relay-chain
  • Statemine common good asset parachain
  • Trappist feature-rich parachain
  • An additional parachain capable to execute ink! smart contracts.

All these pre-configured to allow cross-chain communication via XCM messages on HRMP channels.

Trappist topology

Why "Trappist" ?

The term Trappist refers to a style of beers brewed in Abbeys by Trappist monks, and is generally associated with authenticity, craftsmanship, integrity and tradition. Aside from any religious consideration, we like to think we put as much care in crafting Blockchain software as monks brewing high-quality beer 🍺.

As Trappist breweries are not intended to be profit-making ventures, this project is non-commercial, open-source software focused solely on experimentation and knowledge sharing with people interested in learning about decentralized technologies.

Getting Started

Follow the steps below to get started.

Build Trappist collator

Using Nix

Install nix and optionally direnv and lorri for a fully plug and play experience for setting up the development environment. To get all the correct dependencies activate direnv direnv allow and lorri lorri shell.

Rust Setup

First, complete the basic Rust setup instructions.

Build

Use the following command to build the Trappist collator binary:

cargo build --release

XCM Playground via Zombienet

Create a bin directory into the root of this repository and place the following binaries inside of it:

  • polkadot (which you can download from the releases)
  • polkadot-parachain (which you will build from cumulus)

Download the latest release of zombienet into the root of this repository and make it executable:

$ chmod +x zombienet-linux # OR
$ chmod +x zombienet-macos

Then, start the Trappist playground with:

./zombienet-linux -p native spawn ./zombienet/trappist_rococo.toml

You can also run:

# To start Trappist and Stout together
./zombienet-linux -p native spawn ./zombienet/full_network.toml
# To only run stout
./zombienet-linux -p native spawn ./zombienet/stout_rococo.toml

Integration Tests

parachains-integration-tests is a tool meant for XCM message execution in a locally spawned network. Tests are written as YAML files and converted into Mocha tests with Chai assertions.

The integration-tests directory has tests on Trappist use cases and instructions on how to run them.

XCM Simulator

The XCM simulator can be used to further explore XCM message execution across the various runtimes used by Trappist. Each Trappist use case is written as a Rust unit test, allowing interactive debugging/exploration of message flows and instruction execution. Each execute_with closure scope within a test can be considered as a block on the corresponding chain, with messages being dispatched to the destination chains via a mock message queue as the closure goes out of scope. All XCM-specific traces from the interactions are also collected in a single place for easier inspection.

You can run all tests with:

cd xcm-simulator && cargo test --release tests::; cd ..

License

Trappist is licensed under Apache 2.

trappist's People

Contributors

hbulgarini avatar kalaninja avatar evilrobot-01 avatar bernardoaraujor avatar valentinfernandez1 avatar dependabot[bot] avatar gautamdhameja avatar bidzyyys avatar lana-shanghai avatar metricaez avatar ayushmishra2005 avatar brunopgalvao avatar alvicsam avatar arturgontijo avatar bulatsaif avatar moliholy avatar pawanbisht62 avatar sergejparity avatar stiiifff avatar

Stargazers

Christian Kessler 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.