-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use para id in specs instead of flag #157
Use para id in specs instead of flag #157
Conversation
@shawntabrizi ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo we should entirely remove the paraid from here. Some projects may still support the cli argument or whatever. However, I'm also planing to remove the Para id by default from the chain spec.
@bkchr So how does one determine their parachain id? |
You hard code it in the runtime for example. |
args.push("--parachain-id=" + id); | ||
} | ||
if (chain) { | ||
args.push("--chain=" + chain); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to remove chain selection from the parachain parameters? It will cause issues when you export the genesis state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to a comment, it was't supported by cumulus anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was a misunderstanding. The only thing that got removed was the parachain-id
paritytech/cumulus#739
No need to remove the option to select a chain. It is very needed, in polkadot-collator we have several chains, the same stands for the polkadot binary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. How was this resolved, perhaps I'm missing something @joelamouche ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghzlatarev I left the --chain command. So if you specify the chain in the chain field of the parachain in hte config, it should work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joelamouche I don't see it in startCollator
or exportGenesisWasm
, is it not needed there ?
Right now if I start a westmint-local
network I get some default Local Testnet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right Im adding it back
@bkchr but what if I want to run the same runtime on 2 different ids? |
This is completely up to the parachain developer. Aka if you want to support two different parachain ids, I see no reason why that should not be doable. However, the official code doesn't need to provide this, because it only confuses people. |
OK that seems a pretty big refactor to let's leave it to a follow up PR @bkchr ? |
src/runner.ts
Outdated
const { id, resolvedId, balance } = parachain; | ||
|
||
if (resolvedId) { | ||
await changeGenesisConfig(`${chain}.json`, {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you passing an empty object to changeGenesisConfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah I forgot to remove that :s
@joelamouche seems the code is just wrong in the case of a |
@@ -156,7 +154,6 @@ export async function startParachainNodes(options: ParachainOptions): Promise<{ | |||
bin: BINARY_PATH, | |||
id: (1000 * (i + 1)).toString(), | |||
balance: "1000000000000000000000", | |||
// chain: options.chain, this is not supported by cumulus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@riusricardo this is the comment I was referring to. I'm going to put it back though, for collators that do need it
@shawntabrizi ready for review |
hmmm.. didn't aware you guys are working on this... I am working on #160 |
the config.json has a |
tackles #151 #156