-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implements blocks queue * refactors updateCounter method * fixes deadlock on stop w/o start * refactors updateSchedulerState * more tests on schduler * parseFetchResponse tests * wraps up tests for blocks queue * eod commit * fixes data race in round robin * revamps fetcher * fixes race conditions + livelocks + deadlocks * less verbose output * fixes data race, by isolating critical sections * minor refactoring: resolves blocking calls * implements init-sync queue * udpate fetch/send buffers in blocks fetcher * blockState enum-like type alias * refactors common code into releaseTicket() * better gc * linter * minor fix to round robin * moves original round robin into its own package * adds enableInitSyncQueue flag * fixes issue with init-sync service selection * Update beacon-chain/sync/initial-sync/round_robin.go Co-Authored-By: terence tsao <[email protected]> * initsyncv1 -> initsyncold * adds span Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Raul Jordan <[email protected]> Co-authored-by: terence tsao <[email protected]>
- Loading branch information
1 parent
e96b45b
commit 3ec2a0f
Showing
12 changed files
with
1,167 additions
and
192 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
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,63 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") | ||
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = [ | ||
"log.go", | ||
"round_robin.go", | ||
"service.go", | ||
], | ||
importpath = "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync-old", | ||
visibility = ["//beacon-chain:__subpackages__"], | ||
deps = [ | ||
"//beacon-chain/blockchain:go_default_library", | ||
"//beacon-chain/core/feed:go_default_library", | ||
"//beacon-chain/core/feed/block:go_default_library", | ||
"//beacon-chain/core/feed/state:go_default_library", | ||
"//beacon-chain/core/helpers:go_default_library", | ||
"//beacon-chain/db:go_default_library", | ||
"//beacon-chain/flags:go_default_library", | ||
"//beacon-chain/p2p:go_default_library", | ||
"//beacon-chain/sync:go_default_library", | ||
"//proto/beacon/p2p/v1:go_default_library", | ||
"//shared:go_default_library", | ||
"//shared/bytesutil:go_default_library", | ||
"//shared/featureconfig:go_default_library", | ||
"//shared/mathutil:go_default_library", | ||
"//shared/params:go_default_library", | ||
"//shared/roughtime:go_default_library", | ||
"@com_github_kevinms_leakybucket_go//:go_default_library", | ||
"@com_github_libp2p_go_libp2p_core//peer:go_default_library", | ||
"@com_github_paulbellamy_ratecounter//:go_default_library", | ||
"@com_github_pkg_errors//:go_default_library", | ||
"@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", | ||
"@com_github_sirupsen_logrus//:go_default_library", | ||
], | ||
) | ||
|
||
go_test( | ||
name = "go_default_test", | ||
srcs = ["round_robin_test.go"], | ||
embed = [":go_default_library"], | ||
race = "on", | ||
tags = ["race_on"], | ||
deps = [ | ||
"//beacon-chain/blockchain/testing:go_default_library", | ||
"//beacon-chain/core/helpers:go_default_library", | ||
"//beacon-chain/db/testing:go_default_library", | ||
"//beacon-chain/p2p/peers:go_default_library", | ||
"//beacon-chain/p2p/testing:go_default_library", | ||
"//beacon-chain/state:go_default_library", | ||
"//beacon-chain/sync:go_default_library", | ||
"//proto/beacon/p2p/v1:go_default_library", | ||
"//shared/hashutil:go_default_library", | ||
"//shared/params:go_default_library", | ||
"//shared/roughtime:go_default_library", | ||
"//shared/sliceutil:go_default_library", | ||
"@com_github_kevinms_leakybucket_go//:go_default_library", | ||
"@com_github_libp2p_go_libp2p_core//network:go_default_library", | ||
"@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", | ||
"@com_github_prysmaticlabs_go_ssz//:go_default_library", | ||
"@com_github_sirupsen_logrus//:go_default_library", | ||
], | ||
) |
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,7 @@ | ||
package initialsyncold | ||
|
||
import ( | ||
"github.com/sirupsen/logrus" | ||
) | ||
|
||
var log = logrus.WithField("prefix", "initial-sync") |
Oops, something went wrong.