Downgrade sync and rpc warn logs (#1417)

* Downgrade sycn and rpc warn logs

* Correct warning
This commit is contained in:
Age Manning 2020-07-30 13:52:44 +10:00 committed by GitHub
parent febb300a2d
commit a37e75f44b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 36 deletions

60
Cargo.lock generated
View File

@ -2657,13 +2657,13 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
[[package]] [[package]]
name = "libp2p" name = "libp2p"
version = "0.22.0" version = "0.22.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"atomic", "atomic",
"bytes 0.5.6", "bytes 0.5.6",
"futures 0.3.5", "futures 0.3.5",
"lazy_static", "lazy_static",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"libp2p-core-derive", "libp2p-core-derive",
"libp2p-dns", "libp2p-dns",
"libp2p-gossipsub", "libp2p-gossipsub",
@ -2676,7 +2676,7 @@ dependencies = [
"libp2p-websocket", "libp2p-websocket",
"libp2p-yamux", "libp2p-yamux",
"multihash", "multihash",
"parity-multiaddr 0.9.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "parity-multiaddr 0.9.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"parking_lot 0.10.2", "parking_lot 0.10.2",
"pin-project", "pin-project",
"smallvec 1.4.1", "smallvec 1.4.1",
@ -2686,7 +2686,7 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-core" name = "libp2p-core"
version = "0.20.1" version = "0.20.1"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"asn1_der", "asn1_der",
"bs58", "bs58",
@ -2699,8 +2699,8 @@ dependencies = [
"libsecp256k1", "libsecp256k1",
"log 0.4.11", "log 0.4.11",
"multihash", "multihash",
"multistream-select 0.8.2 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "multistream-select 0.8.2 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"parity-multiaddr 0.9.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "parity-multiaddr 0.9.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"parking_lot 0.10.2", "parking_lot 0.10.2",
"pin-project", "pin-project",
"prost", "prost",
@ -2752,8 +2752,8 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-core-derive" name = "libp2p-core-derive"
version = "0.20.1" version = "0.20.2"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"quote", "quote",
"syn", "syn",
@ -2762,17 +2762,17 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-dns" name = "libp2p-dns"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"futures 0.3.5", "futures 0.3.5",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"log 0.4.11", "log 0.4.11",
] ]
[[package]] [[package]]
name = "libp2p-gossipsub" name = "libp2p-gossipsub"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"base64 0.11.0", "base64 0.11.0",
"byteorder", "byteorder",
@ -2781,7 +2781,7 @@ dependencies = [
"futures 0.3.5", "futures 0.3.5",
"futures_codec", "futures_codec",
"hex_fmt", "hex_fmt",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"libp2p-swarm", "libp2p-swarm",
"log 0.4.11", "log 0.4.11",
"lru_time_cache", "lru_time_cache",
@ -2797,10 +2797,10 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-identify" name = "libp2p-identify"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"futures 0.3.5", "futures 0.3.5",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"libp2p-swarm", "libp2p-swarm",
"log 0.4.11", "log 0.4.11",
"prost", "prost",
@ -2812,13 +2812,13 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-mplex" name = "libp2p-mplex"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"bytes 0.5.6", "bytes 0.5.6",
"fnv", "fnv",
"futures 0.3.5", "futures 0.3.5",
"futures_codec", "futures_codec",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"log 0.4.11", "log 0.4.11",
"parking_lot 0.10.2", "parking_lot 0.10.2",
"unsigned-varint 0.4.0", "unsigned-varint 0.4.0",
@ -2827,13 +2827,13 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-noise" name = "libp2p-noise"
version = "0.21.0" version = "0.21.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"bytes 0.5.6", "bytes 0.5.6",
"curve25519-dalek", "curve25519-dalek",
"futures 0.3.5", "futures 0.3.5",
"lazy_static", "lazy_static",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"log 0.4.11", "log 0.4.11",
"prost", "prost",
"prost-build", "prost-build",
@ -2848,7 +2848,7 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-secio" name = "libp2p-secio"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"aes-ctr 0.3.0", "aes-ctr 0.3.0",
"ctr 0.3.2", "ctr 0.3.2",
@ -2856,7 +2856,7 @@ dependencies = [
"hmac 0.7.1", "hmac 0.7.1",
"js-sys", "js-sys",
"lazy_static", "lazy_static",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"log 0.4.11", "log 0.4.11",
"parity-send-wrapper", "parity-send-wrapper",
"pin-project", "pin-project",
@ -2877,10 +2877,10 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-swarm" name = "libp2p-swarm"
version = "0.20.1" version = "0.20.1"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"futures 0.3.5", "futures 0.3.5",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"log 0.4.11", "log 0.4.11",
"rand 0.7.3", "rand 0.7.3",
"smallvec 1.4.1", "smallvec 1.4.1",
@ -2891,13 +2891,13 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-tcp" name = "libp2p-tcp"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"futures 0.3.5", "futures 0.3.5",
"futures-timer", "futures-timer",
"get_if_addrs", "get_if_addrs",
"ipnet", "ipnet",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"log 0.4.11", "log 0.4.11",
"socket2", "socket2",
"tokio 0.2.22", "tokio 0.2.22",
@ -2906,12 +2906,12 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-websocket" name = "libp2p-websocket"
version = "0.21.1" version = "0.21.1"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"async-tls", "async-tls",
"either", "either",
"futures 0.3.5", "futures 0.3.5",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"log 0.4.11", "log 0.4.11",
"quicksink", "quicksink",
"rustls", "rustls",
@ -2925,10 +2925,10 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-yamux" name = "libp2p-yamux"
version = "0.20.0" version = "0.20.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"futures 0.3.5", "futures 0.3.5",
"libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22)", "libp2p-core 0.20.1 (git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822)",
"parking_lot 0.10.2", "parking_lot 0.10.2",
"thiserror", "thiserror",
"yamux", "yamux",
@ -3284,7 +3284,7 @@ checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce"
[[package]] [[package]]
name = "multistream-select" name = "multistream-select"
version = "0.8.2" version = "0.8.2"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"bytes 0.5.6", "bytes 0.5.6",
"futures 0.3.5", "futures 0.3.5",
@ -3572,7 +3572,7 @@ dependencies = [
[[package]] [[package]]
name = "parity-multiaddr" name = "parity-multiaddr"
version = "0.9.1" version = "0.9.1"
source = "git+https://github.com/sigp/rust-libp2p?rev=8211054ddd6576d3f1cc317ecb207f1b47308c22#8211054ddd6576d3f1cc317ecb207f1b47308c22" source = "git+https://github.com/sigp/rust-libp2p?rev=8e9e35994e63716c6eb0a05b9702133d113b3822#8e9e35994e63716c6eb0a05b9702133d113b3822"
dependencies = [ dependencies = [
"arrayref", "arrayref",
"bs58", "bs58",

View File

@ -10,7 +10,7 @@ use futures::Stream;
use hashset_delay::HashSetDelay; use hashset_delay::HashSetDelay;
use libp2p::core::multiaddr::Protocol as MProtocol; use libp2p::core::multiaddr::Protocol as MProtocol;
use libp2p::identify::IdentifyInfo; use libp2p::identify::IdentifyInfo;
use slog::{crit, debug, error, warn}; use slog::{crit, debug, error};
use smallvec::SmallVec; use smallvec::SmallVec;
use std::{ use std::{
net::SocketAddr, net::SocketAddr,
@ -307,7 +307,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
pub fn handle_rpc_error(&mut self, peer_id: &PeerId, protocol: Protocol, err: &RPCError) { pub fn handle_rpc_error(&mut self, peer_id: &PeerId, protocol: Protocol, err: &RPCError) {
let client = self.network_globals.client(peer_id); let client = self.network_globals.client(peer_id);
let score = self.network_globals.peers.read().score(peer_id); let score = self.network_globals.peers.read().score(peer_id);
warn!(self.log, "RPC Error"; "protocol" => protocol.to_string(), "err" => err.to_string(), "client" => client.to_string(), "peer_id" => peer_id.to_string(), "score" => score.to_string()); debug!(self.log, "RPC Error"; "protocol" => protocol.to_string(), "err" => err.to_string(), "client" => client.to_string(), "peer_id" => peer_id.to_string(), "score" => score.to_string());
// Map this error to a `PeerAction` (if any) // Map this error to a `PeerAction` (if any)
let peer_action = match err { let peer_action = match err {

View File

@ -60,12 +60,12 @@ pub fn spawn_block_processor<T: BeaconChainTypes>(
BatchProcessResult::Success BatchProcessResult::Success
} }
(imported_blocks, Err(e)) if imported_blocks > 0 => { (imported_blocks, Err(e)) if imported_blocks > 0 => {
warn!(log, "Batch processing failed but imported some blocks"; debug!(log, "Batch processing failed but imported some blocks";
"id" => *batch_id, "error" => e, "imported_blocks"=> imported_blocks); "id" => *batch_id, "error" => e, "imported_blocks"=> imported_blocks);
BatchProcessResult::Partial BatchProcessResult::Partial
} }
(_, Err(e)) => { (_, Err(e)) => {
warn!(log, "Batch processing failed"; "id" => *batch_id, "error" => e); debug!(log, "Batch processing failed"; "id" => *batch_id, "error" => e);
BatchProcessResult::Failed BatchProcessResult::Failed
} }
}; };
@ -237,7 +237,7 @@ fn handle_failed_chain_segment(error: BlockError, log: &slog::Logger) -> Result<
Err(format!("Internal error whilst processing block: {:?}", e)) Err(format!("Internal error whilst processing block: {:?}", e))
} }
other => { other => {
warn!( debug!(
log, "Invalid block received"; log, "Invalid block received";
"msg" => "peer sent invalid block", "msg" => "peer sent invalid block",
"outcome" => format!("{:?}", other), "outcome" => format!("{:?}", other),

View File

@ -644,7 +644,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
request_id: RequestId, request_id: RequestId,
) -> Option<ProcessingResult> { ) -> Option<ProcessingResult> {
if let Some(batch) = self.pending_batches.remove(request_id) { if let Some(batch) = self.pending_batches.remove(request_id) {
warn!(self.log, "Batch failed. RPC Error"; debug!(self.log, "Batch failed. RPC Error";
"chain_id" => self.id, "chain_id" => self.id,
"id" => *batch.id, "id" => *batch.id,
"retries" => batch.retries, "retries" => batch.retries,