-
Notifications
You must be signed in to change notification settings - Fork 262
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
Move defaultDataDir procedure to nimbus_binary_common. #6939
base: unstable
Are you sure you want to change the base?
Conversation
cbcb9ba
to
9b24074
Compare
beacon_chain/conf.nim
Outdated
@@ -161,7 +161,7 @@ type | |||
|
|||
dataDir* {. | |||
desc: "The directory where nimbus will store all blockchain data" | |||
defaultValue: config.defaultDataDir() | |||
defaultValue: config.defaultDataDir("BeaconNode") |
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 is definitely should not be string literal, because its easy to make mistake which you have made.
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.
thanks. Which mistake was made?
Ok, I see your point, force type checking with an enum or a table. That would be interesting, however check the comments below.
Deserves a const
though
beacon_chain/conf.nim
Outdated
@@ -897,7 +897,7 @@ type | |||
|
|||
dataDir* {. | |||
desc: "The directory where nimbus will store all blockchain data" | |||
defaultValue: config.defaultDataDir() | |||
defaultValue: config.defaultDataDir("BeaconNode") |
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 is not BeaconNode configuration it is Validator Client configuration.
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.
thanks.
all of these declarations were using the same defaultDataDir
procedure with "BeaconNode" hardcoded on the procedure it self.
I just made it generic, and move it from beacon_chain/conf
to nimbus_binary_common
module.
Is it safe to start using a diferent data dir for each client and/or component?
beacon_chain/conf.nim
Outdated
@@ -1078,7 +1078,7 @@ type | |||
|
|||
dataDir* {. | |||
desc: "The directory where nimbus will store validator's keys" | |||
defaultValue: config.defaultDataDir() | |||
defaultValue: config.defaultDataDir("BeaconNode") |
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 is not BeaconNode configuration it is Signing Node configuration
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.
same comment as before.
The general direction we want to be going in is that we have a directory structure that allows the applications to co-exist in it - ie imagine beacon node, vc and execution client as separate binaries - if I pass the same |
the consequence of the above is that we want to tie directory structure to "functionality" and not to any particular end-user application (ie it doesn't matter if the user starts a "validator client" as a separate binary or use the integrated beacon validator - it's the "validator functionality" is what guides what the layout looks like - in this sense, it doesn't make sense to have names like "beacon node" or "validator client" as part of the directory structure. |
I agree and personally like the direction, and this is the first step towards it:
Other steps, besides the obvious one of applying the same strategy to other clients still in development phase, is that Nimbus beacon node client is public and users are not aware of the changes proposed (removing the "BeaconNode" path) A strategy and specially a delivery method need to be defined and tested among all clients. The delivery part is more concerning given that we we need to either warn users using default data directory to move the data manually, or doing it during installation or doing it via code. Strategies, in my opinion, to be addressed and reasoned about on upcoming PR's |
9b24074
to
a263f9f
Compare
This intends to fix all Nimbus clients are declaring the same function.
a263f9f
to
23fa283
Compare
This intends to fix all Nimbus clients declaring the same function, and once its merged, unify this use on all of them.