Git Product home page Git Product logo

cumulus-workshop's Introduction

Substrate Cumulus Workshop

Connect Substrate blockchains to Polkadot with Cumulus

In this hands-on workshop, participants will start a Polkadot-like relay chainn, register parachains, make cross-chain asset transfers, and convert their own Substrate runtimes to parachains using Cumulus.

Prerequisites

Before you start you need to do a substrate comprehension check and ensure your hardware can build and run this (rather resource intensive) set of software.

Substrate Requirements

If you are here without any former substrate experience, you are likely to not understand or complete this tutorial. Before you continue please complete the following tutorials:

We will reference these assuming you have already understand all the steps involved in these, and have your machine configured for substrate based code base compilation.

Hardware Requirements

Any machine may_ handle building a parachain template, but it is a very resource intensive process! We suggest running these builds on a machine with no less than:

  • 16 GB of RAM (32 is suggested)
  • 4 CPU cores (8 is suggested)
  • 50 GB of free HDD/SSD space

Without the minimal RAM here, you are likely to run out of memory resulting in a SIGKILL error! This generally happens on the polkadot-service build - so be sure to monitor your RAM usage (with something like htop) and lookout for swap starting to be used.

If you cannot use a machine with the minimums here,you can try a few things that trade longer build times for limited RAM usage.

  • Use Less threads cargo's j flag == the number of threads to use to build. Try to use just a few less than you have available total and monitor RAM usage.
  • Cargo's codegen units feature makes more optimized builds, and uses less ram, but much longer compile times!
# use less codegen units
RUSTFLAGS="-C codegen-units=1" cargo build --release 
# set the number of cores/threads to compile (used to build cumulus/polkadot on rpi 3)
cargo build --release -j 1

Try one, or both of these methods together, to trade time for limited RAM machines.

Eventually polkadot-service will be less monolithic, but this is presently a low priority. It builds a node for every network in the polkadot repo.

Versions of Software

At the moment, parachains are very tightly coupled with the relay chainn's codebase they are connecting to. If you want to connect your parachian to a running relay network like the rococo test network, you must be sure that you are testing against the exact same build of that relay chainn.

This workshop has been tested on commits:

NOTE: you must use these commits exactly to ensure that you do not run into conflicts as parachain development development is actively making breaking changes between commits on these repositories!

Rococo Compatibility

We on the devhub team do our best to keep the parachain template & this workshop updated presently with the HEAD of the rococo-v1 branch of Polkadot. But do not assume this is the case! Check the latest commit for rococo that is reported in the rococo matrix channel when breaking changes and test-network resets occur.

Learn More

Read about The Path of a Parachain Block on the official Polkadot Blog.

Acknowledgement & Contribution

Refer to Acknowledgement & Contribution

License

MIT

Disclaimer

Cumulus is pre-release software that is still under development. While this workshop strives to be useful, the material it covers may change or break before Cumulus is fully released. Nothing presented here is ready for use in value-bearing blockchains!

cumulus-workshop's People

Contributors

joshorndorff avatar shawntabrizi avatar apopiak avatar nuke-web3 avatar riusricardo avatar danforbes avatar davidrhodus avatar xrdavies avatar hcastano avatar robamler avatar bertstachios avatar dependabot[bot] avatar ropottnik 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.