-
Notifications
You must be signed in to change notification settings - Fork 636
refactor(config/node)!: Remove genesisHash from config #3595
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
Conversation
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.
This PR has two purposes:
- Receive arbitrary CLI parameters when creating a new node
- Remove the
genesis_hash
field from the config file, replacing it by a CLI parameter
I am almost inclined for having two PRs, but this is probably an overkill.
.changelog/unreleased/breaking-changes/3595-node-remove-genesishash.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel <daniel.cason@informal.systems>
This is a good point and you are right. But it is probably overkill to do it for this change. We could however introduce a changelog entry under features so that it is clear this is there? |
Actually no, this is not a feature visible to the users, it is internal for us as developers or people who fork the repo perhaps so I not sure it falls under the classic feature category. |
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.
Thank you for that.
Lets see how our users will react to this change. Actually, I am not really convinced that we need to provide some many versions of NewNode
...
Closes #3547 . This PR removes the `GenesisHash` from the config file because this field is not meant to be updated by the operator. It was only introduced to avoid breaking an API and used to pass the genesis hash provided via cli to the node constructor. As this feature is going into an unreleased version, we decided to break the API of `DefaultNewNode`. We maintain the signature of `NewNode` as this is probably used by the community more and introduce `NewNodeWithCliParams`. `NewNodeWithCliParams` allows for passing different parameters from the cli to the node. The PR also introduces a new type `CliParams`. At the moment this struct contains just the `GenesisHash` but it was done this way so that we can in the future extend it with new parameters without breaking APIs. --------- Co-authored-by: Daniel <daniel.cason@informal.systems> (cherry picked from commit 11c5b25) # Conflicts: # node/node.go # node/node_test.go
… (#3600) Closes #3547 . This PR removes the `GenesisHash` from the config file because this field is not meant to be updated by the operator. It was only introduced to avoid breaking an API and used to pass the genesis hash provided via cli to the node constructor. As this feature is going into an unreleased version, we decided to break the API of `DefaultNewNode`. We maintain the signature of `NewNode` as this is probably used by the community more and introduce `NewNodeWithCliParams`. `NewNodeWithCliParams` allows for passing different parameters from the cli to the node. The PR also introduces a new type `CliParams`. At the moment this struct contains just the `GenesisHash` but it was done this way so that we can in the future extend it with new parameters without breaking APIs. <hr>This is an automatic backport of pull request #3595 done by [Mergify](https://mergify.com). --------- Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Closes #3547 .
This PR removes the
GenesisHash
from the config file because this field is not meant to be updated by the operator. It was only introduced to avoid breaking an API and used to pass the genesis hash provided via cli to the node constructor.As this feature is going into an unreleased version, we decided to break the API of
DefaultNewNode
. We maintain the signature ofNewNode
as this is probably used by the community more and introduceNewNodeWithCliParams
.NewNodeWithCliParams
allows for passing different parameters from the cli to the node.The PR also introduces a new type
CliParams
. At the moment this struct contains just theGenesisHash
but it was done this way so that we can in the future extend it with new parameters without breaking APIs.