mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Added deterministic keypair generation.
- The Account Manager has a new subcommand, allowing generation of deterministic keys given a particular validator index. - Split functionality in generate_deterministic_keypair function - Fixed up READMEs to reflect new functionality & correct naming.
This commit is contained in:
@@ -75,8 +75,9 @@ The configuration directory structure looks like:
|
||||
|
||||
Where the hex value of the directory is a portion of the validator public key.
|
||||
|
||||
Validator keys must be generated using the separate `accounts_manager` binary, which will
|
||||
Validator keys must be generated using the separate `account_manager` binary, which will
|
||||
place the keys into this directory structure in a format compatible with the validator client.
|
||||
Be sure to check the readme for `account_manager`.
|
||||
|
||||
The chain specification (slot length, BLS domain, etc.) defaults to foundation
|
||||
parameters, however is temporary and an upgrade will allow these parameters to be
|
||||
|
||||
@@ -9,7 +9,7 @@ mod signer;
|
||||
use crate::config::Config as ValidatorClientConfig;
|
||||
use clap::{App, Arg};
|
||||
use protos::services_grpc::ValidatorServiceClient;
|
||||
use service::Service as ValidatorService;
|
||||
use crate::service::Service as ValidatorService;
|
||||
use slog::{error, info, o, Drain};
|
||||
use types::Keypair;
|
||||
|
||||
|
||||
@@ -166,11 +166,15 @@ impl<B: BeaconNodeDuties + 'static, S: Signer + 'static> Service<B, S> {
|
||||
|
||||
/* Generate the duties manager */
|
||||
|
||||
// generate keypairs
|
||||
// Load generated keypairs
|
||||
let keypairs = match config.fetch_keys(&log) {
|
||||
Some(kps) => Arc::new(kps),
|
||||
None => panic!("No key pairs found, cannot start validator client without at least one. Try running `./account_manager generate` first.")
|
||||
};
|
||||
|
||||
// TODO: keypairs are randomly generated; they should be loaded from a file or generated.
|
||||
// https://github.com/sigp/lighthouse/issues/160
|
||||
let keypairs = Arc::new(generate_deterministic_keypairs(8));
|
||||
//let keypairs = Arc::new(generate_deterministic_keypairs(8));
|
||||
|
||||
// Builds a mapping of Epoch -> Map(PublicKey, EpochDuty)
|
||||
// where EpochDuty contains slot numbers and attestation data that each validator needs to
|
||||
|
||||
Reference in New Issue
Block a user