Skip to content

Allow to skip --parachain-id#102

Merged
shawntabrizi merged 1 commit intoparitytech:masterfrom
Phala-Network:skip-parachain-id
Jul 7, 2021
Merged

Allow to skip --parachain-id#102
shawntabrizi merged 1 commit intoparitytech:masterfrom
Phala-Network:skip-parachain-id

Conversation

@h4x3rotab
Copy link
Copy Markdown
Contributor

In some situation, we already have the parachain id embedded in the chain spec file, and thus --parachain-id is not used (and maybe is even not supported in some node implementation).

This PR introduces "skip_id_arg" option in ParachainConfig to deal with that.

@shawntabrizi
Copy link
Copy Markdown
Member

@h4x3rotab sorry i think this is a little icky...

Can we do something like: if the id is missing, and there is nothing hard coded, then throw an error.

Otherwise, if id is missing, use what is embedded.

If id is specified, use that.

@h4x3rotab
Copy link
Copy Markdown
Contributor Author

h4x3rotab commented Jun 4, 2021

Thanks for the feedback. Do you think we can make it this way:

  1. If no parachain-id is specified in the config file, we try to read it from the chain spec (we can build the chain spec and read the id from it anyway)
  2. When parachain-id is not specified, we don't pass --parachain-id flag to the node on startup

For some node implementations where --parachain-id is always required, it just throw an error at launch, warning the user directly

@shawntabrizi
Copy link
Copy Markdown
Member

@h4x3rotab yeah something like that seems fine.

Basically i do not want to introduce a new flag saying to skip some other flag. I want that behavior to be determined implicitly from either including or excluding the id argument.

@h4x3rotab h4x3rotab force-pushed the skip-parachain-id branch 2 times, most recently from 4932d49 to 2ffc163 Compare June 8, 2021 09:10
@h4x3rotab
Copy link
Copy Markdown
Contributor Author

@shawntabrizi Fixed as you suggested and rebased to the latest commit

@h4x3rotab
Copy link
Copy Markdown
Contributor Author

Kindly ping

@jasl jasl force-pushed the skip-parachain-id branch from 2ffc163 to fcb770b Compare July 6, 2021 21:11
@shawntabrizi shawntabrizi merged commit e2b015b into paritytech:master Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants