-
Notifications
You must be signed in to change notification settings - Fork 189
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
fix: make password as non required field #1023
Conversation
@@ -165,8 +165,8 @@ func NewConfig(ctx *cli.Context) (*Config, error) { | |||
if blsRemoteSignerEnabled && (ctx.GlobalString(flags.BLSRemoteSignerUrlFlag.Name) == "" || ctx.GlobalString(flags.BLSPublicKeyHexFlag.Name) == "") { | |||
return nil, fmt.Errorf("BLS remote signer URL and Public Key Hex is required if BLS remote signer is enabled") | |||
} | |||
if !blsRemoteSignerEnabled && (ctx.GlobalString(flags.BlsKeyFileFlag.Name) == "" || ctx.GlobalString(flags.BlsKeyPasswordFlag.Name) == "") { | |||
return nil, fmt.Errorf("BLS key file and password is required if BLS remote signer is disabled") | |||
if !blsRemoteSignerEnabled && ctx.GlobalString(flags.BlsKeyFileFlag.Name) == "" { |
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.
Maybe add a warn message?
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.
warn message about not providing a password?
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 will anyway fail since the keys won't decrypt and server won't start. so I am not sure if warn is helpful for that.
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.
Hmm I think we need an input from @anupsv
I think an argument can be made that we can be more opinionated here and require password even if they just want to test it (or only allow no password if testMode
?). So that there cannot be plain keys in production
hmm I think in testMode - we use plaintext pk. |
For testnet, i'd say it's good to keep the behavior close to as what they'd need to do for production. If it's in |
Closing this. As Anup said we want to have similar behavior in testnet and mainnet. |
Why are these changes needed?
Fixes #1021
Checks