[release/1.3.1] [DEVOPS-398] Testnet config#3585
Conversation
mhuesch
left a comment
There was a problem hiding this comment.
I'm confused by one part, which I commented on with a "❓"
| protocolMagic: 55550001 | ||
| protocolMagic: | ||
| pm: 55550001 | ||
| requiresNetworkMagic: NMMustBeNothing |
There was a problem hiding this comment.
👍 (assuming that "dev core" means this net will emulate mainnet/staging in development)
There was a problem hiding this comment.
Yes I would like any dev clusters to work more like mainnet than testnet.
| protocolMagic: 10000000 # arbitrary protocolMagic, to be overridden in actual configs | ||
| protocolMagic: | ||
| pm: 10000000 # arbitrary protocolMagic, to be overridden in actual configs | ||
| requiresNetworkMagic: NMMustBeNothing |
There was a problem hiding this comment.
👍 mainnet has NMMustBeNothing
| avvmDistr: *mainnet_avvmDistr | ||
| protocolMagic: | ||
| pm: 1097911063 | ||
| requiresNetworkMagic: NMMustBeJust |
There was a problem hiding this comment.
❓ I'm not sure why this is NMMustBeJust when the above mainnet config was NMMustBeNothing (but I'm also not very good and reading these config files)
There was a problem hiding this comment.
Also wondering about this..
There was a problem hiding this comment.
Thanks for ❓. This section describes the testnet genesis parameters. The << mainnet_... means to "inherit" config from the section labelled &mainnet_.... So my intention is to set up the testnet genesis data with most of the same parameters as mainnet, except overriding things such as protocolMagic.
There was a problem hiding this comment.
Ah ok, that makes sense. Thanks for clarifying.
| protocolMagic: 170987650 | ||
| protocolMagic: | ||
| pm: 170987650 | ||
| requiresNetworkMagic: NMMustBeNothing |
There was a problem hiding this comment.
dcoutts
left a comment
There was a problem hiding this comment.
Looks correct, but...
I worry order of overriding here however, that it could lead to mistakes too easily. Here we have a mainnet setting for Nothing, and then the testnet inheriting mainnet and overriding it back to Just. This seems fragile. I'd prefer if we can arrange things so that we only ever override from the default of Just to the special value of Nothing, and do so only for the "leaf" configurations, not for anything else that gets inherited later.
Could we do that? Have nothing inherit from the mainnet config itself, so that the mainnet config is a leaf config. So for example instead of of putting the Nothing into mainnet_base, where it gets inherited by the testnets, put it into the mainnet config only (which I assume it a leaf config). Then the testnets would not need any special override.
Summary: can we follow the rule that we only use requiresNetworkMagic: NMMustBeNothing and not NMMustBeJust, and we only use it at "leaf" configurations, not configurations that are inherited from. I think this rule will make it much more explicit and harder to make silly mistakes.
|
Thanks @dcoutts . I have reset the |
|
We need to ensure any legacy clusters, like staging and mainnet, explicitly pass cc @mhuesch |
e7345d7 to
bbd8a5c
Compare
c69ba4e to
ab3f412
Compare
I have implemented your suggestions in #3659
Description
This PR contains:
Linked issues
https://iohk.myjetbrains.com/youtrack/issue/DEVOPS-398
https://iohk.myjetbrains.com/youtrack/issue/CO-354
https://iohk.myjetbrains.com/youtrack/issue/CBR-414
QA Steps