Differentiate chain-id
and supernet-id
#1521
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Through this PR we are differentiating
chain-id
fromsupernet-id
in thegenesis
file.Before,
chain-id
was equal tosupernet-id
provided byStakeManager
when supernet was registered to it in therootchain deploy
command.Now
genesis
file will have bothchain-id
andsupernet-id
values, wheresupernet-id
will be in thepolybftconfig
struct ingenesis
.chain-id
flag ingenesis
command stays, so that the users can use a customchain-id
for their supernet,NOTE:
supernet-id
is not a flag ingenesis
command, but a value in thegenesis
file which is populated by therootchain deploy
command when supernet is registered toStakeManager
contract.supernet-id
is used for staking, since validators need to provide thesupernet id
when calling thestakeFor
function onStakeManager
so that contract knows on which supernet validator is trying to stake.Commands changed in this PR:
stake
command - flagchain-id
is renamed tosupernet-id
.Tagging @DannyS03 to update the docs.
Changes include
Checklist
Testing