Follow the instructions below to best prepare for the "Build your own blockchain" and "Adding new pallets to Node Template" webinars. All webinars - past and future - are listed on Crowdcast.
The hardest part of all this is configuring your computer for Rust and Substrate development. Don't let this discourage you, you only have to do it once!
You need the Rust language and runtime to develop with the Substrate framework, which is what we'll be using in the webinar.
If you're on OS X or Linux, all the prerequisites can be installed via:
curl https://getsubstrate.io -sSf | bash -s -- --fast
For Windows without WSL (Windows Subsystem for Linux), the instructions are detailed here. With WSL, just use the one-liner above (recommended!)
After installing, running
cargo --version should say
1.44.0 or higher.
λ cargo --version
cargo 1.49.0 (626f0f40e 2019-12-03)
Post-install, the following commands should work:
λ node --version
λ yarn --version
Remember that you need to close and re-open your terminal / bash / powershell / command prompt for the new paths to load and the
yarn commands to become globally available.
First let's make sure our Rust is at the most recent version and that it's able to compile WASM code.
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
Let's now clone substrate-node-template - a template for development with some basic functionality on which we can build application-specific blockchains.
git clone -b v2.0.0 --depth 1 https://github.com/substrate-developer-hub/substrate-node-template
Following that, let's compile our substrate node.
git checkout -b my-first-substrate-chain
cardo build --release
Since this can take up to 40 minutes, let's move onto other areas.
Because we're using an unstable nightly version of Rust, the compilation sometimes fails. In those instances, it can be necessary to install an older, more stable version:
rustup uninstall nightly
rustup install nightly-2020-10-01
rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-01
cargo build --release should work now.
Substrate-node-template has a rudimentary companion front-end for interacting with the chain. Let's clone it:
git clone -b v2.0.0 --depth 1 https://github.com/substrate-developer-hub/substrate-front-end-template
Running the node and the UI
To launch our compiled Substrate node:
--dev flag is there so the chain starts with some unlocked rich accounts and so that it can make its own blocks. Omitting this makes it wait for another validator to join the network, and no blocks get produced. The node will be running on port 9944 by default, so
127.0.0.1:9944. Having a node running like this will also let you connect to it from the official Polkadot Apps UI using the URL
ws://127.0.0.1:9944. Then let's run the UI from within the
You should be able to do rudimentary reads and writes (transaction sending and balance reading) with your blockchain now using the UI at