Integrate Accounts v2 Keymanager Into Validator Client (#6489)

* add in configs
* ask for enable accounts v2
* begin integration of v2 keymanager
* refactor wallet opening
* include significant refactoring of how opening a wallet works, making it easy to include at runtime
* ensure build with keymanager v2
* further improving runtime integration
* default pass paths
* finally running v2 at runtime
* import spacing
* Merge branch 'master' into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* confs
* rem e2e val flag
* Merge branch 'master' into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
* Merge refs/heads/master into v2-accounts-feature
This commit is contained in:
Raul Jordan
2020-07-08 00:01:09 -05:00
committed by GitHub
parent fe13f1f856
commit fd9003f822
17 changed files with 327 additions and 151 deletions

View File

@@ -47,7 +47,7 @@ func NewKeystore(input string) (KeyManager, string, error) {
if opts.Path == "" {
opts.Path = v1.DefaultValidatorDir()
}
log.WithField("keystorePath", opts.Path).Info("Checking validator keys")
log.WithField("keystorePath", opts.Path).Debug("Checking validator keys")
exists, err := v1.Exists(opts.Path, true /* assertNonEmpty */)
if err != nil {

View File

@@ -46,3 +46,17 @@ func (k Kind) String() string {
return fmt.Sprintf("%d", int(k))
}
}
// ParseKind from a raw string, returning a keymanager kind.
func ParseKind(k string) (Kind, error) {
switch k {
case "direct":
return Direct, nil
case "derived":
return Derived, nil
case "remote":
return Remote, nil
default:
return 0, fmt.Errorf("%s is not an allowed keymanager", k)
}
}