Skip to main content

Questions tagged [chainspec]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
10 votes
1 answer
163 views

Do I need a json chainspec for a production chain or does a code defined one suffices?

When I look at chain specs defined in code they usually contain something like this in their genesis: GenesisConfig { system: my_runtime::SystemConfig { code: my_runtime::WASM_BINARY ...
Alexander Theißen's user avatar
9 votes
2 answers
214 views

What is the full list of ChainSpec properties?

The ChainSpec type has a from_genesis method which takes an Option<Properties>. This Properties object is: /// Arbitrary properties defined in chain spec as a JSON object pub type Properties = ...
Kyle's user avatar
  • 311
8 votes
1 answer
103 views

What are the best practices for keeping chain specifications for Devnet, Testnet, and Mainnet environments?

can anybody help me to understand what questions I should address before choosing the approach for keeping the runtime configuration for Devnet/Testnet/Mainnet environments in a substrate-based ...
Yahor Tsaryk's user avatar
6 votes
2 answers
234 views

What is `codeSubstitutes` in the chain spec?

I have seen mention of codeSubstitutes in the chain spec before. What is this? And when is it applicable?
Bruno's user avatar
  • 8,335
6 votes
2 answers
437 views

How to overwrite endowed account balances using additional accounts and balances from a JSON file for genesis block inclusion?

My goal is to allocate a balance in the genesis block to both: A list of endowed accounts already included in the chain specification chain_spec.rs A list of further accounts and balances included in ...
Luke Schoen's user avatar
  • 2,346
6 votes
1 answer
120 views

When are you required to change the `authoring_version` for forkless runtime upgrades?

In the Substrate documentation here and the Substrate reference documentation here it says the authoring_version "is the version of the authorship interface. An authoring node will not attempt to ...
Luke Schoen's user avatar
  • 2,346
5 votes
1 answer
159 views

adding an account

I just want to simply add an account in the development config but have no idea how to do it, i tried simply adding the seed in the development_config function but it dosent work, what can i do to add ...
Muhammed Rasheed's user avatar
5 votes
1 answer
83 views

Convert a raw chainspec to the original format [closed]

Is there a way to revert a raw chainspec to the original format?
user avatar
4 votes
1 answer
90 views

What's the difference b/w ChainType::Development vs Local?

pub enum ChainType { /// A development chain that runs mainly on one node. Development, /// A local chain that runs locally on multiple nodes for testing purposes. Local, /// A ...
Purple_Turtle's user avatar
4 votes
1 answer
127 views

Unable to sync after runtime upgrade

After performing an upgrade on a remote node that includes a new pallet in my runtime, I attempted to sync a local node with the remote one, but I encountered the following error: Bootnode with peer ...
magecnion's user avatar
  • 344
4 votes
1 answer
70 views

Should I set validator or rpc nodes in chainspec bootnodes?

I am adding bootnodes to chainspecs and I wonder if I should prefer setting validator nodes or rpc nodes in the bootnodes list. They are all connected with p2p, but is there a reason to privilege some ...
Hugo Trentesaux's user avatar
3 votes
2 answers
346 views

Can we modify chain spec while running the node?

I have few questions related to chain spec. I should have asked them separately but they are related to each other. Can we update chain spec json file on the fly while running the node? For example: ...
Boleng's user avatar
  • 535
3 votes
1 answer
72 views

Nodes not connecting to Rococo relaychain

We are having issues with RPC & Collator nodes connecting to Rococo relaychain. The running chain works but once we restart any node, it cannot find relay peers on the relaychain and thus stalls / ...
Nico 's user avatar
  • 71
3 votes
2 answers
154 views

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

I noticed that the chain specification for Polkadot contains a paras field that is empty. I have not been able to find any documentation on what it is used for or if I can specify parachains there to ...
Niels Vistisen's user avatar
3 votes
1 answer
86 views

Building a chain specification with --raw, gives me "wasm call error Other: Exported method GenesisBuilder_create_default_config is not found"

I upgraded my parachain runtime version from 1.0.0 to 1.5.0, but when trying to build a chain spec with the --raw flag, it gives me the following error: Error: Service(Other("wasm call error ...
Alexandre Ribeiro's user avatar
3 votes
1 answer
43 views

How to retrieve number of decimals for custom token (not DOT)?

How to retrieve number of decimals for custom token (not DOT)? api.registry.chainDecimals is for DOT. I need to retrieve it for a custom token.
Robert La Ferla's user avatar
3 votes
2 answers
182 views

automating the launch of bootnodes

We want to automate the launch of our bootnodes for our parachain. We generated a spec file with an IP address as well as an identity that are repeatable. We used the --node-key to get a repeatable ...
Sam Elamin's user avatar
  • 1,223
3 votes
1 answer
148 views

Building plain chain spec yields raw output

The command substrate build-spec > plain-chain-spec.json used to generate a human readable version of the chain spec in json. To create the more stable machine friendly version of that chain spec ...
Alex Sed's user avatar
  • 590
3 votes
1 answer
58 views

create a dev chainspec with specific test users

I'd like to use the Polkadot CLI to create a chainspec with specific user balances pre-seeded. I'd like to be able to do this for any of the dev runtimes. In the case of the polkadot dev runtime, I ...
Harry Solovay's user avatar
2 votes
1 answer
64 views

How to run a `polkadot-dev` or `kusama-dev` node?

Since the removal of the polkadot and kusama runtimes from the polkadot-sdk, running one of those chains with -dev or -local runs a rococo node. How can I get a polkdadot-dev\-local or kusama-dev\...
Alberto Nicolas Penayo's user avatar
2 votes
1 answer
288 views

When there is a new Chain Spec version how do we know where to add things?

We're updating our relay chain test and its time to create a chain spec. When i generate a plain chain spec (from polkadot repo) it seems i still get some raw output: ./target/release/polkadot build-...
Ramsey - Decentration's user avatar
2 votes
1 answer
223 views

How many collators of a registered parachain must be synchronised with the Rococo relay chain for that parachain to generate and finalize blocks?

I want to determine the minimum amount of collators that a specific parachain that is registered on the Rococo network must have running in order for them to generate and finalize blocks once they ...
Luke Schoen's user avatar
  • 2,346
2 votes
1 answer
39 views

Error generating Raw Chainspec from Plain Chainspec in Substrate

I am trying to generate raw chain spec from plain chain spec, but it won't let me: ✗ ./target/release/node-template build-spec --chain plain-local-chainspec.json --raw > chain-spec.json Error: ...
Gogosama's user avatar
2 votes
4 answers
407 views

Cannot produce and finalize blocks with 2 node peer

I want to connect 2 nodes via custom chain specification via Internet IP public https://docs.substrate.io/tutorials/get-started/trusted-network/ I. STEP 1: Create Aura and grandpa --- NODE 01---- ...
oscar's user avatar
  • 33
2 votes
1 answer
71 views

SessionsPerEra doesn't seem to be affecting sessions per era

Am I fundamentally misunderstanding how staking handles election timings, please? I've been trying to change the number of eras in a session, to increase the number of elections for testing. I ...
JelliedOwl - Paul's user avatar
2 votes
3 answers
142 views

How do I modify the chain spec for a local relay chain to have an additional relay chain validator? (I already have two: Alice and Bob)

I am referring this documentation on preparing a local relay chain in which they have provided a plain sample relay chain spec. Also, I have cloned this release locally. The documentation says that ...
RRR's user avatar
  • 45
2 votes
1 answer
111 views

How to create a Polkadot chain spec for development purposes?

I want to setup my own custom Relay chain for development purposes. Is there a way to generate a local chain spec for Polkadot (Rococo) something like this: ./target/release/polkadot build-spec --...
Bruno's user avatar
  • 8,335
2 votes
2 answers
350 views

How to configure chain specs for parachains and relay chain

I want to run two parachains (parachain A and parachain B) and a relay chain with two validators Alice and Bob. I need to implement the use-case below: For parachain A the chain spec is newSpec.json ...
Amrith's user avatar
  • 31
2 votes
1 answer
89 views

Raw specs not building, unknown field

While building the raw specs: ./target/release/kylin-collator build-spec --chain=rococo_democracy.json --raw --disable-default-bootnode > rococo_raw_democracy.json I get 2022-07-08 16:00:00 ...
Sylvain Cormier's user avatar
2 votes
2 answers
68 views

Parachain config for Rococo public test network

How to config a locally tested parachain to connect it to the Rococo public test-network? I mean on the startup phase (before the Rococo Slot Request Form), following the Cumulus tutorial: after ...
Fredo's user avatar
  • 21
2 votes
0 answers
46 views

Cant produce new blocks with custom ChainSpec file

I was using substrate version of 4.0.0-dev-41ad4a6c9d7 and following the Add Trusted Nodes for making a custom account as a Authorites account here, I can't able to produce new blocks, I don't know ...
Mojo's user avatar
  • 95
2 votes
0 answers
51 views

Having trouble with the `ChainSpec` Type

I've updated the ChainSpec type from: pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig, Extensions>; to pub type ChainSpec = sc_service::GenericChainSpec<Result<...
Discardo's user avatar
  • 436
2 votes
0 answers
69 views

Export-State produces wrong collators hex

I am experimenting with the export state command. For now I am testing it on my local machine. So, for this purpose, I spin up polkadot relay chain with two validators and connect one collator of my ...
Syed Kamran's user avatar
2 votes
0 answers
58 views

How do I use the Forks feature of the `ChainSpecExtension`?

I've read the rustdocs about ChainSpecExtensions. For example https://paritytech.github.io/substrate/master/sc_service/trait.ChainSpecExtension.html and also several related pages that you can find by ...
JoshOrndorff's user avatar
  • 1,201
1 vote
1 answer
97 views

How to inject session key in raw chain specs?

Is is possible to add/delete session keys directly to the raw chain specs instead of plain chain specs?
Syed Kamran's user avatar
1 vote
2 answers
56 views

Genesis chainspec size limit

I understand that there is a PoV size limitation for blocks produced by the chain, since they need to be imported, and validated by validator nodes. However, I'm curious about whether this limitation ...
Valentin Fernandez's user avatar
1 vote
2 answers
116 views

Can't able to peer two different node on different computers

We wan't to run multiple node on multiple devices. We use substrate-node-template to do that. We build the project using cargo build --release and follow this Add trusted node tutorial. We were able ...
go11li's user avatar
  • 1,241
1 vote
1 answer
40 views

is there any api for get substrate api client verison?

all. Currently sidecar owns a api "/node/version" for get polkadot node version. But is there any api could return sidecar api version for us?
Bomax GoGo's user avatar
1 vote
1 answer
58 views

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

I'm trying to use this code to start a parachain (from this tutorial): ./target/release/parachain-collator \ --alice \ --collator \ --force-authoring \ --chain rococo-local-parachain-2000-raw.json \ --...
Darian Foulds's user avatar
1 vote
1 answer
43 views

Where is the plain chain spec for kusama that i can use with a kusama runtime locally?

How to run polakdot/kusama runtime + node with a full functionality locally? what chain spec can I use? where the plan chain spec are located for just a ready to start for local env with 2 nodes? ...
rust.dev's user avatar
  • 529
1 vote
1 answer
80 views

Alter existing chain spec without mutating genesis hash

What contents of a non-raw chain spec can be added or altered without mutating the derived genesis hash? More specifically, does changing a pallet's genesis configuration in the spec lead to a ...
William Freudenberger's user avatar
1 vote
1 answer
96 views

What are the meanings of `id` and `protocol_id`?

When we use ChainSpec::from_genesis, we need to pass some string to these fields. And these fields are not documented. So, how do we deal with these fields?
AurevoirXavier's user avatar
  • 10.8k
1 vote
1 answer
33 views

`assimilate_storage` not implemented for `ChainSpec`

I have a slightly custom chain spec that makes regular chain spec serializable with serde to/from JSON. In the impl of sp_runtime::BuildStorage I just forward assimilate_storage call to the underlying ...
nazar-pc's user avatar
  • 551
1 vote
1 answer
41 views

tokenDecimals = 10 Causes Astronomical Fees - How To Change tokenDecimals On A Running Chain?

We have started a test chain with tokenDecimals = 10 in the chain spec JSON. The chain is running beautifully BUT fees are astronomical. For example, it takes 2.6 Billion to run for council. We are ...
KathrynColleen's user avatar
1 vote
0 answers
35 views

How inactive issuance get's calculated or how do we customize it in substrate-node-template

So i was working with substrate-node-template . I can see how total issuance is getting calculated from substrate node template but confused of how would i set up inactive issuance . What are the ...
Md. Raisul Islam Rony's user avatar
1 vote
1 answer
42 views

Does export-state produces a random collator address?

While running export-state command against my parachain, I observed that the resultant raw parachain specs has a diffirent collator address as compared to the original one. Does the export-sate ...
Syed Kamran's user avatar
1 vote
1 answer
86 views

How to start a GRANDPA blockchain without any initial voters?

I've tried modifying the repository so initial voters for the grandpa pallet. In doing so, I noticed there are many checks to prevent that modification. The reason why we do not want any initial ...
Kofi's user avatar
  • 143
1 vote
1 answer
123 views

Change session keys in new chain spec

Chain spec primary_chain is defined under node/src/chain_spec.rs Steps to reproduce: generate default chain spec for primary_chain ./collator build-spec --chain primary_chain > spec.json Edit ...
Sudip Ghimire's user avatar
1 vote
0 answers
117 views

How to include evm chain decimals?

I tried frontier-node-template it's working fine with substrate part but showing less balance in metamask. I used chainid and RPC it's showing 20 TEST instead of 20M Tokens What's i am missing? How to ...
Bharath's user avatar
  • 11
0 votes
1 answer
163 views

Do I need the chain specification file of Rococco testnet to run my local parachain node?

I followed Connect a local parachain tutorial and successfully run my local parachain node with this command: ./target/release/parachain-collator \ --alice \ --collator \ --force-authoring \ --chain ...
Mabuu's user avatar
  • 3