Skip to main content
29 votes

How do I become a Substrate Developer?

This is a hard question to answer but I will try to give my 2 ..'s on what was helpful for me when I started on the Substrate path as a Polkadot Support Engineer at Parity. Maybe some others can share ...
Bruno's user avatar
  • 8,315
23 votes
Accepted

What's the difference between Substrate and Polkadot?

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 ...
Shawn Tabrizi's user avatar
  • 16.1k
18 votes
Accepted

What is the XCM format on Polkadot?

XCM stands for cross-consensus message, and is a message format designed to let multiple different consensus engines communicate with one another. XCM is not specific to Polkadot, however is ...
Shawn Tabrizi's user avatar
  • 16.1k
18 votes
Accepted

What's the easiest way to set up a relay chain locally with a couple of parachains?

One option is polkadot-launch, which will mount parachains for you into the relay chain. For building the relay chain using the cargo build --release --fast-runtime (there is a --profile production ...
Squirrel's user avatar
  • 3,849
17 votes
Accepted

What is Cumulus?

Probably an oversimplification, but you can think of Cumulus as a set of tools which allows you to convert a solo-chain Substrate blockchain into a Polkadot compatible Parachain. More specifically, it ...
Shawn Tabrizi's user avatar
  • 16.1k
13 votes
Accepted

What are the shortcomings of Polkadot's governance and what will its next iteration be?

Since the very first governance proposals were put up for discussion, the community already began thinking about alternatives and possible new designs to counteract some identified weaknesses in the ...
RTTI-5220's user avatar
  • 266
12 votes

Can nonces be skipped in Polkadot/ Kusama

For a default Substrate node, Polkadot and Kusama chain using the CheckNonce signed extension, the answer is "no". What it actually does is the following - If the tx-nonce < account-...
Jaco's user avatar
  • 5,865
11 votes

What is the best tutorial to convert a substrate-based standalone chain to a parachain?

There are a lot of tutorials on https://docs.substrate.io/tutorials/ Here is one to convert https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/
11 votes

How to get the balance of an account at a particular nonce using Polkadot.js API

You can get the balance of an account at any given block hash. For example: const { nonce, data: balance } = await api.query.system.account.at(HASH, ADDR); Or, alternatively, you can create a new ...
kianenigma's user avatar
  • 2,799
11 votes
Accepted

Trait bounds not satisfied for `Balance` type

You need to change: pub type SingleValue<T: Config> = StorageValue<_, u32, ValueQuery>; to pub type SingleValue<T: Config> = StorageValue<_, BalanceOf<T>, ValueQuery>; ...
bkchr's user avatar
  • 11.5k
11 votes
Accepted

Democracy rework in Substrate

The overall tracking issue for "new governance" is substrate#10252. New pallets for governance primitives have been introduced in: https://github.com/paritytech/substrate/pull/10195 https://...
Gav's user avatar
  • 2,681
11 votes
Accepted

How to build a "super light" bridge based on Beefy?

GRANDPA light clients don't need to download or store all the blocks. In fact, https://github.com/paritytech/smoldot/ is an example of what you're referring to as a super-light client. It only stores ...
rob's user avatar
  • 2,126
10 votes

How can we get a snapshot of all balances at a certain block?

First, set up a Polkadot JS API connection for the block you want: const provider = new WsProvider(endpoint); const api = await ApiPromise.create({ provider }); const blockHash = await api.rpc.chain....
Shawn Tabrizi's user avatar
  • 16.1k
10 votes
Accepted

How do extrinsic weights apply to Raspbery Pi full-nodes?

The Weight system is not about block production, but actually about block import. Remember that the high level story around weights is that we are trying to protect the network from blocks that are ...
Shawn Tabrizi's user avatar
  • 16.1k
10 votes
Accepted

Is there any way to mint new native tokens after deploying the substrate chain?

Bruno mentions how to do this with the fungibles::* traits, but the more common API that people use is simply the Currency trait. With Currency, trait you have access to a few different functions ...
Shawn Tabrizi's user avatar
  • 16.1k
9 votes

How do you add new validators for your blockchain testnet?

Add new public relay validators to your set This post will guide you through the stage where you have a rococo style relay chain and you want other validators to connect with you. Here we will show ...
Ramsey - Decentration's user avatar
9 votes

How to unbrick a Substrate Chain? --revert?

Recovering from bricked blockchain: Time warp - try reversing the system clocks on all the validators to when it was previously able to produce and finalize blocks. See Kusama's First Adventure Hard ...
Luke Schoen's user avatar
  • 2,346
9 votes

What is the XCM format on Polkadot?

To add onto Shawn's detailed answer, the XCM format is comprised of a set of instructions that convey semantics and optionally contain operands that is defined by the spec for the chain that processes ...
Keith Yeung's user avatar
  • 2,121
9 votes

Is there any way to mint new native tokens after deploying the substrate chain?

mint_into without burn_from will mint new tokens and increase the overall supply. /// Attempt to increase the `asset` balance of `who` by `amount`. /// /// If not possible then don't do anything. ...
Bruno's user avatar
  • 8,315
9 votes
Accepted

How do I check what metadata version a chain is running?

I believe your confusion stems from "metadata version" and "runtime version" and what the metadata contains at a specific point of the chain. Metadata exposes all the constants, ...
Jaco's user avatar
  • 5,865
8 votes
Accepted

How to get pallet index (u8) of a pallet in runtime?

use frame_support::traits::PalletInfoAccess; let my_pallet_index = MyPallet::index(); This will give you the index of your pallet.
bkchr's user avatar
  • 11.5k
8 votes

Block times in parachain are twice as long as configured

The block time of Parachains are currently restricted to 12 seconds. This is a limitation of the current Parachains consensus implementation in the relay chain. In the future with asynchronous backing ...
bkchr's user avatar
  • 11.5k
7 votes
Accepted

What is Gossamer and how does it compare to Substrate?

@Squirrel is correct that this is not strictly a Substrate question, but I still think it's a great question nonetheless ;-) As you said, @Afr, Gossamer is a Golang implementation of the Polkadot Host,...
Dan Forbes's user avatar
7 votes

What's the difference between Substrate and Polkadot?

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 ...
q9f's user avatar
  • 307
7 votes

What's the difference between Substrate and Polkadot?

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 ...
sea212's user avatar
  • 549
7 votes
Accepted

How to decode extrinsic at json-RPC call's data(byte code)

As mentioned in the wiki page https://wiki.polkadot.network/docs/build-node-interaction, some return values (like extrinsics) are SCALE encoded and you need to decode them by using the metadata. You ...
dominique's user avatar
  • 1,683
7 votes

How to decode extrinsic at json-RPC call's data(byte code)

You can use @polkadot-js and do something like this: const wsProvider = new WsProvider('wss://rpc.polkadot.io'); const api = await ApiPromise.create({ provider: wsProvider }); const exampleBlockNumber ...
Bruno's user avatar
  • 8,315
7 votes

Missing `successful_origin` in implementation when running runtime-benchmarks

Thanks for reporting the issue. The problem here was a missing feature flag which enabled the runtime-benchmarks features in downstream dependencies. The solution for you should simply be to simply ...
Shawn Tabrizi's user avatar
  • 16.1k
7 votes

How to set my parachain xcm version

The XCM version is located in the XCM pallet, and there are two ways of setting it: either via the pallet's GenesisConfig by filling out the safe_xcm_version field during runtime construction, or ...
Keith Yeung's user avatar
  • 2,121
7 votes
Accepted

Why only top 256 nominators are rewarded for an oversubscribed validator on Polkadot?

Two reasons, the former being more important: It somehow encourages decentralization. One very large validator, despite being very profitable, will have a limited capacity for nominators to join and ...
kianenigma's user avatar
  • 2,799

Only top scored, non community-wiki answers of a minimum length are eligible