-
Notifications
You must be signed in to change notification settings - Fork 217
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
Create Jormungandr Config from command-line options #508
Conversation
ed67ac3
to
cd70814
Compare
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.
At first glance it looks good. A lot of details that has to be just put right. I agree fully that dedicated directory that has to be explicitely chosen is good direction. It is good to know where generated node's configuration is located, etc. I wonder how this PR will fit with PORT PR that just landed in master.
@@ -58,12 +65,18 @@ import Data.Proxy | |||
( Proxy (..) ) | |||
import Data.Text.Class | |||
( TextDecodingError (..) ) | |||
import Servant.Client.Core |
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.
servant-client
should be removed from cabal I think (and also nix then)
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.
(done)
Generating own Also, maybe that's something to worry in future, but if the config is |
Are you thinking of another log line that clearly indicates that we've generated a configuration for Jormungandr and put it under a given location?
Well, the idea for the |
It fits well because the PORT tests doesn't really do anything with the |
That would be nice actually as well, but I was rather thinking that the
Yes! But they still have to generate initial config (genesis block and secrets file) (?) All the sources I'm aware of also say about generating (like here) or generate (like the bootstrap script) the And therefore I thought this additional note on the CLI help, might be useful (in the log too, sure). |
cd70814
to
9a6d0e8
Compare
This conveys the meaning of this option in a clearer fashion.
b04b47e
to
0fece11
Compare
0fece11
to
77ad611
Compare
@piotr-iohk: I added a disclaimer in the footer of the
|
Issue Number
#357
Overview
I have made the
--state-dir
option default to$HOME/.cardano-wallet
I have generated Jormungandr's configuration file from options passed to the CLI. Before this, we could pass
--node-config
and--node-port
which could contain conflicting values. Indeed, the config file for Jörmungandr contains the url Jörmungandr rest component should listen too and nothing could prevent them to diverge. So, I saw two strategies:Either, removing
--node-port
and, parsing the node config yaml file to extract the data we needed. Which isn't a really great option since it would make theserve
command a bit inconsistent and requires some ad-hoc parsing of the yaml file which, incidentally, doesn't even have to declare a rest API!Generate the configuration file on-the-fly ourselves! This way, we are in complete control of its content, can make sure that it declares a
rest
section and can also have the storage pointing to our--state-dir
option! This helps maintaining good consistency and is much more user friendly.I have renamed the
--node-secret
to--bft-leaders
which I find less cryptic and more true about what should really be the content of that file. We aren't accepting any sort of secrets but are really expecting bft leaders keys!Comments