add eth topic to all the logs scope (#568)

This commit is contained in:
Lorenzo Delgado 2022-12-06 14:54:03 +01:00 committed by GitHub
parent 571b98d7f7
commit 5c46220e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 18 additions and 10 deletions

View File

@ -45,7 +45,7 @@ var
externalUdpPort: Port externalUdpPort: Port
logScope: logScope:
topics = "nat" topics = "eth net nat"
## Also does threadvar initialisation. ## Also does threadvar initialisation.
## Must be called before redirectPorts() in each thread. ## Must be called before redirectPorts() in each thread.

View File

@ -16,6 +16,10 @@ import
export export
p2p_types, rlpx, enode, kademlia p2p_types, rlpx, enode, kademlia
logScope:
topics = "eth p2p"
proc addCapability*(node: var EthereumNode, proc addCapability*(node: var EthereumNode,
p: ProtocolInfo, p: ProtocolInfo,
networkState: RootRef = nil) = networkState: RootRef = nil) =

View File

@ -18,7 +18,7 @@ export
Node, results Node, results
logScope: logScope:
topics = "discovery" topics = "eth p2p discovery"
const const
# UDP packet constants. # UDP packet constants.

View File

@ -29,7 +29,7 @@ declareCounter discovery_session_lru_cache_misses, "Session LRU cache misses"
declareCounter discovery_session_decrypt_failures, "Session decrypt failures" declareCounter discovery_session_decrypt_failures, "Session decrypt failures"
logScope: logScope:
topics = "discv5" topics = "eth p2p discv5"
# Support overriding the default discv5 protocol version and protocol id # Support overriding the default discv5 protocol version and protocol id
# via compile time defines (e.g., '-d:discv5_protocol_id=d5waku') # via compile time defines (e.g., '-d:discv5_protocol_id=d5waku')

View File

@ -101,7 +101,7 @@ declareCounter discovery_enr_auto_update,
"Amount of discovery IP:port address ENR auto updates" "Amount of discovery IP:port address ENR auto updates"
logScope: logScope:
topics = "discv5" topics = "eth p2p discv5"
const const
alpha = 3 ## Kademlia concurrency factor alpha = 3 ## Kademlia concurrency factor

View File

@ -16,7 +16,7 @@ import
export sets # TODO: This should not be needed, but compilation fails otherwise export sets # TODO: This should not be needed, but compilation fails otherwise
logScope: logScope:
topics = "kademlia" topics = "eth p2p kademlia"
type type
# 32 bytes NodeId | 16 bytes ip | 1 byte mode # 32 bytes NodeId | 16 bytes ip | 1 byte mode

View File

@ -16,6 +16,10 @@ import
".."/[keys, common], ".."/[keys, common],
./private/p2p_types, "."/[discovery, kademlia, rlpx, enode] ./private/p2p_types, "."/[discovery, kademlia, rlpx, enode]
logScope:
topics = "eth p2p peer_pool"
const const
lookupInterval = 5 lookupInterval = 5
connectLoopSleep = chronos.milliseconds(2000) connectLoopSleep = chronos.milliseconds(2000)

View File

@ -37,7 +37,7 @@ export
declarePublicGauge connected_peers, "number of peers in the pool" declarePublicGauge connected_peers, "number of peers in the pool"
logScope: logScope:
topics = "rlpx" topics = "eth p2p rlpx"
type type
ResponderWithId*[MsgType] = object ResponderWithId*[MsgType] = object

View File

@ -16,7 +16,7 @@ import
export utp_router, protocol export utp_router, protocol
logScope: logScope:
topics = "utp_discv5_protocol" topics = "eth utp utp_discv5_protocol"
type type
NodeAddress* = object NodeAddress* = object

View File

@ -13,7 +13,7 @@ import
../keys ../keys
logScope: logScope:
topics = "utp" topics = "eth utp"
type type
# For now utp protocol is tied to udp transport, but ultimately we would like to # For now utp protocol is tied to udp transport, but ultimately we would like to

View File

@ -16,7 +16,7 @@ import
export utp_socket export utp_socket
logScope: logScope:
topics = "utp_router" topics = "eth utp utp_router"
declareCounter utp_received_packets, declareCounter utp_received_packets,
"All correct received uTP packets" "All correct received uTP packets"

View File

@ -21,7 +21,7 @@ export
chronicles chronicles
logScope: logScope:
topics = "utp_socket" topics = "eth utp utp_socket"
type type
ConnectionState* = enum ConnectionState* = enum