Questions tagged [chainspec]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
10 votes
1 answer
146 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
192 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
  • 299
8 votes
1 answer
92 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
201 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,260
6 votes
2 answers
396 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,312
6 votes
1 answer
113 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,312
5 votes
1 answer
113 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
75 views

Convert a raw chainspec to the original format [closed]

Is there a way to revert a raw chainspec to the original format?
aardbol's user avatar
  • 161
4 votes
1 answer
76 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
119 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
  • 200
4 votes
1 answer
65 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
290 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
  • 433
3 votes
1 answer
68 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
146 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
2 answers
167 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,213
3 votes
1 answer
85 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
  • 580
3 votes
1 answer
48 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
265 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
207 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,312
2 votes
1 answer
39 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
2 votes
1 answer
35 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
363 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
69 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
119 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
  • 41
2 votes
1 answer
87 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,260
2 votes
2 answers
308 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
72 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
39 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
49 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
  • 424
2 votes
0 answers
64 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
1 vote
1 answer
87 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
55 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
1 answer
32 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
1 vote
2 answers
91 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 ...
Ganesh11's user avatar
  • 1,207
1 vote
1 answer
56 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
69 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
64 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
1 vote
1 answer
31 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
  • 541
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
1 answer
37 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
77 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
  • 141
1 vote
0 answers
45 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,159
1 vote
1 answer
109 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
112 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
150 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
0 votes
1 answer
44 views

./target/release/parachain-collator not found

Following this tutorial. I'm trying to run this command in the substrate-parachain-template folder (found here): ./target/release/parachain-collator build-spec --disable-default-bootnode > rococo-...
Darian Foulds's user avatar
0 votes
1 answer
38 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
0 votes
1 answer
29 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
  • 509
0 votes
1 answer
42 views

Newer nodes unable to execute genesis chainspec, "unknown field `phantom`"

We've been running a testnet and have executed a number of runtime upgrades. We've also upgraded the node across a variety of changes. New validators are trying to join the network and yet they cannot ...
Drew Stone's user avatar
  • 1,164