Skip to main content
5 votes

How do relaychain, parachain, collators, validators work together

You might want to check out https://polkadot.network/blog/the-path-of-a-parachain-block/ I wrote it before most of the code was implemented, so some things are out of date (e.g., there are no ...
joepetrowski's user avatar
  • 2,975
5 votes
Accepted

AllPalletsWithSystem trait not implemented for Executive when running tests

You are probably not passing the try-runtime feature down to all the pallets in your runtime. The feature needs to be propagated to all pallets (Example) and ideally also dependencies, otherwise the ...
Oliver Tale-Yazdi's user avatar
4 votes

How do i find the address of the treasury?

import { stringToU8a } from '@polkadot/util'; import { encodeAddress } from '@polkadot/util-crypto'; const treasuryAddress = encodeAddress(stringToU8a("modlpy/trsry".padEnd(32, '\0')))
Bruno's user avatar
  • 8,455
4 votes

How do i find the address of the treasury?

Find the pallet id in runtime first. Different networks might use different id. Kusama treasury pallet id Use subalfred. λ subalfred key 'py/trsry' --key-type pallet --network kusama public-key ...
aurexav's user avatar
  • 11.2k
4 votes

How do you burn transaction fees?

What you are looking for is the transaction-payment pallet. The functions withdraw_fee and correct_and_deposit_fee of its CurrencyAdapter handle the fees. These fees are then handed over to the ...
Oliver Tale-Yazdi's user avatar
4 votes
Accepted

How to upgrade Frontier to use a specific Substrate version

For now, the recommended path is to use a stable release branch from the frontier repo. As of time of writing this, it is polkadot-v0.9.22: https://github.com/paritytech/frontier/tree/polkadot-v0.9....
Bruno's user avatar
  • 8,455
4 votes

No slash after the validator is offline

The default behavior is to only slash if more than 10% of the validators are offline (https://github.com/paritytech/substrate/blob/master/frame/im-online/src/lib.rs#L961-L971). The validator will be ...
André's user avatar
  • 2,495
4 votes
Accepted

Offchain Worker Not Initializing - Cumulus Parachain Template

You are most likely missing the offchain worker initialisation in the service.rs file, like this https://github.com/substrate-developer-hub/substrate-node-template/blob/...
0xsierra's user avatar
  • 106
4 votes
Accepted

cargo-contract cannot build using the "stable" channel. Switch to nightly

It depends on the cargo-contract version. Pre 2.0.0 versions of cargo-contract use the nightly toolchain of rust. You can get it with rustup toolchain add nightly and then build with cargo +nightly ...
kriko.eth's user avatar
  • 774
3 votes
Accepted

Is InstantAllowed true required to fastTrack referendum?

votingPeriod is the period for which voting will be open (in number of blocks). For the extrinsic to succeed one of the two conditions must be met: votingPeriod is greater or equal to the ...
Adam Wierzbicki's user avatar
3 votes
Accepted

The election failed. No new era is planned

Why Check the PolkadotJS algorithm. info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress); Due to the election failure. ErasStartSessionIndex won't be ...
aurexav's user avatar
  • 11.2k
3 votes
Accepted

./target/release/parachain-collator not found

I think the name should be parachain-template-node.
aurexav's user avatar
  • 11.2k
3 votes
Accepted

In custom Rococo staging and Westend staging network parachain is not producing blocks

The reason for your parachain not producing blocks after registration with rococo-staging relaychain is the parameter session_length_in_blocks. This parameter is set as None for rococo-staging and ...
Ayush Mishra's user avatar
3 votes
Accepted

