forked from cometbft/cometbft
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(config/node)!: Remove genesisHash from config (cometbft#3595)
Closes cometbft#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 <[email protected]>
- Loading branch information
1 parent
c693f8b
commit 11c5b25
Showing
10 changed files
with
83 additions
and
56 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
.changelog/unreleased/breaking-changes/3595-node-go-api-defaultnewnode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- `[node]` Go API breaking change to `DefaultNewNode`. The function passes | ||
`CliParams` to a node now. | ||
([\#3595](https://github.com/cometbft/cometbft/pull/3595)) |
3 changes: 3 additions & 0 deletions
3
.changelog/unreleased/breaking-changes/3595-node-go-api-provider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- `[node]` Go API breaking change to `Provider`. The function takes | ||
`CliParams` as a parameter now. | ||
([\#3595](https://github.com/cometbft/cometbft/pull/3595)) |
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/improvements/3595-config-remove-genesishash.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- `[config]` Remove unused `GenesisHash` flag | ||
([\#3595](https://github.com/cometbft/cometbft/pull/3595)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters