13

A little confused on the relationship/hierarchy between Substrate/Polkadot.

For instance, is the use case for Substrate to build decentralized apps for Polkadot or is it for something else?

1
  • 2
    I think of a substrate as a city that already has its infrastructure: electricity, roads, and plans. Polkadot is one of the administrative centers or a stronghold in that city.
    – James
    Feb 8 at 19:49

4 Answers 4

22

Substrate is a generalized blockchain development SDK.

It is written in Rust, and has a bunch of different modular and extensible components which make it one of the easiest ways to develop a blockchain.

Polkadot is just one of the blockchains built using Substrate.

Polkadot uses the Polkadot Protocol to connect multiple independent blockchains, providing for them scalability, shared security, and interoperability. These connected blockchains are called Parachains.

Many of the blockchains which connect to Polkadot are also built using Substrate since the Substrate SDK makes it very simple to both develop your custom blockchain and provides Cumulus, a set of tools making it easy to convert your Substrate blockchain to a Parachain.

However, Substrate can be, and has been used to create completely independent blockchains which are not related to Polkadot. For example a Proof of Work blockchain called Kulupu.

While Substrate will always be connected to the Polkadot ecosystem since it shares history with one another, Substrate is designed to be the best blockchain development SDK for any purpose.

7

Substrate is a blockchain development framework that offers all the required functionality that a blockchain needs out of the box. For example, networking, database abstraction, client code, etc. are already included. Substrate offers developers to focus on developing the "state-transition" or "business" logic, for example a multi-signature value transfer or identity management, without needing to implement the low-level functionality of the blockchain first. This state-transition logic is encapsulated in modules that are called FRAME-pallets, which are in turn configured within the runtime. Substrate comes with a big library of FRAME-pallets, that can be included and are ready to use in minutes. Substrate has a unique mechanism called runtime-upgrades. Whenever runtime logic is upgraded, a wasm-blob is stored on the chain, that nodes can fetch. This enables forkless upgrades. The libraries that are available for Substrate even allow multiple ways of realizing inter-chain communication, which can be used to connect blockchains, as it is the case with Polkadot.

Polkadot is a project that is built on Substrate. It extended the client and runtime code of the Substrate template in a way, that makes Polkadot to a community governed hub of chains: Substrate-based chains can participate in an auction to register as so called Parachain or lease a slot on-demand as a so called Parathread to secure their chain state on the Polkadot chain (and consequently inherit the security that Polkadot offers). Parachains that are connected to Polkadot (the Relaychain) can also potentially communicate with each other and transfer assets or use any functionality that is offered by them through this means.

1
  • runtime upgrades are not unique, hyperledger sawtooth has had them for a while for example (but to be fair substrate is far more robust in my experience).
    – Squirrel
    Feb 8 at 22:33
7

All the existing answers outline the differences between Polkadot and Substrate very well: Substrate is a developer kit, a framework to build blockchains, whereas Polkadot is a specific protocol implementation.

Notably, Polkadot uses Substrate; however, the Polkadot Rust client existed technically before Substrate was released.

While the Parity team was working on Polkadot, they realized many components they implemented would have to be abstracted and implemented by many other teams building on Polkadot in the future. Thus, they went the extra mile to spin out early abstracted versions of the Polkadot client that they called Substrate and was made available to other teams and Polakdot-curious developers.

Apparently, one of the first teams to build on Substrate early on was Edgeware.

4

Substrate is the underlying framework that Polkadot (a layer 0 blockchain) uses. The same goes for the Parachains (which are layer 1 blockchains Here is a good article By Gav going into the details

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.