WEIGHT_PER_SECOND,^^^^^^^^^^^^^^^^^ no `WEIGHT_PER_SECOND` in `weights::constants

It was renamed to WEIGHT_REF_TIME_PER_SECOND since with chromatic weights the weight has two components. Ref time and Proof Size. There also is WEIGHT_PROOF_SIZE_PER_MB here.
Oliver Tale-Yazdi's user avatar
3 votes

`let...else` statements are unstable

The answer to why rustc --version and rustup show versions were different was because I had rustc installed in various ways on the same machine. Run the command which -a rustc to find out their ...
Ramsey - Decentration's user avatar
3 votes

How to change the native token in Substrate to a custom token?

All you need to do is set a custom property for token symbol in the chainspec.rs file in the function where you generate the chainspec config. This is typically a function that goes by the name of ...
Purple_Turtle's user avatar
3 votes

How to change the native token in Substrate to a custom token?

You can create a function like this: https://github.com/darwinia-network/darwinia/blob/2d1c1436594b2c397d450e317c35eb16c71105d6/node/service/src/chain_spec/darwinia.rs#L52-L61 Replace the names and ...
aurexav's user avatar
  • 11.2k
3 votes
Accepted

How to Backup and Restore a Substrate Chain Running on a Server

Stop the node and backup the data periodically, then restart the node, if you got enough space, I recommend you run another backup node for this usage Increase your hard drive space or use the pruning ...
aurexav's user avatar
  • 11.2k
3 votes
Accepted

Is it possible to specify parachains in the Polkadot chain specification for local testing?

You can add the parachains to the paras field in your chain-spec. For doing this you can follow this steps: Create the chain-spec in plain text `polkadot build-spec --chain rococo-local --disable-...
pepoviola's user avatar
  • 812
3 votes
Accepted

(Parachain) cannot create a runtime error=Other("cannot deserialize module: unknown Opcode(192)")

Kindly downgrade your nightly version you can downgrade it to 68.
Arunjot Singh's user avatar
2 votes

Error with block built on XXX: Import failed: Unexpected epoch change

I think this is an error from the relaychain, not the parachain. I guess the reason is that your relaychain was stopping producing blocks for a long time. Which doesn't meet BABE requirement. Try to ...
aurexav's user avatar
  • 11.2k
2 votes
Accepted

How to make a parachain project that uses Frontier as a dependency?

Check out the Frontier Node Template repo https://github.com/substrate-developer-hub/frontier-node-template Copy the files in node and runtime folders inside the above repo, then make your parachain ...
Russo's user avatar
  • 1,207
2 votes

cannot find macro `vec` in this scope

Check your deps std features. I think you might missing something like xxx/std.
aurexav's user avatar
  • 11.2k
2 votes

Where to find the path for my relay chain when starting a parachain?

Check the previous section. The tutorial is using this spec. You could download this directly. Or, build it yourself: git clone https://github.com/paritytech/polkadot.git && cd polkadot cargo ...
aurexav's user avatar
  • 11.2k
2 votes
Accepted

Polkadot vs Rococo runtimes

First of all, Rococo has never meant to be a canary network for any other relaychain. And its value and appeal resides in having a testing hub with the maximum possible number of ecosystem networks ...
Alejandro - R 0 G U E's user avatar
2 votes

Parachain keeps trying to start collation over and over again, without success. But no Error or Panic occurred

In the error it says No keystore associated for the current context! This means that your parachain node does not have the aura key that it needs to start collating. Try adding --alice and --bob to ...
Ramsey - Decentration's user avatar
2 votes
Accepted

Must I migrate storage during upgrade if it uses an enum that has a new element?

If you don't need to change the existing items then you don't need a migration. Actually, you could write some tests yourself. It's easy to verify that. use parity_scale_codec::{Decode, Encode}; #[...
aurexav's user avatar
  • 11.2k
2 votes

No slash after the validator is offline

Yep, there is a threshold as @André said. But I think 1/5 is more than 10%. There is one more thing that you need to know. There is a SlashDeferDuration. Check your runtime configurations. The slash ...
aurexav's user avatar
  • 11.2k
2 votes
Accepted

How forkless runtime upgrades takes place in substrate?

There are a number of videos which explain how forkless upgrades work in Substrate. Here are just two, but you can find more: https://www.youtube.com/watch?v=GBQU8D0aV00 https://www.youtube.com/watch?...
Shawn Tabrizi's user avatar
  • 16.3k
2 votes
Accepted

Error when need to add pallet-assets in substrate

Your approach is correct. There is currently an issue with the template which is fixed here, sorry for the inconvenience. The issue is that the Cargo.toml uses " branch" in it instead of ...
Oliver Tale-Yazdi's user avatar

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