-
Notifications
You must be signed in to change notification settings - Fork 66
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
Use network name instead of cluster name on sidecar #2303
Conversation
Network (for sidecar.json) is now stored in the form of etna / fuji / mainnet instead of cluster name even if clustername flag is used. |
Could have implemented this change in network function level, but this will impact node wiz and other node functionalities (separate from acp-77), which is why this change was not considered. |
I feel like it adds a confusion if we do it, if I understand this PR correctly. |
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.
I believe it is ok to add cluster name to sidecar network info.
But probably best would had been to directly change network.Name
instead of removing cluster name info from the network model.
Also, there are functions that offer or try to offer cluster options for
a given blockchain, and that was based on network name on
sidecar, so now it should be based on cluster name info of
sidecar network info.
return NewMainnetNetwork(), nil | ||
case clusterNetwork.ID == constants.EtnaDevnetNetworkID: | ||
return NewEtnaDevnetNetwork(), nil | ||
default: |
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.
it seems a devnet case is missing
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.
We can't know what the devnet network id will be
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.
you can query the network id from the endpoint, such a networkoptions does
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.
addressed
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.
preaproving. will appreciate if you tackle the open conversion.
Why this should be merged
Currently if a blockchain is created with cluster flag and user uses additional commands like addValidator
This is because we are storing where the blockchain is deployed in in cluster name instead of which network it was deployed in.
How this works
Sidecar should show network name instead of cluster name to enable interchangeability of using --cluster vs --network (e.g. --fuji / --etna-devnet). This PR enable interchangeability of --cluster and --network flags.
How this was tested
Should pass CI
How is this documented
NA