forked from status-im/nimbus-eth2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backward sync support for SyncManager. (status-im#3131)
* Unbundle SyncQueue from sync_manager.nim. Unbundle Peer scores constants to peer_scores.nim. Add Forward/Backward enum. * Further improvements and tests. * Adopt getRewindPoint() and fix MissingParent handler. * Remove unused procedures. Refactor `result` usage. Fix resetWait(). * Add all the tests and fix the issue with rewind point. * Fix get() issue. * Fix flaky tests. * test fixes Co-authored-by: Jacek Sieka <[email protected]>
- Loading branch information
1 parent
2ca28fb
commit b05734f
Showing
7 changed files
with
1,422 additions
and
957 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# beacon_chain | ||
# Copyright (c) 2018-2021 Status Research & Development GmbH | ||
# Licensed and distributed under either of | ||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). | ||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). | ||
# at your option. This file may not be copied, modified, or distributed except according to those terms. | ||
|
||
{.push raises: [Defect].} | ||
|
||
const | ||
PeerScoreNoStatus* = -100 | ||
## Peer did not answer `status` request. | ||
PeerScoreStaleStatus* = -50 | ||
## Peer's `status` answer do not progress in time. | ||
PeerScoreUseless* = -10 | ||
## Peer's latest head is lower then ours. | ||
PeerScoreGoodStatus* = 50 | ||
## Peer's `status` answer is fine. | ||
PeerScoreNoBlocks* = -100 | ||
## Peer did not respond in time on `blocksByRange` request. | ||
PeerScoreGoodBlocks* = 100 | ||
## Peer's `blocksByRange` answer is fine. | ||
PeerScoreBadBlocks* = -1000 | ||
## Peer's response contains incorrect blocks. | ||
PeerScoreBadResponse* = -1000 | ||
## Peer's response is not in requested range. | ||
PeerScoreMissingBlocks* = -200 | ||
## Peer response contains too many empty blocks. |
Oops, something went wrong.