Skip to content

Conversation

@pawanjay176
Copy link
Member

@pawanjay176 pawanjay176 commented Dec 9, 2020

Issue Addressed

Resolves #2061
Resolves #2066

Proposed Changes

Document the /lighthouse/validators/keystore validator api method.
The newly generated/imported keystore is always added to the key cache from this function call

self.validators
.write()
.add_definition(validator_def.clone())
.await
.map_err(|e| format!("Unable to add definition: {:?}", e))?;

which eventually invokes KeyCache::add here if enabled

key_cache.add(keypair.clone(), voting_keystore.uuid(), password);

@pawanjay176 pawanjay176 added the ready-for-review The code is ready for review label Dec 9, 2020
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

bors r+

@paulhauner paulhauner added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Dec 21, 2020
bors bot pushed a commit that referenced this pull request Dec 21, 2020
## Issue Addressed

Resolves #2061 
Resolves #2066 

## Proposed Changes

Document the `/lighthouse/validators/keystore` validator api method. 
The newly generated/imported keystore is always added to the key cache from this function call
https://github.com/sigp/lighthouse/blob/65dcdc361b0c91dabe53c886e32aa7952251be68/validator_client/src/validator_store.rs#L105-L109

which eventually invokes `KeyCache::add` here if enabled
https://github.com/sigp/lighthouse/blob/65dcdc361b0c91dabe53c886e32aa7952251be68/validator_client/src/initialized_validators.rs#L192
@bors
Copy link

bors bot commented Dec 21, 2020

@bors bors bot changed the title Add docs for /lighthouse/validators/keystore api [Merged by Bors] - Add docs for /lighthouse/validators/keystore api Dec 21, 2020
@bors bors bot closed this Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge This PR is ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants