Questions tagged [chainspec]
The chainspec tag has no usage guidance.
50
questions
1
vote
2
answers
54
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
...
2
votes
0
answers
32
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 ...
0
votes
1
answer
36
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 ...
1
vote
1
answer
62
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 ...
2
votes
1
answer
33
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.
1
vote
2
answers
88
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 ...
4
votes
1
answer
116
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 ...
3
votes
1
answer
60
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 ...
3
votes
1
answer
60
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 / ...
2
votes
0
answers
42
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<...
5
votes
1
answer
93
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 ...
4
votes
1
answer
64
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 ...
8
votes
1
answer
84
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 ...
2
votes
1
answer
65
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 --...
1
vote
1
answer
35
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 ...
1
vote
1
answer
66
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?
2
votes
0
answers
62
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 ...
3
votes
2
answers
138
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 ...
3
votes
1
answer
47
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 ...
1
vote
1
answer
70
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 ...
2
votes
1
answer
31
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: ...
3
votes
1
answer
43
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 ...
0
votes
1
answer
21
views
Node template based network runs with multiple peers using the same identity
I noticed some interesting behavior while running a local test net on my machine. I booted up a network between the default Alice and Bob accounts that are used in all the tutorials, and they ...
0
votes
2
answers
27
views
Should we generate chain spec only on corresponding servers?
This might be a weird question. We are preparing our parachain for Polkadot. We have deployed our parachain on testnet, which we have connected with Rococo.
We have generated chain specs for testnet ...
1
vote
0
answers
41
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 ...
0
votes
1
answer
34
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?
1
vote
1
answer
57
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?
3
votes
2
answers
253
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: ...
1
vote
1
answer
29
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 ...
6
votes
2
answers
189
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?
1
vote
1
answer
38
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 ...
1
vote
1
answer
91
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 ...
2
votes
2
answers
256
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 ...
0
votes
0
answers
57
views
How to debug chain_spec.rs?
I was trying to have a close look at how chain_spec.rs was constructed, and wanted to output to the console for debugging purposes, but was having some trouble executing print and log::info. So, I ...
2
votes
1
answer
226
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-...
0
votes
1
answer
128
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 ...
1
vote
1
answer
53
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 \
--...
0
votes
1
answer
43
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-...
3
votes
2
answers
153
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 ...
1
vote
0
answers
101
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 ...
2
votes
1
answer
55
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 ...
9
votes
2
answers
168
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 = ...
2
votes
4
answers
330
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----
...
2
votes
2
answers
67
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 ...
5
votes
1
answer
71
views
Convert a raw chainspec to the original format [closed]
Is there a way to revert a raw chainspec to the original format?
6
votes
1
answer
108
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 ...
2
votes
1
answer
184
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 ...
2
votes
1
answer
61
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 ...
10
votes
1
answer
128
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
...
6
votes
2
answers
364
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 ...