mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-10 12:26:02 +00:00
ba940a5ce7
* Reorg SnapPeerBase descriptor, notably start/stop flags details: Instead of using three boolean flags startedFetch, stopped, and stopThisState a single enum type is used with values SyncRunningOk, SyncStopRequest, and SyncStopped. * Restricting snap to eth66 and later why: Id-tracked request/response wire protocol can handle overlapped responses when requests are sent in row. * Align function names with source code file names why: Easier to reconcile when following the implemented logic. * Update trace logging (want file locations) why: The macros previously used hid the relevant file location (when `chroniclesLineNumbers` turned on.) It rather printed the file location of the template that was wrapping `trace`. * Use KeyedQueue table instead of sequence why: Quick access, easy configuration as LRU or FIFO with max entries (currently LRU.) * Dissolve `SnapPeerEx` object extension into `SnapPeer` why; It is logically cleaner and more obvious not to inherit from `SnapPeerBase` but to specify opaque field object references of the merged `SnapPeer` object. These can then be locally inherited. * Dissolve `SnapSyncEx` object extension into `SnapSync` why; It is logically cleaner and more obvious not to inherit from `SnapSyncEx` but to specify opaque field object references of the `SnapPeer` object. These can then be locally inherited. Also, in the re-factored code here the interface descriptor `SnapSyncCtx` inherited `SnapSyncEx` which was sub-optimal (OO inheritance makes it easier to work with call back functions.)
31 lines
1.1 KiB
Nim
31 lines
1.1 KiB
Nim
# Nimbus - Ethereum Wire Protocol, version eth/65
|
|
#
|
|
# Copyright (c) 2018-2021 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
|
# http://opensource.org/licenses/MIT)
|
|
# at your option. This file may not be copied, modified, or distributed
|
|
# except according to those terms.
|
|
|
|
const
|
|
# Some static noisy settings for `eth` debugging
|
|
trEthTracePacketsOk* = true
|
|
## `trace` log each sync network message.
|
|
trEthTraceGossipOk* = true
|
|
## `trace` log each sync network message.
|
|
trEthTraceHandshakesOk* = true
|
|
## `trace` log each network handshake message.
|
|
trEthTraceIndividualNodesOk* = true
|
|
## `trace` log each trie node, account, storage, receipt, etc.
|
|
|
|
# Some static noisy settings for `snap` debugging
|
|
trSnapTracePacketsOk* = true
|
|
## `trace` log each sync network message.
|
|
|
|
# The files and lines clutter differently when sync tracing is enabled.
|
|
# publicLogScope: chroniclesLineNumbers=false
|
|
|
|
# End
|