Skip to content

secrets-dir flag does not work as intended  #5600

@chong-he

Description

@chong-he

Description

Getting the details from #5480 comment: #5480 (comment). 2 issues:

  1. If one were to create validator keystores with lighthouse account validator create and points the password files to secrets-dir directory :

    lighthouse --network mainnet account validator create --wallet-name wally --wallet-password wally.pass --count 6 --secrets-dir secrets --datadir new
    

    The password files will be created under $datadir/secrets, not --secrets-dir. This is not an expected outcome, as from the help text:

    --secrets-dir <SECRETS_DIR>
       The path where the validator keystore passwords will be stored. Defaults to ~/.lighthouse/{network}/secrets
    

    Although the lighthouse account validator create command has been deprecated (Ref: https://lighthouse-book.sigmaprime.io/key-management.html), but for transparency we document it here.

  2. If the validator_definitions.yml file already contains the keystore information, the --secrets-dir flag will not be effective. i.e., one cannot start the VC with lighthouse vc --secrets-dir and expects the VC to read the password from the --secrets-dir. This usage is desirable as one will not need to provide the voting_keystore_password_path in the validator_definitions.yml. This is helpful as entering voting_keystore_password_path could be manual, and inconvenient for a large number of validator keys. Having a flag --secrets-dir to direct the VC to read the password from the path solves this inconvenience. To achieve this, we would need the VC to allow not having both voting_keystore_password_pat and voting_keystore_password in the validator_definitions.yml, where currently either of these two fields is required: https://lighthouse-book.sigmaprime.io/validator-management.html#fields

Version

Lighthouse 5.1.3-3058b96

Steps to resolve

No. 1 is mainly to document the bug.

No. 2, we need to allow VC to be able to allow the absent of both flags voting_keystore_password_pat and voting_keystore_password, and instruct the VC to read from the --secrets-dir

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingval-clientRelates to the validator client binary

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions