diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index 064260cfc..79c241312 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -1386,10 +1386,14 @@ impl BeaconChain { new_head.beacon_state.build_all_caches(&self.spec)?; + trace!(self.log, "Taking write lock on head"); + // Update the checkpoint that stores the head of the chain at the time it received the // block. *self.canonical_head.write() = new_head; + trace!(self.log, "Dropping write lock on head"); + // Save `self` to `self.store`. self.persist()?; diff --git a/beacon_node/rpc/src/validator.rs b/beacon_node/rpc/src/validator.rs index abc1cffc5..0533e2558 100644 --- a/beacon_node/rpc/src/validator.rs +++ b/beacon_node/rpc/src/validator.rs @@ -25,8 +25,8 @@ impl ValidatorService for ValidatorServiceInstance { req: GetDutiesRequest, sink: UnarySink, ) { - let validators = req.get_validators(); trace!(self.log, "RPC request"; "endpoint" => "GetValidatorDuties", "epoch" => req.get_epoch()); + let validators = req.get_validators(); let epoch = Epoch::from(req.get_epoch()); let slot = epoch.start_slot(T::EthSpec::slots_per_epoch()); diff --git a/validator_client/Cargo.toml b/validator_client/Cargo.toml index d360b93bd..dae07d76c 100644 --- a/validator_client/Cargo.toml +++ b/validator_client/Cargo.toml @@ -26,7 +26,7 @@ slot_clock = { path = "../eth2/utils/slot_clock" } types = { path = "../eth2/types" } serde = "1.0" serde_derive = "1.0" -slog = "^2.2.3" +slog = { version = "^2.2.3" , features = ["max_level_trace", "release_max_level_trace"] } slog-async = "^2.3.0" slog-json = "^2.3" slog-term = "^2.4.0" diff --git a/validator_client/src/config.rs b/validator_client/src/config.rs index 0b4f20ff6..33e8addb6 100644 --- a/validator_client/src/config.rs +++ b/validator_client/src/config.rs @@ -232,7 +232,11 @@ impl Config { let keypairs = match &self.key_source { KeySource::Disk => self.fetch_keys_from_disk(log)?, KeySource::TestingKeypairRange(range) => { - warn!(log, "Using insecure private keys"); + warn!( + log, + "Using insecure interop private keys"; + "range" => format!("{:?}", range) + ); self.fetch_testing_keypairs(range.clone())? } KeySource::YamlKeypairs(path) => { diff --git a/validator_client/src/main.rs b/validator_client/src/main.rs index c0d6961f0..e445218eb 100644 --- a/validator_client/src/main.rs +++ b/validator_client/src/main.rs @@ -82,7 +82,8 @@ fn main() { ) .arg( Arg::with_name("server-grpc-port") - .long("g") + .long("server-grpc-port") + .short("g") .value_name("PORT") .help("Port to use for gRPC API connection to the server.") .default_value(DEFAULT_SERVER_GRPC_PORT) @@ -90,7 +91,8 @@ fn main() { ) .arg( Arg::with_name("server-http-port") - .long("h") + .long("server-http-port") + .short("h") .value_name("PORT") .help("Port to use for HTTP API connection to the server.") .default_value(DEFAULT_SERVER_HTTP_PORT) @@ -104,7 +106,7 @@ fn main() { .help("The title of the spec constants for chain config.") .takes_value(true) .possible_values(&["info", "debug", "trace", "warn", "error", "crit"]) - .default_value("info"), + .default_value("trace"), ) /* * The "testnet" sub-command. @@ -152,7 +154,9 @@ fn main() { Some("crit") => drain.filter_level(Level::Critical), _ => unreachable!("guarded by clap"), }; + let mut log = slog::Logger::root(drain.fuse(), o!()); + let (client_config, eth2_config) = match get_configs(&matches, &mut log) { Ok(tuple) => tuple, Err(e) => { diff --git a/validator_client/src/service.rs b/validator_client/src/service.rs index ba4f3c133..fd8de71ca 100644 --- a/validator_client/src/service.rs +++ b/validator_client/src/service.rs @@ -22,7 +22,7 @@ use protos::services_grpc::{ AttestationServiceClient, BeaconBlockServiceClient, BeaconNodeServiceClient, ValidatorServiceClient, }; -use slog::{crit, error, info, warn}; +use slog::{crit, error, info, trace, warn}; use slot_clock::{SlotClock, SystemTimeSlotClock}; use std::marker::PhantomData; use std::sync::Arc; @@ -289,6 +289,11 @@ impl Service Service current_epoch + ); + // spawn a new thread separate to the runtime // TODO: Handle thread termination/timeout // TODO: Add duties thread back in, with channel to process duties in duty change. @@ -345,6 +357,12 @@ impl Service work.len() + ); + for (signer_index, work_type) in work { if work_type.produce_block { // we need to produce a block